1 2002-09-17 Zack Weinberg <zack@codesourcery.com>
3 * Make-lang.in: Remove all references to the demangler.
4 * cxxfilt.c: Moved to binutils.
6 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
9 * pt.c (tsubst_decl): Remove assert.
11 Remove DR 295 implementation.
12 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
13 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
14 about ignoring volatile qualifiers.
16 * search.c (lookup_member): Correct documentation.
18 2002-09-16 Geoffrey Keating <geoffk@apple.com>
20 * cp-tree.h (union lang_tree_node): Add chain_next option.
22 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
24 * parse.y (parse_finish_call_expr): Check lookup_member result.
27 * semantic.c (finish_asm_stmt): Fix operand/output_operands
29 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
31 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
34 * call.c (build_over_call): Convert this pointer for fns found by
37 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
39 * ChangeLog: Follow spelling conventions.
40 * ChangeLog.1: Likewise.
42 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
45 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
47 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
49 * error.c: Fix comment formatting.
53 * g++spec.c: Likewise.
58 * optimize.c: Likewise.
62 * semantics.c: Likewise.
66 * typeck2.c: Likewise.
68 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
70 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
72 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
74 * decl.c: Fix comment formatting.
77 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
79 * call.c: Fix comment formatting.
81 * cp-lang.c: Likewise.
82 * cp-tree.h: Likewise.
85 2002-09-11 Zack Weinberg <zack@codesourcery.com>
87 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
88 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
89 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
90 minor adjustments (use version_string, eliminate yet another
93 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
95 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
97 2002-09-05 Jason Merrill <jason@redhat.com>
99 * typeck2.c (add_exception_specifier): Only pedwarn for an
101 (require_complete_eh_spec_types): New fn.
102 (cxx_incomplete_type_diagnostic): Also support pedwarning.
103 * typeck.c (complete_type_or_diagnostic): Likewise.
104 * call.c (build_call): Call require_complete_eh_spec_types.
105 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
106 on an incomplete type.
108 2002-09-04 Jakub Jelinek <jakub@redhat.com>
110 * decl.c (start_cleanup_fn): Clear interface_only before
111 start_function, restore it afterwards.
113 2002-08-31 Jason Merrill <jason@redhat.com>
115 * cp-lang.c (cp_expr_size): Allow initialization from a
118 2002-08-30 Richard Henderson <rth@redhat.com>
121 * tree.c: Include target.h.
122 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
124 * Makefile.in (tree.o): Update.
126 2002-08-27 Mark Mitchell <mark@codesourcery.com>
128 * class.c (layout_virtual_bases): Warn about bugs in G++ that
129 result in incorrect object layouts.
130 (layout_class_type): Likewise.
132 2002-08-24 Matt Austern <austern@apple.com>
134 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
136 (real_lvalue_p): Update caller.
138 (non_cast_lvalue_or_else): New.
139 * tree.h: Declare it.
140 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
142 2002-08-22 Mark Mitchell <mark@codesourcery.com>
144 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
145 and COND_EXPR specially; fix error message output.
147 2002-08-22 Jason Merrill <jason@redhat.com>
149 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
150 * semantics.c (nullify_returns_r): Likewise.
152 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
155 * typeck.c (finish_class_member_access_expr): Diagnose cases where
156 name lookup finds nothing.
158 2002-08-15 Jason Merrill <jason@redhat.com>
160 * semantics.c (finish_then_clause): Remove redundant assignment.
161 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
162 extra binding level outside the if/switch statement.
163 (finish_while_cond, finish_for_cond): Rewrite complex condition
166 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
168 * parse.y (sizeof, alignof, typeof): New non-terminals to
169 increment skip_evaluation. Replace terminals with them and
170 decrement skip_evaluation at the end of rules using them.
171 * decl2.c (mark_used): Don't assemble_external if
174 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
177 * parse.y (parse_finish_call_expr): Handle incomplete
178 type used to name a scope.
180 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
183 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
184 regression caused by my 2002-08-08 patch.
186 2002-08-13 Mark Mitchell <mark@codesourcery.com>
188 * decl.c (pushdecl_class_level): Honor requests to bind names to
191 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
193 * decl2.c (build_call_from_tree): Fix uninitialized variable.
194 * parse.y (parse_finish_call_expr): Likewise.
195 * repo.c (old_args, old_dir, old_main): Const-ify.
197 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
199 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
200 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
201 * optimize.c (maybe_clone_body): Likewise.
202 * pt.c (tsubst_enum): Likewise.
203 (lookup_template_class): Likewise.
204 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
206 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
208 * lang-specs.h: Remove -ansi.
210 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
212 * tree.c (maybe_dummy_object): Replace // with /* */
214 2002-08-09 Mark Mitchell <mark@codesourcery.com>
216 * call.c (standard_conversion): Use build_ptrmem_type.
217 * cp-tree.h (build_ptrmem_type): New function.
218 (adjust_result_of_qualified_name_lookup): Likewise.
219 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
221 (build_ptrmem_type): New function.
222 (grokdeclarator): Do not use build_offset_type when encountering a
224 * parse.y (parse_finish_call_expr): Use
225 adjust_result_of_qualified_name_lookup.
226 * search.c (adjust_result_of_qualified_name_lookup): New function.
227 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
228 accessing OFFSET_TYPEs directly.
230 2002-08-08 Mike Stump <mrs@apple.com>
232 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
233 (type_decays_to): Likewise.
234 * class.c (find_final_overrider): Likewise.
235 (maybe_note_name_used_in_class): Likewise.
236 * decl.c (current_tmpl_spec_kind): Likewise.
237 (add_binding): Likewise.
238 (push_class_binding): Likewise.
239 (duplicate_decls): Likewise.
240 (layout_var_decl): Likewise.
241 (grokfndecl): Likewise.
242 (grokdeclarator): Likewise.
243 (check_default_argument): Likewise.
244 * decl2.c (handle_class_head): Likewise.
245 * error.c (dump_template_decl): Likewise.
246 * init.c (build_offset_ref): Likewise.
247 * pt.c (check_specialization_scope): Likewise.
248 (determine_specialization): Likewise.
249 (check_explicit_specialization): Likewise.
250 (maybe_check_template_type): Likewise.
251 (process_partial_specialization): Likewise.
252 (check_default_tmpl_args): Likewise.
253 (push_template_decl_real): Likewise.
254 (convert_template_argument): Likewise.
255 (try_class_unification): Likewise.
256 (get_bindings_real): Likewise.
257 (do_decl_instantiation): Likewise.
258 * semantics.c (begin_function_definition): Likewise.
259 (finish_member_declaration): Likewise.
260 (check_multiple_declarators): Likewise.
261 * typeck.c (comp_array_types): Likewise.
262 (comptypes): Likewise.
263 (expr_sizeof): Likewise.
264 (build_binary_op): Likewise.
265 (dubious_conversion_warnings): Likewise.
266 (check_return_expr): Likewise.
268 2002-08-08 Mark Mitchell <mark@codesourcery.com>
270 * typeck.c (build_class_member_access_expr): Do not return
271 error_mark_node when no error has occurred.
273 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
275 * typeck.c (build_component_addr): Remove.
276 (build_unary_op): Just check it's not a bitfield, and then build
279 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
281 * class.c (convert_to_base): Correct check for error_mark_node.
282 (create_vtable_ptr): Remove unused VFUNS_P parm.
284 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
286 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
288 2002-08-07 Mark Mitchell <mark@codesourcery.com>
290 Rework build_component_ref.
291 * call.c (build_vfield_ref): Do not go through build_component_ref.
292 (build_field_call): Use build_class_member_access_expr.
293 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
294 (build_object_call): Likewise.
295 * class.c (convert_to_base): New function.
296 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
297 (instantiate_type): Handle BASELINKs.
298 * cp-tree.def (BASELINK): New tree code.
299 * cp-tree.h (BASELINK_P): Reimplement.
300 (SET_BASELINK_P): Remove.
301 (BASELINK_BINFO): Reimplement.
302 (BASELINK_FUNCTIONS): Likewise.
303 (BASELINK_ACCESS_BINFO): Likewise.
304 (BASELINK_OPTYPE): Likewise.
305 (convert_to_base): New function.
307 (build_object_ref): Remove.
308 (build_component_ref_1): Likewise.
309 (build_component_ref): Likewise.
310 (build_x_component_ref): Likewise.
311 (build_class_member_access_expr): New function.
312 (finish_class_member_access_expr): Likewise.
313 (build_ptrmemfunc_access_expr): Likewise.
314 * decl.c (grokdeclarator): Handle BASELINKs.
315 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
316 finish_class_member_access_expr.
317 (arg_assoc): Handle BASELINKs.
318 (do_class_using_decl): Likewise.
319 * error.c (dump_decl): Likewise.
320 (dump_expr): Use build_ptrmemfunc_access_expr.
321 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
323 (build_throw): Use BASELINK_FUNCTIONS.
324 * init.c (perform_member_init): Use
325 build_class_member_access_expr.
326 (build_offset_ref): Handle BASELINKs. Use
327 build_class_member_access_expr.
328 * method.c (hack_identifier): Likewise.
329 * parse.y (do_id): Use BASELINK, not TREE_LIST.
330 (primary): Remove uses of build_object_ref.
331 * pt.c (lookup_template_function): Handle BASELINKs.
332 (resolve_overloaded_unification): Likewise.
333 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
334 (lookup_field): Use BASELINK, not TREE_LIST.
335 (lookup_fnfiels): Likewise.
336 (setup_class_bindings): Likewise.
337 * semantics.c (finish_object_call_expr): Do not use
338 build_method_call when we already know what function is being
340 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
341 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
343 (name_p): New function.
344 * typeck.c (build_object_ref): Remove.
345 (build_component_ref_1): Likewise.
346 (build_x_component_ref): Likewise.
347 (build_class_member_access_expr): New function.
348 (finish_class_member_access_expr): Likewise.
349 (build_ptrmemfunc_access_expr): Likewise.
350 (get_member_function_from_ptrfunc): Use
351 build_ptrmemfunc_access_expr.
352 (build_binary_op): Likewise.
353 (build_unary_op): Likewise.
354 (build_ptrmemfunc): Likewise.
355 (pfn_from_ptrmemfunc): Likewise.
356 * typeck2.c (build_m_component_ref): Adjust comment.
358 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
360 * Make-lang.in (CXX_C_OBJS): Update.
361 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
362 * cp-tree.h (cxx_decode_option): Remove.
363 * decl2.c (compare_options, lang_f_options, unsupported_options,
364 cxx_decode_option): Remove.
366 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
368 * typeck.c (build_x_unary_op): Handle pointer-to-member.
370 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
372 * class.c: Don't include obstack.h.
374 * decl2.c: Delete bogus comment.
375 * error.c: Don't include obstack.h.
376 * except.c: Likewise.
377 (dump_type): Correct comment.
378 * method.c: Don't include obstack.h.
381 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
384 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
385 expressions to pointer-to-data-member of pointer-to-member-functions.
387 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
389 * cvt.c (ocp_convert): Delete obsolete code.
390 * parse.y (permanent_obstack): Delete declaration.
391 * pt.c (permanent_obstack): Delete declaration.
392 * repo.c (permanent_obstack): Delete declaration.
393 (open_repo_file): Use xmalloc instead of permanent_obstack.
394 (init_repo): Use xstrdup instead of permanent_obstack.
396 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
398 * cp-tree.h (VF_DERIVED_VALUE): Remove.
399 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
401 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
404 C++ ABI change - vfunc ordering.
405 * class.c (add_virtual_function): Remove.
406 (dfs_modify_all_vtables): Take list of all declared
407 virtuals. Assign all that are not in primary base.
408 (check_for_override): Adjust comments.
409 (create_vtable_ptr): Take single list of virtuals. Build chain
410 of declared virtuals here.
411 (layout_class_type): Take single list of virtuals. Adjust.
412 (finish_struct_1): Keep virtuals on single list. Adjust.
414 2002-08-02 Mark Mitchell <mark@codesourcery.com>
416 * init.c (build_member_call): Use build_new_method_call, not
419 2002-08-02 Krister Walfridsson <cato@df.lth.se>
421 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
423 2002-08-02 Mark Mitchell <mark@codesourcery.com>
425 * call.c (build_method_call): Issue a more helpful error message
426 about ambiguous method names.
428 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
430 * tree.c (build_shared_int_cst): Make cache file scope, and
433 2002-08-02 Jason Merrill <jason@redhat.com>
435 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
436 (cp_expr_size): New fn.
437 * call.c (build_over_call): Lose empty class hackery.
438 (convert_arg_to_ellipsis): Promote non-POD warning to error.
439 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
441 * semantics.c (expand_body): Do tree optimization in the function
444 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
446 * cp-tree.h: Move all warning and flag declarations to c-common.h.
447 * decl.c: Move all warning and flag variables to c-common.c.
448 * decl2.c: Move all warning and flag variables to c-common.c.
449 * lex.c (flag_digraphs): Remove.
450 (warn_traditional): Now in c-common.c.
452 2002-07-31 Mark Mitchell <mark@codesourcery.com>
454 * call.c (build_field_call): Do not look up the field by name.
455 (build_method_call): Simplify.
456 (struct z_candidate): Add access_path and conversion_path. Remove
458 (convert_class_to_reference): Adjust use of
459 add_function_candidate.
460 (add_candidate): Add conversion_path argument.
461 (add_function_candidate): Use it.
462 (add_conv_dndidate): Likewise.
463 (build_builtin_candidate): Likewise.
464 (add_template_candidate_real): Add conversion_path argument.
465 (add_template_conv_candidate): Likewise.
466 (add_template_candidate): Likewise.
467 (build_user_type_conversion_1): Use it.
468 (build_new_function_call): Remove name lookup code. Adjust use of
469 add_template_candidate and add_function_candidate.
470 (build_new_op): Likewise.
471 (convert_like_real): Use build_special_member_call.
472 (build_over_call): Use cand->conversion_path.
473 (build_special_member_call): New method.
474 (build_new_method_call): Remove name lookup code.
475 * cp-tree.def (OFFSET_REF): Update documentation.
476 (TEMPLATE_ID_EXPR): Likewise.
477 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
478 (BASELINK_OPTYPE): Likewise.
479 (build_new_method_call): Adjust prototype.
480 (build_special_member_call): New method.
481 (build_baselink): New method.
482 (build_offset_ref_call_from_tree): Likewise.
483 (build_call_from_tree): Likewise.
484 (finish_qualified_call_expr): Remove.
485 (finish_call_expr): Adjust prototype.
486 (build_x_function_call): Remove.
487 * cvt.c (ocp_convert): Use build_special_member_call.
488 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
489 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
491 (build_offset_ref_call_from_tree): New function.
492 (build_call_from_tree): Likewise.
493 * init.c (expand_cleanup): Use build_special_member_call.
494 (expand_default_init): Likewise.
495 (build_member_call): Use finish_call_expr.
496 (build_new_1): Use build_special_member_call.
497 (push_base_cleanups): Likewise.
498 * method.c (do_build_assign_ref): Likewise.
499 * parse.y (template_id): Do not pass a COMPONENT_REF to
500 lookup_template_function.
501 (primary): Use parse_finish_call_epxr, not finish_call_expr.
502 (parse_finish_call_expr): New function.
503 * pt.c (lookup_template_function): Add assertions.
504 * search.c (lookup_base): Allow T to be a binfo.
505 (build_baselink): New function.
506 (lookup_member): Use it.
507 * semantics.c (finish_call_expr): Do not do name lookup.
508 (finish_object_call_expr): Remove #if 0'd code.
509 (finish_qualified_call_expr): Remove.
510 * typeck.c (build_x_function_call): Remove.
511 (build_static_case): Use build_special_member_call.
512 * typeck2.c (build_functional_cast): Likewise.
514 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
516 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
518 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
520 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
522 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
524 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
527 2002-07-29 Alan Modra <amodra@bigpond.net.au>
529 * cp-tree.h: Comment typo fix.
531 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
533 * spew.c (space_for_token): Allocate zeroed memory for a new token
536 2002-07-27 Roger Sayle <roger@eyesopen.com>
538 * decl.c (builtin_function_1): No need to explicitly mark
539 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
541 2002-07-27 Roger Sayle <roger@eyesopen.com>
543 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
545 2002-07-26 Jason Merrill <jason@redhat.com>
547 * call.c (build_over_call): Likewise.
548 (cp_convert_parm_for_inlining): New fn.
549 (convert_for_arg_passing): New fn.
550 (convert_default_arg, build_over_call): Use it.
551 (type_passed_as): New fn.
552 * pt.c (tsubst_decl): Use it.
553 * decl2.c (cp_build_parm_decl): New fn.
554 (build_artificial_parm): Use it.
555 (start_static_storage_duration_function): Likewise.
556 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
557 (grokparms): Don't mess with DECL_ARG_TYPE.
558 * typeck.c (convert_arguments): Use convert_for_arg_passing.
559 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
561 * cp-tree.h: Declare new fns.
563 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
565 * cp-tree.h (flag_operator_names): Remove.
566 * decl2.c (flag_operator_names): Remove.
567 (lang_f_options): Remove operator-names.
568 * lex.c (D_OPNAME): Remove.
569 (reswords): Remove operator names.
570 (rid_to_yy): Remove operator names.
571 (init_reswords): No need to handle D_OPNAME.
572 * spew.c (read_process_identifier): There are no operator
575 2002-07-26 Jason Merrill <jason@redhat.com>
577 * dump.c (cp_dump_tree): Call c_dump_tree.
578 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
580 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
582 * error.c (print_whitespace): Remove.
583 * g++spec.c (LIBUNWIND): Move.
584 * mangle.c (mangled_position, write_signed_number): Remove.
586 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
588 * decl2.c (cxx_decode_option): Similarly.
590 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
592 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
593 (cxx_sizeof_or_alignof_type): Take a third argument.
594 (cxx_sizeof): Adjust definition.
595 (cxx_alignof): Likewise.
596 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
597 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
599 (c_sizeof_nowarn): Remove definition.
600 (build_unary_op): Use cxx_sizeof_nowarn.
602 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
604 * tree.c (cp_build_qualified_type_real): When copying
605 pointer-to-method types, unshare the record that holds
606 the cached pointer-to-member-function type.
608 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
610 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
612 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
615 * typeck.c (cxx_sizeof_or_alignof_type): New function.
616 (c_sizeof): Remove definition.
617 (expr_sizeof): Use cxx_sizeof.
618 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
619 * decl.c (finish_destructor_body): Use cxx_sizeof.
620 * semantics.c (finish_alignof): Likewise.
621 (finish_alignof): Use cxx_alignof.
622 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
623 (cxx_sizeof_or_alignof_type): Declare.
624 (my_friendly_assert): Move to ../c-common.h.
626 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
628 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
630 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
632 PR c++/7347, c++/7348
633 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
634 * decl.c (make_typename_type): Use it.
635 (make_unbound_class_template): Likewise.
636 (lookup_name_real): Don't call type_access_control if scope is
637 template parameter dependent.
638 * parse.y (template_arg): Call make_unbound_class_template with
640 (nest_name_specifier): Call make_typename_type with tf_parsing set.
641 (typename_sub0): Likewise.
642 (typename_sub1): Likewise.
643 (instantiate_decl): Push class scope.
644 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
645 for both static variable and member function template.
646 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
648 * search.c (type_access_control): Do type access for TEMPLATE_DECL
651 2002-07-20 Roger Sayle <roger@eyesopen.com>
653 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
654 test by using positive_option. Make whitespace consistent.
656 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
658 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
659 members with 'locus'. Adjust use throughout.
660 (struct feed): Likewise.
661 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
663 (snarf_defarg): Use error(), not error_with_file_and_line().
665 2002-07-19 Chris Demetriou <cgd@broadcom.com>
667 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
668 cpp_options is included.
670 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
672 PR c++/2862, c++/2863
673 * pt.c (determine_specialization): Compare the length of
674 TYPE_ARG_TYPES. Tidy.
676 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
679 * decl.c (duplicate_decls): Don't propagate inlining parameters from
680 olddecl to newdecl when newdecl is a specialization of the
681 instantiation olddecl.
683 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
685 PR c++/4802, c++/5387
686 * decl.c (make_typename_type): Use enforce_access.
688 2002-07-17 Scott Snyder <snyder@fnal.gov>
691 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
693 2002-07-12 Mark Mitchell <mark@codesourcery.com>
695 * class.c (add_method): Correct handling of conversion operators.
697 2002-07-11 Mark Mitchell <mark@codesourcery.com>
700 * class.c (add_method): Simplify.
702 2002-07-11 Jason Merrill <jason@redhat.com>
705 * tree.c (cp_copy_res_decl_for_inlining): Also copy
708 2002-07-10 Graham Stott <graham.stott@btinternet.com>
710 * pt.c (template_parm_this_level_p, push_template_decl_real):
711 Pass depth as int pointer.
713 2002-07-11 Tim Josling <tej@melbpc.org.au>
715 Remove front end hard coding from gengtype.c.
717 * config-lang.in (gtfiles): Add files needed for this front end.
719 2002-07-10 Mark Mitchell <mark@codesourcery.com>
721 * cp-tree.h (unqualified_name_lookup_error): Declare it.
722 (begin_function_definition): Adjust prototype.
723 * lex.c (unqualified_name_lookup_error): New function, split out
725 (do_identifier): ... here.
726 * parse.y (parse_begin_function_definition): New function.
728 * semantics.c (begin_function_definition): Accept decl-specifiers
729 and attributes as separate parameters.
731 2002-07-10 Jason Merrill <jason@redhat.com>
734 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
735 modifying the old one.
737 2002-07-09 Mark Mitchell <mark@codesourcery.com>
739 * cp-tree.h (constructor_name_p): Declare it.
740 (check_template_template_default_arg): Likewise.
741 * class.c (handle_using_decl): Use constructor_name_p.
742 * decl.c (grokdeclarator): Likewise.
743 * decl2.c (constructor_name_p): Define it.
744 * init.c (build_member_call): Use constructor_name_p.
745 * parse.y (template_parm): Use check_template_template_default_arg.
746 * pt.c (check_explicit_specialization): Use constructor_name_p.
747 * semantics.c (check_template_template_default_arg): New function.
749 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
751 * pt.c (can_complete_type_without_circularity): Add static to
754 2002-07-08 Mark Mitchell <mark@codesourcery.com>
756 * cp-tree.h (have_extern_spec): Declare it
757 * decl.c (have_extern_spec): Define it.
758 (start_decl): Eliminate use of used_extern_spec.
759 (start_function): Likewise.
760 * parse.y (have_extern_spec): Remove declaration.
761 (used_extern_spec): Likewise.
762 (frob_specs): Eliminate use of used_extern_spec.
763 (.hush_warning): Likewise.
765 2002-07-07 Mark Mitchell <mark@codesourcery.com>
767 * Make-lang.in (cp/parse.o): Depend on decl.h.
768 * cp-tree.h (do_decl_instantiation): Change prototype.
769 * parse.y: Include decl.h.
770 (parse_decl_instantiation): New function.
771 (explicit_instantiation): Use it.
772 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
775 2002-07-07 Roger Sayle <roger@eyesopen.com>
777 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
778 constructor and destructor tests when passed a TEMPLATE_DECL.
780 2002-07-05 Jason Merrill <jason@redhat.com>
782 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
786 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
788 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
790 Repair damage on weak-impared targets caused by my previous patch.
791 * cp-tree.h (import_export_tinfo): Add parameter.
792 * decl2.c (import_export_tinfo): Add parameter, post adjust
794 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
797 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
800 * init.c (build_aggr_init): Remove qualifiers of init before calling
802 (build_vec_init): Flatten multi-dimensional array during cleanup.
803 (build_vec_delete_1): Abort if the type of each element is array.
805 2002-07-03 Graham Stott <graham.stott@btinternet.com>
807 * pt.c (instantiate_class_template): Fix typo.
809 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
811 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
812 by CVS conflict in my last patch.
814 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
817 * pt.c (can_complete_type_without_circularity): New function.
818 (instantiate_class_template): Use it.
819 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
820 message due to incomplete fields.
822 2002-07-01 Mark Mitchell <mark@codesourcery.com>
825 * mangle.c (write_expression): Add mangling for sizeof when
827 * operators.def: Remove stale comment.
829 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
831 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
832 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
833 (tinfo_decl_type): Replace with ...
834 (type_info_ptr_type): ... this.
835 (import_export_tinfo): Declare.
836 (tinfo_decl_p): Rename to ...
837 (unemitted_tinfo_decl_p): ... this.
838 * decl2.c (import_export_decl): Break out tinfo handling into ...
839 (import_export_tinfo): ... here. New function.
840 (finish_file): Adjust.
841 * rtti.c (TINFO_REAL_NAME): New macro.
842 (init_rtti_processing): Create the tinfo types.
843 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
844 (get_tinfo_decl): Adjust.
845 (get_tinfo_ptr): New function.
846 (get_type_id): Use it.
847 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
848 (ptr_initializer): Use get_tinfo_ptr.
849 (ptm_initializer): Likewise.
850 (synthesize_tinfo_var): Break into ...
851 (get_pseudo_ti_init): ... this. Just create the initializer.
852 (get_pseudo_ti_desc): .. and this.
853 (create_real_tinfo_var): Remove.
854 (create_pseudo_type_info): Don't create the vtable decl here.
855 (get_vmi_pseudo_type_info): Remove.
856 (create_tinfo_types): Adjust.
857 (tinfo_decl_p): Rename to ...
858 (unemitted_tinfo_decl_p): ... here. Adjust.
859 (emit_tinfo_decl): Adjust. Create the initializer.
861 2002-06-27 Mark Mitchell <mark@codesourcery.com>
864 * pt.c (tsubst_friend_class): Substitute into the context of the
865 friend before using it.
867 2002-06-26 Mark Mitchell <mark@codesourcery.com>
869 * cp-tree.h (xref_tag): Change prototype.
870 (handle_class_head): Likewise.
871 (build_x_component_ref): Likewise.
872 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
873 (xref_tag): Take attributes as a separate parameter.
874 (xref_tag_from_type): Adjust call to xref_tag.
875 * decl2.c (build_expr_from_tree): Adjust call to
876 build_x_component_ref.
877 (handle_class_head): Take attributes as a separate parameter.
878 * parse.y (parse_xref_tag): New function.
879 (parse_handle_class_head): Likewise.
880 (primary): Use parse_xref_tag.
881 (class_head_decl): Use parse_handle_class_head.
882 (class_head_defn): Likewise.
883 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
884 (build_dynamic_cast_1): Likewise.
885 (create_pseudo_type_info): Likewise.
886 (emit_support_tinfos): Likewise.
887 * typeck.c (build_object_ref): Adjust call to
888 build_x_component_ref.
889 (build_x_component_ref): Remove protect parameter.
891 2002-06-25 Mark Mitchell <mark@codesourcery.com>
893 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
894 * class.c (handle_using_decl): Likewise.
895 (instantiate_type): Likewise.
896 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
897 (xref_basetypes): Change prototype.
898 (begin_mem_initializers): New function.
899 (get_overloaded_fn): Likewise.
900 * decl.c (xref_basetypes): Simplify.
901 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
902 * init.c (build_offset_ref): Likewise.
903 * parse.y (base_init): Use begin_mem_initializers().
904 (structsp): Adjust call to xref_basetypes.
905 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
906 (instantiate_class_template): Adjust call to xref_basetypes.
907 * semantics.c (begin_mem_initializers): New function.
908 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
909 (really_overlaoded_fn): Likewise.
910 (get_overloaded_fn): New function.'
911 (get_first_fn): USe BASELINK_FUNCTIONS.
913 2002-06-24 Mark Mitchell <mark@codesourcery.com>
915 * cp-tree.h (SCALAR_TYPE_P): New macro.
916 (check_for_out_of_scope_variable): New function.
917 (at_class_scope_p): Likewise.
918 (finish_fname): Likewise.
919 * class.c (finish_struct): Use at_function_scope_p.
920 * decl.c (check_for_out_of_scope_variable): New function, split
921 out from do_identifier.
922 (finish_enum): Use at_function_scope_p.
923 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
924 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
925 (primary): Use at_function_scope_p.
926 * search.c (at_class_scope_p): New function.
927 * semantics.c (finish_fname): Likewise.
928 (check_multiple_declarators): Use at_function_scope_p.
930 2002-06-23 Mark Mitchell <mark@codesourcery.com>
932 * parse.y (parse_scoped_id): New function.
934 * cp-tree.h (do_scoped_id): Adjust declaration.
935 * lex.c (do_scoped_id): Remove call to yylex.
936 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
937 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
940 2002-06-23 Matt Thomas <matt@3am-software.com>
942 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
945 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
947 * mangle.c (integer_type_codes): Const-ify.
949 2002-06-20 Richard Henderson <rth@redhat.com>
952 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
953 Call put_var_into_stack.
955 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
957 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
958 array size calculation.
960 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
963 * pt.c (tsubst_expr): Handle FILE_STMT.
965 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
968 * pt.c (lookup_template_class): Don't build complete argument of
969 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
972 2002-06-19 Akim Demaille <akim@epita.fr>
974 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
976 * spew.c, lex.c: Adjust.
977 * parse.y (explicit_instantiation): Add empty action to override
978 the default $$ = $1 where it introduces a type clash.
980 2002-06-14 Jason Merrill <jason@redhat.com>
982 * semantics.c (begin_for_stmt): Push the 'for' scope before
986 * class.c (build_base_field): Set DECL_PACKED.
987 (layout_class_type): Don't use tail padding of PODs.
988 * mangle.c (write_unqualified_name): Fix template conversion op
991 2002-06-16 Richard Henderson <rth@redhat.com>
994 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
995 after template instantiation.
997 2002-06-16 Richard Henderson <rth@redhat.com>
999 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
1001 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
1003 * cp-tree.h (compiler_error): Remove declaration.
1004 * lex.c (compiler_error): Remove definition.
1006 2002-06-14 Steve Ellcey <sje@cup.hp.com>
1008 * g++spec.c (LIBUNWIND): New.
1009 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
1011 2002-06-13 Jessica Han <jessica@cup.hp.com>
1013 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
1014 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
1015 (build_vbase_offset_vtbl_entries): Likewise.
1016 * rtti.c (build_headof): Likewise.
1017 (get_tinfo_decl_dynamic): Likewise.
1018 (create_pseudo_type_info): Likewise.
1020 2002-06-12 Stan Shebs <shebs@apple.com>
1022 * mpw-config.in: Remove file, no longer used.
1023 * mpw-make.sed: Ditto.
1025 2002-06-07 Zack Weinberg <zack@codesourcery.com>
1027 * decl2.c: Update call to cpp_handle_option.
1029 2002-06-07 H.J. Lu (hjl@gnu.org)
1031 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
1033 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1035 * error.c (cp_error_at): Fix typo.
1037 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
1039 * error.c (cp_diagnostic_starter): Adjust call.
1040 (maybe_print_instantiation_context): Change prototype to take a
1041 'diagnostic_info *'.
1042 (print_instantiation_full_context): Likewise.
1043 (print_instantiation_partial_context): Likewise.
1044 (cp_diagnostic_starter): Likewise.
1045 (cp_diagnostic_finalizer): Likewise.
1046 (cp_print_error_function): Likewise.
1047 (cp_printer): Take a secondary parameter as a 'text_info *'.
1048 Remove output_state savings. Adjust calls.
1050 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
1052 * pt.c (inline_parm_levels): Mark for GC.
1054 * mangle.c (start_mangling): Allocate G.substitutions here...
1055 (init_mangle): ... rather than here.
1056 (finish_mangling): Clear the varray pointer when done with it.
1057 * spew.c (yylexstring): Don't use VARRAY_FREE.
1058 * search.c (bfs_walk): Don't use VARRAY_FREE.
1059 * decl2.c (pending_statics): Use gengtype to mark.
1060 (deferred_fns): Likewise.
1061 (ssdf_decls): Likewise.
1062 (init_decl2): Delete.
1063 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
1064 (cxx_init_decl_processing): Don't call init_decl2.
1065 (cxx_pop_function_context): Don't use VARRAY_FREE.
1066 * cp-tree.h (struct saved_scope): No need for special marking
1068 (struct language_function): Likewise.
1069 (local_classes): Use gengtype to mark.
1070 (init_decl2): Delete prototype.
1071 * class.c (init_class_processing): Don't use
1072 ggc_add_tree_varray_root.
1073 (build_vtbl_initializer): Don't use VARRAY_FREE.
1075 * decl.c (typename_compare): Don't use same_type_p.
1077 * decl.c: Include hashtab.h instead of hash.h.
1078 (typename_hash): Update to use htab_h.
1079 (typename_compare): Likewise.
1080 (typename_htab): Use gengtype to mark.
1081 (build_typename_type): Update to use htab_h.
1082 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
1084 * Make-lang.in (gt-cp-tree.h): New rule.
1085 (cp/tree.o): Depend on gt-cp-tree.h.
1086 * config-lang.in (gtfiles): Add cp/tree.c.
1087 * tree.c: Include gt-cp-tree.h.
1088 (list_hash_table): Use gengtype to mark.
1089 (init_tree): Use gengtype to mark trees.
1091 * Make-lang.in (cp/decl.o): Add debug.h dependency.
1092 * call.c (struct z_candidate): Use gengtype.
1093 (USER_CONV_CAND): Use WRAPPER_ZC.
1094 (convert_class_to_reference): Use build_zc_wrapper.
1095 (build_type_conversion_1): Likewise.
1096 (build_over_call): Use WRAPPER_ZC.
1097 (add_warning): Use build_zc_wrapper.
1098 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
1099 * cp-tree.h (struct lang_identifier): Use gengtype.
1100 (struct template_parm_index_s): Likewise.
1101 (struct ptrmem_cst): Likewise.
1102 (struct tree_binding): Likewise.
1103 (struct tree_overload): Likewise.
1104 (struct tree_srcloc): Likewise.
1105 (struct tree_wrapper): Likewise. Also modify to have a pointer
1106 to struct z_candidate rather than void.
1107 (enum cp_tree_node_structure_enum): New.
1108 (union lang_tree_node): New.
1109 (cxx_mark_tree): Delete prototype.
1110 (cp_tree_node_structure): New prototype.
1111 (build_ptr_wrapper): Delete prototype.
1112 (build_int_wrapper): Delete prototype.
1113 (build_zc_wrapper): New prototype.
1114 * decl.c: Include debug.h
1115 (cxx_mark_tree): Delete.
1116 (cp_tree_node_structure): New.
1117 * tree.c (build_ptr_wrapper): Delete.
1118 (build_int_wrapper): Delete.
1119 (build_zc_wrapper): New.
1121 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
1122 Correct typo. Patch from k_fukui@highway.ne.jp.
1124 * semantics.c (current_stmt_tree): Update for change to
1125 struct language_function.
1126 (finish_mem_initializers): Likewise.
1127 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
1128 * cp-tree.h (struct language_function): Rename from
1129 cp_language_function. Change all uses.
1130 (cp_function_chain): Don't need to cast.
1132 * class.c (duplicate_tag_error): Reset discriminator.
1133 (check_bases_and_members): Update for data structure changes.
1134 * cp-tree.h (struct lang_id2): Use gengtype.
1135 (flagged_type_tree): Likewise.
1136 (SET_LANG_ID): Use GGC on struct lang_id2.
1137 (struct cp_language_function): Use gengtype. Remove field
1138 'x_vcalls_possible_p'.
1139 (current_vcalls_possible_p): Delete.
1140 (struct lang_type_header): New.
1141 (struct lang_type_class): Rename from struct lang_type. Include
1142 struct lang_type_header.
1143 (struct lang_type_ptrmem): New.
1144 (struct lang_type): New.
1145 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
1146 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
1147 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
1148 (struct lang_decl_flags): Use gengtype. Add discriminators.
1149 (struct lang_decl): Use gengtype. Add and use discriminators.
1150 Update the macros that reference moved fields.
1151 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
1152 (SET_DECL_THUNK_P): Set discriminator too.
1153 (clear_inline_text_obstack): Delete prototype.
1154 (finish_inline_definitions): Delete prototype.
1155 (mark_pending_inlines): Delete prototype.
1156 (lang_check_failed): New prototype.
1157 * decl.c (struct named_label_use_list): Use gengtype.
1158 (struct named_label_list): Likewise.
1159 (mark_binding_level): Delete.
1160 (mark_named_label_lists): Delete.
1161 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
1162 (cxx_init_decl_processing): Use generated marker routine.
1163 (begin_destructor_body): Delete dead set to
1164 current_vcalls_possible_p.
1165 (mark_lang_function): Delete.
1166 (mark_cp_function_context): Delete.
1167 (lang_mark_tree): Use generated marker routines.
1168 * decl2.c (start_objects): Set discriminator when setting
1169 GLOBAL_INIT_PRIORITY.
1170 * lex.c (retrofit_lang_decl): Set discriminators.
1171 (copy_lang_type): Update for changes to lang_type structure.
1172 (cp_make_lang_type): Set discriminator.
1173 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
1174 * search.c: Include ggc.h.
1175 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
1176 (finish_inline_definitions): Delete.
1177 * spew.c (struct token): Use gengtype.
1178 (struct token_chunk): New.
1179 (struct unparsed_text): Use gengtype. Store tokens in chunks.
1180 (struct feed): Use gengtype.
1181 (feed_obstack): Delete.
1182 (feed): Mark as GC root.
1183 (pending_inlines): Mark as GC root.
1184 (pending_inlines_tail): Likewise.
1185 (processing_these_inlines): Likewise.
1186 (token_obstack): Make static.
1187 (first_token): Likewise.
1188 (init_spew): Don't initialize deleted things; use gengtype for roots.
1189 (clear_inline_text_obstack): Delete.
1190 (feed_input): Use GC for struct feed. Update for changes to
1191 struct unparsed_text.
1192 (mark_pending_inlines): Delete.
1193 (next_token): Rename from add_token. Change all callers. Update
1194 for changes to struct unparsed_text.
1195 (space_for_token): New.
1196 (remove_last_token): New.
1197 (alloc_unparsed_text): New.
1198 (snarf_block): Take an unparsed_text. Update for changes to struct
1200 (snarf_method): Update for changes to struct unparsed_text.
1201 (snarf_defarg): Update for changes to struct unparsed_text.
1202 * tree.c (lang_check_failed): New.
1204 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
1205 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
1206 (cp/spew.o): Add dependency on gt-<filename>.h.
1207 (cp/decl2.o): Add dependency on gt-<filename>.h.
1208 (cp/call.o): Add dependency on gt-<filename>.h.
1209 (cp/pt.o): Add dependency on gt-<filename>.h.
1210 (cp/repo.o): Add dependency on gt-<filename>.h.
1211 (cp/parse.o): Add dependency on gt-<filename>.h.
1212 * call.c: Use gengtype for roots.
1213 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
1214 decl2.c parse.y pt.c repo.c spew.c.
1215 * cp-tree.h: Use gengtype for roots.
1216 (struct saved_scope): Use GGC, gengtype.
1217 (cp_parse_init): Delete prototype.
1218 (init_pt): Delete prototype.
1219 * decl.c: Use gengtype for roots.
1220 (mark_saved_scope): Delete.
1221 (cxx_init_decl_processing): Don't call deleted initilisation
1223 (signed_size_zero_node): Delete, unused.
1224 * decl.h: Use gengtype for roots.
1225 * decl2.c: Use gengtype for roots.
1226 * lex.h: Use gengtype for roots.
1227 * parse.y: Use gengtype for roots.
1228 (cp_parse_init): Delete.
1229 * pt.c: Use gengtype for roots.
1231 * repo.c: Use gengtype for roots.
1232 * spew.c: Use gengtype for roots.
1234 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
1235 (cp/decl.o): Add dependency on gtype-cp.h.
1236 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
1237 Include gtype-cp.h. Allow for filename changes.
1239 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
1240 (cp/decl.o): Add cp/gt-decl.h dependency.
1241 * config-lang.in (gtfiles): New.
1242 * tree.h: Rename struct binding_level to struct cp_binding_level.
1243 * decl.c: Rename struct binding_level to struct cp_binding_level.
1244 Include cp/gt-decl.h.
1245 (struct cp_binding_level): Use gengtype.
1246 (make_binding_level): Use GGC on struct cp_binding_level.
1247 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
1248 (cxx_init_decl_processing): Mark free_binding_level as
1251 * decl.c (mark_cp_function_context): Update calling sequence.
1253 * decl.c (start_function): Don't free 'struct
1254 cp_language_function'.
1255 (pop_cp_function_context): Likewise.
1256 (save_function_data): Allocate it using GC.
1257 * semantics.c (genrtl_start_function): Don't free 'struct
1258 cp_language_function'.
1260 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
1262 * lang-specs.h: Use cpp_debug_options.
1264 2002-05-28 Zack Weinberg <zack@codesourcery.com>
1266 * mangle.c, tree.c: Include real.h.
1267 * Make-lang.in: Update dependency lists.
1269 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
1271 * lex.c: Don't include c-lex.h.
1272 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
1274 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
1276 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
1278 2002-05-22 Richard Henderson <rth@redhat.com>
1280 * decl.c (obscure_complex_init): Check for VAR_DECL
1281 before using DECL_THREAD_LOCAL.
1283 2002-05-22 Richard Henderson <rth@redhat.com>
1285 * decl.c (check_tag_decl): Handle RID_THREAD.
1286 (obscure_complex_init): Reject run-time init of tls.
1287 (grokvardecl, grokdeclarator): Handle RID_THREAD.
1288 * lex.c (reswords): Add __thread.
1289 (rid_to_yy): Map RID_THREAD to SCSPEC.
1291 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
1293 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
1294 * cp-tree.h (cxx_post_options): Kill.
1295 * cp-lex.c (cxx_post_options): Kill.
1297 2002-05-21 Richard Henderson <rth@redhat.com>
1299 * lex.c (rid_to_yy): Add RID_THREAD.
1301 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
1303 * init.c (build_vec_init): Test for trivial copy-assignment when
1304 copy-assigning arrays.
1306 2002-05-20 Andreas Jaeger <aj@suse.de>
1308 * init.c (build_default_init): Remove unused variable.
1310 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
1312 * call.c (any_strictly_viable): New.
1313 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
1315 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1317 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
1319 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1322 * pt.c (do_decl_instantiation): Don't complain explicit
1323 instantiation after explicit specialization.
1324 (do_type_instantiation): Likewise.
1326 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
1328 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
1330 (complete_type_or_else): ... this. Redefined as macro.
1331 (cxx_incomplete_type_diagnostic): Declare.
1332 (cxx_incomplete_type_error): Define as macro.
1333 * init.c (build_delete): Warn about incomplete types other than
1334 void, and use the built-in operator delete for them.
1335 * typeck.c (complete_type_or_diagnostic): Renamed from
1336 complete_type_or_else. Added warn_only argument, passed to...
1337 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
1338 warnings or errors depending on new warn_only argument. Renamed
1340 (cxx_incomplete_type_error): ... this. New implementation in
1341 terms of cxx_incomplete_type_diagnostic.
1343 2002-05-18 Jason Merrill <jason@redhat.com>
1346 * decl2.c (import_export_decl): If we clear
1347 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
1349 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1352 * pt.c (verify_class_unification): Don't check if PARM is template
1353 parameter dependent. Simplify.
1354 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
1355 parameter dependent expression.
1357 2002-05-14 Jason Merrill <jason@redhat.com>
1359 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
1361 (synthesize_tinfo_var): Take the public decl.
1362 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
1363 (emit_tinfo_decl): Adjust. Call import_export_decl.
1364 * decl2.c (import_export_decl): Simplify tinfo decl handling.
1366 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
1368 * cp-tree.h (struct lang_type): Added non_zero_init.
1369 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
1370 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
1371 * class.c (check_field_decls): Test non_zero_init.
1372 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
1373 zero-to-NULL conversions.
1374 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
1375 type that needs zero-initialization without zeros.
1376 (check_initializer_decl): Compute zero-initializer for types
1377 that require a non-trivial one.
1378 * init.c (build_forced_zero_init): New function.
1379 (build_default_init): Use it.
1380 * tree.c (zero_init_p): New function.
1381 * typeck2.c (force_store_init_value): New function.
1382 (process_init_constructor): Create non-trivial zero-initializers
1383 for array members and class fields.
1385 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
1387 * lang-specs.h: Remove redundant -lang-c++.
1389 2002-05-13 Jason Merrill <jason@redhat.com>
1391 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
1392 (fixed_type_or_null): See through reference vars.
1393 (build_base_path): Vtable contents are constant.
1394 * typeck.c (get_member_function_from_ptrfunc): Likewise.
1396 2002-05-12 Jason Merrill <jason@redhat.com>
1398 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
1401 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
1403 * cp-tree.h (flag_ansi): Remove.
1404 * decl2.c (flag_ansi): Remove.
1405 (cxx_decode_option): Set flag_iso and flag_undef.
1407 2002-05-09 Jason Merrill <jason@redhat.com>
1409 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
1410 Use subtraction rather than a bitmask to get the index.
1411 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
1413 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
1415 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
1417 * Make-lang.in (decl2.o): Update.
1418 * cp-tree.h (warn_multichar): Remove.
1419 * decl2.c: Include c-common.h.
1420 (warn_multichar): Remove.
1422 2002-05-03 Jason Merrill <jason@redhat.com>
1424 * tree.c (build_cplus_array_type): Only const and volatile get
1427 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
1429 2002-04-30 Mark Mitchell <mark@codesourcery.com>
1431 ABI change, returning simple classes from functions.
1432 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
1433 TYPE_HAS_TRIVIAL_INIT_REF is false or
1434 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
1436 2002-04-30 Jason Merrill <jason@redhat.com>
1439 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
1440 anonymous class with a typedef if there are attributes.
1442 2002-04-29 Paul Eggert <eggert@twinsun.com>
1444 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
1446 2002-04-29 Jakub Jelinek <jakub@redhat.com>
1449 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
1452 2002-04-29 Mark Mitchell <mark@codesourcery.com>
1455 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
1456 enter that scope before name lookup.
1459 * method.c (do_build_copy_constructor): Avoid building
1460 cv-qualified reference types.
1462 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
1465 * decl.c (grok_op_properties): Assignment ops don't have to return
1466 by value. operator% should.
1468 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1471 * decl.c (duplicate_decls): Call merge_weak.
1473 2002-04-26 Richard Henderson <rth@redhat.com>
1475 * parse.y (malloced_yyss, malloced_yyvs): New.
1476 (yyoverflow): Re-add. Set them.
1477 (free_parser_stacks): New.
1479 2002-04-26 Mark Mitchell <mark@codesourcery.com>
1482 * method.c (do_build_assign_ref): Pass a derivation to
1483 build_method_call when calling base class assignment operators.
1485 2002-04-26 Richard Henderson <rth@redhat.com>
1487 * parse.y (yyoverflow): Revert.
1489 2002-04-26 Richard Henderson <rth@redhat.com>
1492 * parse.y (string): Remove. Update all uses to use STRING
1493 instead, and not call combine_strings.
1494 * rtti.c (tinfo_name): Use fix_string_type.
1495 * semantics.c (finish_asm_stmt): Don't call combine_strings.
1496 * spew.c (yylexstring): New.
1497 (read_token): Use it.
1499 2002-04-25 Richard Henderson <rth@redhat.com>
1502 * parse.y (yyoverflow): New.
1504 2002-04-25 Jason Merrill <jason@redhat.com>
1507 * search.c (check_final_overrider): No longer static.
1508 * class.c (update_vtable_entry_for_fn): Call it.
1509 * cp-tree.h: Adjust.
1511 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
1513 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
1514 * cp-tree.h (cxx_set_yydebug): Die.
1515 * lex.c (YYDEBUG): Get from c-lex.h.
1516 (cxx_set_yydebug): Remove.
1517 * parse.y: Include c-lex.h.
1518 (YYDEBUG): Get from c-lex.h.
1520 2002-04-24 Mark Mitchell <mark@codesourcery.com>
1523 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
1526 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
1528 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
1529 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
1531 * cp-tree.h (cp_attribute_table): Rename.
1532 * decl.c (lang_attribute_table): Remove declaration.
1533 (cxx_init_decl_processing): Don't set it.
1534 * tree.c (cp_attribute_table): Rename.
1536 2002-04-24 Jason Merrill <jason@redhat.com>
1539 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
1540 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
1541 The pedwarn for array assignment is now unconditional.
1542 * tree.c (build_cplus_array_type_1): Still process simple array types
1543 normally in templates.
1546 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
1549 2002-04-23 Jakub Jelinek <jakub@redhat.com>
1551 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
1552 node with attributes.
1554 2002-2-23 David O'Brien <obrien@FreeBSD.org>
1556 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
1557 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
1559 2002-04-23 Mark Mitchell <mark@codesourcery.com>
1562 * pt.c (tsubst_friend_class): Handle templates with explicit
1566 * typeck.c (merge_types): Remember the cv-qualification of pointer
1567 types when merging them.
1569 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
1571 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
1572 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
1573 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
1574 cxx_mark_function_context): New.
1575 * decl.c (push_cp_function_context, pop_cp_function_context,
1576 mark_cp_function_context): Rename for consistency.
1577 (cxx_init_decl_processing): Don't set old hooks.
1579 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
1581 * call.c (convert_type_from_ellipsis): Rename, update.
1582 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
1583 * cp-tree.h (convert_type_from_ellipsis): Rename.
1584 * decl.c (cxx_init_decl_processing): Don't set hook.
1586 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
1588 * call.c (build_new_method_call): Update.
1589 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
1590 * cp-tree.h (cxx_incomplete_type_error): New.
1591 * decl.c (grokdeclarator, grokparms): Update.
1592 * decl2.c (check_classfn): Update.
1593 * pt.c (tsubst): Update.
1594 * typeck.c (complete_type_or_else, expr_sizeof,
1595 decay_conversion): Update.
1596 * typeck2.c (incomplete_type_error): Rename.
1597 (add_exception_specifier): Update.
1599 2002-04-18 Jason Merrill <jason@redhat.com>
1602 * search.c (setup_class_bindings): A class template qualifies as a
1605 2002-04-17 Jakub Jelinek <jakub@redhat.com>
1608 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
1611 2002-04-16 Mark Mitchell <mark@codesourcery.com>
1613 * init.c (begin_init_stmts): Remove commented out code.
1614 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
1615 * semantics.c (begin_gobal_stmt_expr): Adjust call to
1616 expand_start_stmt_expr.
1618 2002-04-15 Mark Mitchell <mark@codesourcery.com>
1620 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
1621 dso_handle itself, to __cxa_atexit.
1623 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1625 * error.c (cxx_print_error_function): Adjust call to macros.
1627 2002-04-14 Jakub Jelinek <jakub@redhat.com>
1629 * class.c (layout_virtual_bases): Do all dsize computation on trees.
1631 2002-04-14 Jason Merrill <jason@redhat.com>
1633 * typeck.c (get_member_function_from_ptrfunc): Don't do
1634 gratuitious division and multiplication on
1635 ptrmemfunc_vbit_in_delta targets.
1637 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1640 * semantics.c (finish_expr_stmt): Remember the type of the
1641 expression before any conversions are performed.
1643 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1646 * call.c (add_template_candidate_real): Do not treat member
1647 templates as copy constructors.
1649 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1651 * decl.c (duplicate_decls): Do not copy the RTL for a variable
1652 declaration if the old variable had an incomplete type and the new
1654 (complete_vars): Do not call layout_decl for completed variables.
1656 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
1658 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
1659 with an explicit one.
1660 (follow_tag_typedef): New.
1661 (lookup_tag): Use it to extract the tag of an explicit typedef.
1662 (xref_tag): Likewise.
1664 2002-04-11 Andrew Haley <aph@redhat.com>
1666 * typeck.c (type_after_usual_arithmetic_conversions):
1667 If two types have the same variant, return immediately.
1668 When two floating-point operands are the same precision:
1669 convert to float if one of the operands is float;
1670 if neither operand is one of the standard types, return the type
1671 of the first operand.
1673 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
1676 * decl.c (make_typename_type): Remove implicit typenameness.
1678 2002-04-09 Jason Merrill <jason@redhat.com>
1680 PR optimization/6189
1681 * semantics.c (genrtl_start_function): Don't free
1682 DECL_SAVED_FUNCTION_DATA for inline functions.
1684 * init.c (build_member_call): For now, don't convert to
1685 intermediate base if it would cause an error.
1687 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
1689 * parse.y (namespace_qualifier, maybe_identifier,
1690 begin_explicit_instantiation, end_explicit_instantiation,
1691 apparent_template_type, .finish_template_type,
1692 do_id, maybe_init, defarg_again, component_decl_1):
1693 Add ending ';', in accordance with POSIX.
1695 2002-04-06 Mark Mitchell <mark@codesourcery.com>
1698 * class.c (layout_class_type): Remember incomplete static
1700 (finish_struct_1): Call complete_vars, not
1701 hack_incomplete_structures.
1702 * cp-tree.h (hack_incomplete_structures): Rename to ...
1703 (complete_vars): ... this.
1704 (struct saved_scope): Remove incomplete.
1705 (namespace_scope_incomplete): Remove.
1706 * decl.c (struct binding_level): Remove incomplete.
1707 (incomplete_vars): New variable.
1708 (mark_binding_level): Don't mark incomplete.
1709 (print_binding_level): Don't print it.
1710 (mark_saved_scope): Don't mark incomplete.
1711 (pushdecl): Use maybe_register_incopmlete_var.
1712 (cxx_init_decl_processing): Register incomplete_vars for GC.
1713 (start_decl_1): Clarify error message.
1714 (hack_incomplete_vars): Remove.
1715 (maybe_register_incomplete_var): New function.
1716 (complete_vars): Likewise.
1718 2002-04-06 Jason Merrill <jason@redhat.com>
1721 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
1722 set before checking it.
1725 * init.c (build_member_call): Use build_scoped_ref.
1726 (resolve_offset_ref): Likewise.
1727 * call.c (build_scoped_method_call): Likewise.
1728 * tree.c (maybe_dummy_object): Kludge around current_class_type being
1730 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
1731 * cp-tree.h: Adjust.
1733 * init.c (push_base_cleanups): Just use build_scoped_method_call.
1736 * method.c (implicitly_declare_fn): Pass unqualified type to
1737 synthesize_exception_spec.
1739 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
1741 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
1742 * cvt.c: Update comment.
1743 * init.c (expand_cleanup_for_base): Update.
1744 * semantics.c (finish_parenthesized_expr): Update.
1745 * typeck.c (cp_truthvalue_conversion): Update.
1747 2002-04-04 Jason Merrill <jason@redhat.com>
1749 * semantics.c (finish_eh_cleanup): New fn.
1750 * cp-tree.h: Add prototype.
1751 * init.c (perform_member_init, expand_cleanup_for_base): Use
1753 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
1754 * cp-tree.h: Remove references.
1755 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
1756 * dump.c (cp_dump_tree): Likewise.
1757 * pt.c (tsubst_expr): Likewise.
1758 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
1759 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
1760 * tree.c (cp_statement_code_p): Likewise.
1762 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
1765 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
1769 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
1771 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
1773 2002-04-03 Richard Henderson <rth@redhat.com>
1775 * cp-lang.c (cxx_warn_unused_global_decl): New.
1776 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
1778 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
1780 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
1781 * tree.c (init_tree): Don't set hook.
1783 2002-04-03 Roger Sayle <roger@eyesopen.com>
1786 * decl.c (duplicate_decls): Don't mess with assembler names when
1787 redeclaring builtin functions as static.
1789 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
1791 * call.c (build_addr_func): Update.
1792 * class.c (resolve_address_of_overloaded_function): Update.
1793 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
1794 * cp-tree.h (cxx_mark_addressable): New.
1795 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
1796 * decl2.c (build_cleanup): Update.
1797 * except.c (build_throw): Update.
1798 * init.c (resolve_offset_ref): Update.
1799 * pt.c (convert_nontype_argument): Update.
1800 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
1801 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
1802 unary_complex_lvalue): Update.
1803 (mark_addressable): Rename.
1805 2002-04-01 Roger Sayle <roger@eyesopen.com>
1808 * decl.c (duplicate_decls): Overwrite the RTL when (and only
1809 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
1810 but follow the SET_DECL_RTL idiom used elsewhere in the function.
1812 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
1814 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1815 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
1816 * decl.c (grokdeclarator): Update.
1817 * mangle.c (write_integer_cst): Update.
1818 * typeck.c (build_binary_op): Update.
1820 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
1822 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
1823 * lex.c (cxx_init): Don't set hook.
1825 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
1827 * Make-lang.in (error.o): Update.
1828 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
1829 * cp-tree.h (struct diagnostic_context): Predeclare.
1830 (cxx_print_error_function): New.
1831 * error.c: Include langhooks-def.h.
1832 (lang_print_error_function): Rename. Update.
1833 (init_error): Don't set hook.
1835 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
1837 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
1839 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
1840 * decl.c (finish_enum): Similarly.
1841 * error.c (dump_type): Similarly.
1842 * lex.c (cxx_init): Similarly.
1843 * mangle.c (write_builtin_type): Similarly.
1844 * typeck.c (comptypes): Similarly.
1846 2002-03-28 Roger Sayle <roger@eyesopen.com>
1849 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
1850 in the g++ front-end.
1851 (duplicate_decl): Allow redefinition of anticipated built-ins.
1852 Fix inlining problem by over-writing the old DECL_RTL.
1853 (lookup_namespace_name): Fail to find an identifier in the
1854 specified namespace if its still anticipated.
1855 (builtin_function_1): New function split out from builtin_function
1856 to create a builtin in the current namespace with given context.
1857 (builtin_function): Call builtin_function_1 to define the
1858 appropriate builtins in both the std and global namespaces.
1859 (select_decl): Don't test for anticipated decls here.
1860 (unqualified_namespace_lookup): Instead ignore them whilst
1861 searching through scopes and namespaces.
1862 * decl2.c (do_nonmember_using_decl): If a using declaration
1863 specifies an anticipated built-in function, mark it as no longer
1864 anticipated in that scope.
1865 (ambiguous_decl): Avoid resolving to an anticipated decl.
1866 * lex.c (do_scoped_id): Fail to find an identifier in the global
1867 namespace if its still anticipated.
1869 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
1871 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
1872 * cp-tree.h (cp_make_lang_type): Rename.
1873 * lex.c (cp_make_lang_type): Rename.
1874 (make_aggr_type): Update.
1875 * tree.c (init_tree): Don't set make_lang_type_fn.
1877 2002-03-29 Jakub Jelinek <jakub@redhat.com>
1880 * class.c (finish_struct_1): Update static field's DECL_MODE even
1881 if its type is a variant of t.
1883 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
1885 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
1886 * cp-tree.h (cxx_insert_default_attributes): New.
1887 * decl.c (insert_default_attributes): Rename.
1889 2002-03-27 Mark Mitchell <mark@codesourcery.com>
1892 * call.c (build_op_delete_call): Allow for the fact the placement
1893 may be a COMPOUND_EXPR.
1895 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
1897 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
1898 * cp-tree.h (init_cplus_expand): Remove.
1899 (cxx_expand_expr): New.
1900 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
1902 (init_cplus_expand): Remove.
1903 * lex.c (cxx_init): Don't call init_cplus_expand.
1905 2002-03-26 Mark Mitchell <mark@codesourcery.com>
1908 * init.c (build_new_1): Allow for the fact the result of
1909 build_function_call may be a COMPOUND_EXPR.
1911 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
1914 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
1915 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1916 (dfs_skip_nonprimary_vbases_markedp): Remove.
1917 * search.c (get_shared_vbase_if_not_primary): Remove.
1918 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1919 (dfs_skip_nonprimary_vbases_markedp): Remove.
1920 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
1921 (dfs_marked_real_bases_queue_p): Likewise.
1923 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
1925 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
1926 * cp-tree.h (cxx_mark_tree): New.
1927 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
1929 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
1931 * cp-tree.h (cxx_maybe_build_cleanup): New.
1932 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
1933 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
1934 * tree.c (build_target_expr): Update.
1935 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
1937 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
1939 * decl2.c (cxx_decode_option): Handle -E.
1940 * lang-specs.h (default_compilers): Preprocess with cc1plus.
1941 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
1943 2002-03-23 Jakub Jelinek <jakub@redhat.com>
1946 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
1948 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1950 * error.c (dump_type): Be careful about implicit typenames.
1952 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1955 * semantics.c (finish_base_specifier): Handle erronous base
1958 2002-03-22 Zack Weinberg <zack@codesourcery.com>
1960 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
1963 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
1965 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
1966 an index into the vtable_entry array regardless of
1967 TARGET_PTRMEMFUNC_VBIT_LOCATION.
1969 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
1971 * tree.c (cp_cannot_inline_tree_fn): Same.
1973 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
1975 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
1976 insert_block, getdecls, global_bindings_p): New.
1978 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
1981 * mangle.c (struct globals) Add internal_mangling_p member.
1982 (write_template_param): Do internal mangling, if needed.
1983 (mangle_conv_op_name_for_type): Request internal mangling.
1985 2002-03-20 Jason Merrill <jason@redhat.com>
1988 * init.c (build_delete): Check access for a member op delete here.
1989 * decl2.c (delete_sanity): Not here.
1991 2002-03-19 Jason Merrill <jason@redhat.com>
1994 * class.c (get_vfield_name): Use the constructor_name.
1996 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
1998 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
1999 * cp-tree.h (lang_printable_name): Rename.
2000 * error.c (lang_decl_name): Use new hook.
2001 * lex.c (cxx_init): Remove old hook.
2002 * pt.c (tsubst_decl): Use new hook.
2003 * tree.c (lang_printable_name): Rename.
2005 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
2008 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
2009 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
2010 only after recording the declaration.
2012 2002-03-18 Jason Merrill <jason@redhat.com>
2015 * init.c (resolve_offset_ref): Hand off to build_component_ref.
2017 PR c++/4222, c++/5995
2018 * call.c (build_over_call): Fix empty class logic.
2021 * cp-tree.h (struct saved_scope): Add last_parms field.
2022 * decl.c (maybe_push_to_top_level): Save last_function_parms.
2023 (pop_from_top_level): Restore it.
2026 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
2030 * pt.c (tsubst_friend_function): Use decl_namespace_context.
2032 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
2033 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
2034 type with a nontrivial destructor.
2036 2002-03-17 Jason Merrill <jason@redhat.com>
2039 * class.c (build_base_path): Virtual base layout is fixed in
2042 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
2044 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2045 * parse.y (yyparse): Remove macro.
2047 2002-03-17 Jason Merrill <jason@redhat.com>
2050 * init.c (build_new_1): Pass the right pointer to op delete.
2052 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
2055 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
2056 conversion operators go.
2057 (struct lang_decl_flags): Add template_conv_p and unused
2059 (DECL_TEMPLATE_CONV_FN_P): New macro.
2060 * call.c (build_user_type_conversion_1): Don't check second type
2061 conversion of overload set first.
2062 * class.c (add_method): Make sure templated conversion operators
2063 all end up on slot 2.
2064 * lex.c (do_identifier): A conversion operator token might be
2065 satisfied by a templated conversion operator.
2066 * pt.c (check_explicit_specialization): Use
2067 CLASSTYPE_FIRST_CONVERSION_SLOT.
2068 (template_parm_this_level_p): New function.
2069 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
2070 * search.c (lookup_fnfields_1): Template conversions will be on
2072 * typeck.c (build_component_ref): Preserve the type of an
2073 conversion operator name on the overload type.
2074 (build_x_function_call): Retrieve the conversion operator name.
2076 2002-03-15 Richard Henderson <rth@redhat.com>
2078 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
2080 2002-03-15 Mark Mitchell <mark@codesourcery.com>
2082 * cp-tree.h (CLEANUP_DECL): Remove.
2083 (CLEANUP_EXPR): Likewise.
2084 * decl.c (destroy_local_var): Simplify.
2085 (maybe_build_cleanup): Tidy.
2086 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
2087 * semantics.c (cp_expand_stmt): Likewise.
2088 * cp/tree.c (cp_statement_code_p): Likewise.
2090 2002-03-15 Jason Merrill <jason@redhat.com>
2093 * decl.c (duplicate_decls): Use merge_types instead of common_type.
2094 * typeck.c (common_type): Just hand off to
2095 type_after_usual_arithmetic_conversions and
2096 composite_pointer_type.
2097 (merge_types): New fn.
2098 (commonparms): Use it instead of common_type.
2099 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
2100 (composite_pointer_type): Also handle attributes.
2101 * cp-tree.h: Declare merge_types.
2103 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
2105 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
2107 2002-03-14 Richard Henderson <rth@redhat.com>
2109 * decl.c: Include c-pragma.h.
2110 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
2111 * Make-lang.in: Update dependencies.
2113 2002-03-14 Jakub Jelinek <jakub@redhat.com>
2116 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
2117 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
2119 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2121 * mangle.c (write_builtin_type): Handle 128-bit integers even if
2122 they are not a standard integer type.
2124 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2126 * cp-tree.h (init_init_processing): Remove declaration.
2127 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
2128 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
2130 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2132 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
2134 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
2136 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
2137 cplus_tree_code_name): Delete.
2138 (cxx_init): Don't call add_c_tree_codes, instead set
2139 lang_unsafe_for_reeval. Don't try to copy into the various
2142 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
2145 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
2146 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
2149 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2151 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
2152 DR209 is now not a defect.
2153 * cp-tree.h (skip_type_access_control): Remove.
2154 * decl.c (grokdeclarator): Do type access control for friend
2156 * semantics.c (decl_type_access_control): Don't reset
2157 current_type_lookups.
2158 (save_type_access_control): Always save the lookups.
2159 (skip_type_access_control): Remove.
2160 (finish_class_definition): Don't change type_lookups.
2162 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2164 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
2166 * typeck.c (build_static_cast): Compare non-qualified types
2167 with pointer to member conversions.
2169 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
2170 Daniel Berlin <dan@dberlin.org>
2172 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
2173 (cxx_get_alias_set): Use it.
2175 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2177 * cp-tree.h (stabilize_expr): Prototype.
2179 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
2181 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
2182 conditional return void.
2184 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
2186 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
2187 * cp-tree.h (cxx_unsave): New.
2188 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
2189 (init_tree): Update.
2191 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2193 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
2194 explicit sizeof/sizeof.
2195 * decl2.c (cxx_decode_option): Likewise.
2196 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
2198 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
2201 * decl.c (lookup_tag): Only reject enum/class mismatch, not
2202 class/union mismatch.
2203 * parse.y (check_class_key): New function.
2204 (structsp): Call it.
2206 2002-03-01 Michael Matz <matz@suse.de>
2208 * typeck.c (cp_pointer_int_sum): Complete inner type which is
2209 used later by size_in_bytes().
2211 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
2213 * cp-tree.h: Require __GNUC__ to be #defined.
2214 (build_init): Add missing prototype.
2216 2002-03-01 Jason Merrill <jason@redhat.com>
2218 * except.c: Don't include decl.h or obstack.h. Do include
2220 (build_throw): Destroy temporaries from the thrown
2221 expression before calling __cxa_throw. Construct a thrown
2222 temporary directly into the exception object.
2223 (stabilize_throw_expr): New function.
2224 (wrap_cleanups_r): New function.
2225 * tree.c (stabilize_expr): New function.
2226 * init.c (build_init): New function.
2227 * Make-lang.in (cp/except.o): Adjust .h deps.
2229 2002-02-28 Jason Merrill <jason@redhat.com>
2231 * search.c (lookup_base_r): Don't clear is_non_public just because
2232 we found a friendly scope.
2234 * decl.c (finish_function): Only warn about missing return
2235 statement with -Wreturn-type.
2237 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
2239 * class.c (build_clone): Update.
2240 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2241 * cp-tree.h (cxx_dup_lang_specific_decl): New.
2242 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
2243 (copy_decl): Update.
2244 * method.c (make_thunk): Update.
2246 2002-02-27 Zack Weinberg <zack@codesourcery.com>
2248 * decl2.c: Delete traditional-mode-related code copied from
2249 the C front end but not used, or used only to permit the
2252 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
2255 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
2258 2002-02-22 Jakub Jelinek <jakub@redhat.com>
2261 * semantics.c (finish_switch_cond): Don't call get_unwidened
2264 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
2267 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
2269 (make_typename_type): Use tsubst_flags_t.
2270 * decl.c (make_typename_type): Adjust. Return non-artificial
2271 TYPE_DECLs, if required.
2272 (grokdeclarator): Simplify CVR qualification handling. Allow bad
2273 qualifiers on typedef types.
2274 * decl2.c (handle_class_head): Adjust make_typename_type call.
2275 * parse.y (nested_name_specifier): Likewise.
2276 (typename_sub0): Likewise.
2277 (typename_sub1): Likewise.
2278 * pt.c (convert_template_argument): Adjust make_typename_type
2280 (tsubst): Adjust cp_build_qualified_type_real calls.
2281 (check_cv_quals_for_unify): Cope with alowing bad qualifications
2282 on template type parms.
2283 (instantiate_decl): Recheck substitutions to give warnings on bad
2285 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
2287 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
2289 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
2291 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
2292 unless DECL_ALWAYS_INLINE.
2294 2002-02-20 Jakub Jelinek <jakub@redhat.com>
2296 * typeck.c (cp_pointer_int_sum): Renamed from
2297 pointer_int_sum, call pointer_int_sum.
2299 2002-02-20 Jakub Jelinek <jakub@redhat.com>
2301 * decl.c (duplicate_decls): Return 0 if issued error about
2304 2002-02-19 Jason Merrill <jason@redhat.com>
2306 ABI change: Mangle `void (A::*)() const' as
2307 M1AKFvvE, not MK1AFvvE.
2308 * mangle.c (write_function_type): Write cv-quals for member
2310 (write_pointer_to_member_type): Not here.
2312 2002-02-18 Jason Merrill <jason@redhat.com>
2314 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
2315 (do_decl_instantiation): Likewise.
2317 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
2320 * decl.c (duplicate_decls): Make warning unconditional
2321 if duplicate default argument declarations are present.
2323 2002-02-17 Jakub Jelinek <jakub@redhat.com>
2325 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
2328 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
2330 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
2331 remove incorrect comment. Move #if 0'd code to common path. Use
2332 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
2334 2002-02-13 Jason Merrill <jason@redhat.com>
2336 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
2337 (finish_function): Don't warn if current_function_returns_null.
2339 * typeck2.c (digest_init): Do handle values of vector type.
2341 * typeck2.c (digest_init, process_init_constructor): Treat vectors
2344 2002-02-11 Jason Merrill <jason@redhat.com>
2346 * parse.y (reserved_declspecs): Don't handle attributes.
2347 (reserved_typespecquals): Handle them here.
2348 * Make-lang.in (parse.c): Adjust expected conflicts.
2350 2002-02-08 Jakub Jelinek <jakub@redhat.com>
2352 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
2353 instead of compstmt.
2354 (compstmt_or_stmtexpr): Renamed from compstmt.
2355 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
2357 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
2359 Rename instantiate_type_flags to tsubst_flags_t & expand use.
2360 * cp-tree.h (instantiate_type_flags): Rename to ...
2361 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
2362 add tf_warning flag.
2363 (instantiate_type): Adjust prototype.
2364 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
2365 do_type_instantiation, cp_build_qualified_type_real): Likewise.
2366 cp_build_qualified_type: Adjust.
2367 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
2369 * call.c (standard_conversion): Rename itf_* to tf_*.
2370 (reference_binding): Likewise.
2371 (convert_like_real): Likewise.
2372 * cvt.c (cp_convert_to_pointer): Likewise.
2373 (convert_to_reference): Likewise.
2374 * decl.c (lookup_namespace_name): Use tf_* flags.
2375 (make_typename_type): Likewise.
2376 (grokdeclarator): Likewise.
2377 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
2378 (coerce_template_template_parms, convert_template_argument,
2379 coerce_template_parms, maybe_get_template_decl_from_type_decl,
2380 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
2381 instantiate_class_template, tsubst_template_arg_vector,
2382 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
2383 tsubst_decl, tsubst_arg_types, tsubst_function_type,
2384 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
2385 instantiate_template, fn_type_unification,
2386 resolve_overloaded_unification, verify_class_unification,
2387 unify, get_bindings_real, do_type_instantiation,
2388 regenerate_decl_from_template, instantiate_decl,
2389 tsubst_initializer_list, tsubst_enum,
2390 get_mostly_instantiated_function_type,
2391 invalid_nontype_parm_type_p): Likewise.
2392 * tree.c (cp_build_qualified_type_real): Likewise.
2393 * typeck.c (build_binary_op): Rename itf_* to tf_*.
2394 (build_ptrmemfunc): Likewise.
2395 (convert_for_assignment): Likewise.
2397 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
2400 * decl.c (grokdeclarator): Allow friend declarations from
2402 * decl2.c (handle_class_head): Don't push into template parm contexts.
2403 * pt.c (push_template_decl_real): Template parm contexts are never
2406 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
2408 * class.c: Include target.h.
2409 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
2410 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
2412 * Make-lang.in: Adjust deps.
2414 2002-02-05 Jason Merrill <jason@redhat.com>
2416 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
2418 2002-02-04 Jakub Jelinek <jakub@redhat.com>
2420 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
2421 (finish_switch_cond): Set SWITCH_TYPE.
2423 2002-02-04 Richard Henderson <rth@redhat.com>
2425 * method.c (use_thunk): Always initialize the block tree. Reindent.
2426 * semantics.c (expand_body): Emit thunks after function, not before.
2428 2002-02-04 Jason Merrill <jason@redhat.com>
2430 * decl.c (start_function): Call cplus_decl_attributes immediately
2431 after grokdeclarator.
2433 * decl.c (start_function): Combine DECL_RESULT handling code.
2435 2002-02-03 Jason Merrill <jason@redhat.com>
2438 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
2439 (cp/xref.o): Remove dependencies.
2440 * class.c (finish_struct_1, check_methods): Don't call xref fns.
2441 (finish_struct_1): Likewise.
2442 * friend.c (make_friend_class): Likewise.
2443 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
2444 * spew.c (read_process_identifier): Likewise.
2446 2002-02-01 Jason Merrill <jason@redhat.com>
2449 * decl.c (finish_function): Warn about a non-void function with
2450 no return statement and no abnormal exit.
2451 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
2452 (current_function_returns_abnormally): New macro.
2453 * call.c (build_call): Set it.
2455 * typeck.c (build_component_ref): Always complain about offsetof
2456 constructs on non-PODs. Only make it an error for members of
2459 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
2460 (dump_function_decl): Always dump parms.
2462 * decl2.c (finish_static_data_member_decl): Complain about a local
2463 class with a static data member.
2466 * search.c (lookup_field_1): Don't xref a static data member
2467 just because we looked it up.
2469 2002-01-31 Jason Merrill <jason@redhat.com>
2471 * Make-lang.in (parse.c): Handle .output file.
2474 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
2476 * semantics.c (finish_class_definition): Adjust.
2478 Allow attributes in parms and casts.
2479 * parse.y (named_parm): Don't strip attrs.
2480 (declmods): Remove 'attributes' production.
2481 (nonempty_cv_qualifiers): Accept attributes.
2482 (ATTRIBUTE): Give precedence.
2483 * decl.c (groktypename): Handle attributes.
2484 (grokparms): Likewise.
2486 2002-01-29 Jakub Jelinek <jakub@redhat.com>
2488 * decl2.c (cxx_decode_option): Pass 0 as last argument to
2490 * lang-specs.h: Use cpp_unique_options instead of cpp_options
2491 when used together with cc1_options.
2493 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
2496 * typeck2.c (digest_init): Make sure non-array core type is
2498 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
2499 constructor, rather than build a new one.
2500 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
2501 PURPOSE of constructor elts.
2503 2002-01-23 Zack Weinberg <zack@codesourcery.com>
2505 * Make-lang.in (parse.c): Adjust expected number of
2506 shift-reduce conflicts.
2507 (decl.o): Depend on diagnostic.h.
2508 * decl.c: Include diagnostic.h.
2509 (grokdeclarator): Check for null pointer.
2510 (finish_function): Don't abort when
2511 current_binding_level->parm_flag != 1, if errors have
2512 occurred; throw away the statement tree and extra binding
2513 levels, and continue.
2514 * lex.c (note_list_got_semicolon): Check for null pointer.
2515 * method.c (hack_identifier): Just return error_mark_node if
2516 value is error_mark_node.
2517 * parse.y (primary: TYPEID(type_id)): No need to use
2518 TYPE_MAIN_VARIANT here.
2519 (handler_seq): Accept an empty list of catch clauses and
2520 generate a fake handler block to avoid later crashes.
2521 (ansi_raise_identifier): Accept the error token too.
2522 * semantics.c (begin_class_definition,
2523 finish_class_definition): Check for error_mark_node.
2525 2002-01-23 Zack Weinberg <zack@codesourcery.com>
2527 * typeck2.c (friendly_abort): Delete definition.
2528 * cp-tree.h (friendly_abort): Don't prototype.
2529 (my_friendly_assert): Use fancy_abort.
2531 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
2533 * cp-tree.h (my_friendly_abort): Remove.
2535 2002-01-23 Jakub Jelinek <jakub@redhat.com>
2537 * spew.c (pending_inlines, pending_inlines_tail,
2538 processing_these_inlines): Make static.
2539 (mark_pending_inlines): Remove static.
2540 (begin_parsing_inclass_inline): If in function, save pi
2541 for GC to cp_function_chain->unparsed_inlines instead.
2542 (process_next_inline): Likewise.
2543 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
2544 (mark_pending_inlines): Add prototype.
2545 * decl.c (spew_debug): Remove unused extern.
2546 (mark_lang_function): Call mark_pending_inlines.
2548 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
2550 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
2551 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
2552 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
2553 Change my_fancy_abort() to abort().
2555 2002-01-23 Jason Merrill <jason@redhat.com>
2558 * class.c (fixed_type_or_null): Fix thinko.
2561 * init.c (resolve_offset_ref): Use build_indirect_ref.
2563 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
2565 2002-01-22 Jason Merrill <jason@redhat.com>
2567 * parse.y (function_body): Suppress the block for the outermost
2569 * decl.c (pushdecl): Don't try to skip it.
2570 (begin_function_body): Keep the block we create, not the next one.
2571 * init.c (emit_base_init): Don't mess with keep_next_level.
2573 * class.c (build_base_path): Tweak formatting.
2575 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
2577 Fix regression introduced with patch for c++/775
2578 * parse.y (class_head_defn): Check for template specializations
2579 with a different class-key.
2581 2002-01-17 Jason Merrill <jason@redhat.com>
2583 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
2584 (begin_function_body): Call them and keep_next_level.
2585 * init.c (emit_base_init): Call keep_next_level.
2586 * semantics.c (setup_vtbl_ptr): Lose.
2587 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
2588 (vtbls_set_up_p): Lose.
2589 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
2590 * method.c (do_build_copy_constructor): Likewise.
2591 (synthesize_method): Call finish_mem_initializers.
2592 * parse.y (nodecls): Likewise.
2594 * error.c (dump_type_suffix): Print the exception specs before
2596 (dump_function_decl): Here, too.
2598 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
2600 2002-01-10 Ira Ruben <ira@apple.com>
2603 * decl.c (start_method): Handle attrlist.
2605 2002-01-10 Jakub Jelinek <jakub@redhat.com>
2607 * decl2.c (max_tinst_depth): Increase default limit to 500.
2609 2002-01-10 Graham Stott <grahams@redhat.com>
2611 * spew.c (YYCHAR): Uppercase macro parameter and add
2614 (NAME): Uppercase macro parameter.
2616 2002-01-09 Graham Stott <grahams@redhat.com>
2618 * decl.h (grokdeclarator): Wrap long line.
2620 * semantics.c (FINISH_COND): Uppercase macro paramaters and
2623 2002-01-08 Graham Stott <grahams@redhat.com>
2625 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
2626 (PALLOC): Uppercase macro parameter and whitespace.
2627 (SALLOC): Uppercase macro parameter.
2628 (SFREE): Uppercase macros parameter, add parenthese and
2630 (STREQL): Uppercase macro parameter and whitespace.
2637 * call.c (convert_like): Add parenthesis and wrap.
2638 (convert_like_with_context): Likewise.
2639 (ICS_RANK): Whitespace.
2640 (NEED_TEMPORARY_P): Remove parenthesis.
2642 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
2644 (VTT_MARKED_BINFO_P): Likewise.
2646 * decl.c (BINDING_LEVEL): Add parenthesis.
2647 (DEF_OPERATOR): Likewise.
2649 * mangle.c (MANGLE_TRACE): Add parenthesis.
2650 (MANGLE_TRACE_TREE): Likewise.
2651 (write_signed_number): Likewise.
2652 (write_unsigned_number): Likewise.
2654 * pt.c (ccat): Uppercase macro parameter.
2657 * search.c (SET_BINFO_ACCESS): Add parenthesis.
2659 2002-01-07 Jason Merrill <jason@redhat.com>
2661 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
2665 * method.c (make_thunk): If !flag_weak, give the thunk the
2667 (use_thunk): Here, too.
2669 2002-01-07 Graham Stott <grahams@redhat.com>
2671 * error.c: Update copyright date.
2672 (print_scope_operator): Add parenthesis.
2673 (print_left_paren): Likewise.
2674 (print_right_paren): Likewise.
2675 (print_left_bracket): Likewise.
2676 (print_right_bracket): Likewise.
2677 (print_template_argument_list_start): Likewise.
2678 (print_template_argument_list_end): Likewise.
2679 (print_non_consecutive_character): Likewise.
2680 (print_tree_identifier): Likewise.
2681 (print_identifier): Likewise.
2682 (NEXT_CODE): Uppercase macro parameter.
2683 (ident_fndecl): Delete unused.
2684 (GLOBAL_THING): Likewise.
2686 2002-01-06 Graham Stott <grahams@redhat.com>
2688 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
2689 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
2690 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
2691 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
2692 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
2693 (C_IS_RESERVED_WORD): Uppercase macro parameter.
2694 (C_RID_YYCODE) Likewise.
2695 (ptrmem_cst): Use rtx.
2696 (LOCAL_BINDING_P): Add whitespace.
2697 (INHERITED_VALUE_BINDING_P): Likewise.
2698 (BINDING_SCOPE): Wrap long line.
2699 (BINDING_HAS_LEVEL_P): Remove parenthesis.
2700 (BINDING_VALUE): Wrap long line.
2701 (BINDING_TYPE): Whitespace.
2702 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
2703 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
2704 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
2705 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
2706 (same_type_p): Uppercase macro parameters.
2707 (same_type_ignoring_top_level_qualifiers_p): Likewise.
2708 (OVL_FUNCTION): Wrap long line.
2709 (OVL_CHAIN): Whitespace.
2710 (OVL_CURRENT): Add parenthesis and whitespace.
2711 (OVL_NEXT): Whitespace.
2712 (OVL_USED): Likewise.
2713 (IDENTIFIER_TYPE_VALUE): Likewise.
2714 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
2715 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
2716 (LANG_ID_FIELD): Whitespace.
2717 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
2718 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
2719 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
2720 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
2721 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
2722 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
2723 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
2724 (IDENTIFIER_VIRTUAL_P): Likewise.
2725 (IDENTIFIER_OPNAME_P): Likewise.
2726 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
2727 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
2728 (C_SET_EXP_ORIGINAL_CODE): Likewise.
2729 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
2730 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2731 (IS_AGGR_TYPE): Uppercase macro parameter.
2732 (CLASS_TYPE_P): Likewise.
2733 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
2734 (IS_AGGR_TYPE_2): Whitespace.
2735 (TAGGED_TYPE_P): Uppercase macro parameter.
2736 (TYPE_BUILT_IN): Whitespace.
2737 (TYPE_FOR_JAVA): Likewise.
2738 (FUNCTION_ARG_CHAIN): Remove parenthesis.
2739 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
2740 (FUNCTION_FIRST_USER_PARAM): Likewise.
2741 (PROMOTES_TO_AGGR_TYPE): Whitespace.
2742 (DERIVED_FROM_P): Add parenthesis and wrap.
2743 (UNIQUELY_DERIVED_FROM_P): Likewise.
2744 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
2745 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2746 (CLASSTYPE_USE_TEMPLATE): Whitespace.
2747 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
2748 (TYPE_GETS_DELETE): Add parenthesis.
2749 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
2750 (TYPE_HAS_ASSIGN_REF): Likewise,
2751 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
2752 (TYPE_HAS_INIT_REF): Likewise.
2753 (TYPE_HAS_CONST_INIT_REF): Likewise.
2754 (TYPE_BEING_DEFINED): Likewise.
2755 (TYPE_LANG_SPECIFIC): Likewise.
2756 (CLASSTYPE_RTTI): Likewise.
2757 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
2758 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2759 (TYPE_OVERLOADS_ARROW): Likewise.
2760 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
2761 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
2762 (CLASSTYPE_METHOD_VEC): Likewise.
2763 (CLASSTYPE_MARKED_N): Likewise.
2764 (CLASSTYPE_MARKED): Likewise.
2765 (CLASSTYPE_MARKED2): Likewise.
2766 (CLASSTYPE_MARKED3): Likewise.
2767 (CLASSTYPE_MARKED4): Likewise.
2768 (CLASSTYPE_MARKED5): Likewise.
2769 (CLASSTYPE_MARKED6): Likewise.
2770 (SET_CLASSTYPE_MARKED): Whitespace.
2771 (CLEAR_CLASSTYPE_MARKED): Likewise.
2772 (SET_CLASSTYPE_MARKED2): Likewise.
2773 (CLEAR_CLASSTYPE_MARKED2): Likewise.
2774 (SET_CLASSTYPE_MARKED3): Likewise.
2775 (CLEAR_CLASSTYPE_MARKED3): Likewise.
2776 (SET_CLASSTYPE_MARKED4): Likewise.
2777 (CLEAR_CLASSTYPE_MARKED4): Likewise.
2778 (SET_CLASSTYPE_MARKED5): Likewise.
2779 (CLEAR_CLASSTYPE_MARKED5): Likewise.
2780 (SET_CLASSTYPE_MARKED6): Likewise.
2781 (CLEAR_CLASSTYPE_MARKED6): Likewise.
2782 (CLASSTYPE_TAGS): Likewise.
2783 (CLASSTYPE_VSIZE): Likewise.
2784 (CLASSTYPE_VBASECLASSES): Likewise.
2785 (CANONICAL_BINFO): Add parenthesis.
2786 (CLASSTYPE_SIZE(NODE): Likewise.
2787 (CLASSTYPE_SIZE_UNIT): Likewise.
2788 (CLASSTYPE_ALIGN(NODE): Likewise.
2789 (CLASSTYPE_USER_ALIGN): Likewise.
2790 (TYPE_JAVA_INTERFACE): Likewise.
2791 (CLASSTYPE_PURE_VIRTUALS): Likewise.
2792 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
2793 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
2794 (CLASSTYPE_HAS_MUTABLE): Likewise.
2795 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
2796 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
2797 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
2798 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
2799 (CLASSTYPE_INTERFACE_ONLY): Likewise.
2800 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2801 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2802 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2803 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2804 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2805 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
2806 (BINFO_UNSHARED_MARKED): Whitespace.
2807 (BINFO_MARKED): Whitespace and wrap.
2808 (SET_BINFO_MARKED): Likewise.
2809 (CLEAR_BINFO_MARKED): Likewise.
2810 (BINFO_VTABLE_PATH_MARKED): Likewise.
2811 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
2812 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
2813 (BINFO_SUBVTT_INDEX): Remove parenthesis.
2814 (BINFO_VPTR_INDEX): Likewise.
2815 (BINFO_PRIMARY_BASE_OF): Likewise,
2816 (CLASSTYPE_VFIELDS): Whitespace.
2817 (VF_DERIVED_VALUE): Wrap long line.
2818 (NAMESPACE_LEVEL): Whitespace.
2819 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
2820 (DEFARG_POINTER): Whitespace.
2821 (DECL_NEEDED_P): Remove parenthesis.
2822 (DECL_LANGUAGE): Whitespace.
2823 (SET_DECL_LANGUAGE): Add parenthesis.
2824 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
2825 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
2826 (DECL_IN_AGGR_P): Whitespace.
2827 (DECL_FRIEND_P): Likewise.
2828 (DECL_BEFRIENDING_CLASSES): Likewise.
2829 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
2830 (DECL_NONCONVERTING_P): Whitespace.
2831 (DECL_PURE_VIRTUAL_P): Likewise.
2832 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
2833 (DECL_PENDING_INLINE_INFO): Whitespace.
2834 (DECL_SORTED_FIELDS): Likewise.
2835 (DECL_DEFERRED_FN): Likewise.
2836 (DECL_TEMPLATE_INFO): Likewise.
2837 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
2838 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
2839 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
2840 (TMPL_ARGS_LEVEL): Likewise.
2841 (SET_TMPL_ARGS_LEVEL): Likewise.
2842 (INNERMOST_TEMPLATE_PARMS): Whitespace.
2843 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
2844 (INTEGRAL_CODE_P(CODE): Add parenthesis.
2845 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
2846 (TYPE_HAS_CONSTRUCTOR): Whitespace.
2847 (TREE_HAS_CONSTRUCTOR): Likewise.
2848 (TYPE_HAS_DESTRUCTOR): Likewise.
2849 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
2850 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
2851 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2852 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
2853 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
2854 (TYPE_PTRMEMFUNC_P): Likewise.
2855 (TYPE_PTRMEMFUNC_FLAG): Likewise.
2856 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
2857 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2858 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
2859 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2860 (DECL_ACCESS): Whitespace.
2861 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
2862 (DECL_GLOBAL_DTOR_P): Likewise.
2863 (GLOBAL_INIT_PRIORITY): Likewise.
2864 (DECL_TEMPLATE_PARMS): Likewise.
2865 (DECL_TEMPLATE_RESULT): Likewise.
2866 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
2867 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
2868 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
2869 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2870 (PRIMARY_TEMPLATE_P): Add parenthesis.
2871 (DECL_USE_TEMPLATE): Whitespace.
2872 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2873 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2874 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2875 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2876 (CALL_DECLARATOR_PARMS): Remove parenthesis.
2877 (CALL_DECLARATOR_QUALS): Likewise.
2878 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2879 (TEMP_NAME_P): Wrap.
2880 (VFIELD_NAME_P): Likewise.
2881 (B_SET): Uppercase macro parameters and add parenthesis.
2884 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
2885 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
2886 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
2887 (same_or_base_type_p): Likewise.
2888 (cp_deprecated): Likewise.
2890 2002-01-05 Richard Henderson <rth@redhat.com>
2892 * semantics.c (expand_body): Revert last change.
2894 2002-01-04 Jason Merrill <jason@redhat.com>
2897 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
2900 * class.c (build_vtbl_initializer): Check for a lost primary
2901 before calculating the vtable entry to throw away.
2903 2002-01-02 Jason Merrill <jason@redhat.com>
2905 * semantics.c (expand_body): Call outlining_inline_function when
2906 emitting an inline function out of line.
2908 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2910 PR c++/5116, c++/764 reversion
2911 * call.c (build_new_op): Revert the instantiations. They are
2914 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2917 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
2919 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2922 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
2923 (tsubst, case POINTER_TYPE): Handle pmfs here.
2924 (tsubst, case OFFSET_TYPE): Check it is not an offset to
2925 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
2927 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2930 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
2931 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
2932 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
2934 (tsubst_template_parms): Break up loop statements.
2935 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
2936 parm PARM_DECLs don't get promoted.
2938 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2941 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
2942 (build_x_function_call): Cope with a COMPONENT_REF containing a
2945 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2948 * pt.c (convert_template_argument): Be more careful determining
2949 when RECORD_TYPE templates are or are not templates.
2951 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2954 * cp-tree.h (handle_class_head): Adjust prototype.
2955 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
2956 parameters. Use for all class heads.
2957 * parse.y (named_class_head_sans_basetype, named_class_head,
2958 named_complex_class_head_sans_basetype,
2959 named_class_head_sans_basetype_defn,
2960 unnamed_class_head): Remove.
2961 (class_head, class_head_apparent_template): Recognize class heads
2962 (class_head_decl, class_head_defn): New reductions. Process class
2964 (structsp): Adjust class definition and class declaration
2966 (maybe_base_class_list): Give diagnostic on empty list.
2968 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2971 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
2972 single non-static member.
2973 (unary_complex_lvalue): If it cannot be a pointer to member, don't
2974 make it so. Check it is not pointer to reference.
2976 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2979 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
2980 are processing a template decl.
2982 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2984 PR c++/5116, c++/764
2985 * call.c (build_new_op): Make sure template class operands are
2986 instantiated. Simplify arglist construction.
2988 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
2990 * call.c (build_user_type_conversion_1): Use my_friendly_assert
2991 rather than if ... abort.
2992 * cvt.c (convert_to_reference): Likewise.
2993 * semantics.c (setup_vtbl_ptr): Likewise.
2994 * pt.c (lookup_template_class): Comment typo.
2996 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
2999 * pt.c (push_template_decl_real): Make sure DECL has
3002 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3005 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
3006 for non-reference fields.
3007 * typeck.c (require_complete_type): Use resolve_offset_ref).
3009 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
3012 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
3014 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
3017 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
3018 up. Don't stabilize_references when initializing a reference.
3020 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3022 * decl2.c (lang_f_options): Const-ify.
3024 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
3026 * config-lang.in (diff_excludes): Remove.
3028 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
3031 * typeck.c (build_function_call_real): Use original function
3032 expression for errors.
3034 2001-12-18 Jason Merrill <jason@redhat.com>
3037 * class.c (add_method): Do compare 'this' quals when trying to match a
3038 used function. Don't defer to another used function.
3040 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3042 * pt.c (instantiate_clone): Remove, fold into ...
3043 (instantiate_template): ... here. Simplify by removing mutual
3045 * typeck2.c (build_m_component_ref): Don't cv qualify the function
3046 pointed to by a pointer to function.
3047 * class.c (delete_duplicate_fields_1): Typo.
3049 2001-12-18 Jason Merrill <jason@redhat.com>
3051 C++ ABI change: destroy value arguments in caller.
3052 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
3053 create an extra binding level for the parameters.
3054 * decl.c (store_parm_decls): Don't do parameter cleanups.
3056 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3058 * call.c (build_new_method_call): Use '%#V'.
3059 * error.c (cv_to_string): Use V parameter to determine padding.
3061 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
3063 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
3064 spellings in messages.
3066 2001-12-17 Zack Weinberg <zack@codesourcery.com>
3068 * cp-tree.h: Delete #defines for cp_error, cp_warning,
3069 cp_pedwarn, and cp_compiler_error.
3070 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
3071 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
3072 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3073 typeck2.c: Change calls to the above macros to use their
3074 language-independent equivalents: error, warning, pedwarn, and
3075 internal_error respectively.
3077 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
3079 * decl2.c (finish_file): Remove back_end_hook.
3081 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
3083 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
3084 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
3085 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
3087 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
3089 * lang-options.h: Use American spelling in messages.
3091 2001-12-13 Jason Merrill <jason@redhat.com>
3093 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
3095 Use cleanups to run base and member destructors.
3096 * init.c (push_base_cleanups): New function, split out from...
3097 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
3098 * decl.c (finish_destructor_body): Move vbase destruction code to
3100 (begin_function_body, finish_function_body): New fns.
3101 (finish_function): Move [cd]tor handling and call_poplevel to
3102 finish_function_body.
3103 (pushdecl): Skip the new level.
3104 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
3105 (setup_vtbl_ptr): Call push_base_cleanups.
3106 * method.c (synthesize_method): Call {begin,end}_function_body.
3107 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
3108 * cp-tree.h: Declare new fns.
3109 * parse.y (function_body, .begin_function_body): New nonterminals.
3110 (fndef, pending_inline, function_try_block): Use function_body.
3111 (ctor_initializer_opt, function_try_block): No longer has a value.
3112 (base_init): Remove .set_base_init token.
3113 (.set_base_init, compstmt_or_error): Remove.
3114 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
3116 * optimize.c (maybe_clone_body): Fix parameter updating.
3118 2001-12-12 Jason Merrill <jason@redhat.com>
3120 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
3121 * semantics.c (genrtl_start_function): Don't pass
3122 parms_have_cleanups or push an extra binding level.
3123 (genrtl_finish_function): Lose cleanup_label cruft.
3125 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
3126 (ctor_label): Remove.
3127 * semantics.c (finish_return_stmt): Lose ctor_label support.
3128 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
3129 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
3132 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
3134 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
3136 * decl.c (finish_function): Check VMS_TARGET, not VMS.
3138 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
3139 (end_cleanup_fn): And poplevel.
3141 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
3142 if we're in a template.
3144 2001-12-12 Jakub Jelinek <jakub@redhat.com>
3146 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
3147 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
3148 THIS_NAME_P): Delete.
3149 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
3150 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
3151 with internal naming scheme.
3152 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
3154 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
3156 * decl.c (grokdeclarator): Deprecated implicit typename use.
3158 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
3161 * parse.y (frob_specs): Indicate it is a language linkage which
3162 contained the extern.
3163 * decl.c (grokdeclarator): Allow extern language linkage with
3166 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
3169 * decl.c (add_binding): Don't reject duplicate typedefs involving
3170 template parameters.
3172 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
3174 * parse.y, semantics.c: Similarly.
3176 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
3179 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
3180 (copy_args_p): Rename to ...
3181 (copy_fn_p): ... here.
3182 (grok_special_member_properties): New function.
3183 (grok_op_properties): Lose VIRTUALP parameter.
3184 (copy_assignment_arg_p): Remove.
3185 * call.c (build_over_call): Use copy_fn_p.
3186 * decl.c (grokfndecl): Reformat. Adjust call to
3188 (copy_args_p): Rename to ...
3189 (copy_fn_p): ... here. Reject template functions. Check for pass
3191 (grok_special_member_properties): Remember special functions.
3192 (grok_ctor_properties): Don't remember them here, just check.
3193 (grok_op_properties): Likewise.
3194 (start_method): Call grok_special_member_properties.
3195 * decl2.c (grokfield): Likewise.
3196 (copy_assignment_arg_p): Remove.
3197 (grok_function_init): Don't remember abstract assignment here.
3198 * pt.c (instantiate_class_template): Call
3199 grok_special_member_properties.
3200 (tsubst_decl): Adjust grok_op_properties call.
3202 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
3204 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
3205 RID_TYPES_COMPATIBLE_P.
3207 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
3209 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
3210 call to build_aggr_init.
3211 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
3213 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
3215 * parse.y: Replace uses of the string non-terminal with STRING.
3216 Don't perform string concatentaion here.
3217 (string): Remove non-terminal.
3218 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
3220 2001-12-05 Jason Merrill <jason@redhat.com>
3222 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
3223 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
3224 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
3225 * pt.c (push_tinst_level): No longer static.
3226 * cp-tree.h: Declare them.
3228 * init.c (resolve_offset_ref): Don't check access for the base
3229 conversion to access a FIELD_DECL.
3231 * cp-tree.h (TYPE_REFFN_P): New macro.
3232 * decl.c (bad_specifiers): Check it, too.
3234 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
3235 on the __*_type_info type if we haven't seen a definition.
3237 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
3239 * decl.c: Include c-common.h.
3240 (shadow_warning): Move to c-common.c.
3242 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3244 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
3246 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
3248 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
3250 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
3253 * init.c (sort_base_init): Allow binfos to be directly specified.
3254 * method.c (do_build_copy_constructor): Explicitly convert to the
3256 (do_build_assign_ref): Likewise.
3258 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
3260 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
3261 declaration and initialization.
3263 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
3265 * typeck2.c: Remove leading capital from diagnostic messages, as
3266 per GNU coding standards.
3268 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
3271 * decl.c (xref_basetypes): Handle attributes between
3274 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
3277 * parse.y (named_complex_class_head_sans_basetype): Add new
3279 * Make-lang.in (parse.c): Adjust expected conflict count.
3281 2001-12-03 Jason Merrill <jason@redhat.com>
3283 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
3284 immediate binfos for our virtual bases.
3286 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
3288 * call.c (build_java_interface_fn_ref): Similarly.
3289 * except.c (is_admissible_throw_operand): Similarly.
3290 * init.c (build_java_class_ref): Similarly.
3291 * xref.c (open_xref_file): Similarly.
3293 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
3295 * class.c (finish_struct): Remove trailing periods from messages.
3296 * decl.c (check_tag_decl): Similarly.
3297 * lex.c (cxx_set_yydebug): Similarly.
3298 * typeck2.c (friendly_abort): Similarly.
3300 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3303 * cp-tree.h (ovl_member): Remove.
3304 * decl2.c (merge_functions): Handle extern "C" functions
3306 * tree.c (ovl_member): Remove.
3308 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3311 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
3312 FUNCTION_DECL, as input.
3313 (mark_overriders): Remove.
3314 (warn_hidden): Rework for the new ABI.
3316 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3319 * call.c (convert_like_real): Do not build additional temporaries
3320 for rvalues of class type.
3322 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
3324 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
3325 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
3326 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
3327 (DERIVED_FROM_P): Likewise.
3328 (enum base_access): Renumber, add ba_quiet bit mask.
3329 (get_binfo): Remove.
3330 (get_base_distance): Remove.
3331 (binfo_value): Remove.
3332 (ACCESSIBLY_DERIVED_FROM_P): Remove.
3333 * call.c (standard_conversion): Use lookup_base.
3334 * class.c (strictly_overrides): Likewise.
3335 (layout_virtual_bases): Likewise.
3336 (warn_about_ambiguous_direct_bases): Likewise.
3337 (is_base_of_enclosing_class): Likewise.
3338 (add_vcall_offset_vtbl_entries_1): Likewise.
3339 * cvt.c (build_up_reference): Adjust comment.
3340 * init.c (build_member_call): Reformat.
3341 * search.c (get_binfo): Remove.
3342 (get_base_distance_recursive): Remove.
3343 (get_base_distance): Remove.
3344 (lookup_base_r): Tweak.
3345 (lookup_base): Add ba_quiet control. Complete the types here.
3346 (covariant_return_p): Use lookup_base.
3347 * tree.c (binfo_value): Remove.
3348 (maybe_dummy_object): Use lookup_base.
3349 * typeck.c (build_static_cast): Use lookup_base.
3350 (get_delta_difference): Likewise.
3351 * typeck2.c (binfo_or_else): Use lookup_base.
3352 (build_scoped_ref): Add back error_mark_check.
3353 (build_m_component_ref): Use lookup_base.
3355 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
3357 * Make-lang.in (c++.generated-manpages): New dummy target.
3359 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3361 * Make-lang.in (cp-lang.o): Depends on c-common.h.
3362 * cp-lang.c (c-common.h): Include.
3363 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
3364 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
3365 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
3367 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
3369 * decl2.c (c_language): Move to c-common.c.
3370 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
3374 2001-11-26 Jason Merrill <jason@redhat.com>
3376 * call.c (joust): Remove COND_EXPR hack.
3378 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
3380 * search.c (lookup_base_r): Declare bk in variable declaration
3383 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
3386 * class.c (build_vbase_pointer): Remove.
3387 (build_vbase_path): Remove.
3388 (build_base_path): New function.
3389 * cp-tree.h (base_access, base_kind): New enumerations.
3390 (build_base_path): Declare.
3391 (convert_pointer_to_real): Remove.
3392 (convert_pointer_to): Remove.
3393 (lookup_base): Declare.
3394 (convert_pointer_to_vbase): Remove.
3395 * call.c (build_scoped_method_call): Use lookup_base &
3396 build_base_path instead of convert_pointer_to_real,
3397 get_base_distance & get_binfo.
3398 (build_over_call): Likewise.
3399 * cvt.c (cp_convert_to_pointer): Likewise.
3400 (convert_to_pointer_force): Likewise.
3401 (build_up_reference): Likewise.
3402 (convert_pointer_to_real): Remove.
3403 (convert_pointer_to): Remove.
3404 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
3405 instead of convert_pointer_to_vbase & build_vbase_path.
3406 (emit_base_init): Use build_base_path instead of
3407 convert_pointer_to_real.
3408 (expand_virtual_init): Lose unrequired conversions.
3409 (resolve_offset_ref): Use lookup_base and build_base_path
3410 instead of convert_pointer_to.
3411 * rtti.c (build_dynamic_cast_1): Use lookup_base &
3412 build_base_path instead of get_base_distance & build_vbase_path.
3413 * search.c (get_vbase_1): Remove.
3414 (get_vbase): Remove.
3415 (convert_pointer_to_vbase): Remove.
3416 (lookup_base_r): New function.
3417 (lookup_base): New function.
3418 * typeck.c (require_complete_type): Use lookup_base &
3419 build_base_path instead of convert_pointer_to.
3420 (build_component_ref): Likewise.
3421 (build_x_function_call): Likewise.
3422 (get_member_function_from_ptrfunc): Likewise.
3423 (build_component_addr): Likewise.
3424 * typeck2.c (build_scoped_ref): Likewise.
3426 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3428 * cp-tree.h (CP_TYPE_QUALS): Removed.
3429 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
3430 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
3431 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
3432 * dump.c (cp_dump_tree): Use void* dump_info argument to match
3433 lang-hooks prototype.
3434 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
3435 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
3436 CP_TYPE_QUALS changed to cp_type_quals.
3437 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
3438 (CXX_C_OBJS): Remove c-dump.o.
3440 2001-11-21 Mark Mitchell <mark@codesourcery.com>
3443 * pt.c (lookup_template_class): Ensure that all specializations
3444 are registered on the list corresponding to the most general
3447 2001-11-20 Mark Mitchell <mark@codesourcery.com>
3449 * call.c (non_reference): Add documentation.
3450 (convert_class_to_reference): Do not strip reference types
3451 from conversion operators.
3452 (maybe_handle_ref_bind): Simplify.
3453 (compare_ics): Correct handling of references.
3455 2001-11-19 John Wilkinson <johnw@research.att.com>
3457 * dump.c (dump_op): New function.
3458 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
3459 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
3460 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
3462 2001-11-19 Mark Mitchell <mark@codesourcery.com>
3465 * semantics.c (finish_sizeof): Make sure that expression created
3466 while processing a template do not have a type.
3467 (finish_alignof): Likewise.
3468 * typeck.c (c_sizeof): Likewise.
3469 (expr_sizeof): Likewise.
3471 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
3473 * lex.c (cxx_finish): Call c_common_finish.
3474 (finish_parse): Remove.
3476 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3478 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
3479 when displaying error message about missing array bounds.
3481 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3483 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
3485 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
3487 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
3489 * cp-tree.h (print_class_statistics): Restore.
3491 2001-11-15 Jason Merrill <jason@redhat.com>
3493 * method.c (use_thunk): Don't emit debugging information for thunks.
3495 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
3496 * decl.c (make_typename_type): Handle getting a class template.
3497 * search.c (lookup_field_r): A class template is good enough for
3500 * call.c (convert_like_real): Only use cp_convert for the bad part.
3501 (standard_conversion): Also allow bad int->enum.
3502 * typeck.c (ptr_reasonably_similar): Also allow functions to
3503 interconvert. Pointers to same-size integers are reasonably
3506 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
3509 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
3512 * init.c (sort_base_init): Remove unreachable code.
3513 (expand_member_init): Adjust comment to reflect reality. Simplify
3514 and remove unreachable code.
3516 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
3518 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
3519 (cxx_init): Update prototype.
3520 * decl.c (init_decl_processing): Rename. Move null node init
3521 to its creation time.
3522 * lex.c (cxx_init_options): Update.
3523 (cxx_init): Combine with old init_parse; also call
3524 cxx_init_decl_processing.
3526 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
3528 * decl.c (check_initializer): Try to complete the type of an
3529 array element before checking whether it's complete. Don't
3530 complain about arrays with complete element types but an
3532 (cp_finish_decl): Build the hierarchical constructor before
3533 calling maybe_deduce_size_from_array_init.
3535 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
3537 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
3539 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
3542 * parse.y (already_scoped_stmt): Remove.
3543 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
3545 2001-11-12 H.J. Lu <hjl@gnu.org>
3547 * cvt.c (ocp_convert): Don't warn the address of a weak
3548 function is always `true'.
3550 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3552 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3553 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3554 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
3555 * cp-tree.h (print_class_statistics): Remove.
3556 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
3557 cxx_print_identifier, cxx_set_yydebug): New.
3558 * lex.c (set_yydebug): Rename c_set_yydebug.
3559 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
3560 lang_print_xnode): Rename.
3561 * tree.c (print_lang_statistics): Rename.
3563 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3565 * class.c (dump_array): Fix format specifier warning.
3567 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3569 * cp-lang.c (LANG_HOOKS_NAME): Override.
3570 (struct lang_hooks): Constify.
3571 * lex.c (cxx_init_options): Update.
3572 (lang_identify): Remove.
3573 * parse.y (language_string): Remove.
3575 2001-11-08 Andreas Franck <afranck@gmx.de>
3577 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
3578 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
3579 suggested by autoconf.
3580 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
3581 (c++.install-common): Use the transformed target alias names.
3583 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
3585 * Make-lang.in: Update.
3586 * cp-lang.c: Include langhooks-def.h.
3588 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3590 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
3592 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3594 * lex.c (copy_lang_type): Add static prototype.
3596 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3598 * pt.c (unify): Handle SCOPE_REF.
3600 2001-11-01 Jakub Jelinek <jakub@redhat.com>
3602 * tree.c (cp_copy_res_decl_for_inlining): Adjust
3603 DECL_ABSTRACT_ORIGIN for the return variable.
3605 2001-10-31 Zack Weinberg <zack@codesourcery.com>
3607 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
3609 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
3611 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
3612 semantics.c, spew.c: Fix spelling errors.
3614 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3616 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
3618 2001-10-25 Zack Weinberg <zack@codesourcery.com>
3620 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
3623 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3625 * cp-lang.c (cxx_get_alias_set): New function.
3626 Point LANG_HOOKS_GET_ALIAS_SET to it.
3628 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3630 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
3631 * cp-tree.h (make_unbound_class_template): Prototype new function.
3632 * decl.c (make_unbound_class_template): New function.
3633 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
3634 * error.c (dump_type): Likewise.
3635 * mangle.c (write_type): Likewise.
3636 * parse.y (template_parm): Likewise.
3637 (template_argument): Use make_unbound_class_template.
3638 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
3640 (tsubst_copy): Likewise.
3642 * tree.c (walk_tree): Likewise.
3643 * typeck.c (comptypes): Likewise.
3645 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3647 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
3648 extra calls into fewer ones.
3650 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
3652 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
3653 Warn when merging inline with attribute noinline.
3654 (start_decl, start_function): Warn if inline and attribute
3655 noinline appear in the same declaration.
3657 2001-10-16 H.J. Lu <hjl@gnu.org>
3659 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
3660 for tree checking disabled.
3662 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
3664 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
3665 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
3667 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
3669 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
3670 (unify): Only handle MINUS_EXPR specially if the above flag is set
3671 and the subtracted constant is 1. Clear the flag on recursive calls.
3672 Set it when unifying the maximum value in an INTEGER_TYPE's range.
3674 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
3676 * decl.c (bad_specifiers): Don't allow exception specifications
3679 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
3681 * cp/lex.c (init_cp_pragma): Similarly.
3683 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3685 * pt.c (lookup_template_class): Build complete template arguments
3686 for BOUND_TEMPLATE_TEMPLATE_PARM.
3688 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3690 * cp-tree.h (TYPE_BINFO): Update comment.
3691 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
3692 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
3693 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
3694 (copy_type): Prototype new function.
3695 * lex.c (copy_lang_decl): Gather tree node statistics.
3696 (copy_lang_type): New function.
3697 (copy_type): Likewise.
3698 (cp_make_lang_type): Create lang_type for
3699 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
3700 and BOUND_TEMPLATE_TEMPLATE_PARM.
3701 * pt.c (tsubst): Use copy_type instead of copy_node.
3702 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
3704 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3706 * pt.c (determine_specialization): Ignore functions without
3709 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
3712 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
3714 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
3716 * typeck2.c (store_init_value): Don't re-digest a bracketed
3719 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
3722 2001-10-11 Richard Henderson <rth@redhat.com>
3724 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
3725 of an asm statement.
3726 (build_vtbl_ref_1): Split out from build_vtbl_ref.
3727 (build_vfn_ref): Use it to handle vtable descriptors before
3728 calling build_vtable_entry_ref.
3729 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
3731 2001-10-10 Richard Henderson <rth@redhat.com>
3733 * parse.y (asm_operand): Allow named operands.
3734 * semantics.c (finish_asm_stmt): Tweek for changed location
3735 of the operand constrant.
3737 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
3739 * call.c (standard_conversion): Add bad conversion between
3740 integers and pointers.
3741 (convert_like_real): Don't use convert_for_initialization for bad
3742 conversions; complain here and use cp_convert.
3743 (build_over_call): Don't handle bad conversions specially.
3744 (perform_implicit_conversion): Allow bad conversions.
3745 (can_convert_arg_bad): New fn.
3746 * cp-tree.h: Declare it.
3747 * typeck.c (convert_for_assignment): Use it.
3748 (ptr_reasonably_similar): Any target type is similar to void.
3750 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
3752 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
3753 (cp/cp-lang.o): New rule.
3754 * cp-tree.h: Declare hooks.
3755 * tree.c: Make hooks non-static.
3756 (init_tree): Don't initialize hooks here.
3757 * lex.c: Likewise. Move definition of lang_hooks to...
3758 * cp-lang.c: ... new file.
3760 2001-10-08 Richard Henderson <rth@redhat.com>
3762 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
3763 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
3765 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3767 * class.c (build_vtable_entry_ref): Const-ify.
3768 * decl.c (predefined_identifier,
3769 initialize_predefined_identifiers): Likewise.
3770 * init.c (build_new_1): Likewise.
3771 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
3774 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
3776 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
3777 (INSNS_PER_STMT): Likewise.
3778 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
3779 (copy_body, initialize_inlined_parameters): Likewise.
3780 (declare_return_variable, inlinable_function_p): Likewise.
3781 (expand_call_inline, expand_calls_inline): Likewise.
3782 (optimize_inline_calls, clone_body): Likewise.
3783 * tree.c (walk_tree): Moved to ../tree-inline.c.
3784 (walk_tree_without_duplicates): Likewise.
3785 (copy_tree_r, remap_save_expr): Likewise.
3787 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
3789 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
3790 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
3791 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
3792 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
3793 (flag_inline_trees): Moved declaration to ../tree-inline.h.
3794 (walk_tree): Moved declaration to ../tree-inline.h.
3795 (walk_tree_without_duplicates, copy_tree_r): Likewise.
3796 (remap_save_expr): Likewise.
3797 * decl.c: Include tree-inline.h.
3798 (lang_mark_tree): Don't mark inlined_fns.
3799 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
3800 * optimize.c: Include tree-inline.h.
3801 (optimize_inline_calls): Move declaration to ../tree.h, as
3803 (remap_decl): Use language-independent constructs and hooks.
3804 (remap_block, copy_body_r, declare_return_variable): Likewise.
3805 (inlinable_function_p): Likewise. Don't test for
3806 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
3807 no longer language-specific.
3808 (optimize_inline_calls): Likewise. Make it non-static. Moved
3809 call of dump_function to...
3810 (optimize_function): Here...
3811 (clone_body): New function, extracted from...
3812 (maybe_clone_body): ... here. Build decl_map locally and pass
3813 it on to clone_body.
3814 * pt.c, semantics.c: Include tree-inline.h.
3816 (cp_walk_subtrees): New language-specific hook for tree inlining.
3817 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
3818 cp_is_overload_p, cp_auto_var_in_fn_p,
3819 cp_copy_res_decl_for_inlining): Likewise.
3820 (walk_tree): Move language-specific constructs into...
3821 (cp_walk_subtrees): this new function.
3822 (copy_tree_r): Use language-independent constructs and hooks.
3823 (init_tree): Initialize tree inlining hooks.
3824 (remap_save_expr): Adjust prototype so that the declaration
3825 does not require the definition of splay_tree.
3827 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
3829 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
3830 to build the declaration instead of the declaration itself.
3832 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
3834 * decl2.c (cxx_decode_option): Add 'else'.
3836 * spew.c (end_input): No longer static.
3837 * cp-tree.h: Declare it.
3838 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
3840 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
3842 * call.c (build_over_call), typeck.c (build_function_call_real):
3843 Pass type attributes to check_function_format rather than name or
3844 assembler name. Don't require there to be a name or assembler
3845 name to check formats.
3847 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
3849 * decl.c (init_decl_processing): Don't call
3850 init_function_format_info. Initialize lang_attribute_table
3852 (builtin_function): Call decl_attributes.
3853 (insert_default_attributes): New.
3855 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
3857 * decl.c (grokdeclarator): Copy array typedef handling from C
3860 * decl.c (grokdeclarator): Copy too-large array handling from C
3863 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
3865 * config-lang.in (target_libs): Added target-gperf, so that we
3866 don't try to build it if C++ is disabled.
3868 2001-09-23 Zack Weinberg <zack@codesourcery.com>
3870 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
3871 (cp/errfn.o): Delete rule.
3872 (cp/error.o): Depend on flags.h.
3873 * errfn.c: Delete file.
3874 * cp-tree.h: Declare warn_deprecated. Remove definitions of
3875 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
3876 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
3877 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
3878 internal_error respectively. Make cp_deprecated into a macro.
3879 Don't define cp_printer typedef or declare cp_printers.
3880 * error.c: Include flags.h.
3881 Delete: struct tree_formatting_info, print_function_argument_list,
3882 print_declaration, print_expression, print_function_declaration,
3883 print_function_parameter, print_type_id, print_cv_qualifier_seq,
3884 print_type_specifier_seq, print_simple_type_specifier,
3885 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
3886 print_parameter_declaration_clause, print_exception_specification,
3887 print_nested_name_specifier, and definition of cp_printers.
3888 (locate_error): New function.
3889 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
3890 rewritten in terms of locate_error and diagnostic.c.
3891 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
3892 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
3893 (init_error): Adjust to match.
3895 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3897 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
3899 2001-09-21 Richard Henderson <rth@redhat.com>
3901 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
3902 (build_vtbl_initializer): Likewise.
3903 (build_vfn_ref): New.
3904 * cp-tree.h: Declare it.
3905 * call.c (build_over_call): Use it.
3906 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
3907 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
3909 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
3911 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
3913 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
3915 Table-driven attributes.
3916 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
3917 * decl2.c (cplus_decl_attributes): Only take one attributes
3919 * cp-tree.c (cplus_decl_attributes): Update prototype.
3920 * class.c (finish_struct), decl.c (start_decl, start_function),
3921 decl2.c (grokfield), friend.c (do_friend), parse.y
3922 (parse_bitfield): Update calls to cplus_decl_attributes.
3923 * decl.c (grokdeclarator): Take a pointer to a single ordinary
3925 * decl.h (grokdeclarator): Update prototype.
3926 * decl2.c (grokfield): Take a single ordinary attribute list.
3927 * friend.c (do_friend): Likewise.
3928 * decl.c (shadow_tag, groktypename, start_decl,
3929 start_handler_parms, grokdeclarator, grokparms, start_function,
3930 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
3931 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
3932 (process_template_parm, do_decl_instantiation): Pass single
3933 ordinary attribute lists around.
3934 * decl.c (grokdeclarator): Correct handling of nested attributes.
3936 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
3937 * decl.c (grokdeclarator): Embedded attrs bind to the right,
3940 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
3941 (cp_attribute_table): Declare.
3942 * decl.c (valid_lang_attribute): Don't define.
3943 (lang_attribute_table): Define.
3944 (init_decl_processing): Initialize lang_attribute_table instead of
3945 valid_lang_attribute.
3946 * tree.c (cp_valid_lang_attribute): Remove.
3947 (handle_java_interface_attribute, handle_com_interface_attribute,
3948 handle_init_priority_attribute): New functions.
3949 (cp_attribute_table): New array.
3950 * decl2.c (import_export_class): Don't use
3951 targetm.valid_type_attribute.
3953 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3955 * Make-lang.in (cp/error.o): Depend on real.h
3956 * error.c: #include "real.h"
3958 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3960 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
3961 xmalloc/strcpy/strcat.
3963 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3965 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
3967 * pt.c (tsubst_decl): Likewise.
3969 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3971 * decl2.c (lang_f_options): Const-ification.
3972 * lex.c (cplus_tree_code_name): Likewise.
3973 * spew.c (yyerror): Likewise.
3975 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
3978 * class.c (force_canonical_binfo_r): Check & move an indirect
3980 (force_canonical_binfo): Check that it's not already
3982 (mark_primary_virtual_base): Remove BINFO parameter.
3983 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
3985 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
3987 Remove TYPE_NONCOPIED_PARTS.
3988 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
3989 CLASSTYPE_PURE_VIRTUALS.
3990 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
3991 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
3992 (layout_class_type): Don't call fixup_inline_methods here ...
3993 (finish_struct_1): ... call it here.
3995 2001-09-04 Mark Mitchell <mark@codesourcery.com>
3997 * decl.c (duplicate_decls): Remove code deadling with
3999 * decl2.c (finish_file): Likewise.
4000 * pt.c (instantiate_decl): Likewise.
4001 * semantics.c (expand_body): Don't defer local functions if
4002 they wouldn't be deferred for some other reason. Don't
4003 generate RTL for functions that will not be emitted.
4004 (genrtl_start_function): Remove code deadling with
4006 (genrtl_finish_function): Likewise.
4008 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
4011 * call.c (build_over_call): Do not optimize any empty base
4014 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4016 * error.c (dump_template_decl): Output template parameters
4017 together with their specifiers.
4018 Output `class' prefix for template template parameter.
4019 (dump_decl): Fix formatting.
4021 2001-08-30 Kurt Garloff <garloff@suse.de>
4023 * optimize.c (inlinable_function_p): Allow only smaller single
4024 functions. Halve inline limit after reaching recursive limit.
4026 2001-08-30 Joern Rennecke <amylaar@redhat.com>
4027 Jason Merrill <jason_merrill@redhat.com>
4029 * class.c (build_vtable_entry_ref): Subtract in char*, not
4032 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
4034 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
4035 (build_cplus_array_type): Use cp_build_qualified_type, not
4036 TYPE_MAIN_VARIANT, to get an unqualified version.
4038 * decl2.c (grok_alignof): Lose.
4039 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
4040 * typeck.c (c_alignof): Lose.
4041 * semantics.c (finish_sizeof, finish_alignof): New.
4042 * parse.y: Use them.
4043 * cp-tree.h: Declare them.
4045 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
4047 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
4048 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
4049 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
4051 2001-08-19 Jakub Jelinek <jakub@redhat.com>
4053 * typeck2.c (add_exception_specifier): Only require complete type if
4054 not in processing template declaration.
4056 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4058 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
4059 GNU_xref_start_scope and GNU_xref_end_scope.
4061 * tree.c (TYPE_HASH): Moved to ../tree.h.
4063 2001-08-16 Mark Mitchell <mark@codesourcery.com>
4065 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
4068 2001-08-14 Richard Henderson <rth@redhat.com>
4070 * class.c, cp-tree.h (build_vfn_ref): Remove.
4071 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
4073 2001-08-13 Mark Mitchell <mark@codesourcery.com>
4075 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
4076 empty class assignment as having side-effects to avoid
4079 2001-08-13 Zack Weinberg <zackw@panix.com>
4081 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
4082 * except.c: Include libfuncs.h.
4084 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4086 * decl.c (grokdeclarator): Clarify diagnostic message.
4088 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4090 * decl2.c (do_nonmember_using_decl): Replace using directive
4091 with using declaration in the error message.
4093 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4095 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
4096 criterion to avoid rebuilding expression tree instead of
4097 processing_template_decl.
4099 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
4101 Support named return value optimization for inlines, too.
4102 * decl.c (finish_function): Nullify returns here.
4103 * semantics.c (genrtl_start_function): Not here.
4104 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
4105 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
4106 Also nullify the CLEANUP_STMT for the nrv.
4107 * cp-tree.h: Declare it.
4108 * optimize.c (declare_return_variable): Replace the nrv with the
4110 * typeck.c (check_return_expr): Be more flexible on alignment check.
4111 Ignore cv-quals when checking for a matching type.
4113 2001-08-09 Richard Henderson <rth@redhat.com>
4115 * decl2.c (finish_objects): Use target hooks instead of
4116 assemble_constructor and assemble_destructor.
4118 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
4120 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
4122 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
4125 Stop using TYPE_NONCOPIED_PARTS.
4126 * call.c (build_over_call): Be careful when copy constructing
4127 or assigning to an empty class.
4128 * class.c (check_bases_and_members): It has a
4129 COMPLEX_ASSIGN_REF if it has a vptr.
4130 (layout_class_type): Don't add empty class padding to
4131 TYPE_NONCOPIED_PARTS.
4132 (finish_struct_1): Don't add the VFIELD either.
4133 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
4136 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
4138 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
4140 2001-08-06 Richard Henderson <rth@redhat.com>
4142 * decl2.c (finish_objects): Pass a symbol_ref and priority to
4143 assemble_{constructor,destructor}. Remove priority handling.
4145 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4147 Don't allow template-id in using-declaration.
4148 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
4149 (do_class_using_decl): Likewise.
4151 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4153 * cp/spew.c (read_token): No need to pop buffers.
4155 2001-08-02 Stan Shebs <shebs@apple.com>
4157 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
4158 (fnaddr_from_vtable_entry): Remove decl.
4159 * method.c (use_thunk): Update comment.
4161 2001-08-01 Andrew Cagney <ac131313@redhat.com>
4163 * repo.c (get_base_filename): Change return value to const char
4166 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
4170 * cp-tree.h (flag_honor_std): Remove.
4171 (CPTI_FAKE_STD): Remove.
4172 (std_node): Remove comment about it being NULL.
4173 (fake_std_node): Remove.
4174 * decl.c (in_fake_std): Remove.
4175 (walk_namespaces_r): Remove fake_std_node check.
4176 (push_namespace): Remove in_fake_std code.
4177 (pop_namespace): Likewise.
4178 (lookup_name_real): Remove fake_std_node check.
4179 (init_decl_processing): Always create std_node. Always add
4181 (builtin_function): Always put non '_' fns in std.
4182 * decl2.c (flag_honor_std): Remove.
4183 (lang_f_options): Remove honor-std.
4184 (unsupported_options): Add honor-std.
4185 (set_decl_namespace): Remove fake_std_node check.
4186 (validate_nonmember_using_decl): Likewise.
4187 (do_using_directive): Likewise.
4188 (handle_class_head): Likewise.
4189 * dump.c (cp_dump_tree): Likewise.
4190 * except.c (init_exception_processing): Adjust.
4191 * init.c (build_member_call): Remove fake_std_node check.
4192 (build_offset_ref): Likewise.
4193 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
4194 * rtti.c (init_rtti_processing): Adjust.
4196 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
4198 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
4199 operand while calling cp_tree_equal.
4201 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
4203 The 3.0 ABI no longer has vbase pointer fields.
4204 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
4205 FORMAT_VBASE_NAME): Remove.
4206 * method.c (do_build_copy_constructor): Adjust.
4207 (do_build_assign_ref): Adjust.
4208 * search.c (lookup_field_r): Adjust.
4209 * typeck.c (build_component_ref): Adjust.
4211 The 3.0 ABI always has a vtable pointer at the start of every
4213 * rtti.c (build_headof_sub): Remove.
4214 (build_headof): Adjust.
4215 (get_tinfo_decl_dynamic): No need to check flag_rtti
4217 (create_real_tinfo_var): Explain why we need a hidden name.
4219 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
4222 * class.c (update_vtable_entry_for_fn): The fixed adjustment
4223 of a virtual thunk should be from declaring base.
4225 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
4227 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
4228 the shared virtual base, so preserving inheritance graph order.
4230 2001-07-30 Andreas Jaeger <aj@suse.de>
4232 * decl2.c: Remove unused var global_temp_name_counter.
4234 2001-07-28 Richard Henderson <rth@redhat.com>
4236 * method.c (pending_inlines): Remove.
4238 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
4240 * class.c (mark_primary_virtual_base): Don't adjust base
4242 (dfs_unshared_virtual_bases): Adjust them here.
4243 (mark_primary_bases): Explain why we adjust at the end.
4245 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
4247 * class.c (finish_struct_1): When copying the primary base's
4248 VFIELD, make sure we find it is at offset zero.
4250 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4252 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
4253 tsubst_expr for default template arguments.
4255 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
4258 * spew.c (yylex): Only copy the token's lineno, if it is
4261 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
4264 * call.c (resolve_args): Simplify, call
4265 convert_from_reference.
4266 (build_new_op): Resolve and convert from reference ARG1
4267 earlier. Adjust ARG2 & ARG3 resolve and conversion.
4269 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
4271 * decl.c (last_function_parm_tags): Remove.
4272 (current_function_parm_tags): Remove.
4273 (init_decl_processing): Adjust.
4274 (start_function): Adjust.
4275 (store_parm_decls): Adjust.
4278 * decl.c (grokdeclarator): Detect when a function typedef is
4279 declaring a function, and create last_function_parms correctly.
4281 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
4283 * call.c (joust): Only prefer a non-builtin candidate to a builtin
4284 one if they have the same signature.
4286 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
4287 it rather than toplevel_bindings_p. Give it a mangled name if static.
4288 (convert_to_reference): Adjust.
4289 * decl2.c (get_temp_name): Lose.
4290 * mangle.c (mangle_ref_init_variable): New fn.
4291 (mangle_guard_variable): Strip the ref-init header.
4292 * cp-tree.h: Adjust.
4293 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
4295 (grok_reference_init): Always use DECL_INITIAL.
4297 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4300 * call.c (build_conditional_expr): Recheck args after
4302 * cp-tree.h (build_conditional_expr): Move to correct file.
4303 * typeck.c (decay_conversion): Diagnose any unknown types
4305 (build_binary_op): Don't do initial decay or default
4306 conversions on overloaded functions.
4307 (build_static_cast): Don't do a decay conversion here.
4309 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4312 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
4313 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
4315 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4317 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
4318 (create_vtbl_ptr): ... here.
4320 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4322 * class.c (build_vbase_offset_vbtl_entries): Look for
4323 non-primary base of which we are a sub vtable.
4325 2001-07-24 Phil Edwards <pme@sources.redhat.com>
4327 * semantics.c (finish_this_expr): Remove unused code.
4329 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
4331 Simplify rtti, now we've only one ABI.
4332 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
4334 (tinfo_decl_id, tinfo_var_id): Remove.
4335 (get_typeid_1): Remove.
4337 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
4338 (typeid_ok_p): New function.
4339 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
4340 (get_tinfo_decl): Remove old abi documentation.
4341 (tinfo_from_decl): Remove.
4342 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
4343 (get_typeid_1): Remove.
4344 (get_base_offset): Remove.
4345 (synthesize_tinfo_var): Absorb get_base_offset.
4346 (create_real_tinfo_var): Don't use tinfo_decl_id.
4348 2001-07-23 Graham Stott <grahams@redhat.com>
4350 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
4351 variable has_two_argument_delete_p.
4353 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
4355 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
4356 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
4357 (CPTI_INDEX_IDENTIFIER): Remove.
4358 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
4359 (delta2_identifier): Remove.
4360 (index_identifier): Remove.
4361 (pfn_or_delta2_identifier): Remove.
4362 (flag_vtable_thunks): Remove.
4363 (VTABLE_DELTA2_NAME): Remove.
4364 (VTABLE_INDEX_NAME): Remove.
4365 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
4366 (vfunc_ptr_type_node): Adjust.
4367 (VTABLE_NAME_PREFIX): Adjust.
4368 (build_vfn_ref): Lose first parameter.
4369 (fixup_all_virtual_upcast_offsets): Remove.
4370 * decl.c (initialize_predefined_identifiers): Remove
4371 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
4372 (init_decl_processing): Remove no-vtable-thunk code.
4373 * decl2.c (flag_vtable_thunks): Remove.
4374 (mark_vtable_entries): Remove no-vtable-thunk code.
4375 * error.c (dump_decl): Remove no-vtable-thunk code.
4376 (dump_expr): Adjust ptr to member function code.
4377 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
4379 * rtti.c (build_headof): Remove no-vtable-thunk code.
4380 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
4381 * search.c (get_base_distance): Remove expand_upcast_fixups case.
4382 (virtual_context) Remove.
4383 (expand_upcast_fixups): Remove.
4384 (fixup_virtual_upcast_offsets): Remove.
4385 (fixup_all_virtual_upcast_offsets): Remove.
4386 * typeck.c (get_member_function_from_ptrfunc): Remove
4387 no-vtable-thunk code.
4388 * call.c (build_over_call): Adjust call to build_vfn_ref.
4389 * class.c (build_vfn_ref): Lose first parameter. Remove
4390 no-vtable-thunk code.
4391 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
4392 (build_vtable_entry): Remove no-vtable-thunk code.
4394 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
4396 Remove old-abi remnants. Remove comments about old abi
4397 behaviour. Remove references to 'new-abi' in comments.
4398 * cp-tree.h: Adjust comments.
4399 (vbase_offsets_in_vtable_p): Delete.
4400 (vcall_offsets_in_vtable_p): Delete.
4401 (vptrs_present_everywhere_p): Delete.
4402 (all_overridden_vfuns_in_vtables_p): Delete.
4403 (merge_primary_and_secondary_vtables_p): Delete.
4404 (TYPE_CONTAINS_VPTR_P): Adjust.
4405 (VTT_NAME_PREFIX): Remove.
4406 (CTOR_VTBL_NAME_PREFIX): Remove.
4407 (init_vbase_pointers): Remove.
4408 * class.c: Adjust coments.
4409 (build_vbase_pointer_fields): Delete.
4410 (build_vbase_pointer): Remove old-abi code.
4411 (build_secondary_vtable): Likewise.
4412 (modify_all_vtables): Likewise.
4413 (create_vtable_ptr): Likewise.
4414 (layout_class_type): Likewise.
4415 (finish_struct_1): Likewise.
4416 (finish_vtbls): Likewise.
4417 (dfs_finish_vtbls): Delete.
4418 (build_vbase_offset_vtbl_entries): Remove old-abi code.
4419 * cvt.c: Adjust comments.
4420 * decl.c: Adjust comments.
4421 * decl2.c: Adjust comments.
4422 * init.c: Adjust comments.
4423 (construct_virtual_bases): Remove old-abi code.
4424 * lang-specs.h: Remove -fno-new-abi.
4425 * mangle.c: Adjust comments.
4426 * rtti.c: Adjust comments.
4427 (get_base_offset): Remove old-abi-code.
4428 * search.c: Adjust comments.
4429 (dfs_init_vbase_pointers): Remove.
4430 (dfs_vtable_path_unmark): Remove.
4431 (init_vbase_pointers): Remove.
4432 * semantics.c: Adjust comments.
4433 (emit_associated_thunks): Remove old-abi code.
4434 * typeck.c: Adjust comments.
4436 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
4438 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
4441 2001-07-19 Mark Mitchell <mark@codesourcery.com>
4443 * class.c (finish_struct_anon): Forbid nested classes.
4445 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
4447 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
4448 * optimize.c: Include debug.h.
4449 (maybe_clone_body): Use debug hook.
4450 * semantics.c: Include debug.h.
4451 (expand_body): Use debug hook.
4453 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
4455 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
4457 2001-07-18 Mark Mitchell <mark@codesourcery.com>
4459 * class.c (type_requires_array_cookie): New function.
4460 (check_methods): Don't try to figure out whether the type needs a
4462 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
4463 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
4464 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
4465 * pt.c (instantiate_class_template): Don't set
4466 TYPE_VEC_DELETE_TAKES_SIZE.
4467 * NEWS: Document ABI changes from GCC 3.0.
4469 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
4470 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
4472 * NEWS (Changes in GCC 3.0): Fix typo.
4474 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
4476 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
4477 which attributes are to be attached, and a flags argument. Update
4478 call to decl_attributes.
4479 (grokfield): Update call to decl_attributes.
4480 * class.c (finish_struct): Update call to cplus_decl_attributes.
4481 * cp-tree.h (cplus_decl_attributes): Update prototype.
4482 * decl.c (start_decl, grokdeclarator, start_function): Update
4483 calls to decl_attributes and cplus_decl_attributes.
4484 * friend.c (do_friend): Update call to cplus_decl_attributes.
4485 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
4487 2001-07-12 Mark Mitchell <mark@codesourcery.com>
4489 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
4490 for `register' variables with an asm-specification.
4492 2001-07-11 Mark Mitchell <mark@codesourcery.com>
4494 * semantics.c (finish_asm_stmt): Mark the output operands
4495 to an asm addressable, if necessary.
4497 2001-07-11 Ben Elliston <bje@redhat.com>
4499 * Revert this change -- there is a subtle bug.
4502 * decl.c (finish_enum): New "attributes" argument; pass it to
4503 cplus_decl_attributes. Use a narrower type if the enum is packed.
4504 * cp-tree.h (finish_enum): Adjust prototype.
4505 * parse.y (enum_head): New non-terminal.
4506 (structsp): Use it. Enums now may be preceded or followed by
4507 optional attributes -- pass their chained tree to finish_enum().
4508 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
4510 2001-07-10 Mark Mitchell <mark@codesourcery.com>
4512 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
4515 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
4517 * semantics.c (cp_expand_stmt): Fix for null
4518 current_function_return_value.
4520 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
4522 * call.c (build_op_delete_call): Initialize fn.
4523 (convert_like_real): Delete conditional.
4524 (joust): Initialize *w and *l.
4525 * class.c: Add prototype for binfo_ctor_vtable.
4526 (get_primary_binfo): Initialize result.
4527 * init.c (build_java_class_ref): Initialize name.
4529 2001-07-09 Erik Rozendaal <dlr@acm.org>
4531 * typeck.c (unary_complex_lvalue): Do not duplicate the
4532 argument to modify, pre-, or post-increment when used as an
4533 lvalue and when the argument has side-effects.
4535 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
4537 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
4538 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
4539 cplus_decl_attributes even if attrs is NULL.
4540 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
4542 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
4544 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
4545 calls to decl_attributes.
4547 2001-07-06 Ira Ruben <ira@apple.com>
4549 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
4550 be DECL_TEMPLATE_RESULT.
4552 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4554 * cp-tree.h (copy_template_template_parm): Rename to ...
4555 (bind_template_template_parm): ... here.
4556 * tree.c (copy_template_template_parm): Rename to ...
4557 (bind_template_template_parm): ... here. Remove the case when
4558 NEWARGS is NULL_TREE.
4559 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
4560 BOUND_TEMPLATE_TEMPLATE_PARM.
4561 * pt.c (lookup_template_class): Adjust.
4563 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
4565 * cvt.c (convert_lvalue): New fn.
4566 * cp-tree.h: Declare it.
4567 * method.c (do_build_assign_ref): Use it.
4568 (do_build_copy_constructor): Convert parm to base types
4569 before calling base constructors.
4571 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
4572 DECL_USER_ALIGN. Check flag_elide_constructors instead of
4574 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
4576 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
4578 * optimize.c (optimize_inline_calls): New function, broken out
4580 (optimize_function): ... here. Call it. Don't inline if it is
4582 (dump_function): Print name of dump flag causing this dump.
4583 * semantics.c (expand_body): Move thunk inline check to
4586 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
4588 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
4589 (comptypes): Use target.comp_type_attributes.
4591 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
4593 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
4595 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4597 * error.c (lang_print_error_function): Add a `diagnostic_context *'
4600 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4602 * decl2.c (import_export_class): Update.
4604 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
4606 * error.c (init_error): Adjust settings.
4608 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
4610 * error.c (init_error): Adjust settings.
4612 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
4614 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
4615 return pointers to data members by reference rather than by value.
4617 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
4619 Implement the Named Return Value optimization.
4620 * cp-tree.h (struct cp_language_function): Add x_return_value.
4621 (current_function_return_value): Now a macro.
4622 * decl.c: Don't define it.
4623 (define_label, finish_case_label): Don't clear it.
4624 (init_decl_processing): Don't register it with GC.
4625 * semantics.c (genrtl_finish_function): Don't check it for
4626 no_return_label. Copy the RTL from the return value to
4627 current_function_return_value and walk, calling...
4628 (nullify_returns_r): ...this new fn.
4629 * typeck.c (check_return_expr): Set current_function_return_value.
4631 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
4633 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
4634 sharing a ctor vtable with. Merge code for cases 1 and 2.
4635 (binfo_ctor_vtable): New fn.
4636 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
4638 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
4640 * class.c (dfs_find_final_overrider): Fix logic.
4642 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
4643 virtual thunk instead of non-virtual.
4644 (get_matching_virtual): Uncomment.
4646 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
4647 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
4650 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
4652 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
4653 we've not emerged from the hierarchy of RTTI_BINFO on reaching
4656 2001-06-13 Mark Mitchell <mark@codesourcery.com>
4658 * NEWS: Update release number.
4660 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
4662 PR c++/3130, c++/3131, c++/3132
4663 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
4664 * class.c (force_canonical_binfo_r): Move
4665 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
4666 virtual bases unless they're primary and what they're primary
4668 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
4669 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
4670 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
4672 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
4673 (layout_nonempty_base_or_field): Add most derived type
4675 (layout_empty_base): Likewise.
4676 (build_base_field): Likewise.
4677 (build_base_fields): Likewise.
4678 (propagate_binfo_offsets): Add most derived type
4679 parameter. Skip non canonical virtual bases too.
4680 (dfs_set_offset_for_unshared_vbases): Don't skip primary
4681 bases. Do skip canonical bases.
4682 (layout_virtual_bases): Adjust.
4683 (layout_class_type): Adjust.
4684 (dfs_get_primary_binfo): Build list of virtual primary base
4686 (get_primary_binfo): Check that the shared virtual primary
4687 base candidate was found first.
4688 (accumulate_vtbl_inits): Don't do anything for non-vptr
4689 containing binfos. For case 1 primary virtual bases, keep
4690 checking that we've not emerged from the hierarchy of RTTI_BINFO.
4692 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
4695 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
4696 hierarchy looking for primary bases for a ctor
4697 vtable. Recursively call oneself, if we meet our primary via
4698 this route and haven't met it yet via inheritance graph order.
4700 2001-06-11 Mark Mitchell <mark@codesourcery.com>
4702 * lang-options.h: Emit documentation for -fno-honor-std, not
4705 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
4707 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
4708 Don't clobber delta.
4709 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
4711 2001-06-10 Mark Mitchell <mark@codesourcery.com>
4712 Gabriel Dos Reis <gdr@codesourcery.com>
4714 * Make-lang.in (cp/call.o): Depend on diagnostic.h
4715 (cp/typeck.o): Depend on diagnostic.h
4716 (cp/typeck2.o): Depend on diagnostic.h
4717 (cp/repo.o): Depend on dignostic.h
4718 * typeck.c: #include diagnostic.h
4719 (convert_for_initialization): Remove extern declaration for
4720 warningcount and errorcount.
4722 * call.c: #include diagnostic.h
4723 (convert_like_real): Remove extern declaration for warnincount and
4726 * repo.c: #include diagnostic.h
4727 * typeck2.c: #include diagnostic.h
4729 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
4731 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
4734 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
4737 * friend.c (do_friend): Use push_decl_namespace for classes at
4740 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
4741 Jason Merrill <jason_merrill@redhat.com>
4744 * class.c (build_secondary_vtable): Use assert, rather than an error
4746 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
4747 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
4748 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
4749 Don't set BINFO_VTABLE for a primary virtual base.
4751 2001-06-07 Mark Mitchell <mark@codesourcery.com>
4753 * decl.c (duplicate_decls): Update source position information
4754 when a template function is defined.
4756 2001-06-07 Phil Edwards <pme@sources.redhat.com>
4758 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
4760 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
4763 * decl.c (pushtag): Don't push into a complete type's scope.
4765 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
4767 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
4768 (struct lang_decl_flags): Lose generate_with_vtable_p.
4769 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
4770 * class.c (copy_virtuals): Adjust.
4771 * decl2.c (mark_vtable_entries): Adjust.
4772 * method.c (make_thunk, build_vtable_entry): Adjust.
4773 * class.c (update_vtable_entry_for_fn): Only look as far as the
4774 first defining class.
4775 (build_vtbl_initializer): Put nothing in the slot for a function only
4776 defined in a lost primary virtual base.
4777 (add_vcall_offset_vtbl_entries_1): Use the same code for
4778 the lost primary case and the normal case.
4779 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
4780 (get_vfield_offset, get_derived_offset): Lose.
4781 (dfs_find_final_overrider): Use look_for_overrides_here.
4782 (get_matching_virtual): New fn.
4783 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
4785 * search.c (look_for_overrides_here): Split out from...
4786 (look_for_overrides_r): Here.
4788 * class.c (find_final_overrider): Return error_mark_node on error.
4790 * decl2.c (key_method): #if 0 accidental change.
4792 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
4794 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
4795 (build_over_call): Likewise.
4796 * decl.c (grokparms): Likewise.
4797 * pt.c (tsubst_decl): Likewise.
4798 * typeck.c (convert_arguments): Likewise.
4800 2001-06-05 Mark Mitchell <mark@codesourcery.com>
4802 * semantics.c (begin_class_definition): Robustify.
4804 * pt.c (instantiate_decl): Tell the repository code about the
4805 clones, not the cloned functions.
4806 * repo.c (repo_template_used): Explicitly instantiate the cloned
4807 function, not the clones.
4809 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4811 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
4812 ICS_BAD_FLAG on created conversion.
4813 (compare_ics): Break out rank.
4815 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4817 * decl.c (xref_tag): Remove extraneous %s on dependent name
4820 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4822 * class.c (layout_vtable_decl): Fix off by one error on
4824 (build_vtt): Likewise.
4825 (build_ctor_vtbl_group): Likewise.
4827 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4829 * class.c (maybe_indent_hierarchy): New function.
4830 (dump_class_hierarchy_r): Add flags. Dump extra binfo
4831 information, if enabled. Use maybe_indent_hierarchy. Adjust
4833 (dump_class_hierarchy): Adjust prototype. Adjust output format.
4834 (dump_array, dump_vtable, dump_vtt): New functions.
4835 (finish_struct_1): Adjust hierarchy dumping.
4836 (initialize_vtable): Call dump_vtable.
4837 (build_vtt): Call dump_vtt.
4838 (build_ctor_vtbl_group): Call dump_vtable.
4839 * decl2.c (flag_dump_class_layout): Remove.
4840 (cxx_decode_option): Remove dump translation unit
4841 and dump class hierarchy check. Call dump_switch_p.
4842 (finish_file): Adjust dumping.
4843 (dump.c): Only dump base classes if not TDF_SLIM.
4844 Only dump namespace members if not TDF_SLIM.
4845 * optimize.c (dump_function): New function.
4846 (optimize_function): Call dump_function.
4847 * semantics.c (expand_body): Use dump_enabled_p.
4849 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
4852 Part missed from first commit
4853 * decl2.c (finish_anon_union): Copy context.
4855 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
4858 * optimize.c (remap_decl): Remap anonymous aggregate members too.
4860 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
4863 * semantics.c (expand_body): Don't optimize thunks.
4865 2001-05-25 Sam TH <sam@uchicago.edu>
4867 * cp-tree.h lex.h: Fix header include guards.
4869 2001-05-25 Mark Mitchell <mark@codesourcery.com>
4871 * decl.c (init_decl_processing): Tweak.
4873 2001-05-24 Mark Mitchell <mark@codesourcery.com>
4875 * decl.c (duplicate_decls): Tidy.
4876 (init_decl_processing): Always set flag_no_builtin.
4878 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
4881 * decl2.c (do_local_using_decl): Push the decls, even in a
4884 2001-05-22 Mark Mitchell <mark@codesourcery.com>
4886 * optimize.c (initialize_inlined_parameters): Don't set
4887 TREE_READONLY for a VAR_DECL taking the place of an inlined
4890 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
4892 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
4893 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
4896 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
4898 * parse.y: Refer to compound literals as such, not as
4899 constructor-expressions.
4901 2001-05-21 Mark Mitchell <mark@codesourcery.com>
4903 * call.c (build_op_delete_call): Ignore exception-specifications
4904 when looking for matching delete operators.
4905 * init.c (build_new_1): Compute whether or not the allocation
4906 function used is a placement allocation function or not, and
4907 communicate this information to build_op_delete_call.
4909 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
4911 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
4912 (build_vtbl_ref): Adjust.
4913 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
4914 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
4916 (unsupported_options): Correspondingly.
4918 * decl2.c (maybe_make_one_only): Check flag_weak, not
4919 supports_one_only().
4921 * cp-tree.def (START_CATCH_STMT): Lose.
4922 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
4923 * tree.c (cp_statement_code_p): Don't case it.
4924 * semantics.c (cp_expand_stmt): Likewise.
4925 * cp-tree.h (START_CATCH_TYPE): Lose.
4926 (HANDLER_TYPE): New.
4927 * except.c (expand_start_catch_block): Don't start any blocks.
4929 (expand_end_catch_block): Don't end any blocks.
4930 * parse.y (handler): Don't pass anything from finish_handler_parms
4932 * pt.c (tsubst_expr): Likewise.
4933 * semantics.c (begin_handler): Call note_level_for_catch here.
4934 (finish_handler_parms): Don't return anything.
4935 (genrtl_catch_block, begin_catch_block): Lose.
4936 (genrtl_handler): Call expand_start_catch here.
4938 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
4940 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
4941 (get_vtable_decl, build_vtt): Not here.
4943 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
4946 * optimize.c (update_cloned_parm): Copy addressability and other
4949 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4951 * pt.c (determine_specialization): Ignore artificial functions.
4953 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
4955 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
4956 (C_RID_CODE): Remove.
4957 * lex.c (cxx_init_options): Call set_identifier_size. Update.
4958 (init_parse): Don't do it here.
4960 2001-05-18 Diego Novillo <dnovillo@redhat.com>
4962 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
4963 function declaration to avoid stripping the symbol's attributes.
4965 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
4967 * decl.c (pushdecl): Adjust error string.
4968 (xref_tag): Adjust friend class injection warning. Remove the
4969 inherited name from the class shadowed scope.
4971 2001-05-17 Mark Mitchell <mark@codesourcery.com>
4973 * except.c (cp_protect_cleanup_actions): New function.
4974 (init_exception_processing): Don't set protect_cleanup_actions
4975 here. Do set lang_protect_cleanup_actions.
4977 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
4979 * spew.c (read_token): Call yyerror on all unexpected tokens.
4981 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
4983 * init.c (member_init_ok_or_else): Take a tree rather than
4985 (expand_member_init): Adjust.
4987 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
4989 * decl.c (duplicate_decls): Suppress warning about duplicate
4990 decls if the first decl is a friend.
4992 2001-05-12 Zack Weinberg <zackw@stanford.edu>
4994 * except.c (choose_personality_routine): Export. Add
4995 explanatory comment. Take an enum languages, not a boolean.
4996 (initialize_handler_parm): Adjust to match.
4997 * cp-tree.h: Prototype choose_personality_routine.
4998 * lex.c (handle_pragma_java_exceptions): New function.
4999 (init_cp_pragma): Register #pragma GCC java_exceptions.
5001 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5003 * method.c (build_mangled_C99_name): Remove unused prototype.
5005 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
5007 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
5008 * typeck.c (get_member_function_from_ptrfunc,
5009 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
5010 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
5012 Reverted Geoff Keating's 2001-05-03's patch.
5014 2001-05-11 Ira Ruben <ira@apple.com>
5016 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
5018 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
5020 * cp-tree.h (finish_label_expr, lookup_label): Delete.
5021 * parse.y: Update for '&&'; don't issue warning here.
5022 * semantics.c (finish_label_expr): Delete.
5024 2001-05-07 Mark Mitchell <mark@codesourcery.com>
5026 * splay-tree.h (splay_tree_max): New function.
5027 (splay_tree_min): Likewise.
5029 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
5031 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
5032 (pfn_vflag_identifier): Define.
5033 Update comment about layout of pointer functions.
5034 (build_ptrmemfunc1): Update prototype.
5035 (expand_ptrmemfunc_cst): Update prototype.
5036 * decl.c (initialize_predefined_identifiers): Initialize
5037 pfn_vflag_identifier.
5038 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
5039 an extra field to the type.
5040 * expr.c (cplus_expand_constant): Pass 'flag' between
5041 expand_ptrmemfunc_cst and build_ptrmemfunc1.
5042 * typeck.c (get_member_function_from_ptrfunc): When
5043 FUNCTION_BOUNDARY < 16, look at additional field to determine
5044 if a pointer-to-member is a real pointer or a vtable offset.
5045 (build_ptrmemfunc1): Add new parameter to contain extra field.
5046 (build_ptrmemfunc): Pass the extra field around.
5047 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
5048 (pfn_from_ptrmemfunc): Ignore the extra field.
5050 2001-05-03 Mark Mitchell <mark@codesourcery.com>
5052 * cp-tree.h (flag_inline_trees): Update documentation.
5053 * decl.c (init_decl_processing): Adjust handling of
5054 flag_inline_functions and flag_inline_trees to support -O3.
5055 (grokfndecl): Set DECL_INLINE on all functions if that's what
5057 (save_function_data): Clear DECL_INLINE in
5058 current_function_cannot_inline is non-NULL.
5059 * decl2.c (flag_inline_trees): Update documentation.
5061 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
5063 * dump.c (cp_dump_tree, USING_STMT case): New case.
5064 * tree.c (cp_statement_code_p): Add USING_STMT.
5065 * decl2.c (do_using_directive): Add the using directive statement.
5067 * tree.c (walk_tree): Reformat an if block.
5069 2001-05-02 Mark Mitchell <mark@codesourcery.com>
5071 * decl.c (compute_array_index_type): Don't try to do anything with
5072 the indices when processing a template.
5074 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5076 * call.c: NULL_PTR -> NULL.
5077 * class.c: Likewise.
5080 * decl2.c: Likewise.
5081 * except.c: Likewise.
5084 * search.c: Likewise.
5086 * typeck.c: Likewise.
5087 * typeck2.c: Likewise.
5089 2001-05-02 Mark Mitchell <mark@codesourcery.com>
5091 * decl2.c (do_using_directive): Revert previous patch.
5093 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5095 * cp-tree.def (USING_STMT): New statement node.
5096 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
5097 * decl2.c (do_using_directive): Add USING_STMT to statement
5098 tree. Don't emit errors when processing template decl.
5099 * pt.c (tsubst_expr, USING_STMT case): New case.
5100 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
5102 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5104 * call.c (build_new_op): Convert args from reference here.
5105 (build_conditional_expr): Don't convert here.
5107 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5109 * spew.c (last_token_id): New static variable.
5110 (read_token): Set it here.
5111 (yyerror): Use it here.
5113 2001-04-30 Richard Henderson <rth@redhat.com>
5115 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
5118 2001-04-30 Mark Mitchell <mark@codesourcery.com>
5120 * gxxint.texi: Remove.
5121 * Make-lang.in: Remove all traces of gxxint.texi.
5123 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
5125 * decl2.c (start_static_initialization_or_destruction): Correct
5126 logic to handle the -fno-use-cxa-atexit case.
5128 2001-04-30 Mark Mitchell <mark@codesourcery.com>
5130 * optimize.c (update_cloned_parm): New function.
5131 (maybe_clone_body): Use it. Update the `this' parameter too.
5133 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
5135 * decl2.c (unsupported_options): Add new-abi.
5136 * lang-options.h: Remove no longer supported options.
5138 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5140 * except.c (can_convert_eh): Don't check template parms,
5143 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5145 * optimize.c (maybe_clone_body): Copy parameter names and locations.
5147 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5149 * cp-tree.h (adjust_clone_args): Prototype new function.
5150 * class.c (adjust_clone_args): New function.
5151 * decl.c (start_function): Call it for in charge ctors.
5153 2001-04-26 Mark Mitchell <mark@codesourcery.com>
5155 * method.c (use_thunk): Make sure that thunks really are emitted
5158 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
5160 * mangle.c (write_chars): New macro.
5161 (hwint_to_ascii): New function
5162 (write_number): Use it.
5163 (write_integer_cst): Deal with really big numbers.
5165 2001-04-25 Mark Mitchell <mark@codesourcery.com>
5167 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
5170 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
5172 * decl.c (grokdeclarator): Set context of namespace scope
5175 2001-04-24 Zack Weinberg <zackw@stanford.edu>
5177 * cp/optimize.c: Include hashtab.h.
5178 (struct inline_data): Add tree_pruner.
5179 (expand_call_inline, expand_calls_inline): Use it when calling
5181 (optimize_function): Initialize and free tree_pruner.
5183 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
5185 Lazy __FUNCTION__ generation.
5186 * cp-tree.def (FUNCTION_NAME): Remove.
5187 * cp-tree.h (function_name_declared_p): Remove.
5188 (cp_fname_init): Prototype.
5189 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
5190 don't call declare_function_name. Call start_fname_decls.
5191 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
5192 clobber the line number.
5193 (cp_fname_init): New function.
5194 (start_function): Call start_fname_decls.
5195 (finish_function): Call finish_fname_decls.
5196 * lex.c (reswords): Add slots for __FUNCTION__ et al.
5197 (rid_to_yy): Add mappings for __FUNCTION__ et al.
5198 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
5199 * parse.y (VAR_FUNC_NAME): New token.
5200 (primary): Add VAR_FUNC_NAME.
5201 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
5203 (tsubst, FUNCTION_NAME case): Remove.
5204 (tsubst_copy, FUNCTION_NAME case): Remove.
5205 (tsubst_expr, DECL_STMT case): Be careful with a
5206 DECL_PRETTY_FUNCTION_P.
5207 (instantiate_decl): Remove function_name_declared_p.
5208 * semantics.c (begin_compound_statement): Don't call
5209 declare_function_name here.
5210 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
5211 (finish_translation_unit): Call finish_fname_decls.
5212 (expand_body): Remove function_name_declared_p.
5213 * typeck2.c (digest_init): Allow any ERROR_MARK.
5215 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
5217 * pt.c (tsubst_decl): Use VOID_TYPE_P.
5218 * semantics.c: Fix some typos.
5220 2001-04-23 Phil Edwards <pme@sources.redhat.com>
5222 * cp/decl2.c (flag_honor_std): Always initialize to 1.
5224 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5226 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
5228 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
5230 * except.c (build_throw): Wrap the initialization of the exception
5231 object in a MUST_NOT_THROW_EXPR.
5232 (do_free_exception): #if 0.
5234 2001-04-20 Mark Mitchell <mark@codesourcery.com>
5236 * cp-tree.h (finish_enum): Change prototype.
5237 * decl.c (finish_enum): Reorganize.
5238 * parse.y (structsp): Adjust calls to finish_enum.
5240 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
5242 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
5245 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
5247 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
5248 (layout_empty_base): Return at end flag.
5249 (build_base_field): Likewise.
5250 (build_base_fields): Likewise.
5251 (layout_virtual_bases): Don't add 1 to eoc value.
5252 (end_of_class): Use full size for empty bases.
5253 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
5254 empty bases. Don't add 1 to eoc value. Only add trailing padding
5255 if we're an empty class with no empty bases.
5256 (dump_class_hierarchy): Dump size and alignment.
5258 2001-04-20 Jakub Jelinek <jakub@redhat.com>
5260 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
5263 2001-04-20 Jakub Jelinek <jakub@redhat.com>
5265 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
5266 is found, look first if name does not match the structure name.
5268 2001-04-19 Mark Mitchell <mark@codesourcery.com>
5270 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
5272 (SET_DECL_LANGUAGE): New macro.
5273 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
5274 (pushdecl): Likewise.
5275 (build_library_fn_1): Likewise.
5276 (build_cp_library_fn): Likewise.
5277 (grokfndecl): Likewise.
5278 (grokvardecl): Mark `extern "C"' variables as having C linkage.
5279 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
5280 * lex.c (retrofit_lang_decl): Likewise.
5281 * mangle.c (mangle_decl_string): Don't mangle the names of
5282 variables declared with C language linkage.
5283 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
5285 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
5287 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
5288 flag_access_control from uninitialized storage.
5290 2001-04-15 Mark Mitchell <mark@codesourcery.com>
5292 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
5293 * mangle.c (write_pointer_to_member_type): Fix mangling of
5294 pointers to cv-qualified member function types.
5296 * init.c (build_delete): Create a SAVE_EXPR for the address if
5297 we're going to use it more than once.
5299 2001-04-13 Mark Mitchell <mark@codesourcery.com>
5301 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
5302 (expand_ptremfunc_cst): Change prototype.
5303 (delta2_from_ptrmemfunc): Remove.
5304 * expr.c (cplus_expand_constant): Adjust call to
5305 expand_ptrmemfunc_cst.
5306 * typeck.c (build_ptrmemfunc1): Simplify.
5307 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
5308 results in a constant.
5309 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
5310 (delta2_from_ptrmemfunc): Remove.
5311 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
5313 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
5315 * cp-tree.h (decl_namespace_list): New macro.
5316 (struct saved_scope): Add decl_ns_list.
5317 * decl.c (mark_saved_scope): Mark it.
5318 * decl2.c: Lose static decl_namespace_list.
5319 (init_decl2): Don't save it.
5321 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5323 * cp-tree.h (warn_return_type, yylex): Delete redundant
5326 * decl.c (current_class_depth, global_namespace): Likewise.
5328 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
5330 * repo.c (flag_use_repository): Likewise.
5332 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5334 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
5335 set_block, pushdecl, getdecls, gettags, init_decl_processing,
5336 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
5337 lvalue_or_else, print_lang_statistics, comp_target_types,
5338 unsigned_type, signed_type, signed_or_unsigned_type,
5339 build_function_call, mark_addressable, incomplete_type_error):
5340 Delete redundant declarations.
5342 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
5344 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
5345 (TYPE_ANONYMOUS_P): New macro.
5346 (TAGGED_TYPE_P): New macro.
5347 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
5348 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
5349 * tree.c (no_linkage_helper): Likewise.
5350 * semantics.c (begin_class_definition): Likewise.
5351 * pt.c (convert_template_argument): Likewise.
5352 * lex.c (check_for_missing_semicolon): Likewise.
5354 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
5356 * class.c (dfs_unshared_virtual_bases): New function.
5357 (mark_primary_bases): Call it.
5358 (check_bases): Ignore virtual bases when determining
5361 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
5363 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
5365 2001-04-11 Mark Mitchell <mark@codesourcery.com>
5367 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
5368 cloned function to the clone.
5370 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5372 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
5374 * semantics.c: Include expr.h.
5376 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
5378 * method.c (implicitly_declare_fn): Commonize code for copy ctor
5379 and assignment op. Set TREE_USED for parameter.
5381 2001-04-10 Mark Mitchell <mark@codesourcery.com>
5383 * class.c (find_final_overrider_data): Add `candidates'.
5384 (dfs_find_final_overrider): Don't issue error messages
5386 (find_final_overrider): Issue error messages here.
5387 (build_base_field): Don't warn about amgibuous direct bases here.
5388 (warn_about_ambiguous_direct_bases): New function.
5389 (layout_class_type): Use it.
5391 2001-04-10 Richard Henderson <rth@redhat.com>
5393 * typeck.c (build_array_ref): Push the array reference inside
5394 COMPOUND_EXPR and COND_EXPR.
5396 2001-04-05 Mark Mitchell <mark@codesourcery.com>
5398 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
5399 * decl.c (duplicate_decls): Adjust accordingly.
5400 (maybe_commonize_var): Likewise.
5401 (grokfndecl): Likewise.
5402 (start_function): Likewise.
5403 (start_method): Likewise.
5404 * decl2.c (key_method): Likewise.
5405 (import_export_decl): Likewise.
5406 * method.c (implicitly_declare_fn): Likewise.
5407 * optimize.c (maybe_clone_body): Likewise.
5409 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
5411 * lang-specs.h: Add __DEPRECATED.
5413 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
5415 * search.c (get_dynamic_cast_base_type): When building a new
5416 constant, set its type to ssizetype.
5418 2001-04-04 Jakub Jelinek <jakub@redhat.com>
5420 * optimize.c (expand_call_inline): Only add newly inlined statements
5423 2001-04-03 Mark Mitchell <mark@codesourcery.com>
5425 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
5426 (OPERATOR_FORMAT): Likewise.
5427 (OPERATOR_TYPENAME_FORMAT): Likewise.
5428 * operators.def: Remove old name-mangling information.
5429 * decl.c (grok_op_properties): Adjust accordingly.
5430 * lex.c (init_operators): Likewise.
5431 * rtti.c (get_tinfo_decl): Issue error messages about types that
5434 2001-04-03 Mark Mitchell <mark@codesourcery.com>
5436 * decl2.c (import_export_decl): Don't call import_export_class
5437 when processing an inline member function.
5438 * semantics.c (expand_body): Call import_export_decl before
5439 emitting inline functions.
5441 2001-03-28 Richard Henderson <rth@redhat.com>
5443 IA-64 ABI Exception Handling:
5444 * cp-tree.def (EH_SPEC_BLOCK): New.
5445 (MUST_NOT_THROW_EXPR): New.
5446 * cp-tree.h: Update changed function declarations.
5447 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
5448 (CPTI_CALL_UNEXPECTED): New.
5449 (struct cp_language_function): Rename x_eh_spec_try_block
5451 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
5452 * decl.c (current_binding_level): If no current function
5453 bindings, revert to scope_chain.
5454 (initialize_predefined_identifiers): Remove __cp_push_exception.
5455 (store_parm_decls): Use begin_eh_spec_block.
5456 (finish_function): Use finish_eh_spec_block.
5457 (mark_lang_function): Update for name changes.
5458 * decl2.c (finish_file): No mark_all_runtime_matches.
5459 * dump.c (cp_dump_tree): Handle new tree codes.
5460 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
5461 * except.c (catch_language_init, catch_language): Remove.
5462 (init_exception_processing): Don't set language code.
5463 Initialize call_unexpected_node, protect_cleanup_actions,
5464 eh_personality_libfunc, lang_eh_runtime_type.
5465 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
5466 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
5467 (prepare_eh_type): Split out type canonicalizations ...
5468 (build_eh_type_type): ... from here.
5469 (build_eh_type_type_ref): Remove.
5470 (mark_all_runtime_matches): Remove.
5471 (build_exc_ptr): New.
5472 (do_begin_catch, do_end_catch): New.
5473 (do_pop_exception): Remove.
5474 (build_terminate_handler): Remove.
5475 (choose_personality_routine): Split out language choice from ...
5476 (initialize_handler_parm): ... here.
5477 Use MUST_NOT_THROW_EXPR.
5478 (expand_start_catch_block): Use do_begin_catch. Simplify Java
5479 exception object handling.
5480 (expand_start_eh_spec, expand_end_eh_spec): Remove.
5481 (expand_exception_blocks, alloc_eh_object): Remove.
5482 (begin_eh_spec_block, finish_eh_spec_block): New.
5483 (do_allocate_exception, do_free_exception): New.
5484 (expand_throw): Merge into ...
5485 (build_throw): ... here. Update for abi.
5486 * expr.c (cplus_expand_expr): No expand_internal_throw.
5487 Handle MUST_NOT_THROW_EXPR.
5488 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
5489 * semantics.c (*) Update for except.h name changes.
5490 (genrtl_try_block): No protect_with_terminate.
5491 (genrtl_eh_spec_block): New.
5492 (genrtl_handler): Don't emit the goto here.
5493 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
5494 (genrtl_finish_function): Don't expand_exception_blocks.
5495 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
5497 2001-03-28 Richard Henderson <rth@redhat.com>
5499 * decl.c (struct named_label_list): Rename eh_region to
5500 in_try_scope, add in_catch_scope.
5501 (struct binding_level): Rename eh_region to is_try_scope,
5503 (note_level_for_try): Rename from note_level_for_eh.
5504 (note_level_for_catch): New.
5505 (poplevel): Copy both is_try_scope and is_catch_scope to
5506 the named_label_list struct.
5507 (check_previous_goto_1): Don't check for catch block via
5508 DECL_ARTIFICIAL; use in_try_scope instead.
5509 (check_goto): Likewise.
5510 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
5511 * except.c (expand_start_catch_block): Call note_level_for_catch.
5512 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
5514 2001-03-27 Richard Henderson <rth@redhat.com>
5516 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
5517 exceptions_via_longjmp.
5519 2001-03-27 Phil Edwards <pme@sources.redhat.com>
5521 * pt.c (check_default_tmpl_args): Make error messages clearer.
5523 2001-03-26 Phil Edwards <pme@sources.redhat.com>
5525 * error.c: Also undefine 'A' macro used for cp_printers definition.
5527 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5529 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5531 2001-03-26 Mike Yang <yang@research.att.com>
5532 Mark Mitchell <mark@codesourcery.com>
5534 * dump.c (dump_access): New function.
5535 (cp_dump_tree): Use it. Dump basetype information for class
5538 2001-03-26 Mark Mitchell <mark@codesourcery.com>
5540 * Makefile.in (optimize.o): Depend on params.h.
5541 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
5542 (init_decl_processing): Set flag_no_inline when doing
5544 * optimize.c: Include params.h.
5545 (struct inline_data): Improve documentation of FNS. Add
5546 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
5547 (INSNS_PER_STMT): New macro.
5548 (remap_block): Use CLONING_P.
5549 (inlinable_function_p): Don't inline big functions.
5550 (expand_call_inline): Keep track of how much inlining we've done.
5551 (optimize_function): Set FIRST_INLINED_FN.
5552 (maybe_clone_body): Set CLONING_P.
5553 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
5555 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
5556 rest_of_compilation. Clear DECL_RTL for local variables
5558 (clear_decl_rtl): New function.
5560 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
5563 * cp-tree.h (skip_type_access_control,
5564 reset_type_access_control): Prototype.
5565 * decl.c (grokdeclarator): Access of friends is not checked.
5566 * parse.y (component_decl_list): Reset type access control.
5567 * semantics.c (decl_type_access_control): Clear
5568 current_type_lookups.
5569 (save_type_access_control): Don't save if not deferring.
5570 (skip_type_access_control, reset_type_access_control): New
5572 (begin_class_definition): Do type access control for basetypes.
5573 Start deferred access control.
5574 (finish_class_definition): Resume immediate access control if
5575 this is a local class.
5577 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5579 * class.c (add_method): Use memcpy/memmove, not bcopy.
5581 * decl.c (duplicate_decls): Likewise.
5583 2001-03-23 Jakub Jelinek <jakub@redhat.com>
5585 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
5588 2001-03-23 Jakub Jelinek <jakub@redhat.com>
5590 * decl.c (local_names): Define.
5591 (push_local_name): New.
5592 (grok_reference_init): Return init if initializing static reference
5593 variable with non-constant instead of emitting it.
5594 Move expand_static_init call to cp_finish_decl.
5595 (layout_var_decl): Call push_local_name.
5596 (maybe_commonize_var): Allow inlining functions even if they have
5597 static local variables, use comdat_linkage for them if flag_weak.
5598 (check_initializer): Call obscure_complex_init if
5599 grok_reference_init returned non-zero.
5600 (save_function_data): Clear x_local_names.
5601 (pop_cp_function_context): Free x_local_names.
5602 (mark_inlined_fns): Remove.
5603 (mark_lang_function): Mark x_local_names.
5604 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
5605 Mark inlined_fns as tree, remove call to mark_inlined_fns.
5606 * class.c (alter_access): Ensure DECL_ACCESS is never set if
5607 DECL_DISCRIMINATOR_P.
5608 * cp-tree.h (cp_language_function): Add x_local_names.
5609 (lang_decl_flags): Add discriminator into u2.
5610 (lang_decl_inlined_fns): Remove.
5611 (lang_decl): inlined_fns is now a TREE_VEC.
5612 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
5613 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
5614 TREE_VEC, not a custom structure.
5615 (optimize_function): Likewise.
5616 * mangle.c (discriminator_for_local_entity): Discriminate among
5617 VAR_DECL local entities.
5618 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
5621 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
5623 Add support for Java interface method calls.
5624 * cp-tree.h (struct lang_type): Add java_interface flag.
5625 (TYPE_JAVA_INTERFACE): New macro.
5626 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
5627 by setting TYPE_JAVA_INTERFACE.
5628 * call.c (java_iface_lookup_fn): New static.
5629 (build_over_call): If calling a method declared in a
5630 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
5631 expression which resolves the function address.
5632 (build_java_interface_fn_ref): New function.
5634 2001-03-22 Richard Henderson <rth@redhat.com>
5636 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
5637 * except.c: Don't include it.
5639 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
5640 based on an idea from Joe Buck <jbuck@synopsys.com>
5642 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
5644 (data_def, component_decl): Add reductions to bad_decl.
5646 2001-03-22 Jakub Jelinek <jakub@redhat.com>
5648 * method.c (do_build_assign_ref): Don't use build_modify_expr for
5649 anonymous aggregates, since they don't have assignment operator
5651 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
5652 assignment operators for anonymous structure fields.
5654 2001-03-21 Jason Merrill <jason@redhat.com>
5656 * pt.c (instantiate_decl): Abort if we see a member constant
5657 instantiation that doesn't already have its initializer.
5658 Downgrade explicit instantiation without definition to pedwarn.
5660 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
5661 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
5662 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
5664 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
5665 (pending_vtables): Remove.
5666 * decl2.c (pending_vtables): Remove.
5667 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
5668 CLASSTYPE_VTABLE_NEEDS_WRITING.
5669 (import_export_class): Likewise.
5670 (init_decl2): Don't mark pending_vtables.
5671 * lex.c (handle_pragma_vtable): Just sorry.
5672 * pt.c (instantiate_class_template): Don't mess with
5673 CLASSTYPE_VTABLE_NEEDS_WRITING.
5674 (mark_class_instantiated): Likewise.
5675 * ptree.c (print_lang_type): Don't print it.
5676 * semantics.c (begin_class_definition): Don't set it.
5678 * pt.c (template_tail): Replace with last_pending_template.
5679 (maybe_templates, maybe_template_tail): Remove.
5680 (add_pending_template): Adjust.
5681 (instantiate_pending_templates): Adjust.
5683 * cp-tree.h (struct saved_scope): Remove lang_stack field.
5684 (current_lang_stack): Remove.
5685 * decl.c (maybe_push_to_top_level): Don't initialize it.
5686 (duplicate_decls): Use current_lang_depth.
5687 (xref_basetypes): Likewise.
5688 * class.c (current_lang_depth): New fn.
5689 (push_lang_context): Use more varray functionality.
5690 (pop_lang_context): Likewise.
5692 * error.c (GLOBAL_THING): Always use '__'.
5694 2001-03-21 Mark Mitchell <mark@codesourcery.com>
5696 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
5698 * mangle.c (mangle_decl_string): Mangle the names of overloaded
5699 operators, even when they have `extern "C"' linkage.
5701 2001-03-19 Mark Mitchell <mark@codesourcery.com>
5703 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
5704 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5705 where it's not necessary.
5706 (add_method): Remove optimization involving comparison of
5707 DECL_ASSEMBLER_NAME.
5708 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
5709 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5710 where it's not necessary.
5711 (check_methods): Likewise.
5712 (build_clone): Likewise.
5713 (built_vtt): Likewise.
5714 * cp-tree.h (DECL_NEEDED_P): Likewise.
5715 * decl.c (pushtag): Likewise.
5716 (duplicate_decls): Likewise.
5717 (pushdecl): Likewise.
5718 (builtin_function): Likewise.
5719 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
5720 (build_cp_library_fn): Likewise.
5721 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
5722 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5723 where it's not necessary.
5724 (make_rtl_for_nonlocal_decl): Likewise.
5725 (cp_finish_decl): Likewise.
5726 (grokfndecl): Likewise.
5727 (grokvardecl): Likewise.
5728 (grokdeclarator): Likewise.
5729 (start_function): Likewise.
5730 (cp_missing_return_ok_p): Likewise.
5731 * decl2.c (grokclassfn): Likewise.
5732 (check_classfn): Likewise.
5733 (finish_static_data_member_decl): Likewise.
5734 (grokfield): Likewise.
5735 * error.c (GLOBAL_IORD_P): Remove.
5736 (dump_global_iord): Improve output.
5737 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
5738 * except.c (nothrow_libfn_p): Summarily reject any function not in
5740 * init.c (build_java_class_ref): Don't explicitly set
5741 DECL_ASSEMBLER_NAME after calling mangle_decl.
5742 * mangle.c (mangle_decl_string): Handle extern "C" functions.
5743 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
5744 * method.c (set_mangled_name_for_decl): Don't explicitly set
5745 DECL_ASSEMBLER_NAME after calling mangle_decl.
5746 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
5747 IDENTIFIER_GLOBAL_VALUE for the thunk.
5748 * pt.c (set_mangled_name_for_template_decl): Remove.
5749 (check_explicit_specialization): Don't use it.
5750 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
5751 (tsubst_friend_function): Likewise.
5752 (tsubst_decl): Likewise.
5753 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
5754 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
5755 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5756 where it's not necessary.
5757 (tinfo_base_init): Likewise.
5758 (create_real_tinfo_var): Likewise.
5759 * search.c (looup_field_1): Likewise.
5760 * semantics.c (finish_named_return_value): Likewise.
5761 * tree.c (init_tree): Set lang_set_decl_assembler_name.
5763 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
5765 Correct semantics restrictions checking in throw-expression.
5766 * except.c (is_admissible_throw_operand): New function.
5767 (build_throw): Use it.
5769 2001-03-14 Mark Mitchell <mark@codesourcery.com>
5771 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
5774 2001-03-14 Mark Mitchell <mark@codesourcery.com>
5776 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5777 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
5778 * decl.c (duplicate_decls): Likewise.
5779 (builtin_function): Likewise.
5780 (build_library_fn): Likewise.
5781 (build_cp_library_fn): Likewise.
5782 (check_initializer): Likewise.
5783 (cp_finish_decl): Likewise.
5784 * decl2.c (grokfield): Likewise.
5785 (grok_function_init): Remove #if 0'd code.
5786 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5787 * friend.c (do_friend): Likewise.
5788 * init.c (get_temp_regvar): Likewise.
5789 * method.c (make_thunk): Likewise.
5790 * pt.c (tsubst_friend_function): Likewise.
5791 (tsubst_decl): Likewise.
5792 (regenerate_decl_from_template): Likewise.
5793 * semantics.c (genrtl_named_return_value): Likewise.
5794 (expand_body): Likewise.
5795 (genrtl_finish_function): Likewise.
5796 * tree.c (cp_tree_equal): Likewise.
5798 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
5800 * call.c (convert_like_real): Add extra semantics to INNER
5801 parameter. Don't convert to temporary if a user conversion
5802 gives us an lvalue that we're about to bind to a reference.
5803 Set INNER to indicate pending reference binding on recursive
5806 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
5808 * cp/lex.c: Delete duplicate pending_lang_change.
5810 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
5812 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
5814 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
5815 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
5817 2001-03-09 Zack Weinberg <zackw@stanford.edu>
5819 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
5821 2001-03-08 Stan Shebs <shebs@apple.com>
5823 * cp-tree.h (set_identifier_local_value): Remove unused decl.
5825 2001-03-06 Zack Weinberg <zackw@stanford.edu>
5827 * spew.c: Remove references to CPP_OSTRING.
5829 2001-03-06 Andrew Haley <aph@redhat.com>
5831 * typeck.c (convert_arguments): Check that we have an fndecl.
5833 2001-03-05 Andrew Haley <aph@redhat.com>
5835 * typeck.c (convert_arguments): Don't do ellipsis conversion for
5836 __built_in_constant_p.
5838 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
5840 * typeck.c (build_static_cast): Allow enum to enum conversions
5843 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
5845 * class.c (check_field_decls): Pointers to member do not a
5846 non-pod struct make, as per DR 148.
5848 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
5850 * call.c (joust): cp_pedwarn when using gnu extension concerning
5851 worst conversion sequences.
5853 2001-03-01 Zack Weinberg <zackw@stanford.edu>
5855 * decl.c: Replace all uses of 'boolean' with 'bool'.
5857 2001-03-01 Zack Weinberg <zackw@stanford.edu>
5859 * lang-specs.h: Add zero initializer for cpp_spec field to
5860 all array elements that need one. Don't put an #ifdef inside
5861 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
5864 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
5866 Implement using decls inside template functions.
5867 * decl2.c (validate_nonmember_using_decl): Don't special case
5868 fake_std_node in the global namespace. Don't reject early when
5869 processing a template.
5870 (do_local_using_decl): Add to statement tree. Don't do further
5871 processing when building a template.
5872 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
5874 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
5876 * decl2.c (do_nonmember_using_decl): Don't complain if we find
5877 same function. Do complain about ambiguating extern "C"
5880 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
5882 Remove floating point and complex type template constant parms.
5883 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
5884 COMPLEX_TYPE extensions.
5885 (invalid_nontype_parm_type_p): Likewise.
5887 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
5889 * except.c (call_eh_info): Revert "match_function"'s type.
5891 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
5893 Fix ctor vtable vcall offsets.
5894 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
5895 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
5896 (get_matching_base): Remove.
5897 (get_original_base): New function.
5898 (build_vtbl_initializer): Initialize vid.rtti_binfo.
5899 Use a virtual thunk for a ctor vtable with an index
5900 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
5901 primary base within a constructor vtable. Only set
5902 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
5903 when primary base has been lost.
5904 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
5906 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
5908 * call.c (joust): Ensure more_specialized()'s argument length
5909 parameter has correct value for constructors.
5911 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
5913 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
5915 * decl.c (mark_inlined_fns): Prototype.
5917 2001-02-22 Mark Mitchell <mark@codesourcery.com>
5919 * spew.c (yylex): Correct handling of friends.
5921 2001-02-22 Mark Mitchell <mark@codesourcery.com>
5923 * mangle.c (write_encoding): Pass write_function_type the
5924 FUNCTION_DECL for the function being encoded.
5925 (write_function_type): Pass it along to write_bare_function_type.
5926 (write_bare_function_type): Pass it along to write_method_parms.
5927 (write_method_parms): Don't mangle the compiler-generated
5928 parameters to a constructor or destructor.
5930 2001-02-22 Andreas Jaeger <aj@suse.de>
5932 * optimize.c: Include toplev.h for
5933 note_deferral_of_defined_inline_function prototype.
5935 2001-02-22 Jakub Jelinek <jakub@redhat.com>
5937 * cp-tree.h (struct lang_decl_inlined_fns): New.
5938 (struct lang_decls): Add inlined_fns.
5939 (DECL_INLINED_FNS): New macro.
5940 * optimize.c (struct inline_data): Add inlined_fns.
5941 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
5942 (inlinable_function_p): Likewise, fix typo in comment,
5943 function is not inlinable if it already inlined function currently
5945 (expand_call_inline): Add fn to inlined_fns if necessary.
5946 (optimize_function): Initialize inlined_fns.
5947 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
5948 * decl.c (mark_inlined_fns): New function.
5949 (lang_mark_tree): Call it.
5951 2001-02-21 Jason Merrill <jason@redhat.com>
5953 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
5954 (DECL_UNINLINABLE): Move to middle-end.
5956 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
5957 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
5958 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
5959 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
5960 parms and outer BLOCK. note_deferral_of_defined_inline_function.
5962 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
5965 2001-02-19 Mark Mitchell <mark@codesourcery.com>
5967 * decl2.c (set_decl_namespace): Allow explicit instantiations in
5970 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5972 * optimize.c (expand_call_inline): Don't walk subtrees of type
5975 2001-02-18 Mark Mitchell <mark@codesourcery.com>
5977 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
5980 2001-02-18 Jason Merrill <jason@redhat.com>
5982 Do put the VTT parameter in DECL_ARGUMENTS.
5983 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
5984 (current_vtt_parm): New macro.
5985 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
5986 (DECL_HAS_VTT_PARM_P): New macro.
5987 (DECL_VTT_PARM): Remove.
5988 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
5989 * decl.c (duplicate_decls): Only copy the operator code if
5991 (start_function): Set current_vtt_parm.
5992 (lang_mark_tree): Don't mark vtt_parm.
5993 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
5994 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
5995 * class.c (build_clone): Maybe remove the VTT parm.
5996 * optimize.c (maybe_clone_body): Set up the VTT parm.
5997 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
5998 * call.c (build_over_call): Just allow the VTT arg.
5999 * method.c (make_thunk): Don't set DECL_VTT_PARM.
6000 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
6001 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
6002 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
6003 * error.c (dump_function_decl): Likewise.
6004 * call.c (build_user_type_conversion_1, convert_like_real): Abort
6005 if we try to call a constructor with in-charge or VTT parms.
6006 * method.c (skip_artificial_parms_for): New fn.
6007 * call.c (add_function_candidate, build_over_call): Call it.
6008 * call.c (build_new_method_call): Use current_vtt_parm.
6009 * init.c (expand_virtual_init): Likewise.
6010 * class.c (same_signature_p): No longer static.
6011 * cp-tree.h: Declare it.
6012 * search.c (look_for_overrides_r): Use it.
6014 2001-02-17 Mark Mitchell <mark@codesourcery.com>
6016 * cp-tree.h (new_abi_rtti_p): Remove.
6017 (name_mangling_version): Likewise.
6018 (flag_do_squangling): Likewise.
6019 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
6020 * decl.c (grokfndecl): Likewise.
6021 * decl2.c (name_mangling_version): Remove.
6022 (flag_do_squangling): Likewise.
6023 (lang_f_options): Remove `squangle'.
6024 (unsupported_options): Add `squangle'.
6025 (cxx_decode_option): Issue a warning about uses of
6026 -fname-mangling-version.
6027 (finish_file): Remove old ABI support.
6028 * pt.c (check_explicit_specialization): Likewise.
6029 (tsubst_decl): Likewise.
6030 * rtti.c (init_rtti_processing): Likewise.
6031 (build_headof): Likewise.
6032 (get_tinfo_decl_dynamic): Likewise.
6033 (tinfo_from_decl): Likewise.
6034 (build_dynamic_cast_1): Likewise.
6035 (synthesize_tinfo_var): Likewise.
6036 * init.c (build_new): Allow enumeration types for the array-bounds
6037 in a direct-new-declarator.
6039 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
6041 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
6042 TREE_PROTECTED from the template being specialized.
6044 2001-02-17 Jason Merrill <jason@redhat.com>
6046 * decl2.c (build_artificial_parm): Set TREE_READONLY.
6048 * decl.c (bad_specifiers): Allow throw specs on things with
6049 pointer-to-function or -member-function type.
6050 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
6053 2001-02-17 Mark Mitchell <mark@codesourcery.com>
6055 * call.c (check_dtor_name): Handle template names correctly.
6057 2001-02-16 Jason Merrill <jason@redhat.com>
6059 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
6060 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
6061 * optimize.c (maybe_clone_body): Don't substitute it.
6062 * call.c (build_new_method_call): Check in_chrg instead.
6063 * init.c (expand_virtual_init): Likewise.
6065 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
6067 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
6068 class-type introduces at least a type-name.
6070 2001-02-16 Jakub Jelinek <jakub@redhat.com>
6072 * call.c (convert_like_real): Create a temporary for non-lvalue.
6074 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
6076 * cp-tree.h: Fix typos in comments.
6078 2001-02-16 Jason Merrill <jason@redhat.com>
6080 * optimize.c (remap_block): If we're compiling a clone, pass the
6081 new block to insert_block.
6083 2001-02-16 Mark Mitchell <mark@codesourcery.com>
6085 * semantics.c (finish_asm_stmt): Robustify.
6087 2001-02-15 Mark Mitchell <mark@codesourcery.com>
6089 * pt.c (push_template_decl_real): Don't remangle the name of a
6092 2001-02-15 Jim Meyering <meyering@lucent.com>
6094 * Make-lang.in (c++.install-common): Depend on installdirs.
6095 (c++.install-info): Likewise.
6096 (c++.install-man): Likewise.
6098 2001-02-15 Mark Mitchell <mark@codesourcery.com>
6100 * typeck2.c (build_m_component_ref): Robustify.
6102 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
6104 * friend.c (do_friend): Don't take the nested [template] class
6105 into account when deciding whether to warn about the friend
6106 function not referring to a template function.
6108 2001-02-14 Jakub Jelinek <jakub@redhat.com>
6110 * typeck.c (build_unary_op): Clarify error message.
6112 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
6114 * parse.y (component_constructor_declarator): allow optional
6115 parentheses around constructor class name.
6117 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6119 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
6121 * init.c (emit_base_init): Remove incorrect comment about
6123 * method.c (make_thunk): Fix comment alignment.
6125 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6127 Kill remnants of this is variable.
6128 * cp-tree.h (flag_this_is_variable): Remove.
6129 * decl2.c (flag_this_is_variable): Remove.
6130 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
6131 (build_vbase_path): The path is non-static, even in a cdtor.
6132 (resolves_to_fixed_type_p): Add additional return value.
6133 * search.c (init_vbase_pointers): Adjust.
6134 * tree.c (lvalue_p_1): Adjust.
6135 * typeck.c (mark_addressable): Adjust.
6137 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6139 * pt.c (unify): Don't check cv quals of array types.
6141 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6143 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
6144 check whether we already have the type.
6146 2001-02-13 Mark Mitchell <mark@codesourcery.com>
6148 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
6149 * call.c (build_op_delete_call): Simplify to remove duplicate
6151 * class.c (clone_function_decl): Don't build the deleting variant
6152 of a non-virtual destructor.
6153 * decl.c (finish_destructor_body): Don't call delete if this is a
6154 non-virtual destructor.
6155 * init.c (build_delete): Explicitly call `operator delete' when
6156 deleting an object with a non-virtual destructor.
6158 2001-02-13 Jason Merrill <jason@redhat.com>
6160 * lang-specs.h: Add more __EXCEPTIONS.
6162 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6164 * typeck2.c (process_init_constructor): Check
6165 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
6167 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6169 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
6170 Remove spurious information in comment. Allow further
6171 adjustments of REFERENCE_TYPE args.
6173 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6175 * errfn.c (cp_deprecated): Tweak diagnostic text.
6176 * parse.y (new_initializer): Deprecate initializer lists
6179 2001-02-12 Mark Mitchell <mark@codesourcery.com>
6181 Remove old ABI support.
6183 2001-02-11 Mark Mitchell <mark@codesourcery.com>
6185 * decl2.c (flag_vtable_thunks): Always set it to 1.
6186 (flag_new_abi): Likewise.
6187 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
6189 * Makefile.in (g++spec.o): Fix typo.
6191 2001-02-09 Jason Merrill <jason@redhat.com>
6193 * lang-specs.h: Restore definition of __EXCEPTIONS.
6195 2001-02-08 Jason Merrill <jason@redhat.com>
6197 * search.c (shared_member_p): New function.
6198 (lookup_field_r): Use it.
6199 * cp-tree.h (SHARED_MEMBER_P): Remove.
6201 * method.c (process_overload_item): Handle template-dependent array
6203 * pt.c (type_unification_real): If we end up with undeduced nontype
6206 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
6209 * typeck2.c (friendly_abort): Don't say anything if we have
6210 earlier errors or sorries.
6212 * decl.c (check_tag_decl): Notice attempts to redefine bool and
6213 wchar_t. Ignore if in_system_header.
6215 * decl.c (maybe_push_cleanup_level): New fn...
6216 (start_decl_1): ...split out from here.
6217 * cvt.c (build_up_reference): Use it.
6218 * cp-tree.h: Declare it.
6220 2001-02-07 Mark Mitchell <mark@codesourcery.com>
6222 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
6225 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
6227 * pt.c (lookup_template_class): Make sure it's a primary
6228 template or template_template_parm when called from the parser.
6229 (instantiate_template_class): Add assertion.
6231 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
6233 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
6234 from error_mark_node.
6236 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
6238 Fix specification and implementation bugs in V3 ABI
6239 construction vtables.
6240 * cp-tree.h (flag_dump_class_layout): New flag.
6241 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
6242 (BINFO_LOST_PRIMARY_P): New flag.
6243 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
6244 (BINFO_PRIMARY_MARKED_P): Rename to ...
6245 (BINFO_PRIMARY_P): ... here.
6246 (binfo_via_virtual): New prototype.
6247 * decl2.c (flag_dump_class_layout): New flag.
6248 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
6249 use `=' as a file name separator.
6250 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
6252 (build_vtbl_address): If this is a virtual primary base, then
6253 get the vtbl of what it is ultimately primary for.
6254 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
6255 for BINFO_PRIMARY_P.
6256 (dfs_skip_nonprimary_vbases_markedp): Likewise.
6257 (get_shared_vbase_if_not_primary): Likewise.
6258 (dfs_get_pure_virtuals): Likewise.
6259 (expand_upcast_fixups): Likewise.
6260 (fixup_virtual_upcast_offsets): Likewise.
6261 (dfs_find_vbase_instance): Likewise.
6262 (find_vbase_instance): Likewise.
6263 (binfo_from_vbase): Adjust comment to reflect reality.
6264 (binfo_via_virtual): New function.
6265 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
6266 for binfo walking during VTT construction.
6267 (dfs_mark_primary_bases): Remove.
6268 (force_canonical_binfo_r): New function.
6269 (force_canonical_binfo): New function.
6270 (mark_primary_virtual_base): New function.
6271 (mark_primary_bases): Walk in inheritance graph order, use
6272 mark_primary_virtual_base.
6273 (determine_primary_base): Use some more intermediate variables.
6274 (dfs_find_final_overrider): Don't check for overriding along a
6276 (dfs_modify_vtables): Walk into primary virtual bases too.
6277 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
6278 (build_base_fields): Likewise.
6279 (dfs_set_offset_for_unshared_vbases): Likewise.
6280 (layout_virtual_bases): Likewise.
6281 (end_of_class): Likewise.
6282 (finish_struct_1): Call dump_class_hierarchy, if requested.
6283 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
6284 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
6285 (dump_class_hierarchy): Add file parameter. Append to file, if
6287 (finish_vtbls): Adjust accumulate_vtbl_inits call.
6288 Use canonical base for virtual bases.
6289 (build_vtt): Add more comments. Adjust build_vtt_inits call.
6290 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
6291 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
6292 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
6294 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
6295 from DATA. We want virtual primary bases and all bases via virtual.
6296 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
6297 virtual base when not a construction vtable.
6298 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
6299 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
6300 Use canonical bases when processing virtual bases.
6301 (accumulate_vtbl_inits): We're interested in any base via a
6303 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
6304 within a construction vtable, determine what is being overridden.
6305 (build_vtbl_initializer): Add more comments
6306 (add_vcall_offset_vtbl_entries_1): Adjust comment.
6307 (build_rtti_vtbl_entries): Check if the base has lost its
6310 2001-02-05 Mark Mitchell <mark@codesourcery.com>
6312 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
6314 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6316 * decl.c (pushdecl): Call abort instead of fatal.
6317 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
6318 * init.c (build_new_1): Likewise.
6319 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
6320 * decl.c (build_typename_type): hash_table_init now returns void.
6321 decl.c (init_decl_processing): Make an error non-fatal.
6323 2001-02-04 Mark Mitchell <mark@codesourcery.com>
6325 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
6327 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6328 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6329 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6330 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6331 * decl.c (maybe_commonize_var): Use the new name-mangling where
6333 * decl2.c (comdat_linkage): Enhance comments. Make all
6334 compiler-generated things static, if COMDAT is not available.
6335 (get_tinfo_decl): Do not make typeinfo objects that belong in the
6337 (tinfo_base_init): Use the correct mangled name for typeinfo
6338 strings, and push them into the global scope.
6339 (typeinfo_in_lib_p): New function.
6340 (synthesize_tinfo_var): Use it.
6341 (create_real_tinfo_var): Likewise.
6343 2001-02-03 Jakub Jelinek <jakub@redhat.com>
6345 * decl.c (push_class_binding): Use context_for_name_lookup instead
6347 * search.c (context_for_name_lookup): Remove static. Check for NULL
6348 context in the loop.
6349 * cp-tree.h (context_for_name_lookup): Add prototype.
6351 2001-02-02 Jakub Jelinek <jakub@redhat.com>
6353 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
6354 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
6356 * call.c (convert_class_to_reference, build_user_type_conversion_1,
6357 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
6359 2001-02-02 Mark Mitchell <mark@codesourcery.com>
6361 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
6362 of macros used when compiling g++spec.c.
6363 * g++spec.c (lang_specific_driver): Link with the shared
6366 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
6368 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
6369 make_reference_declarator, make_call_declarator), method.c
6370 (implicitly_declare_fn), parse.y (namespace_using_decl,
6371 notype_unqualified_id, expr_or_declarator, new_type_id,
6372 after_type_declarator, direct_after_type_declarator,
6373 notype_declarator, complex_notype_declarator,
6374 complex_direct_notype_declarator, qualified_id,
6375 notype_qualified_id, overqualified_id, direct_new_declarator,
6376 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
6377 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
6378 instead of build_parse_node.
6380 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6382 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
6383 (minus_one_node): Moved to top level gcc directory. Renamed
6384 to integer_minus_one_node.
6386 * init.c (init_init_processing): Don't set minus_one_node.
6387 (build_vec_init): Use integer_minus_one_node.
6389 * rtti.c (get_tinfo_decl_dynamic): Likewise.
6391 2001-01-28 Jakub Jelinek <jakub@redhat.com>
6393 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
6394 identical and they would be replaced with constant, remove
6395 MODIFY_EXPR from the tree.
6397 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6399 * Make-lang.in: Remove all dependencies on defaults.h.
6400 * call.c: Don't include defaults.h.
6402 * decl2.c: Likewise.
6403 * except.c: Likewise.
6407 * typeck.c: Likewise.
6409 2001-01-25 Jakub Jelinek <jakub@redhat.com>
6411 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
6412 operators even in "C" linkage.
6413 * method.c (set_mangled_name_for_decl): Likewise.
6414 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
6415 overloaded operators in "C" linkage.
6417 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
6419 * pt.c (tsubst_decl): Remove IN_DECL parameter.
6420 (tsubst_arg_types): Check parameter is not void.
6421 (tsubst): Adjust tsubst_decl call.
6423 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
6425 * call.c (add_builtin_candidate): Quote std properly, from
6428 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6430 * pt.c (check_explicit_specialization): Clone constructors and
6433 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
6435 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
6436 indicates anything special about template depth. Make sure we
6437 only count the user visible template classes.
6439 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
6441 * call.c (build_conv): Typo in comment.
6442 (add_builtin_candidate): Add more explanation.
6443 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
6444 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
6445 when we have enumeral types.
6446 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
6447 candidates for relops and eqops.
6448 (joust): Simplify control flow. Allow a non-template user
6449 function to hide a builtin.
6451 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
6453 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
6454 (more_specialized): Add deduction parameter.
6455 * call.c (joust): Adjust more_specialized call.
6456 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
6457 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
6458 (get_bindings_order): Remove.
6459 (get_bindings_real): Add DEDUCE parameter.
6460 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
6461 REFERENCE_TYPE jig for DEDUCE_ORDER.
6462 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
6463 maybe_adjust_types_for_deduction.
6464 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
6466 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
6467 (check_cv_quals_for_unify): Use new unify qualifier flags.
6468 (unify): Clear new unify qualifier flags.
6469 (get_bindings_real): Add DEDUCE parameter.
6470 (get_bindings): Adjust call to get_bindings_real.
6471 (get_bindings_overload): Likewise.
6472 (most_specialized_instantiation): Adjust call to
6475 2001-01-19 Jason Merrill <jason@redhat.com>
6477 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
6479 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
6482 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
6484 * decl2.c (arg_assoc_class): Fix double iteration logic.
6486 2001-01-19 Jason Merrill <jason@redhat.com>
6488 * init.c (build_delete): Always call convert_force to strip cv-quals.
6490 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
6491 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
6492 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
6494 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6496 * search.c (get_vbase_1): Count only virtual bases.
6498 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6500 * class.c (duplicate_tag_error): Robustify flag clearing.
6502 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6504 * cp-tree.h (lookup_template_class): Add complain parm.
6505 * decl.c (lookup_namespace_name): Adjust call to
6506 lookup_template_class.
6507 (make_typename_type): Likewise.
6508 * semantics.c (finish_template_type): Likewise.
6509 * pt.c (lookup_template_class): Add complain parm. Adjust.
6510 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
6513 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6515 * pt.c (copy_default_args_to_explicit_spec): Preserve
6516 object's CV quals. Reorganize.
6518 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6520 * typeck.c (build_modify_expr): Say `initialization' for
6522 * init.c (build_default_init): Convert to enumeral type, if
6525 2001-01-18 Jakub Jelinek <jakub@redhat.com>
6527 * parse.y (nomods_initdcl0): Properly set things up for
6530 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6532 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
6533 (type_unification_real): Set it.
6536 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6538 * decl.c (finish_destructor_body): Convert to vbase pointer here.
6540 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6542 * semantics.c (begin_class_definition): Check we're not inside a
6545 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6547 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
6550 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6552 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
6553 * call.c (build_over_call): Add comment.
6555 2001-01-16 Daniel Berlin <dberlin@redhat.com>
6557 * cvt.c (ocp_convert): Handle vector type conversion
6558 * typeck2.c (digest_init): Handle vector type initializations
6560 2001-01-16 Phil Edwards <pme@sources.redhat.com>
6562 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
6565 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
6567 * pt.c (check_nontype_parm): Rename to ...
6568 (invalid_nontype_parm_type_p): ... here.
6569 (process_template_parm): Adjust.
6570 (convert_template_argument): Adjust.
6572 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
6574 * pt.c (check_nontype_parm): New function.
6575 (process_template_parm): Use it.
6576 (convert_template_argument): Use it.
6577 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
6580 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
6582 * tree.c: Add defaults.h
6583 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
6584 * Make-lang.in (cp/tree.o): Add defaults.h.
6586 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
6588 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
6590 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
6592 * g++.1: Change to be ".so man1/gcc.1".
6594 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
6596 * Make-lang.in (c++.info, c++.install-info): Build and install g++
6598 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
6599 ($(srcdir)/cp/g++int.info): New target.
6600 * gxxint.texi: Add info directory entry. Use @@ in email address.
6601 * .cvsignore: Update.
6603 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
6605 * typeck.c (build_c_cast): Do template processing earlier.
6606 Always pedwarn on array casts.
6608 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
6610 * friend.c (make_friend_class): Make sure a templated class is
6611 actually a template.
6613 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6615 * decl2.c (get_guard): Set linkage from guarded decl.
6617 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6619 * call.c (convert_default_arg): Check for unprocessed
6621 * cp-tree.h (replace_defarg): Move to spew.c.
6622 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
6623 spew.c, which is where they really are.
6624 (done_pending_defargs): Declare.
6625 (unprocessed_defarg_fn): Declare.
6626 * decl.c (replace_defarg): Move to spew.c
6627 * parse.y (structsp): Call done_pending_defargs.
6628 * spew.c (defarg_fns): Rearrange list structure.
6629 (defarg_fnsdone): New static variable.
6630 (defarg_depfns): New static variable.
6631 (init_spew): Adjust.
6632 (add_defarg_fn): Store the type in TREE_TYPE.
6633 (do_pending_defargs): Detect and deal with ordering constraints
6635 (done_pending_defargs): New function.
6636 (unprocessed_defarg_fn): New function.
6637 (replace_defarg): Moved from decl.c. Robustify. Don't save
6638 if circularity detected.
6640 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6642 * pt.c (unify): Check array has a domain, before checking
6643 whether it is variable sized.
6645 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6647 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
6648 parameters with pointers to arrays of unknown bound.
6650 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6652 * parse.y (template_parm_header, template_spec_header): New
6653 reductions. Split out from ...
6654 (template_header): ... here. Use them.
6655 (template_template_parm): Use template_parm_header.
6656 * semantics.c (finish_template_template_parm): Add assert.
6658 2001-01-10 Mark Mitchell <mark@codesourcery.com>
6660 * mangle.c (write_builtin_type): Fix thinko.
6662 * pt.c (copy_default_args_to_explicit_spec_1): New function.
6663 (copy_default_args_to_explicit_spec): Likewise.
6664 (check_explicit_specialization): Use it.
6666 * class.c (finish_struct_1): Remove last argument in call to
6667 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6668 * decl.c (builtin_function): Likewise.
6669 (build_cp_library_fn): Likewise.
6670 (check_initializer): Likewise.
6671 (make_rtl_for_nonlocal_decl): Likewise.
6672 (cp_finish_decl): Likewise.
6673 (start_function): Likewise.
6674 * decl2.c (finish_anon_union): Likewise.
6675 * friend.c (do_friend): Likewise.
6676 * init.c (build_java_class_ref): Likewise.
6677 * method.c (make_thunk): Likewise.
6678 * pt.c (tsubst_friend_function): Likewise.
6679 * semantics.c (expand_body): Likewise.
6681 2001-01-10 Mark Mitchell <mark@codesourcery.com>
6683 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
6684 looking at DECL_CLONED_FUNCTION for non-functions.
6686 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
6688 * error.c (dump_template_parameter): Use parm to determine how
6689 to print default value.
6691 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
6693 * class.c (duplicate_tag_error): Clear more flags.
6695 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
6697 * call.c (build_new_method_call): Use binfo_for_vbase.
6699 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
6701 * cp-tree.h (flag_cond_mismatch): Don't declare.
6702 * decl2.c (flag_cond_mismatch): Don't define.
6703 (lang_f_options): Remove cond-mismatch.
6704 (unsupported_options): Add cond-mismatch.
6706 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
6708 * class.c (handle_using_decl): Reject using of constructor name
6709 of sourcing class. Allow injecting of a method with same name as
6710 nested class. Fixup error messages.
6712 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
6714 * decl2.c (lang_decode_option): Handle -Wformat=2.
6716 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
6718 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
6719 initialized_in_class.
6720 (DECL_DEFINED_IN_CLASS_P): Rename to ...
6721 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
6722 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
6723 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
6724 * pt.c (check_default_tmpl_args): Adjust for
6725 DECL_INITIALIZED_IN_CLASS_P.
6726 (instantiate_class_template): Likewise.
6727 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
6729 * class.c (finish_struct): Constify saved_filename.
6731 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
6733 * class.c (duplicate_tag_error): Adjust diagnostic.
6734 (finish_struct): Locally set location to start of struct.
6735 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
6737 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
6739 * decl.c (struct binding_level): Adjust class_shadowed comments
6741 (push_class_level_binding): Adjust comments to reflect reality.
6742 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
6743 Don't set TREE_VALUE on the class_shadowed list.
6745 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6747 * decl2.c (acceptable_java_type): Allow references too.
6748 * init.c (build_java_class_ref): When using the new ABI, search
6749 `class$' and have it mangled with `mangle_decl.'
6750 * mangle.c (write_java_integer_type_codes): New function.
6751 (write_builtin_type): Detect and mangle Java integer and real
6754 2001-01-07 Mark Mitchell <mark@codesourcery.com>
6756 * decl2.c (grokfield): Don't accept `asm' specifiers for
6757 non-static data members.
6759 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6761 * expr.c (cplus_expand_expr): Don't reset `target'.
6763 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
6765 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
6767 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
6769 * parse.y (template_datadef): Check for error_mark_node.
6771 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
6773 * cp-tree.def (DEFAULT_ARG): Make `x' class.
6775 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
6777 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
6778 (record_builtin_type): Make non-static.
6779 (flag_short_double): Don't declare.
6780 (init_decl_processing): Remove the creation of many tree nodes now
6781 in c_common_nodes_and_builtins.
6782 (build_void_list_node): New function.
6783 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
6784 * cp-tree.h (flag_short_wchar): Don't declare.
6786 2001-01-04 Mark Mitchell <mark@codesourcery.com>
6788 * call.c (build_conv): Don't use build1 for USER_CONV.
6789 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
6791 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
6793 * lex.c (lang_init): Call c_common_lang_init.
6795 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
6797 * search.c (lookup_fnfields_here): Remove.
6798 (look_for_overrides_r): Use lookup_fnfields_1.
6799 Ignore functions from using declarations.
6801 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
6803 Implement exceptions specifiers for implicit member functions.
6804 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
6805 * method.c (synthesize_exception_spec): New function.
6806 (locate_dtor, locate_ctor, locate_copy): New functions.
6807 (implicitly_declare_fn): Generate the exception spec too.
6808 * search.c (check_final_overrider): Check artificial functions
6810 * typeck2.c (merge_exception_specifiers): New function.
6812 2001-01-03 Jason Merrill <jason@redhat.com>
6814 * init.c (build_default_init): New fn.
6815 (perform_member_init): Split out from here.
6816 (build_new_1): Use it. Simplify initialization logic.
6817 (build_vec_init): Take an array, rather than a pointer and maxindex.
6818 Speed up simple initializations. Don't clean up if we're assigning.
6819 * cp-tree.h: Adjust.
6820 * decl2.c (do_static_initialization): Remove TREE_VEC case.
6821 * parse.y (new_initializer): Return void_zero_node for ().
6822 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
6823 * typeck2.c (digest_init): Only complain about user-written
6826 2000-12-22 Mike Stump <mrs@wrs.com>
6828 * decl2.c: (max_tinst_depth): Increase to 50.
6830 2001-01-02 Mark Mitchell <mark@codesourcery.com>
6832 * class.c (invalidate_class_lookup_cache): Zero the
6833 previous_class_values.
6834 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
6836 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
6837 * decl.c (free_bindings): New variable.
6838 (push_binding): Don't create a new binding if we have one on the
6840 (pop_binding): Put old bindings on the free list.
6841 (init_decl_processing): Use size_int, not build_int_2.
6842 Register free_bindings as a GC root.
6843 (cp_make_fname_decl): Use size_int, not build_int_2.
6844 (push_inline_template_parms_recursive): Likewise.
6845 (end_template_parm_list): Likewise.
6846 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
6847 (tsubst_template_parms): Use size_int, not build_int_2.
6849 * rtti.c (get_vmi_pseudo_type_info): Likewise.
6851 2001-01-02 Richard Henderson <rth@redhat.com>
6853 * parse.y (asm): Set ASM_INPUT_P.
6855 2001-01-02 Jason Merrill <jason@redhat.com>
6857 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
6860 * typeck.c (cp_truthvalue_conversion): New fn.
6861 * cvt.c (ocp_convert): Use it.
6863 * cp-tree.h: Lose c-common.c decls.
6865 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
6866 * cvt.c (convert_to_void): Use type_unknown_p.
6868 * typeck.c (strip_all_pointer_quals): Also strip quals from
6869 pointer-to-member types.
6871 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
6874 * call.c (build_new_method_call): Do evaluate the object parameter
6875 when accessing a static member.
6876 * typeck.c (build_component_ref): Likewise.
6878 2001-01-02 Andreas Jaeger <aj@suse.de>
6880 * decl.c (cp_missing_noreturn_ok_p): New.
6881 (init_decl_processing): Set lang_missing_noreturn_ok_p.
6883 2000-12-29 Jakub Jelinek <jakub@redhat.com>
6885 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
6887 2000-12-29 Mark Mitchell <mark@codesourcery.com>
6889 * class.c (pushclass): Remove #if 0'd code.
6890 * cp-tree.h (overload_template_name): Remove.
6891 * decl.c (store_bindings): Simplify.
6892 (pop_from_top_level): Likewise.
6893 * pt.c (overload_template_name): Remove.
6894 (instantiate_decl): Don't call push_to_top_level if it's not
6897 2000-12-28 Mark Mitchell <mark@codesourcery.com>
6899 * pt.c (register_local_specialization): Don't return a value.
6900 (lookup_template_class): Use move-to-front heuristic when looking
6901 up template instantiations.
6902 (instantiate_decl): Only push_to_top_level when we're actually
6903 going to instantiate the template.
6905 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
6907 * search.c (binfo_for_vtable): Return least derived class, not
6908 most. Handle secondary vtables.
6910 2000-12-22 Jason Merrill <jason@redhat.com>
6912 * pt.c (more_specialized): Don't optimize len==0.
6913 (fn_type_unification): If we're adding the return type, increase len.
6915 * typeck.c (build_binary_op): Fix pmf comparison logic.
6917 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
6918 DECL_STATIC_FUNCTION_P.
6920 * semantics.c (genrtl_finish_function): Don't try to jump to
6921 return_label unless it exists.
6923 In partial ordering for a call, ignore parms for which we don't have
6925 * call.c (joust): Pass len to more_specialized.
6926 (add_template_candidate_real): Strip 'this', pass len.
6927 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
6928 (get_bindings_order): New fn. Pass len down.
6929 (get_bindings_real): Strip 'this', pass len.
6930 (fn_type_unification): Likewise.
6931 (type_unification_real): Succeed after checking 'len' args.
6932 (most_specialized_instantiation): Lose explicit_args parm.
6933 * class.c (resolve_address_of_overloaded_function): Strip 'this',
6936 2000-12-21 Jason Merrill <jason@redhat.com>
6938 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
6939 DECL_TEMPLATE_RESULT.
6941 * search.c (lookup_field_r): Call lookup_fnfields_1, not
6942 lookup_fnfields_here.
6944 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
6946 * call.c (build_object_call): Also allow conversions that return
6947 reference to pointer to function.
6948 (add_conv_candidate): Handle totype being ref to ptr to fn.
6949 (build_field_call): Also allow members of type reference to function.
6950 Lose support for calling pointer to METHOD_TYPE fields.
6952 * error.c (dump_expr): Handle *_CAST_EXPR.
6954 * typeck2.c (build_scoped_ref): Always convert to the naming class.
6956 * tree.c (break_out_cleanups): Lose.
6957 * cp-tree.h: Remove prototype.
6958 * typeck.c (build_component_ref): Don't break_out_cleanups.
6959 (build_compound_expr): Likewise.
6960 * semantics.c (finish_expr_stmt): Likewise.
6962 2000-12-20 Richard Henderson <rth@redhat.com>
6964 * cp-tree.h: Update declarations.
6965 * decl.c (finish_case_label): Return the new stmt node.
6966 * semantics.c (finish_goto_stmt): Likewise.
6967 (finish_expr_stmt, finish_return_stmt): Likewise.
6968 (finish_break_stmt, finish_continue_stmt): Likewise.
6969 (finish_asm_stmt): Likewise.
6970 * parse.y (already_scoped_stmt): Set STMT_LINENO.
6971 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
6972 (simple_if, simple_stmt): Return the new stmt node.
6975 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
6977 * cp-tree.h: Don't declare warn_long_long.
6979 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6981 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
6984 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6986 * pt.c (unify): Handle when both ARG and PARM are
6987 BOUND_TEMPLATE_TEMPLATE_PARM.
6989 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6991 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
6992 DECL_TEMPLATE_PARM_P.
6994 2000-12-15 Jason Merrill <jason@redhat.com>
6996 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
6998 * init.c (build_new_1): Don't strip quals from type.
7000 * decl.c (pushdecl): Don't check for linkage on a non-decl.
7002 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
7004 * call.c (build_new_function_call): Lose space before paren in
7006 (build_new_method_call): Likewise.
7008 * typeck2.c (build_m_component_ref): Propagate quals from datum.
7010 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7012 * pt.c (check_explicit_specialization): Propagate default
7013 function arguments to explicit specializations.
7015 2000-12-13 DJ Delorie <dj@redhat.com>
7017 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
7020 2000-12-08 Jason Merrill <jason@redhat.com>
7022 * error.c (dump_function_name): Don't let the user see __comp_ctor.
7024 Clean up copy-initialization in overloading code.
7025 * call.c (build_user_type_conversion_1): Die if we are asked to
7026 convert to the same or a base type.
7027 (implicit_conversion): Avoid doing so. Lose reference binding code.
7028 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
7029 direct-initialization. Also do direct-init part of copy-init.
7030 (build_user_type_conversion): Don't provide context to convert_like.
7031 * cvt.c (ocp_convert): build_user_type_conversion will now provide
7032 the constructor call for copy-init.
7034 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
7035 instantiation of a member template.
7036 (do_decl_instantiation): Not here.
7038 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7040 * class.c (check_field_decls): Don't special case anonymous
7041 fields in error messages.
7042 (note_name_declared_in_class): Use %D on diagnostic.
7044 * tree.c (pod_type_p): Use strip_array_types.
7045 (cp_valid_lang_attribute): Likewise.
7046 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
7047 multiple evaluations.
7048 (cp_has_mutable_p): Use strip_array_types.
7050 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7052 * cp-tree.h (sufficient_parms_p): Declare new function.
7053 * call.c (sufficient_parms_p): New function, broken out of ...
7054 (add_function_candidate): ... here. Use it.
7055 (add_conv_candidate): Use it.
7056 * decl.c (grok_ctor_properties): Use it.
7058 2000-12-07 Jakub Jelinek <jakub@redhat.com>
7060 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
7062 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
7064 * decl2.c (lang_decode_option): Handle -Wformat-security.
7066 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7068 * pt.c (verify_class_unification): New function.
7069 (get_class_bindings): Use it.
7070 (try_class_unification): Tidy.
7071 (unify): Handle when argument of a template-id is not
7072 template parameter dependent.
7073 (template_args_equal): Handle when TREE_CODE's do not match.
7075 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
7077 * lang-specs.h (c++): When invoking the stand-alone preprocessor
7078 for -save-temps, pass all relevant -Defines to it, and then don't
7079 pass them to cc1plus.
7081 2000-12-05 Will Cohen <wcohen@redhat.com>
7083 * decl.c (finish_case_label): Cleared
7084 more_cleanups_ok in surrounding function scopes.
7085 (define_label): Likewise.
7087 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7089 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
7090 (get_matching_virtual): Remove.
7091 (look_for_overrides): Declare new function.
7092 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
7094 * class.c (check_for_override): Move base class iteration code
7095 to look_for_overrides.
7096 * search.c (next_baselink): Remove.
7097 (get_virtuals_named_this): Remove.
7098 (get_virtual_destructor): Remove.
7099 (tree_has_any_destructors_p): Remove.
7100 (struct gvnt_info): Remove.
7101 (check_final_overrider): Remove `virtual' from error messages.
7102 (get_matching_virtuals): Remove. Move functionality to ...
7103 (look_for_overrides): ... here, and ...
7104 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
7107 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7109 * typeck.c (get_delta_difference): If via a virtual base,
7111 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
7114 2000-12-04 Richard Henderson <rth@redhat.com>
7116 * error.c (dump_tree): Use output_add_string not OB_PUTS.
7118 2000-12-04 Jason Merrill <jason@redhat.com>
7120 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
7121 (write_builtin_type): Pass intSI_type_node and the like through
7123 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
7124 Pass intSI_type_node and the like through type_for_mode.
7125 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
7126 * pt.c (tsubst, unify): Likewise.
7127 * tree.c (walk_tree): Likewise.
7128 * error.c (dump_type): Likewise.
7129 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
7131 * Make-lang.in: Tweak top comment for emacs.
7134 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
7136 * class.c (clone_function_decl): Robustify.
7138 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
7140 * decl.c (store_bindings): Only search in the non modified
7141 old_bindings for duplicates.
7143 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
7145 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
7148 * typeck.c (build_static_cast): Remove unused variable.
7150 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7152 * pt.c: Fix typo in comment.
7154 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7156 * decl2.c (warn_format): Remove definition.
7157 (lang_decode_option): Handle -Wformat-nonliteral,
7158 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
7160 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7162 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
7163 (init_decl_processing): Don't create string_type_node,
7164 const_string_type_node, wint_type_node, intmax_type_node,
7165 uintmax_type_node, default_function_type, ptrdiff_type_node and
7166 unsigned_ptrdiff_type_node. Adjust position of call to
7167 c_common_nodes_and_builtins.
7168 (identifier_global_value): New function.
7170 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
7172 * call.c (standard_conversion): Reject pointer to member
7173 conversions from ambiguous, inaccessible or virtual bases.
7174 * typeck.c (build_static_cast): Don't check pointers to members
7177 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7179 * method.c (do_build_copy_constructor): Preserve cv
7180 qualifications when accessing source object members.
7181 (do_build_assign_ref): Likewise. Remove separate diagnostics for
7184 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7186 * method.c (do_build_assign_ref): Construct appropriately
7187 CV-qualified base reference. Don't allow const casts in base
7190 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7192 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
7193 incomplete return type.
7195 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7197 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
7198 * semantics.c (finish_base_specifier): Accept a _TYPE not a
7201 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7203 * spew.c (yyerror): Cope if yylval.ttype is NULL.
7205 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7207 * decl.c (grokdeclarator): Diagnose undefined template contexts.
7209 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7211 * decl.c (grokdeclarator): Do type access control on friend
7214 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
7216 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
7217 bison parser ickiness.
7218 * pt.c (tsubst_friend_function): Enter namespace scope when
7219 tsubsting the function name.
7220 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
7222 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
7224 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
7225 * cvt.c (cp_convert_to_pointer): Add force parameter.
7226 Allow conversions via virtual base if forced.
7227 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
7228 (ocp_convert): Likewise.
7229 * search.c (binfo_from_vbase): Return the virtual base's binfo.
7230 * typeck.c (get_delta_difference): Adjust handling of virtual
7233 2000-11-26 Mark Mitchell <mark@codesourcery.com>
7235 * tree.c (struct list_hash): Remove.
7236 (list_hash_table): Make it be an htab.
7237 (struct list_proxy): New type.
7238 (list_hash_eq): New function.
7239 (list_hash_pieces): Renamed from ...
7240 (list_hash): ... this.
7241 (list_hash_lookup): Remove.
7242 (list_hash_add): Remove.
7243 (hash_tree_cons): Use the generic hashtable.
7244 (mark_list_hash): Remove.
7245 (init_tree): Create the hashtable.
7247 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
7249 * method.c (build_mangled_C9x_name): Rename to
7250 build_mangled_C99_name. Change C9X references in comments to
7253 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
7255 * parse.y (unary_expr): Move VA_ARG from here ...
7256 (primary): ... to here.
7258 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
7260 * semantics.c (finish_id_expr): If type is error_mark, return
7263 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
7265 * pt.c (lookup_template_class): Simplify loop exit constructs.
7266 Cope when there is no partial instantiation of a template
7269 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
7271 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
7273 2000-11-22 Mark Mitchell <mark@codesourcery.com>
7275 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
7278 * pt.c (do_decl_instantiate): Explicitly clone constructors and
7279 destructors that haven't already been cloned.
7281 2000-11-20 Richard Henderson <rth@redhat.com>
7283 * parse.y (yyparse_1): Rename the parser entry point.
7285 2000-11-20 Alex Samuel <samuel@codesourcery.com>
7287 * mangle.c (write_name): Use <unscoped-name> for names directly in
7289 (write_unscoped_name): Accept names directly in function scope.
7291 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
7293 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
7294 * parse.y (extdef): Add EXPORT reduction.
7295 * spew.c (yylex): Don't skip export here.
7297 2000-11-19 Mark Mitchell <mark@codesourcery.com>
7299 * decl.c (init_decl_processing): Correct name of pure virtual
7300 function under the new ABI.
7301 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
7302 (throw_bad_typeid): Likewise for bad typeid function.
7304 2000-11-18 Mark Mitchell <mark@codesourcery.com>
7306 * decl.c (grokparms): Don't even function types of `void' type,
7308 * mangle.c (write_type): Don't crash when confronted with the
7311 * decl.c (grokparms): Don't create parameters of `void' type.
7313 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
7315 * lex.c (mark_impl_file_chain): Delete.
7316 (init_parse): Remove call to ggc_add_string_root. No need to
7317 ggc_strdup a string constant. Do not add impl_file_chain to GC
7319 (handle_pragma_implementation): No need to ggc_strdup main_filename.
7321 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
7323 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
7325 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
7327 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
7328 * decl.c (grokdeclarator): Don't reject void parms here.
7329 (require_complete_types_for_parms): Simplify, use
7330 complete_type_or_else.
7331 (grokparms): Remove bitrot. Remove funcdef parm.
7332 Deal with ellipsis parm lists here.
7333 * semantics.c (finish_parmlist): Don't append void_list_node
7334 here. Set PARMLIST_ELLIPSIS_P.
7336 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
7338 * typeck2.c (incomplete_type_error): Reorganize to avoid
7339 excessive diagnostics.
7341 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
7343 * lex.c (struct impl_files, internal_filename): Constify a char *.
7345 2000-11-16 Mark Mitchell <mark@codesourcery.com>
7347 * mangle.c (write_special_name_constructor): Don't generate
7348 assembler junk when confronted with an old-style constructor.
7349 (write_special_name_destructor): Likewise.
7350 (mangle_decl_string): Do it here instead.
7352 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
7354 * call.c (op_error): Make error messages clearer.
7356 2000-11-15 Mark Mitchell <mark@codesourcery.com>
7358 * decl.c (wrapup_globals_for_namespace): Don't mark things
7359 TREE_ASM_WRITTEN when they're not.
7361 2000-11-15 Jason Merrill <jason@redhat.com>
7363 * typeck2.c (friendly_abort): Uncount the error before handing
7366 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
7368 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
7370 2000-11-14 Mark Mitchell <mark@codesourcery.com>
7372 * class.c (build_vtbl_initializer): Fix typo in comment.
7373 * typeck.c (expr_sizeof): Don't crash on errors.
7375 2000-11-14 Jim Wilson <wilson@redhat.com>
7377 * lang-specs.h: Add %2 after %(cc1_options).
7379 2000-11-14 Richard Henderson <rth@redhat.com>
7381 * typeck.c (c_sizeof): Be strict about casting result value
7382 back to c_size_type_node.
7383 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
7385 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
7387 * typeck.c (build_unary_op): Use boolean_increment from
7388 c-common.c, moving the relevant code there.
7390 2000-11-11 Jason Merrill <jason@redhat.com>
7392 * typeck.c (mark_addressable): Don't call put_var_into_stack.
7394 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
7397 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7399 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
7400 * lex.c (copy_lang_decl): Likewise.
7402 2000-11-09 Mark Mitchell <mark@codesourcery.com>
7404 * dump.c (cp_dump_tree): Don't dump function bodies here.
7406 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7407 (dump.o): Update dependency list.
7408 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
7409 (flag_dump_translation_unit): Likewise.
7410 (CP_TYPE_QUALS): Adjust definition.
7411 (DECL_C_BIT_FIELD): Remove.
7412 (SET_DECL_C_BIT_FIELD): Likewise.
7413 (CLEAR_DECL_C_BIT_FIELD): Likewise.
7414 (add_maybe_template): Likewise.
7415 (strip_array_types): Likewise.
7416 (dump_node_to_file): Likewise.
7417 (cp_dump_tree): New function.
7418 * decl.c (init_decl_processing): Set lang_dump_tree.
7419 * decl2.c (flag_dump_translation_unit): Remove.
7420 * dump.c: Move most of it to ../c-dump.c.
7421 (cp_dump_tree): New function.
7422 * pt.c (add_maybe_template): Remove.
7423 * typeck.c (strip_array_types): Likewise.
7425 2000-11-07 Eric Christopher <echristo@redhat.com>
7427 * decl.c (init_decl_processing): Change definition of
7428 __wchar_t to wchar_t. Remove artificial declaration of
7430 * lex.c: Change instances of __wchar_t to wchar_t.
7432 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
7434 * lex.c (do_identifier): Don't lookup_name for operators.
7435 * parse.y (operator): Save looking_for_typename.
7436 (unoperator): Restore it.
7437 * spew.c (frob_opname): Use nth_token for lookahead.
7439 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
7441 * decl.c (grok_op_properties): Always use coerce_new_type and
7443 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
7444 exception specification. Tidy up.
7445 (coerce_delete_type): Preserve exception specification. Tidy up.
7447 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
7449 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
7450 (push_binding_level), error.c (cp_tree_printer), pt.c
7451 (process_partial_specialization, tsubst_template_arg_vector),
7452 search.c (lookup_member): Use memset () instead of bzero ().
7454 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
7456 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
7458 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
7460 * Make-lang.in (c++.distdir): Remove.
7462 2000-11-04 Mark Mitchell <mark@codesourcery.com>
7464 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
7465 declarations from different namespaces to be combined.
7467 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
7469 * decl.c: Include tm_p.h.
7471 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
7473 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
7475 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
7477 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
7478 (build_overload_value), repo.c (open_repo_file), xref.c
7479 (open_xref_file): Use strchr () and strrchr () instead of index ()
7482 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
7484 * call.c (build_over_call): Call fold on the CALL_EXPR.
7486 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
7488 * error.c (dump_template_decl): Separate template hearders with
7491 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
7493 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
7494 TS_* flags with corresponding TFF_*. Adjust prototypes of
7495 functions (which used to take a tree_string_flags) to take an int.
7497 * cp-tree.h (enum tree_string_flags): Remove
7498 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
7499 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
7500 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
7501 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
7502 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
7503 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
7504 (type_as_string, decl_as_string, expr_as_string,
7505 context_as_string): Adjust prototype.
7507 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
7508 instead of TS_PLAIN.
7510 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
7511 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
7514 2000-10-30 Mark Mitchell <mark@codesourcery.com>
7516 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
7517 (linkage_kind): New enumeration.
7518 (decl_linkage): New function.
7519 * decl2.c (comdat_linkage): Extend comment.
7520 * error.c (dump_function_decl): Print the arguments used to
7521 instantiate a template, even when not printing the type of the
7523 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
7524 not TREE_PUBLIC, to test for external linkage.
7525 * tree.c (decl_linkage): New function.
7527 2000-10-28 Mark Mitchell <mark@codesourcery.com>
7529 * pt.c (instantiate_decl): Always instantiate static data members
7530 initialized in-class.
7532 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
7534 * Make-lang.in: Move all build rules here from Makefile.in,
7535 adapt to new context. Wrap all rules that change the current
7536 directory in parentheses. Expunge all references to $(P).
7537 When one command depends on another and they're run all at
7538 once, use && to separate them, not ;. Add OUTPUT_OPTION to
7539 all object-file generation rules. Delete obsolete variables.
7541 * Makefile.in: Delete.
7542 * config-lang.in: Delete outputs= line.
7544 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
7546 * error.c (dump_function_decl): Print no space between
7547 `ptr-operator' the `type-specifier' of the return type.
7548 (dump_type_prefix): Make sure we put space at the appropriate
7551 2000-10-23 Jason Merrill <jason@redhat.com>
7553 * call.c (equal_functions): Also call decls_match for extern "C" fns.
7555 2000-10-22 Jason Merrill <jason@redhat.com>
7557 * call.c (build_conditional_expr): Use ocp_convert to force
7560 2000-10-22 Mark Mitchell <mark@codesourcery.com>
7562 * call.c (standard_conversion): Use RVALUE_CONVs for all
7563 expressions that satisfy lvalue_p, not just those that satisfy
7566 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
7568 * typeck.c (c_sizeof): Return an expression of `size_t' type,
7569 not one with TYPE_IS_SIZETYPE set.
7570 (dubious_conversion_warnings): Remove special-case code.
7572 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
7574 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
7575 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
7576 (dump_type_prefix): Print vector-of-int as 'int vector'.
7577 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
7578 * tree.c (walk_tree): Handle VECTOR_TYPE.
7580 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
7582 2000-10-21 Jason Merrill <jason@redhat.com>
7584 * parse.y (operator): Set got_object from got_scope.
7585 Set looking_for_typename.
7586 * decl.c (lookup_name_real): Clear val after setting from_obj.
7587 Reorganize diagnostic.
7589 2000-10-20 Jason Merrill <jason@redhat.com>
7591 * tree.c (walk_tree): Don't walk into default args.
7593 * error.c (dump_expr): Use host_integerp.
7595 2000-10-20 David Edelsohn <edelsohn@gnu.org>
7597 * typeck2.c (abstract_virtuals_error): Use "because" instead of
7598 "since" in error message.
7600 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7602 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
7604 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
7606 * decl.c (revert_static_member_fn): Fixed typo.
7608 2000-10-19 Mark Mitchell <mark@codesourcery.com>
7610 * class.c (subobject_offset_fn): New type.
7611 (dfs_record_base_offsets): Remove.
7612 (record_base_offsets): Likewise.
7613 (dfs_search_base_offsets): Likewise.
7614 (record_subobject_offset): New function.
7615 (check_subobject_offset): Likewise.
7616 (walk_subobject_offsets): Likewise.
7617 (record_subobject_offsets): Likewise.
7618 (layout_conflict_p): Reimplement.
7619 (layout_nonempty_base_or_field): Correct handling of type
7620 conflicts during layout.
7621 (layout_empty_base): Likewise.
7622 (build_base_field): Adjust to handle new representation of empty
7624 (build_base_fields): Likewise.
7625 (layout_virtual_bases): Likewise.
7626 (splay_tree_compare_integer_csts): New function.
7627 (layout_class_type): Use a splay_tree, rather than a varray, to
7628 represent the offsets of empty bases.
7630 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
7631 * decl.c (select_decl): Don't return declarations that are
7634 2000-10-18 Mark Mitchell <mark@codesourcery.com>
7636 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
7637 (fake_std_node): New macro.
7638 * decl.c (in_std): Rename to ...
7639 (in_fake_std): ... this.
7640 (flag_no_builtin): Remove.
7641 (flag_no_nonansi_builtin): Likewise.
7642 (walk_namespaces_r): Use fake_std_node.
7643 (push_namespace): Use std_identifier.
7644 (pop_namespace): Use in_fake_std.
7645 (lookup_name_real): Use fake_std_node.
7646 (init_decl_processing): When -fhonor-std, create the `std'
7647 namespace. Don't create a dummy fake_std_node in that case.
7648 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
7649 (builtin_function): Put builtins whose names don't begin
7650 with `_' in the std namespace.
7651 * decl2.c (flag_no_builtin): Remove.
7652 (flag_no_nonansi_builtin): Likewise.
7653 (set_decl_namespace): Use fake_std_node.
7654 (validate_nonmember_using_decl): Likewise.
7655 (do_using_directive): Likewise.
7656 (handle_class_head): Likewise.
7657 * dump.c (dequeue_and_dump): Likewise.
7658 * except.c (init_exception_processing): Use std_identifier.
7659 * init.c (build_member_call): Use fake_std_node.
7660 * rtti.c (init_rtti_processing): Use std_identifier.
7662 2000-10-17 Mark Mitchell <mark@codesourcery.com>
7664 * cp-tree.h (back_end_hook): Remove declaration.
7665 * decl2.c (back_end_hook): Remove definition.
7667 * dump.c (dequeue_and_dump): Dump TREE_USED.
7669 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
7671 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
7673 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
7675 * decl.c (WINT_TYPE): Define.
7676 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
7677 c_size_type_node, signed_size_type_node and wint_type_node.
7679 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
7681 * decl2.c (warn_missing_format_attribute): New variable.
7682 (lang_decode_option): Decode -Wmissing-format-attribute.
7684 2000-10-16 Mark Mitchell <mark@codesourcery.com>
7686 * typeck.c (qualify_type): Remove.
7687 (composite_pointer_type): Fix handling of conversions to `cv void*'.
7689 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7691 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
7693 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7695 * Makefile.in (parse.c, parse.h): Create atomically.
7697 2000-10-12 Mark Mitchell <mark@codesourcery.com>
7699 * class.c (current_obstack): Remove.
7700 * decl.c (ggc_p): Remove.
7701 (start_decl): Don't use decl_tree_cons.
7702 (grokdeclarator): Don't use build_decl_list.
7703 (start_function): Don't use decl_tree_cons.
7704 (finish_function): Don't mess with obstacks.
7705 * decl2.c (grok_x_components): Don't use build_decl_list.
7706 * lex.c (make_call_declarator): Don't call decl_tree_cons.
7707 (implicitly_declare_fn): Don't call build_decl_list.
7708 * parse.y (frob_specs): Don't call build_decl_list or
7710 (expr_or_declarator_intern): Don't call decl_tree_cons.
7711 (primary): Don't call build_decl_list.
7712 (fcast_or_absdcl): Likewise.
7713 (typed_declspecs): Don't call decl_tree_cons.
7714 (reserved_declspecs): Don't call build_decl_list.
7715 (declmods): Likewise.
7716 (reserved_typespecquals): Likewise.
7718 (new_type_id): Likewise.
7719 (cv_qualifiers): Likewise.
7720 (after_type_declarator_intern): Likewise.
7721 (notype_declarator_intern): Likewise.
7722 (absdcl_intern): Likewise.
7723 (named_parm): Likewise.
7724 * pt.c (most_specialized_class): Likewise.
7725 * repo.c (temporary_obstack): Make it a structure, not a pointer.
7726 (init_repo): Initialize it.
7727 * search.c (current_obstack): Remove.
7728 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
7730 2000-10-09 Richard Henderson <rth@cygnus.com>
7732 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
7733 (c++ language support bits for libgcc): Remove.
7734 (c++.clean): Remove cplib2.txt cleanup.
7735 * config-lang.in (headers, lib2funcs): Remove.
7737 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
7738 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
7739 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
7740 * inc/new.h, inc/typeinfo: Remove files.
7742 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
7744 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
7746 (init_decl_processing): Initialize intmax_type_node and
7749 2000-10-06 Richard Henderson <rth@cygnus.com>
7751 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
7752 (original_result_rtx): Remove.
7753 * decl.c (save_function_data): Don't clear x_result_rtx.
7754 (mark_lang_function): Don't mark it either.
7755 * expr.c (fixup_result_decl): Remove.
7756 * semantics.c (genrtl_named_return_value): Frob the return decl
7757 before calling emit_local_var.
7758 (genrtl_finish_function): Don't call fixup_result_decl.
7759 Always emit the jump to return_label.
7761 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
7763 * pt.c (lookup_template_class): Set current access for enum.
7764 (tsubst_enum): Set file & line for enum decl.
7766 * spew.c (yylex): Remove unused variable.
7768 2000-10-05 Richard Henderson <rth@cygnus.com>
7770 * semantics.c (genrtl_finish_function): Don't init or check
7771 can_reach_end; remove noreturn and return value checks.
7773 2000-10-05 Tom Tromey <tromey@cygnus.com>
7775 * init.c (build_java_class_ref): Use `build_static_name' with a
7776 suffix, not a prefix, to build the class object's name.
7778 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
7780 * cp-tree.h (access_kind): Fix comment typo.
7781 * decl2.c (grokfield): Fix diagnostic typo.
7782 * semantics.c (finish_template_type): Fix comment typo.
7783 (finish_qualified_object_call_expr): Likewise.
7785 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
7787 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
7790 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
7792 * spew.c (frob_id): New static function.
7793 (frob_opname): Use it.
7796 2000-10-01 Mark Mitchell <mark@codesourcery.com>
7798 * decl.c (lang_mark_false_label_stack): Remove.
7799 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
7801 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
7803 * gxxint.texi: Use @email for formatting email addresses.
7805 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
7807 * error.c: Remove direct obstack manipulation. Replace with
7808 output_buffer-based formatting. Adjust calls to removed macros.
7809 (obstack_chunk_alloc, obstack_chunk_free): Remove.
7810 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
7811 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
7813 2000-09-24 Mark Mitchell <mark@codesourcery.com>
7815 * ir.texi: Move to ../c-tree.texi.
7817 2000-09-20 Jason Merrill <jason@redhat.com>
7819 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
7821 2000-09-21 Andreas Jaeger <aj@suse.de>
7823 * errfn.c: Move declaration of cp_printer and cp_printers to ...
7824 * cp-tree.h: ... here.
7826 * error.c: Remove declaration of cp_printer.
7828 2000-09-20 Mark Mitchell <mark@codesourcery.com>
7830 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
7832 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
7834 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
7837 2000-09-18 Mark Mitchell <mark@codesourcery.com>
7839 * decl.c (start_function): Robustify.
7841 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7843 * cp-tree.h (check_function_format): Accept a `status' parameter.
7845 * call.c, typeck.c: Updates calls to `check_function_format'.
7847 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
7849 * decl2.c (handle_class_head): Always push some scope even
7852 2000-09-16 Mark Mitchell <mark@codesourcery.com>
7854 * cp-tree.h (struct cp_language_function): Remove
7855 x_scope_stmt_stack and name_declared.
7856 (current_scope_stmt_stack): Remove.
7857 (function_name_declared_p): New macro.
7858 (struct lang_decl_flags): Use c_lang_decl as a base class.
7860 (struct lang_decl): Replace saved_tree with context.
7861 (DECL_FRIEND_CONTEXT): Adjust accordingly.
7862 (SET_DECL_FRIEND_CONTEXT): Likewise.
7863 (DECL_VIRTUAL_CONTEXT): Likewise.
7864 (DECL_SAVED_TREE): Remove.
7865 (C_DECLARED_LABEL_FLAG): Likewise.
7866 (cplus_expand_expr_stmt): Don't declare.
7867 (add_decl_stmt): Likewise.
7868 (add_scope_stmt): Likewise.
7869 * decl.c (mark_stmt_tree): Remove.
7870 (case_compare): Likewise.
7871 (finish_case_label): Use c_add_case_label.
7872 (init_decl_processing): Set more language-specific hooks.
7873 (build_enumerator): Fix typo in comment.
7874 (cplus_expand_expr_stmt): Remove.
7875 (mark_lang_function): Use mark_c_language_function.
7876 (lang_mark_tree): Use c_mark_lang_decl.
7877 * decl2.c: Change order of inclusion.
7878 * except.c: Likewise.
7879 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
7880 back on c_expand_expr.
7881 * friend.c: Include expr.h.
7882 * init.c: Change order of inclusion.
7883 * Makefile.in: Update dependencies.
7884 * lex.h (free_lang_decl_chain): Remove.
7885 * optimize.c (maybe_clone_body): Use function_name_declared_p.
7886 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
7888 (instantiate_decl): Use function_name_declared_p.
7889 * semantics.c (lang_expand_expr_stmt): Remove.
7890 (set_current_function_name_declared): Likewise.
7891 (current_function_name_declared): Likewise.
7892 (begin_compound_stmt): Use function_name_declared_p.
7893 (add_decl_stmt): Remove.
7894 (setup_vtbl_ptr): Use function_name_declared_p.
7895 (add_scope_stmt): Remove.
7896 (current_scope_stmt_stack): New function.
7897 (cp_expand_stmt): Don't handle SCOPE_STMTs.
7898 (expand_body): Use function_name_declared_p.
7899 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
7900 * typeck.c: Change order of includes.
7901 (convert_sequence): Remove.
7903 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
7905 * lex.c (reswords): Add _Complex.
7907 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7909 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
7911 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
7913 * init.c (begin_init_stmts): Don't use // comments.
7915 2000-09-12 Jason Merrill <jason@redhat.com>
7917 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
7918 all non-extern arrays.
7920 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
7921 typenames, too. Downgrade complaint to pedwarn.
7922 (xref_tag): Warn about surprising behavior of 'friend struct T'.
7923 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
7924 'class This::Inherited'.
7926 2000-09-12 Mark Mitchell <mark@codesourcery.com>
7928 * decl.c (finish_case_label): Given the LABEL_DECL a
7931 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
7933 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
7934 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
7935 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
7936 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
7937 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
7939 (sorry_for_unsupported_tree, print_scope_operator,
7940 print_left_paren, print_right_paren, print_left_bracket,
7941 print_right_bracket, print_whitespace): Likewise.
7942 (aggr_variety): Rename to class_key_or_enum.
7943 (print_type): Rename to print_type_id.
7944 (print_type_specifier_seq, print_simple_type_specifier,
7945 print_elaborated_type_specifier,
7946 print_rest_of_abstract_declarator,
7947 print_parameter_declaration_clause, print_exception_specification,
7948 print_nested_name_specifier, print_template_id,
7949 typedef_original_name, print_template_argument_list_start,
7950 print_template_argument_list_end): New functions.
7952 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
7954 * ir.texi: Add more documentation.
7956 2000-09-11 Mark Mitchell <mark@codesourcery.com>
7958 * cp-tree.h (struct saved_scope): Remove x_function_parms.
7959 (current_function_parms): Don't define.
7960 (struct cp_language_function): Remove parms_stored.
7961 (current_function_just_assigned_this): Don't define.
7962 (current_function_parms_stored): Likewise.
7963 (static_ctors): Declare.
7964 (static_dtors): Likewise.
7965 (SF_EXPAND): Don't define.
7966 (expand_start_early_try_stmts): Remove declaration.
7967 (store_parm_decls): Likewise.
7968 * decl.c (static_ctors): Don't declare.
7969 (static_dtors): Likewise.
7970 (struct binding_level): Remove this_block.
7971 (poplevel): Remove dead code.
7972 (set_block): Likewise.
7973 (mark_binding_level): Don't mark this_block.
7974 (mark_saved_scope): Don't mark x_function_parms.
7975 (init_decl_processing): Don't add current_function_parms as a GC
7977 (check_function_type): Change prototype.
7978 (start_function): Remove RTL-generation code.
7979 (expand_start_early_try_stmts): Remove.
7980 (store_parm_decls): Give it internal linkage. Remove
7981 RTL-generation code.
7982 (finish_function): Remove RTL-generation code.
7983 * decl2.c (static_ctors): Fix formatting.
7984 (static_dtors): Likewise.
7985 * method.c (use_thunk): Don't call store_parm_decls.
7986 (synthesize_method): Likewise.
7987 * optimize.c (maybe_clone_body): Likewise.
7988 * parse.y (fn.def2): Likewise.
7989 (.set_base_init): Likewise.
7990 (nodecls): Likewise.
7991 * pt.c (instantiate_decl): Likewise.
7992 * rtti.c (synthesize_tinfo_fn): Likewise.
7993 * semantics.c (genrtl_try_block): Simplify.
7994 (expand_body): Use genrtl_start_function and
7995 genrtl_finish_function.
7996 (genrtl_start_function): New function.
7997 (genrtl_finish_function): Likewise.
7999 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8001 * error.c (cp_tree_printer, case 'P'): Append break.
8003 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8005 * cp-tree.h (frob_opname): Declare.
8006 * parse.y (saved_scopes): New static variable.
8007 (cp_parse_init): Adjust.
8008 (do_id): If lastiddecl is NULL, do do_identifier.
8009 (operator): Save scope information.
8010 (unoperator): New reduction. Restore scope information.
8011 (operator_name): Append unoperator. Call frob_opname.
8012 * spew.c (frob_opname): Define.
8014 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
8016 * decl.c, rtti.c: Include defaults.h if not already included.
8017 Don't define the *_TYPE_SIZE macros.
8019 2000-09-09 Mark Mitchell <mark@codesourcery.com>
8021 * cp-tree.h (push_switch): Change prototype.
8022 (check_cp_case_value): Remove declaration.
8023 (decl_constant_value): Likewise.
8024 * decl.c (struct cp_switch): Add switch_stmt and cases.
8025 (case_compare): New function.
8026 (push_switch): Set switch_stmt. Initialize cases.
8027 (pop_switch): Clean up cases.
8028 (define_case_label): Rename to ...
8029 (finish_case_label): ... this. Do semantic analysis for case
8031 (start_function): Correct comment.
8032 * decl2.c (check_cp_case_value): Remove.
8033 * expr.c (do_case): Remove.
8034 * pt.c (tsubst_expr): Adjust call to finish_case_label.
8035 * semantics.c (genrtl_do_poplevel): Remove declaration.
8036 (RECHAIN_STMTS): Remove.
8037 (finish_break_stmt): Use build_break_stmt.
8038 (finish_continue_stmt): Use build_continue_stmt.
8039 (finish_switch_cond): Adjust condition here, rater than in
8040 c_expand_start_case.
8041 (finish_case_label): Remove.
8042 * typeck.c (c_expand_return): Remove.
8043 (c_expand_start_case): Likewise.
8045 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
8047 * ir.texi: Document type nodes.
8049 2000-09-06 Mark Mitchell <mark@codesourcery.com>
8051 * cp-tree.h (init_cp_semantics): Declare.
8052 (genrtl_try_block): Don't declare.
8053 (genrtl_handler): Likewise.
8054 (genrtl_catch_block): Likewise.
8055 (genrtl_ctor_stmt): Likewise.
8056 (genrtl_subobject): Likewise.
8057 (genrtl_do_poplevel): Likewise.
8058 (genrtl_named_return_value): Likewise.
8059 * lex.c (init_parse): Call init_cp_semantics.
8060 * semantics.c (genrtl_try_block): Give it internal linkage.
8061 (genrtl_handler): Likewise.
8062 (genrtl_catch_block): Likewise.
8063 (genrtl_ctor_stmt): Likewise.
8064 (genrtl_subobject): Likewise.
8065 (genrtl_do_poplevel): Likewise.
8066 (genrtl_named_return_value): Likewise.
8067 (lang_expand_stmt): Rename to ...
8068 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
8069 (init_cp_semantics): Define.
8071 * decl.c (initialize_local_var): Remove RTL-generating code.
8072 * semantics.c (genrtl_try_block): Fix formatting.
8074 Move statement-tree facilities from C++ to C front-end.
8075 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
8076 (void_zero_node): Remove.
8077 (stmt_tree): Likewise.
8078 (scope_chain): Adjust.
8079 (language_function): Rename to cp_language_function.
8080 (cp_function_chain): Adjust.
8081 (current_stmt_tree): Remove.
8082 (last_tree): Likewise.
8083 (last_expr_type): Likewise.
8084 (struct lang_decl): Adjust.
8085 (STMT_IS_FULL_EXPR_P): Remove.
8087 (begin_stmt_tree): Likewise.
8088 (finish_stmt_tree): Likewise.
8089 (walk_tree_fn): Likewise.
8090 (walk_stmt_tree): Likewise.
8091 * class.c (finish_struct): Replace use of add_tree with add_stmt.
8092 * decl.c (mark_stmt_tree): Adjust type.
8093 (init_decl_processing): Don't build void_zero_node.
8094 (initialize_local_var): Adjust usage of current_stmt_tree.
8095 (finish_enum): Use add_stmt, not add_tree.
8096 (save_function_data): Adjust use of language_function.
8097 (finish_constructor_body): Use add_stmt, not add_tree.
8098 (finish_destructor_body): Likewise.
8099 (push_cp_function_context): Adjust use of language_function.
8100 (pop_cp_function_context): Likewise.
8101 (mark_lang_function): Likewise.
8102 (mark_cp_function_context): Likewise.
8103 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
8104 (build_vec_init): Likewise.
8105 * semantics.c (SET_LAST_STMT): Remove.
8106 (RECHAIN_STMTS): Don't use it.
8107 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
8108 (current_stmt_tree): Define.
8110 (finish_goto_stmt): Use add_stmt, not add_tree.
8111 (finish_expr_stmt): Likewise.
8112 (begin_if_stmt): Likewise.
8113 (finish_then_clause): Likewise.
8114 (begin_while_stmt): Likewise.
8115 (begin_do_stmt): Likewise.
8116 (finish_return_stmt): Likewise.
8117 (begin_for_stmt): Likewise.
8118 (finish_break_stmt): Likewise.
8119 (finish_continue_stmt): Likewise.
8120 (begin_switch_stmt): Likewise.
8121 (finish_case_label): Likewise.
8122 (begin_try_block): Likewise.
8123 (begin_function_try_block): Likewise.
8124 (begin_handler): Likewise.
8125 (begin_catch_block): Likewise.
8126 (begin_compound_stmt): Likewise.
8127 (begin_asm_stmt): Likewise.
8128 (finish_asm_stmt): Likewise.
8129 (finish_label_stmt): Likewise.
8130 (add_decl_stmt): Likewise.
8131 (finish_subobject): Likewise.
8132 (finish_decl_cleanup): Likewise.
8133 (finish_named_return_value): Likewise.
8134 (setup_vtbl_ptr): Likewise.
8135 (add_scope_stmt): Likewise.
8136 (finish_stmt_expr): Likewise.
8137 (prune_unused_decls): Remove.
8138 (begin_stmt_tree): Likewise.
8139 (finish_stmt_tree): Likewise.
8140 (prep_stmt): Adjust use of current_stmt_tree.
8141 (lang_expand_stmt): Likewise.
8142 * tree.c (statement_code_p): Remove.
8143 (cp_statement_code_p): New function.
8144 (walk_stmt_tree): Remove.
8145 (init_tree): Set lang_statement_code_p.
8147 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
8149 Integrated preprocessor.
8151 * Make-lang.in, Makefile.in: Remove all references to input.c,
8152 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
8153 * gxx.gperf, hash.h, input.c: Delete.
8154 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
8155 initialized properly.
8157 * class.c (fixup_pending_inline): Take a tree, not a
8158 struct pending_inline *. All callers changed.
8159 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
8160 RID_PROTECTED entries in ridpointers[] array here.
8161 * decl.c (duplicate_decls): Do not refer to struct
8163 (record_builtin_type, init_decl_processing): Use RID_MAX not
8165 (grokdeclarator): Use C_IS_RESERVED_WORD.
8166 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
8168 (grok_x_components): Do not inspect pending_inlines chain.
8170 * cp-tree.h (struct lang_identifier): Add rid_code entry.
8171 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
8172 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
8173 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
8174 TIME_IDENTIFIER_FILEINFO): Kill.
8176 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
8178 * parse.y: Call do_pending_inlines unconditionally.
8179 reinit_parse_for_method is now snarf_method. fn.defpen is no
8180 longer necessary. Remove unnecessary <itype> annotation on
8181 SCOPE. Do not refer to end_of_file or struct pending_inline.
8182 * semantics.c (begin_inline_definitions): Call
8183 do_pending_inlines unconditionally.
8185 * lex.c: Remove all code now shared with C front end.
8186 Initialize cpplib properly if USE_CPPLIB. Put reserved words
8187 into the get_identifier table. Rewrite pragma handling to
8188 work with the registry. Move code to save tokens for later
8189 processing to spew.c.
8191 * spew.c: Rewrite everything in terms of token streams instead
8192 of text. Move routines here from lex.c / input.c as
8193 appropriate. GC-mark trees hanging off the pending inlines
8196 2000-09-06 Mark Mitchell <mark@codesourcery.com>
8198 * NEWS: Mention that the named return value extension has been
8200 * cp-tree.h (original_result_rtx): Define.
8201 (TREE_REFERENCE_EXPR): Remove.
8202 (DECL_VPARENT): Likewise.
8203 (pushdecl_nonclass_level): Likewise.
8204 (store_return_init): Likewise.
8205 (reinit_lang_specific): Likewise.
8206 (genrtl_named_return_value): Change prototype.
8207 * decl.c (original_result_rtx): Remove.
8208 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
8209 Do not generate RTL for local variables here.
8210 (store_return_init): Remove.
8211 * semantics.c (genrtl_named_return_value): Simplify. Fold in
8213 (finish_named_return_value): Adjust accordingly. Warn that this
8214 extension is deprecated.
8215 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
8217 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8219 * pt.c (type_unification_real): Replace switch with if.
8220 (unify): Tsubst non-type parms before comparing.
8222 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8224 * error.c (dump_typename): New function, broken out of ...
8225 (dump_type): ... here. Use it.
8226 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
8228 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8230 * init.c (build_offset_ref): Deal with namespace scoped
8233 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8235 * class.c (resolve_address_of_overloaded_function): Add
8236 explanation message.
8237 * decl.c (define_case_label): Reformat explanation.
8238 * decl2.c (finish_static_data_member_decl): Likewise.
8239 (grokfield): Likewise.
8240 * friend.c (do_friend): Likewise.
8242 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
8244 * tree.c (walk_tree): Expose tail recursion.
8245 (walk_stmt_tree): New function.
8246 * cp-tree.h: Prototype walk_stmt_tree.
8247 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
8248 the BLOCKs directly. If a BLOCK has no variables after
8249 pruning, discard it.
8250 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
8251 restore the line number.
8253 2000-09-05 Mark Mitchell <mark@codesourcery.com>
8255 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
8256 (pt.o): Remove dependency on HTAB_H.
8257 * cp-tree.h: Include hashtab.h.
8258 (walk_tree): Change prototype.
8259 (walk_tree_without_duplicates): New function.
8260 * decl.c (check_default_argument): Use it.
8261 * optimize.c (remap_decl): Adjust calls to walk_tree.
8262 (copy_body): Likewise.
8263 (expand_calls_inline): Likewise.
8264 (calls_setjmp_p): Use walk_tree_without_duplicates.
8265 * pt.c: Don't include hashtab.h.
8266 (for_each_template_parm): Use walk_tree_without_duplicates.
8267 * semantics.c (finish-stmt_tree): Likewise.
8268 (expand_body): Likewise.
8269 * tree.c (walk_tree): Add additional parameter.
8270 (walk_tree_without_duplicates): New function.
8271 (count_trees): Use it.
8272 (verify_stmt_tree): Adjust call to walk_tree.
8273 (find_tree): Use walk_tree_without_duplicates.
8274 (no_linkage_check): Likewise.
8275 (break_out_target_exprs): Adjust call to walk_tree.
8276 (cp_unsave): Likewise.
8278 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8280 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
8281 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
8282 * cp-tree.h (TYPE_BINFO): Adjust comment.
8283 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8284 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
8285 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
8286 (TYPE_TEMPLATE_INFO): Likewise.
8287 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
8288 * class.c (push_nested_class): Likewise.
8289 * decl.c (lookup_name_real): Likewise.
8290 (grokdeclarator): Likewise.
8291 (grok_op_properties): Likewise.
8292 (xref_tag): Likewise.
8293 (xref_basetypes): Likewise.
8294 * decl2.c (constructor_name_full): Likewise.
8295 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
8296 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
8297 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
8298 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8299 (dump_type_suffix): Likewise.
8300 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
8302 (get_aggr_from_typedef): Likewise.
8303 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
8304 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8305 (write_template_parm): Likewise.
8306 (write_template_template_parm): Check tree code instead of
8307 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8308 * method.c (build_overload_nested_name): Add
8309 BOUND_TEMPLATE_TEMPLATE_PARM.
8310 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
8311 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8312 * pt.c (convert_template_argument): Check tree code instead of
8313 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8314 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
8315 (for_each_template_parm): Adjust comment.
8316 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
8317 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8318 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
8319 template_args_equal to compare template template parameter cases.
8320 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8321 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
8323 * tree.c (copy_template_template_parm): Decide whether to create
8324 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
8325 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8326 (copy_tree_r): Likewise.
8327 * typeck.c (comptypes): Likewise. Check tree code instead of
8328 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8330 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
8332 * decl.c (finish_function): Move the code for handling functions
8333 marked with the constructor and destructor attributes inside the
8336 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
8338 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
8340 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
8342 * pt.c (lookup_template_class): Remove abort.
8343 * tree.c (get_type_decl): Allow error_mark_node.
8345 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
8347 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
8350 2000-09-03 Mark Mitchell <mark@codesourcery.com>
8352 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
8355 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
8357 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
8358 union tag mismatch error reporting.
8360 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
8362 * call.c (build_scoped_method_call): Check it is not a namespace.
8364 2000-08-30 Jason Merrill <jason@redhat.com>
8366 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
8368 * tree.c (bot_manip): Check TREE_CONSTANT rather than
8369 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
8370 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
8372 * decl.c (start_function): Always call make_function_rtl.
8374 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
8376 * semantics.c (prune_unused_decls): New function.
8377 (finish_stmt_tree): Call it via walk_tree.
8379 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
8381 * class.c (build_secondary_vtable): Constify a char *.
8382 * decl.c (init_decl_processing): Initialize function_id_node,
8383 pretty_function_id_node, and func_id_node.
8384 * input.c (struct input_source): Constify 'str'.
8385 (feed_input): Constify first argument.
8386 * mangle.c (write_identifier): Constify argument.
8387 * pt.c (mangle_class_name_for_template): Constify argument.
8389 2000-08-29 Mark Mitchell <mark@codesourcery.com>
8391 * typeck.c (mark_addressable): Remove code that pokes around in
8394 2000-08-28 Jason Merrill <jason@redhat.com>
8396 * lex.c (file_name_nondirectory): Move to toplev.c.
8398 * cp-tree.h (LOCAL_CLASS_P): New macro.
8399 * class.c (finish_struct_1): Use it.
8401 2000-08-27 Alex Samuel <samuel@codesourcery.com>
8403 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
8404 (write_encoding): Pass another argument to write_name.
8405 (write_name): Add ignore_local_scope parameter. Fix handling of
8407 (write_nested_name): Use write_unqualified_name.
8408 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
8409 (write_template_prefix): Use write_unqualified_name.
8410 (write_component): Remove.
8411 (write_local_name): Add parameter. Use direct local entity to
8412 discriminator calculation.
8413 (write_class_enum_type): Pass another argument to write_name.
8414 (write_template_template_arg): Likewise.
8415 (make_guard_variable): Likewise.
8417 2000-08-27 Jason Merrill <jason@redhat.com>
8419 * decl.c (pushdecl): Matching decls for local externs are found in
8420 the current level. Propagate linkage information from previous
8423 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
8425 * ir.texi (Expressions): Fix typo.
8427 2000-08-25 Greg McGary <greg@mcgary.org>
8429 * tree.c (init_tree): Use ARRAY_SIZE.
8431 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
8433 * error.c (cp_tree_printer): Rework.
8435 2000-08-25 Mark Mitchell <mark@codesourcery.com>
8437 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
8439 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
8440 (cp-demangle.o): Remove target.
8441 (dyn-string.o): Likewise.
8443 * decl.c (grokfndecl): Require that `main' return an `int'.
8444 * mangle.c (write_encoding): Don't mangle return types for
8445 conversion functions.
8447 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
8449 * error.c (tree_formatting_info): New data type.
8450 (tree_being_formatted): New macro.
8451 (tree_formatting_flags): Likewise.
8452 (put_whitespace): Likewise.
8453 (print_tree_identifier): Likewise.
8454 (print_identifier): Likewise.
8455 (cp_tree_printer, print_function_argument_list, print_declaration,
8456 print_expression, print_function_declaration,
8457 print_function_parameter, print_type, print_cv_qualifier): New
8459 (init_error): Initialize lang_printer.
8461 2000-08-24 Jason Merrill <jason@redhat.com>
8463 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
8464 adjustment necessary.
8466 2000-08-24 Greg McGary <greg@mcgary.org>
8468 * cp-tree.h (MAIN_NAME_P): Remove macro.
8470 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
8472 * error.c (print_instantiation_context): Don't forget to flush the
8475 2000-08-23 Jason Merrill <jason@redhat.com>
8477 * typeck.c (build_ptrmemfunc): Save the input pmf.
8479 * method.c (process_modifiers): Use same_type_p.
8481 2000-08-23 Mark Mitchell <mark@codesourcery.com>
8483 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
8484 * mangle.c (write_function_type): Change prototype.
8485 (write_encoding): Don't mangle return types for
8486 constructors or destructors.
8487 (write_type): Adjust call to write_function_type.
8488 * pt.c (instantiate_template): Instantiate alternate entry points
8489 when instantiating the main function.
8491 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
8493 * error.c (cp_print_error_function): Don't use embedded '\n' in
8496 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
8498 * decl.c (init_decl_processing): Remove bogus initialization.
8499 * error.c (lang_print_error_function): Restore here.
8500 (init_error): Initialize print_error_function.
8502 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8504 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
8506 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
8508 * Makefile.in (error.o): Depends on diagnostic.h
8510 * cp-tree.h (problematic_instantiation_changed,
8511 record_last_problematic_instantiation, current_instantiation,
8512 print_instantiation_context): Declare.
8513 (maybe_print_template_context): Remove.
8515 * decl.c (init_decl_processing): Set print_error_function to NULL.
8516 (lang_print_error_function): Remove, since we're using a new
8519 * error.c: #include diagnostic.h
8520 (function_category): New function.
8521 (cp_diagnostic_starter): Likewise.
8522 (cp_diagnostic_finalizer): Likewise.
8523 (cp_print_error_function): Likewise.
8524 (maybe_print_instantiation_context): Likewise.
8525 (print_instantiation_full_context): Likewise.
8526 (print_instantiation_partial_context): Likewise.
8527 (print_instantiation_context): Define.
8528 (init_error): Initialize diagnostic pager and finalizer.
8530 * pt.c (problematic_instantiation_changed): Define.
8531 (record_last_problematic_instantiation): Likewise.
8532 (current_instantiation): Likewise.
8533 (maybe_print_template_context): Remove.
8534 (print_template_context): Likewise.
8535 (current_tinst_level): Make static to reflect Brendan Kehoe's
8536 change of 1995-04-13.
8537 (push_tinst_level): Call print_instantiation_context.
8539 2000-08-21 Nix <nix@esperi.demon.co.uk>
8541 * lang-specs.h: Do not process -o or run the assembler if
8544 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
8546 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
8548 * decl2.c (lang_decode_option): Disable gettext attributes for
8551 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
8553 * lex.c (lang_init_options): Default diagnostic message maximum
8554 length to 80, when line-wrapping.
8556 2000-08-20 Mark Mitchell <mark@codesourcery.com>
8558 * class.c (build_vtbl_initializer): Clear the entire
8559 vtbl_init_data. Start keeping track of the functions for which we
8560 have created vcall offsets here.
8561 (dfs_build_vcall_offset_vtbl_entries): Remove.
8562 (build_vcall_offset_vtbl_entries): Reimplement.
8563 (add_vcall_offset_vtbl_entries_r): New function.
8564 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
8565 computing when vcall offsets are necessary.
8567 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8569 * decl.c (member_function_or_else): Use cp_error ... %T.
8570 (grokdeclarator): Likewise.
8571 (start_method): Likewise.
8572 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
8574 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8576 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
8579 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8581 * cp-tree.h (PTRMEM_OK_P): New macro.
8582 (itf_ptrmem_ok): New enumeration value.
8583 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
8584 argument. Diagnose implicit pointer to member.
8585 (instantiate_type): Don't diagnose implicit pointer to member
8586 here. Pass itf_ptrmem_ok if ok. Adjust calls to
8587 resolve_address_of_overloaded_function.
8588 * init.c (build_offset_ref): Set PTRMEM_OK_P.
8589 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
8590 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
8591 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
8592 (build_unary_op): Deal with single non-static member in
8595 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8597 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
8599 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8601 * cp-tree.h (enum_name_string): Remove prototype.
8602 (report_case_error): Remove prototype.
8603 * cp/typeck2.c (enum_name_string): Remove.
8604 (report_case_error): Remove.
8605 * error.c (dump_expr): Deal with enum values directly.
8606 Correctly negate integer constant.
8608 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8610 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
8611 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
8612 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
8613 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
8614 (__cxa_vec_new): Use __cxa_vec_new2.
8615 (__cxa_vec_delete): Use __cxa_vec_delete2.
8617 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8619 * vec.cc (__cxa_vec_new): Set "C" linkage.
8620 (__cxa_vec_ctor): Likewise.
8621 (__cxa_vec_cctor): Likewise.
8622 (__cxa_vec_dtor): Likewise.
8623 (__cxa_vec_delete): Likewise.
8624 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
8625 (__cxa_vec_ctor): Likewise.
8626 (__cxa_vec_cctor): Likewise.
8627 (__cxa_vec_dtor): Likewise.
8628 (__cxa_vec_delete): Likewise.
8630 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8632 * class.c (instantiate_type): Reinstate local variable
8633 deleted in previous change.
8635 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
8638 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8640 * cp-tree.h (instantiate_type_flags): New enumeration.
8641 (instantiate_type): Change parameter.
8642 * class.c (instantiate_type): Adjust prototype. Adjust.
8643 * call.c (standard_conversion): Adjust instantiate_type call.
8644 (reference_binding): Likewise.
8645 (build_op_delete_call): Likewise.
8646 (convert_like_real): Likewise.
8647 * cvt.c (cp_convert_to_pointer): Likewise.
8648 (convert_to_reference): Likewise.
8649 * pt.c (convert_nontype_argument): Likewise.
8650 * typeck.c (build_binary_op): Likewise.
8651 (build_ptrmemfunc): Likewise.
8652 (convert_for_assignment): Likewise.
8654 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8656 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
8657 (current_aggr): Define.
8658 * decl.c (grokdeclarator): Make sure a friend class is an
8659 elaborated type specifier.
8660 * parse.y (current_aggr): Remove static definition.
8661 (cp_parse_init): Adjust.
8662 (structsp): Clear and restore current_aggr.
8663 (component_decl_list): Clear current_aggr.
8665 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
8666 aggregate tag on the typename's context.
8668 * pt.c (tsubst_friend_class): Return error_mark_node, if
8670 (instantiate_class_template): Ignore error_mark_node friend types.
8672 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
8674 * cvt.c (warn_ref_binding): New static function, broken out of ...
8675 (convert_to_reference): ... here. Use it.
8677 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8679 * parse.y (template_arg): Add rule for template qualified with
8682 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8684 * decl2.c (add_function): Reorganize.
8685 (arg_assoc): Do not consider function template decls.
8687 2000-08-11 Jason Merrill <jason@redhat.com>
8689 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
8692 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8694 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
8695 (lookup_nested_tag): Likewise.
8697 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
8700 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8702 * parse.y (named_complex_class_head_sans_basetype): Remove
8705 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8707 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
8708 explicit TEMPLATE_ID_EXPR args.
8709 (build_expr_from_tree, case CALL_EXPR): Likewise.
8711 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8713 * decl.c (check_tag_decl): Diagnose typename's which don't
8716 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
8718 * init.c (build_aggr_init): Reject bogus array initializers
8721 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
8723 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
8725 * cp/tinfo.cc (__dynamic_cast): Likewise.
8726 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
8728 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
8730 * cvt.c (convert_to_pointer_force): Fix error message when
8731 attempting to cast from ambiguous base.
8733 2000-08-08 Jason Merrill <jason@redhat.com>
8735 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
8736 (tsubst_template_arg_vector): Likewise.
8738 * decl2.c (build_anon_union_vars): Choose the largest field; don't
8739 assume that one will be as large as the union.
8741 2000-08-07 Kazu Hirata <kazu@hxi.com>
8743 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
8744 * decl.c (pop_labels): Likewise.
8746 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
8748 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
8750 (__pointer_to_member_type_info): Likewise.
8751 (__base_class_info): Likewise.
8752 (__class_type_info): Likewise.
8753 (__si_class_type_info): Likewise.
8754 (__vmi_class_type_info): Likewise.
8755 * tinfo.cc (__si_class_type_info::__do_find_public_src):
8756 Changed member names to match specifications.
8757 (__vmi_class_type_info::__do_find_public_src): Likewise.
8758 (__si_class_type_info::__do_dyncast): Likewise.
8759 (__vmi_class_type_info::__do_dyncast): Likewise.
8760 (__si_class_type_info::__do_upcast): Likewise.
8761 (__vmi_class_type_info::__do_upcast): Likewise.
8762 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
8763 (__pbase_type_info::__pointer_catch): Likewise.
8764 (__pointer_type_info::__pointer_catch): Likewise.
8765 (__pointer_to_member_type_info::__pointer_catch): Likewise.
8767 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
8769 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
8770 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
8771 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
8773 2000-08-04 Mark Mitchell <mark@codesourcery.com>
8775 * cp-tree.h (add_method): Change prototype.
8776 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
8777 Don't double the size of the method vector in the error case.
8778 (handle_using_decl): Adjust call to add_method.
8779 (add_implicitly_declared_members): Likewise.
8780 (clone_function_decl): Likewise.
8781 * decl2.c (check_classfn): Likewise.
8782 * semantics.c (finish_member_declaration): Likewise.
8784 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
8786 * decl.c (flag_isoc94): New variable.
8788 2000-08-02 Jason Merrill <jason@redhat.com>
8790 * pt.c (do_type_instantiation): Add complain parm; don't complain
8791 if called recursively.
8792 * cp-tree.h, parse.y: Adjust.
8794 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
8796 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
8797 -Wno-strict-prototypes.
8799 * g++spec.c: Adjust type of second argument to
8800 lang_specific_driver, and update code as necessary.
8802 * cp-tree.h: Don't prototype min_precision here.
8803 (my_friendly_assert): Cast expression to void.
8804 * semantics.c (do_poplevel): Initialize scope_stmts.
8806 2000-08-02 Mark Mitchell <mark@codesourcery.com>
8808 * cp-tree.h (DECL_NEEDED_P): Tweak.
8810 2000-07-28 Jason Merrill <jason@redhat.com>
8812 * lang-specs.h: Use %i in rule for .ii files.
8814 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
8816 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
8818 2000-07-30 Mark Mitchell <mark@codesourcery.com>
8820 Allow indirect primary bases.
8821 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
8823 (CLASSTYPE_VFIELD_PARENT): Remove.
8824 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
8825 (BINFO_PRIMARY_BINFO): Remove.
8826 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
8827 (BINFO_VBASE_PRIMARY_P): Likewise.
8828 (BINFO_PRIMARY_BASE_OF): New macro.
8829 (BINFO_INDIRECT_PRIMARY_P): Likewise.
8830 (get_primary_binfo): New function.
8831 * decl.c (lang_mark_tree): Make lang_type::primary_base.
8832 * class.c (vcall_offset_data_s): Rename to ...
8833 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
8834 and add ctor_vtbl_p.
8835 (get_derived_offset): Use get_primary_binfo.
8836 (dfs_mark_primary_bases): Adjust handling of virtual primary
8838 (mark_primary_bases): Likewise.
8839 (set_primary_base): Take a binfo, not an integer, as a
8840 representation of the primary base.
8841 (indirect_primary_base_p): Remove.
8842 (determine_primary_base): Adjust for indirect primary bases.
8843 (dfs_find_final_overrider): Fix typo in coment.
8844 (update_vtable_entry_for_fn): Use get_primary_binfo.
8845 (layout_nonempty_base_or_field): Tweak.
8846 (build_base_fields): Adjust for new primary base semantics.
8847 (dfs_propagate_binfo_offsets): Remove.
8848 (propagate_binfo_offsets): Rewrite.
8849 (dfs_set_offset_for_shared_vbases): Remove.
8850 (layout_virtual_bases): Don't use it.
8851 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
8853 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
8854 CLASSTYPE_VFIELD_PARENT.
8855 (dfs_get_primary_binfo): New function.
8856 (get_primary_binfo): Likewise.
8857 (dump_class_hierarchy_r): Tweak printing of primary bases.
8858 (build_vtbl_initializer): Fix typo in comments. Use
8860 (build_vcall_and_vbase_vtbl_entries): Likewise.
8861 (build_vbaes_offset_vtbl_entries): Likewise.
8862 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
8863 BV_VCALL_INDEX to handle indirect primary bases.
8864 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
8865 (build_rtti_vtbl_entries): Likewise.
8866 * search.c (get_shared_vbase_if_not_primary): Tweak.
8867 (find_vbase_instance): Likewise.
8868 (binfo_for_vtable): Simplify.
8869 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
8870 (make_binfo): Make it have 11 entries.
8872 2000-07-30 Alex Samuel <samuel@codesourcery.com>
8874 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
8875 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
8876 ascertaining primaryness.
8877 (G): Remove template_args.
8878 (decl_is_template_id): New function.
8879 (write_encoding): Use decl_is_template_id.
8880 (write_name): Likewise. Handle type_decls. Get main variant of
8882 (write_nested_name): Likewise.
8883 (write_prefix): Likewise.
8884 (write_template_prefix): Likewise.
8885 (write_special_name_constructor): Remove defunct production from
8887 (write_bare_function_type): Remove comment about absent parameter.
8888 (write_template_template_arg): Add missing grammar production to
8891 2000-07-27 Jason Merrill <jason@redhat.com>
8893 * decl.c (duplicate_decls): If common_type produces a non-typedef
8894 type for a typedef, just use the old type.
8896 2000-07-27 Mark Mitchell <mark@codesourcery.com>
8898 * cp-tree.h (function_depth): Declare.
8899 (verify_stmt_tree): Likewise.
8900 (find_tree): Likewise.
8901 * decl.c (function_depth): Give it external linkage.
8902 * optimize.c (optimize_function): Increment and decrement it.
8903 * tree.c (verify_stmt_tree_r): New function.
8904 (verify_stmt_tree): Likewise.
8905 (find_tree_r): Likewise.
8906 (find_tree): Likewise.
8908 2000-07-27 Jason Merrill <jason@redhat.com>
8910 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
8912 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
8914 2000-07-26 Mark Mitchell <mark@codesourcery.com>
8916 * decl.c (start_cleanup_fn): Mark the function as `inline'.
8917 * decl2.c (get_guard): Call cp_finish_decl, not
8918 rest_of_decl_compilation, for local guards.
8919 * lex.c (do_identifier): Remove unused variable.
8921 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
8923 * parse.y: Add missing ';'.
8925 2000-07-26 Mark Mitchell <mark@codesourcery.com>
8927 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
8930 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
8932 Kill strict_prototype. Backwards compatibility only for
8933 non NO_IMPLICIT_EXTERN_C systems.
8934 * cp-tree.h (flag_strict_prototype): Remove.
8935 (strict_prototype): Remove.
8936 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
8937 * decl.c (maybe_push_to_top_level): Adjust.
8938 (pop_from_top_level): Adjust.
8939 (decls_match): Only allow sloppy parm matching for ancient
8941 (init_decl_processing): Adjust.
8942 (grokdeclarator): Adjust.
8943 * decl2.c (flag_strict_prototype): Remove.
8944 (strict_prototype): Remove.
8945 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
8946 (lang_f_options): Remove "strict-prototype".
8947 (unsupported-options): Add "strict-prototype".
8948 * lex.c (do_identifier): Adjust.
8949 (do_scoped_id): Adjust.
8950 * parse.y (empty_parms): Adjust.
8951 * class.c (push_lang_context): Adjust.
8952 (pop_lang_context): Adjust.
8953 * typeck.c (comp_target_parms): Adjust.
8955 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
8957 * decl.c (poplevel): Deal with anonymous variables at for scope.
8958 (maybe_inject_for_scope_var): Likewise.
8960 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
8962 * decl.c: Remove all signal handling code, now done in toplev.c.
8964 2000-07-23 Mark Mitchell <mark@codesourcery.com>
8966 * decl.c (make_rtl_for_nonlocal_decl): Rework.
8968 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
8971 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
8973 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
8974 Define my_friendly_assert and my_friendly_abort as macros
8975 which may call friendly_abort. Prototype friendly abort, not
8976 my_friendly_abort or my_friendly_assert.
8977 * decl.c (signal_catch): Report the signal caught in the error
8978 message. Call fatal directly.
8979 * typeck2.c (ack, my_friendly_assert): Delete.
8980 (my_friendly_abort): Rename to friendly_abort. Expect file,
8981 line, and function parameters. Report the abort code, then
8982 call fancy_abort. Do not mask an abort if errors have
8985 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
8987 * typeck.c (comp_target_parms): Remove obsolete parameter.
8988 (comp_target_types): Adjust.
8990 2000-07-17 Jason Merrill <jason@redhat.com>
8992 * typeck.c (mark_addressable): Never set TREE_USED.
8993 * call.c (build_call): Don't abort on calls to library functions
8994 that have been declared normally.
8996 * typeck.c (build_binary_op): Fix grammar in warning.
8998 * exception.cc (__eh_free): Fix prototype.
9000 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
9002 * decl.c (pushdecl): Handle seeing an OVERLOAD in
9003 IDENTIFIER_NAMESPACE_VALUE.
9005 2000-07-16 Mark Mitchell <mark@codesourcery.com>
9007 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
9008 * method.c (use_thunk): Correct handling of vcall offsets.
9010 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
9012 * .cvsignore: parse.h and parse.c have no cp- prefix.
9014 2000-07-13 Mark Mitchell <mark@codesourcery.com>
9016 * .cvsignore: New file.
9018 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
9020 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
9022 2000-07-12 Mark Mitchell <mark@codesourcery.com>
9024 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
9026 * parse.h: Likewise.
9028 2000-07-11 Mark Mitchell <mark@codesourcery.com>
9030 * class.c (layout_class_type): Add pointers to virtual bases after
9031 base classes under the old ABI.
9033 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
9035 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
9036 (finish_continue_stmt): Likewise.
9037 (begin_for_stmt): Remove call to note_level_for_for.
9038 (finish_goto_stmt): Change call from build_min_nt
9040 (finish_expr_stmt): Likewise.
9041 (begin_if_stmt): Likewise.
9042 (begin_while_stmt): Likewise.
9043 (finish_while_stmt): Likewise.
9044 (finish_return_stmt): Likewise.
9045 (begin_for_stmt): Likewise.
9046 (finish_for_stmt): Likewise.
9047 (finish_break_stmt): Likewise.
9048 (begin_switch_stmt): Likewise.
9049 (finish_case_label): Likewise.
9050 (genrtl_try_block): Likewise.
9051 (begin_try_block): Likewise.
9052 (begin_handler): Likewise.
9053 (begin_compound_stmt): Likewise.
9054 (finish_asm_stmt): Likewise.
9055 (finish_label_stmt): Likewise.
9056 (add_decl_stmt): Likewise.
9057 (finish_subobject): Likewise.
9058 (finish_decl_cleanup): Likewise.
9059 (finish_named_return_value): Likewise.
9060 (setup_vtbl_ptr): Likewise.
9061 (add_scope_stmt): Likewise.
9062 * decl.c (finish_constructor_body): Likewise.
9063 (finish_destructor_body): Likewise.
9064 * optimize.c (copy_body_r): Likewise.
9065 (initialize_inlined_parameters): Likewise.
9066 (declare_return_variable): Likewise.
9067 (expand_call_inline): Likewise.
9069 2000-07-10 Jakub Jelinek <jakub@redhat.com>
9071 * semantics.c (expand_body): Sync interface information
9072 at the end of function body expansion.
9074 2000-07-09 Jason Merrill <jason@redhat.com>
9076 * init.c (build_new_1): Bail early if the call to new fails.
9078 * decl.c (compute_array_index_type): Check specifically for
9079 an INTEGER_CST, not just TREE_CONSTANT.
9081 * decl.c (duplicate_decls): Don't call duplicate_decls on
9082 the DECL_TEMPLATE_RESULT.
9083 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
9086 * error.c (dump_template_bindings): Don't crash if we had an
9087 invalid argument list.
9089 * typeck.c (c_expand_start_case): Do narrowing here.
9090 * semantics.c (finish_switch_cond): Not here.
9092 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
9094 * parse.y (asm_clobbers): Do string concatenation.
9096 2000-07-09 Mark Mitchell <mark@codesourcery.com>
9098 * decl.c (pushtag): Don't put local classes in template functions
9099 on the local_classes list.
9101 2000-07-04 Scott Snyder <snyder@fnal.gov>
9103 * decl2.c (get_guard): Add missing return for old ABI local
9106 2000-07-09 Mark Mitchell <mark@codesourcery.com>
9108 * cp-tree.h (char_type_p): New function.
9109 * decl.c (init_decl_processing): Don't initialize
9110 signed_wchar_type_node or unsigned_wchar_type_node.
9111 (complete_array_type): Handle brace-enclosed string-constants.
9112 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
9113 * tree.c (char_type_p): New function.
9114 * typeck2.c (digest_init): Use char_type_p.
9116 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9118 * pt.c (tsubst): Don't layout type, if it's error_mark.
9120 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9122 * pt.c (instantiate_pending_templates): Reset template level.
9124 2000-07-05 Jason Merrill <jason@redhat.com>
9126 * call.c (joust): Don't complain about `operator char *()' beating
9127 `operator const char *() const'.
9129 2000-07-04 scott snyder <snyder@fnal.gov>
9130 Jason Merrill <jason@redhat.com>
9132 * repo.c (repo_get_id): Handle the case where a class with virtual
9133 bases has a null TYPE_BINFO_VTABLE.
9135 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
9136 Jason Merrill <jason@redhat.com>
9138 * parse.y (member_init): Just pass in the type.
9139 * init.c (expand_member_init): Handle getting a type.
9141 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9142 Jason Merrill <jason@redhat.com>
9144 * decl.c (finish_function): Warn if a function has no return
9146 Suggested by Andrew Koenig.
9147 * typeck.c (check_return_expr): Do set current_function_returns_value
9148 if we got an error_mark_node.
9150 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
9152 * decl2.c (push_decl_namespace): Push the original namespace.
9154 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
9156 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
9157 * semantics.c (begin_class_definition): Clear it.
9159 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
9161 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
9162 (genrtl_expr_stmt): Likewise.
9163 (genrtl_decl_stmt): Likewise.
9164 (genrtl_if_stmt): Likewise.
9165 (genrtl_while_stmt): Likewise.
9166 (genrtl_do_stmt): Likewise.
9167 (genrtl_return_stmt): Likewise.
9168 (genrtl_for_stmt): Likewise.
9169 (genrtl_break_stmt): Likewise.
9170 (genrtl_continue_stmt): Likewise.
9171 (genrtl_scope_stmt): Likewise.
9172 (genrtl_switch_stmt): Likewise.
9173 (genrtl_case_label): Likewise.
9174 (genrtl_begin_compound_stmt): Likewise.
9175 (genrtl_finish_compound_stmt): Likewise.
9176 (genrtl_compound_stmt): Likewise.
9177 (genrtl_asm_stmt): Likewise.
9179 * init.c (begin_init_stmts): Remove call to
9180 genrtl_begin_compound_stmt.
9181 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
9183 * semantics.c (lang_expand_stmt): Changed call to
9184 genrtl_compound_stmt to ignore return value.
9186 2000-07-02 Mark Mitchell <mark@codesourcery.com>
9188 * mangle.c (canonicalize_for_substitution): Return the canonical
9191 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
9193 * typeck.c (commonparms): Remove obstack manipulations.
9195 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
9197 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
9199 * Makefile.in (OBJS): Added ../c-semantics.o.
9200 (OBJDEPS): Likewise.
9202 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
9204 (struct stmt_tree): Added comment.
9205 (current_function_name_declared): Removed.
9206 (stmts_are_full_exprs_p): Likewise.
9207 (genrtl_do_pushlevel): Likewise.
9208 (genrtl_clear_out_block): Likewise.
9209 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
9210 (DECL_ANON_UNION_ELEMS): Likewise.
9211 (emit_local_var): Likewise.
9212 (make_rtl_for_local_static): Likewise.
9213 (do_case): Likewise.
9214 (expand_stmt): Likewise.
9215 (genrtl_decl_cleanup): Likewise.
9216 (c_expand_asm_operands): Likewise.
9217 (c_expand_return): Likewise.
9218 (c_expand_start_case): Likewise.
9220 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
9221 (emit_local_var): Likewise.
9222 (initialize_local_var): Change reference to
9223 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
9224 Change reference to stmts_are_full_exprs_p to
9225 current_stmt_tree->stmts_are_full_exprs_p.
9226 (push_cp_function_context): Likewise.
9228 * expect.c (expand_throw): Change reference to
9229 stmts_are_full_exprs_p.
9231 * init.c (build_aggr_init): Change reference to
9232 stmts_are_full_exprs_p.
9233 (build_vec_init): Likewise.
9235 * optimize.c (maybe_clone_body): Change reference to
9236 current_function_name_declared to
9237 cp_function_chain->name_declared.
9239 * pt.c (instantiate_decl): Change reference to
9240 current_function_name_declared to
9241 cp_function_chain->name_declared.
9243 * semantics.c (expand_cond): Moved declaration to c-common.h.
9244 (genrtl_do_pushlevel): Moved to c-semantics.c.
9245 (genrtl_clear_out_block): Likewise.
9246 (genrtl_goto_stmt): Likewise.
9247 (genrtl_expr_stmt): Likewise.
9248 (genrtl_decl_stmt): Likewise.
9249 (gerntl_if_stmt): Likewise.
9250 (genrtl_while_stmt): Likewise.
9251 (genrtl_do_stmt): Likewise.
9252 (genrtl_return_stmt): Likewise.
9253 (genrtl_for_stmt): Likewise.
9254 (genrtl_break_stmt): Likewise.
9255 (genrtl_continue_stmt): Likewise.
9256 (genrtl_scope_stmt): Likewise.
9257 (genrtl_switch_stmt): Likewise.
9258 (genrtl_case_label): Likewise.
9259 (genrtl_begin_compound_stmt): Likewise.
9260 (genrtl_finish_compound_stmt): Likewise.
9261 (genrtl_compound_stmt): Likewise.
9262 (genrtl_asm_stmt): Likewise.
9263 (genrtl_decl_cleanup): Likewise.
9264 (expand_cond): Likewise.
9265 (expand_stmt): Renamed to ...
9266 (lang_expand_stmt): ... this.
9267 (lang_expand_expr_stmt): Initialize.
9268 (set_current_function_name_declared): Likewise.
9269 (stmts_are_full_exprs_p): Likewise.
9270 (current_function_name_declared): Likewise.
9271 (anon_aggr_type_p): Likewise.
9272 (do_poplevel): Change reference to
9273 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
9274 Change reference to stmts_are_full_exprs_p to
9275 current_stmt_tree->stmts_are_full_exprs_p.
9276 (add_tree): Likewise.
9277 (finish_expr_stmt): Likewise.
9278 (prep_stmt): Likewise.
9279 (lang_expand_stmt): Likewise.
9280 (begin_compound_stmt): Change reference to
9281 current_function_name_declared to
9282 cp_function_chain->name_declared and call to
9283 current_function_name_declared().
9284 (setup_vtbl_ptr): Likewise.
9285 (genrtl_do_poplevel): Removed.
9287 2000-06-30 Jason Merrill <jason@redhat.com>
9289 * init.c (init_init_processing): Go back to aligning like
9290 double_type_node for old ABI.
9291 (get_cookie_size): Make cookie larger if we get a type that needs
9293 (build_vec_delete): Call it.
9295 * typeck.c (qualify_type_recursive): New fn.
9296 (composite_pointer_type): Use it.
9297 (build_binary_op): Use composite_pointer_type.
9299 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
9300 Jason Merrill <jason@redhat.com>
9302 * typeck.c (check_return_expr): Don't complain about returning
9303 NULL from operator new if -fcheck-new.
9304 * cp-tree.h: Declare flag_check_new here.
9307 2000-06-28 Alex Samuel <samuel@codesourcery.com>
9309 * mangle.c (find_substitution): Use same_type_p.
9310 (write_encoding): Don't check for substitutions.
9312 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
9314 * parse.y (expr_no_comma_rangle): New non-terminal.
9315 (template_parm): Use it for default parameter case.
9316 (template_arg): Use it.
9317 (expr_no_commas): Remove commented out undefined extensions.
9318 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
9319 * parse.h, parse.c: Rebuilt.
9321 2000-06-30 Mark Mitchell <mark@codesourcery.com>
9323 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
9324 (finish_asm_stmt): Do it here, instead.
9326 * cp-tree.h (ridpointers): Don't declare.
9327 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
9328 (record_builtin_java_type): Likewise.
9329 (init_decl_processing): Likewise.
9330 * lex.c: Move inclusion of lex.h.
9331 (ridpointers): Don't define.
9332 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
9334 * lex.h (enum rid): Rename to ...
9335 (enum cp_rid): ... this.
9336 (ridpointers): Don't declare.
9337 * parse.y: Move inclusion of lex.h.
9338 * parse.c: Regenerated.
9339 * spew.c: Move inclusion of lex.h.
9341 * cp-tree.h (struct language_function): Remove temp_name_counter.
9342 (temp_name_counter): Remove.
9343 (get_temp_name): Change prototype.
9344 (get_guard): New function.
9345 (get_guard_cond): Likewise.
9346 (set_guard): Likewise.
9347 * cvt.c (build_up_reference): Adjust call to get_temp_name.
9348 * decl.c (expand_static_init): Use get_guard and friends to
9349 implement guard variables.
9350 * decl2.c (get_temp_name): Assume that the variables created are
9352 (get_sentry): Rename to ...
9353 (get_guard): ... this. Implement new ABI guard variables.
9354 (get_guard_bits): New function.
9355 (get_guard_cond): Likewise.
9356 (set_guard): Likewise.
9357 (start_static_initialization_or_destruction): Use them.
9358 (do_static_initialization): Replace sentry with guard throughout.
9359 (do_static_destruction): Likewise.
9360 * init.c (create_temporary_var): Add comment.
9362 2000-06-28 Alex Samuel <samuel@codesourcery.com>
9364 * mangle.c (find_substitution): Use same_type_p.
9365 (write_encoding): Don't check for substitutions.
9367 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
9369 * parse.y (expr_no_comma_rangle): New non-terminal.
9370 (template_parm): Use it for default parameter case.
9371 (template_arg): Use it.
9372 (expr_no_commas): Remove commented out undefined extensions.
9373 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
9374 * parse.h, parse.c: Rebuilt.
9376 2000-06-29 Mark Mitchell <mark@codesourcery.com>
9378 * cp-tree.h (flag_const_strings): Remove.
9379 (warn_parentheses): Likewise.
9380 (warn_format): Likewise.
9381 (common_type): Likewise.
9382 (default_conversion): Likewise.
9383 (build_binary_op): Likewise.
9384 (cp_build_binary_op): New macro.
9385 * call.c (build_new_op): Use cp_build_binary_op instead of
9387 * class.c (build_vtable_entry_ref): Likewise.
9388 * decl.c (expand_static_init): Likewise.
9389 (compute_array_index_type): Likewise.
9390 (build_enumerator): Likewise.
9391 * decl2.c (delete_sanity): Likewise.
9392 (start_static_initialization_or_destruction): Likewise.
9393 * error.c (dump_type_suffix): Likewise.
9394 * init.c (resolve_offset_ref): Likewise.
9395 (build_new): Likewise.
9396 (build_new_1): Likewise.
9397 (build_vec_delete_1): Likewise.
9398 (build_vec_init): Likewise.
9399 (build_delete): Likewise.
9400 * rtti.c (synthesize_tinfo_fn): Likewise.
9401 (synthesize_tinfo_var): Likewise.
9402 * search.c (expand_upcast_fixups): Likewise.
9403 (fixup_all_virtual_upcast_offsets): Likewise.
9404 * typeck.c (build_array_ref): Likewise.
9405 (get_member_function_from_ptrfunc): Likewise.
9406 (build_binary_op): Add parameter.
9407 (pointer_int_sum): Use cp_build_binary_op.
9408 (pointer_diff): Likewise.
9409 (build_modify_expr): Likewise.
9410 (get_delta_difference): Likewise.
9411 (build_ptrmemfunc): Likewise.
9413 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
9415 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
9416 * decl.c (create_implicit_typedef): Adjust.
9417 * decl2.c (build_artificial_parm): Adjust.
9418 * method.c (implicitly_declare_fn): Adjust.
9419 * pt.c (push_inline_template_parms_recursive): Adjust.
9420 (process_template_parm): Adjust.
9421 (overloaded_template_name): Adjust.
9422 * semantics.c (finish_template_template_parm): Adjust.
9424 2000-06-28 Mark Mitchell <mark@codesourcery.com>
9426 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
9427 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
9428 where to emit thunks.
9429 (build_vtt): Adjust call to build_vtt_inits.
9430 (build_vtt_inits): Add parameter to indicate whether or not
9431 sub-VTTs for virtual bases should be included. Adjust handling of
9432 construction vtables.
9433 (get_matching_base): New function.
9434 (dfs_build_vtt_inits): Rename to ...
9435 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
9436 construction vtables.
9437 (dfs_fixup_binfo_vtbls): Likewise.
9438 (build_ctor_vtbl_groups): Build construction vtables for virtual
9440 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
9441 to build construction vtbls.
9442 (dfs_accumulate_vtbl_inits): Adjust handling of
9443 construction vtables.
9445 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
9448 2000-06-27 Mark Mitchell <mark@codesourcery.com>
9450 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
9452 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
9454 * search.c (hides): Remove.
9455 (is_subobject_of_p): Add most_derived parameter. Use
9457 (lookup_field_queue_p): Adjust.
9458 (lookup_field_r): Adjust.
9460 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
9462 * decl2.c (handle_class_head): Bash typedefs to the type's main
9465 2000-06-25 Mark Mitchell <mark@codesourcery.com>
9467 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
9468 (begin_global_stmt_expr): ... this.
9469 (genrtl_finish_stmt_expr): Rename to ...
9470 (finish_global_stmt_expr): ... this.
9471 * init.c (begin_init_stmts): Adjust calls.
9472 (finish_init_stmts): Likewise.
9473 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
9474 (begin_global_stmt_expr): ... this.
9475 (genrtl_finish_stmt_expr): Rename to ...
9476 (finish_global_stmt_expr): ... this.
9478 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9480 * search.c (lookup_member): Fix typo in comment.
9482 2000-06-24 Jason Merrill <jason@redhat.com>
9484 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
9485 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
9487 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9489 * parse.y (complex_direct_notype_declarator): Support global_scope.
9490 * Makefile.in: Adjust conflict count.
9492 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9494 * parse.y (template_arg): Convert TEMPLATE_DECL
9495 that is a template template parameter to
9496 TEMPLATE_TEMPLATE_PARM here.
9498 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9499 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
9500 (copy_template_template_parm): Adjust prototype.
9501 * decl.c (grokdeclarator): Remove dead code.
9502 * pt.c (process_template_parm): Tidy.
9503 (lookup_template_class): Construct nodes in
9504 copy_template_template_parm.
9505 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
9506 lookup_template_class. Use TYPE_TI_TEMPLATE.
9507 * tree.c (copy_template_template_parm): Add NEWARGS
9509 (mapcar): Adjust call to copy_template_template_parm.
9510 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
9511 * method.c (build_template_template_parm_names): Change error
9512 code to avoid compilation warning.
9514 * gxxint.texi: Document template template parameter
9517 2000-06-21 Alex Samuel <samuel@codesourcery.com>
9519 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
9520 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
9521 (cp-demangle.o): New rule.
9522 (dyn-string.o): Likewise.
9523 * inc/cxxabi.h (__cxa_demangle): New declaration.
9525 2000-06-22 Mark Mitchell <mark@codesourcery.com>
9527 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
9528 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
9529 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
9531 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
9532 (make_thunk): Change prototype.
9533 (emit_thunk): Rename to use_thunk.
9534 (mangle_thunk): Change prototype.
9535 * class.c (get_derived_offset): Simplify.
9536 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
9537 BV_GENERATE_THUNK_WITH_VTABLE_P.
9538 (build_primary_vtable): Simplify.
9539 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
9540 (dfs_find_base): Remove.
9541 (update_vtable_entry_for_fn): Correct bug in finding the base
9542 where a virtual function was first declared. Figure out whether
9543 or not to emit a vcall-thunk with the vtables in which it appears.
9544 Correct logic for deciding whether to use an ordinary thunk, or a
9546 (finish_struct_1): Remove unnecssary code.
9547 (build_vtbl_initializer): Use ssize_int for the running counter of
9549 (build_vtbl_initializer): Only use vcall thunks where necessary.
9550 Mark thunks as needing to be emitted with their vtables, or not.
9551 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
9552 indices. Use size_binop.
9553 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
9554 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
9556 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
9557 (build_vtable_entry): Mark thunks as needing to be emitted with
9558 their vtables, or not.
9559 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
9560 * decl2.c (mark_vtable_entries): Use use_thunk instead of
9562 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
9564 * error.c (dump_expr): Use BV_FN.
9565 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
9567 * method.c (make_thunk): Likewise.
9568 (emit_thunk): Rename to use_thunk. Allow callers to decide
9569 whether or not to actually emit the thunk. Adjust for changes in
9570 representation of vcall offsets.
9571 * search.c (dfs_get_pure_virtuals): Use BV_FN.
9572 * semantics.c (emit_associated_thunks): New function.
9573 (expand_body): Use it.
9574 * ir.texi: Adjust decriptions of thunks.
9576 2000-06-22 Jason Merrill <jason@redhat.com>
9578 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
9579 (tsubst_friend_function): Copy it here.
9581 * decl.c (grok_op_properties): Fix typo.
9583 * decl2.c (delete_sanity): Clarify warning, avoid failure on
9586 * pt.c (check_explicit_specialization): Clarify error.
9588 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
9589 an old OVERLOAD when we're declaring a non-function.
9590 (pushdecl, destroy_local_var): Check for error_mark_node.
9591 (warn_extern_redeclared_static): Also bail early if
9593 (push_overloaded_decl): Ignore an old error_mark_node.
9595 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
9597 * call.c (build_x_va_arg): Check if in a template decl.
9598 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
9600 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9602 * class.c (push_lang_context): TYPE_NAME gets you to the Java
9604 * decl.c (check_goto): Computed gotos assumed OK.
9606 2000-06-20 Jason Merrill <jason@redhat.com>
9608 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
9609 for which we don't need to look for instantiations.
9611 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
9613 * parse.y (program): Always call finish_translation_unit.
9614 * parse.c, parse.h: Rebuilt.
9616 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
9618 * method.c: Don't include hard-reg-set.h.
9620 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
9622 * rtti.c (get_base_offset): Cope when vbase field is in a base.
9624 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
9626 * call.c (build_conditional_expr): Use VOID_TYPE_P.
9627 * cvt.c (cp_convert_to_pointer): Likewise.
9628 (convert_to_void): Likewise.
9629 * error.c (dump_expr): Likewise.
9630 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
9631 * init.c (build_delete): Likewise.
9632 * method.c (emit_thunk): Likewise.
9633 * optmize.c (declare_return_variable): Likewise.
9634 * rtti.c (get_tinfo_decl_dynamic): Likewise.
9635 (get_typeid): Likewise.
9636 (build_dynamic_cast_1): Likewise.
9637 * typeck.c (composite_pointer_type): Likewise.
9638 (common_type): Likewise.
9639 (build_indirect_ref): Likewise.
9640 (build_binary_op): Likewise.
9641 (build_x_compound_expr): Likewise.
9642 (check_return_expr): Likewise.
9643 * typeck2.c (add_exception_specifier): Likewise.
9645 * mangle.c (write_method_parms): Use direct comparison for end
9648 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
9650 * cp-tree.h (genrtl_try_block): Declare function.
9651 (genrtl_handler): Likewise.
9652 (genrtl_catch_block): Likewise.
9653 (genrtl_ctor_stmt): Likewise.
9654 (genrtl_subobject): Likewise.
9655 (genrtl_decl_cleanup): Likewise.
9656 (genrtl_do_poplevel): Likewise.
9657 (genrtl_do_pushlevel): Likewise.
9658 (genrtl_clear_out_block): Likewise.
9659 (genrtl_goto_stmt): Likewise.
9660 (genrtl_expr_stmt): Likewise.
9661 (genrtl_decl_stmt): Likewise.
9662 (genrtl_if_stmt): Likewise.
9663 (genrtl_while_stmt): Likewise.
9664 (genrtl_do_stmt): Likewise.
9665 (genrtl_return_stmt): Likewise.
9666 (genrtl_for_stmt): Likewise.
9667 (genrtl_break_stmt): Likewise.
9668 (genrtl_continue_stmt): Likewise.
9669 (genrtl_scope_stmt): Likewise.
9670 (genrtl_switch_stmt): Likewise.
9671 (genrtl_case_label): Likewise.
9672 (genrtl_begin_compound_stmt): Likewise.
9673 (genrtl_finish_compound_stmt): Likewise.
9674 (genrtl_compound_stmt): Likewise.
9675 (genrtl_asm_stmt): Likewise.
9676 (genrtl_named_return_value): Likewise.
9677 (genrtl_begin_stmt_expr): Likewise.
9678 (genrtl_finish_stmt_expr): Likewise.
9679 (finish_for_stmt): Removed first argument.
9680 (finish_switch_stmt): Likewise.
9682 * semantics.c (genrtl_try_block): Define function.
9683 (genrtl_handler): Likewise.
9684 (genrtl_catch_block): Likewise.
9685 (genrtl_ctor_stmt): Likewise.
9686 (genrtl_subobject): Likewise.
9687 (genrtl_decl_cleanup): Likewise.
9688 (genrtl_do_poplevel): Likewise.
9689 (genrtl_do_pushlevel): Likewise.
9690 (genrtl_clear_out_block): Likewise.
9691 (genrtl_goto_stmt): Likewise.
9692 (genrtl_expr_stmt): Likewise.
9693 (genrtl_decl_stmt): Likewise.
9694 (genrtl_if_stmt): Likewise.
9695 (genrtl_while_stmt): Likewise.
9696 (genrtl_do_stmt): Likewise.
9697 (genrtl_return_stmt): Likewise.
9698 (genrtl_for_stmt): Likewise.
9699 (genrtl_break_stmt): Likewise.
9700 (genrtl_continue_stmt): Likewise.
9701 (genrtl_scope_stmt): Likewise.
9702 (genrtl_switch_stmt): Likewise.
9703 (genrtl_case_label): Likewise.
9704 (genrtl_begin_compound_stmt): Likewise.
9705 (genrtl_finish_compound_stmt): Likewise.
9706 (genrtl_compound_stmt): Likewise.
9707 (genrtl_asm_stmt): Likewise.
9708 (genrtl_named_return_value): Likewise.
9709 (genrtl_begin_stmt_expr): Likewise.
9710 (genrtl_finish_stmt_expr): Likewise.
9711 (finish_for_stmt): Removed first argument and generate rtl
9713 (finish_switch_stmt): Likewise.
9714 (do_poplevel): Removed generate rtl specific code.
9715 (do_pushlevel): Likewise.
9716 (add_tree): Likewise.
9717 (finish_goto_stmt): Likewise.
9718 (finish_expr_stmt): Likewise.
9719 (begin_if_stmt): Likewise.
9720 (finish_if_stmt_cond): Likewise.
9721 (finish_then_clause): Likewise.
9722 (begin_else_clause): Likewise.
9723 (finish_else_clause): Likewise.
9724 (finish_if_stmt): Likewise.
9725 (clear_out_block): Likewise.
9726 (begin_while_stmt): Likewise.
9727 (finish_while_stmt_cond): Likewise.
9728 (finish_while_stmt): Likewise.
9729 (begin_do_stmt): Likewise.
9730 (finish_do_body): Likewise.
9731 (finish_do_stmt): Likewise.
9732 (finish_return_stmt): Likewise.
9733 (begin_for_stmt): Likewise.
9734 (finish_for_init_stmt): Likewise.
9735 (finish_for_cond): Likewise.
9736 (finish_for_expr): Likewise.
9737 (finish_break_stmt): Likewise.
9738 (finish_continue_stmt): Likewise.
9739 (begin_switch_stmt): Likewise.
9740 (finish_switch_cond): Likewise.
9741 (finish_case_label): Likewise.
9742 (begin_try_block): Likewise.
9743 (begin_function_try_block): Likewise.
9744 (finish_try_block): Likewise.
9745 (finish_cleanup_try_block): Likewise.
9746 (finish_cleanup): Likewise.
9747 (finish_function_try_block): Likewise.
9748 (finish_handler_sequence): Likewise.
9749 (finish_function_handler_sequence): Likewise.
9750 (begin_handler): Likewise.
9751 (finish_handler_parms): Likewise.
9752 (begin_catch_block): Likewise.
9753 (finish_handler): Likewise.
9754 (begin_compound_stmt): Likewise.
9755 (finish_compound_stmt): Likewise.
9756 (finish_asm_stmt): Likewise.
9757 (finish_label_stmt): Likewise.
9758 (finish_label_decl): Likewise.
9759 (finish_subobject): Likewise.
9760 (finish_decl_cleanup): Likewise.
9761 (finish_named_return_value): Likewise.
9762 (begin_stmt_expr): Likewise.
9763 (finish_stmt_expr): Likewise.
9765 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
9766 to call genrtl_expr_stmt when appropriate.
9768 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
9769 begin_compound_expr to call genrtl_begin_stmt_expr and
9770 genrtl_begin_compound_expr when appropriate.
9771 (finish_init_stmts): Changed calls to finish_compound_expr and
9772 finish_stmt_expr to call genrtl_finish_compound_expr and
9773 genrtl_finish_stmt_expr when appropriate.
9774 (expand_default_init): Changed call to finish_expr_stmt to call
9775 genrtl_expr_stmt when appropriate.
9776 (build_vec_init): Likewise.
9778 * parse.y (simple_stmt): Removed first argument from call to
9779 finish_for_stmt. Removed first argument from call to
9782 * parse.c: Regenerated.
9784 * pt.c (tsubst_expr): Removed first argument from call to
9785 finish_for_stmt. Removed first argument from call to
9788 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
9790 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
9791 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
9793 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
9794 (cplus_tree_code_length[]): Likewise.
9795 (cplus_tree_code_name[]): Likewise.
9796 (init_parse): Added call to add_c_tree_codes. Changed
9797 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
9799 2000-06-16 Mark Mitchell <mark@codesourcery.com>
9801 * cp-tree.h (finish_mem_initializers): Declare.
9802 (count_trees): Likewise.
9803 * parse.y (base_init): Use finish_mem_initializers.
9804 * semantics.c (finish_mem_initializers): New function.
9806 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
9807 the number of trees.
9809 (count_trees): Don't use it.
9811 2000-06-15 Jason Merrill <jason@redhat.com>
9813 * tree.c (count_trees): New debugging function.
9815 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
9816 * init.c (build_member_call): Pull out the name of a DECL.
9818 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
9819 * semantics.c (expand_body): Push to TV_INTEGRATION here.
9820 * optimize.c (optimize_function): Not here.
9821 * pt.c (instantiate_decl): Push to TV_PARSE.
9823 2000-06-15 Mark Mitchell <mark@codesourcery.com>
9825 * cp-tree.h (struct language_function): Remove x_base_init_list
9826 and x_member_init_list.
9827 (current_base_init_list): Remove.
9828 (current_member_init_list): Likewise.
9829 (setup_vtbl_ptr): Change prototype.
9830 (emit_base_init): Likewise.
9831 (expand_member_init): Likewise.
9832 (reinit_parse_for_function): Remove.
9833 * decl.c (save_function_data): Don't clear x_base_init_list and
9835 (mark_language_function): Don't mark them.
9836 * init.c (perform_member_init): Tweak comment.
9837 (sort_member_init): Take the list of initializers as an argument.
9838 (sort_base_init): Likewise.
9839 (emit_base_init): Likewise.
9840 (expand_member_init): Return the initializer. Don't use global
9842 * lex.c (reinit_parse_for_function): Remove.
9843 * method.c (build_template_parm_names): Correct substitution.
9844 (do_build_copy_constructor): Don't use current_member_init_list
9845 and current_base_init_list.
9846 (synthesize_method): Likewise.
9847 * parse.y (base_init): Split mem-initializers into
9848 base-initializers and field-initializers.
9849 (member_init_list): Build up the list here.
9850 (member_init): Return the initializer.
9851 (fn.depfn): Don't use reinit_parse_for_function.
9852 * parse.c: Regenerated.
9853 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
9855 (tsubst_expr): Don't use current_member_init_list
9856 and current_base_init_list.
9857 (tsubst_expr_values): Rename to ...
9858 (tsubst_initializer_list): ... this. Use convert_from_reference.
9859 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
9860 and current_base_init_list.
9861 (begin_function_definition): Don't call reinit_parse_for_function.
9863 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
9865 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
9868 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
9870 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
9872 * cp-tree.h (IF_COND): Move to c-common.h.
9873 (THEN_CLAUSE): Likewise.
9874 (ELSE_CLAUSE): Likewise.
9875 (WHILE_COND): Likewise.
9876 (WHILE_BODY): Likewise.
9877 (DO_COND): Likewise.
9878 (DO_BODY): Likewise.
9879 (RETURN_EXPR): Likewise.
9880 (EXPR_STMT_EXPR): Likewise.
9881 (FOR_INIT_STMT): Likewise.
9882 (FOR_COND): Likewise.
9883 (FOR_EXPR): Likewise.
9884 (FOR_BODY): Likewise.
9885 (SWITCH_COND): Likewise.
9886 (SWITCH_BODY): Likewise.
9887 (CASE_LOW): Likewise.
9888 (CASE_HIGH): Likewise.
9889 (GOTO_DESTINATION): Likewise.
9890 (COMPOUND_BODY): Likewise.
9891 (ASM_CV_QUAL): Likewise.
9892 (ASM_STRING): Likewise.
9893 (ASM_OUTPUTS): Likewise.
9894 (ASM_INPUTS): Likewise.
9895 (ASM_CLOBBERS): Likewise.
9896 (DECL_STMT_DECL): Likewise.
9897 (STMT_EXPR_STMT): Likewise.
9898 (LABEL_STMT_LABEL): Likewise.
9899 (SCOPE_BEGIN_P): Likewise.
9900 (SCOPE_END_P): Likewise.
9901 (SCOPE_STMT_BLOCK): Likewise.
9902 (SCOPE_NULLIFIED_P): Likewise.
9903 (SCOPE_NO_CLEANUPS_P): Likewise.
9904 (SCOPE_PARTIAL_P): Likewise.
9905 (ASM_VOLATILE_P): Likewise.
9906 (STMT_LINENO): Likewise.
9907 (STMT_LINENO_FOR_FN_P): Likewise.
9909 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
9910 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
9911 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
9912 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
9913 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
9915 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
9917 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
9918 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
9920 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
9921 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
9922 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
9924 2000-06-14 Mark Mitchell <mark@codesourcery.com>
9926 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
9927 * class.c (dfs_find_final_overrider): Set it appropriately.
9928 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
9929 avoid unneeded secondary vptrs.
9931 2000-06-13 Jakub Jelinek <jakub@redhat.com>
9933 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
9934 (check_bitfield_decl, check_field_decl): Likewise.
9935 (build_vtbl_or_vbase_field, build_base_field): Likewise.
9936 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
9937 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
9938 (xfer_tag, finish_enum): Likewise.
9939 * decl2.c (finish_builtin_type): Likewise.
9940 * init.c (init_init_processing): Likewise.
9941 * pt.c (instantiate_class_template): Likewise.
9942 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
9943 * cp-tree.h (struct lang_type): Add user_align member.
9944 (CLASSTYPE_USER_ALIGN): Define.
9946 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9948 * Make-lang.in (c++.install-common): Install g++-cross in
9949 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
9950 $(target_alias)-g++ and $(target_alias)-c++.
9952 2000-06-12 Mark Mitchell <mark@codesourcery.com>
9954 * class.c (vcall_offset_data_s): Add last_init and fns.
9955 (overrides): Rename to same_signature_p.
9956 (dfs_find_final_overrider): Adjust accordingly.
9957 (mark_overriders): Likewise.
9958 (warn_hidden): Likewise.
9959 (build_vtbl_initializer): Reorganize machinery for building things
9960 at negative offsets.
9961 (build_vcall_and_vbase_vtbl_entries): Likewise.
9962 (build_vbase_offset_vtbl_entries): Likewise.
9963 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
9964 offset entries. Do not create two entries for functions with the
9966 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
9967 (build_rtti_vtbl_entries): Reorganize machinery for building things
9968 at negative offsets.
9970 * optimize.c (expand_call_inline): Don't recurse into the code
9971 used to initialize the parameters more than once.
9973 2000-06-11 Mark Mitchell <mark@codesourcery.com>
9975 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
9976 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
9977 (find_substitution): Only use the `Sa' substitution for
9978 std::allocator, not instantiations of it.
9979 (write_template_prefix): Move comment. Only use a TREE_LIST to
9980 represent substitutions for a member template.
9981 (write_array_type): Mangle array dimensions correctly.
9982 * optimize.c (maybe_clone_body): Copy more information from the
9984 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
9985 on the regenerated declaration.
9987 2000-06-11 Chip Salzenberg <chip@valinux.com>
9988 Mark Mitchell <mark@codesourcery.com>
9990 * class.c (build_vtable): Clarify comment.
9991 (build_ctor_vtbl_group): Pass the most derived type to
9994 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9996 * decl2.c (compare_options): Don't needlessly cast away const-ness.
9998 2000-06-10 Mark Mitchell <mark@codesourcery.com>
10000 * decl.c (add_binding): Handle duplicate declarations of external
10003 2000-06-09 Chip Salzenberg <chip@valinux.com>
10004 Mark Mitchell <mark@codesourcery.com>
10006 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
10008 (write_signed_number): New macro.
10009 (write_unsigned_number): Likewise.
10010 (write_source_name): Use them.
10011 (write_number): Handle signed and unsigned values.
10012 (write_integer_cst): Use tree_int_cst_sgn, and use
10013 write_unsigned_number or write_signed_number as appropriate.
10014 (write_discriminator): Use write_unsigned_number or
10015 write_signed_number as appropriate.
10016 (write_template_arg_literal): Likewise.
10017 (write_array_type): Use tree_low_cst.
10018 (write_template_parm): Use write_unsigned_number or
10019 write_signed_number as appropriate.
10020 (write_substitution): Adjust call to write_number.
10021 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
10022 (write_expression): Handle non-type template arguments of
10023 reference type correctly.
10024 (mangle_thunk): Use write_signed_number.
10026 2000-06-09 Chip Salzenberg <chip@valinux.com>
10028 * mangle.c (find_substition): Don't mangle objects with typename
10029 substitutions (e.g. "cin" as "Si").
10031 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
10033 * call.c (add_candidate): Use ggc_alloc_cleared.
10034 * decl.c (lookup_label): Likewise.
10035 * lex.c (retrofit_lang_decl): Likewise.
10037 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
10039 * semantics.c (expand_body): Push to TV_EXPAND.
10040 * optimize.c (optimize_function): Push to TV_INTEGRATION.
10041 * decl.c (start_function): Always call announce_function.
10043 * tinfo2.cc: Just declare abort.
10045 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
10047 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
10048 whenever @ is a symbolic name.
10050 2000-06-08 Jakub Jelinek <jakub@redhat.com>
10052 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
10054 2000-06-07 Mark Mitchell <mark@codesourcery.com>
10056 * decl.c (pushdecl): Look up functions by DECL_NAME, not
10057 DECL_ASSEMBLER_NAME.
10059 2000-06-06 Mark Mitchell <mark@codesourcery.com>
10061 * decl2.c (c_language): Define.
10063 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
10065 * lex.c (lang_init_options): Tweak.
10067 * decl2.c: Remove #inclusion of diagnostic.h
10068 (lang_decode_option): Move diagnostic formatting options to
10071 * lang-options.h: Remove documentation for diagnostic options.
10073 * Makefile.in (lex.o): Depends upon diagnostic.h
10075 2000-06-06 Mark Mitchell <mark@codesourcery.com>
10077 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
10078 the same DECL_RESULT, it's not a redefinition.
10079 * pt.c (tsubst_decl): Remove code to handle illegal
10082 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
10084 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
10086 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
10088 * search.c (maybe_suppress_debug_info): Don't check
10089 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
10091 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
10094 Remember instantiation context in deferred instantiations.
10095 * cp-tree.h (struct tinst_level): Remove.
10096 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
10097 * pt.c (current_tinst_level): Now a tree.
10098 (print_template_context, push_tinst_level, pop_tinst_level,
10099 tinst_for_decl): Adjust.
10100 (reopen_tinst_level): New fn.
10101 (init_pt): Register current_tinst_level as a root.
10102 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
10103 of the pending templates list.
10104 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
10105 * lex.c (extract_interface_info): Adjust.
10106 * decl2.c (warn_if_unknown_interface): Adjust.
10108 2000-06-05 Mark Mitchell <mark@codesourcery.com>
10110 * class.c (indirect_primary_base_p): New function.
10111 (determine_primary_base): Use it.
10113 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
10115 Update new-abi dynamic cast algorithm.
10116 * tinfo.cc (__class_type_info::__dyncast_result): Add
10117 whole_details. Adjust constructor.
10118 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
10119 Avoid unnecessary searching.
10120 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
10122 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10124 * decl.c (init_decl_processing): Don't call record_component_aliases.
10125 * tree.c (build_cplus_array_type_1): Likewise.
10127 2000-06-04 Mark Mitchell <mark@codesourcery.com>
10129 * ir.texi: Correct typo.
10130 * mangle.c (write_expression): Handle non-type template arguments
10131 with reference type.
10132 * method.c (build_overload_value): Likewise.
10133 * pt.c (convert_nontype_argument): Explicitly represent conversion
10134 to a reference with an ADDR_EXPR.
10135 (unify): Always unify arguments in left-to-right order.
10137 2000-06-03 Alex Samuel <samuel@codesourcery.com>
10138 Mark Mitchell <mark@codesourcery.com>
10140 * Make-lang.in (CXX_SRCS): Add mangle.c.
10141 * Makefile.in (CXX_OBJS): Add mangle.o.
10142 (mangle.o): New rule.
10144 * class.c (local_classes): New variable.
10145 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
10146 (get_vtt_name): Use mangle_vtt_name for new ABI.
10147 (init_class_processing): Initialize local_classes.
10148 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
10149 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
10150 (std_identifier): New macro.
10151 (DECL_VOLATILE_MEMFUNC_P): New macro.
10152 (DECL_NAMESPACE_STD_P): Likewise.
10153 (local_classes): Declare.
10154 (get_mostly_instantiated_function_type): Declare.
10155 (init_mangle): Declare.
10156 (mangle_decl): Likewise.
10157 (mangle_type_string): Likewise.
10158 (mangle_type): Likewise.
10159 (mangle_typeinfo_for_type): Likewise.
10160 (mangle_typeinfo_string_for_type): Likewise.
10161 (mangle_vtbl_for_type): Likewise.
10162 (mangle_vtt_for_type): Likewise.
10163 (mangle_ctor_vtbl_for_type): Likewise.
10164 (mangle_thunk): Likewise.
10165 (mangle_conv_op_name_for_type): Likewise.
10166 (mangle_guard_variable): Likewise.
10167 * decl.c (pushtag): Keep track of local classes.
10168 (initialize_predefined_identifiers): Initialize std_identifier.
10169 (init_decl_processing): Use std_identifier.
10170 (start_decl): Don't treat instantiations as specializations.
10171 (grokdeclarator): Likewise.
10172 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
10173 name for fully-instantiated templates.
10174 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
10175 destructors with the new ABI.
10176 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
10177 (grokfield): Use mangle_type for new ABI.
10178 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
10179 (get_sentry): Use mangle_guard_variable for new ABI.
10180 (start_static_initialization_or_destruction): Likewise.
10181 * expr.c (extract_aggr_init): Remove.
10182 (extract_scalar_init): Likewise.
10183 (extract_init): Remove #if 0'd code.
10184 * mangle.c: New function.
10185 * method.c (build_mangled_name): Assert not flag_new_abi.
10186 (build_static_name): Likewise.
10187 (build_decl_overload_real): Likewise.
10188 (build_typename_overload): Likewise.
10189 (build_overload_with_type): Likewise.
10190 (build_overload_name): Likewise.
10191 (get_ctor_vtbl_name): Likewise.
10192 (start_squangling): Likewise.
10193 (get_id_2): Likewise.
10194 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
10195 (init_method): Call init_mangle for new ABI.
10196 (make_thunk): Call mangle_thunk for new ABI.
10197 * operators.def: Correct new ABI manglings for the `%' operator.
10199 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
10200 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
10201 (lookup_template_class): Call mangle_decl for new ABI.
10202 (get_mostly_instantiated_function_type): New function.
10203 (set_mangled_name_for_template_decl): Use it.
10204 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
10205 the new ABI. Use mangle_conv_op_name_for_type for instantiated
10206 conversion op names.
10207 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
10208 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
10209 (tinfo_base_init): Likewise. Mangle typeinfo string name with
10210 mangle_typeinfo_string_for_type.
10212 2000-06-03 Mark Mitchell <mark@codesourcery.com>
10214 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
10215 (INNERMOST_TEMPLATE_ARGS): New macro.
10216 (innermost_args): Remove.
10217 (get_innermost_template_args): New function.
10218 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
10219 * error.c (dump_function_decl): Be caution when using
10220 most_general_template.
10221 * method.c (build_template_parm_names): Use
10222 INNERMOST_TEMPLATE_ARGS.
10223 * pt.c (add_to_template_args): Tidy comment
10224 (get_innermost_template_args): New function.
10225 (check_explicit_specialization): Clear DECL_INITIAL for a new
10227 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
10229 (push_template_decl): Always register specializations of the most
10231 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
10232 (coerce_template_parms): Likewise.
10233 (lookup_template_class): Likewise.
10234 (innermost_args): Remove.
10235 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
10236 (tsubst_decl): Handle tricky specializations. Use
10237 get_innermost_template_args.
10238 (instantiate_template): Simplify handling of partial
10240 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
10241 (most_general_template): Reimplement, in a more straightforward
10243 (regenerate_decl_from_template): Tweak formatting. Use
10244 TMPL_ARGS_DEPTH for clarity.
10245 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
10247 * dump.c (dequeue_and_dump): Dump information about thunks.
10249 2000-06-01 Richard Henderson <rth@cygnus.com>
10251 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
10253 2000-06-01 Richard Henderson <rth@cygnus.com>
10255 * decl2.c (unsupported_options): Fix typo, make const.
10256 (lang_decode_option): Fix bsearch argument order.
10258 2000-06-01 Mark Mitchell <mark@codesourcery.com>
10260 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
10263 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10265 * cp-tree.h (c_get_alias_set): Deleted.
10266 * Makefile.in (decl.o): Include ../expr.h.
10267 * decl.c (expr.h): Include.
10268 (init_decl_processing): Call record_component_aliases for arrays.
10269 (grokdeclarator): Likewise.
10270 Set TREE_ADDRESSABLE for fields that aren't bitfields.
10271 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
10273 2000-05-31 Mark Mitchell <mark@codesourcery.com>
10275 Remove guiding declaration support.
10276 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
10277 (flag_guiding_decls): Remove.
10278 * call.c (build_user_type_conversion_1): Remove support for
10280 (build_new_function_call): Likewise.
10281 (build_new_op): Likewise.
10282 (build_new_method_call): Likewise.
10283 * decl.c (start_function): Likewise.
10284 * friend.c (is_friend): Likewise.
10285 (do_friend): Likewise.
10286 * decl2.c ((flag_dump_translation_unit): Make it const.
10287 (flag_guiding_decls): Remove.
10288 (unsupported_options): New variable
10289 (compare_options): New function.
10290 (lang_decode_option): Use them.
10292 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
10294 * method.c (mangle_expression): Adjust test for legal expression
10297 * pt.c (instantiate_decl): Save and restore the local
10298 specializations list.
10300 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
10302 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
10304 2000-05-30 Mark Mitchell <mark@codesourcery.com>
10306 * call.c (add_template_candidate_real): Handle member template
10307 constructors for classes with virtual bases.
10308 (build_user_type_conversion_1): Use in_charge_arg_for_name.
10309 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
10311 * ir.texi: Update thunk documentation.
10313 * call.c (joust): Fix handling of overloaded builtin operators.
10315 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
10317 * cp-tree.h (DECL_ANTICIPATED): New macro.
10318 Document new use of DECL_LANG_FLAG_7.
10319 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
10320 in the user namespace.
10321 * lex.c (do_identifier): If the identifier's declaration has
10322 DECL_ANTICIPATED on, it has not yet been declared. But do not
10323 replace it with an ordinary implicit declaration.
10325 * tinfo2.cc: Include stdlib.h.
10327 2000-05-29 Mark Mitchell <mark@codesourcery.com>
10329 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
10330 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
10333 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
10335 * decl2.c (lang_decode_option): Use skip_leading_substring instead
10338 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
10340 * operators.def (<?): Duplicated, should have been...
10343 2000-05-27 Alex Samuel <samuel@codesourcery.com>
10344 Mark Mitchell <mark@codesourcery.com>
10346 * cp-tree.h (ansi_opname): Make it a macro.
10347 (ansi_assopname): Likewise.
10348 (struct lang_decl_flags): Add assignment_operator_p.
10349 (struct lang_decl): Add operator_code.
10350 (DECL_VTT_PARM): Adjust.
10351 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
10352 overloaded operator.
10353 (SET_OVERLOADED_OPERATOR_CODE): New macro.
10354 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
10355 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
10356 (opname_tab): Remove.
10357 (assignop_tab): Likewise.
10358 (operator_name_info_t): New type.
10359 (operator_name_info): New variable.
10360 (assignment_operator_name_info): Likewise.
10361 (build_cp_library_fn): Remove declaration.
10362 (push_cp_library_fn): Likewise.
10363 (operator_name_string): Likewise.
10364 (build_decl_overload): Likewise.
10365 * call.c (print_z_candidates): Simplify.
10366 (build_object_call): Adjust usage of ansi_opname. Use
10367 DECL_OVERLOADED_OPERATOR_P.
10368 (op_error): Adjust operator name lookup.
10369 (build_conditional_expr): Adjust usage of ansi_opname.
10370 (build_new_op): Likewise.
10371 (build_op_delete_call): Likewise.
10372 (build_over_call): Likewise.
10373 (joust): Use DECL_OVERLOADED_OPERATOR_P.
10374 * decl.c (duplicate_decls): Copy operator_code.
10375 (init_decl_processing): Adjust parameters to push_cp_library_fn.
10376 (builtin_function): Adjust parameters to build_library_fn_1.
10377 (build_library_fn_1): Accept an overloaded operator code.
10378 (build_library_fn): Pass ERROR_MARK.
10379 (build_cp_library_fn): Accept an overloaded operator code.
10380 (push_cp_library_fn): Likewise.
10381 (grokfndecl): Tweak.
10382 (grokdeclarator): Simplify code to compute names of overloaded
10383 operators. Adjust use of ansi_opname.
10384 (ambi_op_p): Work on tree_codes, not identifiers.
10385 (unary_op_p): Likewise.
10386 (grok_op_properties): Likewise.
10387 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
10388 (lang_mark_tree): Don't try to mark the operator_code.
10389 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
10390 * error.c (dump_decl): Remove special handling for operator
10392 (dump_function_name): Likewise.
10393 (dump_expr): Adjust name lookup of operators.
10394 (op_to_string): Simplify.
10395 (assop_to_string): Likewise.
10396 * init.c (build_new_1): Adjust use of ansi_opname.
10397 * lex.c (opname_tab): Remove.
10398 (assignop_tab): Likewise.
10399 (ansi_opname): Likewise.
10400 (ansi_assopname): Likewise.
10401 (operator_name_string): Likewise.
10402 (reinit_lang_specific): Likewise.
10403 (operator_name_info): New variable.
10404 (assignment_operator_name_info): Likewise.
10405 (init_operators): New function.
10406 (init_parse): Use it.
10407 (do_identifier): Adjust use of ansi_opname.
10408 * method.c (mangle_expression): Don't use ansi_opname for
10410 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
10411 (build_decl_overload): Remove.
10412 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
10413 (do_build_assign_ref): Adjust use of ansi_opname.
10414 (synthesize_method): Likewise.
10415 (implicitly_declare_fn): Likewise.
10416 * operators.def: New file.
10417 * parse.y (operator): Adjust use of ansi_opname.
10418 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
10419 (set_mangled_name_for_template_decl): Don't play games with
10421 (special_function_p): Adjust use of ansi_opname.
10422 * typeck.c (check_return_expr): Likewise.
10423 * Make-lang.in (cc1plus): Depend on operators.def.
10424 * Makefile.in (lex.o): Likewise.
10425 (decl.o): Likewise.
10427 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
10429 * Make-lang.in (cplib2.ready): Eradicate.
10431 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10433 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
10434 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
10435 (built_min, cp_tree_equal): Likewise.
10437 2000-05-26 Mark Mitchell <mark@codesourcery.com>
10439 * class.c (layout_nonempty_base_or_field): Replace
10440 `record_layout_info' with `record_layout_info_s'.
10442 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
10445 * cp-tree.h (struct language_function): x_named_labels is now
10446 a struct named_label_list*.
10447 * decl.c (struct named_label_use_list): Renamed from...
10448 (struct named_label_list): ...this. New struct.
10449 (push_binding_level): Don't set eh_region.
10450 (note_level_for_eh): New fn.
10451 (pop_label): Take label and old value directly.
10452 (pop_labels): Adjust for new named_labels format.
10453 (lookup_label): Likewise.
10454 (poplevel): Note characteristics of a binding level containing a
10455 named label. Mess with named label lists earlier.
10456 (mark_named_label_lists): New fn.
10457 (mark_lang_function): Call it.
10458 (use_label): New fn, split out from...
10459 (make_label_decl): ...here. Don't call it.
10460 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
10461 check_previous_gotos): New fns, split out from...
10462 (define_label): ...here.
10463 (check_switch_goto): New fn.
10464 (define_case_label): Call it.
10465 (check_goto): New fn.
10466 * semantics.c (finish_goto_stmt): Call it and use_label.
10467 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
10468 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
10470 2000-05-26 Mark Mitchell <mark@codesourcery.com>
10472 * class.c (build_vtable_entry_ref): Correct usage of
10473 get_vtbl_decl_for_binfo.
10475 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
10476 * method.c (implicitly_declare_fn): Not here.
10478 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
10480 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
10481 (CPTI_PTMD_DESC_TYPE): ... here.
10482 (ptmd_desc_type_node): Rename to ...
10483 (ptm_desc_type_node): ... here.
10484 * decl.c: Likewise.
10485 * rtti.c (ptmd_initializer): Rename to ...
10486 (ptm_initializer): ... here.
10487 (sythesize_tinfo_var): Adjust. Deal with pointer to member
10489 (create_tinfo_types): Adjust.
10491 2000-05-25 Mark Mitchell <mark@codesourcery.com>
10493 Finish implementation of VTTs.
10494 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
10495 CPTI_VTT_PARM_IDENTIFIER.
10496 (vtt_parm_identifier): New macro.
10497 (vtt_parm_type): Likewise.
10498 (BINFO_SUBVTT_INDEX): Likewise.
10499 (BINFO_VPTR_INDEX): Likewise.
10500 (struct lang_decl): Add vtt_parm.
10501 (DECL_VTT_PARM): New macro.
10502 (DECL_USE_VTT_PARM): Likewise.
10503 (DECL_NEEDS_VTT_PARM_P): Likewise.
10504 (get_vtt_name): Declare.
10505 (build_artificial_parm): Likewise.
10506 (fixup_all_virtual_upcast_offsets): Likewise.
10507 (expand_indirect_vtbls_init): Remove.
10508 * call.c (build_new_method_call): Pass the vtt to subobject
10509 constructors and destructors.
10510 * class.c (get_vtt_name): Give it external linkage.
10511 (build_clone): Handle the magic VTT parameters for clones.
10512 (clone_function_decl): Fix typo in comment.
10513 (build_vtt): Keep track of the indices in the VTTs where various
10514 entities are stored.
10515 (build_vtt_inits): Likewise.
10516 (dfs_build_vtt_inits): Likewise.
10517 (build_ctor_vtbl_group): Tweak type of construction vtables.
10518 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
10519 primary bases, when building construction vtables.
10520 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
10521 (initialize_predefined_identifiers): Add vtt_parm_identifier.
10522 (init_decl_processing): Initialize vtt_parm_type.
10523 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
10524 (lang_mark_tree): Make vtt_parm.
10525 * decl2.c (build_artificial_parm): New function.
10526 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
10527 (grokclassfn): Use build_artificial_parm.
10528 * init.c (initialize_vtbl_ptrs): Call
10529 fixup_all_virtual_upcast_offsets directly.
10530 (perform_member_init): Use the complete subobject destructor for
10532 (build_vtbl_address): New function.
10533 (expand_virtual_init): Handle VTTs.
10534 * optimize (maybe_clone_body): Likewise.
10535 * search.c (fixup_all_virtual_upcast_offsets): Give it external
10537 (expand_indirect_vtbls_init): Remove.
10538 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
10539 * tree.c (make_binfo): Make them bigger.
10541 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
10543 * inc/cxxabi.h (__pbase_type_info): Define, based on
10544 __pointer_type_info.
10545 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
10546 (__pointer_to_member_type_info): Likewise.
10547 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
10548 (__pointer_to_member_type_info::__is_pointer_p): Remove.
10549 (__pointer_type_info::__do_catch): Rename to ...
10550 (__pbase_type_info::__do_catch): ... here. Adjust.
10551 (__pbase_type_info::__pointer_catch): Implement.
10552 (__pointer_type_info::__pointer_catch): Adjust.
10553 (__pointer_to_member_type_info::__pointer_catch): Adjust.
10555 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
10557 * tinfo.h (__user_type_info::contained_virtual_p): New
10559 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
10561 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
10562 diamond shaped hierarchy. Add early out for mixed diamond and
10563 duplicate shaped hierarchy.
10565 2000-05-24 Mark Mitchell <mark@codesourcery.com>
10567 * cp-tree.h (build_delete): Change prototype.
10568 (build_vec_delete): Likewise.
10569 * call.c (build_scoped_method_call): Use special_function_kind
10570 values to indicate the kind of destruction to be done.
10571 (build_method_call): Likewise.
10572 * decl.c (finish_destructor_body): Likewise.
10573 (maybe_build_cleanup_1): Likewise. Rename to ...
10574 (maybe_build_cleanup): ... this.
10575 * decl2.c (delete_sanity): Use special_function_kind
10576 values to indicate the kind of destruction to be done.
10577 (build_cleanup): Likewise.
10578 * init.c (perform_member_init): Likewise.
10579 (build_vec_delete_1): Likewise.
10580 (build_dtor_call): Simplify.
10581 (build_delete): Use special_function_kind
10582 values to indicate the kind of destruction to be done.
10583 (build_vbase_delete): Likewise.
10584 (build_vec_delete): Likewise.
10586 * init.c (sort_member_init): Fix typo in error message generation
10589 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
10591 * semantics.c (begin_class_definition): make the packed
10592 attribute be sensitive to the "-fpack-struct" command line flag
10594 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
10596 Update new-abi upcast algorithm.
10597 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
10598 prototype and meaning of return value.
10599 (__si_class_type_info::__do_upcast): Likewise.
10600 (__vmi_class_type_info::__do_upcast): Likewise.
10601 * tinfo.cc (__class_type_info::__upcast_result): Replace
10602 whole2dst with part2dst. Adjust ctor.
10603 (__class_type_info::__do_upcast): Adjust call of worker function.
10604 (__class_type_info::__do_upcast): Adjust.
10605 (__si_class_type_info::__do_upcast): Adjust. Use parent's
10607 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
10608 virtual base in diamond hierarchy bug.
10610 2000-05-23 Mark Mitchell <mark@codesourcery.com>
10612 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
10613 and bitfield to tinfo_fn_p.
10614 (DECL_TINFO_FN_P): Adjust.
10615 (SET_DECL_TINFO_FN_P): Likewise.
10616 (DECL_MUTABLE_P): Likewise.
10617 (DECL_C_BIT_FIELD): Likewise.
10618 (SET_DECL_C_BIT_FIELD): Likewise.
10619 (CLEAR_DECL_C_BIT_FIELD): Likewise.
10620 (DECL_UNINLINABLE): Likewise.
10621 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
10622 (handle_using_decl): Remove assertion.
10623 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
10624 to build FIELD_DECLs.
10625 (build_base_field): Likewise.
10626 (layout_class_type): Likewise.
10627 * decl.c (init_decl_processing): Likewise.
10628 (build_ptrmemfunc_type): Likewise.
10629 (grokdeclarator): Likewise.
10630 * decl2.c (grok_x_components): Likewise.
10631 * except.c (call_eh_info): Likewise.
10632 * init.c (init_init_processing): Likewise.
10633 * rtti.c (expand_class_desc): Likewise.
10634 (create_pseudo_type_info): Likewise.
10635 (get_vmi_pseudo_type_info): Likewise.
10636 (create_tinfo_types): Likewise.
10637 * ptree.c (print_lang_decl): Adjust.
10638 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
10639 before checking DECL_MUTABLE_P.
10641 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
10642 parameters for template functions.
10643 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
10644 destructors as well as constructors.
10646 2000-05-22 Mark Mitchell <mark@codesourcery.com>
10648 * class.c (build_ctor_vtbl_group): Set inits.
10649 * optimize.c (maybe_clone_body): Set DECL_INLINE and
10650 DECL_THIS_INLINE appropriately for clones.
10652 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
10653 (DECL_CONV_FN_P): Simplify.
10654 (DECL_OPERATOR): Remove.
10655 (language_to_string): Declare.
10656 * decl.c (duplicate_decls): Fix typo in comment.
10657 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
10658 (grok_op_properties): Use DECL_CONV_FN_P instead of
10659 IDENTIFIER_TYPENAME_P.
10660 * dump.c (dequeue_and_dump): Dump the language linkage of
10662 * error.c (language_to_string): Give it external linkage.
10663 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
10664 (implicitly_declare_fn): Set DECL_LANGUAGE.
10665 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
10666 IDENTIFIER_TYPENAME_P.
10667 (tsubst_decl): Likewise.
10668 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
10669 * semantics.c (finish_member_declaration): Don't mark members of
10670 classes declared in an extern "C" region as extern "C".
10672 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10674 * decl2.c (qualified_lookup_using_namespace): Look through
10677 * decl.c (push_using_decl): Return the old decl on namespace level.
10679 2000-05-21 Mark Mitchell <mark@codesourcery.com>
10681 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
10682 (VTT_NAME_PREFIX): New macro.
10683 (CTOR_VTBL_NAME_PREFIX): Likewise.
10684 (get_ctor_vtbl_name): New function.
10685 * class.c (get_vtable_name): Simplify.
10686 (get_vtt_name): New function.
10687 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
10688 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
10689 when a virtual base becomes primary.
10690 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
10692 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
10693 additional parameters.
10694 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
10695 (initialize_array): New function.
10696 (build_vtt): Likewise.
10697 (build_vtt_inits): Likewise.
10698 (dfs_build_vtt_inits): Likewise.
10699 (dfs_fixup_binfo_vtbls): Likewise.
10700 (build_ctor_vtbl_group): Likewise.
10701 (initialize_vtable): Use initialize_array.
10702 (accumulate_vtbl_inits): Reimplement to handle construction
10704 (dfs_accumulate_vtbl_inits): Likewise.
10705 (bulid_vtbl_initializer): Adjust parameter name.
10706 * method.c (build_typename_overload): Remove #if 0'd code.
10707 (get_ctor_vtbl_name): New function.
10708 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
10709 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
10711 * cp-tree.h (struct lang_type): Remove search_slot.
10712 (CLASSTYPE_SEARCH_SLOT): Remove.
10713 (emit_base_init): Change prototype.
10714 (initialize_vtbl_ptrs): Likewise.
10715 (expand_indirect_vtbls_init): Likewise.
10716 (clear_search_slots): Remove.
10717 * decl.c (lang_mark_tree): Don't mark search_slot.
10718 * init.c (initialize_vtbl_ptrs): Simplify.
10719 (emit_base_init): Likewise.
10720 * search.c (struct vbase_info): Document decl_ptr.
10721 (convert_pointer_to_single_level): Remove.
10722 (dfs_find_vbases): Remove.
10723 (dfs_init_base_pointers): Simplify.
10724 (dfs_clear_vbase_slots): Remove.
10725 (dfs_vtable_path_unmark): New function.
10726 (init_vbase_pointers): Simplify.
10727 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
10728 (expand_indirect_vtbls_init): Simplify. Don't call
10729 mark_all_temps_used.
10730 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
10731 initialize_vtbl_ptrs.
10733 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
10735 * except.c: Add static prototypes.
10737 2000-05-20 H.J. Lu <hjl@gnu.org>
10739 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
10741 2000-05-19 Mark Mitchell <mark@codesourcery.com>
10743 Don't create a separate copy of virtual bases for the
10744 CLASSTYPE_VBASECLASSES list.
10745 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
10746 (BINFO_FOR_VBASE): Remove.
10747 (CANONICAL_BINFO): Adjust.
10748 (binfo_for_vbase): New function.
10749 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
10750 instead of BINFO_FOR_VBASE.
10751 (build_vbase_pointer): Likewise.
10752 (build_secondary_vtable): Likewise.
10753 (dfs_mark_primary_bases): Likewise.
10754 (mark_primary_bases): Likewise.
10755 (layout_nonempty_base_or_field): Likewise.
10756 (dfs_set_offset_for_shared_vbases): Likewise.
10757 (dfs_set_offset_for_unshared_vbases): Likewise.
10758 (layout_virtual_bases): Likewise. Adjust for changes to the
10759 CLASSTYPE_VBASECLASSES list.
10760 (dump_class_hierarchy_r): Use binfo_for_vbase
10761 instead of BINFO_FOR_VBASE.
10762 (dump_class_hierarchy): Likewise.
10763 (finish_vtbls): Likewise.
10764 (build_vtbl_initializer): Adjust for changes to the
10765 CLASSTYPE_VBASECLASSES list.
10766 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
10767 * decl.c (finish_destructor_body): Adjust for changes to the
10768 CLASSTYPE_VBASECLASSES list.
10769 * init.c (sort_base_init): Use binfo_for_vbase.
10770 (construct_virtual_bases): Adjust for changes to the
10771 CLASSTYPE_VBASECLASSES list.
10772 (expand_member_init): Use binfo_for_vbase.
10773 (build_vbase_delete): Adjust for changes to the
10774 CLASSTYPE_VBASECLASSES list.
10775 * method.c (do_build_copy_constructor): Likewise.
10776 * rtti.c (get_base_offset): Use binfo_for_vbase.
10777 (expand_class_desc): Remove #if 0'd code.
10778 * search.c (struct vbase_info): Remove vbase_types.
10779 (get_base_distance): Use binfo_for_vbase.
10780 (lookup_field_queue_p): Use CANONICAL_BINFO.
10781 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
10782 (get_pure_virtuals): Adjust for changes to the
10783 CLASSTYPE_VBASECLASSES list.
10784 (dfs_find_vbases): Use binfo_for_vbase.
10785 (dfs_init_vbase_pointers): Likewise.
10786 (init_vbase_pointers): Don't initialize vi.vbase_types.
10787 (virtual_context): Use binfo_for_vbase.
10788 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
10789 CLASSTYPE_VBASECLASSES list.
10790 (expand_indirect_vtbls_init): Simplify.
10791 (dfs_get_vbase_types): Don't replicate virtual bases.
10792 (find_vbase_instance): Use binfo_for_vbase.
10793 (binfo_for_vbase): New function.
10794 * typeck.c (get_delta_difference): Use binfo_for_vbase.
10796 2000-05-17 Mark Mitchell <mark@codesourcery.com>
10798 * decl2.c (finish_anon_union): Generalize error messages to handle
10799 anonymous structures.
10800 * init.c (perform_member_init): Remove `name' parameter.
10801 (build_field_list): New function.
10802 (sort_member_init): Handle anonymous union initialization order
10803 correctly. Check for multiple initializations of the same union.
10804 (emit_base_init): Don't look up fields by name here.
10805 (expand_member_init): Record the result of name lookup for future
10807 * typeck.c (build_component_ref): Fix formatting.
10809 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
10811 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
10812 * typeck.c (build_x_compound_expr): Replace warn_unused with
10815 * decl2.c (lang_decode_option): Update -Wall unused flags by
10816 calling set_Wunused.
10818 2000-05-16 Mark Mitchell <mark@codesourcery.com>
10820 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
10821 * init.c (dfs_vtable_path_unmark): Remove.
10822 * search.c (marked_new_vtable_p): Likewise.
10823 (unmarked_new_vtable_p): Likewise.
10824 (dfs_search_slot_nonempty_p): Likewise.
10825 (dfs_mark): Likewise.
10826 (dfs_vtable_path_unmark): Likewise.
10827 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
10828 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
10829 (dfs_init_vbase_pointers): Remove special-case new ABI code.
10830 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
10831 (init_vbase_pointers): Simplify.
10832 (expand_indirect_vtbls_init): Likewise.
10834 * class.c (copy_virtuals): New function.
10835 (build_primary_table): Use it.
10836 (build_secondary_vtable): Likewise.
10837 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
10838 indicate that no vcall offset is required.
10839 (add_virtual_function): Likewise.
10840 (modify_all_vtables): Likewise.
10841 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10842 (dfs_accumulate_vtbl_inits): Likewise.
10843 (build_vtbl_initializer): Make changes to handle construction
10845 (dfs_build_vcall_offset_vtbl_entries): Likewise.
10846 (build_rtti_vtbl_entries): Likewise.
10847 (build_vtable_entries): Handle a NULL vcall_index.
10849 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
10851 * decl2.c (lang_decode_option): Fix thinko.
10853 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
10855 * except.c (check_handlers): New fn.
10856 * cp-tree.h: Declare it.
10857 * semantics.c (finish_handler_sequence): Call it.
10858 (finish_function_handler_sequence): Likewise.
10859 (finish_handler_parms): Set TREE_TYPE on the handler.
10860 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
10861 * search.c (get_base_distance_recursive): If protect>1, ignore
10863 (get_base_distance): Don't reduce watch_access.
10865 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
10867 * lex.c: #include diagnostic.h.
10868 (lang_init_options): Set default prefixing rules.
10870 * lang-options.h: Add -fdiagnostics-show-location=.
10872 * decl2.c: #include diagnostic.h.
10873 (lang_decode_option): Handle -fdiagnostics-show-location=.
10875 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
10877 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
10878 * vec.cc: Revert my 2000-05-07 change.
10880 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
10882 * class.c (check_field_decls): Complain about non-static data
10883 members with same name as class in class with constructor.
10885 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
10887 * decl.c (grokdeclarator): Allow non-static data members with
10888 same name as class.
10890 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
10892 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
10893 and pending_inline.filename. Update prototypes.
10894 * decl.c (define_label): Constify filename parameter.
10895 * decl2.c (warn_if_unknown_interface): Constify local char *.
10896 * input.c Constify input_source.filename. Don't declare
10897 input_filename or lineno. Constify filename parameter to feed_input.
10898 * lex.c (init_parse): Constify parameter and return value.
10899 (cp_pragma_interface, cp_pragma_implementation): Constify
10901 (reinit_parse_for_method, reinit_parse_for_block,
10902 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
10903 Constify local char *.
10904 * pt.c: Don't declare lineno or input_filename.
10905 (print_template_context, tsubst_friend_function, tsubst_decl,
10906 tsubst, instantiate_decl): Constify local char *.
10907 * semantics.c (expand_body): Constify local char *.
10908 * tree.c (build_srcloc): Constify filename parameter.
10909 * typeck.c (c_expand_asm_operands): Constify filename
10912 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
10914 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
10915 offsetof expansion.
10917 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
10919 * inc/cxxabi.h: Fix typos in comment.
10920 (__base_class_info::__offset): Use a static_cast.
10922 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
10924 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
10925 of std::size_t and std::ptrdiff_t respectively.
10926 * tinfo.cc: Likewise.
10927 * vec.cc: Likewise.
10929 2000-05-06 Richard Henderson <rth@cygnus.com>
10931 * typeck.c (build_c_cast): Don't warn integer->pointer size
10932 mismatch for constants.
10934 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
10936 * rtti.c (ptmd_initializer): Set non-public, if class is
10939 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
10940 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10941 __cxa_vec_delete): Likewise.
10942 * tinfo.cc (__dynamic_cast): Likewise.
10943 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10944 __cxa_vec_delete): Likewise.
10946 2000-05-04 Mark Mitchell <mark@codesourcery.com>
10948 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
10949 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
10950 (lang_decl_flags): Add vcall_offset.
10951 (THUNK_VCALL_OFFSET): Use it.
10952 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
10953 * method.c (make_thunk): Create the lang_decl here, not in
10955 (emit_thunk): Make generic thunks into ordinary functions once
10956 they have been fed to expand_body.
10957 * semantics.c (expand_body): Set current_function_is_thunk here.
10959 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10961 * class.c (update_vtable_entry_for_fn): Prototype.
10963 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
10966 * search.c (dfs_build_inheritance_graph_order): Prototype.
10968 2000-05-04 Mark Mitchell <mark@codesourcery.com>
10970 * cp-tree.h (special_function_kind): Add various kinds of
10972 (special_function_p): New function.
10973 * class.c (overrides): Don't let one kind of destructor override
10975 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
10976 whether or not to instantiate a template.
10977 * tree.c (special_function_p): Define.
10979 2000-05-03 Mark Mitchell <mark@codesourcery.com>
10981 * cp-tree.def (THUNK_DECL): Remove.
10982 * cp-tree.h (DECL_THUNK_P): New macro.
10983 (DECL_NON_THUNK_FUNCTION_P): Likewise.
10984 (DECL_EXTERN_C_FUNCTION_P): Likewise.
10985 (SET_DECL_THUNK_P): Likewise.
10986 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
10987 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
10988 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
10989 * decl.c (decls_match): Use DECL_EXTERN_C_P.
10990 (duplicate_decls): Likewise.
10991 (pushdecl): Likewise. Adjust thunk handling.
10992 (grokfndecl): Use DECL_EXTERN_C_P.
10993 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
10994 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
10995 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
10996 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
10997 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
10998 DECL_NO_STATIC_CHAIN.
10999 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
11000 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
11001 * search.c (covariant_return_p): Remove THUNK_DECL handling.
11004 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
11006 * tree.c (walk_tree): Set lineno.
11008 2000-05-01 Mark Mitchell <mark@codesourcery.com>
11010 * exception.cc: Update license notice.
11011 * new.cc: Likewise.
11012 * new1.cc: Likewise.
11013 * new2.cc: Likewise.
11014 * tinfo.cc: Likewise.
11015 * tinfo2.cc: Likewise.
11016 * vec.cc: Likewise.
11017 * inc/cxxabi.h: Likewise.
11018 * inc/exception: Likewise.
11019 * inc/new: Likewise.
11020 * inc/new.h: Likewise.
11021 * inc/typeinfo: Likewise.
11023 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
11025 * tree.c (build_target_expr_with_type): If we already have a
11026 TARGET_EXPR, just return it.
11028 * optimize.c (initialize_inlined_parameters): Don't generate an
11029 EXPR_STMT if we can just use DECL_INITIAL.
11030 * decl.c (emit_local_var): Only make the initialization a
11031 full-expression if stmts_are_full_exprs_p.
11033 2000-05-01 Mark Mitchell <mark@codesourcery.com>
11035 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
11037 * call.c (standard_conversion): Use it.
11038 (direct_reference_binding): Likewise.
11039 (build_over_call): Likewise.
11040 (is_properly_derived_from): Likewise.
11041 (compare_ics): Likewise.
11042 * class.c (resolves_to_fixed_type_p): Likewise.
11043 * optimize.c (declare_return_variable): Likewise.
11044 * pt.c (is_specialization_of): Likewise.
11046 * typeck.c (comp_target_parms): Likeiwse.
11047 (build_static_cast): Likewise.
11048 (build_reinterpret_cast): Likewise.
11049 (build_const_cast): Likewise.
11050 (comp_ptr_ttypes_real): Likewise.
11051 (comp_ptr_ttypes_const): Likewise.
11052 * typeck2.c (process_init_constructor): Likewise.
11054 2000-04-30 Scott Snyder <snyder@fnal.gov>
11056 * decl.c (finish_destructor_body): Use the base destructor when
11057 destroying virtual bases.
11059 2000-04-30 Mark Mitchell <mark@codesourcery.com>
11061 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
11063 * optimize.c (struct inline_data): Add target_exprs field.
11064 (declare_return_variable): When a function returns an aggregate,
11065 use the variable declared in the TARGET_EXPR as the remapped
11067 (expand_call_inline): Update the pending target_exprs stack.
11068 (optimize_function): Initialize the stack.
11070 * decl2.c (finish_file): Fix typo in comment.
11072 * method.c (emit_thunk): Don't try to return a `void' value.
11074 * optimize.c (initialize_inlined_parameters): If the parameter is
11075 addressable, we need to make a new VAR_DECL, even if the
11076 initializer is constant.
11078 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
11080 * decl.c (grok_op_properties): Add an extra check of argtypes.
11082 2000-04-27 Mark Mitchell <mark@codesourcery.com>
11084 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
11086 (initialize_inlined_parameters): Try to avoid creating new
11089 2000-04-27 Alex Samuel <samuel@codesourcery.com>
11091 * lex.c (my_get_run_time): Remove.
11092 (init_filename_times): Use get_run_time instead of my_get_run_time.
11093 (check_newline): Likewise.
11094 (dump_time_statistics): Likewise.
11095 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
11096 of computing elapsed time explicitly.
11098 2000-04-26 Mark Mitchell <mark@codesourcery.com>
11100 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
11101 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
11102 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
11103 before calling decl_constant_value.
11104 * class.c (check_bitfield_decl): Likewise.
11105 * cvt.c (ocp_convert): Likewise.
11106 (convert): Likewise.
11107 * decl.c (compute_array_index_type): Likewise.
11108 (build_enumerator): Likewise.
11109 * decl2.c (check_cp_case_value): Likewise.
11110 * pt.c (convert_nontype_argument): Likewise.
11111 (tsubst): Likewise.
11112 * typeck.c (decay_conversion): Likewise.
11113 (build_compound_expr): Likewise.
11114 (build_reinterpret_cast): Likewise.
11115 (build_c_cast): Likewise.
11116 (convert_for_assignment): Likewise.
11118 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
11120 * decl.c (finish_function): Don't play games with DECL_INLINE.
11122 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
11124 * ir.texi: Correct typo.
11126 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11128 * decl.c (grokdeclarator): Reject VLAs as members.
11130 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
11132 * call.c (standard_conversion): Accept conversion between
11135 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
11137 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
11139 * decl2.c (finish_file): Remove double setup for accounting
11142 2000-04-24 Robert Lipe <robertlipe@usa.net>
11144 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
11146 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
11148 * new.cc (set_new_handler): Needs to be in std::.
11150 2000-04-23 Mark Mitchell <mark@codesourcery.com>
11152 * cp-tree.h (lang_decl): Remove pretty_function_p.
11153 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
11154 language-specific node.
11155 * decl.c (cp_make_fname_decl): Use build_decl, not
11156 build_lang_decl, to build the variables.
11157 (grokvardecl): Don't call build_lang_decl for local variables in
11159 (grokdeclarator): Don't call build_lang_decl for local type
11160 declarations in templates.
11161 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
11162 zero'd memory, rather than calling memset.
11163 * pt.c: Include hashtab.h.
11164 (local_specializations): New variable.
11165 (retrieve_local_specialization): Use it.
11166 (register_local_specialization): Likewise.
11167 (tsubst_decl): Don't assume local variables have
11168 DECL_LANG_SPECIFIC.
11169 (instantiate_decl): Set up local_specializations.
11170 * Makefile.in (HTAB_H): New variable.
11172 2000-04-23 Richard Henderson <rth@cygnus.com>
11174 * typeck.c (c_expand_asm_operands): Restore the original
11175 contents of the output list.
11177 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
11179 * ir.texi: Document complex number representation.
11181 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
11183 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
11184 (target_incomplete_p): New function.
11185 (tinfo_base_init): Create comdat NTBS name variable.
11186 (ptr_initializer): Add non_public parameter. Calculate it.
11187 (ptmd_initializer): Likewise.
11188 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
11189 (create_real_tinfo_var): Add non_public parameter. Use it.
11190 Push proxy into global namespace.
11191 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
11193 * inc/typeinfo (type_info::before, type_info::operator==):
11194 Compare __name addresses.
11196 * tinfo2.cc: Remove new-abi builtins comment.
11198 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
11200 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
11202 * call.c (joust): Exit early if we get the same function, too.
11204 * decl2.c (key_method): Return NULL_TREE for template classes.
11205 (import_export_class): Don't need to check for template classes.
11207 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
11209 * lex.c: Remove references to cccp.c.
11211 2000-04-18 Mark Mitchell <mark@codesourcery.com>
11213 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
11214 volatile_memfunc. Add destructor_attr. Adjust dummy.
11215 (DECL_DESTRUCTOR_P): Use destructor_attr.
11216 (DECL_CONST_MEMFUNC_P): Reimplement.
11217 (DECL_VOLATILE_MEMFUNC_P): Remove.
11218 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
11219 (overrides): Use DECL_DESTRUCTOR_P.
11220 (check_for_override): Likewise.
11221 * decl.c (start_function): Likewise.
11222 * decl2.c (grokfclassfn): Likewise.
11223 (check_classfn): Likewise.
11224 (grok_function_init): Likewise.
11226 2000-04-17 Mark Mitchell <mark@codesourcery.com>
11228 * decl2.c (grokfield): Issue error on illegal data member
11231 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
11233 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
11235 2000-04-16 Mark Mitchell <mark@codesourcery.com>
11237 * class.c (build_vtable_entry): Don't build thunks for type-info
11240 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
11242 * decl.c (decls_match): Allow a redeclaration of a builtin to
11243 specify args while the builtin did not.
11245 2000-04-15 Mark Mitchell <mark@codesourcery.com>
11247 * cp-tree.def (THUNK_DECL): Add to documentation.
11248 * cp-tree.h (flag_huge_objects): Declare.
11249 * class.c (modify_vtable_entry): Tidy.
11250 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
11251 Calculate delta appropriately for the new ABI.
11252 (dfs_modify_vtables): Use it.
11253 (modify_all_vtables): Fix thinko in code to add overriding copies
11254 of functions to primary vtables.
11255 (build_clone): Fix typo in comment.
11256 (clone_function_decl): Correct order of destructors in vtable.
11257 (build_vbase_offset_vtbl_entries): Adjust comment.
11258 (dfs_vcall_offset_queue_p): Remove.
11259 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
11260 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
11261 (build_vtable_entry): Correct check for pure virtual functions.
11262 Don't declare flag_huge_objects.
11263 * decl.c (flag_huge_objects): Remove declaration.
11264 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
11265 Use int_size_in_bytes.
11266 (emit_thunk): Handle vcall offset thunks.
11268 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11270 * decl2.c (parse_time, varconst_time): Delete declarations.
11271 (finish_file): Delete LINENO declaration.
11272 START_TIME and THIS_TIME now long.
11274 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
11276 * class.c (build_base_field): Reformat comment.
11278 * inc/cxxabi.h (stddef.h): Comment inclusion.
11279 (__base_class_info::__offset): Comment shift.
11281 2000-04-12 Mark Mitchell <mark@codesourcery.com>
11283 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
11284 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
11285 (cp_push_exception_identifier): New macro.
11286 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
11287 (DECL_BASE_DESTRUCTOR_P): Likewise.
11288 (DECL_DELETING_DESTRUCTOR_P): Likewise.
11289 (get_vtbl_decl_for_binfo): Fix formatting.
11290 (in_charge_arg_for_name): New macro.
11291 (maybe_build_cleanup_and_delete): Remove declaration.
11292 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
11293 (in_charge_arg_for_name): New function.
11294 (build_new_method_call): Use it. Handle cloned destructors.
11295 (build_clone): Don't make the base constructor virtual.
11296 Automatically defer generated functions.
11297 (clone_function_decl): Handle destructors, too.
11298 (clone_constructors_and_destructors): Likewise.
11299 (create_vtable_ptr): Don't create a vtable entry for a cloned
11301 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
11302 (initialize_predefined_identifiers): Update appropriately.
11303 (finish_destructor_body): Simplify.
11304 (maybe_build_cleanup_and_delete): Remove.
11305 * except.c (expand_throw): Handle new-ABI destructors.
11306 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
11307 (build_dtor_call): New function.
11308 (build_delete): Use it. Simplify.
11309 * optimize.c (maybe_clone_body): Handle destructors.
11310 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
11312 * exception.cc (cleanup_fn): New typedef.
11313 (CALL_CLEANUP): New macro.
11314 (cp_eh_info): Use them.
11315 (__cp_push_exception): Likewise.
11316 (__cp_pop_exception): Likewise.
11318 2000-04-11 Mark Mitchell <mark@codesourcery.com>
11320 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
11321 (complete_dtor_identifier): New macro.
11322 (CLASSTYPE_FIRST_CONVERSION): Remove.
11323 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
11324 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
11325 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
11326 (CLASSTYPE_CONSTRUCTORS): Likewise.
11327 (CLASSTYPE_DESTRUCTORS): Likewise.
11328 (lang_decl): Add cloned_function.
11329 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
11330 (DECL_BASE_CONSTRUCTOR_P): Likewise.
11331 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
11332 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
11333 (DECL_CLONED_FUNCTION_P): Likewise.
11334 (DECL_CLONED_FUNCTION): Likewise.
11335 (clone_function_decl): Declare.
11336 (maybe_clone_body): Likewise.
11337 * call.c (build_user_type_conversion_1): Call complete object
11338 constructors in the new ABI.
11339 (build_new_method_call): Don't add in-charge parameters under the
11341 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
11342 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
11343 CLASSTYPE_DESTRUCTOR_SLOT.
11344 (build_clone): New function.
11345 (clone_function_decl): Likewise.
11346 (clone_constructors_and_destructors): Likewise.
11347 (check_bases_and_members): Use it.
11348 * decl.c (iniitialize_predefined_identifiers): Initialize
11349 complete_dtor_identifier.
11350 (finish_function): Don't add extra code to a clone.
11351 (lang_mark_tree): Mark cloned_function.
11352 * decl2.c (mark_used): Don't bother trying to instantiate things
11354 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
11355 * method.c (set_mangled_name_for_decl): Don't treat clones as
11357 (synthesize_method): Sythesize cloned functions, not the clones.
11358 * optimize.c (inline_data): Update comment on ret_label.
11359 (remap_block): Don't assume DECL_INITIAL exists.
11360 (copy_body_r): Allow ret_label to be NULL.
11361 (maybe_clone_body): Define.
11362 * pt.c (tsubst_decl): Handle clones.
11363 (instantiate_clone): New function.
11364 (instantiate_template): Use it.
11365 (set_mangled_name_for_template_decl): Don't treat clones as
11367 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
11368 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
11369 * semantics.c (expand_body): Clone function bodies as necessary.
11371 * optimize.c (remap_decl): Avoid sharing structure for arrays
11372 whose size is only known at run-time.
11373 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
11375 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
11376 to has_in_charge_parm_p.
11377 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
11378 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
11379 (DECL_COPY_CONSTRUCTOR_P): New macro.
11380 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
11381 (build_user_type_conversion_1): Likewise.
11382 (convert_like_real): Likewise.
11383 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
11384 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
11385 (copy_args_p): Likewise.
11386 (grok_ctor_properties): Likewise.
11387 (start_function): Likewise.
11388 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
11389 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
11390 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
11391 * method.c (do_build_copy_constructor): Use
11392 DECL_HAS_IN_CHARGE_PARM_P.
11393 (synthesize_method): Likewise.
11394 * pt.c (instantiate_template): Remove goto.
11395 * tree.c (build_cplus_method_type): Remove mention of obstacks in
11398 * cp-tre.h (finish_function): Change prototype.
11399 * decl.c (end_cleanup_fn): Adjust caller.
11400 (finish_function): Take only one parameter.
11401 * decl2.c (finish_objects): Adjust caller.
11402 (finish_static_storage_duration_function): Likewise.
11403 * method.c (emit_thunk): Likewise.
11404 * parse.y: Likewise.
11405 * parse.c: Regenerated.
11406 * pt.c (instantiate_decl): Likewise.
11407 * rtti.c (synthesize_tinfo_fn): Likewise.
11408 * semantics.c (expand_body): Likewise.
11410 * cp-tree.h (copy_decl): New function.
11411 * class.c (finish_struct_1): Use it.
11412 * lex.c (copy_decl): Define it.
11413 * pt.c (tsubst_decl): Likewise.
11414 * tree.c (copy_template_template_parm): Likewise.
11416 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
11417 has_nonpublic_assign_ref.
11418 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
11419 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
11420 * class.c (finish_struct_methods): Don't set
11421 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
11422 (interface_only): Don't declare.
11423 (interface_unknown): Likewise.
11425 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11427 * tree.h (HAVE_TEMPLATES): Remove definition.
11428 * lang-options.h (-fthis-is-variable): Remove documentation.
11430 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
11432 * class.c (instantiate_type): Handle object-relative template-id.
11434 * semantics.c (finish_expr_stmt): Call convert_to_void here.
11435 * decl.c (cplus_expand_expr_stmt): Not here.
11437 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
11438 Initialize exprtype earlier.
11440 * parse.y (fn.def1): Check for defining types in return types.
11442 * decl.c (check_tag_decl): Notice extra fundamental types.
11443 Diagnose empty decls in classes, too.
11445 * decl.c (grokdeclarator): Don't override an anonymous name if no
11446 declarator was given.
11448 * cvt.c (convert_to_void): Call resolve_offset_ref.
11450 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
11452 * decl2.c (decl_namespace): Handle getting a type.
11454 * typeck.c (build_c_cast): Re-enable warning for cast between
11455 pointer and integer of different size.
11457 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
11459 * inc/cxxabi.h (__pointer_type_info): Add restrict and
11461 (__pointer_type_info::__pointer_catch): New virtual function.
11462 (__pointer_to_member_type_info): Derive from
11463 __pointer_type_info. Adjust.
11464 (__pointer_to_member_type_info::__do_catch): Remove.
11465 (__pointer_to_member_type_info::__is_pointer_p): Declare.
11466 (__pointer_to_member_type_info::__pointer_catch): Declare.
11467 * rtti.c (qualifier_flags): Add restrict flag.
11468 (ptmd_initializer): Reorder members.
11469 (create_tinfo_types): Expand comments. Reorder
11470 ptmd_desc_type_node members.
11471 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
11473 (__pointer_type_info::__do_catch): Move specific code into
11474 __pointer_catch. Call it.
11475 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
11476 specific catch checking. Fix void conversion check.
11477 (__pointer_to_member_type_info::__do_catch): Remove.
11478 (__pointer_to_member_type_info::__pointer_catch): Implement.
11480 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11482 * lex.c (init_parse): Remove traces of classof and headof.
11483 * decl2.c (flag_operator_names): Default to 1.
11484 (lang_decode_option): Do not set it for -ansi.
11486 2000-04-09 Mark Mitchell <mark@codesourcery.com>
11488 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
11489 (DECL_MAIN_VARIANT): Remove.
11490 * decl.c (duplicate_decls): Don't set it.
11491 (start_function): Likewise.
11492 (lang_mark_tree): Don't mark it.
11493 * decl2.c (defer_fn): Don't use it.
11494 * lex.c (retrofit_lang_decl): Don't set it.
11495 * pt.c (tsubst_decl): Likewise.
11496 * ptree.c (print_lang_decl): Don't print it.
11497 * typeck.c (mark_addressable): Don't use it.
11499 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
11501 * vec.cc: Include <new> and <exception>.
11502 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
11503 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
11505 (__cxa_vec_delete): Catch dtor exceptions.
11507 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
11509 Prepend __ to implementation defined names.
11510 * inc/typeinfo (type_info): Rename _name to __name.
11511 (type_info::type_info): Rename parameter.
11512 (type_info::operator==, type_info::operator!=,
11513 type_info::before): Likewise.
11514 (type_info::is_pointer_p, type_info::is_function_p,
11515 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
11518 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
11519 (__pointer_type_info::__pointer_type_info): Likewise.
11520 (__pointer_type_info::is_pointer_p,
11521 __pointer_type_info::do_catch): Prepend __. Rename parameters.
11522 (__array_type_info::__array_type_info): Rename parameters.
11523 (__function_type_info::__function_type_info): Likewise.
11524 (__function_type_info::is_function_p): Prepend __.
11525 (__enum_type_info::__enum_type_info): Rename parameters.
11526 (__pointer_to_member_type_info::__pointer_to_member_type_info):
11528 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
11530 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
11531 (__class_type_info::__class_type_info): Rename parameters.
11532 (__class_type_info::sub_kind): Prepend __. Adjust member names.
11533 (__class_type_info::upcast_result,
11534 __class_type_info::dyncast_result): Prepend __. Move definition
11536 (__class_type_info::do_upcast, __class_type_info::do_catch,
11537 __class_type_info::find_public_src,
11538 __class_type_info::do_dyncast,
11539 __class_type_info::do_find_public_src): Prepend __. Rename
11541 (__si_class_type_info::__si_class_type_info): Rename parameters.
11542 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
11543 __si_class_type_info::do_find_public_src): Prepent __. Rename
11545 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
11546 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
11547 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
11549 (__dynamic_cast): Rename parameters.
11550 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
11551 type_info::do_catch, type_info::do_upcast): Prepend __.
11552 (contained_p, public_p, virtual_p, contained_public_p,
11553 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
11554 (__class_type_info::do_catch,
11555 __class_type_info::do_upcast): Prepend __. Adjust.
11556 (__class_type_info::__upcast_result,
11557 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
11559 (__class_type_info::find_public_src): Prepend __. Adjust.
11560 (__class_type_info::do_find_public_src,
11561 __si_class_type_info::do_find_public_src,
11562 __vmi_class_type_info::do_find_public_src): Likewise.
11563 (__class_type_info::do_dyncast,
11564 __si_class_type_info::do_dyncast,
11565 __vmi_class_type_info::do_dyncast): Likewise.
11566 (__class_type_info::do_upcast,
11567 __si_class_type_info::do_upcast,
11568 __vmi_class_type_info::do_upcast): Likewise.
11569 (__dynamic_cast): Adjust.
11570 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
11571 (__function_type_info::is_function_p): Likewise.
11572 (__pointer_type_info::do_catch): Likewise. Adjust.
11573 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
11574 (__throw_type_match_rtti_2): Adjust.
11575 (__is_pointer): Adjust.
11577 2000-04-08 Mark Mitchell <mark@codesourcery.com>
11579 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
11580 (complete_ctor_identifier): New macro.
11581 (special_function_kind): Add sfk_copy_constructor and
11582 sfk_assignment_operator.
11583 (LOOKUP_HAS_IN_CHARGE): Remove.
11584 (cons_up_default_function): Rename to ...
11585 (implicitly_declare_fn): ... this.
11586 * call.c (build_new_method_call): Add in-charge parameters for
11588 * class.c (add_implicitly_declared_members): Change parameter name
11589 from cant_have_assignment to cant_have_const_assignment.
11590 Replace calls to cons_up_default_function to implicitly_declare_fn.
11591 * cvt.c (ocp_convert): Use complete_ctor_identifier.
11592 * decl.c (initialize_predefined_identifiers): Initialize it.
11593 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
11594 complex expression.
11595 * init.c (expand_default_init): Don't calculate the in-charge
11597 (build_new_1): Likewise.
11598 * lex.c (cons_up_default_function): Move to method.c.
11599 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
11600 (implicitly_declare_fn): New function.
11601 * typeck.c (build_static_cast): Use complete_ctor_identifier.
11602 (build_modify_expr): Likewise.
11603 * typeck2.c (build_functional_cast): Likewise.
11605 Under the new ABI, constructors don't return `this'.
11606 * cp-tree.h (warn_reorder): Declare.
11607 (special_function_kind): New enum.
11608 (global_base_init_list): Remove declaration.
11609 (emit_base_init): Don't return a value.
11610 (check_base_init): Don't declare.
11611 (is_aggr_typedef): Likewise.
11612 * decl.c (check_special_function_return_type): New function.
11613 (return_types): Remove.
11614 (grokdeclarator): Use check_special_function_return_type.
11615 (start_function): Don't initialize ctor_label under the new ABI.
11616 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
11617 * init.c (begin_init_stmts): Move to top of file.
11618 (finish_init_stmts): Likewise.
11619 (warn_reorder): Don't declare.
11620 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
11622 (check_base_init): Remove.
11623 (is_aggr_typedef): Likewise.
11624 (build_new_1): Don't use the return value of a constructor.
11625 * semantics.c (setup_vtbl_ptr): Don't use the return value
11627 * typeck.c (check_return_expr): Don't magically convert return
11628 statements into `return this' in constructors under the new ABI.
11630 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
11631 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
11632 (base_ctor_identifier): New macro.
11633 (base_dtor_identifier): Likewise.
11634 (deleting_dtor_identifier): Likewise.
11635 * decl.c: Don't include obstack.h.
11636 (obstack_chunk_alloc): Don't define.
11637 (obstack_chunk_free): Likewise.
11638 (struct predefined_identifier): New type.
11639 (initialize_predefined_identifiers): New function.
11640 (init_decl_processing): Use it.
11641 (debug_temp_inits): Remove.
11642 (start_method): Don't call preserve_data.
11643 (hack_incomplete_structures): Update comment.
11644 * init.c (init_init_processing): Don't initialize
11646 (build_offset_rf): Remove dead code.
11647 (build_delete): Use CLASSTYPE_N_BASECLASSES.
11648 * search.c (init_search_processing): Don't initialize
11651 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11653 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
11654 some sign_compare warnings.
11656 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
11658 Rename abi::__vmi_class_type_info members.
11659 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
11660 base_list, detail_masks members to vmi_flags, vmi_base_count,
11661 vmi_bases and vmi_flags_masks respectively.
11662 (__vmi_class_type_info::vmi_flags_masks): Rename
11663 details_unknown_mask to flags_unknown_mask.
11664 * tinfo.cc (__class_type_info::do_upcast): Adjust.
11665 (__vmi_class_type_info::do_find_public_src): Adjust.
11666 (__vmi_class_type_info::do_dyncast): Adjust.
11667 (__vmi_class_type_info::do_upcast): Adjust.
11669 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
11671 * tinfo.cc (convert_to_base): New function.
11672 (get_vbase_offset): Remove. Move into convert_to_base.
11673 (__vmi_class_type_info::do_find_public_src): Adjust.
11674 (__vmi_class_type_info::do_dyncast): Adjust.
11675 (__vmi_class_type_info::do_upcast): Adjust.
11677 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
11679 * tinfo.cc (operator=): Use __builtin_strcmp.
11680 * tinfo2.cc (before): Likewise.
11682 2000-04-06 Mark Mitchell <mark@codesourcery.com>
11684 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
11685 (DECL_SAVED_INLINE): Rename to ...
11686 (DECL_DEFERRED_FN): ... this.
11687 (in_function_p): Remove declaration.
11688 (mark_inline_for_output): Rename to ...
11689 (defer_fn): ... this.
11690 * decl.c (finish_function): Adjust call to mark_inline_for_output.
11691 (in_function_p): Remove definition.
11692 * decl2.c (saved_inlines): Rename to ...
11693 (deferred_fns): ... this.
11694 (saved_inlines_used): Rename to ...
11695 (deferred_fns_used): ... this.
11696 (mark_inline_for_output): Rename to ...
11697 (defer_fn): ... this.
11698 (finish_file): Adjust accordingly.
11699 (init_decl2): Likewise.
11700 * lex.c (cons_up_default_function): Likewise.
11701 * pt.c (mark_decl_instantiated): Likewise.
11702 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
11704 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
11705 * semantics.c (expand_body): Defer more functions.
11707 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
11709 * vec.cc: New file.
11710 * Make-lang.in (CXX_LIB2FUNCS): Add it.
11712 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11713 __cxa_vec_delete): Declare.
11715 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
11717 * rtti.c (dfs_class_hint_mark): New static function.
11718 (dfs_class_hint_unmark): New static function.
11719 (class_hint_flags): Use them.
11721 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
11723 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
11725 2000-04-05 Mark Mitchell <mark@codesourcery.com>
11727 * cp-tree.h (instantiate_decl): Change prototype.
11728 * decl2.c (mark_used): Adjust call.
11729 * optimize.c (inlinable_function_p): Adjust handling of templates.
11730 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
11731 (do_type_instantiation): Likewise.
11732 (instantiate_decl): Defer more templates.
11733 (instantiate_pending_templates): Adjust logic to handle inline
11736 * Makefile.in (GGC_H): New variable. Use it throughout in place
11739 * call.c: Don't include obstack.h. Include ggc.h.
11740 (obstack_chunk_alloc): Don't define.
11741 (obstack_chunk_free): Likewise.
11742 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
11743 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
11744 (pop_switch): Free it.
11746 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
11748 * dump.c (dequeue_and_dump): Don't try to print the bit_position
11749 if we don't have a DECL_FIELD_OFFSET.
11751 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
11753 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
11754 special_function_p.
11756 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11758 * cfns.gperf (hash, libc_name_p): Prototype.
11760 * rtti.c (build_dynamic_cast_1): Constification.
11762 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
11764 * semantics.c (deferred_type_access_control): Prototype.
11766 2000-04-04 Mark Mitchell <mark@codesourcery.com>
11768 Correct many new ABI issues regarding vbase and vcall offset
11770 * cp-tree.h (BINFO_VTABLE): Document.
11771 (struct lang_type): Tweak formatting.
11772 (BINFO_PRIMARY_BINFO): Add to documentation.
11773 (CLASSTYPE_VSIZE): Fix typo in comment.
11774 (CLASSTYPE_VBASECLASSES): Update documentation.
11775 (BINFO_VBASE_MARKED): Remove.
11776 (SET_BINFO_VBASE_MARKED): Likewise.
11777 (CLEAR_BINFO_VBASE_MARKED): Likewise.
11778 (BINFO_FIELDS_MARKED): Remove.
11779 (SET_BINFO_FIELDS_MARKED): Likewise.
11780 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
11781 (enum access_kind): New enumeration.
11782 (num_extra_vtbl_entries): Remove declaration.
11783 (size_extra_vtbl_entries): Likewise.
11784 (get_vtbl_decl_for_binfo): New function.
11785 (dfs_vbase_unmark): Remove declaration.
11786 (mark_primary_bases): Likewise.
11787 * class.c (SAME_FN): Remove.
11788 (struct vcall_offset_data_s): Move definition.
11789 (build_vbase_pointer): Use `build', not `build_binary_op', to
11790 access the vbase pointer under the new ABI.
11791 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
11792 (build_primary_vtable): Likewise.
11793 (dfs_mark_primary_bases): Move here from search.c.
11794 (mark_primary_bases): Likewise.
11795 (determine_primary_bases): Under the new ABI, don't make a base
11796 class a primary base just because we don't yet have any virtual
11798 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
11799 (num_vfun_entries): Remove.
11800 (dfs_count_virtuals): Likewise.
11801 (num_extra_vtbl_entries): Likewise.
11802 (size_extra_vtbl_entries): Likewise.
11803 (layout_virtual_bases): Iterate in inheritance graph order under
11805 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
11806 indicate that a vfield is present.
11807 (init_class_processing): Initialize access_public_node, etc., from
11809 (get_vtbl_decl_for_binfo): New function.
11810 (dump_class_hierarchy_r): Likewise.
11811 (dump_class_hierarchy): Use it.
11812 (finish_vtbls): Build the vtbls in inheritance graph order.
11813 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
11814 (initialize_vtable): Use get_vtbl_decl_for_binfo.
11815 (accumulate_vtbl_inits): Add comments explaining why a pre-order
11817 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
11818 where the vptr points, even for primary vtables.
11819 (build_vtbl_initializer): Adjust handling of vbase and vcall
11821 (build_vcall_and_vbase_vtable_entries): New function.
11822 (dfs_build_vbase_offset_vtbl_entries): Remove.
11823 (build_vbase_offset_vtbl_entries): Reimplement.
11824 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
11825 were already handled in a primary base class vtable.
11826 (build_vcall_offset_vtbl_entries): Adjust.
11827 (build_rtti_vtbl_entries): Adjust.
11828 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
11829 * init.c (expand_virtual_init): Simplify.
11830 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
11831 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
11832 * search.c (BINFO_ACCESS): New macro.
11833 (SET_BINFO_ACCESS): Likewise.
11834 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
11835 (access_in_type): Likewise.
11836 (dfs_accessible_p): Likewise.
11837 (protected_accessible_p): Likewise.
11838 (lookup_fnfields_1): Adjust documentation.
11839 (dfs_mark_primary_bases): Move to class.c
11840 (mark_primary_bases): Likewise.
11841 (dfs_vbase_unmark): Remove.
11842 (virtual_context): Use BINFO_FOR_VBASE.
11843 (dfs_get_vbase_types): Simplify.
11844 (dfs_build_inheritance_graph_order): New function.
11845 (get_vbase_types): Use it.
11846 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
11848 * tinfo.cc (get_vbase_offset): New function.
11849 (__vmi_class_type_info::do_find_public_src): Use it.
11850 (__vmi_class_type_info::do_dyncast): Likewise.
11851 (__vmi_class_type_info::do_upcast): Likewise.
11853 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
11855 * lang-specs.h: Pass -fno-show-column to the preprocessor.
11857 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
11859 * rtti.c (class_hint_flags): Rename flags.
11860 (class_initializer): Remove flags.
11861 (synthesize_tinfo_var): Combine offset and flags. Add flags
11862 for __vmi_class_type_info.
11863 (create_tinfo_types): Remove flags from __class_type_info and
11864 __si_class_type_info. Merge flags and offset from
11865 base_class_type_info.
11866 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
11867 (__base_class_info::is_virtual_p): Adjust.
11868 (__base_class_info::is_public_p): Adjust.
11869 (__base_class_info::offset): New accessor.
11870 (__class_type_info::details): Remove member.
11871 (__class_type_info::__class_type_info): Lose details.
11872 (__class_type_info::detail_masks): Remove.
11873 (__si_class_type_info::__si_class_type_info): Lose details.
11874 (__vmi_class_type_info::details): New member.
11875 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
11876 (__vmi_class_type_info::detail_masks): New member.
11877 * tinfo.cc (__class_type_info::do_upcast): Initialize result
11878 with unknown_details_mask.
11879 (__vmi_class_type_info::do_find_public_src): Adjust
11880 (__vmi_class_type_info::do_dyncast): Adjust.
11881 (__vmi_class_type_info::do_upcast): Set result details, if
11883 (__dynamic_cast): Temporarily #if out optimization.
11885 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
11887 * rtti.c (get_tinfo_decl): Mark used.
11888 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
11889 mark as dealt with, if we output it.
11891 2000-03-28 Mark Mitchell <mark@codesourcery.com>
11893 * class.c: Reorganize to put virtual function table initialization
11894 machinery at the end of the file.
11896 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
11898 * class.c (finish_struct): Use bitsize_zero_node.
11899 * pt.c (instantiate_class_template): Likewise.
11901 2000-03-28 Mark Mitchell <mark@codesourcery.com>
11903 Put RTTI entries at negative offsets in new ABI.
11904 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
11905 vbase offset at index -3, not -1.
11906 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
11907 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
11908 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
11909 (build_rtti_vtbl_entries): New function.
11910 (set_rtti_entry): Remove.
11911 (build_primary_vtable): Don't use it.
11912 (build_secondary_vtable): Likewise.
11913 (start_vtable): Remove.
11914 (first_vfun_index): New function.
11915 (set_vindex): Likewise.
11916 (add_virtual_function): Don't call start_vtable. Do call
11918 (set_primary_base): Rename parameter.
11919 (determine_primary_base): Likewise.
11920 (num_vfun_entries): Don't use skip_rtti_stuff.
11921 (num_extra_vtbl_entries): Include RTTI information.
11922 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
11923 (skip_rtti_stuff): Remove.
11924 (dfs_modify_vtables): Don't use it.
11925 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
11926 (layout_nonempty_base_or_field): Update size handling.
11927 (create_vtable_ptr): Tweak.
11928 (layout_class_type): Adjust parameter names.
11929 (finish_struct_1): Simplify.
11930 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
11931 (skip_rtti_stuff): Remove.
11932 (first_vfun_index): New function.
11933 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
11934 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
11935 (marked_vtable_pathp): Declare.
11936 (unmarked_vtable_pathp): Likewise.
11937 * error.c (dump_expr): Use first_vfun_index to calculate vtable
11939 * rtti.c (build_headof): Look for RTTI at negative offsets.
11940 (get_tinfo_decl_dynamic): Likewise.
11941 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
11943 (create_pseudo_type_info): Do it here instead. Adjust so that
11944 vptr points at first virtual function.
11945 * search.c (marked_vtable_pathp): Make it global.
11946 (unmarked_vtable_pathp): Likewise.
11947 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
11948 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
11949 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
11950 (get_pure_virtuals): Likewise.
11951 (expand_upcast_fixups): Likewise.
11952 * tree.c (debug_binfo): Likewise.
11953 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
11956 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11958 * class.c (check_field_decl): Fix typo.
11959 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
11960 (check_methods): Likewise.
11961 (check_field_decls): Likewise.
11962 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
11963 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
11964 Use DECL_RESULT_FLD, not DECL_RESULT.
11965 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
11966 * lex.c (identifier_type): Likewise.
11967 * pt.c (determine_specialization, lookup_template_class): Likewise.
11968 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
11969 (resolve_overloaded_unification, more_specialized): Likewise.
11970 * semantics.c (finish_member_declaration): Likewise.
11971 * typeck.c (build_x_function_call): Likewise.
11973 2000-03-26 Mark Mitchell <mark@codesourcery.com>
11975 * class.c (layout_empty_base): Handle empty bases with non-byte
11977 (build_base_field): Likewise.
11978 (layout_virtual_bases): Likewise.
11980 * class.c (finish_struct_1): Fix typo in this change:
11982 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11984 2000-03-25 Mark Mitchell <mark@codesourcery.com>
11986 * decl.c (grokdeclarator): Count partial specializations when
11987 keeping track of how many template classes have been seen.
11989 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
11991 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11993 * class.c (build_vbase_pointer_fields): layout_field now place_field.
11994 (get_vfield_offset): Use byte_position.
11995 (set_rtti_entry): Set OFFSET to ssizetype zero.
11996 (get_binfo_offset_as_int): Deleted.
11997 (dfs_record_base_offsets): Use tree_low_cst.
11998 (dfs_search_base_offsets): Likewise.
11999 (layout_nonempty_base_or_field): Reflect changes in RLI format
12000 and call byte_position.
12001 (layout_empty_base): Convert offset to ssizetype.
12002 (build_base_field): use rli_size_unit_so_far.
12003 (dfs_propagate_binfo_offsets): Do computation in proper type.
12004 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
12005 (layout_class_type): Reflect changes in RLI names and fields.
12006 (finish_struct_1): Set DECL_FIELD_OFFSET.
12007 * dump.c (dequeue_and_dump): Call bit_position.
12008 * expr.c (cplus_expand_constant): Use byte_position.
12009 * rtti.c (expand_class_desc): Use bitsize_one_node.
12010 * typeck.c (build_component_addr): Use byte_position and don't
12011 special case for zero offset.
12013 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
12015 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
12017 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
12019 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
12022 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12024 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
12026 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
12027 make_typename_type, check_initializer, cp_finish_decl,
12028 xref_tag): Likewise.
12029 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
12030 decl_namespace, arg_assoc_template_arg, arg_assoc,
12031 validate_nonmember_using_decl, do_class_using_decl): Likewise.
12032 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
12033 args_to_string): Likewise.
12034 * friend.c (is_friend): Likewise.
12035 * lex.c (note_got_semicolon, note_list_got_semicolon,
12036 is_global): Likewise.
12037 * method.c (build_overload_nested_name, build_overload_value,
12038 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
12039 * parse.y (typename_sub, typename_sub1): Likewise.
12040 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
12041 process_partial_specialization, convert_template_argument,
12042 template_args_equal, add_pending_template, lookup_template_class,
12043 for_each_template_parm_r, maybe_fold_nontype_arg,
12044 tsubst, instantiate_template, type_unification_real, unify,
12045 instantiate_pending_templates, set_mangled_name_for_template_decl):
12047 * repo.c (repo_get_id, repo_template_used): Likewise.
12048 * search.c (lookup_field_1): Likewise.
12049 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
12050 * xref.c (classname): Likewise.
12052 2000-03-22 Mark Mitchell <mark@codesourcery.com>
12054 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
12055 (CANONICAL_BINFO): New macro.
12056 (BINFO_NEW_VTABLE_MARKED): Use it.
12057 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
12058 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
12059 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
12061 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12062 (build_secondary_vtable): Likewise.
12063 (dfs_finish_vtbls): Likewise.
12064 (dfs_accumulate_vtbl_inits): Likewise.
12065 (accumulate_vtbl_inits): New function.
12066 (finish_vtbls): Make sure that virtual bases come after
12067 non-virtual bases in the vtable group.
12068 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
12069 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12070 * search.c (struct vbase_info): Move definition.
12071 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12072 (unmarked_new_vtable_p): Likewise.
12073 (dfs_mark_vtable_path): Remove.
12074 (dfs_mark_new_vtable): Remove.
12075 (dfs_unmark_new_vtable): Likewise.
12076 (dfs_clear_search_slot): Likewise.
12077 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12078 (dfs_clear_vbase_slots): Likewise.
12079 (init_vbase_pointers): LIkewise.
12081 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
12083 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
12084 SIZETYPE to a non-SIZETYPE.
12086 2000-03-21 Mark Mitchell <mark@codesourcery.com>
12088 * class.c (layout_virtual_bases): Adjust names in conditionally
12091 * class.c (record_base_offsets): New function.
12092 (layout_conflict_p): Likewise.
12093 (layout_nonempty_base_or_field): Use it.
12094 (layout_empty_base): New function.
12095 (build_base_field): Use it.
12096 (build_base_fields): Update comment.
12097 (layout_virtual_bases): Fold in a little code form
12098 layout_basetypes. Use layout_empty_base.
12099 (layout_basetypes): Remove.
12100 (end_of_class): New function.
12101 (layout_class_type): Use it. Adjust.
12103 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
12104 (fntype_p): Remove.
12105 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
12107 (dfs_skip_nonprimary_vbases_markedp): Likewise.
12108 * typeck.c (fntype_p): Remove.
12110 * cp-tree.h (TI_SPEC_INFO): Remove.
12111 (CLASSTYPE_TI_SPEC_INFO): Likewise.
12112 * pt.c (process_partial_specialization): Likewise.
12114 * class.c (build_base_field): Fix thinko in computation of binfo
12117 * tree.c (mark_local_for_remap_p): Mark variables declared in
12118 TARGET_EXPRs as well.
12120 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
12122 * typeck.c (require_complete_type, complete_type,
12123 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
12124 build_array_ref, convert_arguments, pointer_diff,
12125 build_x_unary_op, build_unary_op, build_c_cast,
12126 build_modify_expr): Use COMPLETE_TYPE_P etc.
12127 * call.c (is_complete, convert_like_real,
12128 build_new_method_call): Likewise.
12129 * class.c (build_vbase_pointer_fields, check_bases,
12130 build_base_field, finish_struct_1, pushclass): Likewise.
12131 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
12132 * decl.c (maybe_process_template_type_declaration, pushtag,
12133 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
12134 layout_var_decl, check_initializer, cp_finish_decl,
12135 grokdeclarator, require_complete_types_for_parms,
12136 grok_op_properties, xref_tag, xref_basetypes,
12137 check_function_type): Likewise.
12138 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
12139 * friend.c (do_friend): Likewise.
12140 * init.c (build_offset_ref): Likewise.
12141 * parse.y (structsp): Likewise.
12142 * pt.c (maybe_process_partial_specialization,
12143 tsubst_friend_function, instantiate_class_template, tsubst,
12144 do_type_instantiation, instantiate_pending_templates): Likewise.
12145 * repo.c (repo_get_id): Likewise.
12146 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
12147 synthesize_tinfo_var, emit_support_tinfos): Likewise.
12148 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
12149 * semantics.c (begin_class_definition): Likewise.
12150 * tree.c (build_cplus_method_type): Likewise.
12151 * typeck2.c (digest_init, build_functional_cast,
12152 add_exception_specifier): Likewise.
12153 * parse.h, parse.c: Regenerated.
12155 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
12157 * inc/cxxabi.h: New header file. Define new-abi entry points.
12158 (__pointer_type_info::target): Rename member to ...
12159 (__pointer_type_info::type): ... here.
12160 (__base_class_info::type): Rename member to ...
12161 (__base_class_info::base): ... here.
12162 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
12163 * cp-tree.h (CPTI_ABI): New global tree enumeration.
12164 (abi_node): New global tree node.
12165 * decl.c (abi_node): Document.
12166 (init_decl_processing): Initialize abi_node.
12167 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
12168 (get_vmi_pseudo_type_info): Likewise.
12169 (create_tinfo_types): Likewise.
12170 (emit_support_tinfos): Likewise.
12171 * tinfo.h (cxxabi.h): Include for new-abi.
12172 Move rtti class definitions to new header file.
12173 * tinfo.cc (abi): Use the namespace.
12174 (std): Move new abi rtti classes from here ...
12175 (__cxxabiv1): ... to here.
12176 * tinfo2.cc (cxxabi.h): Include for new-abi.
12177 Move rtti class definitions to new header file.
12178 (std): Move new abi rtti classes from here ...
12179 (__cxxabiv1): ... to here.
12180 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
12183 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
12184 Jason Merrill <jason@casey.cygnus.com>
12186 * method.c (build_overload_int): Use host_integerp.
12188 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12190 * init.c (build_offset_ref): Handle the case of a templated member
12193 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12195 * except.c (expand_exception_blocks): Clear catch_clauses_last.
12197 2000-03-18 Mark Mitchell <mark@codesourcery.com>
12199 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
12200 * class.c (check_bitfield_decl): Turn illegal bitfields into
12202 (dfs_propagate_binfo_offsets): Adjust for new size_binop
12204 (dfs_offset_for_unshared_vbases): Likewise.
12205 * cvt.c (cp_convert_to_pointer): Convert NULL to a
12206 pointer-to-member correctly under the new ABI.
12207 * expr.c (cplus_expand_constant): Don't use cp_convert when
12208 turning an offset into a pointer-to-member.
12209 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
12210 when dereferencing them under the new ABI.
12211 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
12212 of pointers-to-members under the new ABI.
12214 * class.c (check_bitfield_decl): Remove restriction on really long
12216 (layout_class_type): Implement new ABI handling of bitfields
12217 longer than their types.
12219 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12221 * parse.y (extdefs): Call ggc_collect.
12222 * parse.c: Regenerated.
12224 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
12226 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
12227 (note_name_declared_in_class): Use OVL_CURRENT to get at a
12228 potential overload.
12230 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12232 * class.c (build_vbase_path): Use integer_zerop.
12233 (build_vtable_entry): Use tree_low_cst.
12234 (get_vfield_offset): Use bit_position.
12235 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
12237 (check_bitfield_decl): Set DECL_SIZE using convert.
12238 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
12239 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
12241 (finish_struct_1): Use bit_position.
12242 (dump_class_hierarchy): Use tree_low_cst.
12243 * cp-tree.h (min_precision): Add declaration.
12244 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
12245 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
12246 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
12247 * expr.c (cplus_expand_constant): Use bit_position.
12248 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
12249 * rtti.c (get_base_offset): Use bit_position.
12250 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
12251 host_integerp, and tree_low_cst.
12252 (pointer_int_sum): Use integer_zerop.
12253 (build_component_addr): Use bit_position.
12255 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
12257 * typeck.c (require_complete_type): Don't assume size_zero_node.
12258 (complete_type_or_else): Likewise.
12260 2000-03-16 Steven Grady <grady@digitaldeck.com>
12261 Jason Merrill <jason@casey.cygnus.com>
12263 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
12265 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
12267 * decl2.c (grokfield): Bail out if type is error_mark_node.
12269 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
12271 * tinfo2.cc (__ptr_to_member_data): Rename to ...
12272 (__pointer_to_member_data): ... here. Adjust.
12273 * rtti.c (create_tinfo_types): Adjust.
12275 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
12277 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
12278 * decl.c (ref_desc_type_node): Undocument.
12279 * rtti.c (ptr_ref_initializer): Rename to ...
12280 (ptr_initializer): ... here. Adjust comments.
12281 (ptmd_initializer): Fix comment thinko.
12282 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
12283 (create_tinfo_types): Remove ref_desc_type_node init.
12284 * tinfo2.cc (__reference_type_info): Remove.
12286 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
12288 * decl.c (cp_finish_decl): Remove obsolete comment.
12290 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
12292 2000-03-14 Mark Mitchell <mark@codesourcery.com>
12294 * cp-tree.h: Tweak documentation.
12295 * class.c (build_vbase_pointer_fields): Layout the fields, too.
12296 (avoid_overlap): Remove.
12297 (get_binfo_offset_as_int): New function.
12298 (dfs_serach_base_offsets): Likewise.
12299 (layout_nonempty_base_or_field): Likewise.
12300 (build_base_field): Layout fields here. Avoid placing two objects
12301 of the same type at the same address, under the new ABI.
12302 (build_base_fields): Adjust accordingly.
12303 (create_vtable_ptr): Return the new field, but don't attach it to
12305 (remove_base_field): Remove.
12306 (remove_base_fields): Remove.
12307 (layout_basetypes): Adjust accordingly.
12308 (layout_class_type): Call layout_field for each field, rather than
12309 just making a wholesale call to layout_type.
12311 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
12313 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
12315 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
12317 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
12319 * except.c (dtor_nothrow): New fn.
12320 (do_pop_exception): Use it. Take type parm.
12321 (push_eh_cleanup): Take type parm.
12322 (expand_start_catch_block): Pass it.
12323 (build_eh_type_type_ref): Accept null type.
12325 2000-03-12 Mark Mitchell <mark@codesourcery.com>
12327 * cp-tree.h (revert_static_member_fn): Change prototype.
12328 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
12329 (grok_op_properties): Likewise.
12330 (start_function): Likewise.
12331 (revert_static_member_fn): Simplify.
12332 * pt.c (check_explicit_specialization): Adjust call to
12333 revert_static_member_fn.
12335 2000-03-11 Mark Mitchell <mark@codesourcery.com>
12337 * cp-tree.h (scope_kind): New type.
12338 (tmpl_spec_kind): Likewise.
12339 (declare_pseudo_global_level): Remove.
12340 (pseudo_global_level_p): Rename to template_parm_scope_p.
12341 (pushlevel): Remove declaration.
12342 (begin_scope): New function.
12343 (finish_scope): Likewise.
12344 (current_tmpl_spec_kind): Likewise.
12345 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
12346 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
12347 Add template_spec_p.
12348 (toplevel_bindings_p): Adjust.
12349 (declare_pseudo_global_level): Remove.
12350 (pseudo_global_level_p): Rename to template_parm_scope_p.
12351 (current_tmpl_spec_kind): New function.
12352 (begin_scope): Likewise.
12353 (finish_scope): Likewise.
12354 (maybe_push_to_top_level): Adjust.
12355 (maybe_process_template_type_declaration): Likewise.
12356 (pushtag): Likewise.
12357 (pushdecl_nonclass_level): Likewise.
12358 (lookup_tag): Likewise.
12359 (grokfndecl): Handle member template specializations. Share
12360 constructor and non-constructor code.
12361 * decl2.c (check_classfn): Handle member template specializations.
12362 * pt.c (begin_template_parm_list): Use begin_scope.
12363 (begin_specialization): Likewise.
12364 (end_specialization): Likewise.
12365 (check_explicit_specialization): Use current_tmpl_spec_kind.
12366 Handle member template specializations.
12367 (end_template_decl): Use finish_scope. Remove call to
12369 (push_template_decl_real): Remove bogus error message.
12370 (tsubst_decl): Fix typo in code contained in comment.
12371 (instantiate_template): Handle member template specializations.
12372 (most_general_template): Likewise.
12374 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
12376 * lex.c (whitespace_cr): Compress consecutive calls to warning().
12377 (do_identifier): Ditto for error().
12379 * pt.c (convert_nontype_argument): Ditto for cp_error().
12380 (convert_template_argument): Ditto for cp_pedwarn().
12382 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
12384 * exception.cc (__check_null_eh_spec): New fn.
12385 * except.c (expand_end_eh_spec): Call it if the spec is throw().
12387 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
12389 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
12390 * except.c (expand_end_eh_spec): Add the return type.
12391 * rtti.c (throw_bad_cast): Add the parmtypes.
12392 (throw_bad_typeid): Likewise.
12394 * semantics.c (expand_stmt): Only leave out rtl for unused
12395 artificials, and set DECL_IGNORED_P on them as well.
12396 * decl.c (wrapup_globals_for_namespace): Likewise.
12398 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
12400 * decl.c (maybe_commonize_var): Skip all artificial decls.
12401 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
12403 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
12405 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
12406 * cp-tree.h: Declare flag_enforce_eh_specs.
12407 * decl.c (store_parm_decls, finish_function): Check it.
12409 C library functions don't throw.
12410 * Makefile.in (cfns.h): New target.
12411 (except.o): Depend on it.
12412 * Make-lang.in (cc1plus): Depend on cfns.gperf.
12413 * cfns.gperf: New file.
12414 * cfns.h: Generated.
12415 * except.c: Include it.
12416 (nothrow_libfn_p): New fn.
12417 * decl.c (grokfndecl): Use it.
12418 * cp-tree.h: Declare it.
12420 * decl.c (push_overloaded_decl_1, auto_function,
12421 define_function): Lose.
12422 (build_library_fn_1): New static fn.
12423 (builtin_function): Use it.
12424 (get_atexit_node): Use build_library_fn_ptr.
12425 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
12426 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
12427 push_void_library_fn, push_throw_library_fn): New fns.
12428 * cp-tree.h: Declare them.
12429 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
12430 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
12431 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
12432 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
12433 * rtti.c (build_runtime_decl): Lose.
12434 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
12435 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
12436 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
12438 * call.c (build_call): Remove result_type parm.
12439 Call mark_used on unused artificial fns.
12440 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
12442 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
12444 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
12446 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
12447 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
12448 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
12449 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
12450 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
12451 expand_generic_desc): Likewise.
12453 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12455 * exception.cc (__cp_pop_exception): Cleanup the original object.
12457 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12459 * decl.c (grok_op_properties): Merge conversion to void warning
12460 with other silly op warnings.
12462 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
12464 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
12465 array CONSTRUCTOR elements. Don't use expr_tree_cons.
12467 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12469 * decl.c (cp_make_fname_decl): New function.
12470 (wrapup_globals_for_namespace): Don't emit unused static vars.
12471 (init_decl_processing): Remove comment about use of
12472 array_domain_type. Set make_fname_decl.
12473 (cp_finish_decl): Remove __FUNCTION__ nadgering.
12474 * semantics.c (begin_compound_stmt): Remove
12475 current_function_name_declared flagging.
12476 (expand_stmt): Don't emit unused local statics.
12477 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
12480 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12482 * typeck.c (convert_for_assignment): Don't look at array
12484 * call.c (convert_like_real): Likewise.
12486 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
12488 Add initial support for '\uNNNN' specifier.
12489 * lex.c (read_ucs): New fn.
12490 (readescape, skip_white_space): Call it.
12491 (is_extended_char, is_extended_char_1): New fns.
12492 (utf8_extend_token): New fn, #if 0'd out.
12493 (real_yylex): Treat extended chars like letters.
12495 * search.c (note_debug_info_needed): Walk the bases even if we
12496 weren't deferring the type itself.
12498 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12500 * decl2.c (finish_objects): Constify a char*.
12502 * method.c (emit_thunk): Likewise.
12504 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
12506 * typeck.c (dubious_conversion_warnings): Look through
12509 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12511 * class.c (dfs_modify_vtables): I is now unsigned.
12512 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
12513 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
12514 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
12515 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12516 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
12517 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
12518 Call integer_all_onesp.
12519 * typeck2.c (process_init_constructor): Use compare_tree_int.
12521 * lang-specs.h (as): Don't call if -syntax-only.
12523 2000-03-06 Mark Mitchell <mark@codesourcery.com>
12525 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
12526 RTL_EXPR_HAS_NO_SCOPE after all.
12528 2000-03-05 Mark Mitchell <mark@codesourcery.com>
12530 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
12531 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
12532 RTL_EXPR_HAS_NO_SCOPE.
12534 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
12537 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
12539 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
12541 * call.c (convert_like): Macrofy.
12542 (convert_like_with_context): New macro.
12543 (convert_like_real): Renamed from convert_like. Add calling
12544 context parameters, for diagnostics. Add recursive flag. Call
12545 dubious_conversion_warnings for outer conversion.
12546 (build_user_type_conversion): Use convert_like_with_context.
12547 (build_over_call): Likewise. Don't warn about dubious
12548 conversions here. Adjust convert_default_arg calls.
12549 (convert_default_arg): Add context parameters for diagnostics.
12550 Pass through to convert_like_with_context.
12551 * cp-tree.h (convert_default_arg): Add context parameters.
12552 (dubious_conversion_warnings): Prototype new function.
12553 * typeck.c (convert_arguments): Adjust convert_default_arg call.
12554 (dubious_conversion_warnings): New function, broken
12555 out of convert_for_assignment.
12556 (convert_for_assignment): Adjust.
12558 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
12560 * decl2.c (key_method): Break out from...
12561 (import_export_vtable, import_export_class): ...here.
12563 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
12564 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
12566 * search.c (note_debug_info_needed, dfs_debug_mark,
12567 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
12568 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
12570 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
12572 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
12575 2000-03-02 Mark Mitchell <mark@codesourcery.com>
12577 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
12578 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
12579 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
12580 (lang_type): Split gets_new into has_new and has_array_new.
12581 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12582 (TYPE_GETS_NEW): Split into ...
12583 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
12584 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
12585 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
12586 (build_op_new_call): Don't declare.
12587 (build_new_1): Likewise.
12588 * call.c (build_op_new_call): Remove.
12589 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12590 instead of TYPE_NEEDS_DESTRUCTOR.
12591 (finish_struct_bits): Likewise.
12592 (add_implicitly_declared_members): Likewise.
12593 (check_field_decl): Likewise.
12594 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
12595 correctly under the new ABI.
12596 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12597 instead of TYPE_NEEDS_DESTRUCTOR.
12598 (initialize_local_var): Likewise.
12599 (destroy_local_var): Likewise.
12600 (cp_finish_decl): Likewise.
12601 (register_dtor_fn): Likewise.
12602 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
12603 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
12604 TYPE_VEC_DELETE_TAKES_SIZE here.
12605 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
12606 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
12607 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12608 (finish_destructor_body): Likewise.
12609 (maybe_build_cleanup_1): Likewise.
12610 * decl2.c (do_static_destruction): Likewise.
12611 * init.c (build_new_1): Make it static.
12612 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12613 (expand_cleanup_for_base): Likewise.
12614 (get_cookie_size): New function.
12615 (build_new_1): Handle array-new cookies correctly under the new
12617 (build_vec_delete_1): Likewise.
12618 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12619 (build_delete): Likewise.
12620 (build_vec_delete): Handle array-new cookies correctly under the new
12622 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12623 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
12624 TYPE_HAS_ARRAY_NEW_OPERATOR.
12625 * ptree.c (print_lang_type): Check them.
12626 * search.c (context_for_name_lookup): Fix typo in comment.
12627 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12628 * tree.c (break_out_cleanups): Likewise.
12629 (build_cplus_array_test_1): Likewise.
12630 (cp_build_qualified_type_real): Likewise.
12631 * typeck.c (complete_type): Likewise.
12633 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
12634 the command-line, not the end.
12636 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
12638 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
12640 2000-03-02 Tom Tromey <tromey@cygnus.com>
12642 * cp-tree.h (build_java_class_ref): Declare.
12643 * init.c (build_java_class_ref): No longer static.
12644 * except.c (expand_throw): Generate a Java-style `throw' if the
12645 thrown object is a "Java" object.
12646 (initialize_handler_parm): Generate a Java-style lookup of
12647 exception info if the caught object is a "Java" object.
12648 (catch_language, catch_language_init): New globals.
12649 (decl_is_java_type): New function.
12650 (expand_start_catch_block): Don't call push_eh_info() or
12651 push_eh_cleanup() when handling a Java-style "catch". Pass Java
12652 class reference to build_catch_block.
12654 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12656 * typeck.c (comptypes): Treat sizetype like its language equivalent.
12658 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
12660 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
12661 to merge reference/pointer code and fix incorrect warnings.
12663 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
12665 * search.c (protected_accessible_p): Use context_for_name_lookup.
12667 * init.c (construct_virtual_bases): Fix thinko.
12668 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
12670 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
12672 * decl.c (current_function_decl): Move to toplev.c.
12674 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
12676 * pt.c (fn_type_unification): Unify return type, whenever
12678 (get_bindings_real): Only pass return type when necessary.
12679 Remove explicit return type check.
12680 * class.c (resolve_address_of_overloaded_function): Pass desired
12681 return type to fn_type_unification.
12683 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12685 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
12687 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
12689 * rtti.c (expand_class_desc): Likewise.
12690 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
12691 (THUNK_VCALL_OFFSET): Likewise.
12692 (THUNK_DELTA): Reflect changes in ../tree.h.
12694 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
12696 * search.c (protected_accessible_p): Also allow the access if
12697 the member is public in DERIVED. Lose TYPE parm.
12698 (friend_accessible_p): Lose TYPE parm.
12699 (accessible_p): Adjust.
12701 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12703 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
12704 on things that are not sizes; ssize_binop deleted.
12705 Call size_diffop when appropriate.
12706 (dfs_build_vcall_offset_vtbl_entries): Likewise.
12707 (build_primary_vtable, build_secondary_vtable): Likewise.
12708 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
12709 Variable I is HOST_WIDE_INT.
12710 (get_vfield_offset): Pass proper types to size_binop.
12711 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
12712 (finish_struct_1): Likewise.
12713 (skip_rtti_stuff): Arg N is now pointer to signed.
12714 (layout_class_type): Use size_zero_node.
12715 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
12716 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
12717 * decl.c (complete_arry_type): Pass proper types to size_binop.
12718 (xref_basetypes): BINFO_OFFSET is sizetype.
12719 * error.c (dump_expr): Don't use size_binop non-sizes.
12720 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
12721 * init.c (construct_virtual_bases): Fix type error.
12722 (build_vec_delete_1): Pass proper type to size_binop and don't
12724 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
12725 * rtti.c (get_base_offset): Pass proper type to size_binop.
12726 * search.c (dfs_find_vbases): Fix type error.
12727 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
12728 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
12729 * tree.c (debug_binfo): Variable N is signed.
12730 Use HOST_WIDE_INT_PRINT_DEC.
12731 * typeck.c (comptypes): sizetype is same as equivalent integer type.
12732 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
12733 size_one_node and size_zero_node.
12734 (c_alignof): Use size_one_node.
12735 (build_component_addr): Pass proper types to size_binop.
12736 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
12738 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
12740 Implement class scope using-declarations for functions.
12741 * class.c (handle_using_decl): Call add_method for used functions.
12742 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
12743 (add_method): Used functions are hidden by local functions.
12744 (check_bases_and_members): Handle using-decls before finalizing
12745 CLASSTYPE_METHOD_VEC.
12746 * call.c (add_function_candidate): Add ctype parm; if non-zero,
12747 override the type of 'this' accordingly.
12748 (add_template_candidate, add_template_candidate_real): Add ctype parm.
12749 (convert_class_to_reference, build_user_type_conversion_1,
12750 build_new_function_call, build_object_call, build_new_op,
12751 build_new_method_call): Pass ctype parm.
12753 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
12755 * call.c (convert_class_to_reference, build_user_type_conversion_1,
12756 build_new_function_call, build_object_call, build_new_op,
12757 build_new_method_call, build_op_delete_call): Don't get basetype_path
12759 * typeck.c (build_component_ref): Likewise.
12760 * init.c (build_offset_ref): Likewise.
12761 (resolve_offset_ref): Don't call enforce_access.
12762 Call build_scoped_ref.
12763 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
12764 would cause an error or if -pedantic.
12765 * class.c (alter_access): Lose binfo parm.
12767 2000-02-26 Mark Mitchell <mark@codesourcery.com>
12769 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
12772 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
12774 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
12775 pseudo_type_info creation into the std namespace
12777 2000-02-26 Mark Mitchell <mark@codesourcery.com>
12779 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
12780 (import_export_class): Remove declaration.
12781 * decl2.c (import_export_class): Make it static.
12782 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
12783 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
12784 EXPR_WITH_FILE_LOCATION.
12785 * lex.c (check_newline): Tweak filename/lineno setting.
12786 * semantics.c (begin_while_stmt): Fix typo in comment.
12788 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12790 * lang-options.h (-fmessage-length=): Add missing option.
12792 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
12794 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
12796 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
12798 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
12800 * optimize.c (expand_call_inline): Emit the return label before
12801 evaluating the return value.
12803 2000-02-24 Mark Mitchell <mark@codesourcery.com>
12805 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
12806 than duplicating functionality here.
12807 * optimize.c: Include input.h.
12808 (expand_call_inline): Use push_srcloc and pop_srcloc.
12809 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
12810 * parse.c: Regenerated.
12811 * Makefile.in (lex.o): Depend on input.h.
12812 (optimize.o): Likewise.
12814 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
12816 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
12817 function type, rather than ICE.
12819 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
12821 * decl.c (grokdeclarator): Call decl_type_access_control.
12822 * parse.y (parse_end_decl): Don't call decl_type_access_control if
12825 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
12827 * decl.c (decls_match): Remove obsolete static member nadgering.
12829 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12831 * decl.c (grokdeclarator): Change ANSI to ISO.
12832 * lex.c (consume_string, readescape, do_identifier): Likewise.
12833 (parse_float, real_yylex): Likewise.
12834 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
12835 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
12836 new_type_id, maybe_label_decls, simple_stmt,
12837 for.init.statement): Likewise.
12838 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
12839 * semantics.c (finish_named_return_value): Likewise.
12840 * parse.c: Regenerate.
12842 2000-02-21 Mark Mitchell <mark@codesourcery.com>
12844 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
12845 (CPTI_CLASS_STAR_TYPE): Remove.
12846 (vtable_index_type): Likewise.
12847 (class_star_type_node): Remove.
12848 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
12849 (build_binary_op_nodefault): Remove.
12850 * call.c (build_new_op): Use build_binary_op instead of
12851 build_binary_op_nodefault.
12852 * decl.c (init_decl_processing): Remove class_star_type_node
12853 initialization. Make delta_type_node ptrdiff_type_node under the
12854 new ABI. Initialize vtable_index_type.
12855 (build_ptrmemfunc_type): Build different structures for the new
12857 (build_enumerator): Use build_binary_op instead of
12858 build_binary_op_nodefault.
12859 * method.c (build_overload_value): Mangle pointers-to-members
12860 appropriately under the new ABI.
12861 * typeck.c (build_array_ref): Use build_binary_op instead of
12862 build_binary_op_nodefault.
12863 (get_member_function_from_ptrfunc): Adjust for the new ABI.
12864 (build_binary_op_nodefault): Rename to ...
12865 (build_binary_op): ... this. Remove old version. Adjust for
12866 pointer-to-member comparisons under the new ABI.
12867 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
12868 (build_ptrmemfunc): Adjust for the new ABI.
12869 (expand_ptrmemfunc_cst): Likewise.
12870 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
12871 (pfn_from_ptrmemfunc): Adjust for the new ABI.
12873 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
12875 * call.c (build_object_call): Compress consecutive calls to
12877 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
12878 (build_op_delete_call): Adjust message formatting.
12880 * class.c (check_bases): Compress consecutive calls to
12882 (finish_struct_anon): Say 'ISO C++'.
12884 * decl.c (start_decl): Same here.
12885 (grok_reference_init): Likewise.
12886 (grokfndecl): Correct message formatting.
12887 (grokfndecl): Improve diagnostic.
12888 (check_static_variable_definition): Likewise. Say 'ISO C++'
12889 (compute_array_index_type): Say 'ISO C++'
12890 (create_array_type_for_decl): Compress consecutive calls to
12892 (grokdeclarator): Say 'ISO C++'
12893 (grok_op_properties): Likewise.
12895 * decl2.c (delete_sanity): Clairify diagnostic.
12896 (check_member_template): Same here.
12897 (grok_function_init): Use consistent terminology.
12899 * expr.c (do_case): Say 'ISO C++'
12901 * friend.c (do_friend): Compress consecutive calls to warning.
12903 2000-02-20 Mark Mitchell <mark@codesourcery.com>
12905 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
12906 * class.c (build_secondary_vtable): Reorganize. Don't create a
12907 new vtable under the new ABI.
12908 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
12909 computing the size.
12910 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
12911 the initializing elements.
12912 (initialize_vtable): New function.
12913 (dfs_finish_vtbls): Use it.
12914 (dfs_accumulate_vtbl_inits): New function.
12915 (finish_vtbls): Merge primary and secondary vtables under the new
12917 (finish_struct_1): Remove redundant call to layout_vtable_decl.
12918 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
12921 * class.c (build_vtable): New function, split out from ...
12922 (get_vtable_decl): ... here, and ...
12923 (build_secondary_vtable): ... here.
12925 * pt.c (tsubst_decl): Fix formatting.
12927 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12929 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
12930 (avoid_overlap, build_base_field): Likewise.
12931 (build_base_field, build_base_fields, is_empty_class):
12932 Test DECL_SIZE with integer_zero.
12933 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
12934 * cp-tree.h (struct lang_type): New field size_unit.
12935 (CLASSTYPE_SIZE_UNIT): New macro.
12936 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
12937 (cp_finish_decl): Delete -Wlarger-than processing.
12938 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
12939 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
12940 * tree.c (make_binfo): binfo vector is one entry longer.
12941 (walk_tree): Walk DECL_SIZE_UNIT.
12943 2000-02-19 Mark Mitchell <mark@codesourcery.com>
12945 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
12947 (build_vtable_entry): Don't assume all vtable entries are
12949 (build_vtbl_initializer): Adjust accordingly.
12950 (get_vtable_decl): Fix formatting.
12952 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
12954 * semantics.c (deferred_type_access_control): Walk the entire
12956 (save_type_access_control): Rename from
12957 initial_deferred_type_access_control. Just remember the value.
12958 (decl_type_access_control): New fn.
12959 (begin_function_definition): Use deferred_type_access_control, after
12960 we've started the function. Set type_lookups to error_mark_node.
12961 * parse.y (frob_specs, fn.def1): Adjust.
12962 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
12963 (parse_end_decl, parse_bitfield0, parse_method): New fns.
12964 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
12965 (after_type_component_declarator0): Likewise.
12966 (after_type_component_declarator): Likewise.
12967 (notype_component_declarator): Likewise.
12968 * cp-tree.h: Adjust.
12970 * decl.c (redeclaration_error_message): Allow redeclaration of
12971 namespace-scope decls.
12973 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
12975 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
12977 2000-02-17 Mark Mitchell <mark@codesourcery.com>
12979 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
12980 * decl2.c (grokclassfn): Likewise.
12982 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
12984 * decl2.c (lang_decode_option): Don't set default message length
12986 * lex.c (lang_init_options): Set it here.
12988 2000-02-16 Mark Mitchell <mark@codesourcery.com>
12990 Make DECL_CONTEXT mean the class in which a member function was
12991 declared, even for a virtual function.
12992 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
12993 (DECL_FRIEND_CONTEXT): New macro.
12994 (DECL_REAL_CONTEXT): Remove.
12995 (SET_DECL_FRIEND_CONTEXT): Likewise.
12996 (DECL_VIRTUAL_CONTEXT): Adjust.
12997 (DECL_CLASS_SCOPE_P): Use TYPE_P.
12998 (add_friends): Remove.
12999 (hack_decl_function_context): Likewise.
13000 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
13002 (build_over_call): Fix indentation. Use DECL_CONTEXT
13003 instead of DECL_CLASS_CONTEXT.
13004 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
13005 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13006 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13007 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
13008 (build_base_field): Likewise.
13009 (finish_struct_1): Likewise.
13010 (build_self_reference): Likewise.
13011 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
13013 (pushtag): Use decl_function_context, not
13014 hack_decl_function_context.
13015 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13016 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
13017 (pushdecl): Remove bogus code.
13018 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
13019 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13020 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13021 Use decl_function_context, nothack_decl_function_context.
13022 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
13023 (grokdeclarator): Likewise. Use decl_function_context, not
13024 hack_decl_function_context.
13025 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
13026 (start_function): Use DECL_FRIEND_CONTEXT, not
13027 DECL_CLASS_CONTEXT. Use decl_function_context, not
13028 hack_decl_function_context.
13029 (finish_function): Use decl_function_context, not
13030 hack_decl_function_context.
13031 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
13032 DECL_CLASS_CONTEXT.
13033 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
13034 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
13035 (grokfield): Likewise.
13036 (finish_builtin_type): Likewise.
13037 (finish_vtable_vardec): Use decl_function_context, not
13038 hack_decl_function_context.
13039 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13040 (start_static_initialization_or_destruction): Likewise.
13041 (finish_static_initialization_or_destruction): Likewise.
13042 (mark_used): Adjust logic for deciding when to synthesize methods.
13043 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
13045 * error.c (dump_function_decl): Use DECL_CONTEXT, not
13046 DECL_CLASS_CONTEXT.
13047 * friend.c (is_friend): Likewise.
13048 (add_friends): Remove.
13049 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
13050 * lex.c (begin_definition_of_inclass_inline): Use
13051 decl_function_context, not hack_decl_function_context.
13052 (process_next_inline): Likewise.
13053 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13054 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
13055 DECL_CLASSS_CONTEXT.
13056 (hack_identifier): Likewise.
13057 (synthesize_method): Use decl_function_context, not
13058 hack_decl_function_context.
13059 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
13061 (is_member_template): Use decl_function_context, not
13062 hack_decl_function_context. Use DECL_CONTEXT, not
13063 DECL_CLASS_CONTEXT.
13064 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
13065 DECL_CLASS_CONTEXT.
13066 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
13068 (push_template_decl_real): Likewise.
13069 (instantiate_class_template): Don't call add_friends.
13070 (tsubst_default_argument): Use DECL_CONTEXT, not
13072 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13073 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13074 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
13075 DECL_CLASS_CONTEXT.
13076 * repo.c (repo_inline_used): Likewise.
13077 * search.c (current_scope): Adjust for new _CONTEXT macros.
13078 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
13080 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13081 (lookup_fnfields_here):Likewise.
13082 (check_final_overrider): Likewise.
13083 (init_vbase_pointers): Likewise.
13084 (virtual_context): Likewise.
13085 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
13086 (expand_body): Use decl_function_context, not
13087 hack_decl_function_context.
13088 * tree.c (hack_decl_function_context): Remove.
13089 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
13090 DECL_CLASS_CONTEXT.
13091 * typeck2.c (error_not_base_type): Likewise.
13093 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
13095 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
13097 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13099 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
13101 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
13103 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
13105 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
13107 * decl2.c (lang_decode_option): Enable automatic line wrapping.
13109 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
13111 * parse.y (frob_specs): Split out...
13112 (parse_decl): From here.
13113 (fn.def2): Call initial_deferred_type_access_control.
13114 (after_type_component_declarator0): Call frob_specs.
13115 (notype_component_declarator0): Likewise.
13116 * search.c (friend_accessible_p): Nested classes are friends of their
13119 2000-02-10 Mark Mitchell <mark@codesourcery.com>
13121 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
13122 used to create an implicit temporary.
13124 * class.c (dfs_modify_vtables): Tweak calculation of functions to
13127 2000-02-08 Nathan Sidwell <nathan@acm.org>
13129 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
13130 strip array element qualifiers too.
13132 2000-02-07 Mark Mitchell <mark@codesourcery.com>
13134 * decl.c (store_parm_decls): Don't build cleanups for parameters
13135 while processing_template_decl.
13137 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
13139 * cp-tree.h (struct saved_scope): Add incomplete field.
13140 (namespace_scope_incomplete): New macro.
13141 * decl.c (pushdecl): Use it.
13142 (hack_incomplete_structures): Use it. See through artificial
13144 (mark_saved_scope): Mark it.
13146 Implement access control for nested types.
13147 * search.c (type_access_control): New fn.
13148 (accessible_p): Now we do perform access control for types.
13149 * semantics.c (deferred_type_access_control): New fn.
13150 (initial_deferred_type_access_control): New fn.
13151 (begin_function_definition): Call it. Add lookups parm.
13152 * decl.c (struct binding_level): Add this_class field.
13153 (pushlevel_class): Set it.
13154 (mark_binding_level): Mark it.
13155 (lookup_name_real): Use it. Call type_access_control.
13156 (mark_saved_scope): Mark lookups field.
13157 * cp-tree.h (flagged_type_tree): Add lookups field.
13158 (struct saved_scope): Add lookups field.
13159 (type_lookups): New macro.
13160 * parse.y (declmods): Now <ftype>.
13161 (parse_decl): Add lookups parm. Call
13162 initial_deferred_type_access_control.
13163 (lang_extdef): Clear type_lookups.
13164 (typed_declspecs, declmods, typespec): Set lookups field.
13165 (initdcl): Call deferred_type_access_control.
13166 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
13167 component_decl_1, named_parm): Adjust.
13168 * friend.c (is_friend): Nested classes are friends of their
13171 * class.c (currently_open_derived_class): New fn.
13172 * method.c (hack_identifier): Use it.
13174 * lex.c (do_identifier): Remove obsolete code.
13176 * parse.y (typed_typespecs): Propagate new_type_flag properly.
13178 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
13180 * tinfo.h: Remove apostrophes from C++ comment (xgettext
13181 thinks this file is plain C).
13183 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13185 * Makefile.in (call.o): Depend on $(EXPR_H).
13187 * call.c: Include "expr.h".
13189 * class.c (dump_class_hierarchy): Add prototype.
13191 * search.c (dfs_get_pure_virtuals): Likewise.
13193 2000-02-1 Ulrich Drepper <drepper@redhat.com>
13195 * parse.y (simple_stmt): Allow :: token in asm parameter list.
13196 * parse.c: Rebuilt.
13198 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
13200 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
13201 Store it in DECL_FCONTEXT.
13202 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
13204 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
13206 * tinfo.h (old abi): #include "tconfig.h".
13207 * tinfo.cc (convert_to_base): Move into old abi section.
13209 2000-01-31 Mark Mitchell <mark@codesourcery.com>
13211 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
13212 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
13213 (BINFO_PRIMARY_BINFO): New macro.
13214 (BF_DELTA): Rename to ...
13215 (BV_DELTA): ... this.
13216 (BF_VCALL_INDEX): Rename to ...
13217 (BV_VCALL_INDEX): ... this.
13218 (BF_FN): Rename to ...
13220 * class.c (build_vbase_path): Adjust for changes to reverse_path.
13221 (set_rtti_entry): Rename BF_ macros to BV_ variants.
13222 (modify_vtable_entry): Simplify.
13223 (add_virtual_function): Rename BF_ macros to BV_ variants.
13224 (build_vtable_initializer): Likewise.
13225 (get_class_offset_1): Remove.
13226 (dfs_get_class_offset): Likewise.
13227 (get_class_offset): Likewise.
13228 (dfs_find_final_overrider): New function.
13229 (find_final_overrider): Likewise.
13230 (modify_one_vtable): Remove.
13231 (dfs_find_base): New function.
13232 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
13233 find_final_overrider.
13234 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
13236 (dfs_fixup_vtable_deltas): Remove.
13237 (override_one_vtable): Remove.
13238 (merge_overrides): Likewise.
13239 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
13240 unreal chilren of virtual bases.
13241 (finish_struct_1): Don't use merge_overrides. Don't use
13242 dfs_fixup_vtable_deltas.
13243 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
13246 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
13247 Jason Merrill <jason@yorick.cygnus.com>
13249 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
13251 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
13253 * exception.cc (__throw_bad_typeid): Add missing std::.
13255 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13257 * cp-tree.h (make_thunk): PROTO -> PARAMS.
13259 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
13261 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
13263 Runtime support for new-abi rtti.
13264 * inc/typeinfo (type_info::operator!=): Define in class.
13265 (type_info::before, type_info::name, type_info::operator==,
13266 type_info::operator!=): Define new ABI implementations.
13267 (type_info::is_pointer_p, type_info::is_function_p): Declare
13268 new virtual functions.
13269 (type_info::do_catch, type_info::do_upcast): Likewise.
13271 * tinfo.h (__base_class_info): Define new class.
13272 (__class_type_info): Likewise.
13273 (__si_class_type_info): Likewise.
13274 (__vmi_class_type_info): Likewise.
13275 (__dynamic_cast): Prototype.
13277 * tinfo.cc: Conditionalize old and new rtti mechanisms.
13278 (type_info::is_pointer_p): Define new function.
13279 (type_info::is_function_p): Likewise.
13280 (type_info::do_catch): Likewise.
13281 (type_info::do_upcast): Likewise.
13282 (vtable_prefix): New structure for vtable access.
13283 (adjust_pointer): Define new template function.
13284 (contained_p, public_p, virtual_p, contained_public_p,
13285 contained_nonpublic_p, contained_nonvirtual_p): Define new
13287 (nonvirtual_base_type): New local variable.
13288 (__class_type_info::~__class_type_info): Define.
13289 (__si_class_type_info::~__si_class_type_info): Likewise.
13290 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
13291 (__class_type_info::do_catch): Define new function.
13292 (__class_type_info::do_upcast): Likewise.
13293 (__class_type_info::find_public_src): Likewise.
13294 (__class_type_info::do_find_public_src): Likewise.
13295 (__si_class_type_info::do_find_public_src): Likewise.
13296 (__vmi_class_type_info::do_find_public_src): Likewise.
13297 (__class_type_info::do_dyncast): Likewise.
13298 (__si_class_type_info::do_dyncast): Likewise.
13299 (__vmi_class_type_info::do_dyncast): Likewise.
13300 (__class_type_info::do_upcast): Likewise.
13301 (__si_class_type_info::do_upcast): Likewise.
13302 (__vmi_class_type_info::do_upcast): Likewise.
13303 (__dynamic_cast): Likewise.
13305 * tinfo2.cc (__fundamental_type_info): Define new class.
13306 (__pointer_type_info): Likewise.
13307 (__reference_type_info): Likewise.
13308 (__array_type_info): Likewise.
13309 (__function_type_info): Likewise.
13310 (__enum_type_info): Likewise.
13311 (__ptr_to_member_type_info): Likewise.
13312 (__fundamental_type_info::~__fundamental_type_info): Define.
13313 (__pointer_type_info::~__pointer_type_info): Likewise.
13314 (__reference_type_info::~__reference_type_info): Likewise.
13315 (__array_type_info::~__array_type_info): Likewise.
13316 (__function_type_info::~__function_type_info): Likewise.
13317 (__enum_type_info::~__enum_type_info): Likewise.
13318 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
13319 (__pointer_type_info::do_catch): Define new function.
13320 (__ptr_to_member_type_info::do_catch): Define new function.
13322 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
13323 (__is_pointer): Likewise.
13325 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
13327 2000-01-30 Mark Mitchell <mark@codesourcery.com>
13329 * cp/class.c (build_vtable): Rename to build_primary_vtable.
13330 (prepare_fresh_vtable): Rename to build_secondary_vtable.
13331 (make_new_vtable): New function.
13332 (modify_vtable_entry): Handle generation of new vtables correctly.
13333 (modify_one_vtable): Remove unused parameter.
13334 (dfs_fixup_vtable_deltas): Likewise.
13335 (override_one_vtable): Use build_secondary_vtable.
13336 (finish_struct_1): Use build_primary_vtable and
13337 build_secondary_vtable.
13339 2000-01-28 Ulrich Drepper <drepper@redhat.com>
13341 * cp/decl.c: Adjust variable names, comments, help strings.
13343 2000-01-29 Nathan Sidwell <nathan@acm.org>
13345 * new2.cc (operator delete[]): Use operator delete, don't assume
13348 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
13350 * class.c (build_vtbl_initializer): Add argument to
13351 build_vtable_entry call.
13353 2000-01-27 Mark Mitchell <mark@codesourcery.com>
13355 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
13356 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
13357 (BF_DELTA): New macro.
13358 (BF_VCALL_INDEX): Likewise.
13360 (THUNK_VCALL_OFFSET): Likewise.
13361 (make_thunk): Change prototype.
13362 * class.c (build_vtable_entry): Integrate
13363 build_vtable_entry_for_fn. Handle vcall indices.
13364 (build_vtable_entry_for_fn): Remove.
13365 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
13366 BF_VCALL_INDEX, BF_FN.
13367 (modify_vtable_entry): Integrate common code from
13368 modify_one_vtable and dfs_fixup_vtable_deltas.
13369 (add_virtual_function): Set BF_VCALL_INDEX.
13370 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
13372 (modify_one_vtable): Simplify.
13373 (dfs_fixup_vtable_deltas): Likewise.
13374 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
13375 * method.c (make_thunk): Handle vcall indices.
13377 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
13379 Compiler side new abi rtti (not enabled).
13380 * cp-tree.h (new_abi_rtti_p): New macro.
13381 (emit_support_tinfos): Prototype new function.
13382 (tinfo_decl_p): Likewise.
13383 (emit_tinfo_decl): Likwise.
13384 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
13386 (doing_runtime): New local static.
13387 (init_rtti_processing): Add new-abi initializer.
13388 (get_tinfo_decl): Add new-abi logic.
13389 (tinfo_from_decl): Likewise.
13390 (build_dynamic_cast_1): Likewise.
13391 (qualifier_flags): New static function.
13392 (tinfo_base_init): Likewise.
13393 (generic_initializer): Likewise.
13394 (ptr_ref_initializer): Likewise.
13395 (ptmd_initializer): Likewise.
13396 (class_hint_flags): Likewise.
13397 (class_initializer): Likewise.
13398 (synthesize_tinfo_var): Likewise.
13399 (create_real_tinfo_var): Likewise.
13400 (create_pseudo_type_info): Likewise.
13401 (get_vmi_pseudo_type_info): Likewise.
13402 (create_tinfo_types): Likewise.
13403 (emit_support_tinfos): New global function.
13404 (tinfo_decl_p): New global predicate.
13405 (emit_tinfo_decl): New global function.
13406 * class.c (set_rtti_entry): Generalize for old and new rtti.
13407 (build_vtbl_initializer): Likewise.
13408 * decl2.c (finish_file): Likewise.
13410 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
13412 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
13413 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
13415 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
13417 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
13420 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
13422 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
13424 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
13426 * optimize.c (calls_setjmp_r): Supply new argument
13427 to special_function_p.
13429 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13431 * call.c: PROTO -> PARAMS.
13432 * class.c: Likewise.
13433 * cp-tree.h: Likewise.
13435 * decl.c: Likewise.
13436 * decl.h: Likewise.
13437 * decl2.c: Likewise.
13438 * dump.c: Likewise.
13439 * errfn.c: Likewise.
13440 * error.c: Likewise.
13441 * except.c: Likewise.
13442 * expr.c: Likewise.
13443 * init.c: Likewise.
13444 * input.c: Likewise.
13447 * method.c: Likewise.
13448 * optimize.c: Likewise.
13449 * parse.y: Likewise.
13451 * repo.c: Likewise.
13452 * rtti.c: Likewise.
13453 * search.c: Likewise.
13454 * semantics.c: Likewise.
13455 * spew.c: Likewise.
13456 * tree.c: Likewise.
13457 * typeck.c: Likewise.
13458 * typeck2.c: Likewise.
13459 * xref.c: Likewise.
13461 2000-01-25 Richard Henderson <rth@cygnus.com>
13463 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
13465 2000-01-25 Mark Mitchell <mark@codesourcery.com>
13467 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
13468 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
13469 (struct vcall_offset_data_s): New type.
13470 (dfs_vcall_offset_queue_p): New function.
13471 (dfs_build_vcall_offset_vtbl_entries): Likewise.
13472 (build_vcall_offset_vtbl_entries): Likewise.
13473 (layout_vtable_decl): Likewise.
13474 (num_vfun_entries): Likewise.
13475 (num_extra_vtbl_entries): Add the entries for vcall offsets.
13476 (build_vtbl_initializer): Likewise.
13477 (dfs_finish_vtabls): Use layout_vtable_decl.
13478 (modify_one_vtables): Always duplicate vtables under the new ABI.
13479 (finish_struct_1): Use layout_vtable_decl.
13481 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13483 * decl.c (member_function_or_else): Change third arg from a format
13484 specifier to an `enum overload_flags'. Callers changed.
13486 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
13488 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
13489 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
13490 build_const_cast, get_delta_difference, check_return_expr): Avoid
13491 ANSI string concatenation usage.
13493 2000-01-24 Mark Mitchell <mark@codesourcery.com>
13495 * class.c (layout_class_type): Put the fields required to make a
13496 class non-empty at the end, not the beginning, of the TYPE_FIELDs
13499 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
13501 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
13504 * decl2.c (mark_used): Do instantiate inlines that have been
13505 explicitly instantiated.
13507 2000-01-24 Richard Henderson <rth@cygnus.com>
13509 * call.c (build_over_call): Use expand_tree_builtin.
13510 * typeck.c (build_function_call_real): Likewise.
13511 (build_binary_op_nodefault): Handle unordered compares.
13513 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
13515 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
13516 cp_tree_index values.
13517 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
13518 New global node #defines for them.
13519 * rtti.c (call_void_fn): Replace with ...
13520 (build_runtime_decl): ... new static function.
13521 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
13522 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
13523 (build_dynamic_cast_1): Always produce correctly typed result.
13524 Explicitly produce type_info addresses. Use dynamic_cast_node.
13525 * exception.cc (__throw_bad_cast): Return `void *'.
13526 (__throw_bad_typeid): Return `const type_info &'.
13528 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
13530 * cp-tree.h (get_vtable_decl): Prototype new function.
13531 * class.c (get_vtable_decl): New function. Broken out from ...
13532 (build_vtable): ... here. Use it.
13533 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
13534 by get_vtable_decl.
13536 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
13538 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
13539 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
13540 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
13541 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
13542 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
13543 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
13544 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
13545 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
13546 (CPTI_TINFO_VAR_ID): New enumeration.
13547 (__tp_desc_type_node, __access_mode_type_node,
13548 __bltn_desc_type_node, __user_desc_type_node,
13549 __class_desc_type_node, __ptr_desc_type_node,
13550 __attr_desc_type_node, __func_desc_type_node,
13551 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
13552 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
13553 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
13554 enum_desc_type_node, class_desc_type_node,
13555 si_class_desc_type_node, vmi_class_desc_type_node,
13556 ptmd_desc_type_node, base_desc_type_node): New #defines.
13557 (tinfo_fn_id, tinfo_fn_type): Rename to ...
13558 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
13559 (tinfo_var_id): New enumeration.
13560 (DECL_TINFO_FN_P): Augment comment.
13561 * decl.c (cp_global_trees): Adjust documentation.
13562 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
13563 tinfo_decl_type and tinfo_var_id.
13564 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
13565 (build_typeid): Remove unused variable.
13566 (get_tinfo_var): Use tinfo_var_id.
13567 (tinfo_name): New static function.
13568 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
13569 (tinfo_from_decl): Likewise.
13570 (get_base_offset): New static function, broken out of
13572 (expand_si_desc): Use tinfo_name.
13573 (expand_class_desc): Likewise. Lose local static variable.
13574 Use base_desc_type_node. Use get_base_offset.
13575 (expand_ptr_desc): Use tinfo_name.
13576 (expand_attr_desc): Likewise.
13577 (expand_generic_desc): Likewise.
13579 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
13580 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
13582 2000-01-23 Mark Mitchell <mark@codesourcery.com>
13584 * cp-tree.h (__eprintf): Remove declaration.
13585 * tree.c (__eprintf): Remove definition.
13587 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
13588 Mark Mitchell <mark@codesourcery.com>
13590 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
13591 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
13593 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
13595 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
13597 2000-01-23 Mark Mitchell <mark@codesourcery.com>
13599 * cp-tree.h (register_dtor_fn): New function.
13600 * decl.c (destroy_local_static): Rename to ...
13601 (register_dtor_fn): ... this. Give it external linkage.
13602 (expand_static_init): Use it.
13603 * decl2.c (do_static_initialization): Likewise, if using
13605 (do_static_destruction): Check that __cxa_atexit is not in use.
13606 (finish_file): Don't call do_static_destruction if using
13609 * typeck.c (convert_arguments): Restore two-message error
13612 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
13614 Remap dynamic cast hint values to be consistent across ABIs.
13615 * search.c (dynamic_cast_base_recurse): Remap generated value.
13616 (get_dynamic_cast_base_type): Adjust documentation.
13617 * tinfo.h (__user_type_info::dyncast): Likewise.
13618 (__user_type_info::find_public_subobj): Remap BOFF meaning.
13619 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
13620 (__class_type_info::do_dyncast): Likewise.
13621 (__class_type_info::do_find_public_subobj): Likewise.
13622 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
13624 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
13626 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
13628 * typeck2.c (incomplete_type_error): Restore previous
13629 cp_error and cp_error_at call sequence.
13631 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
13633 * class.c (dump_class_hierarchy): Make format agree with argument;
13634 cast pointer to unsigned long and print with %lx.
13636 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
13638 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
13640 * typeck.c (composite_pointer_type, common_type,
13641 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
13642 build_function_call_real, convert_arguments,
13643 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
13644 build_unary_op, mark_addressable, build_compound_expr,
13645 build_static_cast, build_reinterpret_cast, build_const_cast,
13646 build_c_cast, build_modify_expr, get_delta_difference,
13647 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
13648 'ISO C++'. Fusion consecutive calls to diagnostic message routines
13650 * typeck2.c (readonly_error, abstract_virtuals_error,
13651 process_init_constructor, check_for_new_type): Likewise.
13653 2000-01-19 Mark Mitchell <mark@codesourcery.com>
13655 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
13658 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
13660 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
13661 (build_x_typeid): Likewise.
13662 (get_tinfo_fn): Likewise.
13663 (get_tinfo_fn_unused): Rename to ...
13664 (get_tinfo_decl): ... here.
13665 * rtti.c (build_headof): Replace logic error with assertion.
13666 (get_tinfo_fn_dynamic): Rename to ...
13667 (get_tinfo_decl_dynamic): ... here. Make static. Use
13668 complete_type_or_else.
13669 (build_x_typeid): Move into ...
13670 (build_typeid): ... here. Adjust call to
13671 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
13672 throw_bad_typeid expression.
13673 (get_tinfo_fn_unused): Rename to ...
13674 (get_tinfo_decl): ... here. Adjust comment.
13675 (get_tinfo_fn): Delete.
13676 (tinfo_from_decl): New static function.
13677 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
13678 (get_typeid): Use complete_type_or_else.
13679 (build_dynamic_cast_1): Adjust calls to
13680 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
13681 * parse.y (primary): Adjust call to build_typeid.
13682 * except.c (build_eh_type_type_ref): Adjust call to
13683 get_tinfo_decl. Mark as used.
13684 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
13685 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
13686 * parse.c: Regenerated.
13688 2000-01-17 Mark Mitchell <mark@codesourcery.com>
13690 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
13691 calling convention.
13692 (resolves_to_fixed_type_p): Document calling convention.
13693 * rtti.c (build_x_typeid): Initialize NONNULL.
13695 * cp-tree.h (build_shared_int_cst): New function.
13696 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
13697 * class.c (modify_vtable_entry): Likewise.
13698 (add_virtual_function): Split out code to generated shared
13699 INTEGER_CSTs to build_share_int_cst.
13700 (modify_all_vtables): Handle all the overridden functions here.
13701 Add overridden functions from non-primary virtual bases to the
13703 (finish_struct_1): Adjust call to modify_all_vtables. Add
13704 overridden functions from non-primary bases to the vtable.
13705 * tree.c (build_shared_int_cst): New function.
13707 * cp-tree.h (scratchalloc): Remove.
13708 (build_scratch_list): Likewise.
13709 * call.c (convert_class_to_reference): Replace build_scratch_list
13710 and build_expr_list with build_tree_list.
13711 (add_candidate): Replace scratchalloc with expralloc. Note memory
13713 (build_user_type_conversion_1): Replace build_scratch_list
13714 and build_expr_list with build_tree_list.
13715 (build_new_op): Likewise.
13716 (build_op_delete_call): Likewise.
13717 (convert_like): Likewise.
13718 * cvt.c (ocp_convert): Likewise.
13719 * decl.c (start_decl): Likewise.
13720 (start_function): Likewise.
13721 (finish_destructor_body): Likewise.
13722 (maybe_build_cleanup_1): Likewise.
13723 * decl2.c (reparse_decl_as_expr): Likewise.
13724 * init.c (perform_member_init): Likewise.
13725 (expand_cleanup_for_base): Likewise.
13726 (build_builtin_delete_call): Likewise.
13727 (build_new_1): Likewise.
13728 (build_delete): Likewise.
13729 * method.c (do_build_assign_ref): Likewise.
13730 * parse.y (already_scoped_stmt): Likewise.
13731 (nontrivial_exprlist): Likewise.
13732 (net_initializer): Likewise.
13733 (initlist): Likewise.
13734 * parse.c: Regenerated.
13735 * rtti.c (build_x_typeid): Likewise.
13736 (build_dynamic_cast_1): Likewise.
13737 * typeck.c (build_x_compound_expr): Likewise.
13738 (build_static_cast): Likewise.
13739 (build_modify_expr): Likewise.
13741 * cp-tree.h (DECL_VINDEX): Add documentation.
13742 * class.c (build_vtable_entry): Likewise.
13743 (start_vtable): Add comment.
13744 (add_virtual_function): Replace pending_hard_virtuals with
13745 overridden_virtuals and pending_virtuals with new_virtuals.
13746 Replace redundant assignments with assertions.
13747 (check_for_override): Add comment.
13748 (check_bases_and_members): Replace pending_hard_virtuals with
13749 overridden_virtuals and pending_virtuals with new_virtuals.
13750 (create_vtbl_ptr): Likewise.
13751 (layout_class_type): Likewise.
13752 (finish_struct_1): Likewise. Add comments.
13754 2000-01-16 Mark Mitchell <mark@codesourcery.com>
13756 * class.c (finish_struct_1): Replace redundant code with
13759 * cp-tree.h (flag_new_abi): Move.
13760 (flag_use_cxa_atexit): Likewise.
13761 (flag_honor_std): Likewise.
13762 (flag_rtti): Likewise.
13763 (vbase_offsets_in_vtable_p): Define.
13764 (vptrs_present_everywhere_p): Likewise.
13765 (TYPE_CONTAINS_VPTR_P): Likewise.
13766 (dfs_walk_real): Declare.
13767 * class.c (build_vbase_pointer_fields): Check
13768 vbase_offsets_in_vtable_p.
13769 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
13771 (build_vbase_offset_vtbl_entries): Simplify.
13772 (build_vbase_offset_vtbl_entries): Adjust.
13773 (build_vbase_pointer): Add ability to look up vbase offsets in
13775 (start_vtable): New function.
13776 (add_virtual_function): Use it.
13777 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
13778 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
13779 (build_vtbl_initializer): Take the type of the complete object as
13780 input. Use it to correctly calculate vbase offsets.
13781 (dfs_finish_vtbls): Pass the complete type to
13782 build_vtbl_initializer.
13783 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
13784 (create_vtable_ptr): Create a vtable even if there are no
13785 new virtual functions, under the new ABI.
13786 (finish_struct_1): Likewise.
13787 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
13788 * decl.c (exapnd_static_init): Remove call to
13789 preserve_initializer.
13790 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
13792 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
13793 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
13794 (construct_virtual_bases): Don't initialize virtual base pointers
13796 (build_aggr_init): Clean up comment.
13797 (expand_aggr_init_1): Likewise.
13798 * rtti.c (expand_class_desc): Store the virtual function table
13799 index where the vbase offset lives in the offset field.
13800 * search.c (dfs_walk_real): Make it global.
13801 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
13802 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
13804 * tinfo.h (USItype): Make it signed under the new ABI.
13805 * tinfo.cc (convert_to_base): New function. Encapsulate base
13806 conversion logic here.
13807 (__class_type_info::do_upcast): Use it.
13808 (__class_type_info::do_dyncast): Likewise.
13809 (__class_type_info::do_find_public_subobj): Likewise.
13811 * init.c (construct_virtual_bases): Don't look up the addresses of
13812 virtual bases at run-time.
13814 * class.c (build_vbase_pointer): Relocate.
13815 (build_vbase_pointer_fields): Likewise.
13816 (dfs_build_vbase_offset_vtbl_entries): Likewise.
13817 (build_vbase_offset_vtbl_entries): Likewise.
13819 * decl.c (init_decl_processing): Complain if -fnew-abi
13820 -fno-vtable-thunks is used.
13822 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
13825 2000-01-15 Mark Mitchell <mark@codesourcery.com>
13827 * cp-tree.h (num_extra_vtbl_entries): New function.
13828 (size_extra_vtbl_entries): Likewise.
13829 (dfs_vtable_path_unmark): Likewise.
13830 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
13831 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13832 * class.c (num_extra_vtbl_entries): New function.
13833 (size_extra_vtbl_entries): Likewise.
13834 (dfs_build_vbase_offset_vtbl_entries): New function.
13835 (build_vbase_offset_vtbl_entries): Likewise.
13836 (build_vtbl_initializer): Use it.
13837 (finish_struct_1): Adjust vtable sizes (using
13838 num_extra_vtbl_entries).
13839 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
13840 THUNK_DECL is non-NULL before expanding it.
13841 * init.c (expand_virtual_init): Adjust the vtable pointer by
13842 size_extra_vtbl_entries before storing it.
13843 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
13844 Handle TREE_LIST parameters here, not in the dfs_* functions.
13845 (dfs_unmarked_real_bases_queue_p): Adjust.
13846 (dfs_marked_real_bases_queue_p): Likewise.
13847 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
13848 (dfs_vtable_path_marked_real_bases_queue_p): New function.
13849 (dfs_vtable_path_unmark): Likewise.
13851 2000-01-14 Mark Mitchell <mark@codesourcery.com>
13853 * optimize.c (copy_body_r): Clear the operand three of a
13854 TARGET_EXPR when copying it.
13856 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13858 * method.c (build_decl_overload_real): Check whether we are in ::
13859 before returning __builtin_new/delete.
13861 2000-01-13 Mark Mitchell <mark@codesourcery.com>
13863 * pt.c (tsubst_friend_function): Improve comment.
13864 (instantiate_decl): Avoid crashing when a "nested" function is
13865 instantiated from the top level.
13867 * dump.c (dqeueue_and_dump): Dump
13868 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
13870 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13872 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
13874 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
13876 * g++spec.c (lang_specific_driver): Add -fnew-abi if
13877 ENABLE_NEW_GXX_ABI defined.
13878 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
13879 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
13880 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
13882 2000-01-12 Mark Mitchell <mark@codesourcery.com>
13884 * decl.c (start_cleanup_fn): Call pushdecl.
13886 * call.c (convert_class_to_reference): Fix typos.
13887 (build_conditional_expr): Handle errors gracefully.
13888 * class.c (push_nested_class): Likewise.
13889 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
13890 (DECL_THIS_EXTERN): Use it.
13891 (DECL_THIS_STATIC): Likewise.
13892 * cvt.c (convert_to_void): Handle errors gracefully.
13893 (build_expr_type_conversion): Likewise.
13894 * decl.c (maybe_push_decl): Likewise.
13895 (start_decl_1): Likewise.
13896 (require_complete_types_for_parms): Likewise.
13897 * parse.y (structsp): Likewise.
13898 (base_class): Likewise.
13899 * parse.c: Regenerated.
13900 * pt.c (finish_member_template_decl): Likewise.
13901 * typeck.c (decay_conversion): Likewise.
13903 * cp-tree.h (dfs_skip_vbases): New function.
13904 (find_vbase_instance): Likewise.
13905 * class.c (determine_primary_base): Allow a nearly empty base to
13906 serve as a primary base class under the new ABI.
13907 (get_class_offset_1): Rename to ...
13908 (dfs_get_class_offset): ... this. Simplify. Don't issue error
13910 (get_class_offset): Use it. Issue error messages here.
13911 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
13912 find the right copies of virtual bases.
13913 (fixup_vtable_deltas1): Rename to ...
13914 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
13915 bases as primary bases.
13916 (fixup_vtable_deltas): Remove.
13917 (override_one_vtable): Handle virtual bases as primary bases.
13918 (merge_overrides): Likewise.
13919 (finish_struct_1): Likewise.
13920 (dump_class_hierarchy): Dump primary-ness of bases as well.
13921 * search.c (mark_primary_bases): Use a pre-order traversal to
13922 handle primary virtual bases.
13923 (dfs_skip_vbases): New fiunction.
13924 (expand_upcast_fixups): Adjust to handle primary virtual bases.
13925 (fixup_virtual_upcast_offsets): Likewise.
13926 (fixup_all_virtual_upcast_offsets): Likewise.
13927 (dfs_find_vbase_instances): New function.
13928 (find_vbase_instance): Likewise.
13930 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
13932 * lex.c (DIR_SEPARATOR): Delete macro.
13934 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
13936 * decl2.c (lang_decode_option): Handle automatic line wrapping
13939 2000-01-11 Mark Mitchell <mark@codesourcery.com>
13941 * friend.c (do_friend): Don't resolve scopes when processing
13942 template declarations, even if the qualifying scope doesn't
13943 involve template parameters.
13945 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
13947 * class.c (dfs_modify_vtables_queue_p): Remove.
13948 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
13949 and dfs_marked_real_bases_queue_p instead of
13950 dfs_modify_vtables_queue_p.
13952 * class.c (build_vbase_path): Simplify.
13953 (dfs_propagate_binfo_offsets): New function.
13954 (propagate_binfo_offsets): Use it.
13955 (remove_base_field): Simplify.
13956 (dfs_set_offset_for_vbases): Remove.
13957 (dfs_set_offset_for_shared_vbases): New function.
13958 (dfs_set_offset_for_unshared_vbases): Likewise.
13959 (layout_virtual_bases): Use them.
13960 (layout_basetypes): Don't call propagate_binfo_offsets.
13961 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
13964 * class.c (build_base_field): New function, split out from ...
13965 (build_base_fields): ... here. Use it. Allocate primary bases
13966 first, under the new ABI.
13967 (get_vtable_entry): Remove.
13968 (remove_base_field): New function, split out from ...
13969 (remove_base_fields): ... here. Adjust since primary bases come
13970 first under the new ABI.
13972 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
13973 (initialize_vtbl_ptrs): New function.
13974 (expand_indirect_vtbls_init): Change prototype.
13975 (convert_pointer_to_vbase): Declare.
13976 * init.c (expand_direct_vtbls_init): Remove.
13977 (dfs_initialize_vtbl_ptrs): New function.
13978 (initialize_vtbl_ptrs): Likewise.
13979 (emit_base_init): Use initialize_vtbl_ptrs.
13980 * search.c (convert_pointer_to_vbase): Make it global.
13981 (expand_indirect_vtbls_init): Remove vtable initialization code.
13982 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
13984 * class.c (dfs_finish_vtbls): New function.
13985 (finish_vtbls): Use it.
13986 (dump_class_hierarchy): New function.
13988 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
13989 (BINFO_VBASE_PRIMARY_P): New macro.
13990 (BINFO_VIRTUALS): Add to documentation.
13991 (SET_BINFO_PRIMARY_MARKED_P): Remove.
13992 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
13993 (dfs_mark_primary_bases_queue_p): Likewise.
13994 (dfs_unmarked_real_bases_queue_p): New function.
13995 (dfs_marked_real_bases_queue_p): Likewise.
13996 * search.c (dfs_mark_primary_bases): Adjust.
13997 (mark_primary_bases): Likewise.
13998 (get_shared_vbase_if_not_primary): New function.
13999 (dfs_unmarked_real_bases_queue_p): Likewise.
14000 (dfs_marked_real_bases_queue_p): Likewise.
14001 (dfs_get_pure_virtuals): Simplify.
14002 (get_pure_virtuals): Likewise.
14004 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14006 * lex.c: Include tm_p.h.
14008 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
14010 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
14012 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
14014 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
14015 * pt.c (instantiate_decl): Defer comdat templates that might not be
14018 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
14019 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
14020 (finish_file): Likewise.
14022 * decl2.c (import_export_class): Undo 12/14 change.
14024 * error.c (dump_decl): operator new, not operatornew.
14026 * class.c (field_decl_cmp): A nontype is "greater" than a type.
14027 * search.c (lookup_field_1): Look for the last field with the
14030 2000-01-05 Nathan Sidwell <nathan@acm.org>
14032 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
14035 2000-01-05 Nathan Sidwell <nathan@acm.org>
14037 * typeck.c (build_static_cast): Don't strip target qualifiers
14038 when casting from a class.
14040 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14042 * class.c (warn_hidden): Initialize variable `fndecl'.
14044 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
14046 * decl.c (flag_isoc9x): New variable to be able to use code in
14047 c-common.c. For now always zero.
14049 2000-01-03 Mark Mitchell <mark@codesourcery.com>
14051 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
14052 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
14053 or unshare_base_binfos for virtual bases here.
14054 * search.c (dfs_get_vbase_types): Do it here.
14055 (get_vbase_types): Adjust.
14057 2000-01-02 Mark Mitchell <mark@codesourcery.com>
14059 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
14060 (BINFO_PRIMARY_MARKED_P): Use flag 5.
14061 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14062 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14063 (unmark_primary_bases): Remove declaration.
14064 (unmarkedp): Declare.
14065 (dfs_vbase_unmark): Likewise.
14066 * class.c (determine_primary_base): Return immediately if there
14067 are no base classes. Call mark_primary_bases here.
14068 (modify_all_direct_vtables): Remove.
14069 (modify_all_indirect_vtables): Remove.
14070 (dfs_modify_vtables_queue_p): New function.
14071 (dfs_modify_vtables): New function.
14072 (modify_all_vtables): Use them.
14073 (build_base_fields): Build FIELD_DECLs for primary virtual base
14075 (create_vtable_ptr): Don't call determine_primary_base here.
14076 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
14077 (dfs_set_offset_for_vbases): ... this.
14078 (layout_virtual_bases): Use it.
14079 (layout_class_type): Call determine_primary_base here.
14080 * search.c (unmarkedp): Make it global.
14081 (shared_marked_p): Simplify.
14082 (shared_unmarked_p): Likewise.
14083 (dfs_primary_bases_queue_p): Remove.
14084 (dfs_unmark_primary_bases): Likewise.
14085 (unmark_primary_bases): Likewise.
14086 (mark_primary_bases): Simplify.
14087 (get_pure_virtuals): Don't call mark_primary_bases here.
14088 (dfs_vbase_unmark): New function.
14089 (get_vbase_types): Simplify.
14091 * class.c (struct base_info): Remove.
14092 (determine_primary_base): Take has_virtual_p rather than a
14093 base_info as input. Don't calculate max_has_virtual.
14094 (finish_struct_bits): Remove max_has_virtual argument.
14095 (create_vtable_ptr): Remove max_has_virtual_p argument.
14096 (layout_virtual_bases): Remove max argument.
14097 (layout_basetypes): Likewise.
14098 (layout_class_type): Remove max_has_virtual_p argument.
14099 (finish_struct_1): Remove max_has_virtual.
14101 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
14102 (layout_basetypes): Remove.
14103 * class.c (propagate_binfo_offsets): Moved here from tree.c.
14104 Update to handle primary virtual bases.
14105 (remove_base_fields): New function, split out from
14107 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
14108 (layout_virtual_bases): New function, split out from
14109 layout_basetypes. Update to handle primary virtual bases.
14110 (layout_basetypes): Moved here from tree.c. Use
14111 remove_base_fields and layout_virtual_bases.
14112 * search.c (dfs_mark_primary_bases_queue_p): New function.
14113 (mark_primary_bases): Use it.
14114 * tree.c (CEIL): Remove.
14115 (propagate_binfo_offsets): Remove.
14116 (layout_basetypes): Remove.
14118 2000-01-01 Mark Mitchell <mark@codesourcery.com>
14120 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
14121 (BINFO_PRIMARY_MARKED_P): New macro.
14122 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14123 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14124 (mark_primary_bases): New function.
14125 (unmark_primary_bases): Likewise.
14126 * search.c (get_abstract_virtuals_1): Remove.
14127 (dfs_mark_primary_bases): New function.
14128 (mark_primary_bases): Likewise.
14129 (dfs_unmark_primary_bases): Likewise.
14130 (unmark_primary_bases): Likewise.
14131 (dfs_get_pure_virtuals): Likewise.
14133 2000-01-01 Mark Mitchell <mark@codesourcery.com>
14135 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
14136 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
14137 (modify_one_vtable): Adjust.
14138 (fixup_vtable_deltas1): Likewise.
14139 (override_one_vtable): Likewise.
14140 * search.c (get_abstract_virtuals_1): Likewise.
14141 (get_pure_virtuals): Likewise.
14142 (expand_upcast_fixups): Likewise.
14143 * tree.c (debug_binfo): Likewise.
14145 * class.c (build_vtable): Don't return a value. Don't rebuild
14146 vtables for bases that have already been handled.
14147 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
14148 already been handled.
14149 (modify_one_vtable): Adjust accordingly.
14150 (fixup_vtable_deltas1): Likewise.
14151 (finish_struct_1): Likewise.
14153 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14155 * call.c (build_new_method_call): Also check destructors.