1 2003-12-10 Mark Mitchell <mark@codesourcery.com>
3 * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
5 2003-12-08 Matt Austern <austern@apple.com>
8 * decl.c (duplicate_decls): Copy visibility flag when appropriate.
10 2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
12 * init.c (build_new_1): Deal with an OVERLOAD set when
13 looking up for _Jv_AllocObject.
14 * except.c (build_throw): Likewise for _Jv_Throw.
16 2003-12-08 Jason Merrill <jason@redhat.com>
19 * tree.c (build_local_temp): Split out from build_cplus_new.
20 (force_target_expr): New fn.
21 * call.c (call_builtin_trap): Call it. Take a type parm.
22 (convert_arg_to_ellipsis): Pass it.
23 (build_x_va_arg): Use call_builtin_trap.
26 * call.c (magic_varargs_p): New fn.
27 (build_over_call): Do no ellipsis conversions for arguments to
28 functions with magic varargs.
30 * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
33 Give the anonymous namespace a null DECL_NAME.
34 * cp-tree.h: Don't declare anonymous_namespace_name.
35 * decl.c: Don't define it.
36 * dump.c (cp_dump_tree): Don't check for it.
37 * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
38 * error.c (dump_decl): Likewise.
39 * name-lookup.c: Define it here.
40 (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
41 * mangle.c (write_unqualified_name): Adjust.
43 2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
46 * name-lookup.c (push_overloaded_decl): Always construct an
47 OVERLOAD unless the declaration is a built-in.
48 (set_namespace_binding): While binding OVERLOADs with only one
49 declaration, we still need to call supplement_binding.
50 * init.c (build_new_1): Deal with an OVERLOAD set when
51 looking up for _Jv_AllocObject.
52 * except.c (build_throw): Likewise for _Jv_Throw.
54 2003-12-06 Mark Mitchell <mark@codesourcery.com>
57 * class.c (same_signature_p): Handle conversion operators
59 (check_for_override): Likewise.
61 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
63 * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
64 (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
65 (c++.uninstall): Likewise.
67 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
68 Mark Mitchell <mark@codesourcery.com>
71 * parser.c (cp_parser_elaborated_type_specifier): Accept
74 2003-12-05 Mark Mitchell <mark@codesourcery.com>
77 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
79 (cp_parser_class_head): Likewise.
81 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
84 * parser.c (cp_parser_late_parsing_default_args): Make sure the
85 context is a class before calling push_nested_class and
88 2003-12-03 James E Wilson <wilson@specifixinc.com>
90 * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
93 2003-12-03 Mark Mitchell <mark@codesourcery.com>
96 * cp-tree.h (at_namespace_scope_p): New function.
97 * parser.c (cp_parser_class_head): Handle invalid explicit
99 * search.c (at_namespace_scope_p): New function.
102 * semantics.c (finish_handler_parms): Do not call eh_type_info for
103 types used in templates.
106 * parser.c (cp_parser_check_for_invalid_template_id): New
108 (cp_parser_simple_type_specifier): Use it.
109 (cp_parser_elaborated_type_specifier): Likewise.
110 (cp_parser_class_head): Likewise.
112 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
115 * pt.c (convert_nontype_argument): Handle default conversions
116 while converting a pointer to member function.
118 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
121 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
122 looking into them recursively.
124 2003-12-02 Richard Henderson <rth@redhat.com>
126 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
127 * parser.c (struct cp_token): Likewise.
128 (struct cp_parser_token_tree_map_node): Likewise.
129 * lex.c (struct resword): Move const after ENUM_BITFIELD.
131 2003-11-30 Mark Mitchell <mark@codesourcery.com>
134 * parser.c (cp_lexer_prev_token): New function.
135 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
137 (cp_parser_nested_name_specifier_opt): Add is_declaration
139 (cp_parser_nested_name_specifier): Likewise.
140 (cp_parser_class_or_namespace_name): Likewise.
141 (cp_parser_class_name): Likewise.
142 (cp_parser_template_id): Likewise.
143 (cp_parser_template_name): Likewise.
144 (cp_parser_id_expression): Adjust calls to
145 cp_parser_nested_name_specifier_op, cp_parser_template_id,
146 cp_parser_class_name.
147 (cp_parser_unqualified_id): Likewise.
148 (cp_parser_postfix_expression): Likewise.
149 (cp_parser_pseudo_destructor_name): Likewise.
150 (cp_parser_cast_expression): Likewise.
151 (cp_parser_mem_initializer_id): Likewise.
152 (cp_parser_simple_type_specifier): Likewise.
153 (cp_parser_type_name): Likewise.
154 (cp_parser_elaborated_type_specifier): Likewise.
155 (cp_parser_qualified_namespace_specifier): Likewise.
156 (cp_parser_using_declaration): Likewise.
157 (cp_parser_using_directive): Likewise.
158 (cp_parser_ptr_operator): Likewise.
159 (cp_parser_declarator_id): Likewise.
160 (cp_parser_class_head): Likewise.
161 (cp_parser_base_specifier): Likewise.
162 (cp_parser_constructor_declarator_p): Likewise.
163 (cp_parser_direct_declarator): Fix typo in comment.
164 (cp_parser_parenthesized_expression_list): Adjust call to
165 cp_parser_skip_to_closing_parenthesis.
166 (cp_parser_selection_statement): Likewise.
168 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
171 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
172 with OVERLOAD and DECL nodes as the first operand.
174 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
176 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
178 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
181 * friend.c (is_friend): Handle member function of a class
182 template as template friend.
183 (do_friend): Likewise.
184 * decl2.c (check_classfn): Add template_header_p parameter.
185 * decl.c (start_decl): Adjust check_classfn call.
186 (grokfndecl): Likewise.
187 * pt.c (is_specialization_of_friend): New function.
188 (uses_template_parms_level): Likewise.
189 (push_template_decl_real): Use uses_template_parms_level.
190 (tsubst_friend_function): Adjust check_classfn call.
191 * cp-tree.h (check_classfn): Adjust declaration.
192 (uses_template_parms_level): Add declaration.
193 (is_specialization_of_friend): Likewise.
195 2003-11-21 Mark Mitchell <mark@codesourcery.com>
198 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
201 2003-11-21 Jan Hubicka <jh@suse.cz>
203 * parser.c (cp_parser_postfix_expression): Initialize 's' to
206 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
208 * Make-lang.in (c++.extraclean): Delete.
210 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
212 * Make-lang.in (check-g++, lang_checks): Add.
214 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
217 * class.c (currently_open_derived_class): Check if
218 current_class_type is NULL_TREE.
219 * semantics.c (finish_call_expr): Check if
220 currently_open_derived_class returns NULL_TREE.
221 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
224 2003-11-17 Jason Merrill <jason@redhat.com>
226 * init.c (build_new_1): Preevaluate placement args.
227 * call.c (build_op_delete_call): Don't expose placement args to
230 2003-11-16 Jason Merrill <jason@redhat.com>
232 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
233 and TAGS files that include them for each front end.
235 2003-11-15 Bernardo Innocenti <bernie@develer.com>
238 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
239 build failure on libjava.
241 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
244 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
245 unless the declaration is a built-in.
246 (set_namespace_binding): While binding OVERLOADs with only one
247 declaration, we still need to call supplement_binding.
249 2003-11-14 Mark Mitchell <mark@codesourcery.com>
252 * parser.c (cp_parser_enclosed_template_argument_list): New
254 (cp_parser_template_id): Use it.
255 (cp_parser_simple_type_specifier): Recognize invalid template
258 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
261 * pt.c (unify): Add support for PTRMEM_CST and
262 FIELD_DECL unification.
264 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
266 * decl.c (grokfndecl): Change OK to type tree.
268 2003-11-12 Mark Mitchell <mark@codesourcery.com>
270 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
273 * decl.c (cp_make_fname_decl): When creating a top-level
274 __FUNCTION__-like symbol, do register it with pushdecl.
276 * decl.c (finish_case_label): Do not check that we are within a
277 switch statement here.
278 * parser.c (struct cp_parser): Add in_iteration_statement_p and
279 in_switch_statement_p.
280 (cp_parser_new): Initialize them.
281 (cp_parser_labeled_statement): Check validity of case labels
283 (cp_parser_selection_statement): Set in_switch_statement_p.
284 (cp_parser_iteration_statement): Set in_iteration_statement_p.
285 (cp_parser_jump_statement): Check validity of break/continue
289 * cp-tree.h (duplicate_decls): Return a tree.
290 * decl.c (duplicate_decls): Clarify documentation. Return
291 error_mark_node to indicate a failed redeclaration.
292 * friend.c (do_friend): Handle that case.
293 * name-lookup.c (pushdecl): Likewise.
295 2003-11-11 Jason Merrill <jason@redhat.com>
297 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
298 * name-lookup.c (parse_using_directive): New fn.
299 (is_associated_namespace): New fn.
300 (arg_assoc_namespace): Also check associated namespaces.
301 * name-lookup.h: Declare new fns.
302 * pt.c (maybe_process_partial_specialization): Allow
303 specialization in associated namespace.
304 * parser.c (cp_parser_using_directive): Accept attributes. Use
305 parse_using_directive.
307 2003-11-10 Richard Henderson <rth@redhat.com>
309 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
311 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
314 * name-lookup.c (supplement_binding): Gracefully handle names
315 used at non-class scope prior declaration.
317 2003-11-06 Matt Austern <austern@apple.com>
319 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
320 * method.c (use_thunk): give thunk same visibility as function.
321 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
323 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
326 * pt.c (instantiate_pending_templates): Save and restore
329 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
332 * friend.c (add_friend): Don't display previous declaration in
333 case of duplicate friend warning.
335 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
338 * call.c (build_over_call): Check access using primary template
339 if FN is a member function template.
341 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
344 * class.c (handle_using_decl): Set input_location before calling
347 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
350 * semantics.c (finish_non_static_data_member): Handle when
351 both processing_template_decl and qualifying_scope are true.
353 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
356 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
357 * parser.c (cp_parser_direct_declarator): Only resolve typename for
358 namespace scope declarations.
360 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
362 PR c++/12698, c++/12699, c++/12700, c++/12566
363 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
364 (debug_class, debug_thunks): New.
365 * class.c (dump_class_hierarchy_1): New break out from ...
366 (dump_class_hierarchy): ... here.
367 (dump_thunk, debug_thunks, debug_class): New.
368 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
369 continued search for primary binfo via virtual.
370 (build_vtbl_initializer): Follow covariant thunk alias.
371 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
372 (finish_thunk): Look for an alias of the covariant thunk and point
374 (use_thunk): We should never use an alias.
375 * semantics.c (emit_associated_thunks): Do not emit aliases.
378 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
379 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
380 create an ad-hoc ERROR_MARK.
381 (cp_make_fname_decl): Adjust.
382 * pt.c (tsubst_expr): Adjust.
384 2003-10-23 Jason Merrill <jason@redhat.com>
387 * tree.c (build_target_expr_with_type): Don't call force_rvalue
390 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
392 * call.c: Fix comment formatting.
394 * cxx-pretty-print.c: Likewise.
396 * parser.c: Likewise.
398 * semantics.c: Likewise.
400 * typeck.c: Likewise.
401 * typeck2.c: Likewise.
403 2003-10-21 Mark Mitchell <mark@codesourcery.com>
406 * typeck.c (build_x_conditional_expr): Handle missing middle
407 operands in templates.
408 * mangle.c (write_expression): Issue errors about attempts to
409 mangle a non-existant middle operator to the ?: operator.
411 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
412 * decl.c (cp_finish_decl): Remove clause intended for asm directives
413 in struct or class fields: this code is never executed.
415 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
417 * decl.c (start_decl): Exit if push_template_decl returns
420 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
422 * ChangeLog: Fix typos.
423 * call.c: Fix comment typos.
425 * cp-tree.h: Likewise.
427 * cxx-pretty-print.c: Likewise.
431 * mangle.c: Likewise.
432 * name-lookup.c: Likewise.
433 * parser.c: Likewise.
434 * search.c: Likewise.
435 * semantics.c: Likewise.
437 * typeck.c: Likewise.
439 2003-10-20 Jan Hubicka <jh@suse.cz>
441 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
444 2003-10-20 Mark Mitchell <mark@codesourcery.com>
446 * Make-lang.in (c++.install-info): Remove.
448 2003-10-20 Jason Merrill <jason@redhat.com>
450 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
453 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
455 PR c++/9781, c++/10583, c++/11862
456 * decl.c (cp_finish_decl): Exit immediately if decl is an
458 * pt.c (push_template_decl_real): Return error_mark_node for
459 invalid template declaration of variable.
461 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
464 * pt.c (lookup_template_class): Handle when current_class_type
467 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
470 * decl.c (make_typename_type): Use dependent_type_p.
471 (make_unbound_class_template): Likewise.
472 * pt.c (instantiate_class_template): Increment
473 processing_template_decl during substitution of template friend
474 function. Preincrement processing_template_decl rather than
476 (get_mostly_instantiated_function_type): Increment
477 processing_template_decl during partial substitution of function
480 2003-10-15 Jan Hubicka <jh@suse.cz>
483 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
485 2003-10-14 Jason Merrill <jason@redhat.com>
488 * tree.c (build_target_expr_with_type): Call force_rvalue for
489 classes with non-trivial copy ctors.
492 * typeck.c (build_modify_expr): Call convert rather than abort.
494 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
496 Breack out decl.c (3/n)
497 * name-lookup.c: Include flags.h
498 (lookup_name_current_level): Make static.
499 (add_decl_to_level): Likewise.
500 (push_local_binding): Likewise.
501 (push_overloaded_decl): Likewise.
502 (lookup_using_namespace): Likewise.
503 (qualified_lookup_using_namespace): Likewise.
504 (lookup_type_current_level): Likewise.
505 (unqualified_namespace_lookup): Likewise.
506 (namespace_ancestor): Likewise.
507 (push_using_directive): Likewise.
508 * decl.c (pushdecl): Move to name-lookup.c.
509 (pushdecl_top_level_1): Likewise.
510 (pushdecl_top_level): Likewise.
511 (pushdecl_top_level_and_finish): Likewise.
512 (maybe_push_decl): Likewise.
513 (push_using_decl): Likewise.
514 (push_overloaded_decl): Likewise.
515 (make_anon_name): Likewise.
516 (anon_cnt): Likewise.
517 (clear_anon_tags): Likewise.
518 (maybe_inject_for_scope_var): Likewise.
519 (check_for_out_of_scope_variable): Likewise.
520 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
521 * decl.c (warn_extern_redeclared_static): Export.
522 * cp-tree.h (warn_extern_redeclared_static): Declare.
524 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
526 * Make-lang.in: Replace uses of $(target_alias) with
527 $(target_noncanonical).
529 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
531 * ChangeLog: Add PR number to patch for PR c++/12370.
533 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
535 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
536 (binding_for_name): Likewise.
537 (cxx_binding_clear): Move to name-lookup.c.
538 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
539 (binding_for_name): Likewise.
540 * decl2.c (is_ancestor): Move to name-lookup.c
541 (namespace_ancestor): Likewise.
542 (add_using_namespace): Likewise.
543 (ambiguous_decl): Likewise.
544 (lookup_using_namespace): Likewise.
545 (qualified_lookup_using_namespace): Likewise.
546 (set_decl_namespace): Likewise.
547 (decl_namespace): Likewise.
548 (current_decl_namespace): Likewise.
549 (push_decl_namespace): Likewise.
550 (pop_decl_namespace): Likewise.
551 (push_scope): Likewise.
552 (pop_scope): Likewise.
553 (struct arg_lookup): Likewise.
554 (arg_assoc): Likewise.
555 (arg_assoc_args): Likewise.
556 (arg_assoc_type): Likewise.
557 (add_function): Likewise.
558 (arg_assoc_namespace): Likewise.
559 (arg_assoc_class): Likewise.
560 (arg_assoc_template_arg): Likewise.
561 (do_namespace_alias): Likewise.
562 (validate_nonmember_using_decl): Likewise.
563 (do_nonmember_using_decl): Likewise.
564 (do_toplevel_using_decl): Likewise.
565 (do_local_using_decl): Likewise.
566 (do_class_using_decl): Likewise.
567 (do_using_directive): Likewise.
568 (constructor_name_full): Likewise.
569 (constructor_name): Likewise.
570 (constructor_name_p): Likewise.
572 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
574 Break out decl.c (2/n)
575 * name-lookup.c: Include diagnostic.h
576 (cxx_binding_free): Make static.
577 (cxx_binding_make): Likewise.
578 (binding_table_new): Likewise
579 (binding_table_free): Likewise.
580 (binding_table_insert): Likewise.
581 (binding_table_find_anon_type): Likewise.
582 (binding_table_reverse_maybe_remap): Likewise.
583 (supplement_binding): Likewise.
584 * name-lookup.h (global_scope_name): Declare extern.
585 (global_type_node): Likewise.
586 (cxx_binding_free): Don't export.
587 (cxx_binding_make): Likewise.
588 (binding_table_new): Likewise.
589 (binding_table_free): Likewise.
590 (binding_table_insert): Likewise.
591 (binding_table_find_anon_type): Likewise.
592 (binding_table_reverse_maybe_remap): Likewise.
593 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
594 * decl.c (lookup_namespace_name): Move to name-lookup.c
595 (select_decl): Likewise.
596 (unqualified_namespace_lookup): Likewise.
597 (lookup_qualified_name): Likewise.
598 (lookup_name_real): Likewise.
599 (lookup_name_nonclass): Likewise.
600 (lookup_function_nonclass): Likewise.
601 (lookup_name): Likewise.
602 (lookup_name_current_level): Likewise.
603 (lookup_type_current_level): Likewise.
604 (lookup_flags): Likewise.
605 (qualify_lookup): Likewise.
606 (lookup_tag): Likewise.
607 (lookup_tag_reverse): Likewise.
608 (getdecls): Likewise.
609 (storedecls): Remove.
610 (cxx_remember_type_decls): Move to name-lookup.c.
611 (global_bindings_p): Likewise.
612 (innermost_nonclass_level): Likewise.
613 (toplevel_bindings_p): Likewise.
614 (namespace_bindings_p): Likewise.
615 (kept_level_p): Likewise.
616 (innermost_scope_kind): Likewise.
617 (template_parm_scope_p): Likewise.
618 (push_binding): Likewise.
619 (push_local_binding): Likewise.
620 (add_decl_to_level): Likewise. Make extern.
621 (push_class_binding): Move to name-lookup.c.
622 (resume_level): Likewise. Rename to resume_scope.
623 (begin_scope): Move to name-lookup.c.
625 (binding_depth): Likewise.
626 (is_class_level): Likewise.
627 (cxx_scope_descriptor): Likewise.
628 (cxx_scope_debug): Likewise.
629 (namespace_scope_ht_size): Likewise.
630 (leave_scope): Likewise.
631 (pushlevel_class): Likewise.
632 (poplevel_class): Likewise.
633 (clear_identifier_class_values): Likewise.
634 (pushdecl_with_scope): Likewise.
635 (pushdecl_namespace_level): Likewise.
636 (pushdecl_class_level): Likewise.
637 (push_class_level_binding): Likewise.
638 (push_using_directive): Likewise.
639 (identifier_global_value): Likewise.
640 (keep_next_level_flag): Likewise.
641 (keep_next_level): Likewise.
642 (free_binding_level): Likewise.
643 (set_class_shadows): Likewise.
644 (maybe_push_cleanup_level): Likewise.
645 (cp_namespace_decls): Likewise.
646 (bt_print_entry): Likewise.
647 (print_binding_level): Likewise.
648 (print_other_binding_stack): Likewise.
649 (print_binding_stack): Likewise.
650 (push_namespace): Likewise.
651 (pop_namespace): Likewise.
652 (push_nested_namespace): Likewise.
653 (pop_nested_namespace): Likewise.
654 (cxx_saved_binding_make): Likewise.
655 (struct cxx_saved_binding_make): Likewise.
656 (store_bindings): Likewise.
657 (maybe_push_to_top_level): Likewise.
658 (push_to_top_level): Likewise.
659 (pop_from_top_level): Likewise.
660 (identifier_type_value): Likewise.
661 (set_identifier_type_value): Likewise.
662 (set_identifier_type_value_with_scope): Likewise.
663 (pop_everything): Likewise.
665 (follow_tag_typedef): Likewise.
666 (maybe_process_template_type_declaration): Likewise.
667 (pop_binding): Likewise.
668 * cp-tree.h: Move corresponding declarations to name-lookup.h
670 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
672 * cvt.c (ocp_convert): Move warning to C common code.
674 2003-10-09 Jason Merrill <jason@redhat.com>
677 * tree.c (build_cplus_array_type): Handle all quals the same.
678 (cp_build_qualified_type_real): Look through arrays first.
680 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
681 (build_target_expr_with_type): Likewise.
683 * pt.c (instantiate_class_template): Sanity check that our
684 enclosing class has been instantiated.
686 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
688 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
689 * error.c (dump_function_decl): Use it to skip the dump of the
691 (dump_expr): When dumping a declaration found within an
692 expression, always set TFF_NO_FUNCTION_ARGUMENTS
695 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
698 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
701 2003-10-06 Mark Mitchell <mark@codesourcery.com>
704 * call.c (initialize_reference): Tweak error message.
705 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
706 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
707 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
708 qualified entities using qualified names.
711 * init.c (build_new_1): Make sure that the expression returned is
714 PR c++/12344, c++/12236, c++/8656
715 * decl.c (start_function): Do not ignore attributes embedded in a
718 2003-10-06 Mark Mitchell <mark@codesourcery.com>
720 * Make-lang.in (c++.info): Remove.
722 (c++.generated-manpages): Replace with ...
723 (generated-manpages): ... this.
725 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
727 * decl.c (struct cp_binding_level): Move to name-lookup.h
728 (current_binding_level): Likewise.
729 (class_binding_level): Likewise.
730 * cp-tree.h (enum scope_kind): Likewise.
732 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
734 * name-lookup.c (binding_entry_free): Nullify name and type
737 2003-10-02 Mark Mitchell <mark@codesourcery.com>
740 * typeck.c (finish_class_member_access_expr): Issue diagnostic
741 on erroneous use of qualified name.
743 2003-09-30 Richard Henderson <rth@redhat.com>
746 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
748 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
750 * g++spec.c: Convert to ISO C90 prototypes.
751 * parser.c: Likewise.
753 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
755 * decl.c (pop_binding): Don't mess with nullifying binding->scope
757 * name-lookup.c: Re-format.
758 (cxx_binding_free): Nullify binding->scope.
760 2003-09-29 Jan Hubicka <jh@suse.cz>
763 * except.c (build_eh_type_type): Call mark_used on the type.
765 2003-09-28 Richard Henderson <rth@redhat.com>
767 * typeck.c (c_expand_asm_operands): Take location_t, instead of
768 individual file and line.
770 2003-09-28 Andreas Jaeger <aj@suse.de>
772 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
774 * init.c (push_base_cleanups): Likewise.
775 * decl2.c (finish_file): Likewise.
776 * mangle.c (init_mangle): Likewise.
777 (dump_substitution_candidates): Likewise.
778 * search.c: Likewise.
780 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
782 * name-lookup.h (get_global_value_if_present): New function.
783 (is_typename_at_global_scope): Likewise.
784 * except.c (do_begin_catch): Use get_global_value_if_present.
785 (do_end_catch): Likewise.
786 (do_allocate_exception): Likewise.
787 (do_free_exception): Likewise.
788 (build_throw): Likewise.
789 * parser.c (cp_parser_member_declaration): Likewise.
790 * rtti.c (throw_bad_cast): Likewise.
791 (throw_bad_typeid): Likewise.
792 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
793 (grokdeclarator): Likewise.
794 * cp-tree.h (global_namespace): Move to name-lookup.h
795 * call.c (call_builtin_trap): Tidy.
797 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
800 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
801 error message when parser->scope is global_namespace.
803 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
805 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
806 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
808 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
810 * decl.c (pop_binding_level, suspend_binding_level,
811 find_class_binding_level): Merge into leave_scope. Remove.
812 (leave_scope): New function.
814 (poplevel_class): Likewise.
815 (pop_namespace): Likewise.
817 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
820 * parser.c (cp_parser_check_access_in_redeclaration): New function.
821 (cp_parser_member_declaration): Use it.
822 (cp_parser_template_declaration_after_export): Likewise.
824 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
826 * cp-tree.h (scope_kind): Add new enumerator.
827 (keep_next_level): Change parameter type to bool.
828 (begin_scope): Change prototype.
829 (pushlevel): Remove declaration.
830 * decl.c (push_binding_level): Fold in begin_scope. Remove.
831 (struct cp_binding_level): Remove tag_tranparent field. Make keep
833 (keep_next_level_flag): Make a bool.
834 (cxx_scope_descriptor): Update scope names table
835 (make_cxx_scope): Fold in begin_scope. Remove..
836 (namespace_scope_ht_size): New function.
837 (begin_scope): Change prototype. Return a scope. Tidy.
838 (kept_level_p): Update.
840 (maybe_push_cleanup_level): Simplify.
841 (poplevel): Update for sk_cleanup and keep change.
842 (print_binding_level): Likewise.
843 (initial_push_namespace_scope): Fold in begin_scope. Remove.
844 (push_namespace): Update.
846 (lookup_tag): Likewise.
847 (lookup_name_current_level): Likewise.
848 (lookup_type_current_level): Likewise.
849 (cxx_init_decl_processing): Likewise.
850 (start_function): Likewise.
851 (begin_function_body): Likewise.
852 (start_method): Likewise.
853 * pt.c (push_inline_template_parms_recursive): Likewise.
854 (begin_template_parm_list): Likewise.
855 (begin_specialization): Likewise.
856 * semantics.c (do_pushlevel): Likewise.
857 (begin_compound_stmt): Likewise.
858 (begin_stmt_expr): Likewise.
860 2003-09-21 Richard Henderson <rth@redhat.com>
862 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
863 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
865 2003-09-21 Richard Henderson <rth@redhat.com>
867 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
868 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
869 DECL_SOURCE_LOCATION rename and change to const.
871 2003-09-20 Richard Henderson <rth@redhat.com>
873 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
875 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
878 * parser.c (cp_parser_direct_declarator): Clear
879 parser->num_template_parameter_lists when parsing function
881 (cp_parser_constructor_declarator_p): Likewise.
883 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
886 * pt.c (tsubst_friend_class): Only use innermost template
887 arguments for the injected friend class template.
889 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
892 * pt.c (instantiate_class_template): Increment
893 processing_template_decl around the tsubst of a template member
896 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
898 * decl.c (cxx_scope_descriptor): Fix thinko.
899 (struct cp_binding_level): Adjust type of binding_depth field.
901 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
904 * call.c (type_passed_as): Check for incomplete type.
905 (convert_for_arg_passing): Likewise.
907 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
910 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
912 * semantics.c (expand_body): Set it here on the remaining clones.
914 2003-09-18 Roger Sayle <roger@eyesopen.com>
916 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
917 * class.c (instantiate_type): Remove FFS_EXPR case.
919 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
921 * ChangeLog: Fix recent commit.
923 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
925 * ChangeLog: Add PR number to patch for PR c++/12316.
927 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
929 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
931 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
933 2003-09-17 Richard Henderson <rth@redhat.com>
935 * semantics.c (expand_body): Don't save/restore input_location.
937 2003-09-17 Mark Mitchell <mark@codesourcery.com>
940 * cp-tree.h (tsubst_flags_t): Add tf_conv.
941 * class.c (standard_conversion): Pass tf_conv to
943 (resolve_address_of_overloaded_function): Do not call mark_used
944 when just checking conversions.
947 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
948 * cp-tree.h (cxx_builtin_type_decls): Declare.
949 * decl.c (builtin_type_decls): New variables.
950 (cxx_builtin_type_decls): New function.
951 (record_builtin_type): Add to builtin_type_decls.
953 2003-09-17 Richard Henderson <rth@redhat.com>
956 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
958 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
961 * typeck.c (comptypes): Don't ICE when its first argument is
963 (compparms): Reverse the arguments of same_type_p.
965 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
968 * typeck.c (convert_arguments): Return error_mark_node for an
969 incomplete parameter. Make error message more informative.
971 2003-09-12 Mark Mitchell <mark@codesourcery.com>
974 * class.c (maybe_note_name_used_in_class): Refine test for whether
975 or not we are in a class scope.
977 * cp-tree.h (language_function): Remove x_expanding_p.
978 (expanding_p): Remove.
979 (doing_semantic_analysis_p): Remove.
980 (scope_kind): Add sk_function_parms, sk_class,
982 (innermost_scope_kind): New method.
983 * call.c (cxx_type_promotes_to): Use type_decays_to.
984 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
985 (LANG_HOOKS_POPLEVEL): Likewise.
986 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
987 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
988 is_catch_scope. Add kind and explicit_spec_p.
989 (cxx_scope_descriptor): Use a lookup table.
990 (find_class_binding_level): Use "kind" field in binding_level, not
992 (pop_binding_level): Likewise.
993 (innermost_nonclass_level): Likewise.
994 (toplevel_bindings_p): Likewise.
995 (namespace_bindings_p): Likewise.
996 (template_parm_scope_p): Likewise.
997 (innermost_scope_kind): New method.
998 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
1000 (pushlevel): Remove check for doing_semantic_analysis_p.
1001 (begin_scope): Simplify.
1002 (add_decl_to_level): Use "kind" field in binding_level, not
1004 (push_local_binding): Likewise.
1005 (pop_label): Remove check for doing_semantic_analysis_p.
1006 (poplevel): Use "kind" field in binding_level, not
1008 (set_block): Remove check for doing_semantic_analysis_p.
1009 (pushlevel_class): Use "kind" field in binding_level, not
1011 (poplevel_class): Likewise.
1012 (initial_push_namespace_scope): Likewise.
1013 (maybe_push_to_top_level): Likewise.
1014 (set_identifier_type_value_with_scope): Likewise.
1015 (pop_everything): Likewise.
1016 (maybe_process_template_type_declaration): Likewise.
1017 (pushtag): Likewise.
1018 (pushdecl): Likewise.
1019 (pushdecl_with_scope): Likewise.
1020 (check_previous_goto_1): Likewise.
1021 (define_label): Likewise.
1022 (finish_case_label): Likewise.
1023 (lookup_tag): Likewise.
1024 (unqualified_namespace_lookup): Likewise.
1025 (lookup_name_real): Likewise.
1026 (lookup_name_current_level): Likewise.
1027 (lookup_type_current_level): Likewise.
1028 (record_builtin_type): Likewise.
1029 (cp_make_fname_decl): Likewise.
1030 (maybe_inject_for_scope_var): Likewise.
1031 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
1032 (start_function): Use begin_scope, not pushlevel.
1033 (finish_function): Use "kind" field in binding_level, not
1035 (start_method): Use begin_scope, not pushlevel.
1036 (make_label_decl): Do not check expanding_p.
1037 (save_function-data): Do not set expanding_p.
1038 (cxx_push_function_context): Do not clear expanding_p.
1039 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
1041 2003-09-14 Mark Mitchell <mark@codesourcery.com>
1043 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
1044 an bit-field whose width exceeds that of its type.
1046 2003-09-14 Geoffrey Keating <geoffk@apple.com>
1048 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
1050 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
1052 * ChangeLog: Follow spelling conventions.
1053 * parser.c: Likewise.
1055 2003-09-13 Richard Henderson <rth@redhat.com>
1057 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
1058 during relaxation loop.
1060 2003-09-11 David Edelsohn <edelsohn@gnu.org>
1062 * decl2.c (var_finalized_p): Swap arms of conditional.
1064 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
1067 * typeck.c (build_address): If it is a function, mark it used.
1068 (build_unary_op): Do not lose object's side-effects when taking
1069 address of static member function.
1070 * class.c (resolve_address_of_overloaded_function): Use
1071 tsubst_flags_t parameter. Only expect overload sets. Adjust.
1072 (instantiate_type): Adjust flags passing. Do not lose object's
1073 side-effects when taking address of static member function.
1075 2003-09-11 Richard Henderson <rth@redhat.com>
1077 * semantics.c (expand_or_defer_fn): Update for new
1078 cgraph_finalize_function argument.
1080 2003-09-10 Richard Henderson <rth@redhat.com>
1082 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1084 2003-09-10 Jan Hubicka <jh@suse.cz>
1086 * decl2.c (var_finalized_p): New.
1087 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1089 2003-09-10 Richard Henderson <rth@redhat.com>
1091 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1092 mark_member_pointers.
1093 (lower_function): Remove.
1094 * cp-tree.h: Update to match.
1095 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1096 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1098 2003-09-09 Richard Henderson <rth@redhat.com>
1100 * semantics.c (expand_or_defer_fn): Update call to
1101 cgraph_finalize_function.
1103 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1106 * decl2.c (finish_file): Avoid out-of-bounds array reference
1109 2003-09-09 Richard Henderson <rth@redhat.com>
1111 * decl2.c (mark_member_pointers): Rename from
1112 mark_member_pointers_and_eh_handlers and don't check eh handlers.
1114 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1117 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1119 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1121 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1122 c_register_builtin_type.
1125 * decl2.c (add_function): Do not complain about seeing the same
1127 * semantics.c (perform_koenig_lookup): Improve documentation.
1130 * pt.c (try_one_overload): Add addr_p parameter.
1131 (resolve_overloaded_unification): Pass it.
1133 2003-09-08 Richard Henderson <rth@redhat.com>
1135 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1137 2003-09-08 Richard Henderson <rth@redhat.com>
1139 * decl.c (finish_function): Clear current_function_decl.
1140 * decl2.c (mark_used): Don't push/pop gc context.
1141 * optimize.c (optimize_function): Likewise.
1142 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1143 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1144 * semantics.c (expand_body): Update for tree_rest_of_compilation
1147 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1150 * error.c (dump_decl): Handle namespace-alias-definition.
1151 * decl.c (warn_extern_redeclared_static): There is no point in
1152 checking changes in storage class specifier for a namespace
1154 (duplicate_decls): Tidy diagnostic message.
1155 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1156 (pp_cxx_right_brace): Likewise.
1157 (pp_cxx_original_namespace_definition): New function.
1158 (pp_cxx_namespace_alias_definition): Likewise.
1159 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1161 2003-09-07 Jan Hubicka <jh@suse.cz>
1163 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1164 Avoid re-emitting variables in unit-at-a-time mode.
1166 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1169 * call.c (standard_conversion): Improve comments.
1170 (perform_direct_initialization): Make sure we return an expression
1171 of the correct type.
1172 * typeck.c (build_static_cast): Check for ambiguity and
1173 accessibility when performing conversions.
1175 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1177 * cp-tree.h (add_binding): Remove declaration.
1178 * name-lookup.h (supplement_binding): Declare.
1179 * decl.c (add_binding): Move to name-lookup.c.
1180 (push_local_binding): Adjust.
1181 (push_class_binding): Likewise.
1182 (set_identifier_type_value_with_scope): Likewise.
1183 * name-lookup.c (supplement_binding): Rename from add_binding.
1184 Return a bool. Improve documentation.
1185 (set_namespace_binding): Adjust.
1186 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1188 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1191 * class.c (pushclass): Push dependent using decls for nested
1192 classes of templates too.
1194 2003-09-06 Roger Sayle <roger@eyesopen.com>
1197 * class.c (resolve_address_of_overloaded_function): When building
1198 list of matching non-template function decls, ignore anticipated
1199 declarations of undeclared or shadowed GCC builtins.
1201 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1204 * decl.c (define_label): Remove unreachable timevar pop.
1205 Always return the decl, even if the definition is invalid.
1207 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1210 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1211 unparsed functions queue.
1213 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1216 * call.c (perform_direct_initialization): Correct logic for
1217 direct-initialization of a class type.
1220 * pt.c (lookup_template_function): Robustify.
1222 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1225 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1226 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1227 is_type_p to lookup_qualified_name.
1229 * semantics.c (finish_call_expr): Refactor some code.
1232 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1233 (build_min_non_dep): Declare.
1234 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1235 (build_min_non_dep): New.
1236 * cvt.c (convert_to_void): Don't explicitly copy
1237 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1238 * call.c (build_new_method_call): Use build_min_non_dep.
1239 * decl2.c (grok_array_decl): Likewise.
1240 (build_offset_ref_call_from_tree): Likewise.
1241 * typeck.c (finish_class_member_access_expr,
1242 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1243 build_x_conditional_expr, build_x_compound_expr): Likewise.
1244 (build_static_cast, build_reinterpret_cast,
1245 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1246 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1247 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1249 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1250 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1251 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1253 2003-09-04 Richard Henderson <rth@redhat.com>
1255 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1256 change in cgraph_mark_needed_node arguments.
1258 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1261 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1262 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1264 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1266 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1267 (expr_sizeof): Replace with ...
1268 (cxx_sizeof_or_alignof_expr): ... here.
1269 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1270 * parser.c (cp_parser_unary_expression): Commonize alignof and
1272 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1274 * semantics.c (finish_sizeof, finish_alignof): Remove.
1275 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1276 becomes bool. Set TREE_READONLY.
1277 (expr_sizeof): Replace with ...
1278 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1280 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1282 Remove cast-as-lvalue extension.
1283 * call.c (build_conditional_expr): Correct formatting.
1284 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1285 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1286 * cp-tree.h (non_cast_lvalue_p): Remove.
1287 (real_non_cast_lvalue_p): Remove.
1288 (non_cast_lvalue_or_else): Remove.
1289 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1290 (real_lvalue_p): Adjust call to lvalue_p_1.
1291 (non_cast_lvalue_p): Remove.
1292 (non_cast_lvalue_or_else): Remove.
1293 (lvalue_p): Adjust call to lvalue_p_1.
1294 (lvalue_or_else): Simplify.
1295 * typeck.c (build_unary_op): Use lvalue_or_else, not
1296 non_cast_lvalue_or_else.
1297 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1299 2003-09-03 DJ Delorie <dj@redhat.com>
1301 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1303 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1306 * class.c (include_empty_classes): Correct logic for ABI version 1.
1308 2003-09-03 Richard Henderson <rth@redhat.com>
1310 * optimize.c (optimize_function): Push/pop ggc context around
1311 the call to optimize_inline_calls.
1313 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1316 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1317 duplicate friend decl-specifier.
1319 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1322 * pt.c (convert_nontype_argument): Correct representation of
1323 REFERENCE_TYPE expressions.
1326 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1327 (finish_call_expr): Change prototype.
1328 * parser.c (cp_parser_postfix_expression): Adjust call to
1330 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1331 * semantics.c (finish_call_expr): Add koenig_p parameter.
1333 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1336 * cp-tree.h (initialize_reference): Change prototype.
1337 * call.c (initialize_reference): Add cleanup parameter.
1338 * decl.c (grok_reference_init): Likewise.
1339 (check_initializer): Likewise.
1340 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1341 (duplicate_decls): When replacing an anticipated builtin, do not
1343 * typeck.c (convert_for_initialization): Correct call to
1344 initialize_reference.
1347 * pt.c (dependent_type_p_r): Pass only the innermost template
1348 arguments to any_dependent_template_arguments_p.
1350 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1352 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1353 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1354 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1355 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1356 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1358 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1361 * pt.c (build_non_dependent_expr): Do not build a
1362 NON_DEPENDENT_EXPR for a STRING_CST.
1365 * search.c (add_conversions): Avoid adding two conversion
1366 operators for the same type.
1368 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1371 * pt.c (tsubst_copy_and_build): Correct handling of
1372 address-of-label extension.
1373 * semantics.c (finish_goto_stmt): The address of a label must go
1374 through the lvalue-to-rvalue conversion.
1376 2003-08-29 Richard Henderson <rth@redhat.com>
1377 Jason Merrill <jason@redhat.com>
1379 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1380 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1381 * cp-tree.h (cxx_expand_function_start): Declare.
1382 * decl.c (start_function): Use allocate_struct_function.
1383 Move stmts_are_full_exprs_p assertion from expand_body.
1384 Do not free_after_parsing or free_after_compilation.
1385 (cxx_push_function_context): Move code to set struct function
1386 data from genrtl_start_function.
1387 * optimize.c (optimize_function): Don't inc/dec function_depth.
1388 * semantics.c (expand_body): Use tree_rest_of_compilation.
1389 (cxx_expand_function_start): Rename from genrtl_start_function,
1390 omit bits done by tree_rest_of_compilation.
1391 (genrtl_finish_function): Remove.
1392 (clear_decl_rtl): Move to ../tree-optimize.c.
1394 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1397 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1399 * cxx-pretty-print.h: Declare.
1400 * error.c (dump_template_parameter): Use it.
1401 (dump_type): Likewise.
1403 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1405 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1406 * call.c (build_conditional_expr): Revert previous patch.
1408 PR optimization/5079
1409 * call.c (build_conditional_expr): Use decl_constant_value to
1410 simplify the arguments.
1412 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1414 * parser.c (struct cp_token): Use enum bitfields.
1415 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1416 512B allocation unit.
1417 (cp_parser_token_tree_map_node): Use enum bitfields.
1419 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1422 * decl.c (push_class_level_binding): Correct old_decl value from
1423 my 2003-07-29 reorganization.
1425 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1426 (build_new_method_call): Add goto finish.
1427 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1428 TREE_SIDE_EFFECTS on a call.
1430 2003-08-25 Richard Henderson <rth@redhat.com>
1432 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1434 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1436 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1437 (cxx_pretty_printer): Adjust base type.
1438 (pp_cxx_function_specifier): Declare.
1439 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1440 (pp_cxx_left_paren): Likewise.
1441 (pp_cxx_right_paren): Likewise.
1442 (pp_cxx_dot): Likewise.
1443 (pp_cxx_arrow): Likewise.
1444 (pp_cxx_semicolon): Likewise.
1445 (pp_cxx_identifier): Likewise.
1446 (pp_cxx_cv_qualifier_seq): Likewise.
1447 (pp_cxx_storage_class_specifier): Likewise.
1448 (pp_cxx_expression_list): Likewise.
1449 (pp_cxx_space_for_pointer_operator): Likewise.
1450 (pp_cxx_init_declarator): Likewise.
1451 (pp_cxx_call_argument_list): Likewise.
1452 (pp_cxx_nonconsecutive_character): Tidy.
1453 (pp_cxx_conversion_function_id): New function.
1454 (pp_cxx_template_id): Likewise.
1455 (pp_cxx_template_keyword_if_needed): Likewise.
1456 (pp_cxx_nested_name_specifier): Likewise.
1457 (pp_cxx_unqualified_id): Tidy
1458 (pp_cxx_qualified_id): Handle more nodes.
1459 (pp_cxx_primary_expression): Tidy.
1460 (pp_cxx_postfix_expression): Likewise.
1461 (pp_cxx_new_expression): Tidy.
1462 (pp_cxx_delete_expression): Likewise.
1463 (pp_cxx_cast_expression): New function.
1464 (pp_cxx_pm_expression): Tidy.
1465 (pp_cxx_conditional_expression): Likewise.
1466 (pp_cxx_assignment_operator): New function.
1467 (pp_cxx_assignment_expression): Tidy.
1468 (pp_cxx_expression): New function.
1469 (pp_cxx_function_specifier): Likewise.
1470 (pp_cxx_decl_specifier_seq): Likewise.
1471 (pp_cxx_simple_type_specifier): Tidy.
1472 (pp_cxx_type_specifier_seq): Likewise.
1473 (pp_cxx_ptr_operator): New function.
1474 (pp_cxx_implicit_parameter_type): Likewise.
1475 (pp_cxx_parameter_declaration): Tidy.
1476 (pp_cxx_parameter_declaration_clause): New function.
1477 (pp_cxx_exception_specification): Likewise.
1478 (pp_cxx_direct_declarator): Tidy.
1479 (pp_cxx_declarator): Likewise.
1480 (pp_cxx_ctor_initializer): New function.
1481 (pp_cxx_function_definition): Likewise.
1482 (pp_cxx_abstract_declarator): Tidy.
1483 (pp_cxx_direct_abstract_declarator): Likewise.
1484 (pp_cxx_type_id): Likewise.
1485 (pp_cxx_exception_declaration): New function.
1486 (pp_cxx_statement): Likewise.
1487 (pp_cxx_simple_declaration): Likewise.
1488 (pp_cxx_template_parameter_list): Likewise.
1489 (pp_cxx_template_parameter): Likewise.
1490 (pp_cxx_template_declaration): Likewise.
1491 (pp_cxx_explicit_specialization): Likewise.
1492 (pp_cxx_explicit_instantiation): Likewise.
1493 (pp_cxx_declaration): Tidy.
1494 (pp_cxx_pretty_printer_init): Initialize more fields.
1496 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1499 * cp-tree.h (build_cplus_method_type): Remove.
1500 * call.c (standard_conversion): Use build_method_type_directly
1501 instead of build_cplus_method_type.
1502 * class.c (build_clone): Likewise.
1503 (adjust_clone_args): Likewise.
1504 * decl.c (build_ptrmem_type): Likewise.
1505 (grokdeclarator): Likewise.
1506 (check_function_type): Likewise.
1507 * decl2.c (grok_method_quals): Likewise.
1508 (maybe_retrofit_in_chrg): Likewise.
1509 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1510 (tsubst_function_type): Likewise.
1512 * tree.c (build_cplus_method_type): Remove.
1513 * typeck.c (merge_types): Use build_method_type_directly.
1515 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1518 * search.c (dfs_access_in_type): Fix typo in comment.
1519 (dfs_accessible_queue_p): Likewise.
1520 (dfs_accessible_p): Only terminate when a friend is found.
1521 (accessible_p): Return immediately if access_in_type allows
1524 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1526 PR c++/641, c++/11876
1527 * friend.c (add_friend): Add complain parameter.
1528 (make_friend_class): Likewise.
1529 (do_friend): Adjust add_friend call.
1530 * decl.c (grokdeclarator): Adjust make_friend_class call.
1531 * parser.c (cp_parser_member_declaration): Likewise.
1532 (cp_parser_template_declaration_after_export): Likewise.
1533 * pt.c (instantiate_class_template): Adjust make_friend_class
1534 and add_friend call.
1535 * cp-tree.h (make_friend_class): Adjust declaration.
1536 (add_friend): Likewise.
1538 2003-08-21 Jason Merrill <jason@redhat.com>
1541 * call.c (build_conditional_expr): Ignore cv-qual differences for
1544 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1547 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1548 (cp_parser_primary_expression): Adjust call to
1549 cp_parser_id_expression.
1550 (cp_parser_unqualified_id): Complain about the use of
1551 typedef-names in a destructor declarator.
1552 (cp_parser_postfix_expression): Adjust call to
1553 cp_parser_id_expression.
1554 (cp_parser_type_parameter): Likewise.
1555 (cp_parser_template_argument): Likewise.
1556 (cp_parser_declarator_id): Likewise.
1559 * call.c (standard_conversion): Use same_type_p, not pointer
1560 equality, to compare types.
1563 * parser.c (cp_parser_using_declaration): Check for invalid uses
1564 of template-ids here...
1565 * decl2.c (do_class_using_decl): ... rather than here.
1567 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1570 * pt.c (more_specialized): Bump processing_template_decl.
1572 2003-08-21 Jason Merrill <jason@redhat.com>
1575 * decl.c (grokdeclarator): Recognize a flexible array based on the
1576 type, not the form of the declarator.
1578 2003-08-20 Jason Merrill <jason@redhat.com>
1580 * semantics.c (simplify_aggr_init_expr): Split out from
1581 simplify_aggr_init_exprs_r. Convert slot address to match
1583 * cp-tree.h: Declare it.
1584 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1585 DECL_NAME of a user variable.
1587 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1590 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1592 * semantics.c (finish_expr_stmt): Always convert to void.
1593 * typeck.c (build_x_compound_exp): Always convert to void.
1595 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1598 * cp-tree.h (grok_op_properties): Change prototype.
1599 * decl.c (grok_op_properties): Add complain parameter.
1600 (grokfndecl): Pass it.
1601 * pt.c (tsubst_decl): Adjust accordingly.
1604 * decl.c (start_method): Return immediately if push_template_decl
1605 does not like the declaration.
1606 * pt.c (push_template_decl_real): Disallow member template
1610 * cp-tree.h (add_binding): Add prototype.
1611 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1612 (maybe_warn_about_overly_private_class): Use
1613 CLASSTYPE_DESTRUCTORS.
1614 (pushclass): Adjust call to set_identifier_type_value.
1615 * decl.c (add_binding): Give it external linkage.
1616 (push_local_binding): Adjust call to add_binding.
1617 (push_class_binding): Likewise.
1618 (set_identifier_type_value_with_scope): Change prototype. Use
1619 add_binding for global bindings.
1620 (set_identifier_type_value): Adjust accordingly.
1621 (pushtag): Likewise.
1622 (pushdecl): Use set_identifier_type_value, not
1623 set_identifier_type_value_with_scope.
1624 (pushdecl_namespace_level): Adjust calls to
1625 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1626 (pushdecl_class_level): Likewise.
1627 (lookup_tag): Use select_decl.
1628 (select_decl): Improve comment.
1629 (record_builtin_type): Do not call pushdecl.
1630 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1631 (cp_finish_decl): Adjust call to set_identifier_type_value.
1632 (check_elaborated_type_specifier): Improve checks for invalid uses
1634 (xref_tag): Adjust call to check_elaborated_type_specifier.
1635 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1636 * name-lookup.c (set_namespace_binding): Use add_binding.
1637 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1638 rather than an IDENTIFIER_NODE, to represent built-in types, if
1639 requested by the caller.
1640 (cp_parser_postfix_expression): Adjust call.
1641 (cp_parser_type_specifier): Likewise.
1642 (cp_parser_elaborated_type_specifier): Adjust call to
1643 check_elaborated_type_specifier.
1644 * typeck2.c (build_functional_cast): Do not perform name lookups.
1647 * decl.c (expand_static_init): Remove unnecessary code.
1649 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1651 PR c++/10538, PR c/5582
1652 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1654 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1657 * init.c (build_offset_ref): Perform access checking for
1658 pointer to member correctly.
1660 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1662 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1664 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1667 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1668 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1669 adjust the stmt_expr here.
1670 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1672 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1674 * pt.c (tsubst_copy): Likewise.
1675 * semantics.c (finish_stmt_expr): Add parameter.
1677 * pt.c (instantiate_class_template): Push to class's scope before
1680 2003-08-17 Jan Hubicka <jh@suse.cz>
1683 * semantics.c (finish_id_expression): Mark all functions as used.
1685 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1688 * cvt.c (convert_to_void): Indicate which side of conditional has
1689 no effects, and rhs of comma operator. Test for no sideeffect
1690 expressions here and always build a convert expr.
1691 * init.c (expand_default_init): Convert the init to void.
1692 * typeck.c (build_x_compound_expr): Do not check for side effects
1694 (build_compound_expr): Do not convert lhs when building a
1697 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1699 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1700 * decl2.c (build_offset_ref_call_from_tree): Use
1701 build_non_dependent_expr.
1702 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1703 * pt.c (build_non_dependent_expr): Set operand.
1705 2003-08-14 Jan Hubicka <jh@suse.cz>
1707 * decl2.c (mark_member_pointers): Rename to...
1708 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1709 (lower_function): Update call.
1710 * except.c (eh_type_info): Break out from ...
1711 (build_eh_type): ... here; tinfo is already used.
1712 (finish_eh_spec_block): Mark tinfos as used.
1713 * semantics.c (finish_handler_params): Mark tinfo as used.
1714 * cp-tree.h (eh_type_info): Declare.
1716 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1718 * pt.c (instantiate_class_template): Set location before
1721 * decl.c (make_typename_type): Use my_friendly_assert.
1722 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1724 2003-08-14 Jan Hubicka <jh@suse.cz>
1726 * method.c (use_thunk): Expand body directly.
1728 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1731 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1732 determine whether or not to promote types.
1733 (convert_for_arg_passing): Likewise.
1734 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1736 * pt.c (tsubst_decl): Do not expect it to be set.
1740 * cp-tree.h (check_elaborated_type_specifier): Declare.
1741 (handle_class_head): Remove.
1742 (note_got_semicolon): Likewise.
1743 (note_list_got_semicolon): Likewise.
1744 (finish_class_definition): Likewise.
1745 * decl.c (check_elaborated_type_specifier): Make it public.
1747 (handle_class_head): Remove.
1748 * parser.c (cp_parser_elaborated_type_specifier): Use
1749 check_elaborated_type_specifier.
1750 (cp_parser_class_specifier): Do not call finish_class_definition.
1751 (cp_parser_class_head): Or handle_class_head. Check for
1752 over-qualified names.
1753 * semantics.c (finish_class_definition): Remove.
1755 * parser.c (cp_parser_check_for_definition_in_return_type): New
1757 (cp_parser_simple_declaration): Adjust call to
1758 cp_parser_init_declarator.
1759 (cp_parser_decl_specifier_seq): Change type of
1760 declares_class_or_enum parameter.
1761 (cp_parser_explicit_instantiation): Adjust accordingly.
1762 (cp_parser_type_specifier): Change type of
1763 declares_class_or_enum parameter.
1764 (cp_parser_init_declarator): Add declares_class_or_enum
1766 (cp_parser_parameter_declaration): Adjust call to
1767 cp_parser_decl_specifier_seq.
1768 (cp_parser_function_definition): Likewise.
1769 (cp_parser_member_declaration): Likewise.
1770 (cp_parser_single_declaration): Likewise.
1772 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1773 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1774 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1775 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1776 (TYPE_OVERLOADS_ARROW): Likewise.
1777 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1778 * class.c (check_bases): Do not set them.
1779 (finish_struct_1): Likewise.
1780 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1781 (build_ptrmemfunc_type): Likewise.
1782 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1783 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1784 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1785 * lex.c (note_got_semicolon): Remove.
1786 (note_list_got_semicolon): Likewise.
1787 * parser.c (cp_parser_simple_declaration): Do not call
1788 note_list_got_semicolon.
1789 * pt.c (list_eq): Remove.
1790 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1791 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1792 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1793 * ptree.c (cxx_print_type): Do not print them.
1794 * semantics.c (finish_member_class_template): Do not call
1795 note_list_got_semicolon.
1797 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1799 * call.c (standard_conversion): Opaque pointers interconvert.
1801 * testsuite/g++.dg/other/opaque-3.C: New.
1803 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1805 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1808 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1811 * cp-tree.h (get_vbase): Remove.
1812 (get_vbase_types): Remove.
1813 * init.c (expand_member_init): Correct logic for looking up base
1816 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1818 * error.c (dump_expr): Tidy.
1819 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1820 (pp_cxx_begin_template_argument_list): Likewise.
1821 (pp_cxx_end_template_argument_list): Likewise.
1822 (is_destructor_name): Likewise.
1823 (pp_cxx_unqualified_id): Likewise.
1824 (pp_cxx_qualified_id): Likewise.
1825 (pp_cxx_id_expression): Likewise.
1826 (pp_cxx_new_expression): Likewise.
1827 (pp_cxx_delete_expression): Likewise.
1828 (pp_cxx_pm_expression): Likewise.
1829 (pp_cxx_type_specifier): Rework.
1830 (pp_cxx_type_id): Likewise.
1831 (pp_cxx_primary_expression): Likewise.
1832 (pp_cxx_postfix_expression): Likewise.
1833 (pp_cxx_unary_expression): Likewise.
1834 (pp_cxx_multiplicative_expression): Likewise.
1835 (pp_cxx_conditional_expression): Likewise.
1836 (pp_cxx_assignment_expression): Likewise.
1837 (pp_cxx_pretty_printer_init): Tidy.
1839 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1841 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1842 NODE is always a TREE_VEC of nonzero size.
1843 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1844 * decl2.c (arg_assoc): Template args will be a vec.
1845 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1846 dump_template_argument_list.
1847 (dump_template_parms): Args will be a vec.
1848 * parser.c (cp_parser_template_argument_list): Produce a
1850 * pt.c (coerce_template_parms): Args are always vectors.
1851 (mangle_class_name_for_template): Likewise.
1852 (lookup_template_function): Likewise.
1853 (lookup_template_class): Likewise.
1854 (tsubst_template_args): Likewise.
1855 (tsubst_baselink): Use tsubst_template_args.
1856 (tsubst_qualified_id): Likewise.
1857 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1858 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1859 (any_dependent_template_args_p): Args are always vectors.
1860 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1863 * call.c (convert_like_real): Add rvalue binding error message.
1864 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1868 * pt.c (dependent_type_p_r): A dependent template-id is a class
1869 type with dependent template arguments, or a bound template
1871 (type_dependent_expression_p): A template function decl cannot
1872 have a dependent context.
1874 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1877 * parser.c (cp_parser_class_name): Return immediately when scope
1880 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1882 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1884 * cp/call.c (standard_conversion): Support opaque types.
1886 (strip_top_quals): Use cp_build_qualified_type instead of
1889 * cp/typeck.c (convert_for_assignment): Support opaque types.
1891 * testsuite/g++.dg/other/opaque-1.C: New.
1893 * testsuite/g++.dg/other/opaque-2.C: New.
1895 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1897 * decl.c (grokparms): Use cp_build_qualified_type instead
1900 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1902 * cxx-pretty-print.h: New file.
1903 * cxx-pretty-print.c: Likewise.
1904 * error.c (scratch_pretty_printer): Change type.
1906 (dump_aggr_type): Likewise.
1907 (dump_global_iord): Likewise.
1908 (dump_expr): Likewise.
1909 (dump_char): Remove.
1910 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1911 (cxx_initialize_diagnostics): New function.
1912 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1913 (CXX_PRETTY_PRINT_H): New variable.
1914 (cp/cxx-pretty-print.o): New rule.
1915 (cp/cp-lang.o): Update dependence.
1916 (cp/error.o): Likewise.
1918 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1920 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1921 (DECL_DECLARED_INLINE_P): Remove.
1922 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1923 if decl is a FUNCTION_DECL. This never made sense, but now it is
1924 required to avoid a tree check failure.
1925 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1926 * optimize.c (maybe_clone_body): Likewise.
1928 2003-08-04 Roger Sayle <roger@eyesopen.com>
1930 * decl.c (cxx_insert_default_attributes): Delete.
1931 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1932 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1934 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1937 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1941 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1944 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1947 * cp-tree.def (USING_DECL): Document its type.
1948 * class.c (pushclass): If we're entering a template, push any
1949 dependent using decls it has.
1950 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1952 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1953 (tsubst): Remove USING_DECL checks.
1954 (type_dependent_expression_p): Remove USING_DECL case.
1955 * semantics.c (finish_member_declaration): A USING_DECL's type
1956 indicates whether it is dependent.
1958 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1960 * cp-tree.h (pushclass): Remove unneeded parameter.
1961 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1962 (push_nested_class): Adjust pushclass call.
1963 * pt.c (instantiate_class_template): Likewise.
1964 * semantics.c (begin_class_definition): Likewise.
1966 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1968 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1970 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1973 * decl.c (decls_match): Don't ignore the types of template
1977 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1979 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1981 PR c++/8442, c++/8806
1982 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1984 (check_elaborated_type_specifier): Add allow_template_p
1985 parameter. Check tag mismatch and class template.
1986 (xref_tag): Add template_header_p parameter. Add assertion
1987 that name is an IDENTIFIER_NODE. Remove implicit typename
1988 warning. Simplify lookup process if globalize is true.
1989 (cxx_init_decl_processing): Adjust call to xref_tag.
1990 (xref_tag_from_type): Likewise.
1991 * decl2.c (handle_class_head): Likewise.
1992 * parser.c (cp_parser_elaborated_type_specifier,
1993 cp_parser_class_head): Likewise.
1994 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1995 tinfo_base_init, emit_support_tinfos): Likewise.
1996 * class.c (is_base_of_enclosing_class): Remove.
1997 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1998 template template argument.
1999 * cp-tree.h (xref_tag): Adjust declaration.
2000 (is_base_of_enclosing_class): Remove.
2001 * NEWS: Document template template argument change.
2003 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
2005 * parser.c (cp_parser_init_declarator,
2006 cp_paser_member_declaration): Reformat.
2007 * pt.c (lookup_template_class, type_unification_real, unify,
2008 type_dependent_expression_p): Reformat.
2011 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
2013 (finish_stmt_expr_expr): Declare.
2014 * parser.c (cp_parser_primary_expression): Tell
2015 cp_parser_compount_statement that it is a statement expression.
2016 (cp_parser_statement, cp_parser_labeled_statement,
2017 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
2018 in_statement_expr_p parameter.
2019 (cp_parser_expression_statement): Likewise. Call
2020 finish_stmt_expr_expr for final expression of a statement
2022 (cp_parser_for_init_statement,
2023 cp_parser_implicitly_scoped_statement,
2024 cp_parser_already_scoped_statement, cp_parser_function_definition,
2025 cp_parser_try_block, cp_parser_handled): Adjust.
2026 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
2027 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
2028 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
2029 * semantics.c (finish_expr_stmt): Do not deal with statement
2031 (begin_stmt_expr): Clear last_expr_type.
2032 (finish_stmt_expr_expr): New.
2033 (finish_stmt_expr): Process the value expression.
2035 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
2036 compound expr inside the target's initializer.
2039 * parser.c (cp_parser_primary_expression): Do not set
2040 non-constant-p merely because it is a dependent scope.
2043 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
2044 * semantics.c (finish_expr_stmt): Do not convert to void in a
2047 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
2049 * pt.c (coerce_template_parms): Refactor.
2050 (fn_type_unification): Increment processing_template_decl when
2051 tsubsting an incomplete set of explicit args.
2054 * pt.c (instantiate_class_template): Increment
2055 processing_template_decl around the tsubst of a template member
2057 (tsubst_qualified_id): Assert we do not have a dependent scope.
2059 * pt.c (coerce_template_template_parms, lookup_template_class,
2060 can_complete_type_without_circularity, instantiate_class_template,
2061 tsubst_decl, unify): Reformat.
2063 2003-07-31 Jan Hubicka <jh@suse.cz>
2065 * decl2.c (maybe_make_one_only): Use mark_referenced.
2066 * method.c (use_thunk): Likewsie.
2068 2003-07-30 Jan Hubicka <jh@suse.cz>
2070 * class.c (build_vtable_entry_ref): Kill.
2071 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2072 (build_vfn_ref): Do not call build_vtable_entry_ref.
2073 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2074 * cp-tree.h (prepare_assemble_variable): Kill.
2075 * cp-decl.c (prepare_assemble_variable): Kill.
2077 2003-07-29 Geoffrey Keating <geoffk@apple.com>
2079 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2080 of setting valid_pch by hand.
2082 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2084 * decl.c (finish_enum): Initialize underlying_type.
2086 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
2089 * decl.c (add_binding): Add bval local variable.
2090 (push_class_level_binding): Likewise. Allow a USING_DECL to be
2092 * decl2.c (do_class_using_decl): The type of a using decl is
2094 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2095 function call lookup code.
2096 * pt.c (tsubst): A USING_DECL will have unknown type.
2097 (tsubst_copy_and_build): Allow a using decl.
2098 (type_dependent_expression_p): A USING_DECL will make it
2100 * semantics.c (finish_member_declaration): Push a dependent using
2103 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2106 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2107 * semantics.c (finish_id_expression): Call mark_used for all
2110 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2113 * call.c (standard_conversion): Allow all integral->enumeral
2114 conversions, after marking them as bad.
2115 * decl.c (finish_enum): Make sure that all enumerators are
2116 properly converted to the underlying type.
2117 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2119 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2120 (tsubst_enum): Tidy.
2122 * Make-lang.in (typeck.o): Depend on convert.h.
2123 (class.o): Likewise.
2125 * call.c: Include convert.h.
2126 (convert_arg_to_ellipsis): Use convert_to_real.
2127 * class.c: Include convert.h.
2128 (build_base_path): Use convert_to_integer.
2129 * rtti.c: Include convert.h.
2130 (build_headof): Use convert_to_integer.
2131 * typeck.c: Include convert.h.
2132 (decay_conversion): Use convert_to_integer.
2133 (build_unary_op): Use build_nop.
2134 (get_delta_difference): Use convert_to_integer.
2135 (build_ptrmemfunc): Avoid unnecessary conversions.
2137 2003-07-28 Jan Hubicka <jh@suse.cz>
2139 * decl2.c (mark_member_pointers): Verify that member pointer points to
2142 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2144 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2145 (finish_compound_stmt): Remove no scope arg.
2146 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2147 end_compound_stmt calls.
2148 (expand_static_init, begin_destructor_body, begin_function_body,
2149 finish_function_body): Likewise.
2150 * decl2.c (start_objects, finish_objects,
2151 start_static_storage_duration_function,
2152 finish_static_storage_duration_function): Likewise.
2153 * init.c (begin_init_stmts, finish_init_stmts,
2154 construct_virtual_base, build_vec_init): Likewise.
2155 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2156 * parser.c (cp_parser_compound_statement,
2157 cp_parser_implicitly_scoped_statement,
2158 cp_parser_already_scoped_statement): Likewise.
2159 * pt.c (tsubst_expr): Likewise.
2160 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2161 (finish_compound_stmt): Remove no scope arg.
2163 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2166 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2168 * call.c (standard_conversion): Tweak handling of
2169 pointer-to-member types.
2170 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2171 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2172 pointer-to-data member types.
2174 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2176 * parser.c (cp_parser_type_parameter): Reformat.
2177 (cp_parser_parameter_declaration): Deprecate default args where
2180 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2184 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2185 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2186 * init.c (begin_init_stmts): Make static. Return is_global
2187 value. Always call begin_stmt_expr.
2188 (finish_init_stmts): Make static. Add is_global parm. Always
2189 building a stmt tree.
2190 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2191 (build_vec_init): Likewise. Always building a stmt tree.
2192 (expand_default_init): Always building a stmt tree.
2193 (get_temp_regvar): Likewise.
2194 * semantics.c (begin_global_stmt_expr,
2195 finish_global_stmt_expr): Remove.
2197 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2199 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2200 (build_x_compound_expr_from_list): Declare.
2201 * typeck.c (build_x_compound_expr_from_list): New.
2202 (build_x_compound_expr): Adjust.
2203 (build_compound_expr): Remove unreachable code. Take two
2205 * decl.c (grok_reference_init): Use
2206 build_x_compound_expr_from_list.
2207 (expand_static_init): Adjust build_compound_expr call.
2208 (cxx_maybe_build_cleanup): Likewise.
2209 * init.c (perform_member_init): Use
2210 build_x_compound_expr_from_list.
2211 (build_new_1): Likewise.
2212 (build_vec_delete): Adjust build_compound_expr calls.
2213 (build_vbase_delete): Likewise.
2214 * typeck2.c (store_init_value): Use
2215 build_x_compound_expr_from_list.
2216 (build_functional_cast): Likewise.
2218 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2220 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2221 * decl.c (make_typename_type): Pass it.
2222 * pt.c (lookup_template_class): Use it.
2223 (resolve_typename_type): Pass it.
2224 * semantics.c (finish_template_type): Pass it.
2226 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2229 * cp-tree.h (qualified_name_lookup_error): Declare.
2230 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2232 (tsubst_expr) <DECL_STMT case>: Likewise.
2233 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2234 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2235 (finish_id_expression): ... here. Use it.
2237 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2239 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2241 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2244 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2245 (tsubst_template_arg): New.
2246 (tsubst_template_arg_vector): Rename to ...
2247 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2248 tsubst_template_arg.
2249 (coerce_template_parms): Use tsubst_template_arg for default
2251 (tsubst_template_parms): Likewise.
2252 (tsubst_aggr_type): Adjust.
2253 (tsubst_decl): Likewise.
2254 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2255 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2257 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2259 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2260 * error.c: Use the new pretty-printer framework.
2262 2003-07-24 Per Bothner <pbothner@apple.com>
2264 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2265 which causes errors messages to incorrectly mention included files.
2267 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2269 * cp-tree.h (convert_to_base_statically): Declare.
2270 * call.c (build_special_member_call): Convert INSTANCE to the base
2272 * class.c (convert_to_base_statically): New method.
2273 * init.c (construct_virtual_base): Use it.
2274 * method.c (do_build_assign_ref): Fix typo in comment.
2276 2003-07-24 Jason Merrill <jason@redhat.com>
2278 * decl.c: Just set truthvalue_* to boolean_*.
2280 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2282 * decl.c (reshape_init): Remove unreachable code.
2284 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2287 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2289 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2292 * cp-tree.h (accessible_base_p): Declare.
2293 * call.c (build_over_call): Use it.
2294 * search.c (accessible_base_p): New function, split out from ...
2295 (lookup_base): ... here.
2298 * call.c (build_conditional_expr): Use perform_implicit_conversion
2299 and error_operand_p. Robustify.
2300 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2302 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2305 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2307 (cp_parser_elaborated_type_specifier): Likewise.
2309 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2311 Eliminate use of POINTER_TYPE for pointers-to-members.
2312 * call.c (standard_conversion): Rework pointer-to-member handling.
2314 (add_builtin_candidate): Likewise.
2315 (resolve_scoped_fn_name): Remove.
2316 (build_conditional_expr): Rework pointer-to-member handling.
2317 (compare_ics): Likewise.
2318 * class.c (check_field_decls): Use TYPE_PTR_P.
2319 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2321 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2322 (TYPE_PTRMEM_P): Add comment.
2323 (TYPE_PTR_P): Simplify.
2324 (TYPE_PTROB_P): Correct definition.
2325 (TYPE_PTR_TO_MEMBER_P): New macro.
2326 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2327 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2328 (resolved_scoped_fn_name): Remove declaration.
2329 (build_offset_ref): Change prototype.
2330 (resolve_offset_ref): Remove.
2331 (comp_target_types): Remove.
2332 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2334 (convert_to_reference): Use can_convert.
2335 (ocp_convert): Improve error handling. Rework pointer-to-member
2337 (perform_qualification_conversions): Rework pointer-to-member
2339 * decl.c (build_ptrmem_type): Handle functions too.
2340 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2341 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2342 (grokparms): Remove OFFSET_TYPE error message.
2343 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2344 * error.c (dump_type_prefix): Likewise.
2345 * expr.c (cplus_expand_constant): Use build_nop.
2346 * init.c (build_offset_ref): Add address_p parameter. Fold in
2347 necessary bits from resolve_offset_ref.
2348 (resolve_offset_ref): Remove.
2349 * parser.c (cp_parser_postfix_expression): Remove special case
2350 code for OFFSET_TYPE.
2351 * pt.c (convert_nontype_argument): Rework pointer-to-member
2353 (convert_template_argument): Likewise.
2355 (invalid_nontype_parm_type_p): Likewise.
2356 (dependent_type_p_r): Likewise.
2357 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2358 (target_incomplete_p_): Rework pointer-to-member
2360 (get_pseudo_ti_init): Likewise.
2361 (get_pseudo_ti_desc): Likewise.
2362 * semantics.c (finish_qualified_id_expr): Adjust call to
2363 build_offset_ref. Remove use of resolve_offset_ref.
2364 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2365 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2366 (type_unknown_p): Remove obsolete code about the time before
2367 non-dependent expressions were handled correctly.
2368 (qualify_type_recursive): Remove.
2369 (composite_pointer_type_r): New function.
2370 (composite_pointer_type): Use it.
2371 (merge_types): Remove dead comments.
2372 (comp_cv_target_types): Remove.
2373 (comp_target_types): Likewise.
2374 (comp_target_parms): Likewise.
2375 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2376 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2377 (build_binary_op): Do not use of comp_target_types.
2378 (pointer_diff): Remove OFFSET_TYPE case.
2379 (build_unary_op): Adjust pointer-to-member handling.
2380 (unary_complex_lvalue): Likewise.
2381 (check_for_casting_away_constness): Add description parameter.
2382 (build_static_cast): Pass it.
2383 (build_reinterpret_cast): Use check_for_casting_away_constness.
2384 (build_const_cast): Adjust pointer-to-member handling.
2385 (build_c_cast): Likewise.
2386 (convert_for_assignment): Remove OFFSET_TYPE error message.
2387 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2388 (comp_ptr_ttypes_reinterpret): Remove.
2389 (casts_away_constness_r): Adjust pointer-to-member handling.
2390 (casts_away_constness): Liekwise.
2391 (strip_all_pointer_quals): Remove.
2392 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2393 (build_m_component_ref): Likewise.
2395 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2397 * lex.c (unqualified_fn_lookup_error): Mention that the error
2398 message needs to be kept in synch with the manual.
2400 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2403 * decl.c (grokdeclarator): An array member is only a flexible
2404 array member if the field itself is the array.
2406 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2409 * decl.c (xref_basetypes): Handle error_mark_node.
2411 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2413 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2414 * tree.c (lvalue_p_1): Set it.
2415 * class.c (check_field): Don't allow non-packed non-POD fields to
2417 * call.c (reference_binding): Need a temporary for all bitfield
2419 (convert_like_real): Check it is ok to make a temporary here.
2421 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2423 * cp-tree.h (hack_identifier): Remove.
2424 * method.c (hack_identifier): Remove.
2425 * semantics.c (finish_id_expression): Expand hack_identifier
2428 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2430 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2431 semantics.c typeck.c: Remove unnecessary casts.
2433 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2435 * cp-tree.h (hack_identifier): Remove.
2436 * method.c (hack_identifier): Remove.
2437 * semantics.c (finish_id_expression): Expand hack_identifier
2440 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2442 * cp-tree.h (finish_non_static_data_member): Add object param.
2443 * method.c (hack_identifier): Adjust.
2444 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2445 again for a FIELD_DECL.
2446 * semantics.c (finish_non_static_data_member): Add object
2447 parameter. Always save the DECL in the COMPONENT_REF.
2448 * call.c (resolve_scoped_fn_name): Adjust.
2450 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2452 * pt.c (get_bindings): Make definition consistent with
2453 forward declaration.
2455 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2458 * friend.c (add_friend): Check access for member functions
2461 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2464 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2466 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2469 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2471 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2472 * decl.c (duplicate_decls): Merge
2473 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2474 * parser.c (cp_parser_postfix_expression): Adjust call to
2475 cp_parser_initializer_list and
2476 cp_parser_parenthesized_expression_list.
2477 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2478 (cp_parser_new_placement): Adjust call to
2479 cp_parser_parenthesized_expression_list.
2480 (cp_parser_direct_new_declarator): Likewise.
2481 (cp_parser_conditional_expression): Remove.
2482 (cp_parser_constant_expression): Parse an assignment-expression,
2483 not a conditional-expression.
2484 (cp_parser_simple_declaration): Resolve expression/declaration
2485 ambiguity more quickly.
2486 (cp_parser_mem_initializer): Adjust call to
2487 cp_parser_parenthesized_expression_list.
2488 (cp_parser_init_declarator): Keep track of whether or not the
2489 initializer is a constant-expression.
2490 (cp_parser_initializer): Add non_constant_p parameter.
2491 (cp_parser_initializer_clause): Likewise.
2492 (cp_parser_initializer_list): Likewise.
2493 (cp_parser_attribute_list): Adjust call to
2494 cp_parser_parenthesized_expression_list.
2495 (cp_parser_functional_cast): Likewise.
2496 * pt.c (tsubst_decl): Copy
2497 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2498 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2499 * semantics.c (finish_id_expression): Use
2500 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2502 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2504 * lang-options.h: Remove.
2506 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2509 * class.c (field_decl_cmp): Remove.
2510 (resort_field_decl_cmp): Remove.
2511 (resort_sorted_fields): Remove.
2512 (add_fields_to_vec): Rename to ...
2513 (add_fields_to_record_type): this.
2514 (finish_struct_1): Change to be using
2515 sorted_fields_type's fields.
2516 * cp-tree.h (lang_decl): In lang_decl_u3
2517 change sorted_fields to be a pointer to
2519 (resort_sorted_fields): Remove prototype.
2520 * search.c (lookup_field_1): Change to be using
2521 sorted_fields_type's fields.
2523 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2526 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2527 is a member of other class.
2528 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2529 is a specialization of function template.
2531 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2534 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2537 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2539 * cp-tree.def (LOOKUP_EXPR): Remove.
2540 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2541 (LOOKUP_EXPR_GLOBAL): Remove.
2542 (get_bindings): Remove.
2543 (is_aggr_type_2): Remove.
2544 * call.c (resolved_scoped_fn_name): Remove support for
2546 * decl.c (grokfndecl): Likewise.
2547 (grokdeclarator): Likewise.
2548 * error.c (dump_decl): Likewise.
2549 (dump_expr): Likewise.
2550 * friend.c (do_friend): Likewise.
2551 * init.c (build_offset_ref): Likewise.
2552 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2554 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2555 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2557 * pt.c (get_bindings): Give it internal linkage.
2558 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2559 (lookup_template_function): Likewise.
2560 (for_each_tempalte_parm_r): Likewise.
2561 (tsubst_decl): Likewise.
2562 (tsubst_qualified_id): Handle template template parameters.
2563 (tsubst_copy): Remove support for LOOKUP_EXPR.
2564 (tsubst_copy_and_build): Likewise.
2565 (most_general_template): Likewise.
2566 (value_dependent_expression_p): Likewise.
2567 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2569 * semantics.c (perform_koenig_lookup): Do not create
2571 (finish_fname): Likewise.
2572 (finish_id_expression): Likewise.
2573 * tree.c (is_aggr_type_2): Remove.
2575 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2578 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2580 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2583 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2586 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2589 * pt.c (dependent_scope_ref_p): New function.
2590 (value_dependent_expression_p): Use it.
2591 (type_dependent_expression_p): Likewise.
2593 * pt.c (tsubst_friend_function): Use reregister_specialization.
2596 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2597 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2598 call to is_aggr_type.
2599 * parser.c (cp_parser_lookup_name): Adjust call to
2600 lookup_qualified_name.
2601 * pt.c (tsubst_qualified_id): Likewise.
2602 (tsubst_copy_and_build): Likewise.
2603 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2606 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2609 * call.c (op_error): Properly format REALPART_EXPR and
2611 * error.c (dump_expr): Likewise.
2613 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2615 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2617 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2620 * call.c (initialize_reference): Improve diagnostic.
2622 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2625 * pt.c (more_specialized_class): Add full_args parameter.
2626 (most_specialized_class): Adjust calls to more_specialized_class.
2627 * cp-tree.h (more_specialized_class): Adjust declaration.
2629 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2631 * lex.c (enum tree_node_kind): Delete.
2633 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2636 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2637 (SET_DECL_SELF_REFERENCE_P): Likewise.
2638 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2639 * pt.c (tsubst_decl): Copy it.
2640 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2642 * pt.c (reregister_specialization): Fix thinko in previous change.
2644 * cp-tree.h (cp_id_kind): New type.
2645 (unqualified_name_lookup_error): Change prototype.
2646 (unqualified_fn_lookup_error): New function.
2647 (do_identifier): Remove.
2648 (do_scoped_id): Likewise.
2649 (tsubst_copy_and_build): Change prototype.
2650 (reregister_specialization): New function.
2651 (perform_koenig_lookup): Likewise.
2652 (finish_id_expression): Likewise.
2653 * call.c (build_method_call): Adjust call to
2654 unqualified_name_lookup_error.
2655 * decl.c (duplicate_decls): Use reregister_specialization.
2656 * lex.c (is_global): Remove.
2657 (unqualified_name_lookup_error): Return a value.
2658 (do_identifier): Remove.
2659 (do_scoped_id): Likewise.
2660 (identifier_typedecl_value): Remove.
2661 (unqualified_fn_lookup_error): New function.
2662 * parser.c (cp_parser_id_kind): Remove.
2663 (cp_parser_non_constant_id_expression): Remove.
2664 (cp_parser_primary_expression): Use finish_id_expression.
2665 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2667 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2668 (cp_parser_template_argument): Use cp_id_kind.
2669 (cp_parser_fold_non_dependent_expr): Adjust call to
2670 tsubst_copy_and_build.
2671 * pt.c (unregister_specialization): Rename to ...
2672 (reregister_specialization): This.
2673 (tsubst_friend_function): Use it.
2674 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2675 (tsubst_qualified_id): Likewise.
2676 (tsubst_expr): Likewise.
2677 (tsubst_copy_and_build): Add function_p parameter. Use
2678 finish_id_expression. Introduce RECUR macro.
2679 (tsubst_non_call_postfix_expression): New function.
2680 (regenerate_decl_from_template): Use reregister_specialization.
2681 * semantics.c (perform_koenig_lookup): New function.
2682 (finish_id_expression): Likewise.
2684 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2686 * pt.c (push_access_scope_real): Remove.
2687 (push_access_scope): Move code from push_access_scope_real.
2688 (pop_access_scope): Don't check for TEMPLATE_DECL.
2689 (instantiate_template): Defer access checking during template
2691 (regenerate_decl_from_template): Tidy.
2693 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2696 * operators.def: Add definitions for __imag__, __real__.
2698 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2701 * parser.c (cp_parser_expression_list): Rename to ...
2702 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2703 parameter, parse the surounding parentheses.
2704 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2705 parameters. Return int.
2706 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2707 (cp_parser_postfix_expression): Adjust function call parsing.
2708 (cp_parser_new_placement): Adjust.
2709 (cp_parser_new_initializer): Likewise.
2710 (cp_parser_cast_expression): Likewise.
2711 (cp_parser_selection_statement): Likewise.
2712 (cp_parser_mem_initializer): Likewise.
2713 (cp_parser_asm_definition): Likewise.
2714 (cp_parser_init_declarator): Likewise.
2715 (cp_parser_declarator): Make
2716 cdtor_or_conv_p an int ptr.
2717 (cp_parser_direct_declarator): Likewise. Check for a parameter
2718 list on cdtors & conv functions.
2719 (cp_parser_initializer): Adjust.
2720 (cp_parser_member_declaration): Adjust.
2721 (cp_parser_attribute_list): Move code into
2722 cp_parser_parens_expression_list.
2723 (cp_parser_functional_cast): Adjust.
2724 * pt.c (type_dependent_expression_p): Erroneous expressions are
2727 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2729 * decl.c (cp_finish_decl): Handle 'used' attribute.
2731 * cp-lang.c (c_reset_state): New dummy routine.
2732 * cp-tree.h (finish_file): Move prototype to c-common.h.
2733 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2735 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2738 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2740 (type_dependent_expression_p): Likewise.
2742 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2744 * typeck.c (build_binary_op): Do not warn about signed
2745 vs. unsigned comparisons in the bodies of templates.
2748 * parser.c (cp_parser_postfix_expression): Check dependency of
2751 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2754 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2758 * error.c (decl_to_string): Do not print default argument
2761 * cp-tree.h (break_out_calls): Remove declaration.
2762 * tree.c (break_out_calls): Remove.
2763 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2765 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2768 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2769 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2771 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2773 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2775 * typeck.c (build_x_unary_op): Take note of the fact that
2776 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2779 * parser.c (cp_parser_primary_expression): Preserve the form of
2780 qualified expressions in templates, even if they are not
2782 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2783 (tsubst_qualified_id): Likewise.
2784 * search.c (accessible_p): Treat everything in the body of a
2785 template as accessible.
2787 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2789 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2790 * cp-tree.h (build_call_from_tree): Remove.
2791 (build_member_call): Likewise.
2792 (dependent_template_arg_p): Remove.
2793 (any_dependent_template_arguments_p): New function.
2794 (dependent_template_id_p): Likewise.
2795 (any_type_dependent_arguments_p): Likewise.
2796 (build_non_dependent_expr): Likewise.
2797 (build_non_dependent_args): Likewise.
2798 (build_x_compound_expr): Adjust prototype.
2799 * call.c (build_new_method_call): Handle non-dependent expressions
2801 * decl2.c (grok_array_decl): Likewise.
2802 (build_offset_ref_call_from_tree): Likewise.
2803 (build_call_from_tree): Remove.
2804 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2805 (dump_expr): Likewise.
2806 * init.c (build_member_call): Remove.
2807 * mangle.c (write_expression): Update handling for template-ids.
2808 * parser.c (cp_parser_primary_expression): Use
2809 any_dependent_template_arguments_p. Update constant-expression
2811 (cp_parser_postfix_expression): Use
2812 any_type_dependent_arguments_p. Simplify call processing.
2813 (cp_parser_unary_expression): Simplify.
2814 (cp_parser_expression): Adjust for changes to
2815 build_x_compound_expr.
2816 (cp_parser_template_argument): Implement standard-conforming
2817 parsing of non-type template arguments.
2818 (cp_parser_direct_declarator): Use
2819 cp_parser_fold_non_dependent_expr.
2820 (cp_parser_fold_non_dependent_expr): New function.
2821 (cp_parser_next_token_ends_template_argument_p): Likewise.
2822 * pt.c (convert_template_argument): Do not call
2823 maybe_fold_nontype_arg.
2824 (tsubst_baselink): Likewise.
2825 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2826 processing work correctly for non-dependent expressions. Adjust
2827 handling of COMPOUND_EXPR. Simplify call processing.
2828 (value_dependent_expression_p): Deal with functional casts and
2829 sizeof/alignof correctly.
2830 (type_dependent_expression_p): Handle overloaded functions.
2831 (any_type_dependent_arguments_p): New function.
2832 (any_dependent_template_arguments_p): Likewise.
2833 (dependent_template_p): Treat SCOPE_REFs as dependent.
2834 (dependent_template_id_p): Simplify.
2835 (build_non_dependent_expr): New function.
2836 (build_non_dependent_args): Likewise.
2837 * semantics.c (finish_stmt_expr): Don't make dependent
2838 statement-expresions have void type.
2839 (finish_call_expr): Handle non-dependent expressions
2841 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2842 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2843 type size_t, even in templates.
2844 (expr_sizeof): Likewise.
2845 (finish_class_member_access_expr): Handle non-dependent expressions
2847 (build_x_indirect_ref): Likewise.
2848 (build_x_binary_op): Likewise.
2849 (build_x_unary_op): Likewise.
2850 (build_x_conditional_expr): Likewise.
2851 (build_x_compound_expr): Likewise.
2852 * typeck2.c (build_x_arrow): Likewise.
2854 2003-07-09 Jan Hubicka <jh@suse.cz>
2856 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2857 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2858 (start_function): Use DECL_ESTIMATED_INSNS.
2859 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2861 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2864 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2867 * pt.c (instantiate_class_template): Don't call xref_tag to
2868 inject name when the friend class is a specialization.
2870 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2872 * cp-tree.h (build_scoped_method_call): Remove.
2873 (lookup_qualified_name): Remove parameter.
2874 (tsubst_copy_and_build): Declare.
2875 (finish_qualified_object_call_expr): Remove.
2876 (check_accessibility_of_qualified_id): New function.
2877 (finish_qualified_id_expr): Likewise.
2878 (non_reference): Likewise.
2879 (build_expr_from-tree): Remove.
2880 * call.c (non_reference): Remove.
2881 (build_scoped_method_call): Likewise.
2882 (build_method_call): Use error_operand_p. Assert that we are not
2883 processing a template.
2884 (standard_conversion): Use non_reference.
2885 * class.c (build_vtbl_entry_ref): Likewise.
2886 (build_vtbl_ref_1): Likewise.
2887 * cvt.c (build_expr_type_conversion): Use non_reference.
2888 * decl.c (lookup_qualified_name): Remove flags parameter.
2889 (grok_op_properties): Use non_reference.
2890 * decl2.c (grok_array_decl): Likewise.
2891 (build_expr_from_tree): Remove.
2892 (build_offset_ref_call_from_tree): Update comment.
2893 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2894 * except.c (prepare_eh_types): Use non_reference.
2895 (can_convert_eh): Likewise.
2896 * init.c (build_dtor_call): Avoid using build_method_call.
2897 * mangle.c (write_template_param): Remove misleading comment.
2898 * method.c (locate_copy): Use non_reference.
2899 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2900 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2901 non-dependent contexts.
2902 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2903 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2904 build_expr_from_tree.
2905 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2906 Use check_accessibility_of_qualified_id.
2907 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2908 build_expr_from_tree.
2909 (tsubst_baselink): New function.
2910 (tsubst_qualified_id): Likewise.
2911 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2912 (tsubst_expr): Adjust call to lookup_qualified_name.
2913 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2914 handling of CALL_EXPRs.
2915 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2916 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2917 * search.c (check_final_overrider): Likewise.
2918 * semantics.c (check_accessibility_of_qualified_id): New function.
2919 (finish_qualified_object_call_expr): Remove.
2920 * typeck.c (target_type): Use non_reference.
2921 (cxx_sizeof_or_alignof_type): Likewise.
2922 (dubious_conversion_warnings): Likewise.
2923 (convert_for_initialization): Likewise.
2924 (non_reference): New function.
2926 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2928 * decl.c (print_binding_level, print_other_binding_stack,
2929 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2931 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2933 2003-07-07 Andreas Jaeger <aj@suse.de>
2935 * friend.c: Convert to ISO C90 prototypes.
2937 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2939 * cfns.h: Regenerate.
2941 * typeck.c: Convert remaining prototypes to ISO C90.
2942 * search.c: Likewise.
2944 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2945 * semantics.c (expand_or_defer_fn): Likewise
2946 * mangle.c (discriminator_for_string_literal): Likewise.
2947 * g++spec.c (lang_specific_driver): Likewise.
2949 * search.c (lookup_base_r): Remove unused variable.
2951 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2953 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2956 2003-07-07 Andreas Jaeger <aj@suse.de>
2958 * search.c (lookup_base_r): Remove unused variable.
2960 2003-07-06 Michael Chastain <mec@shout.net>
2963 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2964 assigning to input_filename directly.
2966 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2968 * call.c: Fix comment formatting.
2969 * class.c: Likewise.
2970 * cp-tree.h: Likewise.
2972 * decl2.c: Likewise.
2973 * error.c: Likewise.
2974 * method.c: Likewise.
2975 * name-lookup.c: Likewise.
2976 * parser.c: Likewise.
2979 * search.c: Likewise.
2980 * typeck.c: Likewise.
2982 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2985 * search.c (lookup_base_r): Remove is_non_public and
2986 within_current_scope parameters. Remove other dead code.
2987 (lookup_base): Adjust call to lookup_base_r.
2988 (adjust_result_of_qualified_name_lookup): Improve comment.
2989 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2991 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2993 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2994 LANG_HOOKS_MISSING_ARGUMENT): Override.
2996 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2999 * typeck.c (build_static_cast): Check for reference conversions
3002 2003-07-04 Mark Mitchell <mark@codesourcery.com>
3004 * cp-tree.h (perform_integral_promotions): Declare.
3005 * call.c (build_addr_func): Use decay_conversion.
3006 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
3007 (convert_for_arg_passing): Use perform_integral_promotions.
3008 * cvt.c (build_expr_type_conversion): Use decay_conversion.
3009 (type_promotes_to): Do not return a cv-qualified type.
3010 * decl.c (grok_reference_init): Fix formatting.
3011 (get_atexit_node): Use decay_conversion.
3012 (build_enumerator): Use perform_integral_promotions.
3013 * init.c (build_vec_init): Use decay_conversion.
3014 * semantics.c (finish_expr_stmt): Likewise.
3015 (finish_switch_cond): Use perform_integral_promotions.
3016 * typeck.c (default_conversion): Likewise.
3017 (perform_integral_promotions): New function.
3018 (build_indirect_ref): Use decay_conversion.
3019 (build_array_ref): Use perform_integral_promotions.
3020 (convert_arguments): Use decay_conversion.
3021 (build_unary_op): Use perform_integral_promotions.
3022 (build_c_cast): Use decay_conversion.
3023 (build_modify_expr): Likewise.
3024 (convert_for_initialization): Likewise.
3025 * typeck2.c (build_x_arrow): Likewise.
3027 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
3029 * call.c: Fix comment typos.
3030 * class.c: Likewise.
3031 * cp-tree.h: Likewise.
3033 * decl2.c: Likewise.
3036 * mangle.c: Likewise.
3037 * parser.c: Likewise.
3039 * search.c: Likewise.
3040 * semantics.c: Likewise.
3042 * typeck.c: Likewise.
3044 2003-07-04 Zack Weinberg <zack@codesourcery.com>
3046 * parser.c (cp_lexer_read_token): No need to handle string
3047 constant concatenation.
3049 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3051 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
3052 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
3053 ATTRIBUTE_GCC_CXXDIAG.
3055 2003-07-03 Mark Mitchell <mark@codesourcery.com>
3057 * call.c (build_addr_func): Handle bound pointers-to-members.
3058 (build_method_call): Do not call resolve_offset_ref.
3059 (implicit_conversion): Likewise.
3060 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3062 (resolve_args): Do not call resolve_offset_ref.
3063 (build_conditional_expr): Likewise.
3064 (build_new_method_call): Likewise.
3065 * cp-tree.def (OFFSET_REF): Update documentation.
3066 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3067 pointers to members to pointers.
3068 (ocp_convert): Do not call resolve_offset_ref.
3069 (convert_to_void): Likewise.
3070 (build_expr_type_conversion): Likewise.
3071 * decl2.c (delete_sanity): Likewise.
3072 * init.c (resolve_offset_ref): Simplify greatly.
3073 (build_vec_delete): Do not call resolve_offset_ref.
3074 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3076 (cp_parser_unary_expression): Use
3077 cp_parser_simple_cast_expression.
3078 (cp_parser_delete_expression): Likewise.
3079 (cp_parser_cast_expression): Likewise.
3080 (cp_parser_pm_expression): Use cp_parser_binary_op.
3081 (cp_parser_simple_cast_expression): New function.
3082 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3083 * semantics.c (finish_increment_expr): Likewise.
3084 (finish_typeof): Likewise.
3085 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3086 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3087 (decay_conversion): Do not call resolve_offset_ref.
3088 (finish_class_member_access_expr): Likewise.
3089 (convert_arguments): Likewise.
3090 (build_x_binary_op): Handle DOTSTAR_EXPR.
3091 (condition_conversion): Do not call resolve_offset_ref.
3092 (unary_complex_lvalue): Likewise.
3093 (build_static_cast): Likewise.
3094 (build_reinterpret_cast): Likewise.
3095 (build_const_cast): Likewise.
3096 (build_c_cast): Likewise.
3097 (build_modify_expr): Likewise.
3098 (convert_for_assignment): Likewise.
3099 (convert_for_initialization): Likewise.
3100 * typeck2.c (build_x_arrow): Likewise.
3101 (build_m_component_ref): Simplify.
3103 * call.c (build_scoped_method_call): Use convert_to_void.
3104 (build_method_call): Likewise.
3105 * class.c (check_field_decls): Remove dead code.
3106 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3107 * decl2.c (grok_array_decl): Remove dead code.
3108 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3109 as pointer-to-member representation.
3110 * init.c (build_offset_ref): Tidy.
3111 (build_vec_delete_1): Use convert_to_void.
3112 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3113 as pointer-to-member representation.
3115 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3118 * decl.c (grokdeclarator): Return friend decls, not
3120 * decl2.c (grokfield): Alter friend decl check.
3121 * parser.c (struct cp_parser): Document default_arg chain on
3122 unparsed_functions_queue.
3123 (cp_parser_save_default_args): New.
3124 (cp_parser_init_declarator, cp_parser_function_definition,
3125 cp_parser_member_declaration): Call it.
3126 (cp_parser_class_specifier): Remove unused variable. Alter
3127 processing of unparsed_functions_queue.
3129 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3131 * class.c (add_method, check_field_decl): Fix format specifier.
3132 * decl.c (duplicate_decls, pushdecl, check_goto,
3133 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3134 start_enum): Likewise.
3135 * decl2.c (ambiguous_decl): Likewise.
3136 * pt.c (redeclare_class_template): Likewise.
3138 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3141 * pt.c (type_unification_real): Don't unify exprs of error type.
3142 * tree.c (error_type): Don't die on error_type.
3145 * decl2.c (arg_assoc_class): Don't die on NULL type.
3146 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3148 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3151 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3154 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3156 * error.c (locate_error): %P takes an `int', not a `tree'.
3158 2003-07-02 Jan Hubicka <jh@suse.cz>
3160 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3161 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3162 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3165 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3166 (expand_or_defer_fn): Declare.
3167 (lower_function): Declare.
3168 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3169 * decl2.c: Include cgraph.h and varpool.h
3170 (maybe_emit_vtables): Make explicit instantations as needed.
3171 (mark_member_pointers, lower_function): New functions.
3172 (finish_file): Do unit-at-a-time.
3173 * method.c (synthesize_method): Use expand_or_defer_fn.
3174 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3175 * parser.c (cp_parser_function_definition_after_decl): Use
3177 * pt.c (instantiate_decl): Likewise.
3178 * semantics.c: Include cgraph.h
3179 (expand_or_defer_fn): Break out from ...
3180 (expand_body): ... here; deal with unit-at-a-time.
3181 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3182 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3184 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3186 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3189 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3192 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3195 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3198 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3199 pseudo destructor calls.
3201 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3203 * cp-tree.h (define_label): Replace filename and lineno
3204 arguments with a location_t.
3205 * decl.c (pop_label): Adjust define_label call.
3206 (define_label): Replace filename and lineno arguments with a
3208 * semantics.c (finish_label): Adjust define_label call.
3210 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3213 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3216 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3218 * Make-lang.in: Update.
3219 * cp-lang.c (c_language): Define.
3220 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3221 * cp-tree.h (cxx_init_options): Remove.
3222 * lex.c: Don't include diagnostic.h.
3223 (cxx_init_options): Remove.
3225 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3228 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3229 tree generated within a template. Use dump_expr to dump an
3232 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3234 * mangle.c (write_expression): Exit gracefully when trying to
3237 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3240 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3241 (value- or type-) dependent expression as DECL_INITIAL is a
3242 valid constant-expression (at parser time).
3244 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3247 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3248 USING_DECL, instead of print_tree_identifier.
3250 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3252 * cp-tree.h (language_to_string): Adjust declaration.
3253 * dump.c (cp_dump_tree): Adjust usage.
3254 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3255 (parm_to_string): Lose unused parameter. Tidy.
3256 (expr_to_string): Likewise.
3257 (code_to_string): Likewise.
3258 (language_to_string): Likewise.
3259 (op_to_string): Likewise.
3260 (assop_to_string): Likewise.
3261 (digit_buffer): Remove.
3262 (dump_type): Format builtin vector type as __vector__.
3264 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3266 * error.c (print_integer): Remove.
3267 (dump_type_suffix): Adjust.
3268 (dump_expr): Likewise.
3270 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3272 * error.c (print_instantiation_partial_context): Take a
3274 (print_instantiation_full_context): Adjust.
3275 (print_instantiation_context): Adjust.
3277 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3278 * error.c (cp_line_of, cp_file_of): Merge into ...
3279 (location_of): ... here. Make static, return a location_t.
3280 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3282 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3285 * call.c (joust): Move warn_conversion check outwards.
3287 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3289 * decl.c (build_typename_type)
3290 * mangle.c (write_template_template_arg)
3291 * parser.c (cp_parser_scope_through_which_access_occurs)
3292 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3293 * repo.c (get_base_filename)
3294 * semantics.c (maybe_convert_cond):
3295 Mark the definition static, matching the forward declaration.
3297 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3300 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3302 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3305 * decl.c (finish_enum): Implement DR377.
3307 * decl.c (cp_finish_decl): Don't make variables with reference
3308 type readonly while they are being initialized.
3310 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3313 * typeck.c (build_static_cast): Avoid returning expressions with
3316 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3318 * call.c (build_op_delete_call): Use strip_array_call. Correct
3319 error message to say 'delete' or 'delete[]'.
3321 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3324 * pt.c (check_explicit_specialization): When looking up a
3325 template function from an identifier outside class-scope, bind
3326 it to CP_DECL_CONTEXT.
3328 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3331 * search.c (lookup_base_r): Rely on accessible_p, rather than
3332 trying to emulate that logic here.
3335 * call.c (convert_like): Pass issue_conversion_warnings.
3336 (convert_like_with_context): Likewise.
3337 (convert_like_real): Add issue_conversion_warnings parameter.
3338 (perform_direct_initialization_if_possible): New function.
3339 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3340 * typeck.c (check_for_casting_away_constness): New function.
3341 (build_static_cast): Rewrite.
3343 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3345 * call.c (enforce_access): Assert we get a binfo.
3346 (build_op_delete_call): Pass a binfo to
3347 perform_or_defer_access_check.
3348 * class.c (alter_access): Likewise.
3349 * decl.c (make_typename_type): Likewise.
3350 (make_unbound_class_template): Likewise.
3351 * lex.c (do_identifier): Likewise.
3352 * method.c (hack_identifier): Likewise.
3353 * parser.c (cp_parser_lookup_name): Likewise.
3354 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3356 * semantics.c (finish_non_static_data_member): Likewise.
3357 (perform_or_defer_access_check): Expect a binfo.
3358 * typeck.c (comptypes): Expect types.
3360 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3361 * friend.c (make_friend_class): Likewise.
3362 * pt.c (check_default_tmpl_args): Likewise.
3363 (lookup_template_class): Likewise.
3365 2003-06-24 Jan Hubicka <jh@suse.cz>
3367 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3370 2003-06-24 Jan Hubicka <jh@suse.cz>
3372 * class.c (build_vtable): Make vtables.
3373 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3374 * decl2.c (output_vtable_inherit): Rename to ...
3375 (prepare_assemble_variable): ... this one; change interface.
3376 (maybe_emit_vtables): Do not call output_vtable_inherit.
3377 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3378 * cp-tree.h (prepare_assemble_variable): New.
3380 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3382 * method.c: add prototype for make_alias_for_thunk.
3383 (thunk_labelno, make_alias_for_thunk): only define
3384 if ASM_OUTPUT_DEF is defined.
3386 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3388 * method.c (thunk_labelno): New variable.
3389 (make_alias_for_thunk): New function.
3390 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3391 into the same section as the function it is calling.
3392 Include gt-cp-method.h.
3393 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3394 (cp/method.o): Depend on gt-cp-method.h.
3395 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3397 2003-06-23 Jan Hubicka <jh@suse.cz>
3399 * decl.c (register_dtor_fn): Mark cleanup as used.
3400 * decl2.c (mark_vtable_entries): Skip nops.
3401 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3402 (build_dynamic_cast_1): Likewise.
3403 (tinfo_base_init): Likewise.
3404 (emit_tinfo_decl): Likewise.
3406 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3408 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3411 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3414 * call.c (joust): Warn about choosing conversion sequence only if
3417 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3420 * call.c (op_error): Tidy.
3421 * error.c (dump_expr): Properly format 'T()' when T is an
3424 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3427 * decl.c (grok_op_properties): Warn possible confusing conversion
3428 only if -Wconversion.
3430 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3433 * parser.c (cp_parser_class_head): See through dependent names
3434 when parsing a class-head.
3437 * pt.c (try_class_unification): Correct handling of member class
3440 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3442 * semantics.c (genrtl_finish_function): Adjust
3443 expand_function_end call.
3445 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3448 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3450 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3453 * cp-tree.h (pushdecl_class_level): Change prototype.
3454 (push_class_level_binding): Likewise.
3455 * decl.c (add_binding): Reject duplicate static data members.
3456 (pushdecl_class_level): Return a value indicating whether or not
3457 the binding was valid.
3458 (push_class_level_binding): Likewise.
3459 * semantics.c (finish_member_declaration): Don't keep invalid
3463 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3464 temporary variables.
3465 * cp-tree.h (static_aggregates): Declare.
3466 (pushdecl_top_level_and_finish): Likewise.
3467 * decl.c (pushdecl_top_level_1): New function.
3468 (pushdecl_top_level): Use it.
3469 (pushdecl_top_level_and_finish): New function.
3470 (initialize_local_var): Remove redundant code.
3471 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3473 * decl.h (static_aggregates): Remove.
3474 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3475 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3476 (tinfo_base_init): Likewise.
3478 2003-06-19 Matt Austern <austern@apple.com>
3481 * init.c (build_zero_init): Assert that number of array elements
3482 is an integer constant.
3483 (build_default_init) Don't use build_zero_init for arrays with
3484 variable number of elements.
3486 2003-06-19 Andreas Jaeger <aj@suse.de>
3488 * cp-tree.h: Remove duplicated declarations.
3490 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3492 * pt.c: Convert to ISO C.
3493 * semantics.c: Convert to ISO C.
3495 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3497 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3498 at_least_as_qualified_p, more_qualified_p): Return bool.
3499 * typeck.c: ANSIFY function definitions.
3500 (comp_array_types): Take redeclaration bool parameter.
3501 (comptypes): Rearrange STRICT handling.
3502 (at_least_as_qualified_p, more_qualified_p,
3503 comp_cv_qualification): Cache cv quals.
3504 (compparms): Rearrange loop.
3506 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3508 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3509 (COMPARE_DERIVED): ... here. Adjust comment.
3510 (resolve_typename_type_in_current_instantiation): Remove.
3511 (cp_tree_equal, comptypes): Return a bool.
3512 * cvt.c (convert_to_reference): Adjust comptypes call.
3513 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3514 (resolve_typename_type_in_current_instantiation): Remove.
3515 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3516 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3517 calls. Refactor code.
3518 * typeck.c (comp_array_types): Return bool. Lose callback.
3519 parameter. Adjust cp_tree_equal calls.
3520 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3521 enumeration and java type handling. Deal with typename types here.
3522 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3524 (comp_target_types): Remove unreachable code. Adjust
3525 same_or_base_type_p calls.
3526 (ptr_reasonably_similar): Adjust base and derived check.
3528 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3530 (check_return_expr): Adjust error messages.
3531 * cp-tree.def (SCOPE_REF): Correct comment.
3533 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3535 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3538 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3540 * optimize.c (dump_function): Form complete flag name by
3541 prefixing 'fdump-' to string returned by dump_flag_name().
3543 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3545 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3548 2003-06-17 Jason Merrill <jason@redhat.com>
3551 * decl.c (grokfndecl): Don't mark a function inline for
3552 -finline-functions if it isn't defined.
3554 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3557 * class.c (handle_using_decl): Robustify.
3560 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3561 * mangle.c (struct globals): Remove internal_mangling_p.
3562 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3563 (write_template_parm): Don't write out the level number.
3564 (conv_type_names): New variable.
3565 (hash_type): New function.
3566 (compare_type): Likewise.
3567 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3569 * search.c (lookup_conversion_operator): New function.
3570 (lookup_fnfields_1): Use it.
3572 2003-06-17 Andreas Jaeger <aj@suse.de>
3574 * except.c: Remove duplicate declaration of push_eh_cleanup.
3576 * call.c: Remove extra declaration of inhibit_warnings.
3578 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3580 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3581 * mangle.c: Convert to ISO C.
3583 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3585 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3588 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3590 * tree.c: Convert to ISO C.
3592 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3594 * cp-tree.h: Follow spelling conventions.
3595 * mangle.c: Likewise.
3596 * method.c: Likewise.
3597 * parser.c: Likewise.
3599 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3601 * decl.c (start_function): Adjust init_function_start call.
3602 * method.c (use_thunk): Likewise.
3603 * semantics.c (genrtl_start_function): Likewise.
3605 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3607 * Make-lang.in: Remove c-options.o.
3609 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3611 * lex.c: Convert to ISO C.
3613 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3614 * init.c: removes use of PARAMS macro. Use ISO style function
3615 declarations. (Not copyright-significant change.)
3617 * rtti.c: Remove PARAMS.
3619 * typeck2.c: Convert to ISO C.
3621 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3624 * typeck.c (build_c_cast): Check that the destination type is
3627 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3630 * cp-tree.h (finish_declarator): Remove.
3631 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3632 erroneous declarations.
3633 * semantics.c (finish_declarator): Remove.
3635 2003-06-11 Roger Sayle <roger@eyesopen.com>
3637 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3638 global static constructor/destructor if it will be empty, i.e.
3639 either doesn't call any ctors/dtors or only calls pure or const
3642 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3644 * mangle.c (tm_p.h): Include it.
3645 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3648 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3651 2003-06-10 Jason Merrill <jason@redhat.com>
3654 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3656 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3658 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3659 (start_cleanup_cnt): New.
3661 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3664 * cp-tree.h (template_for_substitution): Declare.
3665 * decl2.c (mark_used): Use it when figuring out whether or not a
3667 * pt.c (template_for_substitution): Give it external linkage.
3668 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3671 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3674 * mangle.c (write_real_cst): New function. Implement
3675 ABI-compliant mangling of floating-point literals when
3676 -fabi-version>=2; provide backward compatibility with 3.3 when
3677 -fabi-version=1 (with warning). Clarify commentary.
3678 (write_template_arg_literal): Use write_real_cst.
3680 2003-06-07 Andreas Jaeger <aj@suse.de>
3682 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3684 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3686 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3687 (LANG_HOOKS_HANDLE_OPTION): Override.
3688 * cp-tree.h (cxx_init_options): Update.
3689 * lex.c (cxx_init_options): Update.
3691 2003-06-05 Jan Hubicka <jh@suse.cz>
3693 * Make-lang.in: Add support for stageprofile and stagefeedback
3695 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3697 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3699 2003-06-04 Andreas Jaeger <aj@suse.de>
3701 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3703 2003-06-03 Jason Merrill <jason@redhat.com>
3705 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3707 * cp/decl.c (reshape_init): Handle vectors.
3709 * testsuite/g++.dg/init/array10.C: New.
3711 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3714 * pt.c (check_explicit_specialization): Check for 'static'
3717 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3719 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3720 the operand of a CONSTRUCTOR node.
3722 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3724 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3725 (cxx_scope_descriptor): New function.
3726 (cxx_scope_debug): Likewise.
3727 (push_binding_level): Use it.
3728 (pop_binding_level): Likewise.
3729 (suspend_binding_level): Likewise.
3730 (resume_binding_level): Likewise.
3731 (pushlevel_class): Adjust use of this_class.
3732 (pushtag): Likewise.
3733 (lookup_name_real): Likewise.
3734 (global_scope_name): New variable.
3735 (initialize_predefined_identifiers): Initialize it.
3736 (push_namespace): Use it.
3737 (make_cxx_scope): New function.
3738 (pushlevel): Use it.
3739 (pushlevel_class): Likewise.
3740 (push_binding_level): Simplify. Loose the last two arguments.
3741 (make_binding_level): Remove.
3742 (initial_push__namespace_scope): New function.
3743 (push_namespace): Use it. Simplify.
3744 (cxx_init_decl_processing): Likewise.
3745 (declare_namespace_level): Remove.
3747 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3750 * pt.c (instantiate_decl): Don't use full template arguments if
3751 we are dealing with specializations.
3753 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3755 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3756 (binding_depth): Unconditionally define.
3757 (is_class_level): Likewise.
3758 (indent): Likewise. Take an indenting parameter.
3759 (push_binding_level): Remove conditional definittion.
3760 (pop_binding_level): Likewise.
3761 (suspend_binding_level): Likewise.
3762 (resume_binding_level): Likewise.
3763 (pushlevel): Likewise.
3764 (pushlevel_class): Likewise.
3765 (poplevel_class): Likewise.
3766 (pop_everything): Likewise.
3768 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3770 * name-lookup.h (global_scope_p): New macro.
3771 * decl.c (pop_binding_level): Use it. Don't refer directly to
3772 global_binding_level.
3773 (suspend_binding_level): Likewise.
3774 (global_bindings_p): Likewise.
3775 (print_other_binding_stack): Likewise.
3776 (print_binding_stack): Likewise.
3777 (maybe_push_to_top_level): Likewise.
3778 (pushdecl_namespace_level): Likewise.
3779 (cxx_init_decl_processing): Likewise.
3780 (start_decl): Likewise.
3781 (cp_finish_decl): Likewise.
3782 (start_function): Likewise.
3783 (global_binding_level): Remove.
3785 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3787 * parser.c (cp_parser_explicit_instantiation): Restore old
3788 access before template instantiation.
3790 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3792 * lang-specs.h: Use -o to specify preprocessor's output file.
3793 Make -no-integrated-cpp work when building PCH files.
3795 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3798 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3799 check for implicitly created typedef to an enum.
3801 2003-05-21 Jason Merrill <jason@redhat.com>
3803 * init.c (build_vec_delete): Copy the address into a temporary
3804 variable before calling build_vec_delete_1.
3805 * decl2.c (delete_sanity): Don't call stabilize_reference.
3807 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3809 * pt.c (register_specialization): Update the decl's location,
3811 (check_explicit_specialization): Likewise.
3813 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3815 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3817 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3820 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3821 if the old decl had instantiated DECL_RTL.
3822 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3824 2003-05-19 Matt Austern <austern@apple.com>
3826 * lang-options.h: Document -Wno-invalid-offsetof
3827 * typeck.c (build_class_member_access_expr): Don't complain about
3828 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3830 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3832 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3833 (binding_entry_make): Make entry->chain NULL after getting an entry.
3834 fix the spelling of chain in a comment.
3835 (binding_table_free): speed up by having temporary variable.
3836 (binding_table_new): set table->chain to be NULL after allocating
3838 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3839 binding->previous to NULL after getting an binding for speed.
3841 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3843 * cp-tree.h (struct lang_type_class): Replace data member tags
3844 with hash-table nested_udts.
3845 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3846 * class.c (unreverse_member_declarations): Don't touch
3848 (pushclass): Use cxx_remember_type_decls.
3849 * decl.c (struct cp_binding_level): Replace data member tags with
3850 hash-table type_decls.
3851 (pop_binding_level): Handle level->type_decls.
3852 (kept_level_p): Adjust.
3853 (poplevel): Remove unused local variable.
3854 (bt_print_entry): New function.
3855 (print_binding_level): Use it.
3856 (push_namespace): Build current_binding_level->type_decls.
3857 (maybe_process_template_type_declaration): Adjust.
3858 (pushtag): Likewise.
3859 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3861 (cxx_remember_type_decls): Rename from storetags. Adjust.
3862 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3863 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3864 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3865 (store_parm_decls): Remove pointless code.
3866 * name-lookup.c (free_binding_entry): New variable.
3867 (ENTRY_INDEX): New macro.
3868 (struct binding_table_s): New datatype.
3869 (binding_entry_make): New function.
3870 (binding_entry_free): Likewise.
3871 (binding_table_construct): Likewise.
3872 (binding_table_free): Likewise.
3873 (binding_table_new): Likewise.
3874 (binding_table_expand): Likewise.
3875 (binding_table_insert): Likewise.
3876 (binding_table_find): Likewise.
3877 (binding_table_find_anon_type): Likewise.
3878 (binding_table_reverse_maybe_remap): Likewise.
3879 (binding_table_remove_anonymous_types): Likewise.
3880 (binding_table_foreach): Likewise.
3881 * name-lookup.h (binding_table): New type.
3882 (binding_entry): Likewise.
3883 (bt_foreach_proc): Likewise.
3884 (struct binding_entry_s): New datatype.
3885 (SCOPE_DEFAULT_HT_SIZE): New macro.
3886 (CLASS_SCOPE_HT_SIZE): Likewise.
3887 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3888 (NAMESPACE_STD_HT_SIZE): Likewise.
3889 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3890 (binding_table_new): Declare.
3891 (binding_table_free): Likewise.
3892 (binding_table_insert): Likewise.
3893 (binding_table_find_anon_type): Likewise.
3894 (binding_table_reverse_maybe_remap): Likewise.
3895 (binding_table_remove_anonymous_types): Likewise.
3896 (binding_table_foreach): Likewise.
3897 (binding_table_find): Likewise.
3898 (cxx_remember_type_decls): Likewise.
3899 * pt.c (bt_instantiate_type_proc): New function.
3900 (do_type_instantiation): Use it.
3901 * search.c (lookup_field_r): Use binding_table_find.
3903 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3905 * semantics.c (perform_deferred_access_checks): Don't discard
3908 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3910 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3911 libiberty VA_ macros, always use stdarg.
3912 * rtti.c (create_pseudo_type_info): Likewise.
3913 * tree.c (build_min_nt, build_min): Likewise.
3915 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3917 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3918 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3919 collapse multiple function calls into one.
3920 * tree.c (debug_binfo): Likewise.
3922 2003-05-15 Jason Merrill <jason@redhat.com>
3925 * call.c (conditional_conversion): Don't consider implicit
3926 conversions if T2 is a base of T1.
3927 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3928 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3930 * parser.c (cp_parser_primary_expression): Convert a static data
3931 member from reference.
3933 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3935 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3936 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3937 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3938 (COMPARE_NO_ATTRIBUTES): Remove.
3939 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3942 * semantics.c (finish_typeof): Refine type-dependency check.
3944 2003-05-13 Jason Merrill <jason@redhat.com>
3946 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3947 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3949 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3951 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3953 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3955 PR c++/10230, c++/10481
3956 * semantics.c (finish_non_static_data_member): Handle when the
3957 non-static member is not from a base of the current class type.
3959 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3962 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3963 template and has dependent context.
3965 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3967 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3969 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3972 * cp-tree.h (saved_scope): Remove check_access field.
3973 (tsubst_flags_t): Remove tf_parsing.
3974 * decl.c (maybe_push_to_top_level): Don't initialize
3975 scope_chain->check_access.
3976 (make_typename_type, make_unbound_class_template): Don't use
3978 (register_dtor_fn): Use push/pop_deferring_access_checks
3979 instead of scope_chain->check_access.
3980 * method.c (use_thunk): Likewise.
3981 * parser.c (cp_parser_explicit_instantiation
3982 (cp_parser_constructor_declarator_p): Don't call
3983 push/pop_deferring_access_checks here.
3984 (cp_parser_template_argument, cp_parser_class_name): Don't use
3986 (yyparse): Check flag_access_control.
3987 * pt.c (instantiate_class_template): Call
3988 push/pop_deferring_access_checks.
3989 * semantics.c (push_deferring_access_checks): Propagate
3991 (perform_or_defer_access_check): Make sure basetype_path is
3992 a type before comparison.
3993 * call.c (build_op_delete_call, build_over_call): Use
3994 perform_or_defer_access_check.
3995 * class.c (alter_access): Likewise.
3996 * init.c (build_offset_ref): Likewise.
3997 * lex.c (do_identifier): Likewise.
3998 * method.c (hack_identifier): Likewise.
3999 * search.c (lookup_member): Likewise.
4000 * semantics.c (finish_non_static_data_member): Likewise.
4001 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
4002 instead of flag_access_control.
4004 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4007 * parser.c (cp_parser_class_name): Remove check_access parameter.
4008 All caller adjusted. Update declaration.
4009 (cp_parser_lookup_name): Likewise.
4010 * semantics.c (push_deferring_access_checks): Change parameter type
4011 to enum deferring_kind. All caller adjusted.
4012 (resume_deferring_access_checks): Adjust to use new enum.
4013 (stop_deferring_access_checks): Likewise.
4014 (perform_or_defer_access_check): Likewise.
4015 * cp-tree.h (deferring_kind): New enum.
4016 (deferred_access): Adjust field type.
4017 (push_deferring_access_checks): Update declaration.
4019 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4021 PR c++/10555, c++/10576
4022 * pt.c (lookup_template_class): Handle class template with
4023 multiple levels of parameters when one of the levels contain
4026 2003-05-08 Jason Merrill <jason@redhat.com>
4028 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
4029 expression. Undo some of the recent reorg.
4031 2003-05-07 Richard Henderson <rth@redhat.com>
4034 * cfns.gperf: Comment out POSIX thread cancellation points,
4035 plus abort and raise.
4036 * cfns.h: Regenerate.
4038 2003-05-07 Jason Merrill <jason@redhat.com>
4040 * call.c (build_conditional_expr): Don't assume that the folded
4041 expression has result_type.
4043 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4045 * typeck.c (build_unary_op): Deal with const qualifier in
4046 invalid pointer-to-member earlier.
4048 2003-05-05 Jason Merrill <jason@redhat.com>
4051 * call.c (conditional_conversion): Build an RVALUE_CONV if
4052 we're just changing the cv-quals.
4053 (build_conditional_expr): Don't call convert to change
4056 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4059 * typeck.c (build_unary_op): Don't output const qualifier when
4060 output invalid pointer-to-member diagnostics.
4062 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4064 * decl.c: Fix typos.
4066 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4069 * decl.c (start_function): Use same_type_p to check return type
4072 2003-05-03 Zack Weinberg <zack@codesourcery.com>
4075 * cp/typeck.c (build_x_compound_expr): No need to check
4076 extra_warnings as well as warn_unused_value.
4078 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4080 PR c++/9364, c++/10553, c++/10586
4081 * decl.c (make_typename_type): Don't crash on illegal code.
4083 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
4085 * class.c (finish_struct): Use location_t and input_location
4087 * decl.c (make_label_decl): Likewise.
4088 (use_label): Likewise.
4089 * decl2.c (warn_if_unknown_interface): Likewise.
4090 (start_static_initialization_or_destruction): Likewise.
4091 (generate_ctor_or_dtor_function): Likewise.
4092 (finish_file): Likewise.
4093 * error.c (print_instantiation_full_context): Likewise.
4094 * init.c (create_temporary_var): Likewise.
4095 * method.c (synthesize_method): Likewise.
4096 * parser.c (cp_token): Likewise.
4097 (cp_lexer_set_source_position_from_token): Likewise.
4098 (cp_lexer_get_preprocessor_token): Likewise.
4099 (cp_parser_statement): Likewise.
4100 * pt.c (tsubst_friend_function): Likewise.
4101 (instantiate_class_template): Likewise.
4102 (tsubst_decl): Likewise.
4104 (instantiate_decl): Likewise.
4105 * semantics.c (begin_class_definition): Likewise.
4106 (expand_body): Likewise.
4108 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
4110 * class.c (finish_struct): Rename lineno to input_line.
4111 * decl.c (push_binding_level, pop_binding_level,
4112 suspend_binding_level, resume_binding_level, make_label_decl,
4113 use_label, start_function): Likewise.
4114 * decl2.c (warn_if_unknown_interface,
4115 start_static_initialization_or_destruction,
4116 generate_ctor_or_dtor_function, finish_file): Likewise.
4117 * error.c (cp_line_of, print_instantiation_full_context,
4118 print_instantiation_context): Likewise.
4119 * except.c (check_handlers_1, check_handlers): Likewise.
4120 * init.c (create_temporary_var): Likewise.
4121 * method.c (use_thunk, synthesize_method): Likewise.
4122 * parser.c (cp_lexer_set_source_position_from_token,
4123 cp_lexer_get_preprocessor_token): Likewise.
4124 * pt.c (push_tinst_level, pop_tinst_level,
4125 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4126 tsubst, tsubst_expr, instantiate_decl): Likewise.
4127 * semantics.c (genrtl_try_block, finish_label_stmt,
4128 begin_class_definition, expand_body,
4129 genrtl_finish_function): Likewise.
4130 * tree.c (build_min_nt, build_min): Likewise.
4132 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4134 * decl2.c (comdat_linkage): Don't externalize explicit
4137 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4140 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4143 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4145 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4146 (struct lang_identifier): ... to here.
4147 (LANG_ID_FIELD): Remove.
4148 (SET_LANG_ID): Remove.
4149 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4150 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4151 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4152 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4153 (IDENTIFIER_ERROR_LOCUS): Likewise.
4154 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4156 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4159 * pt.c (convert_template_argument): Correct diagnostic.
4161 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4163 PR c++/9432, c++/9528
4164 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4166 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4168 * decl.c (check_previous_goto_1): Adjust prototype.
4169 (check_previous_goto): Adjust use.
4170 (check_switch_goto): Likewise.
4171 (use_label): Adjust.
4172 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4173 (struct named_label_use_list): Use location_t datatype.
4175 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4178 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4179 that have not yet been written out.
4181 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4184 * class.c (layout_class_type): Mark overlong bitfields as having
4185 the maximum size permitted by their type, after layout.
4188 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4190 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4192 * call.c (build_operator_new_call): Fix typo.
4193 * lang-options.h: Likewise.
4195 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4198 * cp-tree.h (lookup_field_1): Declare it.
4199 * search.c (lookup_field_1): Make it public.
4200 * decl.c (reshape_init): Handle designated initializers.
4202 * decl.c (maybe_commonize_var): Further tweak support for systems
4203 without weak symbols.
4205 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4207 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4209 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4212 * method.c (use_thunk): Decrement immediate_size_expand.
4215 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4216 (DECL_MAYBE_TEMPLATE): Remove.
4217 * class.c (fixed_type_or_null): Avoid infinite recursion.
4219 * decl.c (maybe_commonize_var): Make the code match the comments.
4220 * pt.c (instantiate_decl): Move call to import_export_decl.
4222 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4224 * decl2.c (finish_file): Fix merge botch.
4226 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4228 * decl2.c (finish_file): Don't call import_export_decl for
4229 functions that are not defined.
4230 (handle_class_head): Robustify.
4231 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4232 variables that are not defined.
4234 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4236 * call.c (print_z_candidates): Fix off by one error.
4238 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4241 * call.c (joust): Don't warn about conversion ops that are exact
4242 or cv-conversions. Rearrange to avoid multiple type comparisons.
4244 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4247 * call.c (build_cxx_call): Robustify.
4249 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4251 * Make-lang.in (lex.o): Remove mbchar.h.
4252 * lex.c (MULTIBYTE_CHARS): Lose.
4253 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4256 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4259 * cp-tree.h (duplicate_tag_error): Remove.
4260 * class.c (duplicate_tag_error): Remove.
4261 * semantics.c (begin_class_definition): Return immediately for a
4262 duplicate class definition.
4265 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4267 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4270 * search.c (lookup_fnfields_1): Handle empty slots in the method
4274 * decl.c (check_elaborated_type_specifier): New function, split
4276 (xref_tag): ... here. Use the new function in more places.
4278 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4280 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4282 * call.c (build_over_call): Use build_cxx_call.
4283 (build_cxx_call): New method, split out of build_over_call.
4284 * cp-tree.h (language_function): Add can_throw.
4285 (build_cxx_call): Declare it.
4286 * decl.c (finish_function): If a function does not contain any
4287 calls to functions that can throw an exception, indicate that
4289 * decl2.c (mark_used): Do not defer the instantiation of
4290 functions, if the current function does not throw.
4291 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4292 * pt.c (instantiate_decl): Make sure import_export_decl is called
4293 before emitting things.
4294 * rtti.c (throw_bad_cast): Use build_cxx_call.
4295 (build_dynamic_cast_1): Likewise.
4296 * typeck.c (build_function_call): Likewise.
4298 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4301 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4302 expressions. Reverts my 2002-08-08 patch.
4304 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4307 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4309 * cp/decl2.c (start_static_storage_duration_function): Take count
4310 arg, don't check if it wraps round.
4311 (generate_ctor_or_dtor_function): Add locus arg, use it.
4312 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4314 (finish_file): Set line numbers to past EOF for synthesized
4317 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4320 * search.c (lookup_field_1): Final scan goes backwards for
4321 types, forwards for non-types.
4323 2003-04-17 Roger Sayle <roger@eyesopen.com>
4326 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4327 "nothrow" function attributes.
4329 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4332 * pt.c (type_dependent_expression_p): Handle array new.
4334 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4337 * parser.c (cp_parser_primary_expression): Reorganize logic for
4338 dealing with name lookup failures.
4340 2003-04-15 Jason Merrill <jason@redhat.com>
4342 * decl2.c (mark_used): Don't instantiate anything if
4345 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4347 * tree.c (build_cplus_array_type_1): Do not call
4348 uses_template_parms() on a NULL index_type.
4350 2003-04-13 Roger Sayle <roger@eyesopen.com>
4352 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4354 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4357 * init.c (build_new_1): Reorganize.
4359 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4361 * class.c (initialize_array)
4362 * decl.c (reshape_init)
4363 * decl2.c (build_expr_from_tree)
4364 * init.c (build_zero_init)
4365 * pt.c (tsubst_copy, tsubst_copy_and_build)
4366 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4367 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4368 * semantics.c (finish_compound_literal)
4369 * typeck.c (build_ptrmemfunc1)
4370 * typeck2.c (store_init_value, process_init_constructor)
4371 (build_functional_cast): Use build_constructor.
4373 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4375 * call.c (print_z_candidates): Use gcc_gettext_width, not
4376 strlen, to determine how much padding to use.
4378 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4380 * decl.c: Update all calls to shadow_warning.
4382 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4384 * class.c (layout_class_type): Correct handling for overlong
4385 bit-fields whose width is the same as an integer type.
4387 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4389 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4390 * cp-lang.c (cp_tree_size): New function.
4391 (LANG_HOOKS_TREE_SIZE): Override.
4393 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4394 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4395 (union lang_tree_node): Remove common and srcloc members.
4396 (build_srcloc_here): Don't prototype.
4397 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4398 * pt.c (pending_templates): Correct comment.
4399 * tree.c (build_srcloc, build_srcloc_here): Kill.
4401 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4403 * call.c: Include intl.h.
4404 (print_z_candidate): Always use inform; get rid of errfn
4405 argument. Reorganize so that all the strings get picked up
4406 by xgettext. Note obligation of caller to pass first argument
4408 (print_z_candidates): Update to match. Indent second and
4409 successive candidates by strlen() of translated message.
4410 (joust): Restructure ambiguous-conversion pedwarn so that
4411 translators see a complete sentence. Update calls to
4414 * Make-lang.in (cp/call.o): Update dependencies.
4416 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4418 * decl.c (set_current_binding_level): Delete, revert last change.
4419 (current_binding_level): Modify to allow it as as lvalue.
4421 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4423 * name-lookup.c (find_binding): Pass appropriate pointer type to
4424 POP_TIMEVAR_AND_RETURN.
4426 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4428 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4429 * cp-tree.h: Don't insist on having GNUC.
4431 2003-04-03 Jason Merrill <jason@redhat.com>
4433 * cvt.c (ocp_convert): Only abort if we try to convert an object
4434 of TREE_ADDRESSABLE type.
4436 * class.c (build_vtable): Set DECL_ALIGN here.
4437 (get_vtable_decl): Not here.
4438 (layout_vtable_decl): Or here.
4439 (create_vtable_ptr): Or here.
4440 (layout_class_type): Or here.
4441 (check_bitfield_decl): Don't mess with field alignment.
4443 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4445 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4446 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4447 * rtti.c (dfs_class_hint_mark): Likewise.
4449 * decl.c (push_local_name, push_class_level_binding,
4450 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4451 functions returning void.
4452 * decl2.c (add_using_namespace): Likewise.
4454 * decl.c (print_binding_level, print_other_binding_stack,
4455 print_binding_stack): Cast argument of %p specifier to void*.
4456 * ptree.c (cxx_print_decl): Likewise.
4458 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4459 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4460 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4461 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4462 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4464 * decl.c (set_current_binding_level): New macro. Use throughout
4465 when setting the current binding level.
4467 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4469 * method.c (mangling_flags): Likewise.
4471 * cp-tree.h (lang_type_header): Add __extension__ and use
4472 CHAR_BITFIELD for members.
4474 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4477 * mangle.c: Include gt-cp-mangle.h.
4478 (subst_identifiers): Mark with GTY.
4479 * config-lang.in (gtfiles): Add cp/mangle.c.
4480 * Make-lang.in: (gt-cp-mangle.h): New rule.
4481 (cp/mangle.o): Depends on gt-cp-mangle.h.
4483 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4485 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4486 after \$(srcdir)/cp/name-lookup.h.
4487 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4488 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4489 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4490 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4492 2003-03-31 Jason Merrill <jason@redhat.com>
4495 * class.c (check_field_decl): Don't set DECL_ALIGN.
4497 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4500 * decl.c (grokdeclarator): Tidy, slightly.
4501 * search.c (lookup_field_1): Add want_type parameter.
4502 (lookup_field_r): Adjust call to lookup_field_1.
4504 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4506 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4508 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4510 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4512 (cxx_scope_find_binding_for_name): Likewise.
4513 * decl.c (find_binding: Move to name-lookup.c.
4514 (binding_for_name): Likewise.
4515 (cxx_scope_find_binding_for_name): Likewise.
4516 (BINDING_LEVEL): Remove.
4517 (push_binding): Tidy.
4518 (push_class_binding): Likewise.
4519 (pop_binding): Likewise.
4520 (poplevel): Likewise.
4521 (poplevel_class): Likewise.
4522 (set_identifier_type_value_with_scope): Likewise.
4523 (push_overloaded_decl): Likewise.
4524 (lookup_tag): Likewise.
4525 (unqualified_namespace_lookup): Likewise.
4526 (lookup_name_current_level): Likewise.
4527 (maybe_inject_for_scope_var): Likewise.
4528 (namespace_binding): Move to name-lookup.c.
4529 (set_namespace_binding): Likewise.
4530 * decl2.c (lookup_using_namespace): Tidy.
4531 (qualified_lookup_using_namespace): Likewise.
4532 (do_toplevel_using_decl): Likewise.
4533 * name-lookup.c: Include "timevar.h"
4534 * name-lookup.h (cxx_scope): Declare.
4535 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4537 (BINDING_SCOPE): Adjust definition.
4538 (BINDING_HAS_LEVEL_P): Remove.
4540 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4542 * name-lookup.c: New file.
4543 * name-lookup.h: Likewise..
4544 * decl.c (push_binding): Adjust use cxx_binding_make.
4545 (free_bindings): Move to name-lookup.c
4546 (pop_binding): Use cxx_binding_free.
4547 (binding_for_name): Tidy.
4548 * cp-tree.h: Include "name-lookup.h"
4549 (cxx_binding_make): Move to name-lookup.h
4550 (cxx_binding_clear): Likewise.
4551 (struct cxx_binding): Likewise.
4552 (LOCAL_BINDING_P): Likewise.
4553 (INHERITED_VALUE_BINDING_P): Likewise.
4554 (BINDING_SCOPE): Likewise.
4555 (BINDING_HAS_LEVEL_P): Likewise.
4556 (BINDING_VALUE): Likewise.
4557 (BINDING_TYPE): Likewise.
4558 * config-lang.in (gtfiles): Add cp/name-lookup.h
4559 * Make-lang.in (cp/name-lookup.o): New rule.
4560 (CXX_OBJS): Add cp/name-lookup.o
4561 (CXX_TREE_H): Add cp/name-lookup.h
4563 2003-03-28 Jason Merrill <jason@redhat.com>
4566 * cvt.c (force_rvalue): New fn.
4567 * call.c (build_conditional_expr): Use it.
4568 * cp-tree.h: Declare it.
4570 2003-03-28 Mike Stump <mrs@apple.com>
4572 * error.c (dump_expr): Add 0x to printed hex numbers to make
4573 output match source code better.
4575 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4578 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4581 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4582 non-existant ssdf_decls array.
4583 (finish_file): Call generator_ctor_or_dtor_function when there are
4584 static constructors or destructors and no other static
4587 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4590 * decl2.c (finish_file): Don't warn about explicitly instantiated
4593 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4596 * pt.c (lookup_template_class): Only check instantiated args if
4597 they do not contain template parameters.
4599 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4602 * parser.c (cp_parser_function_definition): Set
4603 DECL_INITIALIZED_IN_CLASS for members.
4604 * pt.c (instantiate_decl): Only reduce the template args for
4605 friends that are not defined in class.
4607 2003-03-25 Jason Merrill <jason@redhat.com>
4609 * call.c (print_z_candidate): Change name of first arg to msgid.
4610 (joust): Add comment for translators.
4612 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4614 PR c++/9898, PR c++/383, DR 322
4615 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4616 through reference types on both PARM and ARG.
4618 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4621 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4622 * pt.c (maybe_fold_nontype_args): New function.
4623 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4624 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4625 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4626 maybe_fold_nontype_args.
4628 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4631 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4633 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4636 * typeck.c (cxx_mark_addressable): Adjust call to
4637 gen_mem_addressof or put_var_into_stack.
4639 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4641 PR c++/9978, c++/9708
4642 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4643 * call.c (add_template_candidate_real): Adjust
4644 instantiate_template call.
4645 * class.c (resolve_address_of_overloaded_function): Likewise.
4646 * decl.c (build_enumerator): Set TREE_CONSTANT.
4647 * pt.c (check_instantiated_args): New.
4648 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4650 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4651 (reduce_template_parm_level): Likewise.
4652 (process_template_parm): Likewise.
4653 (check_explicit_specialization): Adjust instantiate_template call.
4654 (convert_template_argument): Don't check non-type argument here.
4655 (lookup_template_class): Check them here.
4656 (tsubst_friend_function): Adjust instantiate_template call.
4657 (instantiate_template): Add tsubst_flags parameter, use it. Check
4660 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4662 * decl.c: Update calls to shadow_warning.
4664 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4667 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4668 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4670 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4672 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4674 * cp/pt.c (instantiate_class_template): Fix formatting.
4676 2003-03-14 Matt Austern <austern@apple.com>
4678 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4679 (unemitted_tinfo_decl_p): Remove.
4680 (emit_tinfo_decl): Change declaration to remove unused parameter.
4681 * decl2.c (finish_file): Change tinfo emission to loop through
4682 unemitted_tinfo_decls array instead of looping through all decls.
4683 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4684 unused second parameter.
4685 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4686 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4687 (emit_tinfo_decl): remove unused second parameter, add assertion
4688 that decl hasn't already been emitted.
4690 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4692 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4693 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4696 2003-03-19 Jason Merrill <jason@redhat.com>
4698 PR c++/8316, c++/9315, c++/10136
4699 * call.c (print_z_candidate): Split out from...
4700 (print_z_candidiates): ...here.
4703 2003-03-17 Roger Sayle <roger@eyesopen.com>
4706 * decl.c (duplicate_decls): Use the new type when prototyping
4707 anticipated decls, even when the types match. This defines the
4708 exception list for the built-in function.
4710 2003-03-17 Jason Merrill <jason@redhat.com>
4713 * typeck.c (build_class_member_access_expr): Compare
4716 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4719 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4721 2003-03-16 Jason Merrill <jason@redhat.com>
4724 * decl.c (finish_function): Only allow the NRVO to use variables
4725 declared at function scope.
4727 2003-03-17 Andreas Jaeger <aj@suse.de>
4729 * Make-lang.in (cp/TAGS): Remove.
4731 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4734 * cp-tree.h (struct language_function): Add in_base_initializer.
4735 (in_base_initializer): define it.
4736 (expand_member_init): Remove INIT param.
4737 * init.c (expand_member_init): Remove INIT param, return the member.
4738 (emit_mem_initializers): Set in_base_initializer.
4739 * class.c (build_base_path): Check in_base_initializer.
4740 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4741 * pt.c (tsubst_initializer_list): Likewise.
4743 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4745 * decl.c (binding_for_name): Fix initialization thinko.
4747 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4749 Compile-time improvement: 2/n.
4750 * cp-tree.h (struct cxx_binding): New datatype;
4751 (struct lang_identifier): Use it.
4752 (LOCAL_BINDING_P): Adjust definition.
4753 (INHERITED_VALUE_BINDING_P): Likewise.
4754 (BINDING_SCOPE): Likewise.
4755 (BINDING_HAS_LEVEL_P): Likewise.
4756 (BINDING_VALUE): Likewise.
4757 (BINDING_TYPE): Likewise.
4758 (IDENTIFIER_VALUE): Likewise.
4759 (struct tree_binding): Remove.
4760 (TS_CP_BINDING): Likewise.
4761 ((union lang_tree_node): Remove field "binding".
4762 (cxx_binding_clear): New macro.
4763 (binding_for_name): Adjust return type.
4764 (qualified_lookup_using_namespace): Adjust prototype.
4765 (lookup_using_namespace): Adjust prototype.
4766 (cxx_scope_find_binding_for_name): Declare.
4767 * cp-tree.def: Remove CPLUS_BINDING definition.
4768 * decl.c (push_binding): Adjust local variable type.
4769 (add_binding): Likewise.
4770 (push_class_binding): Likewise.
4771 (pop_binding): Likewise.
4772 (poplevel): Likewise.
4773 (poplevel_class): Likewise.
4774 (free_bindings): Adjust type.
4775 (find_binding): Adjust return type, add a third parameter. Remove
4776 non-useful assertion now that we use static typing.
4777 (cxx_scope_find_binding_for_name): New function.
4778 (binding_for_name): Use it. Adjust local variable type. Simplify.
4779 (namespace_binding): Simplify.
4780 (set_namespace_binding): Likewise.
4781 (set_identifier_type_value_with_scope): Adjust local variable type.
4782 (lookup_tag): Don't type-abuse of local variable 'old'.
4783 (lookup_namespace_name): Likewise. Allocate binding on stack.
4784 (select_decl): Adjust prototype.
4785 (unqualified_namespace_lookup): Allocate binding on stack.
4786 Don't type-abuse of local variable 'val'.
4787 (lookup_name_real): Likewise.
4788 (maybe_inject_for_scope_var): Adjust local variable type.
4789 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4790 (namespace_binding): Adjust logic, simplify.
4791 (BINDING_LEVEL): Adjust definition.
4792 (push_class_level_binding): Adjust local variable type.
4793 (struct cxx_saved_binding): Adjust field 'binding' type.
4794 * decl2.c (ambiguous_decl): Adjust prototype.
4795 (lookup_using_namespace): Adjust local variable type.
4796 (qualified_lookup_using_namespace): Catch type error and correct
4797 ensueing logic error.
4798 (do_nonmember_using_decl): Adjust local variable type. Allocate
4799 temporary cxx_binding on stack.
4800 (do_toplevel_using_decl): Adjust local variable type.
4801 * ptree.c (cxx_print_cxx_binding): New function.
4802 (cxx_print_identifier): Use it.
4803 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4805 2003-03-15 Roger Sayle <roger@eyesopen.com>
4807 * tree.c (count_functions): Fix whitespace.
4809 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4811 * Make-lang.in: Update.
4813 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4816 * pt.c (maybe_process_partial_specialization): Handle
4817 member class template when enclosing class template is
4818 explicit specialized.
4819 (most_general_template): Stop looking when DECL is already
4822 2003-03-13 Jason Merrill <jason@redhat.com>
4825 * search.c (lookup_conversions): Call complete_type here.
4826 * call.c (implicit_conversion): Not here.
4828 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4830 * decl2.c (do_nonmember_using_decl): Correct handling of
4831 simultaneous type/non-type bindings.
4833 * call.c (initialize_reference): Remove bogus assertion.
4834 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4836 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4839 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4842 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4845 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4846 to merge old and new declarations.
4848 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4851 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4852 (cp/g++.1): Build it from scratch in the build tree.
4853 (c++.install-man): Depend on it. Install it from the build tree.
4854 (c++.mostlyclean): Clean it.
4856 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4859 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4860 to merge old and new declarations.
4863 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4865 2003-03-11 Jason Merrill <jason@redhat.com>
4868 * search.c (lookup_member): Fix handling of functions in a class
4871 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4874 * call.c (convert_class_to_reference): Adjust usage of
4876 (any_viable): Remove.
4877 (splice_viable): Combine with any_viable.
4878 (print_z_candidates): Avoid printing duplicates.
4879 (build_user_type_conversion_1): Adjust usage of splice_viable.
4880 (build_new_function_call): Likewise.
4881 (build_operator_new_call): Likewise.
4882 (build_object_call): Likewise.
4883 (build_conditional_expr): Likewise.
4884 (build_new_op): Likewise.
4885 (build_new_method_call): Likewise.
4886 (joust): Remove spurious comment.
4887 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4888 * decl2.c (arg_assoc_class): Simplify.
4889 * friend.c (add_friend): Likewise.
4891 2003-03-11 Jason Merrill <jason@redhat.com>
4894 * decl2.c (check_classfn): A member template only matches a
4897 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4899 * Make-lang.in (CXX_C_OBJS): Update.
4900 * lang-specs.h: Don't define __GNUG__ here.
4902 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4904 * call.c (perform_overload_resolution): New function.
4905 (build_new_function_call): Use it.
4906 (build_operator_new_call): Likewise.
4907 (add_candidates): Add explicit_targs and template_only parameters.
4908 (build_new_op): Adjust accordingly.
4909 * cp-tree.h (build_operator_new_call): New function.
4910 (build_function_call_real): Remove.
4911 (build_function_call_maybe): Likewise.
4912 * init.c (build_new_1): Use build_operator_new_call.
4913 * typeck.c (build_function_call_real): Rename to ...
4914 (build_function_call): ... this.
4916 2003-03-10 Devang Patel <dpatel@apple.com>
4919 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4921 2003-03-10 Jason Merrill <jason@redhat.com>
4924 * decl.c (push_using_directive): Push before recursing.
4926 PR c++/9868, c++/9524
4927 * call.c (resolve_scoped_fn_name): Handle the case of a function
4930 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4931 argument in the pointer-to-member case.
4933 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4936 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4937 pointers to member functions.
4940 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4941 in pointer-to-member-function types.
4943 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4945 * expr.c (cplus_expand_constant): Use C90 prototype style.
4946 (cxx_expand_expr): Likewise.
4948 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4951 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4954 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4956 * lang-specs.h (c++-header): Change .pch to .gch.
4958 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4960 * cp-tree.h (cxx_init): Update prototype.
4961 * lex.c (cxx_init): Similarly.
4963 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4966 * cp-tree.h (begin_mem_initializers): Remove.
4967 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4968 Do not call finish_mem_initializers if not in a constructor.
4969 (cp_parser_class_head): Fix typo in error message.
4970 * semantics.c (begin_mem_initializers): Remove.
4971 * testsuite/g++.dg/parser/constructor1.C: New test.
4974 * call.c (add_function_candidate): Skip builtin fuctions that have
4975 not yet been declared.
4978 * init.c (build_new_1): Correct logic for determining whether or
4979 not to use an array cookie.
4982 * parser.c (cp_parser_postfix_expression): Call
4983 finish_non_static_data_member, even when processing_template_decl.
4986 * cp-tree.h (is_ancestor): New function.
4987 (handle_class_head): Change prototype.
4988 * decl2.c (is_namespace_ancestor): Rename to ...
4989 (namespace_anecestor): ... this.
4990 (set_decl_namespace): Adjust accordingly.
4991 (handle_class_head): Remove unnecessary parameters.
4992 * parser.c (cp_parser_class_head): Check that
4993 nested-name-specifiers are used appropriately.
4995 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4997 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4998 (implicit_conversion): Adjust call to reference_binding.
4999 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
5000 (initialize_reference): Adjust handling for references bound to
5002 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
5004 (real_non_cast_lvalue_p): New method.
5005 * cvt.c (build_up_reference): Adjust use of
5006 make_temporary_var_for_ref_to_temp.
5007 * tree.c (real_non_cast_lvalue_p): New method.
5009 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5011 * except.c (init_exception_processing): Use C90 prototype style.
5012 (cp_protect_cleanup_actions): Likewise.
5013 (prepare_eh_type): Likewise.
5014 (build_eh_type_type): Likewise.
5015 (build_exc_ptr): Likewise.
5016 (do_begin_catch): Likewise.
5017 (dtor_nothrow): Likewise.
5018 (do_end_catch): Likewise.
5019 (push_eh_cleanup): Likewise.
5020 (decl_is_java_type): Likewise.
5021 (choose_personality_routine): Likewise.
5022 (initialize_handler_parm): Likewise.
5023 (expand_start_catch_block): Likewise.
5024 (expand_end_catch_block): Likewise.
5025 (begin_eh_spec_block): Likewise.
5026 (finish_eh_spec_block): Likewise.
5027 (do_allocate_exception): Likewise.
5028 (do_free_exception): Likewise.
5029 (wrap_cleanups_r): Likewise.
5030 (stabilize_throw_expr): Likewise.
5031 (build_throw): Likewise.
5032 (complete_ptr_ref_or_void_ptr_p): Likewise.
5033 (is_admissible_throw_operand): Likewise.
5034 (nothrow_libfn_p): Likewise.
5035 (can_convert_eh): Likewise.
5036 (check_handlers_1): Likewise.
5037 (check_handlers): Likewise.
5039 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5041 * call.c (merge_conversion_sequences): New function.
5042 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
5043 (convert_class_to_reference): Correct handling of second
5044 standard conversion sequence in a user-defined conversion
5046 (build_user_type_conversion_1): Use merge_conversion_sequences.
5047 * cp-tree.def: Add comments for CONV nodes.
5048 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
5050 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5052 * error.c (init_error): Use C90 prototype style.
5053 (dump_scope): Likewise.
5054 (dump_qualifiers): Likewise.
5055 (dump_template_argument): Likewise.
5056 (dump_template_argument_list): Likewise.
5057 (dump_template_parameter): Likewise.
5058 (dump_template_bindings): Likewise.
5059 (dump_type): Likewise.
5060 (dump_typename): Likewise.
5061 (class_key_or_enum): Likewise.
5062 (dump_aggr_type): Likewise.
5063 (dump_type_prefix): Likewise.
5064 (dump_type_suffix): Likewise.
5065 (dump_global_iord): Likewise.
5066 (dump_simple_decl): Likewise.
5067 (dump_decl): Likewise.
5068 (dump_template_decl): Likewise.
5069 (dump_function_decl): Likewise.
5070 (dump_parameters): Likewise.
5071 (dump_exception_spec): Likewise.
5072 (dump_function_name): Likewise.
5073 (dump_template_parms): Likewise.
5074 (dump_char): Likewise.
5075 (dump_expr_list): Likewise.
5076 (dump_expr): Likewise.
5077 (dump_binary_op): Likewise.
5078 (dump_unary_op): Likewise.
5079 (type_as_string): Likewise.
5080 (expr_as_string): Likewise.
5081 (decl_as_string): Likewise.
5082 (context_as_string): Likewise.
5083 (lang_decl_name): Likewise.
5084 (cp_file_of): Likewise.
5085 (cp_line_of): Likewise.
5086 (decl_to_string): Likewise.
5087 (expr_to_string): Likewise.
5088 (fndecl_to_string): Likewise.
5089 (code_to_string): Likewise.
5090 (language_to_string): Likewise.
5091 (parm_to_string): Likewise.
5092 (op_to_string): Likewise.
5093 (type_to_string): Likewise.
5094 (assop_to_string): Likewise.
5095 (args_to_string): Likewise.
5096 (cv_to_string): Likewise.
5097 (cxx_print_error_function): Likewise.
5098 (cp_diagnostic_starter): Likewise.
5099 (cp_diagnostic_finalizer): Likewise.
5100 (cp_print_error_function): Likewise.
5101 (function_category): Likewise.
5102 (print_instantiation_full_context): Likewise.
5103 (print_instantiation_partial_context): Likewise.
5104 (maybe_print_instantiation_context): Likewise.
5105 (print_instantiation_context): Likewise.
5106 (cp_printer): Likewise.
5107 (print_integer): Likewise.
5108 (print_non_consecutive_character): Likewise.
5109 (locate_error): Likewise.
5111 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5114 * call.c (reference_binding): Add ref_is_var parameter.
5115 (implicit_conversion): Adjust call to reference_binding.
5116 (initialize_reference): Likewise.
5119 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5123 * class.c (get_basefndecls): Use lookup_fnfields_1.
5125 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5128 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5130 (cp_parser_single_declaration): Likewise.
5132 2003-03-05 Jason Merrill <jason@redhat.com>
5135 * call.c (build_conditional_expr): Use convert rather than an
5138 2003-03-02 Matt Austern <austern@apple.com>
5140 * decl.c (cp_binding_level): Add static_decls varray member.
5141 (add_decl_to_level): Add static/inline namespace scope
5142 declarations to static_decls array.
5143 (wrapup_global_for_namespace): Pass static_decls only, instead of
5144 all decls, to wrapup_global_declarations/check_global_declarations.
5145 (push_namespace): Initialize static_decls for ordinary namespaces.
5146 (cxx_init_decl_processing): Initialize static_decls for global
5149 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5151 * class.c (end_of_class): Correct thinko.
5153 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5155 * config-lang.in: Replace ${libstdcxx_version} by its value.
5157 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5159 * cp-tree.h (cxx_saved_binding): Declare.
5160 (struct saved_scope): Adjust type of field 'old_binding'.
5161 * decl.c (cxx_saved_binding_make): New macro.
5162 (struct cxx_saved_binding): Define.
5163 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5165 (maybe_push_to_top_level): Adjust local variable type.
5166 (pop_from_top_level): Likewise.
5168 2003-03-04 Tom Tromey <tromey@redhat.com>
5170 * Make-lang.in (c++.tags): New target.
5172 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5174 * Make-lang.in: Update.
5176 2003-03-03 Jason Merrill <jason@redhat.com>
5178 * decl.c (finish_enum): Do set the type in a template. Simplify.
5179 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5181 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5184 * call.c (convert_class_to_reference): Correct conversion
5186 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5187 (implicit_conversion): Adjust call to reference_binding.
5188 (add_candidate): Change type of candidates parameter.
5189 (add_function_candidate): Likewise.
5190 (add_conv_candidate): Likewise.
5191 (build_builtin_candidate): Likewise.
5192 (add_builtin_candidate): Likewise.
5193 (add_builtin_candidates): Likewise.
5194 (add_template_candidate_real): Likewise.
5195 (add_template_candidate): Likewise.
5196 (add_template_conv_candidate): Likewise.
5197 (build_user_type_conversion_1): Adjust accordingly.
5198 (build_object_call): Likewise.
5199 (build_conditional_expr): Likewise.
5200 (add_candidates): Likewise.
5201 (build_new_op): Likewise.
5202 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5203 (build_new_method_call): Adjust calls to add_function_candidate.
5204 (make_temporary_var_for_ref_to_temp): New function.
5205 (initialize_reference): Add decl parameter.
5206 * class.c (build_rtti_vtbl_entries): Use build_address and
5208 * cp-tree.h (initialize_reference): Change prototype.
5209 (make_temporary_var_for_ref_to_temp): New function.
5210 (build_type_conversion): Change prototype.
5211 (build_address): New function.
5212 (build_nop): Likewise.
5213 * cvt.c (cp_convert_to_pointer): Adjust call to
5214 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5216 (convert_to_pointer_force): Use build_nop.
5217 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5218 (convert_to_reference): Adjust call to build_type_conversion.
5219 (ocp_convert): Likewise.
5220 (build_type_conversion): Remove for_sure parameter.
5221 * decl.c (grok_reference_init): Use initialize_reference.
5222 * typeck.c (build_address): New function.
5223 (build_nop): Likewise.
5224 (build_unary_op): Use them.
5225 (build_ptrmemfunc): Tidy slightly.
5226 (convert_for_initialization): Adjust call to
5227 initialize_reference.
5228 * typeck2.c (store_init_value): Remove #if 0'd code.
5230 2003-03-03 Jason Merrill <jason@redhat.com>
5232 * decl.c (start_function): Clear DECL_NUM_STMTS.
5234 * class.c (get_vtable_decl): Use vtbl_type_node.
5235 (build_primary_vtable): Check for it.
5237 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5239 * decl.c (check_initializer): Check for vector_opaque_p.
5241 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5243 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5244 invoke an external cpp during compilation.
5246 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5248 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5250 (start_decl): Likewise.
5251 (start_function): Likewise.
5253 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5255 * Make-lang.in (CXX_C_OBJS): Update.
5257 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5260 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5263 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5265 * parser.c (cp_parser_init_declarator): Revert opaque
5266 vector_opaque_p change.
5267 Do not include target.h.
5269 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5272 * cp-tree.h (build_zero_init): Add parameter.
5273 * decl.c (cp_finish_decl): Adjust call.
5274 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5276 (build_default_init): Add nelts parameter. Adjust calls to
5278 (build_new_1): Adjust call to build_default_init.
5279 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5281 2003-02-26 Devang Patel <dpatel@apple.com>
5283 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5284 required. Postpone enum setting for template decls.
5285 (build_enumerator): Delay copying value node until finish_enum
5286 (). Remove #if 0'ed code.
5287 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5288 (tsubst_copy): Add check for enum type.
5290 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5293 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5294 away initializations for DECL_EXTERNAL VAR_DECLs.
5295 (finish_file): Adjust accordingly.
5296 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5298 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5300 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5301 (push_class_binding): Likewise.
5302 (set_namespace_binding): Likewise.
5304 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5307 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5308 specializations back to the main template.
5309 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5310 * pt.c (resolve_typename_type): Likewise.
5312 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5315 * pt.c (tsubst_copy_and_build): For a templated function inside a
5316 scope, process template arguments.
5318 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5321 * typeck2.c (abstract_virtuals_error): Don't check when
5322 TYPE is still template parameter dependent.
5324 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5327 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5328 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5329 * pt.c (instantiate_class_template): Don't try to instantiate
5331 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5333 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5336 * decl.c (grokdeclarator): Do not allow parameters with variably
5339 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5341 * search.c (grow_bfs_bases): Remove. Fold into ...
5342 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5345 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5348 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5349 when the G++ 3.2 ABI prevents correct compilation.
5351 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5353 Change base class access representation. Share virtual base
5355 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5357 * cp/class.c (build_base_path): Likewise.
5358 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5359 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5360 (make_new_vtable): Adjust.
5361 (force_canonical_binfo_r): Delete.
5362 (force_canonical_binfo): Delete.
5363 (mark_primary_virtual_base): Delete.
5364 (dfs_unshared_virtual_bases): Delete.
5365 (mark_primary_bases): Adjust.
5366 (maybe_warn_about_overly_private_class): Adjust.
5367 (dfs_base_derived_from): Delete.
5368 (base_derived_from): Follow the inheritance chain.
5369 (struct find_final_overrider_data): Add vpath member.
5370 (dfs_find_final_overrider): Adjust.
5371 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5372 (find_final_overrider): Adjust.
5373 (update_vtable_entry_for_fn): Adjust.
5374 (modify_all_vtables): Adjust.
5375 (walk_subobject_offsets): Adjust.
5376 (layout_nonempty_base_or_field): Adjust.
5377 (layout_empty_base): Remove last parameter. Adjust.
5378 (build_base_field): Adjust.
5379 (build_base_fields): Adjust.
5380 (propagate_binfo_offsets): Remove last parameter. Adjust.
5381 (dfs_set_offset_for_unshared_vbases): Delete.
5382 (layout_virtual_bases): Adjust.
5383 (finish_struct_1): Adjust.
5384 (init_class_processing): Don't init access nodes.
5385 (dfs_get_primary_binfo): Delete.
5386 (get_primary_binfo): Adjust.
5387 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5389 (dump_class_hierarchy): Adjust.
5390 (finish_vtbls): Adjust.
5391 (get_original_base): Delete.
5392 (build_vtt_inits): Adjust.
5393 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5394 (dfs_ctor_vtable_bases_queue_p): Adjust.
5395 (build_ctor_vtbl_group): Adjust.
5396 (dfs_accumulate_vtbl_inits): Adjust.
5397 (build_vtbl_initializer): Adjust.
5398 (build_vbase_offset_vtbl_entries): Adjust.
5399 (add_vcall_offset_vtbl_entries_1): Adjust.
5400 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5401 (access_*_node): Remove.
5402 (CANONICAL_BINFO): Delete.
5403 (BINFO_UNSHARED_MARKED): Remove.
5404 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5405 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5406 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5407 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5409 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5410 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5411 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5413 (BINFO_DEPENDENT_BASE_P): New.
5414 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5416 (markedp, unmarkedp): Adjust.
5417 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5418 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5419 find_vbase_instance, binfo_for_vbase): Delete.
5420 (copied_binfo, original_binfo): Declare.
5421 (finish_base_specifier): Add virtual_p arg.
5422 (unshare_base_binfos): Delete.
5423 (copy_base_binfos): Declare.
5424 (reverse_path): Delete.
5425 * cp/decl.c (xref_basetypes): Access and virtuality passed
5426 differently. Don't copy direct base binfos here. Call
5428 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5429 (initialize_vtbl_ptrs): Adjust.
5430 (expand_member_init): Adjust.
5431 * cp/parser.c (cp_parser_base_specifier): Adjust.
5432 * cp/pt.c (instantiate_class_template): Adjust.
5433 (get_template_base_recursive): Adjust.
5434 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5435 (get_pseudo_ti_desc): Adjust.
5436 * cp/tree.c (unshare_base_binfos): Rename to ...
5437 (copy_base_binfos): ... here, reimplement.
5438 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5439 (reverse_path): Remove.
5440 * cp/typeck.c (get_delta_difference): Adjust error messages.
5441 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5442 * cp/search.c (lookup_base_r): Adjust.
5443 (dynamic_cast_base_recurse): Adjust.
5444 (canonical_binfo): Remove.
5445 (dfs_canonical_queue): Remove.
5446 (dfs_assert_unmarked_p): Remove.
5447 (assert_canonical_unmarked): Remove.
5448 (shared_marked_p, shared_unmarked_p): Remove.
5449 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5450 (dfs_access_in_type): Adjust.
5451 (access_in_type): Adjust.
5452 (dfs_accessible_queue_p): Adjust.
5453 (dfs_accessible_p): Adjust.
5454 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5455 (struct lookup_field_info): Remove from_dep_base_p field.
5456 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5457 (lookup_field_r): Remove dependent base code.
5458 (lookup_member): Likewise.
5459 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5460 (dfs_unmarked_real_bases_queue_p): Remove.
5461 (dfs_marked_real_bases_queue_p): Remove.
5462 (dfs_skip_vbases): Remove.
5463 (dfs_get_pure_virtuals): Adjust.
5464 (markedp, unmarkedp): Adjust.
5465 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5466 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5467 (dfs_unmark): Adjust.
5468 (dfs_get_vbase_types):Remove.
5469 (dfs_build_inheritance_graph_order): Remove.
5470 (get_vbase_types): Remove
5471 (dfs_find_vbase_instance): Remove.
5472 (find_vbase_instance): Remove.
5473 (dfs_debug_unmarkedp): Adjust.
5474 (dependent_base_p): Remove.
5475 (dfs_push_type_decls): Adjust.
5476 (dfs_push_decls): Adjust.
5477 (dfs_no_overlap_yet): Adjust.
5478 (copied_binfo): New function.
5479 (original_binfo): New function.
5480 (binfo_for_vbase): Remove.
5482 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5484 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5485 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5488 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5491 * class.c (layout_class_type): In the 3.2 ABI, take into account
5492 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5494 2003-02-18 Matt Austern <austern@apple.com>
5496 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5498 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5499 handling of global namespace.
5501 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5503 * cp-tree.h (rid_to_yy): Delete.
5504 (C_RID_YYCODE): Delete.
5505 (finish_file): Delete redundant declaration.
5507 2003-02-18 Jason Merrill <jason@redhat.com>
5510 * decl.c (reshape_init): Don't mess with initializer labels.
5513 * parser.c (cp_parser_postfix_expression): Set idk properly for
5514 object->scope::member.
5516 2003-02-18 Ben Elliston <bje@redhat.com>
5519 * decl.c (duplicate_decls): Fix typo in comment.
5521 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5524 * class.c (build_base_field): Mark fields for base classes with
5527 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5530 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5531 CONSTRUCTOR_ELTS only once.
5533 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5536 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5537 (dump_type_suffix): Likewise.
5539 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5541 * search.c: ANSIfy function declarations and definitions.
5542 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5543 * call.c (build_method_call, resolve_scoped_fn_name,
5544 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5546 * class.c (handle_using_decl): Likewise.
5547 * decl.c (make_typename_type, make_unmound_class_template,
5548 start_decl, compute_array_index_type): Likewise.
5549 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5550 * init.c (expand_member_init, build_member_call): Likewise.
5551 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5552 resolve_typename_type): Likewise.
5553 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5554 build_prememfunc_access_expr): Likewise.
5556 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5558 * decl2.c: Include "timevar.h".
5559 (namespace_ancestor): Time name lookup.
5560 (add_using_namespace): Likewise.
5561 (lookup_using_namespace): Likewise.
5562 (qualified_lookup_using_namespace): Likewise.
5563 (decl_namespace): Likewise.
5564 (lookup_arg_dependent): Likewise.
5565 * lex.c (do_identifier): Likewise.
5566 (do_scoped_id): Likewise.
5567 * pt.c (lookup_template_class): Likewise.
5569 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5571 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5573 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5575 * decl.c: Include "timevar.h".
5576 (poplevel): Time name lookup.
5577 (find_binding): Likewise.
5578 (push_namespace): Likewise.
5579 (pop_nested_namespace): Likewise.
5580 (store_bindings): Likewise.
5581 (maybe_push_to_top_level): Likewise.
5582 (pop_from_top_level): Likewise.
5583 (push_local_name): Likewise.
5584 (pushtag): Likewise.
5585 (pushdecl): Likewise.
5586 (pushdecl_with_scope): Likewise.
5587 (pushdecl_namespace_level): Likewise.
5588 (pushdecl_top_level): Likewise.
5589 (pushdecl_class_level): Likewise.
5590 (push_class_level_binding): Likewise.
5591 (push_using_decl): Likewise.
5592 (push_using_directive): Likewise.
5593 (push_overloaded_decl): Likewise.
5594 (lookup_label): Likewise.
5595 (define_label): Likewise.
5596 (lookup_tag): Likewise.
5597 (lookup_tag_reverse): Likewise.
5598 (lookup_namespace_name): Likewise.
5599 (select_decl): Likewise.
5600 (unqualified_namespace_lookup): Likewise.
5601 (lookup_name_real): Likewise.
5602 (lookup_name_current_level): Likewise.
5603 (lookup_type_current_level): Likewise.
5604 (maybe_inject_for_scope_var): Likewise.
5605 (xref_tag): Likewise.
5607 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5609 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5611 * decl.c (build_enumerator): Remove unneeded test.
5613 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5615 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5618 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5621 * call.c (z_candidate): Add args.
5622 (convert_class_to_reference): Set it.
5623 (implicit_conversion): Tidy.
5624 (add_candidate): Add args parameter.
5625 (add_function_candidate): Adjust call to add_candidate.
5626 (add_conv_candidate): Likewise.
5627 (build_builtin_candidate): Likewise.
5628 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5630 (build_new_function_call): Likewise.
5631 (build_object_call): Likewise.
5632 (add_candidates): New function.
5633 (build_new_op): Use it.
5634 (covert_like_real): Adjust call to build_over_call.
5635 (build_over_call): Remove args parameter.
5636 * operators.def: Add <?= and >?=.
5638 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5640 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5642 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5645 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5647 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5649 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5650 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5651 (BINFO_LANG_ELTS): New #define.
5652 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5654 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5656 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5658 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5660 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5662 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5663 rather than TYPE_LANG_FLAG_0.
5664 (TYPE_BUILT_IN): Remove.
5665 (TYPE_DEPENDENT_P): New macro.
5666 (TYPE_DEPENDENT_P_VALID): Likewise.
5667 (lang_type_class): Add fields_readonly.
5668 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5669 * pt.c (dependent_type_p_r): New function, split out from ...
5670 (dependent_type_p): ... here. Memoize results.
5671 * search.c (dependent_base_p): Use dependent_type_p, not
5672 uses_template_parms.
5673 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5676 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5678 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5679 (prep_operand): New function.
5680 (build_new_op): Use it. Remove dead code.
5681 * class.c (pushclass): Change "modify" parameter type from int to
5683 (currently_open_class): Use same_type_p, not pointer equality.
5684 (push_nested_class): Adjust calls to pushclass, remove modify
5686 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5687 (pushclass): Change prototype.
5688 (push_nested_class): Likewise.
5689 (grokoptypename): Remove.
5690 (build_opfncall): Remove.
5691 (value_dependent_expression_p): Declare.
5692 (resolve_typename_type): Likewise.
5693 (resolve_typename_type_in_current_instantiation): Likewise.
5694 (enter_scope_of): Remove.
5696 (tsubst_expr): Likewise.
5697 (tsubst_copy): Likewise.
5698 (tsubst_copy_and_build): Likewise.
5699 * decl.c (warn_about_implicit_typename_lookup): Remove.
5700 (finish_case_label): Return error_mark_node for erroneous labels.
5701 (start_decl): Adjust calls to push_nested_class.
5702 (grokfndecl): Call push_scope/pop_scope around call to
5704 (grokdeclarator): Do not call tsubst.
5705 (start_function): Adjust calls to push_nested_class.
5706 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5707 (check_classfn): Use push_scope/pop_scope around type comparisions.
5708 (grokoptypename): Remove.
5709 (push_sscope): Adjust call to push_nested_class.
5710 * error.c (dump_type): Show cv-qualification of typename types.
5711 * init.c (build_member_call): Use build_new_op, not
5713 * method.c (build_opfncall): Remove.
5714 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5715 non_constant_expression_p.
5716 (cp_parser_constant_expression): Adjust prototype.
5717 (cp_parser_resolve_typename_type): Remove.
5718 (cp_parser_non_constant_expression): New function.
5719 (cp_parser_non_constant_id_expression): Likewise.
5720 (cp_parser_new): Set allow_non_constant_expression_p and
5721 non_constant_expression_p.
5722 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5723 constant-expressions. Note that dependent names aren't really
5725 (cp_parser_postfix_expression): Reject conversions to non-integral
5726 types in constant-expressions. Neither are increments or
5728 (cp_parser_unary_expression): Reject increments and decrements in
5729 constant-expressions.
5730 (cp_parser_direct_new_declarator): Adjust call to
5731 cp_parser_constant_expression.
5732 (cp_parser_cast_expression): Reject conversions to non-integral
5733 types in constant-expressions.
5734 (cp_parser_assignment_expression): Rejects assignments in
5735 constant-expressions.
5736 (cp_parser_expression): Reject commas in constant-expressions.
5737 (cp_parser_labeled_statement): Adjust call to
5738 cp_parser_constant_expression.
5739 (cp_parser_direct_declarator): Simplify array bounds, even in
5740 templates, when they are non-dependent. Use
5741 resolve_typename_type, not cp_parser_resolve_typename_type.
5742 (cp_parser_class_head): Use resolve_typename_type, not
5743 cp_parser_resolve_typename_type.
5744 (cp_parser_member_declaration): Adjust call to
5745 cp_parser_constant_expression.
5746 (cp_parser_constant_initializer): Likewise.
5747 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5748 cp_parser_resolve_typename_type.
5749 (cp_parser_late_parsing_default_args): Adjust call to
5751 * pt.c (tsubst): Give it internal linkage.
5752 (tsubst_expr): Likewise.
5753 (tsubst_copy): Likewise.
5754 (tsubst_copy_and_build): Likewise.
5755 (push_access_scope_real): Likewise.
5756 (tsubst_friend_class): Likewise.
5757 (instantiate_class_template): Adjust call to pushclass.
5758 (value_dependent_expression_p): Give it external linkage.
5760 (resolve_typename_type): New function.
5761 * semantics.c (finish_call_expr): Use build_new_op, not
5763 (begin_constructor_declarator): Remove.
5764 (begin_class_definition): Adjust call to pushclass.
5765 (enter_scope_of): Remove.
5766 * typeck.c (comptypes): Resolve typename types as appropriate.
5767 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5768 (build_x_compound_expr): Likewise.
5769 (build_modify_expr): Likewise.
5770 (build_x_modify_expr): Likewise.
5771 * typeck2.c (build_x_arrow): Likewise.
5773 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5775 * pt.c (last_pending_template) Declare GTY().
5777 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5780 * parser.c (cp_parser_elaborated_type_specifier): Convert
5781 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5782 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5784 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5787 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5790 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5791 inside a declarator.
5793 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5795 * class.c (update_vtable_entry_for_fn): Add index parameter.
5796 Generate vcall thunk for covariant overriding from a virtual
5798 (dfs_modify_vtables): Adjust.
5800 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5803 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5805 (cp_parser_base_specifier): Look for and consume a
5806 TEMPLATE keyword. Replace switch with array index.
5809 * semantics.c (finish_non_static_data_member): Remember the
5810 field's type even in a template.
5813 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5817 * parser.c (cp_parser_cast_expression): Be more tentative.
5819 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5821 * cp-tree.h (flagged_type_tree_s): Remove.
5822 (check_for_new_type): Likewise.
5823 * typeck2.c (check_for_new_type): Likewise.
5825 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5827 * dump.c: ANSIfy function declarations and definitions.
5829 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5831 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5834 * init.c (build_new): Set the type of the new-expression, even
5835 when processing_templte_decl.
5838 * parser.c (cp_parser_primary_expression): Improve error message
5839 for templates used in an expression context.
5842 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5843 parse when encountering "typedef".
5845 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5847 * class.c, parser.c: ANSIfy function definitions and declarations.
5849 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5852 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5853 function; it doesn't make sense to try to print its type.
5854 * semantics.c (finish_typeof): Issue errors about invalid uses.
5857 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5859 (cp_parser_expression_statement): Use it.
5860 (cp_parser_explicit_instantiation): Likewise.
5861 * pt.c (do_decl_instantiation): Improve error handling logic.
5863 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5866 * parser.c (cp_parser_using_declaration): Issue error messages
5867 about name resolution failures here.
5870 * class.c (currently_open_derived_class): Use dependent_type_p.
5871 * cp-tree.h (dependent_type_p): New function.
5872 (dependent_template_arg_p): Likewise.
5873 (dependent_template_p): Likewise.
5874 (type_dependent_expression_p): Likewise.
5875 * parser.c (cp_parser_dependent_type_p): Remove.
5876 (cp_parser_value_dependent_type_p): Likewise.
5877 (cp_parser_type_dependent_expression_p): Likewise.
5878 (cp_parser_dependent_template_arg_p): Likewise.
5879 (cp_parser_dependent_template_id_p): Likewise.
5880 (cp_parser_dependent_template_p): Likewise.
5881 (cp_parser_diagnose_invalid_type_name): Replace
5882 cp_parser_dependent_type_p with dependent_type_p, etc.
5883 (cp_parser_primary_expresion): Likewise.
5884 (cp_parser_nested_name_specifier_opt): Likewise.
5885 (cp_parser_postfix_expression): Likewise.
5886 (cp_parser_unary_expression): Likewise.
5887 (cp_parser_template_name): Likewise.
5888 (cp_parser_class_name): Likewise.
5889 (cp_parser_lookup_name): Likewise.
5890 * pt.c (dependent_type_p): New function.
5891 (value_dependent_expression_p): Likewise.
5892 (type_dependent_expression_p): Likewise.
5893 (dependent_template_arg_p): Likewise.
5894 (dependent_template_id_p): Likewise.
5895 (dependent_template_p): Likewise.
5899 * parser.c (cp_parser_simple_declaration): Return quickly when
5900 encountering errors.
5902 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5904 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5906 2003-01-17 Jason Merrill <jason@redhat.com>
5908 PR c++/9167, c++/9358
5909 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5911 2003-01-17 Jason Merrill <jason@redhat.com>
5914 * call.c (build_conditional_expr): Always do lvalue-rvalue
5917 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5920 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5921 * cp-tree.h (BASELINK_BINFO): Adjust.
5922 (BASELINK_FUNCTIONS): Likewise.
5923 (BASELINK_ACCESS_BINFO): Likewise.
5924 (tree_baselink): New structure.
5925 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5926 (lang_tree_node): Add baselink.
5927 * decl.c (cp_tree_node_structure): Add BASELINK case.
5928 * search.c (build_baselink): Adjust.
5929 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5930 test from TREE_LIST case.
5933 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5934 that a constructor cannot be declared outside of its own class.
5936 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5937 be resolved, neither can the qualified name.
5939 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5941 2003-01-16 Jason Merrill <jason@redhat.com>
5944 * init.c (build_vec_init): Re-add maxindex parm.
5945 (perform_member_init, build_aggr_init): Pass it.
5946 (build_new_1): Pass it. Use an incomplete array type for full_type.
5947 * typeck.c (build_modify_expr): Pass it.
5948 * cp-tree.h: Adjust.
5950 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5952 * cp-tree.h (tsubst_copy_and_build): New declaration.
5953 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5954 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5955 (tsubst_copy_and_build): New function.
5957 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5959 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5960 (PARTIAL_INSTANTIATION_P): Remove.
5961 (IMPLICIT_TYPENAME_P): Likewise.
5962 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5963 (build_typename_type): Remove declaration.
5964 (parmlist_is_exprlist): Likewise.
5965 * decl.c (build_typename_type): Make it static, remove third
5967 (push_class_binding): Don't do implicit typename stuff.
5968 (make_typename_type): Likewise.
5969 (lookup_name_real): Likewise.
5970 (grokdeclarator): Don't try to convert declarations into
5971 initializations. Don't do implicit typename stuff.
5972 (parmlist_is_exprlist): Remove.
5973 (xref_basetypes): Simplify.
5974 * decl2.c (grokfield): Don't try to convert declarations into
5976 (build_anon_union_vars): Do this while processing templates, too.
5977 (finish_anon_union): Likewise.
5978 * error.c (dump_type): Remove implicit typename handling.
5979 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5980 (cp_parser_primary_expression): Correct handling of names not
5981 found by unqualified name lookup in templates.
5982 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5983 of types when possible.
5984 (cp_parser_simple_declaration): Complain intelligently about some
5985 invalid declarations.
5986 (cp_parser_member_declaration): Likewise.
5987 (cp_parser_constructor_declarator_p): Don't check when we're in a
5989 * pt.c (instantiate_class_template): Remove
5990 PARTIAL_INSTANTIATION_P gunk.
5991 * search.c (lookup_field_r): Don't build implicit typenames.
5992 (marked_pushdecls_p): Don't enter dependent base types.
5993 (unmarked_pushdecls_p): Likewise.
5994 * semantics.c (begin_class_definition): Remove implicit typename
5997 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
6000 * parser.c (cp_parser_direct_declarator): If accepting either
6001 abstract or named, the name must be an unqualified-id.
6003 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6005 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
6007 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6009 * decl2.c (check_classfn): Fix uninitialized warning.
6010 (build_anon_union_vars): Likewise.
6011 * pt.c (tsubst_copy): Likewise.
6013 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
6015 Further conform g++'s __vmi_class_type_info to the C++ ABI
6017 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
6019 (class_hint_flags): Likewise.
6021 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6023 * config-lang.in: Add semantics.c to gtfiles.
6024 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
6025 (saved_scope): Likewise.
6026 (type_lookups): Remove.
6027 (deferred_access): New structure.
6028 (type_access_control): Remove.
6029 (save_type_access_control): Likewise.
6030 (reset_type_access_control): Likewise.
6031 (decl_type_access_control): Likewise.
6032 (push_deferring_access_checks): Declare.
6033 (resume_deferring_access_checks): Likewise.
6034 (stop_deferring_access_checks): Likewise.
6035 (pop_deferring_access_checks): Likewise.
6036 (get_deferred_access_checks): Likewise.
6037 (pop_to_parent_deferring_access_checks): Likewise.
6038 (perform_deferred_access_checks): Likewise.
6039 (perform_or_defer_access_check): Likewise.
6040 * decl.c (make_typename_type): Use perform_or_defer_access_check.
6041 (make_unbound_class_template): Likewise.
6042 (grokdeclarator): Don't call decl_type_access_control.
6043 * parser.c (cp_parser_context): Remove deferred_access_checks
6044 and deferring_access_checks_p fields.
6045 (cp_parser_context_new): Adjust.
6046 (cp_parser): Remove access_checks_lists.
6047 (cp_parser_defer_access_check): Remove.
6048 (cp_parser_start_deferring_access_checks): Remove.
6049 (cp_parser_stop_deferring_access_checks): Remove.
6050 (cp_parser_perform_deferred_access_checks): Remove.
6051 (cp_parser_nested_name_specifier_opt): Use new deferred access
6053 (cp_parser_simple_declaration): Likewise.
6054 (cp_parser_template_id): Likewise.
6055 (cp_parser_function_definition): Likewise.
6056 (cp_parser_class_specifier): Likewise.
6057 (cp_parser_lookup_name): Likewise.
6058 (cp_parser_single_declaration): Likewise.
6059 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6060 (cp_parser_parse_tentatively): Likewise.
6061 (cp_parser_parse_definitely): Likewise.
6062 (yyparse): Likewise.
6063 (cp_parser_init_declarator): Remove access_checks parameter.
6064 Use new deferred access functions.
6065 (cp_parser_function_definition_from_specifiers_and_declarator):
6067 (cp_parser_class_head): Remove deferring_access_checks_p and
6068 saved_access_checks parameters. Use new deferred access functions.
6069 (cp_parser_member_specification_opt): Don't call
6070 reset_type_access_control.
6071 * search.c (type_access_control): Remove.
6072 * semantics.c: Include "gt-cp-semantics.h".
6073 (deferred_type_access_control): Remove.
6074 (deferred_access_stack): New variable.
6075 (deferred_access_free_list): Likewise.
6076 (push_deferring_access_checks): New function.
6077 (resume_deferring_access_checks): Likewise.
6078 (stop_deferring_access_checks): Likewise.
6079 (pop_deferring_access_checks): Likewise.
6080 (get_deferred_access_checks): Likewise.
6081 (pop_to_parent_deferring_access_checks): Likewise.
6082 (perform_deferred_access_checks): New function, adapted from
6083 cp_parser_perform_deferred_access_checks.
6084 (perform_or_defer_access_check): New function, adapted from
6085 cp_parser_defer_access_check.
6086 (current_type_lookups): Remove.
6087 (deferred_type_access_control): Likewise.
6088 (decl_type_access_control): Likewise.
6089 (save_type_access_control): Likewise.
6090 (reset_type_access_control): Likewise.
6091 (begin_function_definition): Adjust.
6092 (begin_class_definiton): Likewise.
6094 2003-01-13 Jason Merrill <jason@redhat.com>
6097 * class.c (build_base_path): Take the address before calling save_expr.
6099 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6100 all the ambiguous conversions are bad.
6102 * class.c (maybe_warn_about_overly_private_class): Don't stop
6103 searching when we find a nonprivate method.
6105 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6107 2003-01-12 Mark Mitchell <mark@codesourcery.com>
6109 * cp-tree.h (get_arglist_len_in_bytes): Remove.
6112 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6113 typeame types more robustly.
6115 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6117 * parser.c: Fix comment typos.
6119 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6122 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6123 an object_type which is not a class type.
6125 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6127 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6128 (cp_parser_late_parsing_default_args): Likewise.
6130 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
6132 * cfns.gperf: ANSIfy function declarations.
6133 * cfns.h: Regenerate.
6134 * cp-tree.h: ANSIfy function declarations.
6136 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6138 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6139 (reparse_absdcl_as_casts): Likewise.
6140 (reparse_decl_as_expr): Likewise.
6141 (finish_decl_parsing): Likewise.
6142 * decl2.c (reparse_absdcl_as_expr): Remove.
6143 (reparse_absdcl_as_casts): Likewise.
6144 (repase_decl_as_expr): Likewise.
6145 (finish_decl_parsing): Likewise.
6150 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6152 (cp_parser_nested_name_specifier_opt): Correct the
6153 check_dependency_p false.
6154 (cp_parser_postfix_expression): Fix formatting.
6155 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6156 declarators when possible.
6157 (cp_parser_template_id): Avoid performing name-lookup when
6159 (cp_parser_class_head): Do not count specializations when counting
6160 levels of templates.
6161 (cp_parser_constructor_declarator_p): Return immediately if
6162 there's no chance that the tokens form a constructor declarator.
6163 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6164 expression with reference type.
6165 (get_tinfo_decl_dynamic): Do not return an expression with
6167 (build_typeid): Add comment. Do not return an expression with
6169 * typeck.c (build_class_member_access_expr): Improve handling of
6170 conditionals and comma-expressions as objects.
6172 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6174 * cfns.gperf: ANSIfy function declarations.
6175 * cfns.h: Regenerate.
6176 * cp-tree.h: ANSIfy function declarations.
6177 * parser.c: ANSIfy function declarations & definitions.
6179 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6181 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6183 Merge from pch-branch:
6185 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6187 Merge to tag pch-merge-20030102:
6189 * semantics.c (finish_translation_unit): Don't call finish_file.
6190 * parser.c: Don't include ggc.h.
6191 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6192 read first token here. Don't allow PCH files after the first
6194 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6195 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6196 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6197 (cp_parser_late_parsing_for_member): Don't duplicate call to
6198 cp_lexer_set_source_position_from_token.
6199 (cp_parser_late_parsing_default_args): Likewise.
6200 (yyparse): Call finish_file after clearing the_parser.
6202 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6204 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6205 (CXX_TREE_H): Add $(GGC_H).
6206 * class.c: Don't include ggc.h.
6207 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6208 (method_name_cmp): Likewise.
6209 (resort_data): New variable.
6210 (resort_field_decl_cmp): New.
6211 (resort_method_name_cmp): New.
6212 (resort_sorted_fields): New.
6213 (resort_type_method_vec): New.
6214 (finish_struct_methods): Delete cast.
6215 (finish_struct_1): Delete cast.
6216 * cp-tree.h: Include ggc.h.
6217 (struct lang_type_class): Add reorder attribute to field `methods'.
6218 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6219 (resort_sorted_fields): New prototype.
6220 (resort_type_method_vec): New prototype.
6221 * call.c: Don't include ggc.h.
6223 * decl2.c: Likewise.
6226 * method.c: Likewise.
6227 * optimize.c: Likewise.
6228 * parse.y: Likewise.
6231 * search.c: Likewise.
6232 * semantics.c: Likewise.
6236 * lang-specs.h: Remove comment.
6238 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6240 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6241 (operator_name_info): Mark to be saved for PCH, specify size.
6242 (assignment_operator_name_info): Likewise.
6244 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6246 * decl.c (anon_cnt): Mark to be saved for PCH.
6248 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6250 * lex.c (init_reswords): Delete now-untrue comment.
6251 Allocate ridpointers using GGC.
6253 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6255 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6257 * g++spec.c (lang_specific_driver): Don't include standard
6258 libraries in `added'.
6260 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6262 * decl2.c (finish_file): Call c_common_write_pch.
6263 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6265 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6267 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6268 files when using g++.
6269 * lang-specs.h: Handle compiling C++ header files.
6271 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6273 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6275 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6277 * pt.c (push_access_scope_real): Call push_to_top_level for
6278 function in namespace scope.
6279 (pop_access_scope): Call pop_from_top_level for function in
6282 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6284 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6286 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6288 * Make-lang.in (c++.install-common, c++.install-man,
6289 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6290 all (un)installation commands.
6291 (c++.install-common): Rewrite $(LN) commands to support
6292 DESTDIR with "ln" as well as with "ln -s".
6294 2003-01-08 Jason Merrill <jason@redhat.com>
6296 * parser.c (cp_parser_primary_expression): See through explicitly
6297 scoped ALIAS_DECLs, too.
6299 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6301 * decl.c: Remove some #if 0 code.
6303 * decl.c: ANSIfy function declarations.
6305 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6307 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6310 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6313 * decl.c (make_typename_type): Check access only when tf_error.
6314 (make_unbound_class_template): Likewise.
6315 * pt.c (saved_access_scope): New variable.
6316 (push_access_scope_real): New function.
6317 (push_access_scope): Likewise.
6318 (pop_access_scope): Likewise.
6319 (tsubst_default_argument): Use them.
6320 (instantiate_template): Likewise.
6321 (regenerate_decl_from_template): Likewise.
6322 (instantiate_decl): Likewise.
6323 (get_mostly_instantiated_function_type): Likewise.
6325 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6327 * tree.c: Delete bogus #if 0 code.
6329 2003-01-07 Andreas Schwab <schwab@suse.de>
6331 * class.c (layout_class_type): Don't use
6332 PCC_BITFIELD_TYPE_MATTERS if not defined.
6334 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6337 * decl2.c (build_cleanup): Mark the object as used.
6339 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6340 (hash_local_specialization): New function.
6341 (register_local_specialization): Revert 2003-01-05 change.
6342 (instantiate_decl): Use hash_local_specialization when creating
6343 the local_specializations table.
6345 * decl2.c (mark_used): Do not synthesize thunks.
6347 * class.c (layout_class_type): Correct handling of unnamed
6348 bitfields wider than their types.
6351 * parser.c (cp_parser): Remove default_arg_types. Update
6352 documentation for unparsed_functions_queues.
6353 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6355 (cp_parser_new): Don't set parser->default_arg_types.
6356 (cp_parser_function_definition): Adjust usage of
6357 unparsed_funtions_queues.
6358 (cp_parser_class_specifier): Don't mess with
6359 parser->default_arg_types. Handle default argument processing in
6360 a separate phase from function body processing.
6361 (cp_parser_template_declaration_after_export): Adjust usage of
6362 unparsed_functions_queues.
6363 (cp_parser_late_parsing_for_member): Do not handle default
6366 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6369 * parser.c (cp_parser_declarator_kind): New enum.
6370 (cp_parser_declarator): Adjust.
6371 (cp_parser_direct_declarator): Adjust. Allow for either named or
6372 abstract declarator. Prefer abstract, if possible. Allow
6373 parenthesized function name.
6374 (cp_parser_condition): Adjust cp_parser_declarator call.
6375 (cp_parser_explicit_instantiation): Likewise.
6376 (cp_parser_init_declarator): Likewise.
6377 (cp_parser_type_id): Likewise.
6378 (cp_parser_function_definition): Likewise.
6379 (cp_parser_member_declaration): Likewise.
6380 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6381 the tentative parsing.
6382 (cp_parser_exception_declaration): Likewise.
6384 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6386 * parser.c (cp_parser_template_parameter): Adjust call to
6387 cp_parser_parameter_declaration.
6388 (cp_parser_parameter_declaration_list): Likewise.
6389 (cp_parser_parameter_declaration): Replace
6390 greater_than_is_operator_p with template_parm_p parameter. Do not
6391 cache tokens for template default arguments.
6393 * pt.c (retrieve_local_specialization): Use htab_find, not
6394 htab_find_with_hash.
6395 (register_local_specialization): Use htab_find_slot, not
6396 htab_find_slot_with_hash.
6397 (instantiate_decl): Pass a hash function to htab_create.
6399 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6401 * parser.c (cp_parser_binary_expression,
6402 cp_parser_multiplicative_expression,
6403 cp_parser_additive_expression, cp_parser_shift_expression,
6404 cp_parser_relational_expression, cp_parser_equality_expression,
6405 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6406 cp_parser_inclusive_or_expression,
6407 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6408 cp_parser_binary_expression): Const-ify.
6410 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6412 * method.c (use_thunk): Disable access control while building the
6415 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6417 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6420 2003-01-03 Matt Austern <austern@apple.com>
6422 * cp-tree.h (struct lang_type_class): add field for key method
6423 (cp_global_trees): rename dynamic_classes to keyed_classes
6424 (key_method): add definition
6425 * class.c (finish_struct_1): compute class's key method, and add
6426 the class to keyed_classes list if there is no key method.
6427 * decl.c (finish_function): add class to keyed_classes list if we
6428 see a definition of the class's key method.
6429 * pt.c (instantiate_class_template): add template specialization
6430 of a dynamic class to keyed_classes list.
6431 * decl2.c (key_method): remove
6432 (finish_file): iterate only through keyed_classes list when
6433 deciding whether to emit vtables, remove class from its list after
6436 2003-01-02 Jason Merrill <jason@redhat.com>
6438 * call.c (build_conditional_expr): Stabilize lvalues properly.
6439 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6440 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6441 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6443 * call.c (convert_like_real): Call decl_constant_value for an
6444 IDENTITY_CONV even if there are no more conversions.
6446 * cvt.c (build_up_reference): Don't push unnamed temps.
6448 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6450 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6451 for a backend struct.
6453 * except.c (wrap_cleanups_r, build_throw): Make
6454 MUST_NOT_THROW_EXPRs void.
6455 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6457 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6459 * init.c (get_temp_regvar): Simplify logic.
6461 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6462 our replacement is a decl.
6464 * decl.c (cp_make_fname_decl): Push the decls inside the
6467 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6470 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6473 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6475 * parser.c (struct cp_parser): Add access_checks_lists field
6476 (cp_parser_simple_declaration): Use.
6477 (cp_parser_init_declarator): Likewise.
6479 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6481 * parser.c (cp_parser_declaration): Accept the __extension__
6482 keyword before the declaration.
6485 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6486 appear after the declarator.
6488 * call.c (build_new_method_call): Fix typo in message format
6491 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6493 * parser.c (cp_lexer_next_token_is): Declare it inline.
6494 (cp_lexer_set_source_position_from_token): Likewise.
6495 (cp_lexer_debugging_p): Likewise.
6496 (cp_parser_parsing_tentatively): Likewise.
6497 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6498 to the cp_lexer_peek_token.
6500 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6503 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6505 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6506 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6507 cp/repo.c: Fix copyright years.
6509 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6511 * lex.c: Remove superfluous include of cpplib.h.
6512 (CONSTRAINT): Define without conditions.
6513 (init_cp_pragma): Use c_register_pragma.
6515 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6517 * .cvsignore: Remove.
6519 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6521 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6522 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6523 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6524 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6525 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6527 * lex.h: parse.y is dead, so don't mention it. Also replace the
6528 copyright header with the default GNU copyright header.
6530 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6532 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6533 (lookup_name_namespace_only): Likewise.
6534 (begin_only_namespace_names): Likewise.
6535 (end_only_namespace_names): Likewise.
6536 * decl.c (only_namespace_names): Remove.
6537 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6538 (lookup_name_real): Do not check only_namespace_names.
6539 (lookup_name_namespace_only): Remove.
6540 (begin_only_namespace_names): Likewise.
6541 (end_only_namespace_names): Likewise.
6542 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6543 nested-name-specifiers more gracefully.
6544 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6545 names when they cannot possibly appear.
6546 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6547 (cp_parser_elaborated_type_specifier): Likewise.
6548 (cp_parser_namespace_name): Only look for namespace names.
6549 (cp_parser_lookup_name): Add is_namespace parameter.
6550 (cp_parser_lookup_name_simple): Adjust call to
6551 cp_parser_lookup_name.
6553 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6555 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6557 * .cvsignore: Update.
6559 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6561 * class.c (modify_vtable_entry): Remove unused variable.
6562 (get_vcall_index): Always expect a non-thunk.
6563 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6564 overriding a thunk. Pass get_vcall_index a non-thunk.
6566 * decl2.c (finish_file): Mark undefined inlines as extern.
6568 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6570 * cp-tree.def (RETURN_INIT): Remove.
6571 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6572 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6573 (note_level_for_for): Remove.
6574 (note_level_for_try): Likewise.
6575 (note_level_for_catch): Likewise.
6576 (finish_named_return_value): Likewise.
6577 (do_pushlevel): Change prototype.
6578 (pending_lang_change): Remove.
6579 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6581 (note_level_for_for): Remove.
6582 (note_level_for_try): Likewise.
6583 (note_level_for_catch): Likewise.
6584 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6585 * parser.c (cp_parser_context_free_list): Make it "deletable".
6586 (cp_parser_template_argument): Remove misleading comment.
6587 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6588 * semantics.c (genrtl_named_return_value): Remove.
6589 (do_pushlevel): Take a scope kind as an argument.
6590 (begin_if_stmt): Adjust.
6591 (begin_while_stmt): Likewise.
6592 (begin_for_stmt): Likewise.
6593 (finish_for_init_stmt): Likewise.
6594 (begin_switch_stmt): Likewise.
6595 (begin_handler): Likewise.
6596 (begin_compound_stmt): Likewise.
6597 (finish_named_return_value): Remove.
6598 (cp_expand_stmt): Remove RETURN_INIT case.
6599 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6601 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6604 * parser.c (cp_parser_direct_declarator): Handle erroneous
6605 parenthesized declarators correctly.
6607 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6609 * cp-tree.h (pending_lang_change): Declare.
6611 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6613 * parser.c (cp_parser_context_free_list): New variable.
6614 (cp_parser_context_new): Use it.
6615 (cp_parser_error): Check return code from
6616 cp_parser_simulate_error.
6617 (cp_parser_simulate_error): Return a value.
6618 (cp_parser_id_expression): Optimize common case.
6619 (cp_parser_class_name): Likewise.
6620 (cp_parser_class_specifier): Adjust call to
6621 cp_parser_late_parsing_default_args.
6622 (cp_parser_lookup_name): Optimize common case.
6623 (cp_parser_late_parsing_for_member): Adjust call to
6624 cp_parser_late_parsing_default_args.
6625 (cp_parser_late_parsing_default_args): Add scope parameter.
6626 (cp_parser_require): Avoid creating the error message unless it's
6628 (cp_parser_parse_definitely): Place free'd contexts on the free
6631 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6633 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6635 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6636 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6638 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6640 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6643 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6647 * Make-lang.in (gt-cp-spew.h): Remove.
6648 * cp-tree.h (do_pending_lang_change): Remove.
6649 (do_identifier): Change prototype.
6650 (finish_id_expr): Remove.
6651 * decl.c (lookup_name_real): Remove yylex variable.
6652 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6653 * lex.c (init_cpp_parse): Remove.
6654 (reduce_cmp): Likewise.
6655 (token_cmp): Likewise.
6657 (lastiddecl): Likewise.
6658 (token_count): Likewise.
6659 (reduce_count): Likewise.
6661 (print_parse_statistics): Likewise.
6662 (do_pending_lang_change): Likewise.
6663 (do_identifier): Remove parsing parameter.
6664 * lex.h (lastiddecl): Remove.
6665 (looking_for_typename): Remove.
6666 (looking_for_template): Likewise.
6667 (pending_lang_change): Likewise.
6669 * semantics.c (finish_id_expr): Remove.
6671 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6674 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6676 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6677 end, not the C front end.
6679 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6681 * cp-tree.h (THUNK_TARGET): New macro.
6682 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6683 (finish_thunk): Remove offset parms.
6684 * class.c (find_final_overrider): Look through thunks.
6685 (get_vcall_index): Use THUNK_TARGET.
6686 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6687 fixed offset here. Adjust finish_thunk call.
6688 (build_vtbl_initializer): Adjust finish_thunk calls.
6689 * mangle.c (mangle_call_offset): Remove superfluous if.
6690 (mangle_thunk): Adjust.
6691 * method.c (make_thunk): Adjust.
6692 (finish_thunk): Adjust.
6693 (thunk_adjust): Remove assert.
6694 (use_thunk): Use THUNK_TARGET
6695 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6698 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6699 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6701 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6703 Remove traditional C constructs 4/n.
6704 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6705 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6706 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6707 delete_sanity, check_member_template, check_java_method,
6708 check_classfn, finish_static_data_member_decl, grokfield,
6709 grokbitfield, grokoptypename, grok_function_init,
6710 cplus_decl_attributes, constructor_name, defer_fn,
6711 build_anon_union_vars, finish_anon_union, coerce_new_type,
6712 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6713 key_method, import_export_vtable, import_export_class,
6714 output_vtable_inherit, import_export_decl, import_export_tinfo,
6715 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6716 set_guard, start_objects, finish_objects,
6717 start_static_storage_duration_function,
6718 finish_static_storage_duration_function, get_priority_info,
6719 start_static_initialization_or_destruction,
6720 finish_static_initialization_or_destruction,
6721 do_static_initialization, do_static_destruction,
6722 prune_vars_needing_no_initialization, write_out_vars,
6723 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6724 add_using_namespace, merge_functions, ambiguous_decl,
6725 lookup_using_namespace, lookup_using_namespace,
6726 qualified_lookup_using_namespace, set_decl_namespace,
6727 decl_namespace, current_decl_namespace, push_decl_namespace,
6728 pop_decl_namespace, push_scope, pop_scope, add_function,
6729 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6730 lookup_arg_dependent, do_namespace_alias,
6731 validate_nonmember_using_decl, do_nonmember_using_decl,
6732 do_toplevel_using_decl, do_local_using_decl,
6733 do_class_using_decl, do_using_directive, check_default_args,
6734 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6735 * parser.c (cp_parser_class_head): Use booleanss.
6736 * decl.c (walk_globals, walk_vtables): Likewise.
6737 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6738 walk_globals): Change return type from 'int' to 'bool'.
6739 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6740 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6741 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6742 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6743 qualifier_flags, tinfo_base_init, generic_initializer,
6744 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6745 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6746 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6747 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6748 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6749 * repo.c (repo_compile_flags, repo_template_declared,
6750 repo_template_defined, repo_class_defined, repo_get_id,
6751 repo_template_used, repo_vtable_used, repo_inline_used,
6752 repo_tinfo_used, repo_template_instantiated, extract_string,
6753 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6754 finish_repo): Likewise.
6755 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6756 cxx_print_xnode): Likewise..
6757 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6758 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6759 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6760 standard_symbol_characters, hp_symbol_characters, main, fatal):
6762 (strip_underscore): Change type from 'int' to 'bool'.
6763 (main): Use boolean constants.
6765 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6767 Remove traditional C constructs 3/n.
6768 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6769 build_up_reference, warn_ref_binding, convert_to_reference,
6770 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6771 convert_to_void, convert, convert_force, build_type_conversion,
6772 build_expr_type_conversion, type_promotes_to,
6773 perform_qualification_conversions): Use C90 prototyping style.
6774 * decl2.c (grok_array_decl): Use boolean constant.
6775 (delete_sanity): Likewise.
6776 * typeck.c (build_unary_op): Likewise.
6777 * semantics.c (finish_switch_cond): Likewise.
6778 * parser.c (cp_parser_direct_new_declarator): Likewise.
6779 * init.c (build_new): Likewise.
6781 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6783 * Make-lang.in (po-generated): Remove parse.c.
6784 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6785 ($(srcdir)/cp/parse.h): Remove target.
6786 ($(srcdir)/cp/parse.c): Likewise.
6787 (gt-cp-parse.h): Likewise.
6788 (gt-cp-parser.h): New target.
6789 (c++.distclean): Do not remove parse.output.
6790 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6791 (cp/spew.o): Remove target.
6792 (cp/lex.o): Adjust dependencies.
6793 (cp/pt.o): Likewise.
6794 (cp/parse.o): Likewise.
6795 (cp/TAGS): Do not mention parse.c.
6796 (cp/parser.o): New target.
6797 * NEWS: Mention the new parser.
6798 * call.c (build_scoped_method_call): Simplify.
6799 (build_method_call): Likewise.
6800 (build_new_function_call): Adjust calls to add_function_candidate
6801 and add_template_candidate.
6802 (build_new_op): Improve handling of erroroneous operands.
6803 (convert_default_arg): Remove circular argument processing.
6804 (name_as_c_string): New function.
6805 (build_new_method_call): Use it.
6806 (perform_implicit_conversion): Use error_operand_p.
6807 * class.c (finish_struct_anon): Use constructor_name_p.
6808 (check_field_decls): Likewise.
6809 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6810 (resolve_address_of_overloaded_function): Likewise.
6811 (instantiate_type): Tweak pointer-to-member handling.
6812 (get_primary_binfo): Remove incorrect assertion.
6813 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6814 * cp-tree.h (DEFARG_TOKENS): New macro.
6815 (default_arg): New structure.
6816 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6817 (lang_tree_node): Add default_arg.
6818 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6819 (type_info_ref_type): New macro.
6820 (saved_scope): Make processing_explicit_instantiation a boolean.
6821 (check_access): New field.
6822 (unparsed_text): Remove.
6823 (language_function): Remove unparsed_inlines.
6824 (error_operand_p): New macro.
6825 (lang_decl): Adjust pending_inline_info.
6826 (DEFARG_POINTER): Remove.
6827 (tag_types): Add typenames.
6828 (lookup_ualified_name): Declare.
6829 (lookup_name_real): Likewise.
6830 (shadow_tag): Adjust prototype.
6831 (get_scope_of_declarator): Declare it.
6832 (process_next_inline): Remove it.
6833 (check_for_missing_semicolon): Likewise.
6834 (maybe_get_template_decl_from_type_decl): Declare it.
6835 (finish_label_stmt): Adjust prototype.
6836 (finish_non_static_data_meber): Declare it.
6837 (finish_pseudo_destructor_call_expr): Rename to ...
6838 (finish_pseudo_destructor_expr): ... this.
6839 (finish_compound_literal): Declare it.
6840 (begin_inline_definitions): Remove it.
6841 (init_spew): Remove.
6842 (peekyylex): Likewise.
6843 (arbitrate_lookup): Likewise.
6844 (frob_opname): Likewise.
6845 (maybe_snarf_defarg): Likewise.
6846 (add_defarg_fn): Likewise.
6847 (do_pending_defargs): Likewise.
6848 (done_pending_defargs): Likewise.
6849 (unprocessed_defarg_fn): Likewise.
6850 (replace_defarg): Likewise.
6851 (end_input): Likewise.
6852 (get_overloaded_fn): Likewise.
6853 * cvt.c (convert_to_reference): Improve error handling.
6854 * decl.c (lookup_name_real): Do not declare it static.
6855 (maybe_push_to_top_level): Set check_access.
6856 (identifier_type_value): Adjust call to lookup_name_real.
6857 (lookup_qualified_name): New method.
6858 (lookup_name_real): Remove special-case parsing code.
6859 (lookup_name-nonclass): Adjust call to lookup_name_real.
6860 (lookup_name_namespace_only): Likewise.
6861 (lookup_name): Likewise.
6862 (check_tag_decl): Return the type declared.
6863 (shadow_tag): Likewise.
6864 (register_dtor_fn): Tweak check_access.
6865 (grokfndecl): Use constructor_name_p.
6866 (get_scope_of_declarator): New function.
6867 (grokdeclarator): Obscure tweaks for slightly different declarator
6869 (start_method): Return error_mark_node to indicate failure.
6870 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6871 * decl2.c (constructor_name_full): Simplify.
6872 (constructor_name): Use it.
6873 (build_expr_from_tree): Adjust for changes to do new parser.
6874 (push_scope): Improve robustness.
6875 (validate_nonmember_using_decl): Process declarations, not names.
6876 (do_class_using_decl): Likewise.
6877 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6879 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6880 * expr.c (cxx_expand_expr): Handle BASELINKs.
6881 * init.c (member_init_ok_or_else): Issue more errors.
6882 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6883 * lex.c: Do not include parse.h.
6884 (yypring): Do not declare.
6886 (make_reference_declarator): Remove error-generating code.
6887 (rid_to_yy): Remove.
6888 (cxx_init): Do not call init_spew.
6890 (check_for_missing_semicolon): Remove.
6891 * lex.h (got_scope): Remove.
6892 (got_object): Remove.
6893 * method.c (hack_identifier): Use finish_non_static_data_member.
6894 (implicitly_declare_fn): Adjust use of constructor_name.
6895 * parser.c: New file.
6896 * pt.c (parse.h): Do not include it.
6897 (maybe_get_template_decl_from_template): Do not declare it.
6898 (finish_member_template_decl): Tweak.
6899 (begin_explicit_instantiation): Adjust for
6900 processing_explicit_instantiation being boolean.
6901 (end_explicit_instantiation): Likewise.
6902 (maybe_process_partial_specialization): Tighten specialization
6904 (retrieve_local_specialization): Adjust ue of hash table.
6905 (eq_local_specializations): New function.
6906 (register_local_specialization): Likewise.
6907 (push_template_decl_real): Remove unnecessary test.
6908 (maybe_get_template_decl_from_type_decl): Don't make it static.
6909 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6910 (tsubst_copy): Use retrieive_local_specialization to handle
6911 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6912 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6913 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6914 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6915 (unify): Tweak handling of CONST_DECLs.
6916 (regenerate_decl_from_template): Use push_nested_class.
6917 (template_for_substitution): New funciton.
6918 (instantiate_decl): Use it. Register parameters as local
6920 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6921 (build_typeid): Use it.
6922 (get_typeid): Likeise.
6923 * search.c (accessible_p): Use check_access, not
6924 flag_access_control.
6925 (adjust_result_of_qualified_name_lookup): Pay attention to the
6927 * semantics.c (finish_asm_stmt): Adjust error handling.
6928 (finish_label_stmt): Return the statement.
6929 (finish_non_static_data_member): New function.
6930 (finish_class_expr): Handle BASELINKs.
6931 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6932 (finish_object_call_expr): Simplify handling during templates.
6933 (finish_pseudo_destructor_call_expr): Rename to ...
6934 (finish_pseudo_dtor_expr): ... this.
6935 (finish_compound_literal): New function.
6936 (begin_inline_definitions): Remove.
6937 (finish_sizeof): Remove special template handling.
6938 * spew.c: Do not include parse.h.
6939 * tree.c (get_overloaded_fn): Remove.
6940 * typeck.c (build_class_member_access_expr): Handle
6941 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6942 (lookup_destructor): New function.
6943 (finish_class_member_access_expr): Use it.
6944 (convert_arguments): Simplify.
6945 (build_unary_op): Handle BASELINKs.
6947 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6950 * decl2.c (mark_used): Defer inline functions.
6951 (finish_file): Merge deferred_fns loops. Check all used
6952 inline functions have a definition.
6953 * method.c (make_thunk): Thunks are not inline.
6955 PR c++/5116, c++/764
6956 * call.c (build_new_op): Make sure template class operands are
6959 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6962 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6963 * call.c (resolve_scoped_fn_name): New function. Deal with
6964 more template expansion. Broken out of ...
6965 * parse.y (parse_finish_call_expr): ... here. Call it.
6966 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6967 resolve_scoped_fn_name and build_call_from_tree.
6970 * decl.c (duplicate_decls): Templates may be disambiguated by
6974 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6975 conversion operators on failure.
6977 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6979 Remove traditional C constructs 2/n.
6980 * call.c (tourney, build_field_call, equal_functions, joust,
6981 compare_ics, build_over_call, build_java_interface_fn_ref,
6982 convert_like_real, op_error, build_object_call, resolve_args,
6983 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6984 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6985 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6986 standard_conversion, reference_related_p,
6987 reference_compatible_p, convert_class_to_reference,
6988 direct_reference_binding, reference_binding,
6989 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6990 add_template_conv_candidate, any_viable, any_strictly_viable,
6991 build_this, splice_viable, print_z_candidates,
6992 build_user_type_conversion, build_new_function_call,
6993 conditional_conversion, build_conditional_expr, build_new_op,
6994 build_op_delete_call, enforce_access, call_builtin_trap,
6995 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6996 convert_default_arg, type_passed_as, convert_for_arg_passing,
6997 in_charge_arg_for_name, is_properly_derived_from,
6998 maybe_handle_implicit_object, maybe_handle_ref_bind,
6999 source_type, add_warning, can_convert, can_convert_arg,
7000 perform_implicit_conversion, can_convert_arg_bad,
7001 initialize_reference, add_conv_candidate,
7002 add_template_candidate_real, add_template_candidate): Ansify.
7004 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
7007 * cp-tree.h (grokoptypename): Add SCOPE parameter.
7008 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
7009 if in a template scope.
7010 * parse.y (unoperator): Return the scope.
7011 (operator_name): Adjust grokoptypename call.
7013 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7015 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
7016 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
7017 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
7019 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
7021 * ChangeLog: Fix a typo.
7022 * class.c: Fix comment typos.
7023 * cp-tree.h: Likewise.
7025 2002-12-18 Jason Merrill <jason@redhat.com>
7027 Handle anonymous unions at the tree level.
7028 C++ ABI change: Mangle anonymous unions using the name of their
7029 first named field (by depth-first search). Should not cause
7030 binary compatibility problems, though, as the compiler previously
7031 didn't emit anything for affected unions.
7032 * cp-tree.def (ALIAS_DECL): New tree code.
7033 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
7034 first field, not the largest.
7035 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
7036 push the decl, and write it out at namespace scope.
7037 * decl.c (lookup_name_real): See through an ALIAS_DECL.
7038 (pushdecl): Add namespace bindings for ALIAS_DECLs.
7039 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
7040 of a decl which doesn't have one.
7041 * typeck.c (build_class_member_access_expr): Don't recurse if
7042 we already have the type we want.
7044 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7047 * friend.c (make_friend_class): Allow partial specialization
7048 when declaration is not a template friend.
7050 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7053 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
7054 TREE_PROTECTED to created decl nodes.
7056 2002-12-18 Mark Mitchell <mark@codesourcery.com>
7058 * class.c (build_base_field): Do not set DECL_PACKED on the
7061 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
7063 * cp-tree.h (struct tree_srcloc): Use location_t.
7064 (SOURCE_LOCUS): New.
7065 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
7067 2002-12-17 Jason Merrill <jason@redhat.com>
7069 * decl.c (finish_function): Also complain about no return in
7071 * semantics.c (finish_return_stmt): Also call check_return_expr in
7073 * typeck.c (check_return_expr): In a template, just remember that we
7076 2002-12-16 Jason Merrill <jason@redhat.com>
7078 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
7081 * semantics.c (do_pushlevel): Call pushlevel after adding the
7083 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7084 * parse.y (function_body): Go back to using compstmt.
7085 * decl.c (pushdecl): Skip another level to get to the parms level.
7087 * call.c (build_new_method_call): Use is_dummy_object to determine
7088 whether or not to evaluate the object parameter to a static member
7091 2002-12-14 Jason Merrill <jason@redhat.com>
7093 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7094 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7095 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7096 don't bother with an AGGR_INIT_EXPR.
7097 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7098 just generate a new decl normally. Take return slot parm.
7099 * cp-tree.h: Adjust prototype.
7101 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
7104 * cvt.c (convert_to_pointer_force): Don't try comparing against
7107 2002-12-13 Geoffrey Keating <geoffk@apple.com>
7109 * cp-tree.h: Have the multiple-include guards around
7112 2002-12-10 David Edelsohn <edelsohn@gnu.org>
7114 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7116 (snarf_method): Same.
7117 (snarf_defarg): Same.
7119 2002-12-10 Mark Mitchell <mark@codesourcery.com>
7122 * pt.c (tsubst_copy): Handle destructor names more correctly.
7124 2002-12-10 Matt Austern <austern@apple.com>
7126 * cp-tree.h: get rid of needs_virtual_reinit bit.
7128 2002-12-09 Mark Mitchell <mark@codesourcery.com>
7130 * NEWS: Document removal of in-class initialization extension for
7131 static data members of non-arithmetic, non-enumeration type.
7132 * decl.c (check_static_variable_definition): Do not allow that
7134 * decl2.c (grokfield): Do not call digest_init when processing
7137 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7139 * error.c (dump_expr): Fix format specifier warning.
7141 2002-12-04 Geoffrey Keating <geoffk@apple.com>
7143 * class.c (finish_struct_1): Correct comment.
7144 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7146 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7149 * error.c (dump_expr): Don't ever try to dump a non-existent
7152 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
7154 Implement covariant returns.
7155 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7156 (struct lang_decl_flags): Add this_thunk_p flag.
7157 Rename vcall_offset to virtual_offset.
7158 (struct lang_decl): Rename delta to fixed_offset.
7159 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7160 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7161 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7162 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7163 (make_thunk): Add this_adjusting arg.
7164 (finish_thunk): Declare.
7165 (mangle_thunk): Add this_adjusting arg.
7166 * class.c (get_vcall_index): Use base function for lookup.
7167 (update_vtable_entry_for_fn): Generate covariant thunk.
7168 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7169 (build_vtbl_initializer): Use base function for lookup.
7170 Finish covariant thunk here. Adjust thunk generation.
7171 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7172 Adjust thunk dumping.
7173 * mangle.c (mangle_call_offset): New function.
7174 (mangle_thunk): Adjust for covariant thunks.
7175 * method.c (make_thunk): Adjust. Do not set name here.
7176 (finish_thunk): New function. Set name here.
7177 (use_thunk): Generate covariant thunks too.
7178 (thunk_adjust): New function.
7179 * search.c (covariant_return_p): Remove. Fold into ...
7180 (check_final_overrider): ... here. Simplify.
7181 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7183 2002-12-03 Jason Merrill <jason@redhat.com>
7186 * call.c (build_over_call): Check specifically for TARGET_EXPR
7189 PR c++/8461, c++/8625
7190 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7191 (cp_convert_parm_for_inlining): Remove.
7192 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7194 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7195 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7197 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7198 an ambiguous conversion.
7200 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7203 * decl.c (reshape_init): Handle erroneous initializers.
7205 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7208 * spew.c (remove_last_token): Make sure that last_chunk is set
7212 * error.c (dump_expr): Handle character constants with
7215 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7218 * decl.c (grokdeclarator): Require class-key for all friend class.
7219 Output the correct type and context in the error message.
7221 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7224 * pt.c (unify): Use variably_modified_type_p to test validity of
7225 template argument types.
7228 * cp-tree.h (lang_type_class): Add typeinfo_var.
7229 (CLASSTYPE_TYPEINFO_VAR): New macro.
7230 * rtti.c (get_tinfo_decl): Use it.
7233 * init.c (expand_member_init): Always get the main variant of a
7236 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7240 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7242 * decl2.c (coerce_new_type): Likewise.
7243 * except.c (do_allocate_exception): Likewise.
7245 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7247 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7248 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7249 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7250 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7251 typeck2.c: Include coretypes.h and tm.h.
7252 * Make-lang.in: Update dependencies.
7254 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7257 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7258 (check_initializer): Validate the type of the initialized
7259 variable, even if the initializer is absent.
7260 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7263 * typeck.c (convert_for_assignment): Do not use
7264 decl_constant_value on the operand.
7267 * pt.c (instantiate_decl): Handle template friends defined outside
7268 of the class correctly.
7270 2002-11-29 Joe Buck <jbuck@synopsys.com>
7272 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7275 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7277 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7279 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7281 (layout_empty_base): Likewise.
7282 (build_base_field): Likewise.
7284 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7286 * class.c (build_base_field): Make sure we get the canonical base
7287 when descending through primary bases.
7289 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7291 * decl.c (check_initializer): Don't error on initialisation of
7292 a scalar with a brace-enclosed expression.
7294 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7296 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7297 (template_parms_equal): Remove prototype.
7298 * typeck.c (buuld_indirect_ref): Reformat.
7300 2002-11-25 Jason Merrill <jason@redhat.com>
7302 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7305 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7307 * tree.c (cp_build_qualified_type_real): Correct handling of
7309 * class.c (walk_subobject_offsets): Fix thinko.
7310 (build_base_field): Record offsets of empty bases in primary
7312 (layout_class_type): Record offsets of empty bases in fields.
7314 * search.c (is_subobject_of_p_1): Fix thinko.
7315 (lookup_field_queue_p): Likewise.
7317 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7319 * class.c (layout_class_type): Reuse tail padding when laying out
7322 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7324 * rtti.c (qualifier_flags): Fix thinko.
7326 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7328 Remove traditional C constructs 1/n.
7329 * cp-tree.h (init_method, set_mangled_name_for_decl,
7330 build_opfncall, hack_identifier, make_thunk, use_thunk,
7331 synthesize_method, implicitly_declare_fn,
7332 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7333 maybe_clone_body): Remove use of PARAMS.
7335 * method.c (do_build_assign_ref, do_build_copy_constructor,
7336 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7338 (synthesize_method): Use 'bool' type and constants instead of
7340 (locate_copy): Likewise.
7341 (implicitly_declare_fn): Likewise.
7343 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7344 Remove old-style declaration.
7345 (maybe_clone_body): Use 'bool' type and constants.
7347 2002-11-21 Glen Nakamura <glen@imodulo.com>
7350 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7351 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7352 of the branches of a COND_EXPR.
7354 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7356 * pt.c (for_each_template_parm): Free allocated memory.
7357 * search.c (is_subobject_of_p_1): New function.
7358 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7360 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7362 * g++spec.c (lang_specific_spec_functions): New.
7364 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7366 * ChangeLog: Follow spelling conventions.
7367 * class.c: Likewise.
7368 * decl2.c: Likewise.
7370 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7372 * search.c (dfs_push_decls): Do not try to reorder elements
7373 3..n of method_vec if method_vec has only two elements.
7374 Reverse order of two tests to avoid accessing unallocated
7377 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7379 * class.c (dfs_find_final_overrider): Adjust so that the most
7380 derived object is a binfo, rather than a class type.
7381 (find_final_overrider): Likewise.
7382 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7383 (add_vcall_offset): Likewise.
7385 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7388 * pt.c (instantiate_template): Push class scope for member
7390 (get_mostly_instantiated_function_type): Likewise. Don't call
7391 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7392 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7393 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7395 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7397 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7398 vcall offfsets. Split out ...
7399 (add_vcall_offset): ... new function.
7402 * pt.c (for_each_template_parm): Add htab parameter.
7403 (process_partial_specialization): Adjust call.
7404 (push_template_decl_real): Likewise.
7405 (pair_fn_data): Add visited.
7406 (for_each_template_parm_r): Avoid walking duplicates more than
7408 (uses_template_parms): Adjust call to for_each_template_parm.
7410 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7412 * class.c (add_implicitly_declared_members): Put implicitly
7413 declared functions at the end of TYPE_METHODs when -fabi-version
7416 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7418 * decl2.c (finish_file): Correct spelling.
7420 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7422 * call.c (build_special_member_call): Do not try to lookup VTTs by
7424 * class.c (vtbl_init_data): Add generate_vcall_entries.
7425 (get_vtable_decl): Do not look up virtual tables by name.
7426 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7427 (set_primary_base): Do not set CLASSTYPE_RTTI.
7428 (determine_primary_base): Likewise.
7429 (get_matching_virtual): Remove.
7430 (get_vcall_index): New function.
7431 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7432 when they are not required. Assign vcall indices at this point.
7433 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7434 Do update dynamic_classes.
7435 (build_vtt): Do not add VTTs to the symbol table.
7436 (build_ctor_vtbl_group): Likewise.
7437 (build_vtbl_initializer): Simplify handling of vcall indices.
7438 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7439 for the most derived class.
7440 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7442 * cp-tree.h (dynamic_classes): New macro.
7443 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7444 (CLASSTYPE_RTTI): Remove.
7445 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7446 (CLASSTYPE_VCALL_INDICES): New macro.
7447 (CLASSTYPE_VTABLES): Likewise.
7448 (BV_USE_VCALL_INDEX_P): Remove.
7449 (build_vtable_path): Remove.
7450 * decl2.c (finish_vtable_vardecl): Remove.
7451 (key_method): Remove #if 0'd code.
7452 (finish_vtable_vardecl): Rename to ...
7453 (maybe_emit_vtables): ... this.
7454 (finish_file): Use it.
7455 * search.c (look_for_overrides_here): Update comment.
7457 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7460 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7462 2002-10-30 Jason Merrill <jason@redhat.com>
7465 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7466 * call.c (convert_for_arg_passing): Set it.
7467 * except.c (stabilize_throw_expr): Recurse for such an arg.
7469 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7471 * cp-tree.h (lang_decl_flags): Remove init_priority.
7472 (lang_decl): Add delta.
7473 (GLOBAL_INIT_PRIORITY): Remove.
7474 (THUNK_DELTA): Revise definition.
7475 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7476 * dump.c (cp_dump_tree): Don't dump it.
7478 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7481 * typeck2.c (process_init_constructor): Call complete_array_type.
7484 * decl.c (make_typename_type): Issue errors about invalid results.
7486 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7488 Core issue 287, PR c++/7639
7489 * cp-tree.h (lang_type_class): Add decl_list field.
7490 (CLASSTYPE_DECL_LIST): New macro.
7491 (maybe_add_class_template_decl_list): Add declaration.
7492 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7493 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7494 (maybe_add_class_template_decl_list): New function.
7495 (add_implicitly_declared_members): Use it.
7496 * decl.c (maybe_process_template_type_declaration): Likewise.
7497 (pushtag): Likewise.
7498 * friend.c (add_friend): Likewise.
7499 (make_friend_class): Likewise.
7500 * semantics.c (finish_member_declaration): Likewise.
7501 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7502 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7503 to process members and friends in the order of declaration.
7505 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7508 * decl.c (finish_destructor_body): Create the label to jump to
7509 when returning from a destructor here.
7510 (finish_function_body): Rather than here.
7512 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7515 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7516 SCOPE_REF is not null before dereferencing it.
7518 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7520 * call.c (build_over_call): Use DECL_CONTEXT, not
7521 DECL_VIRTUAL_CONTEXT.
7522 * class.c (modify_vtable_entry): Don't mess with
7523 DECL_VIRTUAL_CONTEXT.
7524 (set_vindex): Remove.
7525 (set_primary_base): Remove vfuns_p parameter.
7526 (determine_primary_base): Likewise.
7527 (modify_all_vtables): Likewise.
7528 (layout_class_type): Likewise. Adjust calls to other functions
7530 (finish_struct_1): Adjust calls to modified functions. Set
7532 * cp-tree.h (lang_type_class): Remove vsize.
7533 (CLASSTYPE_VSIZE): Remove.
7534 (lang_decl): Remove thunks.
7535 (DECL_THUNKS): Adjust.
7536 (DECL_VIRTUAL_CONTEXT): Remove.
7537 (duplicate_decls): Don't copy it.
7538 * pt.c (build_template_decl): Don't set it.
7539 (tsubst_decl): Likewise.
7540 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7542 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7543 (build_vtable_entry): Remove.
7544 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7545 (lang_decl): Add thunks.
7546 (DECL_THUNKS): New macro.
7547 * decl.c (duplicate_decls): Copy it.
7548 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7549 * semantics.c (emit_associated_thunks): Simplify.
7551 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7554 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7555 lang_type structure exists before accessing field.
7556 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7557 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7558 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7559 * class.c (check_field_decls): Use new macros.
7560 * typeck2.c (process_init_constructor): Remove redundant check for
7561 existence of lang_type structure.
7563 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7565 * class.c (end_of_base): New method.
7566 (end_of_class): Use it. Check indirect virtual bases.
7568 * class.c (check_field_decls): Fix typo.
7570 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7573 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7577 * spew.c (next_token): Do not return an endless stream of
7578 END_OF_SAVED_INPUT tokens.
7579 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7580 the cached token stream.
7581 (snarf_defarg): Likewise.
7583 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7585 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7586 variably_modified_type_p.
7587 * cp-tree.h: Remove prototype of variably_modified_type_p.
7588 * tree.c (variably_modified_type_p): Remove; now implemented
7589 in language-independent code.
7591 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7594 * spew.c (snarf_parenthesized_expression): New function.
7595 (snarf_block): Use it.
7597 2002-10-22 Richard Henderson <rth@redhat.com>
7599 * method.c (use_thunk): Always compute vcall_value; assert that
7600 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7601 for vcall thunks as well.
7603 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7605 * class.c (empty_base_at_nonzero_offset_p): New function.
7606 (layout_nonempty_base_or_field): Do not check for conflicts when
7607 laying out a virtual base using the GCC 3.2 ABI.
7608 (build_base_field): Correct checking for presence of empty classes
7609 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7611 * class.c (include_empty_classes): Use normalize_rli.
7612 (layout_class_type): Likewise.
7614 * decl.c (reshape_init): Tweak handling of character arrays.
7617 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7618 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7619 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7620 (check_field_decls): Likewise.
7621 (layout_class_type): Likewise.
7622 (finish_struct_1): Initialize it.
7623 (walk_subobject_offsets): Use it to prune searches.
7625 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7627 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7628 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7629 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7631 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7633 * decl.c (start_decl): Point users of the old initialized-
7634 typedef extension at __typeof__.
7636 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7638 * Make-lang.in (method.o): Depend on TARGET_H.
7639 * method.c (target.h): Include it.
7640 (use_thunk): Use target hooks. Use vcall thunks, if available.
7642 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7644 * class.c (base_derived_from): Make sure return value is a bool.
7646 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7648 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7650 (dfs_base_derived_from): New function.
7651 (base_derived_from): Likewise.
7652 (dfs_find_final_overrider): Use base_derived_from.
7653 (find_final_overrider): Adjust.
7655 2002-10-18 Jason Merrill <jason@redhat.com>
7658 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7659 with condition decls in a template.
7661 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7663 * class.c (add_method): Compare template parms too.
7665 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7668 * class.c (handle_using_decl): Allow the declaration used to be
7669 from an ambiguous base.
7671 * pt.c (convert_template_argument): Revert this change:
7672 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7673 * pt.c (convert_template_argument): Do not fold non-type
7674 template rguments when inside a template.
7676 * init.c (expand_default_init): Handle brace-enclosed initializers
7679 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7681 * mangle.c (write_expression): Correct handling of enumeration
7683 (write_template_arg): Likewise.
7684 * pt.c (convert_template_argument): Do not fold non-type template
7685 arguments when inside a template.
7688 * cvt.c (convert_to_reference): Allow references as the incoming
7691 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7694 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7695 build_qualified_type.
7697 2002-10-15 Richard Henderson <rth@redhat.com>
7699 * error.c (dump_expr): Use real_to_decimal directly, and with
7702 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7704 * decl.c (reshape_init): Fix typo.
7706 * cp-tree.h (operator_name_info_t): Add arity.
7707 * lex.c (init_operators): Initialize it.
7708 * mangle.c (write_conversion_operator_name): New function.
7709 (write_unqualified_name): Use it.
7710 (write_template_args): Accept template arguments as a TREE_LIST.
7711 (write_expression): Adjust handling of qualified names to match
7714 2002-10-15 Jason Merrill <jason@redhat.com>
7716 * call.c (call_builtin_trap): New fn.
7717 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7718 (build_call): Don't set current_function_returns_abnormally outside
7721 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7723 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7724 clear CLASSTYPE_EMPTY_P.
7725 (build_base_field): Likewise.
7726 (build_base_fields): Likewise.
7727 (check_bases_and_members): Likewise.
7728 (create_vtbl_ptr): Likewise.
7729 (layout_class_type): Likewise. Ensure that empty classes have
7730 size zero when used as base classes in the 3.2 ABI.
7731 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7732 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7734 (is_empty_class): Correct definition when using post-3.2 ABI.
7735 * cp-tree.h (lang_type_class): Add empty_p.
7736 (CLASSTYPE_EMPTY_P): New macro.
7738 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7740 * init.c (build_delete): Do not apply save_expr for arrays.
7741 (build_vec_delete): Likewise.
7743 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7745 * decl.c (layout_var_decl): Call layout_decl even for variables
7746 whose type is an array with unspecified bounds.
7749 * lex.c (do_identifier): Add another option for the parsing
7751 * parse.y (do_id): Use it.
7753 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7755 PRs C++/6803, C++/7721 and C++/7803
7756 * decl.c (grokdeclarator): Gracefully handle template-name as
7759 2002-10-11 Jason Molenda <jmolenda@apple.com>
7761 * init.c (build_field_list): Provide uses_unions_p with a default
7764 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7767 * cp-tree.h (variably_modified_type_p): New function.
7768 (grokdeclarator) Tighten check for variably modified types as
7770 * pt.c (convert_template_argument): Do not allow variably modified
7771 types as template arguments.
7772 * tree.c (variably_modified_type_p): New function.
7774 * NEWS: Document removal of "new X = ..." extension.
7775 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7776 brace-enclosed initializers.
7777 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7778 (initialize_local_var): Remove declaration.
7779 (expand_static_init): Likewise.
7780 * decl.c (next_initializable_field): New function.
7781 (reshape_init): Likewise.
7782 (check_initializer): Use them. Build dynamic initializer for
7783 aggregates here too.
7784 (initialize_local_var): Simplify, and incorporate cleanup
7785 insertion code as well.
7786 (destroy_local_var): Remove.
7787 (cp_finish_decl): Tidy.
7788 (expand_static_init): Fold checks for whether or not a variable
7789 needs initialization into this function. Simplify.
7790 * decl2.c (do_static_initialization): Simplify.
7791 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7792 be done for us automatically.
7793 (expand_default_init): Handle brace-enclosed initializers
7795 (expand_aggr_init_1): Remove RTL-generation code.
7796 (build_vec_init): Remove "new X = ..." support.
7797 * parse.y (new_initializer): Likewise.
7798 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7799 brace-enclosed initializer.
7800 (create_pseudo_type_info): Likewise.
7801 * typeck2.c (store_init_value): Don't try to handle digest_init
7802 being called more than once.
7803 (digest_init): Tidy handling of brace-enclosed initializers.
7805 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7807 * decl.c (typename_hash): Use htab_hash_pointer.
7809 2002-10-10 Jim Wilson <wilson@redhat.com>
7811 * decl.c (duplicate_decls): Don't call decl_attributes.
7813 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7816 * decl.c (start_decl): Unconditionally issue error for
7817 'typedef foo = bar'.
7818 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7819 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7821 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7823 * decl2.c (prune_vtable_vardecl): Delete unused function.
7825 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7828 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7829 procesing template functions.
7830 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7831 type. Call layout_decl.
7832 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7834 2002-10-07 Richard Henderson <rth@redhat.com>
7836 * decl2.c, pt.c: Revert c++/7754 fix.
7838 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7841 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7843 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7846 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7849 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7850 procesing template functions.
7851 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7852 type. Call layout_decl.
7853 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7855 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7858 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7859 template parameters.
7860 (globals): Add entity and need_abi_warning.
7861 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7862 CLASSTYPE_TEMPLATE_INFO.
7863 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7865 (write_prefix): Handle typename types correctly.
7866 (write_template_prefix): Handle template template parameters
7868 (start_mangling): Add entity parameter.
7869 (finish_mangling): Warn about names whose mangling will change.
7870 (mangle_decl_string): Adjust.
7871 (mangle_type_string): Likewise.
7872 (mangle_special_for_type): Likewise.
7873 (mangle_ctor_vtbl_for_type): Likewise.
7874 (mangle_thunk): Likewise.
7875 (mangle_guard_variable): Likewise.
7876 (mangle_ref_init_variable): Likewise.
7878 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7881 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7882 * cp-tree.h (emit_base_init): Rename to ....
7883 (emit_mem_initializers): ... this.
7884 (expand_member_init): Change prototype.
7885 * init.c (perform_member_init): Compute explicit, rather than
7886 requiring it as a parameter.
7887 (sort_member_init): Rename to ...
7888 (sort_mem_initializers): ... this. Process bases and data members
7890 (sort_base_init): Remove.
7891 (emit_base_init): Rename to ...
7892 (emit_mem_initializers): ... this.
7893 (expand_aggr_vbase_init_1): Remove.
7894 (construct_virtual_bases): Rename to ...
7895 (construct_virtual_base): ... this.
7896 (expand_member_init): Rework handling of base initializers.
7897 * method.c (do_build_copy_constructor): Use
7898 finish_mem_initializers.
7899 * parse.y (member_init): Adjust calls to expand_member_init.
7900 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7901 (tsubst_initializer_list): Use expand_member_init.
7902 * semantics.c (finish_mem_intiailizers): Simplify.
7904 2002-10-02 Matt Austern <austern@apple.com>
7905 * decl.c (walk_vtables_r): Fixed typo that caused result to
7906 never get a nonzero value.
7908 2002-10-02 Roger Sayle <roger@eyesopen.com>
7910 PR optimization/6627
7911 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7912 from here, and move it to tree.h.
7913 * decl.c (cxx_init_decl_processing): If storing the vbit
7914 in function pointers, ensure that force_align_functions_log
7917 2002-10-02 Matt Austern <austern@apple.com>
7919 * class.c (check_field_decls): Changed warning about const member
7920 variables so that it doesn't get issued for a class aggregate.
7922 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7924 * decl.c (cp_finish_decl): Make sure array types are laid out,
7925 even if the array bounds are unknown.
7927 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7929 * class.c (build_vtbl_initializer): Change build_c_cast
7932 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7934 * decl.c (cp_finish_decl): Make sure array types are laid out,
7935 even if the array bounds are unknown.
7937 * decl.c (cp_finish_decl): Correct check for dynamic
7938 initialization of thread-local storage.
7940 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7942 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7945 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7947 * class.c (build_vtbl_initializer): Add cast.
7948 (add_vcall_offset_vtbl_entries_1):
7949 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7951 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7953 * class.c (walk_subobject_offsets): Correct the calculation of
7954 offsets for virtual bases. Correct the counting of array
7956 (layout_nonempty_base_or_field): Simplify. Correct the
7957 calculation of offsets to be propagated through the binfo
7959 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7960 Add the FIELD_DECL to TYPE_FIELDS.
7961 (build_base_fields): Adjust accordingly.
7962 (layout_virtual_bases): Use build_base_field.
7963 (end_of_class): Return a tree, not an integer.
7964 (warn_about_ambiguous_direct_bases): Rename to ...
7965 (warn_about_ambiguous_bases): ... this.
7966 (include_empty_classes): New function.
7967 (layout_class_type): Create an alternative version of the type to
7968 be used when as a base class type. Do not call
7969 finish_record_layout until we are done laying out the class.
7970 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7972 (CLASSTYPE_SIZE): Reimplement.
7973 (CLASSTYPE_SIZE_UNIT): Likewise.
7974 (CLASSTYPE_ALIGN): Likweise.
7975 (CLASSTYPE_USER_ALIGN): Likewise.
7976 (CLASSTYPE_AS_BASE): New macro.
7977 (DECL_INITIALIZED_P): Likewise.
7978 (extract_init): Remove prototype.
7979 (build_forced_zero_init): Rename to ...
7980 (build_zero_init): ... this.
7981 (force_store_init_value): Remove.
7982 * decl.c (obscure_complex_init): Remove.
7983 (duplicate_decls): Copy DECL_INITIALIZED_P.
7984 (check_initializer): Do not leave junk in DECL_INITIAL.
7985 (cp_finish_decl): Handle zero-initialization of entities with
7986 static storage duration.
7987 * expr.c (extract_init): Remove.
7988 * init.c (build_forced_zero_init): Remove.
7989 (build_zero_init): New function.
7990 (build_default_init): Use it.
7991 (build_field_list): Skip FIELD_DECLs for base subobjects.
7992 (push_base_cleanups): Likewise.
7993 * method.c (do_build_assign_ref): Likewise.
7994 (synthesize_exception_spec): Likewise.
7995 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7996 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7997 static data member whose initialization took place in its class.
7998 (instantiate_decl): Do not pass an initializer to cp_finish_decl
8000 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
8001 (dfs_unuse_fields): Likewise.
8002 * tree.c (pod_type_p): Handle error_mark_node.
8003 (zero_init_p): Likewise.
8004 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
8006 * typeck2.c (store_init_value): Remove #if 0'd code.
8007 (force_store_init_value): Remove.
8008 (process_init_constructor): Use build_zero_init.
8010 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
8013 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
8015 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
8017 * cp-tree.h: Fix comment typos.
8021 2002-09-25 Mark Mitchell <mark@codesourcery.com>
8023 * cp/class.c (contains_empty_class_p): New method.
8024 (walk_subobject_offsets): Correct computation of field offset.
8025 (layout_empty_base): Correct placement of emtpy base classes.
8026 (layout_class_type): Warn about ABI changes.
8028 2002-09-23 Mark Mitchell <mark@codesourcery.com>
8030 * cp/class.c (layout_virtual_bases): Do not round the size of the
8031 type to a multiple of the alignment before laying out virtual bases.
8032 (layout_class_type): Correct handling of bit-fields that are wider
8033 than their type inside unions. Round the size of the type to a
8034 even number of bytes when computing the size without virtual
8036 * cp/cp-tree.h (abi_version_at_least): New macro.
8038 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
8040 * ChangeLog: Follow spelling conventions.
8041 * ChangeLog.2: Likewise.
8043 * class.c: Likewise.
8044 * cp-tree.h: Likewise.
8047 * decl2.c: Likewise.
8048 * except.c: Likewise.
8049 * friend.c: Likewise.
8050 * g++spec.c: Likewise.
8053 * mangle.c: Likewise.
8054 * method.c: Likewise.
8055 * operators.def: Likewise.
8056 * optimize.c: Likewise.
8059 * search.c: Likewise.
8060 * semantics.c: Likewise.
8063 * typeck.c: Likewise.
8065 2002-09-18 Devang Patel <dpatel@apple.com>
8067 * cp/cp-tree.h: New prototype for walk_vtabls().
8068 * cp/decl.c (walk_vtables_r): New function.
8069 (struct cp_binding_level): Add new members, namespaces,
8070 names_size and vtables.
8071 (add_decl_to_level): Add decl in namespaces or vtables
8072 chain, if conditions match.
8073 (walk_vtables): New function.
8074 (walk_namespaces_r): Travers separate namespace chain
8075 for namespace decls.
8076 (wrapup_globals_for_namespace): Use names_size instead
8078 * cp/decl2.c (finish_file): Use walk_vtables() instead of
8079 walk_globals() to walk vtable decls.
8081 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
8083 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8084 ICE with invalid pointers & references.
8086 2002-09-17 Zack Weinberg <zack@codesourcery.com>
8088 * Make-lang.in: Remove all references to the demangler.
8089 * cxxfilt.c: Moved to binutils.
8091 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8094 * pt.c (tsubst_decl): Remove assert.
8096 Remove DR 295 implementation.
8097 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8098 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8099 about ignoring volatile qualifiers.
8101 * search.c (lookup_member): Correct documentation.
8103 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8105 * cp-tree.h (union lang_tree_node): Add chain_next option.
8107 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8109 * parse.y (parse_finish_call_expr): Check lookup_member result.
8112 * semantic.c (finish_asm_stmt): Fix operand/output_operands
8114 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8116 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
8119 * call.c (build_over_call): Convert this pointer for fns found by
8122 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8124 * ChangeLog: Follow spelling conventions.
8125 * ChangeLog.1: Likewise.
8127 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
8130 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8132 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
8134 * error.c: Fix comment formatting.
8135 * except.c: Likewise.
8137 * friend.c: Likewise.
8138 * g++spec.c: Likewise.
8141 * mangle.c: Likewise.
8142 * method.c: Likewise.
8143 * optimize.c: Likewise.
8146 * search.c: Likewise.
8147 * semantics.c: Likewise.
8150 * typeck.c: Likewise.
8151 * typeck2.c: Likewise.
8153 2002-09-13 Matt Austern <austern@apple.com>
8156 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8157 * cp/call.c: Change call-by-const-reference mechanism to use
8158 non_cast_lvalue_p when deciding whether the create a temporary.
8159 We need a temporary when passing, e.g. (long) x by const ref.
8161 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
8163 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8165 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
8167 * decl.c: Fix comment formatting.
8168 * decl2.c: Likewise.
8170 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
8172 * call.c: Fix comment formatting.
8173 * class.c: Likewise.
8174 * cp-lang.c: Likewise.
8175 * cp-tree.h: Likewise.
8178 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8180 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8181 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8182 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8183 minor adjustments (use version_string, eliminate yet another
8184 duplicate of xmalloc)
8186 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8188 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8190 2002-09-05 Jason Merrill <jason@redhat.com>
8192 * typeck2.c (add_exception_specifier): Only pedwarn for an
8194 (require_complete_eh_spec_types): New fn.
8195 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8196 * typeck.c (complete_type_or_diagnostic): Likewise.
8197 * call.c (build_call): Call require_complete_eh_spec_types.
8198 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8199 on an incomplete type.
8201 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8203 * decl.c (start_cleanup_fn): Clear interface_only before
8204 start_function, restore it afterwards.
8206 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8208 * cp-tree.h (finish_builtin_type): Remove.
8209 * decl2.c (finish_builtin_type): Move to common code.
8210 * decl.c (build_ptrmemfunc_type): Adjust.
8211 * rtti.c (create_pseudo_type_info): Adjust.
8212 (create_tinfo_types): Adjust.
8214 2002-08-31 Jason Merrill <jason@redhat.com>
8216 * cp-lang.c (cp_expr_size): Allow initialization from a
8219 2002-08-30 Richard Henderson <rth@redhat.com>
8222 * tree.c: Include target.h.
8223 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8225 * Makefile.in (tree.o): Update.
8227 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8229 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8230 result in incorrect object layouts.
8231 (layout_class_type): Likewise.
8233 2002-08-24 Matt Austern <austern@apple.com>
8235 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8237 (real_lvalue_p): Update caller.
8239 (non_cast_lvalue_or_else): New.
8240 * tree.h: Declare it.
8241 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8243 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8245 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8246 and COND_EXPR specially; fix error message output.
8248 2002-08-22 Jason Merrill <jason@redhat.com>
8250 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8251 * semantics.c (nullify_returns_r): Likewise.
8253 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8256 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8257 name lookup finds nothing.
8259 2002-08-15 Jason Merrill <jason@redhat.com>
8261 * semantics.c (finish_then_clause): Remove redundant assignment.
8262 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8263 extra binding level outside the if/switch statement.
8264 (finish_while_cond, finish_for_cond): Rewrite complex condition
8267 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8269 * parse.y (sizeof, alignof, typeof): New non-terminals to
8270 increment skip_evaluation. Replace terminals with them and
8271 decrement skip_evaluation at the end of rules using them.
8272 * decl2.c (mark_used): Don't assemble_external if
8273 skipping evaluation.
8275 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8278 * parse.y (parse_finish_call_expr): Handle incomplete
8279 type used to name a scope.
8281 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8284 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8285 regression caused by my 2002-08-08 patch.
8287 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8289 * decl.c (pushdecl_class_level): Honor requests to bind names to
8292 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8294 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8295 * parse.y (parse_finish_call_expr): Likewise.
8296 * repo.c (old_args, old_dir, old_main): Const-ify.
8298 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8300 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8301 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8302 * optimize.c (maybe_clone_body): Likewise.
8303 * pt.c (tsubst_enum): Likewise.
8304 (lookup_template_class): Likewise.
8305 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8307 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8309 * lang-specs.h: Remove -ansi.
8311 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8313 * tree.c (maybe_dummy_object): Replace // with /* */
8315 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8317 * call.c (standard_conversion): Use build_ptrmem_type.
8318 * cp-tree.h (build_ptrmem_type): New function.
8319 (adjust_result_of_qualified_name_lookup): Likewise.
8320 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8321 static data members.
8322 (build_ptrmem_type): New function.
8323 (grokdeclarator): Do not use build_offset_type when encountering a
8325 * parse.y (parse_finish_call_expr): Use
8326 adjust_result_of_qualified_name_lookup.
8327 * search.c (adjust_result_of_qualified_name_lookup): New function.
8328 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8329 accessing OFFSET_TYPEs directly.
8331 2002-08-08 Mike Stump <mrs@apple.com>
8333 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8334 (type_decays_to): Likewise.
8335 * class.c (find_final_overrider): Likewise.
8336 (maybe_note_name_used_in_class): Likewise.
8337 * decl.c (current_tmpl_spec_kind): Likewise.
8338 (add_binding): Likewise.
8339 (push_class_binding): Likewise.
8340 (duplicate_decls): Likewise.
8341 (layout_var_decl): Likewise.
8342 (grokfndecl): Likewise.
8343 (grokdeclarator): Likewise.
8344 (check_default_argument): Likewise.
8345 * decl2.c (handle_class_head): Likewise.
8346 * error.c (dump_template_decl): Likewise.
8347 * init.c (build_offset_ref): Likewise.
8348 * pt.c (check_specialization_scope): Likewise.
8349 (determine_specialization): Likewise.
8350 (check_explicit_specialization): Likewise.
8351 (maybe_check_template_type): Likewise.
8352 (process_partial_specialization): Likewise.
8353 (check_default_tmpl_args): Likewise.
8354 (push_template_decl_real): Likewise.
8355 (convert_template_argument): Likewise.
8356 (try_class_unification): Likewise.
8357 (get_bindings_real): Likewise.
8358 (do_decl_instantiation): Likewise.
8359 * semantics.c (begin_function_definition): Likewise.
8360 (finish_member_declaration): Likewise.
8361 (check_multiple_declarators): Likewise.
8362 * typeck.c (comp_array_types): Likewise.
8363 (comptypes): Likewise.
8364 (expr_sizeof): Likewise.
8365 (build_binary_op): Likewise.
8366 (dubious_conversion_warnings): Likewise.
8367 (check_return_expr): Likewise.
8369 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8371 * typeck.c (build_class_member_access_expr): Do not return
8372 error_mark_node when no error has occurred.
8374 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8376 * typeck.c (build_component_addr): Remove.
8377 (build_unary_op): Just check it's not a bitfield, and then build
8380 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8382 * class.c (convert_to_base): Correct check for error_mark_node.
8383 (create_vtable_ptr): Remove unused VFUNS_P parm.
8385 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8387 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8389 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8391 Rework build_component_ref.
8392 * call.c (build_vfield_ref): Do not go through build_component_ref.
8393 (build_field_call): Use build_class_member_access_expr.
8394 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8395 (build_object_call): Likewise.
8396 * class.c (convert_to_base): New function.
8397 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8398 (instantiate_type): Handle BASELINKs.
8399 * cp-tree.def (BASELINK): New tree code.
8400 * cp-tree.h (BASELINK_P): Reimplement.
8401 (SET_BASELINK_P): Remove.
8402 (BASELINK_BINFO): Reimplement.
8403 (BASELINK_FUNCTIONS): Likewise.
8404 (BASELINK_ACCESS_BINFO): Likewise.
8405 (BASELINK_OPTYPE): Likewise.
8406 (convert_to_base): New function.
8408 (build_object_ref): Remove.
8409 (build_component_ref_1): Likewise.
8410 (build_component_ref): Likewise.
8411 (build_x_component_ref): Likewise.
8412 (build_class_member_access_expr): New function.
8413 (finish_class_member_access_expr): Likewise.
8414 (build_ptrmemfunc_access_expr): Likewise.
8415 * decl.c (grokdeclarator): Handle BASELINKs.
8416 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8417 finish_class_member_access_expr.
8418 (arg_assoc): Handle BASELINKs.
8419 (do_class_using_decl): Likewise.
8420 * error.c (dump_decl): Likewise.
8421 (dump_expr): Use build_ptrmemfunc_access_expr.
8422 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8424 (build_throw): Use BASELINK_FUNCTIONS.
8425 * init.c (perform_member_init): Use
8426 build_class_member_access_expr.
8427 (build_offset_ref): Handle BASELINKs. Use
8428 build_class_member_access_expr.
8429 * method.c (hack_identifier): Likewise.
8430 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8431 (primary): Remove uses of build_object_ref.
8432 * pt.c (lookup_template_function): Handle BASELINKs.
8433 (resolve_overloaded_unification): Likewise.
8434 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8435 (lookup_field): Use BASELINK, not TREE_LIST.
8436 (lookup_fnfiels): Likewise.
8437 (setup_class_bindings): Likewise.
8438 * semantics.c (finish_object_call_expr): Do not use
8439 build_method_call when we already know what function is being
8441 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8442 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8444 (name_p): New function.
8445 * typeck.c (build_object_ref): Remove.
8446 (build_component_ref_1): Likewise.
8447 (build_x_component_ref): Likewise.
8448 (build_class_member_access_expr): New function.
8449 (finish_class_member_access_expr): Likewise.
8450 (build_ptrmemfunc_access_expr): Likewise.
8451 (get_member_function_from_ptrfunc): Use
8452 build_ptrmemfunc_access_expr.
8453 (build_binary_op): Likewise.
8454 (build_unary_op): Likewise.
8455 (build_ptrmemfunc): Likewise.
8456 (pfn_from_ptrmemfunc): Likewise.
8457 * typeck2.c (build_m_component_ref): Adjust comment.
8459 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8461 * Make-lang.in (CXX_C_OBJS): Update.
8462 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8463 * cp-tree.h (cxx_decode_option): Remove.
8464 * decl2.c (compare_options, lang_f_options, unsupported_options,
8465 cxx_decode_option): Remove.
8467 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8469 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8471 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8473 * class.c: Don't include obstack.h.
8475 * decl2.c: Delete bogus comment.
8476 * error.c: Don't include obstack.h.
8477 * except.c: Likewise.
8478 (dump_type): Correct comment.
8479 * method.c: Don't include obstack.h.
8482 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8485 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8486 expressions to pointer-to-data-member of pointer-to-member-functions.
8488 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8490 * cvt.c (ocp_convert): Delete obsolete code.
8491 * parse.y (permanent_obstack): Delete declaration.
8492 * pt.c (permanent_obstack): Delete declaration.
8493 * repo.c (permanent_obstack): Delete declaration.
8494 (open_repo_file): Use xmalloc instead of permanent_obstack.
8495 (init_repo): Use xstrdup instead of permanent_obstack.
8497 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8499 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8500 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8502 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8505 C++ ABI change - vfunc ordering.
8506 * class.c (add_virtual_function): Remove.
8507 (dfs_modify_all_vtables): Take list of all declared
8508 virtuals. Assign all that are not in primary base.
8509 (check_for_override): Adjust comments.
8510 (create_vtable_ptr): Take single list of virtuals. Build chain
8511 of declared virtuals here.
8512 (layout_class_type): Take single list of virtuals. Adjust.
8513 (finish_struct_1): Keep virtuals on single list. Adjust.
8515 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8517 * init.c (build_member_call): Use build_new_method_call, not
8520 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8522 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8524 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8526 * call.c (build_method_call): Issue a more helpful error message
8527 about ambiguous method names.
8529 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8531 * tree.c (build_shared_int_cst): Make cache file scope, and
8534 2002-08-02 Jason Merrill <jason@redhat.com>
8536 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8537 (cp_expr_size): New fn.
8538 * call.c (build_over_call): Lose empty class hackery.
8539 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8540 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8542 * semantics.c (expand_body): Do tree optimization in the function
8545 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8547 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8548 * decl.c: Move all warning and flag variables to c-common.c.
8549 * decl2.c: Move all warning and flag variables to c-common.c.
8550 * lex.c (flag_digraphs): Remove.
8551 (warn_traditional): Now in c-common.c.
8553 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8555 * call.c (build_field_call): Do not look up the field by name.
8556 (build_method_call): Simplify.
8557 (struct z_candidate): Add access_path and conversion_path. Remove
8559 (convert_class_to_reference): Adjust use of
8560 add_function_candidate.
8561 (add_candidate): Add conversion_path argument.
8562 (add_function_candidate): Use it.
8563 (add_conv_dndidate): Likewise.
8564 (build_builtin_candidate): Likewise.
8565 (add_template_candidate_real): Add conversion_path argument.
8566 (add_template_conv_candidate): Likewise.
8567 (add_template_candidate): Likewise.
8568 (build_user_type_conversion_1): Use it.
8569 (build_new_function_call): Remove name lookup code. Adjust use of
8570 add_template_candidate and add_function_candidate.
8571 (build_new_op): Likewise.
8572 (convert_like_real): Use build_special_member_call.
8573 (build_over_call): Use cand->conversion_path.
8574 (build_special_member_call): New method.
8575 (build_new_method_call): Remove name lookup code.
8576 * cp-tree.def (OFFSET_REF): Update documentation.
8577 (TEMPLATE_ID_EXPR): Likewise.
8578 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8579 (BASELINK_OPTYPE): Likewise.
8580 (build_new_method_call): Adjust prototype.
8581 (build_special_member_call): New method.
8582 (build_baselink): New method.
8583 (build_offset_ref_call_from_tree): Likewise.
8584 (build_call_from_tree): Likewise.
8585 (finish_qualified_call_expr): Remove.
8586 (finish_call_expr): Adjust prototype.
8587 (build_x_function_call): Remove.
8588 * cvt.c (ocp_convert): Use build_special_member_call.
8589 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8590 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8592 (build_offset_ref_call_from_tree): New function.
8593 (build_call_from_tree): Likewise.
8594 * init.c (expand_cleanup): Use build_special_member_call.
8595 (expand_default_init): Likewise.
8596 (build_member_call): Use finish_call_expr.
8597 (build_new_1): Use build_special_member_call.
8598 (push_base_cleanups): Likewise.
8599 * method.c (do_build_assign_ref): Likewise.
8600 * parse.y (template_id): Do not pass a COMPONENT_REF to
8601 lookup_template_function.
8602 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8603 (parse_finish_call_expr): New function.
8604 * pt.c (lookup_template_function): Add assertions.
8605 * search.c (lookup_base): Allow T to be a binfo.
8606 (build_baselink): New function.
8607 (lookup_member): Use it.
8608 * semantics.c (finish_call_expr): Do not do name lookup.
8609 (finish_object_call_expr): Remove #if 0'd code.
8610 (finish_qualified_call_expr): Remove.
8611 * typeck.c (build_x_function_call): Remove.
8612 (build_static_case): Use build_special_member_call.
8613 * typeck2.c (build_functional_cast): Likewise.
8615 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8617 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8619 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8621 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8623 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8625 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8628 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8630 * cp-tree.h: Comment typo fix.
8632 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8634 * spew.c (space_for_token): Allocate zeroed memory for a new token
8637 2002-07-27 Roger Sayle <roger@eyesopen.com>
8639 * decl.c (builtin_function_1): No need to explicitly mark
8640 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8642 2002-07-27 Roger Sayle <roger@eyesopen.com>
8644 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8646 2002-07-26 Jason Merrill <jason@redhat.com>
8648 * call.c (build_over_call): Likewise.
8649 (cp_convert_parm_for_inlining): New fn.
8650 (convert_for_arg_passing): New fn.
8651 (convert_default_arg, build_over_call): Use it.
8652 (type_passed_as): New fn.
8653 * pt.c (tsubst_decl): Use it.
8654 * decl2.c (cp_build_parm_decl): New fn.
8655 (build_artificial_parm): Use it.
8656 (start_static_storage_duration_function): Likewise.
8657 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8658 (grokparms): Don't mess with DECL_ARG_TYPE.
8659 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8660 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8662 * cp-tree.h: Declare new fns.
8664 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8666 * cp-tree.h (flag_operator_names): Remove.
8667 * decl2.c (flag_operator_names): Remove.
8668 (lang_f_options): Remove operator-names.
8669 * lex.c (D_OPNAME): Remove.
8670 (reswords): Remove operator names.
8671 (rid_to_yy): Remove operator names.
8672 (init_reswords): No need to handle D_OPNAME.
8673 * spew.c (read_process_identifier): There are no operator
8676 2002-07-26 Jason Merrill <jason@redhat.com>
8678 * dump.c (cp_dump_tree): Call c_dump_tree.
8679 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8681 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8683 * error.c (print_whitespace): Remove.
8684 * g++spec.c (LIBUNWIND): Move.
8685 * mangle.c (mangled_position, write_signed_number): Remove.
8687 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8689 * decl2.c (cxx_decode_option): Similarly.
8691 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8693 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8694 (cxx_sizeof_or_alignof_type): Take a third argument.
8695 (cxx_sizeof): Adjust definition.
8696 (cxx_alignof): Likewise.
8697 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8698 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8700 (c_sizeof_nowarn): Remove definition.
8701 (build_unary_op): Use cxx_sizeof_nowarn.
8703 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8705 * tree.c (cp_build_qualified_type_real): When copying
8706 pointer-to-method types, unshare the record that holds
8707 the cached pointer-to-member-function type.
8709 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8711 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8713 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8716 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8717 (c_sizeof): Remove definition.
8718 (expr_sizeof): Use cxx_sizeof.
8719 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8720 * decl.c (finish_destructor_body): Use cxx_sizeof.
8721 * semantics.c (finish_alignof): Likewise.
8722 (finish_alignof): Use cxx_alignof.
8723 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8724 (cxx_sizeof_or_alignof_type): Declare.
8725 (my_friendly_assert): Move to ../c-common.h.
8727 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8729 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8731 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8733 PR c++/7347, c++/7348
8734 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8735 * decl.c (make_typename_type): Use it.
8736 (make_unbound_class_template): Likewise.
8737 (lookup_name_real): Don't call type_access_control if scope is
8738 template parameter dependent.
8739 * parse.y (template_arg): Call make_unbound_class_template with
8741 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8742 (typename_sub0): Likewise.
8743 (typename_sub1): Likewise.
8744 (instantiate_decl): Push class scope.
8745 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8746 for both static variable and member function template.
8747 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8749 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8752 2002-07-20 Roger Sayle <roger@eyesopen.com>
8754 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8755 test by using positive_option. Make whitespace consistent.
8757 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8759 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8760 members with 'locus'. Adjust use throughout.
8761 (struct feed): Likewise.
8762 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8764 (snarf_defarg): Use error(), not error_with_file_and_line().
8766 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8768 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8769 cpp_options is included.
8771 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8773 PR c++/2862, c++/2863
8774 * pt.c (determine_specialization): Compare the length of
8775 TYPE_ARG_TYPES. Tidy.
8777 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8780 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8781 olddecl to newdecl when newdecl is a specialization of the
8782 instantiation olddecl.
8784 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8786 PR c++/4802, c++/5387
8787 * decl.c (make_typename_type): Use enforce_access.
8789 2002-07-17 Scott Snyder <snyder@fnal.gov>
8792 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8794 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8796 * class.c (add_method): Correct handling of conversion operators.
8798 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8801 * class.c (add_method): Simplify.
8803 2002-07-11 Jason Merrill <jason@redhat.com>
8806 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8809 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8811 * pt.c (template_parm_this_level_p, push_template_decl_real):
8812 Pass depth as int pointer.
8814 2002-07-11 Tim Josling <tej@melbpc.org.au>
8816 Remove front end hard coding from gengtype.c.
8818 * config-lang.in (gtfiles): Add files needed for this front end.
8820 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8822 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8823 (begin_function_definition): Adjust prototype.
8824 * lex.c (unqualified_name_lookup_error): New function, split out
8826 (do_identifier): ... here.
8827 * parse.y (parse_begin_function_definition): New function.
8829 * semantics.c (begin_function_definition): Accept decl-specifiers
8830 and attributes as separate parameters.
8832 2002-07-10 Jason Merrill <jason@redhat.com>
8835 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8836 modifying the old one.
8838 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8840 * cp-tree.h (constructor_name_p): Declare it.
8841 (check_template_template_default_arg): Likewise.
8842 * class.c (handle_using_decl): Use constructor_name_p.
8843 * decl.c (grokdeclarator): Likewise.
8844 * decl2.c (constructor_name_p): Define it.
8845 * init.c (build_member_call): Use constructor_name_p.
8846 * parse.y (template_parm): Use check_template_template_default_arg.
8847 * pt.c (check_explicit_specialization): Use constructor_name_p.
8848 * semantics.c (check_template_template_default_arg): New function.
8850 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8852 * pt.c (can_complete_type_without_circularity): Add static to
8853 function definition.
8855 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8857 * cp-tree.h (have_extern_spec): Declare it
8858 * decl.c (have_extern_spec): Define it.
8859 (start_decl): Eliminate use of used_extern_spec.
8860 (start_function): Likewise.
8861 * parse.y (have_extern_spec): Remove declaration.
8862 (used_extern_spec): Likewise.
8863 (frob_specs): Eliminate use of used_extern_spec.
8864 (.hush_warning): Likewise.
8866 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8868 * Make-lang.in (cp/parse.o): Depend on decl.h.
8869 * cp-tree.h (do_decl_instantiation): Change prototype.
8870 * parse.y: Include decl.h.
8871 (parse_decl_instantiation): New function.
8872 (explicit_instantiation): Use it.
8873 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8876 2002-07-07 Roger Sayle <roger@eyesopen.com>
8878 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8879 constructor and destructor tests when passed a TEMPLATE_DECL.
8881 2002-07-05 Jason Merrill <jason@redhat.com>
8883 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8886 PR optimization/7145
8887 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8889 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8891 Repair damage on weak-impared targets caused by my previous patch.
8892 * cp-tree.h (import_export_tinfo): Add parameter.
8893 * decl2.c (import_export_tinfo): Add parameter, post adjust
8895 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8896 import_export_tinfo.
8898 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8901 * init.c (build_aggr_init): Remove qualifiers of init before calling
8903 (build_vec_init): Flatten multi-dimensional array during cleanup.
8904 (build_vec_delete_1): Abort if the type of each element is array.
8906 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8908 * pt.c (instantiate_class_template): Fix typo.
8910 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8912 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8913 by CVS conflict in my last patch.
8915 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8918 * pt.c (can_complete_type_without_circularity): New function.
8919 (instantiate_class_template): Use it.
8920 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8921 message due to incomplete fields.
8923 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8926 * mangle.c (write_expression): Add mangling for sizeof when
8928 * operators.def: Remove stale comment.
8930 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8932 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8933 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8934 (tinfo_decl_type): Replace with ...
8935 (type_info_ptr_type): ... this.
8936 (import_export_tinfo): Declare.
8937 (tinfo_decl_p): Rename to ...
8938 (unemitted_tinfo_decl_p): ... this.
8939 * decl2.c (import_export_decl): Break out tinfo handling into ...
8940 (import_export_tinfo): ... here. New function.
8941 (finish_file): Adjust.
8942 * rtti.c (TINFO_REAL_NAME): New macro.
8943 (init_rtti_processing): Create the tinfo types.
8944 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8945 (get_tinfo_decl): Adjust.
8946 (get_tinfo_ptr): New function.
8947 (get_type_id): Use it.
8948 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8949 (ptr_initializer): Use get_tinfo_ptr.
8950 (ptm_initializer): Likewise.
8951 (synthesize_tinfo_var): Break into ...
8952 (get_pseudo_ti_init): ... this. Just create the initializer.
8953 (get_pseudo_ti_desc): .. and this.
8954 (create_real_tinfo_var): Remove.
8955 (create_pseudo_type_info): Don't create the vtable decl here.
8956 (get_vmi_pseudo_type_info): Remove.
8957 (create_tinfo_types): Adjust.
8958 (tinfo_decl_p): Rename to ...
8959 (unemitted_tinfo_decl_p): ... here. Adjust.
8960 (emit_tinfo_decl): Adjust. Create the initializer.
8962 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8965 * pt.c (tsubst_friend_class): Substitute into the context of the
8966 friend before using it.
8968 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8970 * cp-tree.h (xref_tag): Change prototype.
8971 (handle_class_head): Likewise.
8972 (build_x_component_ref): Likewise.
8973 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8974 (xref_tag): Take attributes as a separate parameter.
8975 (xref_tag_from_type): Adjust call to xref_tag.
8976 * decl2.c (build_expr_from_tree): Adjust call to
8977 build_x_component_ref.
8978 (handle_class_head): Take attributes as a separate parameter.
8979 * parse.y (parse_xref_tag): New function.
8980 (parse_handle_class_head): Likewise.
8981 (primary): Use parse_xref_tag.
8982 (class_head_decl): Use parse_handle_class_head.
8983 (class_head_defn): Likewise.
8984 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8985 (build_dynamic_cast_1): Likewise.
8986 (create_pseudo_type_info): Likewise.
8987 (emit_support_tinfos): Likewise.
8988 * typeck.c (build_object_ref): Adjust call to
8989 build_x_component_ref.
8990 (build_x_component_ref): Remove protect parameter.
8992 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8994 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8995 * class.c (handle_using_decl): Likewise.
8996 (instantiate_type): Likewise.
8997 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8998 (xref_basetypes): Change prototype.
8999 (begin_mem_initializers): New function.
9000 (get_overloaded_fn): Likewise.
9001 * decl.c (xref_basetypes): Simplify.
9002 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
9003 * init.c (build_offset_ref): Likewise.
9004 * parse.y (base_init): Use begin_mem_initializers().
9005 (structsp): Adjust call to xref_basetypes.
9006 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
9007 (instantiate_class_template): Adjust call to xref_basetypes.
9008 * semantics.c (begin_mem_initializers): New function.
9009 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
9010 (really_overloaded_fn): Likewise.
9011 (get_overloaded_fn): New function.'
9012 (get_first_fn): USe BASELINK_FUNCTIONS.
9014 2002-06-24 Mark Mitchell <mark@codesourcery.com>
9016 * cp-tree.h (SCALAR_TYPE_P): New macro.
9017 (check_for_out_of_scope_variable): New function.
9018 (at_class_scope_p): Likewise.
9019 (finish_fname): Likewise.
9020 * class.c (finish_struct): Use at_function_scope_p.
9021 * decl.c (check_for_out_of_scope_variable): New function, split
9022 out from do_identifier.
9023 (finish_enum): Use at_function_scope_p.
9024 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
9025 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
9026 (primary): Use at_function_scope_p.
9027 * search.c (at_class_scope_p): New function.
9028 * semantics.c (finish_fname): Likewise.
9029 (check_multiple_declarators): Use at_function_scope_p.
9031 2002-06-23 Mark Mitchell <mark@codesourcery.com>
9033 * parse.y (parse_scoped_id): New function.
9035 * cp-tree.h (do_scoped_id): Adjust declaration.
9036 * lex.c (do_scoped_id): Remove call to yylex.
9037 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
9038 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
9039 expanding it inline.
9041 2002-06-23 Matt Thomas <matt@3am-software.com>
9043 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
9046 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9048 * mangle.c (integer_type_codes): Const-ify.
9050 2002-06-20 Richard Henderson <rth@redhat.com>
9053 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
9054 Call put_var_into_stack.
9056 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9058 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
9059 array size calculation.
9061 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9064 * pt.c (tsubst_expr): Handle FILE_STMT.
9066 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9069 * pt.c (lookup_template_class): Don't build complete argument of
9070 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
9073 2002-06-19 Akim Demaille <akim@epita.fr>
9075 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
9077 * spew.c, lex.c: Adjust.
9078 * parse.y (explicit_instantiation): Add empty action to override
9079 the default $$ = $1 where it introduces a type clash.
9081 2002-06-14 Jason Merrill <jason@redhat.com>
9083 * semantics.c (begin_for_stmt): Push the 'for' scope before
9084 adding the FOR_STMT.
9087 * class.c (build_base_field): Set DECL_PACKED.
9088 (layout_class_type): Don't use tail padding of PODs.
9089 * mangle.c (write_unqualified_name): Fix template conversion op
9092 2002-06-16 Richard Henderson <rth@redhat.com>
9095 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9096 after template instantiation.
9098 2002-06-16 Richard Henderson <rth@redhat.com>
9100 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9102 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
9104 * cp-tree.h (compiler_error): Remove declaration.
9105 * lex.c (compiler_error): Remove definition.
9107 2002-06-14 Steve Ellcey <sje@cup.hp.com>
9109 * g++spec.c (LIBUNWIND): New.
9110 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9112 2002-06-13 Jessica Han <jessica@cup.hp.com>
9114 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9115 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9116 (build_vbase_offset_vtbl_entries): Likewise.
9117 * rtti.c (build_headof): Likewise.
9118 (get_tinfo_decl_dynamic): Likewise.
9119 (create_pseudo_type_info): Likewise.
9121 2002-06-12 Stan Shebs <shebs@apple.com>
9123 * mpw-config.in: Remove file, no longer used.
9124 * mpw-make.sed: Ditto.
9126 2002-06-07 Zack Weinberg <zack@codesourcery.com>
9128 * decl2.c: Update call to cpp_handle_option.
9130 2002-06-07 H.J. Lu (hjl@gnu.org)
9132 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9134 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
9136 * error.c (cp_error_at): Fix typo.
9138 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
9140 * error.c (cp_diagnostic_starter): Adjust call.
9141 (maybe_print_instantiation_context): Change prototype to take a
9142 'diagnostic_info *'.
9143 (print_instantiation_full_context): Likewise.
9144 (print_instantiation_partial_context): Likewise.
9145 (cp_diagnostic_starter): Likewise.
9146 (cp_diagnostic_finalizer): Likewise.
9147 (cp_print_error_function): Likewise.
9148 (cp_printer): Take a secondary parameter as a 'text_info *'.
9149 Remove output_state savings. Adjust calls.
9151 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9153 * pt.c (inline_parm_levels): Mark for GC.
9155 * mangle.c (start_mangling): Allocate G.substitutions here...
9156 (init_mangle): ... rather than here.
9157 (finish_mangling): Clear the varray pointer when done with it.
9158 * spew.c (yylexstring): Don't use VARRAY_FREE.
9159 * search.c (bfs_walk): Don't use VARRAY_FREE.
9160 * decl2.c (pending_statics): Use gengtype to mark.
9161 (deferred_fns): Likewise.
9162 (ssdf_decls): Likewise.
9163 (init_decl2): Delete.
9164 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9165 (cxx_init_decl_processing): Don't call init_decl2.
9166 (cxx_pop_function_context): Don't use VARRAY_FREE.
9167 * cp-tree.h (struct saved_scope): No need for special marking
9169 (struct language_function): Likewise.
9170 (local_classes): Use gengtype to mark.
9171 (init_decl2): Delete prototype.
9172 * class.c (init_class_processing): Don't use
9173 ggc_add_tree_varray_root.
9174 (build_vtbl_initializer): Don't use VARRAY_FREE.
9176 * decl.c (typename_compare): Don't use same_type_p.
9178 * decl.c: Include hashtab.h instead of hash.h.
9179 (typename_hash): Update to use htab_h.
9180 (typename_compare): Likewise.
9181 (typename_htab): Use gengtype to mark.
9182 (build_typename_type): Update to use htab_h.
9183 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9185 * Make-lang.in (gt-cp-tree.h): New rule.
9186 (cp/tree.o): Depend on gt-cp-tree.h.
9187 * config-lang.in (gtfiles): Add cp/tree.c.
9188 * tree.c: Include gt-cp-tree.h.
9189 (list_hash_table): Use gengtype to mark.
9190 (init_tree): Use gengtype to mark trees.
9192 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9193 * call.c (struct z_candidate): Use gengtype.
9194 (USER_CONV_CAND): Use WRAPPER_ZC.
9195 (convert_class_to_reference): Use build_zc_wrapper.
9196 (build_type_conversion_1): Likewise.
9197 (build_over_call): Use WRAPPER_ZC.
9198 (add_warning): Use build_zc_wrapper.
9199 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9200 * cp-tree.h (struct lang_identifier): Use gengtype.
9201 (struct template_parm_index_s): Likewise.
9202 (struct ptrmem_cst): Likewise.
9203 (struct tree_binding): Likewise.
9204 (struct tree_overload): Likewise.
9205 (struct tree_srcloc): Likewise.
9206 (struct tree_wrapper): Likewise. Also modify to have a pointer
9207 to struct z_candidate rather than void.
9208 (enum cp_tree_node_structure_enum): New.
9209 (union lang_tree_node): New.
9210 (cxx_mark_tree): Delete prototype.
9211 (cp_tree_node_structure): New prototype.
9212 (build_ptr_wrapper): Delete prototype.
9213 (build_int_wrapper): Delete prototype.
9214 (build_zc_wrapper): New prototype.
9215 * decl.c: Include debug.h
9216 (cxx_mark_tree): Delete.
9217 (cp_tree_node_structure): New.
9218 * tree.c (build_ptr_wrapper): Delete.
9219 (build_int_wrapper): Delete.
9220 (build_zc_wrapper): New.
9222 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9223 Correct typo. Patch from k_fukui@highway.ne.jp.
9225 * semantics.c (current_stmt_tree): Update for change to
9226 struct language_function.
9227 (finish_mem_initializers): Likewise.
9228 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9229 * cp-tree.h (struct language_function): Rename from
9230 cp_language_function. Change all uses.
9231 (cp_function_chain): Don't need to cast.
9233 * class.c (duplicate_tag_error): Reset discriminator.
9234 (check_bases_and_members): Update for data structure changes.
9235 * cp-tree.h (struct lang_id2): Use gengtype.
9236 (flagged_type_tree): Likewise.
9237 (SET_LANG_ID): Use GGC on struct lang_id2.
9238 (struct cp_language_function): Use gengtype. Remove field
9239 'x_vcalls_possible_p'.
9240 (current_vcalls_possible_p): Delete.
9241 (struct lang_type_header): New.
9242 (struct lang_type_class): Rename from struct lang_type. Include
9243 struct lang_type_header.
9244 (struct lang_type_ptrmem): New.
9245 (struct lang_type): New.
9246 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9247 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9248 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9249 (struct lang_decl_flags): Use gengtype. Add discriminators.
9250 (struct lang_decl): Use gengtype. Add and use discriminators.
9251 Update the macros that reference moved fields.
9252 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9253 (SET_DECL_THUNK_P): Set discriminator too.
9254 (clear_inline_text_obstack): Delete prototype.
9255 (finish_inline_definitions): Delete prototype.
9256 (mark_pending_inlines): Delete prototype.
9257 (lang_check_failed): New prototype.
9258 * decl.c (struct named_label_use_list): Use gengtype.
9259 (struct named_label_list): Likewise.
9260 (mark_binding_level): Delete.
9261 (mark_named_label_lists): Delete.
9262 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9263 (cxx_init_decl_processing): Use generated marker routine.
9264 (begin_destructor_body): Delete dead set to
9265 current_vcalls_possible_p.
9266 (mark_lang_function): Delete.
9267 (mark_cp_function_context): Delete.
9268 (lang_mark_tree): Use generated marker routines.
9269 * decl2.c (start_objects): Set discriminator when setting
9270 GLOBAL_INIT_PRIORITY.
9271 * lex.c (retrofit_lang_decl): Set discriminators.
9272 (copy_lang_type): Update for changes to lang_type structure.
9273 (cp_make_lang_type): Set discriminator.
9274 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9275 * search.c: Include ggc.h.
9276 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9277 (finish_inline_definitions): Delete.
9278 * spew.c (struct token): Use gengtype.
9279 (struct token_chunk): New.
9280 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9281 (struct feed): Use gengtype.
9282 (feed_obstack): Delete.
9283 (feed): Mark as GC root.
9284 (pending_inlines): Mark as GC root.
9285 (pending_inlines_tail): Likewise.
9286 (processing_these_inlines): Likewise.
9287 (token_obstack): Make static.
9288 (first_token): Likewise.
9289 (init_spew): Don't initialize deleted things; use gengtype for roots.
9290 (clear_inline_text_obstack): Delete.
9291 (feed_input): Use GC for struct feed. Update for changes to
9292 struct unparsed_text.
9293 (mark_pending_inlines): Delete.
9294 (next_token): Rename from add_token. Change all callers. Update
9295 for changes to struct unparsed_text.
9296 (space_for_token): New.
9297 (remove_last_token): New.
9298 (alloc_unparsed_text): New.
9299 (snarf_block): Take an unparsed_text. Update for changes to struct
9301 (snarf_method): Update for changes to struct unparsed_text.
9302 (snarf_defarg): Update for changes to struct unparsed_text.
9303 * tree.c (lang_check_failed): New.
9305 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9306 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9307 (cp/spew.o): Add dependency on gt-<filename>.h.
9308 (cp/decl2.o): Add dependency on gt-<filename>.h.
9309 (cp/call.o): Add dependency on gt-<filename>.h.
9310 (cp/pt.o): Add dependency on gt-<filename>.h.
9311 (cp/repo.o): Add dependency on gt-<filename>.h.
9312 (cp/parse.o): Add dependency on gt-<filename>.h.
9313 * call.c: Use gengtype for roots.
9314 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9315 decl2.c parse.y pt.c repo.c spew.c.
9316 * cp-tree.h: Use gengtype for roots.
9317 (struct saved_scope): Use GGC, gengtype.
9318 (cp_parse_init): Delete prototype.
9319 (init_pt): Delete prototype.
9320 * decl.c: Use gengtype for roots.
9321 (mark_saved_scope): Delete.
9322 (cxx_init_decl_processing): Don't call deleted initilisation
9324 (signed_size_zero_node): Delete, unused.
9325 * decl.h: Use gengtype for roots.
9326 * decl2.c: Use gengtype for roots.
9327 * lex.h: Use gengtype for roots.
9328 * parse.y: Use gengtype for roots.
9329 (cp_parse_init): Delete.
9330 * pt.c: Use gengtype for roots.
9332 * repo.c: Use gengtype for roots.
9333 * spew.c: Use gengtype for roots.
9335 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9336 (cp/decl.o): Add dependency on gtype-cp.h.
9337 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9338 Include gtype-cp.h. Allow for filename changes.
9340 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9341 (cp/decl.o): Add cp/gt-decl.h dependency.
9342 * config-lang.in (gtfiles): New.
9343 * tree.h: Rename struct binding_level to struct cp_binding_level.
9344 * decl.c: Rename struct binding_level to struct cp_binding_level.
9345 Include cp/gt-decl.h.
9346 (struct cp_binding_level): Use gengtype.
9347 (make_binding_level): Use GGC on struct cp_binding_level.
9348 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9349 (cxx_init_decl_processing): Mark free_binding_level as
9352 * decl.c (mark_cp_function_context): Update calling sequence.
9354 * decl.c (start_function): Don't free 'struct
9355 cp_language_function'.
9356 (pop_cp_function_context): Likewise.
9357 (save_function_data): Allocate it using GC.
9358 * semantics.c (genrtl_start_function): Don't free 'struct
9359 cp_language_function'.
9361 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9363 * lang-specs.h: Use cpp_debug_options.
9365 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9367 * mangle.c, tree.c: Include real.h.
9368 * Make-lang.in: Update dependency lists.
9370 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9372 * lex.c: Don't include c-lex.h.
9373 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9375 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9377 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9379 2002-05-22 Richard Henderson <rth@redhat.com>
9381 * decl.c (obscure_complex_init): Check for VAR_DECL
9382 before using DECL_THREAD_LOCAL.
9384 2002-05-22 Richard Henderson <rth@redhat.com>
9386 * decl.c (check_tag_decl): Handle RID_THREAD.
9387 (obscure_complex_init): Reject run-time init of tls.
9388 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9389 * lex.c (reswords): Add __thread.
9390 (rid_to_yy): Map RID_THREAD to SCSPEC.
9392 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9394 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9395 * cp-tree.h (cxx_post_options): Kill.
9396 * cp-lex.c (cxx_post_options): Kill.
9398 2002-05-21 Richard Henderson <rth@redhat.com>
9400 * lex.c (rid_to_yy): Add RID_THREAD.
9402 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9404 * init.c (build_vec_init): Test for trivial copy-assignment when
9405 copy-assigning arrays.
9407 2002-05-20 Andreas Jaeger <aj@suse.de>
9409 * init.c (build_default_init): Remove unused variable.
9411 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9413 * call.c (any_strictly_viable): New.
9414 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9416 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9418 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9420 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9423 * pt.c (do_decl_instantiation): Don't complain explicit
9424 instantiation after explicit specialization.
9425 (do_type_instantiation): Likewise.
9427 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9429 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9431 (complete_type_or_else): ... this. Redefined as macro.
9432 (cxx_incomplete_type_diagnostic): Declare.
9433 (cxx_incomplete_type_error): Define as macro.
9434 * init.c (build_delete): Warn about incomplete types other than
9435 void, and use the built-in operator delete for them.
9436 * typeck.c (complete_type_or_diagnostic): Renamed from
9437 complete_type_or_else. Added warn_only argument, passed to...
9438 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9439 warnings or errors depending on new warn_only argument. Renamed
9441 (cxx_incomplete_type_error): ... this. New implementation in
9442 terms of cxx_incomplete_type_diagnostic.
9444 2002-05-18 Jason Merrill <jason@redhat.com>
9447 * decl2.c (import_export_decl): If we clear
9448 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9450 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9453 * pt.c (verify_class_unification): Don't check if PARM is template
9454 parameter dependent. Simplify.
9455 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9456 parameter dependent expression.
9458 2002-05-14 Jason Merrill <jason@redhat.com>
9460 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9462 (synthesize_tinfo_var): Take the public decl.
9463 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9464 (emit_tinfo_decl): Adjust. Call import_export_decl.
9465 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9467 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9469 * cp-tree.h (struct lang_type): Added non_zero_init.
9470 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9471 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9472 * class.c (check_field_decls): Test non_zero_init.
9473 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9474 zero-to-NULL conversions.
9475 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9476 type that needs zero-initialization without zeros.
9477 (check_initializer_decl): Compute zero-initializer for types
9478 that require a non-trivial one.
9479 * init.c (build_forced_zero_init): New function.
9480 (build_default_init): Use it.
9481 * tree.c (zero_init_p): New function.
9482 * typeck2.c (force_store_init_value): New function.
9483 (process_init_constructor): Create non-trivial zero-initializers
9484 for array members and class fields.
9486 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9488 * lang-specs.h: Remove redundant -lang-c++.
9490 2002-05-13 Jason Merrill <jason@redhat.com>
9492 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9493 (fixed_type_or_null): See through reference vars.
9494 (build_base_path): Vtable contents are constant.
9495 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9497 2002-05-12 Jason Merrill <jason@redhat.com>
9499 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9502 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9504 * cp-tree.h (flag_ansi): Remove.
9505 * decl2.c (flag_ansi): Remove.
9506 (cxx_decode_option): Set flag_iso and flag_undef.
9508 2002-05-09 Jason Merrill <jason@redhat.com>
9510 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9511 Use subtraction rather than a bitmask to get the index.
9512 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9514 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9516 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9518 * Make-lang.in (decl2.o): Update.
9519 * cp-tree.h (warn_multichar): Remove.
9520 * decl2.c: Include c-common.h.
9521 (warn_multichar): Remove.
9523 2002-05-03 Jason Merrill <jason@redhat.com>
9525 * tree.c (build_cplus_array_type): Only const and volatile get
9528 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9530 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9532 ABI change, returning simple classes from functions.
9533 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9534 TYPE_HAS_TRIVIAL_INIT_REF is false or
9535 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9537 2002-04-30 Jason Merrill <jason@redhat.com>
9540 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9541 anonymous class with a typedef if there are attributes.
9543 2002-04-29 Paul Eggert <eggert@twinsun.com>
9545 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9547 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9550 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9553 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9556 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9557 enter that scope before name lookup.
9560 * method.c (do_build_copy_constructor): Avoid building
9561 cv-qualified reference types.
9563 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9566 * decl.c (grok_op_properties): Assignment ops don't have to return
9567 by value. operator% should.
9569 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9572 * decl.c (duplicate_decls): Call merge_weak.
9574 2002-04-26 Richard Henderson <rth@redhat.com>
9576 * parse.y (malloced_yyss, malloced_yyvs): New.
9577 (yyoverflow): Re-add. Set them.
9578 (free_parser_stacks): New.
9580 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9583 * method.c (do_build_assign_ref): Pass a derivation to
9584 build_method_call when calling base class assignment operators.
9586 2002-04-26 Richard Henderson <rth@redhat.com>
9588 * parse.y (yyoverflow): Revert.
9590 2002-04-26 Richard Henderson <rth@redhat.com>
9593 * parse.y (string): Remove. Update all uses to use STRING
9594 instead, and not call combine_strings.
9595 * rtti.c (tinfo_name): Use fix_string_type.
9596 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9597 * spew.c (yylexstring): New.
9598 (read_token): Use it.
9600 2002-04-25 Richard Henderson <rth@redhat.com>
9603 * parse.y (yyoverflow): New.
9605 2002-04-25 Jason Merrill <jason@redhat.com>
9608 * search.c (check_final_overrider): No longer static.
9609 * class.c (update_vtable_entry_for_fn): Call it.
9610 * cp-tree.h: Adjust.
9612 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9614 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9615 * cp-tree.h (cxx_set_yydebug): Die.
9616 * lex.c (YYDEBUG): Get from c-lex.h.
9617 (cxx_set_yydebug): Remove.
9618 * parse.y: Include c-lex.h.
9619 (YYDEBUG): Get from c-lex.h.
9621 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9624 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9627 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9629 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9630 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9632 * cp-tree.h (cp_attribute_table): Rename.
9633 * decl.c (lang_attribute_table): Remove declaration.
9634 (cxx_init_decl_processing): Don't set it.
9635 * tree.c (cp_attribute_table): Rename.
9637 2002-04-24 Jason Merrill <jason@redhat.com>
9640 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9641 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9642 The pedwarn for array assignment is now unconditional.
9643 * tree.c (build_cplus_array_type_1): Still process simple array types
9644 normally in templates.
9647 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9650 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9652 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9653 node with attributes.
9655 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9657 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9658 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9660 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9663 * pt.c (tsubst_friend_class): Handle templates with explicit
9667 * typeck.c (merge_types): Remember the cv-qualification of pointer
9668 types when merging them.
9670 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9672 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9673 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9674 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9675 cxx_mark_function_context): New.
9676 * decl.c (push_cp_function_context, pop_cp_function_context,
9677 mark_cp_function_context): Rename for consistency.
9678 (cxx_init_decl_processing): Don't set old hooks.
9680 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9682 * call.c (convert_type_from_ellipsis): Rename, update.
9683 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9684 * cp-tree.h (convert_type_from_ellipsis): Rename.
9685 * decl.c (cxx_init_decl_processing): Don't set hook.
9687 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9689 * call.c (build_new_method_call): Update.
9690 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9691 * cp-tree.h (cxx_incomplete_type_error): New.
9692 * decl.c (grokdeclarator, grokparms): Update.
9693 * decl2.c (check_classfn): Update.
9694 * pt.c (tsubst): Update.
9695 * typeck.c (complete_type_or_else, expr_sizeof,
9696 decay_conversion): Update.
9697 * typeck2.c (incomplete_type_error): Rename.
9698 (add_exception_specifier): Update.
9700 2002-04-18 Jason Merrill <jason@redhat.com>
9703 * search.c (setup_class_bindings): A class template qualifies as a
9706 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9709 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9712 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9714 * init.c (begin_init_stmts): Remove commented out code.
9715 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9716 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9717 expand_start_stmt_expr.
9719 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9721 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9722 dso_handle itself, to __cxa_atexit.
9724 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9726 * error.c (cxx_print_error_function): Adjust call to macros.
9728 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9730 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9732 2002-04-14 Jason Merrill <jason@redhat.com>
9734 * typeck.c (get_member_function_from_ptrfunc): Don't do
9735 gratuitious division and multiplication on
9736 ptrmemfunc_vbit_in_delta targets.
9738 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9741 * semantics.c (finish_expr_stmt): Remember the type of the
9742 expression before any conversions are performed.
9744 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9747 * call.c (add_template_candidate_real): Do not treat member
9748 templates as copy constructors.
9750 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9752 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9753 declaration if the old variable had an incomplete type and the new
9755 (complete_vars): Do not call layout_decl for completed variables.
9757 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9759 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9760 with an explicit one.
9761 (follow_tag_typedef): New.
9762 (lookup_tag): Use it to extract the tag of an explicit typedef.
9763 (xref_tag): Likewise.
9765 2002-04-11 Andrew Haley <aph@redhat.com>
9767 * typeck.c (type_after_usual_arithmetic_conversions):
9768 If two types have the same variant, return immediately.
9769 When two floating-point operands are the same precision:
9770 convert to float if one of the operands is float;
9771 if neither operand is one of the standard types, return the type
9772 of the first operand.
9774 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9777 * decl.c (make_typename_type): Remove implicit typenameness.
9779 2002-04-09 Jason Merrill <jason@redhat.com>
9781 PR optimization/6189
9782 * semantics.c (genrtl_start_function): Don't free
9783 DECL_SAVED_FUNCTION_DATA for inline functions.
9785 * init.c (build_member_call): For now, don't convert to
9786 intermediate base if it would cause an error.
9788 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9790 * parse.y (namespace_qualifier, maybe_identifier,
9791 begin_explicit_instantiation, end_explicit_instantiation,
9792 apparent_template_type, .finish_template_type,
9793 do_id, maybe_init, defarg_again, component_decl_1):
9794 Add ending ';', in accordance with POSIX.
9796 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9799 * class.c (layout_class_type): Remember incomplete static
9801 (finish_struct_1): Call complete_vars, not
9802 hack_incomplete_structures.
9803 * cp-tree.h (hack_incomplete_structures): Rename to ...
9804 (complete_vars): ... this.
9805 (struct saved_scope): Remove incomplete.
9806 (namespace_scope_incomplete): Remove.
9807 * decl.c (struct binding_level): Remove incomplete.
9808 (incomplete_vars): New variable.
9809 (mark_binding_level): Don't mark incomplete.
9810 (print_binding_level): Don't print it.
9811 (mark_saved_scope): Don't mark incomplete.
9812 (pushdecl): Use maybe_register_incopmlete_var.
9813 (cxx_init_decl_processing): Register incomplete_vars for GC.
9814 (start_decl_1): Clarify error message.
9815 (hack_incomplete_vars): Remove.
9816 (maybe_register_incomplete_var): New function.
9817 (complete_vars): Likewise.
9819 2002-04-06 Jason Merrill <jason@redhat.com>
9822 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9823 set before checking it.
9826 * init.c (build_member_call): Use build_scoped_ref.
9827 (resolve_offset_ref): Likewise.
9828 * call.c (build_scoped_method_call): Likewise.
9829 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9831 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9832 * cp-tree.h: Adjust.
9834 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9837 * method.c (implicitly_declare_fn): Pass unqualified type to
9838 synthesize_exception_spec.
9840 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9842 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9843 * cvt.c: Update comment.
9844 * init.c (expand_cleanup_for_base): Update.
9845 * semantics.c (finish_parenthesized_expr): Update.
9846 * typeck.c (cp_truthvalue_conversion): Update.
9848 2002-04-04 Jason Merrill <jason@redhat.com>
9850 * semantics.c (finish_eh_cleanup): New fn.
9851 * cp-tree.h: Add prototype.
9852 * init.c (perform_member_init, expand_cleanup_for_base): Use
9854 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9855 * cp-tree.h: Remove references.
9856 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9857 * dump.c (cp_dump_tree): Likewise.
9858 * pt.c (tsubst_expr): Likewise.
9859 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9860 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9861 * tree.c (cp_statement_code_p): Likewise.
9863 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9866 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9870 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9872 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9874 2002-04-03 Richard Henderson <rth@redhat.com>
9876 * cp-lang.c (cxx_warn_unused_global_decl): New.
9877 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9879 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9881 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9882 * tree.c (init_tree): Don't set hook.
9884 2002-04-03 Roger Sayle <roger@eyesopen.com>
9887 * decl.c (duplicate_decls): Don't mess with assembler names when
9888 redeclaring builtin functions as static.
9890 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9892 * call.c (build_addr_func): Update.
9893 * class.c (resolve_address_of_overloaded_function): Update.
9894 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9895 * cp-tree.h (cxx_mark_addressable): New.
9896 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9897 * decl2.c (build_cleanup): Update.
9898 * except.c (build_throw): Update.
9899 * init.c (resolve_offset_ref): Update.
9900 * pt.c (convert_nontype_argument): Update.
9901 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9902 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9903 unary_complex_lvalue): Update.
9904 (mark_addressable): Rename.
9906 2002-04-01 Roger Sayle <roger@eyesopen.com>
9909 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9910 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9911 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9913 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9915 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9916 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9917 * decl.c (grokdeclarator): Update.
9918 * mangle.c (write_integer_cst): Update.
9919 * typeck.c (build_binary_op): Update.
9921 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9923 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9924 * lex.c (cxx_init): Don't set hook.
9926 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9928 * Make-lang.in (error.o): Update.
9929 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9930 * cp-tree.h (struct diagnostic_context): Predeclare.
9931 (cxx_print_error_function): New.
9932 * error.c: Include langhooks-def.h.
9933 (lang_print_error_function): Rename. Update.
9934 (init_error): Don't set hook.
9936 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9938 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9940 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9941 * decl.c (finish_enum): Similarly.
9942 * error.c (dump_type): Similarly.
9943 * lex.c (cxx_init): Similarly.
9944 * mangle.c (write_builtin_type): Similarly.
9945 * typeck.c (comptypes): Similarly.
9947 2002-03-28 Roger Sayle <roger@eyesopen.com>
9950 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9951 in the g++ front-end.
9952 (duplicate_decl): Allow redefinition of anticipated built-ins.
9953 Fix inlining problem by over-writing the old DECL_RTL.
9954 (lookup_namespace_name): Fail to find an identifier in the
9955 specified namespace if its still anticipated.
9956 (builtin_function_1): New function split out from builtin_function
9957 to create a builtin in the current namespace with given context.
9958 (builtin_function): Call builtin_function_1 to define the
9959 appropriate builtins in both the std and global namespaces.
9960 (select_decl): Don't test for anticipated decls here.
9961 (unqualified_namespace_lookup): Instead ignore them whilst
9962 searching through scopes and namespaces.
9963 * decl2.c (do_nonmember_using_decl): If a using declaration
9964 specifies an anticipated built-in function, mark it as no longer
9965 anticipated in that scope.
9966 (ambiguous_decl): Avoid resolving to an anticipated decl.
9967 * lex.c (do_scoped_id): Fail to find an identifier in the global
9968 namespace if its still anticipated.
9970 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9972 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9973 * cp-tree.h (cp_make_lang_type): Rename.
9974 * lex.c (cp_make_lang_type): Rename.
9975 (make_aggr_type): Update.
9976 * tree.c (init_tree): Don't set make_lang_type_fn.
9978 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9981 * class.c (finish_struct_1): Update static field's DECL_MODE even
9982 if its type is a variant of t.
9984 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9986 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9987 * cp-tree.h (cxx_insert_default_attributes): New.
9988 * decl.c (insert_default_attributes): Rename.
9990 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9993 * call.c (build_op_delete_call): Allow for the fact the placement
9994 may be a COMPOUND_EXPR.
9996 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9998 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9999 * cp-tree.h (init_cplus_expand): Remove.
10000 (cxx_expand_expr): New.
10001 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
10003 (init_cplus_expand): Remove.
10004 * lex.c (cxx_init): Don't call init_cplus_expand.
10006 2002-03-26 Mark Mitchell <mark@codesourcery.com>
10009 * init.c (build_new_1): Allow for the fact the result of
10010 build_function_call may be a COMPOUND_EXPR.
10012 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
10015 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
10016 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10017 (dfs_skip_nonprimary_vbases_markedp): Remove.
10018 * search.c (get_shared_vbase_if_not_primary): Remove.
10019 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10020 (dfs_skip_nonprimary_vbases_markedp): Remove.
10021 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
10022 (dfs_marked_real_bases_queue_p): Likewise.
10024 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
10026 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
10027 * cp-tree.h (cxx_mark_tree): New.
10028 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
10030 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
10032 * cp-tree.h (cxx_maybe_build_cleanup): New.
10033 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
10034 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
10035 * tree.c (build_target_expr): Update.
10036 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
10038 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
10040 * decl2.c (cxx_decode_option): Handle -E.
10041 * lang-specs.h (default_compilers): Preprocess with cc1plus.
10042 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
10044 2002-03-23 Jakub Jelinek <jakub@redhat.com>
10047 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
10049 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10051 * error.c (dump_type): Be careful about implicit typenames.
10053 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10056 * semantics.c (finish_base_specifier): Handle erronous base
10059 2002-03-22 Zack Weinberg <zack@codesourcery.com>
10061 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
10062 REAL_IS_NOT_DOUBLE.
10064 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
10066 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
10067 an index into the vtable_entry array regardless of
10068 TARGET_PTRMEMFUNC_VBIT_LOCATION.
10070 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
10072 * tree.c (cp_cannot_inline_tree_fn): Same.
10074 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
10076 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
10077 insert_block, getdecls, global_bindings_p): New.
10079 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
10082 * mangle.c (struct globals) Add internal_mangling_p member.
10083 (write_template_param): Do internal mangling, if needed.
10084 (mangle_conv_op_name_for_type): Request internal mangling.
10086 2002-03-20 Jason Merrill <jason@redhat.com>
10089 * init.c (build_delete): Check access for a member op delete here.
10090 * decl2.c (delete_sanity): Not here.
10092 2002-03-19 Jason Merrill <jason@redhat.com>
10095 * class.c (get_vfield_name): Use the constructor_name.
10097 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
10099 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10100 * cp-tree.h (lang_printable_name): Rename.
10101 * error.c (lang_decl_name): Use new hook.
10102 * lex.c (cxx_init): Remove old hook.
10103 * pt.c (tsubst_decl): Use new hook.
10104 * tree.c (lang_printable_name): Rename.
10106 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
10109 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10110 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10111 only after recording the declaration.
10113 2002-03-18 Jason Merrill <jason@redhat.com>
10116 * init.c (resolve_offset_ref): Hand off to build_component_ref.
10118 PR c++/4222, c++/5995
10119 * call.c (build_over_call): Fix empty class logic.
10122 * cp-tree.h (struct saved_scope): Add last_parms field.
10123 * decl.c (maybe_push_to_top_level): Save last_function_parms.
10124 (pop_from_top_level): Restore it.
10127 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10131 * pt.c (tsubst_friend_function): Use decl_namespace_context.
10133 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10134 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10135 type with a nontrivial destructor.
10137 2002-03-17 Jason Merrill <jason@redhat.com>
10140 * class.c (build_base_path): Virtual base layout is fixed in
10141 in-charge [cd]tors.
10143 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
10145 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10146 * parse.y (yyparse): Remove macro.
10148 2002-03-17 Jason Merrill <jason@redhat.com>
10151 * init.c (build_new_1): Pass the right pointer to op delete.
10153 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
10156 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10157 conversion operators go.
10158 (struct lang_decl_flags): Add template_conv_p and unused
10160 (DECL_TEMPLATE_CONV_FN_P): New macro.
10161 * call.c (build_user_type_conversion_1): Don't check second type
10162 conversion of overload set first.
10163 * class.c (add_method): Make sure templated conversion operators
10164 all end up on slot 2.
10165 * lex.c (do_identifier): A conversion operator token might be
10166 satisfied by a templated conversion operator.
10167 * pt.c (check_explicit_specialization): Use
10168 CLASSTYPE_FIRST_CONVERSION_SLOT.
10169 (template_parm_this_level_p): New function.
10170 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10171 * search.c (lookup_fnfields_1): Template conversions will be on
10173 * typeck.c (build_component_ref): Preserve the type of an
10174 conversion operator name on the overload type.
10175 (build_x_function_call): Retrieve the conversion operator name.
10177 2002-03-15 Richard Henderson <rth@redhat.com>
10179 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10181 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10183 * cp-tree.h (CLEANUP_DECL): Remove.
10184 (CLEANUP_EXPR): Likewise.
10185 * decl.c (destroy_local_var): Simplify.
10186 (maybe_build_cleanup): Tidy.
10187 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10188 * semantics.c (cp_expand_stmt): Likewise.
10189 * cp/tree.c (cp_statement_code_p): Likewise.
10191 2002-03-15 Jason Merrill <jason@redhat.com>
10194 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10195 * typeck.c (common_type): Just hand off to
10196 type_after_usual_arithmetic_conversions and
10197 composite_pointer_type.
10198 (merge_types): New fn.
10199 (commonparms): Use it instead of common_type.
10200 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10201 (composite_pointer_type): Also handle attributes.
10202 * cp-tree.h: Declare merge_types.
10204 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10206 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10208 2002-03-14 Richard Henderson <rth@redhat.com>
10210 * decl.c: Include c-pragma.h.
10211 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10212 * Make-lang.in: Update dependencies.
10214 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10217 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10218 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10220 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10222 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10223 they are not a standard integer type.
10225 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10227 * cp-tree.h (init_init_processing): Remove declaration.
10228 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10229 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10231 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10233 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10235 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10237 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10238 cplus_tree_code_name): Delete.
10239 (cxx_init): Don't call add_c_tree_codes, instead set
10240 lang_unsafe_for_reeval. Don't try to copy into the various
10243 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10246 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10247 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10250 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10252 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10253 DR209 is now not a defect.
10254 * cp-tree.h (skip_type_access_control): Remove.
10255 * decl.c (grokdeclarator): Do type access control for friend
10257 * semantics.c (decl_type_access_control): Don't reset
10258 current_type_lookups.
10259 (save_type_access_control): Always save the lookups.
10260 (skip_type_access_control): Remove.
10261 (finish_class_definition): Don't change type_lookups.
10263 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10265 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10267 * typeck.c (build_static_cast): Compare non-qualified types
10268 with pointer to member conversions.
10270 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10271 Daniel Berlin <dan@dberlin.org>
10273 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10274 (cxx_get_alias_set): Use it.
10276 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10278 * cp-tree.h (stabilize_expr): Prototype.
10280 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10282 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10283 conditional return void.
10285 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10287 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10288 * cp-tree.h (cxx_unsave): New.
10289 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10290 (init_tree): Update.
10292 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10294 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10295 explicit sizeof/sizeof.
10296 * decl2.c (cxx_decode_option): Likewise.
10297 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10299 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10302 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10303 class/union mismatch.
10304 * parse.y (check_class_key): New function.
10305 (structsp): Call it.
10307 2002-03-01 Michael Matz <matz@suse.de>
10309 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10310 used later by size_in_bytes().
10312 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10314 * cp-tree.h: Require __GNUC__ to be #defined.
10315 (build_init): Add missing prototype.
10317 2002-03-01 Jason Merrill <jason@redhat.com>
10319 * except.c: Don't include decl.h or obstack.h. Do include
10321 (build_throw): Destroy temporaries from the thrown
10322 expression before calling __cxa_throw. Construct a thrown
10323 temporary directly into the exception object.
10324 (stabilize_throw_expr): New function.
10325 (wrap_cleanups_r): New function.
10326 * tree.c (stabilize_expr): New function.
10327 * init.c (build_init): New function.
10328 * Make-lang.in (cp/except.o): Adjust .h deps.
10330 2002-02-28 Jason Merrill <jason@redhat.com>
10332 * search.c (lookup_base_r): Don't clear is_non_public just because
10333 we found a friendly scope.
10335 * decl.c (finish_function): Only warn about missing return
10336 statement with -Wreturn-type.
10338 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10340 * class.c (build_clone): Update.
10341 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10342 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10343 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10344 (copy_decl): Update.
10345 * method.c (make_thunk): Update.
10347 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10349 * decl2.c: Delete traditional-mode-related code copied from
10350 the C front end but not used, or used only to permit the
10353 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10356 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10359 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10362 * semantics.c (finish_switch_cond): Don't call get_unwidened
10363 if error_mark_node.
10365 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10367 PR c++/2645, DR 295
10368 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10370 (make_typename_type): Use tsubst_flags_t.
10371 * decl.c (make_typename_type): Adjust. Return non-artificial
10372 TYPE_DECLs, if required.
10373 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10374 qualifiers on typedef types.
10375 * decl2.c (handle_class_head): Adjust make_typename_type call.
10376 * parse.y (nested_name_specifier): Likewise.
10377 (typename_sub0): Likewise.
10378 (typename_sub1): Likewise.
10379 * pt.c (convert_template_argument): Adjust make_typename_type
10381 (tsubst): Adjust cp_build_qualified_type_real calls.
10382 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10383 on template type parms.
10384 (instantiate_decl): Recheck substitutions to give warnings on bad
10386 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10388 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10390 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10392 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10393 unless DECL_ALWAYS_INLINE.
10395 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10397 * typeck.c (cp_pointer_int_sum): Renamed from
10398 pointer_int_sum, call pointer_int_sum.
10400 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10402 * decl.c (duplicate_decls): Return 0 if issued error about
10405 2002-02-19 Jason Merrill <jason@redhat.com>
10407 ABI change: Mangle `void (A::*)() const' as
10408 M1AKFvvE, not MK1AFvvE.
10409 * mangle.c (write_function_type): Write cv-quals for member
10410 function type here.
10411 (write_pointer_to_member_type): Not here.
10413 2002-02-18 Jason Merrill <jason@redhat.com>
10415 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10416 (do_decl_instantiation): Likewise.
10418 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10421 * decl.c (duplicate_decls): Make warning unconditional
10422 if duplicate default argument declarations are present.
10424 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10426 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10429 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10431 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10432 remove incorrect comment. Move #if 0'd code to common path. Use
10433 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10435 2002-02-13 Jason Merrill <jason@redhat.com>
10437 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10438 (finish_function): Don't warn if current_function_returns_null.
10440 * typeck2.c (digest_init): Do handle values of vector type.
10442 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10445 2002-02-11 Jason Merrill <jason@redhat.com>
10447 * parse.y (reserved_declspecs): Don't handle attributes.
10448 (reserved_typespecquals): Handle them here.
10449 * Make-lang.in (parse.c): Adjust expected conflicts.
10451 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10453 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10454 instead of compstmt.
10455 (compstmt_or_stmtexpr): Renamed from compstmt.
10456 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10458 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10460 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10461 * cp-tree.h (instantiate_type_flags): Rename to ...
10462 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10463 add tf_warning flag.
10464 (instantiate_type): Adjust prototype.
10465 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10466 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10467 cp_build_qualified_type: Adjust.
10468 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10470 * call.c (standard_conversion): Rename itf_* to tf_*.
10471 (reference_binding): Likewise.
10472 (convert_like_real): Likewise.
10473 * cvt.c (cp_convert_to_pointer): Likewise.
10474 (convert_to_reference): Likewise.
10475 * decl.c (lookup_namespace_name): Use tf_* flags.
10476 (make_typename_type): Likewise.
10477 (grokdeclarator): Likewise.
10478 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10479 (coerce_template_template_parms, convert_template_argument,
10480 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10481 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10482 instantiate_class_template, tsubst_template_arg_vector,
10483 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10484 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10485 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10486 instantiate_template, fn_type_unification,
10487 resolve_overloaded_unification, verify_class_unification,
10488 unify, get_bindings_real, do_type_instantiation,
10489 regenerate_decl_from_template, instantiate_decl,
10490 tsubst_initializer_list, tsubst_enum,
10491 get_mostly_instantiated_function_type,
10492 invalid_nontype_parm_type_p): Likewise.
10493 * tree.c (cp_build_qualified_type_real): Likewise.
10494 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10495 (build_ptrmemfunc): Likewise.
10496 (convert_for_assignment): Likewise.
10498 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10501 * decl.c (grokdeclarator): Allow friend declarations from
10503 * decl2.c (handle_class_head): Don't push into template parm contexts.
10504 * pt.c (push_template_decl_real): Template parm contexts are never
10507 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10509 * class.c: Include target.h.
10510 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10511 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10513 * Make-lang.in: Adjust deps.
10515 2002-02-05 Jason Merrill <jason@redhat.com>
10517 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10519 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10521 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10522 (finish_switch_cond): Set SWITCH_TYPE.
10524 2002-02-04 Richard Henderson <rth@redhat.com>
10526 * method.c (use_thunk): Always initialize the block tree. Reindent.
10527 * semantics.c (expand_body): Emit thunks after function, not before.
10529 2002-02-04 Jason Merrill <jason@redhat.com>
10531 * decl.c (start_function): Call cplus_decl_attributes immediately
10532 after grokdeclarator.
10534 * decl.c (start_function): Combine DECL_RESULT handling code.
10536 2002-02-03 Jason Merrill <jason@redhat.com>
10539 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10540 (cp/xref.o): Remove dependencies.
10541 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10542 (finish_struct_1): Likewise.
10543 * friend.c (make_friend_class): Likewise.
10544 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10545 * spew.c (read_process_identifier): Likewise.
10547 2002-02-01 Jason Merrill <jason@redhat.com>
10550 * decl.c (finish_function): Warn about a non-void function with
10551 no return statement and no abnormal exit.
10552 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10553 (current_function_returns_abnormally): New macro.
10554 * call.c (build_call): Set it.
10556 * typeck.c (build_component_ref): Always complain about offsetof
10557 constructs on non-PODs. Only make it an error for members of
10560 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10561 (dump_function_decl): Always dump parms.
10563 * decl2.c (finish_static_data_member_decl): Complain about a local
10564 class with a static data member.
10567 * search.c (lookup_field_1): Don't xref a static data member
10568 just because we looked it up.
10570 2002-01-31 Jason Merrill <jason@redhat.com>
10572 * Make-lang.in (parse.c): Handle .output file.
10575 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10577 * semantics.c (finish_class_definition): Adjust.
10579 Allow attributes in parms and casts.
10580 * parse.y (named_parm): Don't strip attrs.
10581 (declmods): Remove 'attributes' production.
10582 (nonempty_cv_qualifiers): Accept attributes.
10583 (ATTRIBUTE): Give precedence.
10584 * decl.c (groktypename): Handle attributes.
10585 (grokparms): Likewise.
10587 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10589 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10591 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10592 when used together with cc1_options.
10594 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10597 * typeck2.c (digest_init): Make sure non-array core type is
10599 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10600 constructor, rather than build a new one.
10601 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10602 PURPOSE of constructor elts.
10604 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10606 * Make-lang.in (parse.c): Adjust expected number of
10607 shift-reduce conflicts.
10608 (decl.o): Depend on diagnostic.h.
10609 * decl.c: Include diagnostic.h.
10610 (grokdeclarator): Check for null pointer.
10611 (finish_function): Don't abort when
10612 current_binding_level->parm_flag != 1, if errors have
10613 occurred; throw away the statement tree and extra binding
10614 levels, and continue.
10615 * lex.c (note_list_got_semicolon): Check for null pointer.
10616 * method.c (hack_identifier): Just return error_mark_node if
10617 value is error_mark_node.
10618 * parse.y (primary: TYPEID(type_id)): No need to use
10619 TYPE_MAIN_VARIANT here.
10620 (handler_seq): Accept an empty list of catch clauses and
10621 generate a fake handler block to avoid later crashes.
10622 (ansi_raise_identifier): Accept the error token too.
10623 * semantics.c (begin_class_definition,
10624 finish_class_definition): Check for error_mark_node.
10626 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10628 * typeck2.c (friendly_abort): Delete definition.
10629 * cp-tree.h (friendly_abort): Don't prototype.
10630 (my_friendly_assert): Use fancy_abort.
10632 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10634 * cp-tree.h (my_friendly_abort): Remove.
10636 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10638 * spew.c (pending_inlines, pending_inlines_tail,
10639 processing_these_inlines): Make static.
10640 (mark_pending_inlines): Remove static.
10641 (begin_parsing_inclass_inline): If in function, save pi
10642 for GC to cp_function_chain->unparsed_inlines instead.
10643 (process_next_inline): Likewise.
10644 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10645 (mark_pending_inlines): Add prototype.
10646 * decl.c (spew_debug): Remove unused extern.
10647 (mark_lang_function): Call mark_pending_inlines.
10649 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10651 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10652 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10653 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10654 Change my_fancy_abort() to abort().
10656 2002-01-23 Jason Merrill <jason@redhat.com>
10659 * class.c (fixed_type_or_null): Fix thinko.
10662 * init.c (resolve_offset_ref): Use build_indirect_ref.
10664 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10666 2002-01-22 Jason Merrill <jason@redhat.com>
10668 * parse.y (function_body): Suppress the block for the outermost
10670 * decl.c (pushdecl): Don't try to skip it.
10671 (begin_function_body): Keep the block we create, not the next one.
10672 * init.c (emit_base_init): Don't mess with keep_next_level.
10674 * class.c (build_base_path): Tweak formatting.
10676 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10678 Fix regression introduced with patch for c++/775
10679 * parse.y (class_head_defn): Check for template specializations
10680 with a different class-key.
10682 2002-01-17 Jason Merrill <jason@redhat.com>
10684 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10685 (begin_function_body): Call them and keep_next_level.
10686 * init.c (emit_base_init): Call keep_next_level.
10687 * semantics.c (setup_vtbl_ptr): Lose.
10688 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10689 (vtbls_set_up_p): Lose.
10690 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10691 * method.c (do_build_copy_constructor): Likewise.
10692 (synthesize_method): Call finish_mem_initializers.
10693 * parse.y (nodecls): Likewise.
10695 * error.c (dump_type_suffix): Print the exception specs before
10697 (dump_function_decl): Here, too.
10699 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10701 2002-01-10 Ira Ruben <ira@apple.com>
10704 * decl.c (start_method): Handle attrlist.
10706 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10708 * decl2.c (max_tinst_depth): Increase default limit to 500.
10710 2002-01-10 Graham Stott <grahams@redhat.com>
10712 * spew.c (YYCHAR): Uppercase macro parameter and add
10714 (YYCODE): Likewise.
10715 (NAME): Uppercase macro parameter.
10717 2002-01-09 Graham Stott <grahams@redhat.com>
10719 * decl.h (grokdeclarator): Wrap long line.
10721 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10724 2002-01-08 Graham Stott <grahams@redhat.com>
10726 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10727 (PALLOC): Uppercase macro parameter and whitespace.
10728 (SALLOC): Uppercase macro parameter.
10729 (SFREE): Uppercase macros parameter, add parenthese and
10731 (STREQL): Uppercase macro parameter and whitespace.
10732 (STRNEQ): Likewise.
10733 (STRLSS): Likewise.
10734 (STRLEQ): Likewise.
10735 (STRGTR): Likewise.
10736 (STRGEQ): Likewise.
10738 * call.c (convert_like): Add parenthesis and wrap.
10739 (convert_like_with_context): Likewise.
10740 (ICS_RANK): Whitespace.
10741 (NEED_TEMPORARY_P): Remove parenthesis.
10743 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10745 (VTT_MARKED_BINFO_P): Likewise.
10747 * decl.c (BINDING_LEVEL): Add parenthesis.
10748 (DEF_OPERATOR): Likewise.
10750 * mangle.c (MANGLE_TRACE): Add parenthesis.
10751 (MANGLE_TRACE_TREE): Likewise.
10752 (write_signed_number): Likewise.
10753 (write_unsigned_number): Likewise.
10755 * pt.c (ccat): Uppercase macro parameter.
10758 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10760 2002-01-07 Jason Merrill <jason@redhat.com>
10762 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10766 * method.c (make_thunk): If !flag_weak, give the thunk the
10767 function's linkage.
10768 (use_thunk): Here, too.
10770 2002-01-07 Graham Stott <grahams@redhat.com>
10772 * error.c: Update copyright date.
10773 (print_scope_operator): Add parenthesis.
10774 (print_left_paren): Likewise.
10775 (print_right_paren): Likewise.
10776 (print_left_bracket): Likewise.
10777 (print_right_bracket): Likewise.
10778 (print_template_argument_list_start): Likewise.
10779 (print_template_argument_list_end): Likewise.
10780 (print_non_consecutive_character): Likewise.
10781 (print_tree_identifier): Likewise.
10782 (print_identifier): Likewise.
10783 (NEXT_CODE): Uppercase macro parameter.
10784 (ident_fndecl): Delete unused.
10785 (GLOBAL_THING): Likewise.
10787 2002-01-06 Graham Stott <grahams@redhat.com>
10789 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10790 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10791 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10792 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10793 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10794 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10795 (C_RID_YYCODE) Likewise.
10796 (ptrmem_cst): Use rtx.
10797 (LOCAL_BINDING_P): Add whitespace.
10798 (INHERITED_VALUE_BINDING_P): Likewise.
10799 (BINDING_SCOPE): Wrap long line.
10800 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10801 (BINDING_VALUE): Wrap long line.
10802 (BINDING_TYPE): Whitespace.
10803 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10804 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10805 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10806 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10807 (same_type_p): Uppercase macro parameters.
10808 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10809 (OVL_FUNCTION): Wrap long line.
10810 (OVL_CHAIN): Whitespace.
10811 (OVL_CURRENT): Add parenthesis and whitespace.
10812 (OVL_NEXT): Whitespace.
10813 (OVL_USED): Likewise.
10814 (IDENTIFIER_TYPE_VALUE): Likewise.
10815 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10816 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10817 (LANG_ID_FIELD): Whitespace.
10818 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10819 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10820 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10821 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10822 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10823 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10824 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10825 (IDENTIFIER_VIRTUAL_P): Likewise.
10826 (IDENTIFIER_OPNAME_P): Likewise.
10827 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10828 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10829 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10830 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10831 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10832 (IS_AGGR_TYPE): Uppercase macro parameter.
10833 (CLASS_TYPE_P): Likewise.
10834 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10835 (IS_AGGR_TYPE_2): Whitespace.
10836 (TAGGED_TYPE_P): Uppercase macro parameter.
10837 (TYPE_BUILT_IN): Whitespace.
10838 (TYPE_FOR_JAVA): Likewise.
10839 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10840 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10841 (FUNCTION_FIRST_USER_PARAM): Likewise.
10842 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10843 (DERIVED_FROM_P): Add parenthesis and wrap.
10844 (UNIQUELY_DERIVED_FROM_P): Likewise.
10845 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10846 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10847 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10848 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10849 (TYPE_GETS_DELETE): Add parenthesis.
10850 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10851 (TYPE_HAS_ASSIGN_REF): Likewise,
10852 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10853 (TYPE_HAS_INIT_REF): Likewise.
10854 (TYPE_HAS_CONST_INIT_REF): Likewise.
10855 (TYPE_BEING_DEFINED): Likewise.
10856 (TYPE_LANG_SPECIFIC): Likewise.
10857 (CLASSTYPE_RTTI): Likewise.
10858 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10859 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10860 (TYPE_OVERLOADS_ARROW): Likewise.
10861 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10862 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10863 (CLASSTYPE_METHOD_VEC): Likewise.
10864 (CLASSTYPE_MARKED_N): Likewise.
10865 (CLASSTYPE_MARKED): Likewise.
10866 (CLASSTYPE_MARKED2): Likewise.
10867 (CLASSTYPE_MARKED3): Likewise.
10868 (CLASSTYPE_MARKED4): Likewise.
10869 (CLASSTYPE_MARKED5): Likewise.
10870 (CLASSTYPE_MARKED6): Likewise.
10871 (SET_CLASSTYPE_MARKED): Whitespace.
10872 (CLEAR_CLASSTYPE_MARKED): Likewise.
10873 (SET_CLASSTYPE_MARKED2): Likewise.
10874 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10875 (SET_CLASSTYPE_MARKED3): Likewise.
10876 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10877 (SET_CLASSTYPE_MARKED4): Likewise.
10878 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10879 (SET_CLASSTYPE_MARKED5): Likewise.
10880 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10881 (SET_CLASSTYPE_MARKED6): Likewise.
10882 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10883 (CLASSTYPE_TAGS): Likewise.
10884 (CLASSTYPE_VSIZE): Likewise.
10885 (CLASSTYPE_VBASECLASSES): Likewise.
10886 (CANONICAL_BINFO): Add parenthesis.
10887 (CLASSTYPE_SIZE(NODE): Likewise.
10888 (CLASSTYPE_SIZE_UNIT): Likewise.
10889 (CLASSTYPE_ALIGN(NODE): Likewise.
10890 (CLASSTYPE_USER_ALIGN): Likewise.
10891 (TYPE_JAVA_INTERFACE): Likewise.
10892 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10893 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10894 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10895 (CLASSTYPE_HAS_MUTABLE): Likewise.
10896 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10897 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10898 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10899 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10900 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10901 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10902 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10903 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10904 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10905 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10906 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10907 (BINFO_UNSHARED_MARKED): Whitespace.
10908 (BINFO_MARKED): Whitespace and wrap.
10909 (SET_BINFO_MARKED): Likewise.
10910 (CLEAR_BINFO_MARKED): Likewise.
10911 (BINFO_VTABLE_PATH_MARKED): Likewise.
10912 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10913 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10914 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10915 (BINFO_VPTR_INDEX): Likewise.
10916 (BINFO_PRIMARY_BASE_OF): Likewise,
10917 (CLASSTYPE_VFIELDS): Whitespace.
10918 (VF_DERIVED_VALUE): Wrap long line.
10919 (NAMESPACE_LEVEL): Whitespace.
10920 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10921 (DEFARG_POINTER): Whitespace.
10922 (DECL_NEEDED_P): Remove parenthesis.
10923 (DECL_LANGUAGE): Whitespace.
10924 (SET_DECL_LANGUAGE): Add parenthesis.
10925 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10926 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10927 (DECL_IN_AGGR_P): Whitespace.
10928 (DECL_FRIEND_P): Likewise.
10929 (DECL_BEFRIENDING_CLASSES): Likewise.
10930 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10931 (DECL_NONCONVERTING_P): Whitespace.
10932 (DECL_PURE_VIRTUAL_P): Likewise.
10933 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10934 (DECL_PENDING_INLINE_INFO): Whitespace.
10935 (DECL_SORTED_FIELDS): Likewise.
10936 (DECL_DEFERRED_FN): Likewise.
10937 (DECL_TEMPLATE_INFO): Likewise.
10938 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10939 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10940 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10941 (TMPL_ARGS_LEVEL): Likewise.
10942 (SET_TMPL_ARGS_LEVEL): Likewise.
10943 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10944 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10945 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10946 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10947 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10948 (TREE_HAS_CONSTRUCTOR): Likewise.
10949 (TYPE_HAS_DESTRUCTOR): Likewise.
10950 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10951 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10952 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10953 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10954 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10955 (TYPE_PTRMEMFUNC_P): Likewise.
10956 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10957 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10958 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10959 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10960 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10961 (DECL_ACCESS): Whitespace.
10962 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10963 (DECL_GLOBAL_DTOR_P): Likewise.
10964 (GLOBAL_INIT_PRIORITY): Likewise.
10965 (DECL_TEMPLATE_PARMS): Likewise.
10966 (DECL_TEMPLATE_RESULT): Likewise.
10967 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10968 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10969 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10970 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10971 (PRIMARY_TEMPLATE_P): Add parenthesis.
10972 (DECL_USE_TEMPLATE): Whitespace.
10973 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10974 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10975 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10976 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10977 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10978 (CALL_DECLARATOR_QUALS): Likewise.
10979 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10980 (TEMP_NAME_P): Wrap.
10981 (VFIELD_NAME_P): Likewise.
10982 (B_SET): Uppercase macro parameters and add parenthesis.
10985 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10986 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10987 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10988 (same_or_base_type_p): Likewise.
10989 (cp_deprecated): Likewise.
10991 2002-01-05 Richard Henderson <rth@redhat.com>
10993 * semantics.c (expand_body): Revert last change.
10995 2002-01-04 Jason Merrill <jason@redhat.com>
10998 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
11001 * class.c (build_vtbl_initializer): Check for a lost primary
11002 before calculating the vtable entry to throw away.
11004 2002-01-02 Jason Merrill <jason@redhat.com>
11006 * semantics.c (expand_body): Call outlining_inline_function when
11007 emitting an inline function out of line.
11009 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11011 PR c++/5116, c++/764 reversion
11012 * call.c (build_new_op): Revert the instantiations. They are
11015 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11018 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
11020 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11023 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
11024 (tsubst, case POINTER_TYPE): Handle pmfs here.
11025 (tsubst, case OFFSET_TYPE): Check it is not an offset to
11026 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
11028 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11031 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
11032 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
11033 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
11035 (tsubst_template_parms): Break up loop statements.
11036 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
11037 parm PARM_DECLs don't get promoted.
11039 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11042 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
11043 (build_x_function_call): Cope with a COMPONENT_REF containing a
11046 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11049 * pt.c (convert_template_argument): Be more careful determining
11050 when RECORD_TYPE templates are or are not templates.
11052 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11055 * cp-tree.h (handle_class_head): Adjust prototype.
11056 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
11057 parameters. Use for all class heads.
11058 * parse.y (named_class_head_sans_basetype, named_class_head,
11059 named_complex_class_head_sans_basetype,
11060 named_class_head_sans_basetype_defn,
11061 unnamed_class_head): Remove.
11062 (class_head, class_head_apparent_template): Recognize class heads
11063 (class_head_decl, class_head_defn): New reductions. Process class
11065 (structsp): Adjust class definition and class declaration
11067 (maybe_base_class_list): Give diagnostic on empty list.
11069 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11072 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
11073 single non-static member.
11074 (unary_complex_lvalue): If it cannot be a pointer to member, don't
11075 make it so. Check it is not pointer to reference.
11077 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11080 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11081 are processing a template decl.
11083 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11085 PR c++/5116, c++/764
11086 * call.c (build_new_op): Make sure template class operands are
11087 instantiated. Simplify arglist construction.
11089 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11091 * call.c (build_user_type_conversion_1): Use my_friendly_assert
11092 rather than if ... abort.
11093 * cvt.c (convert_to_reference): Likewise.
11094 * semantics.c (setup_vtbl_ptr): Likewise.
11095 * pt.c (lookup_template_class): Comment typo.
11097 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11100 * pt.c (push_template_decl_real): Make sure DECL has
11101 DECL_LANG_SPECIFIC.
11103 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11106 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11107 for non-reference fields.
11108 * typeck.c (require_complete_type): Use resolve_offset_ref).
11110 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
11113 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11115 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
11118 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11119 up. Don't stabilize_references when initializing a reference.
11121 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11123 * decl2.c (lang_f_options): Const-ify.
11125 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
11127 * config-lang.in (diff_excludes): Remove.
11129 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
11132 * typeck.c (build_function_call_real): Use original function
11133 expression for errors.
11135 2001-12-18 Jason Merrill <jason@redhat.com>
11138 * class.c (add_method): Do compare 'this' quals when trying to match a
11139 used function. Don't defer to another used function.
11141 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11143 * pt.c (instantiate_clone): Remove, fold into ...
11144 (instantiate_template): ... here. Simplify by removing mutual
11146 * typeck2.c (build_m_component_ref): Don't cv qualify the function
11147 pointed to by a pointer to function.
11148 * class.c (delete_duplicate_fields_1): Typo.
11150 2001-12-18 Jason Merrill <jason@redhat.com>
11152 C++ ABI change: destroy value arguments in caller.
11153 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11154 create an extra binding level for the parameters.
11155 * decl.c (store_parm_decls): Don't do parameter cleanups.
11157 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11159 * call.c (build_new_method_call): Use '%#V'.
11160 * error.c (cv_to_string): Use V parameter to determine padding.
11162 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11164 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11165 spellings in messages.
11167 2001-12-17 Zack Weinberg <zack@codesourcery.com>
11169 * cp-tree.h: Delete #defines for cp_error, cp_warning,
11170 cp_pedwarn, and cp_compiler_error.
11171 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11172 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11173 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11174 typeck2.c: Change calls to the above macros to use their
11175 language-independent equivalents: error, warning, pedwarn, and
11176 internal_error respectively.
11178 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11180 * decl2.c (finish_file): Remove back_end_hook.
11182 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11184 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11185 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11186 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11188 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11190 * lang-options.h: Use American spelling in messages.
11192 2001-12-13 Jason Merrill <jason@redhat.com>
11194 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11196 Use cleanups to run base and member destructors.
11197 * init.c (push_base_cleanups): New function, split out from...
11198 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11199 * decl.c (finish_destructor_body): Move vbase destruction code to
11200 push_base_cleanups.
11201 (begin_function_body, finish_function_body): New fns.
11202 (finish_function): Move [cd]tor handling and call_poplevel to
11203 finish_function_body.
11204 (pushdecl): Skip the new level.
11205 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11206 (setup_vtbl_ptr): Call push_base_cleanups.
11207 * method.c (synthesize_method): Call {begin,end}_function_body.
11208 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11209 * cp-tree.h: Declare new fns.
11210 * parse.y (function_body, .begin_function_body): New nonterminals.
11211 (fndef, pending_inline, function_try_block): Use function_body.
11212 (ctor_initializer_opt, function_try_block): No longer has a value.
11213 (base_init): Remove .set_base_init token.
11214 (.set_base_init, compstmt_or_error): Remove.
11215 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11217 * optimize.c (maybe_clone_body): Fix parameter updating.
11219 2001-12-12 Jason Merrill <jason@redhat.com>
11221 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11222 * semantics.c (genrtl_start_function): Don't pass
11223 parms_have_cleanups or push an extra binding level.
11224 (genrtl_finish_function): Lose cleanup_label cruft.
11226 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11227 (ctor_label): Remove.
11228 * semantics.c (finish_return_stmt): Lose ctor_label support.
11229 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11230 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11233 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11234 check for [cd]tors.
11235 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11237 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11239 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11240 (end_cleanup_fn): And poplevel.
11242 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11243 if we're in a template.
11245 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11247 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11248 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11249 THIS_NAME_P): Delete.
11250 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11251 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11252 with internal naming scheme.
11253 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11255 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11257 * decl.c (grokdeclarator): Deprecated implicit typename use.
11259 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11262 * parse.y (frob_specs): Indicate it is a language linkage which
11263 contained the extern.
11264 * decl.c (grokdeclarator): Allow extern language linkage with
11267 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11270 * decl.c (add_binding): Don't reject duplicate typedefs involving
11271 template parameters.
11273 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11275 * parse.y, semantics.c: Similarly.
11277 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11280 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11281 (copy_args_p): Rename to ...
11282 (copy_fn_p): ... here.
11283 (grok_special_member_properties): New function.
11284 (grok_op_properties): Lose VIRTUALP parameter.
11285 (copy_assignment_arg_p): Remove.
11286 * call.c (build_over_call): Use copy_fn_p.
11287 * decl.c (grokfndecl): Reformat. Adjust call to
11288 grok_op_properties.
11289 (copy_args_p): Rename to ...
11290 (copy_fn_p): ... here. Reject template functions. Check for pass
11292 (grok_special_member_properties): Remember special functions.
11293 (grok_ctor_properties): Don't remember them here, just check.
11294 (grok_op_properties): Likewise.
11295 (start_method): Call grok_special_member_properties.
11296 * decl2.c (grokfield): Likewise.
11297 (copy_assignment_arg_p): Remove.
11298 (grok_function_init): Don't remember abstract assignment here.
11299 * pt.c (instantiate_class_template): Call
11300 grok_special_member_properties.
11301 (tsubst_decl): Adjust grok_op_properties call.
11303 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11305 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11306 RID_TYPES_COMPATIBLE_P.
11308 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11310 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11311 call to build_aggr_init.
11312 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11314 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11316 * parse.y: Replace uses of the string non-terminal with STRING.
11317 Don't perform string concatentaion here.
11318 (string): Remove non-terminal.
11319 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11321 2001-12-05 Jason Merrill <jason@redhat.com>
11323 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11324 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11325 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11326 * pt.c (push_tinst_level): No longer static.
11327 * cp-tree.h: Declare them.
11329 * init.c (resolve_offset_ref): Don't check access for the base
11330 conversion to access a FIELD_DECL.
11332 * cp-tree.h (TYPE_REFFN_P): New macro.
11333 * decl.c (bad_specifiers): Check it, too.
11335 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11336 on the __*_type_info type if we haven't seen a definition.
11338 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11340 * decl.c: Include c-common.h.
11341 (shadow_warning): Move to c-common.c.
11343 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11345 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11347 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11349 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11351 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11354 * init.c (sort_base_init): Allow binfos to be directly specified.
11355 * method.c (do_build_copy_constructor): Explicitly convert to the
11357 (do_build_assign_ref): Likewise.
11359 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11361 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11362 declaration and initialization.
11364 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11366 * typeck2.c: Remove leading capital from diagnostic messages, as
11367 per GNU coding standards.
11369 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11372 * decl.c (xref_basetypes): Handle attributes between
11375 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11378 * parse.y (named_complex_class_head_sans_basetype): Add new
11380 * Make-lang.in (parse.c): Adjust expected conflict count.
11382 2001-12-03 Jason Merrill <jason@redhat.com>
11384 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11385 immediate binfos for our virtual bases.
11387 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11389 * call.c (build_java_interface_fn_ref): Similarly.
11390 * except.c (is_admissible_throw_operand): Similarly.
11391 * init.c (build_java_class_ref): Similarly.
11392 * xref.c (open_xref_file): Similarly.
11394 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11396 * class.c (finish_struct): Remove trailing periods from messages.
11397 * decl.c (check_tag_decl): Similarly.
11398 * lex.c (cxx_set_yydebug): Similarly.
11399 * typeck2.c (friendly_abort): Similarly.
11401 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11404 * cp-tree.h (ovl_member): Remove.
11405 * decl2.c (merge_functions): Handle extern "C" functions
11407 * tree.c (ovl_member): Remove.
11409 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11412 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11413 FUNCTION_DECL, as input.
11414 (mark_overriders): Remove.
11415 (warn_hidden): Rework for the new ABI.
11417 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11420 * call.c (convert_like_real): Do not build additional temporaries
11421 for rvalues of class type.
11423 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11425 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11426 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11427 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11428 (DERIVED_FROM_P): Likewise.
11429 (enum base_access): Renumber, add ba_quiet bit mask.
11430 (get_binfo): Remove.
11431 (get_base_distance): Remove.
11432 (binfo_value): Remove.
11433 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11434 * call.c (standard_conversion): Use lookup_base.
11435 * class.c (strictly_overrides): Likewise.
11436 (layout_virtual_bases): Likewise.
11437 (warn_about_ambiguous_direct_bases): Likewise.
11438 (is_base_of_enclosing_class): Likewise.
11439 (add_vcall_offset_vtbl_entries_1): Likewise.
11440 * cvt.c (build_up_reference): Adjust comment.
11441 * init.c (build_member_call): Reformat.
11442 * search.c (get_binfo): Remove.
11443 (get_base_distance_recursive): Remove.
11444 (get_base_distance): Remove.
11445 (lookup_base_r): Tweak.
11446 (lookup_base): Add ba_quiet control. Complete the types here.
11447 (covariant_return_p): Use lookup_base.
11448 * tree.c (binfo_value): Remove.
11449 (maybe_dummy_object): Use lookup_base.
11450 * typeck.c (build_static_cast): Use lookup_base.
11451 (get_delta_difference): Likewise.
11452 * typeck2.c (binfo_or_else): Use lookup_base.
11453 (build_scoped_ref): Add back error_mark_check.
11454 (build_m_component_ref): Use lookup_base.
11456 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11458 * Make-lang.in (c++.generated-manpages): New dummy target.
11460 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11462 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11463 * cp-lang.c (c-common.h): Include.
11464 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11465 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11466 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11468 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11470 * decl2.c (c_language): Move to c-common.c.
11471 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11473 (cxx_init): Update.
11475 2001-11-26 Jason Merrill <jason@redhat.com>
11477 * call.c (joust): Remove COND_EXPR hack.
11479 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11481 * search.c (lookup_base_r): Declare bk in variable declaration
11484 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11487 * class.c (build_vbase_pointer): Remove.
11488 (build_vbase_path): Remove.
11489 (build_base_path): New function.
11490 * cp-tree.h (base_access, base_kind): New enumerations.
11491 (build_base_path): Declare.
11492 (convert_pointer_to_real): Remove.
11493 (convert_pointer_to): Remove.
11494 (lookup_base): Declare.
11495 (convert_pointer_to_vbase): Remove.
11496 * call.c (build_scoped_method_call): Use lookup_base &
11497 build_base_path instead of convert_pointer_to_real,
11498 get_base_distance & get_binfo.
11499 (build_over_call): Likewise.
11500 * cvt.c (cp_convert_to_pointer): Likewise.
11501 (convert_to_pointer_force): Likewise.
11502 (build_up_reference): Likewise.
11503 (convert_pointer_to_real): Remove.
11504 (convert_pointer_to): Remove.
11505 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11506 instead of convert_pointer_to_vbase & build_vbase_path.
11507 (emit_base_init): Use build_base_path instead of
11508 convert_pointer_to_real.
11509 (expand_virtual_init): Lose unrequired conversions.
11510 (resolve_offset_ref): Use lookup_base and build_base_path
11511 instead of convert_pointer_to.
11512 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11513 build_base_path instead of get_base_distance & build_vbase_path.
11514 * search.c (get_vbase_1): Remove.
11515 (get_vbase): Remove.
11516 (convert_pointer_to_vbase): Remove.
11517 (lookup_base_r): New function.
11518 (lookup_base): New function.
11519 * typeck.c (require_complete_type): Use lookup_base &
11520 build_base_path instead of convert_pointer_to.
11521 (build_component_ref): Likewise.
11522 (build_x_function_call): Likewise.
11523 (get_member_function_from_ptrfunc): Likewise.
11524 (build_component_addr): Likewise.
11525 * typeck2.c (build_scoped_ref): Likewise.
11527 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11529 * cp-tree.h (CP_TYPE_QUALS): Removed.
11530 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11531 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11532 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11533 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11534 lang-hooks prototype.
11535 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11536 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11537 CP_TYPE_QUALS changed to cp_type_quals.
11538 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11539 (CXX_C_OBJS): Remove c-dump.o.
11541 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11544 * pt.c (lookup_template_class): Ensure that all specializations
11545 are registered on the list corresponding to the most general
11548 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11550 * call.c (non_reference): Add documentation.
11551 (convert_class_to_reference): Do not strip reference types
11552 from conversion operators.
11553 (maybe_handle_ref_bind): Simplify.
11554 (compare_ics): Correct handling of references.
11556 2001-11-19 John Wilkinson <johnw@research.att.com>
11558 * dump.c (dump_op): New function.
11559 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11560 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11561 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11563 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11566 * semantics.c (finish_sizeof): Make sure that expression created
11567 while processing a template do not have a type.
11568 (finish_alignof): Likewise.
11569 * typeck.c (c_sizeof): Likewise.
11570 (expr_sizeof): Likewise.
11572 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11574 * lex.c (cxx_finish): Call c_common_finish.
11575 (finish_parse): Remove.
11577 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11579 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11580 when displaying error message about missing array bounds.
11582 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11584 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11586 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11588 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11590 * cp-tree.h (print_class_statistics): Restore.
11592 2001-11-15 Jason Merrill <jason@redhat.com>
11594 * method.c (use_thunk): Don't emit debugging information for thunks.
11596 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11597 * decl.c (make_typename_type): Handle getting a class template.
11598 * search.c (lookup_field_r): A class template is good enough for
11601 * call.c (convert_like_real): Only use cp_convert for the bad part.
11602 (standard_conversion): Also allow bad int->enum.
11603 * typeck.c (ptr_reasonably_similar): Also allow functions to
11604 interconvert. Pointers to same-size integers are reasonably
11607 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11610 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11613 * init.c (sort_base_init): Remove unreachable code.
11614 (expand_member_init): Adjust comment to reflect reality. Simplify
11615 and remove unreachable code.
11617 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11619 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11620 (cxx_init): Update prototype.
11621 * decl.c (init_decl_processing): Rename. Move null node init
11622 to its creation time.
11623 * lex.c (cxx_init_options): Update.
11624 (cxx_init): Combine with old init_parse; also call
11625 cxx_init_decl_processing.
11627 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11629 * decl.c (check_initializer): Try to complete the type of an
11630 array element before checking whether it's complete. Don't
11631 complain about arrays with complete element types but an
11633 (cp_finish_decl): Build the hierarchical constructor before
11634 calling maybe_deduce_size_from_array_init.
11636 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11638 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11640 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11643 * parse.y (already_scoped_stmt): Remove.
11644 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11646 2001-11-12 H.J. Lu <hjl@gnu.org>
11648 * cvt.c (ocp_convert): Don't warn the address of a weak
11649 function is always `true'.
11651 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11653 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11654 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11655 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11656 * cp-tree.h (print_class_statistics): Remove.
11657 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11658 cxx_print_identifier, cxx_set_yydebug): New.
11659 * lex.c (set_yydebug): Rename c_set_yydebug.
11660 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11661 lang_print_xnode): Rename.
11662 * tree.c (print_lang_statistics): Rename.
11664 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11666 * class.c (dump_array): Fix format specifier warning.
11668 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11670 * cp-lang.c (LANG_HOOKS_NAME): Override.
11671 (struct lang_hooks): Constify.
11672 * lex.c (cxx_init_options): Update.
11673 (lang_identify): Remove.
11674 * parse.y (language_string): Remove.
11676 2001-11-08 Andreas Franck <afranck@gmx.de>
11678 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11679 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11680 suggested by autoconf.
11681 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11682 (c++.install-common): Use the transformed target alias names.
11684 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11686 * Make-lang.in: Update.
11687 * cp-lang.c: Include langhooks-def.h.
11689 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11691 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11693 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11695 * lex.c (copy_lang_type): Add static prototype.
11697 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11699 * pt.c (unify): Handle SCOPE_REF.
11701 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11703 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11704 DECL_ABSTRACT_ORIGIN for the return variable.
11706 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11708 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11710 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11712 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11713 semantics.c, spew.c: Fix spelling errors.
11715 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11717 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11719 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11721 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11724 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11726 * cp-lang.c (cxx_get_alias_set): New function.
11727 Point LANG_HOOKS_GET_ALIAS_SET to it.
11729 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11731 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11732 * cp-tree.h (make_unbound_class_template): Prototype new function.
11733 * decl.c (make_unbound_class_template): New function.
11734 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11735 * error.c (dump_type): Likewise.
11736 * mangle.c (write_type): Likewise.
11737 * parse.y (template_parm): Likewise.
11738 (template_argument): Use make_unbound_class_template.
11739 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11740 (tsubst): Likewise.
11741 (tsubst_copy): Likewise.
11743 * tree.c (walk_tree): Likewise.
11744 * typeck.c (comptypes): Likewise.
11746 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11748 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11749 extra calls into fewer ones.
11751 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11753 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11754 Warn when merging inline with attribute noinline.
11755 (start_decl, start_function): Warn if inline and attribute
11756 noinline appear in the same declaration.
11758 2001-10-16 H.J. Lu <hjl@gnu.org>
11760 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11761 for tree checking disabled.
11763 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11765 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11766 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11768 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11770 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11771 (unify): Only handle MINUS_EXPR specially if the above flag is set
11772 and the subtracted constant is 1. Clear the flag on recursive calls.
11773 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11775 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11777 * decl.c (bad_specifiers): Don't allow exception specifications
11780 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11782 * cp/lex.c (init_cp_pragma): Similarly.
11784 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11786 * pt.c (lookup_template_class): Build complete template arguments
11787 for BOUND_TEMPLATE_TEMPLATE_PARM.
11789 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11791 * cp-tree.h (TYPE_BINFO): Update comment.
11792 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11793 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11794 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11795 (copy_type): Prototype new function.
11796 * lex.c (copy_lang_decl): Gather tree node statistics.
11797 (copy_lang_type): New function.
11798 (copy_type): Likewise.
11799 (cp_make_lang_type): Create lang_type for
11800 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11801 and BOUND_TEMPLATE_TEMPLATE_PARM.
11802 * pt.c (tsubst): Use copy_type instead of copy_node.
11803 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11805 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11807 * pt.c (determine_specialization): Ignore functions without
11808 DECL_TEMPLATE_INFO.
11810 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11813 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11815 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11817 * typeck2.c (store_init_value): Don't re-digest a bracketed
11820 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11823 2001-10-11 Richard Henderson <rth@redhat.com>
11825 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11826 of an asm statement.
11827 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11828 (build_vfn_ref): Use it to handle vtable descriptors before
11829 calling build_vtable_entry_ref.
11830 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11832 2001-10-10 Richard Henderson <rth@redhat.com>
11834 * parse.y (asm_operand): Allow named operands.
11835 * semantics.c (finish_asm_stmt): Tweek for changed location
11836 of the operand constraint.
11838 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11840 * call.c (standard_conversion): Add bad conversion between
11841 integers and pointers.
11842 (convert_like_real): Don't use convert_for_initialization for bad
11843 conversions; complain here and use cp_convert.
11844 (build_over_call): Don't handle bad conversions specially.
11845 (perform_implicit_conversion): Allow bad conversions.
11846 (can_convert_arg_bad): New fn.
11847 * cp-tree.h: Declare it.
11848 * typeck.c (convert_for_assignment): Use it.
11849 (ptr_reasonably_similar): Any target type is similar to void.
11851 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11853 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11854 (cp/cp-lang.o): New rule.
11855 * cp-tree.h: Declare hooks.
11856 * tree.c: Make hooks non-static.
11857 (init_tree): Don't initialize hooks here.
11858 * lex.c: Likewise. Move definition of lang_hooks to...
11859 * cp-lang.c: ... new file.
11861 2001-10-08 Richard Henderson <rth@redhat.com>
11863 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11864 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11866 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11868 * class.c (build_vtable_entry_ref): Const-ify.
11869 * decl.c (predefined_identifier,
11870 initialize_predefined_identifiers): Likewise.
11871 * init.c (build_new_1): Likewise.
11872 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11875 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11877 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11878 (INSNS_PER_STMT): Likewise.
11879 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11880 (copy_body, initialize_inlined_parameters): Likewise.
11881 (declare_return_variable, inlinable_function_p): Likewise.
11882 (expand_call_inline, expand_calls_inline): Likewise.
11883 (optimize_inline_calls, clone_body): Likewise.
11884 * tree.c (walk_tree): Moved to ../tree-inline.c.
11885 (walk_tree_without_duplicates): Likewise.
11886 (copy_tree_r, remap_save_expr): Likewise.
11888 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11890 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11891 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11892 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11893 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11894 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11895 (walk_tree): Moved declaration to ../tree-inline.h.
11896 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11897 (remap_save_expr): Likewise.
11898 * decl.c: Include tree-inline.h.
11899 (lang_mark_tree): Don't mark inlined_fns.
11900 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11901 * optimize.c: Include tree-inline.h.
11902 (optimize_inline_calls): Move declaration to ../tree.h, as
11904 (remap_decl): Use language-independent constructs and hooks.
11905 (remap_block, copy_body_r, declare_return_variable): Likewise.
11906 (inlinable_function_p): Likewise. Don't test for
11907 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11908 no longer language-specific.
11909 (optimize_inline_calls): Likewise. Make it non-static. Moved
11910 call of dump_function to...
11911 (optimize_function): Here...
11912 (clone_body): New function, extracted from...
11913 (maybe_clone_body): ... here. Build decl_map locally and pass
11914 it on to clone_body.
11915 * pt.c, semantics.c: Include tree-inline.h.
11916 * tree.c: Likewise.
11917 (cp_walk_subtrees): New language-specific hook for tree inlining.
11918 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11919 cp_is_overload_p, cp_auto_var_in_fn_p,
11920 cp_copy_res_decl_for_inlining): Likewise.
11921 (walk_tree): Move language-specific constructs into...
11922 (cp_walk_subtrees): this new function.
11923 (copy_tree_r): Use language-independent constructs and hooks.
11924 (init_tree): Initialize tree inlining hooks.
11925 (remap_save_expr): Adjust prototype so that the declaration
11926 does not require the definition of splay_tree.
11928 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11930 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11931 to build the declaration instead of the declaration itself.
11933 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11935 * decl2.c (cxx_decode_option): Add 'else'.
11937 * spew.c (end_input): No longer static.
11938 * cp-tree.h: Declare it.
11939 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11941 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11943 * call.c (build_over_call), typeck.c (build_function_call_real):
11944 Pass type attributes to check_function_format rather than name or
11945 assembler name. Don't require there to be a name or assembler
11946 name to check formats.
11948 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11950 * decl.c (init_decl_processing): Don't call
11951 init_function_format_info. Initialize lang_attribute_table
11953 (builtin_function): Call decl_attributes.
11954 (insert_default_attributes): New.
11956 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11958 * decl.c (grokdeclarator): Copy array typedef handling from C
11961 * decl.c (grokdeclarator): Copy too-large array handling from C
11964 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11966 * config-lang.in (target_libs): Added target-gperf, so that we
11967 don't try to build it if C++ is disabled.
11969 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11971 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11972 (cp/errfn.o): Delete rule.
11973 (cp/error.o): Depend on flags.h.
11974 * errfn.c: Delete file.
11975 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11976 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11977 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11978 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11979 internal_error respectively. Make cp_deprecated into a macro.
11980 Don't define cp_printer typedef or declare cp_printers.
11981 * error.c: Include flags.h.
11982 Delete: struct tree_formatting_info, print_function_argument_list,
11983 print_declaration, print_expression, print_function_declaration,
11984 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11985 print_type_specifier_seq, print_simple_type_specifier,
11986 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11987 print_parameter_declaration_clause, print_exception_specification,
11988 print_nested_name_specifier, and definition of cp_printers.
11989 (locate_error): New function.
11990 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11991 rewritten in terms of locate_error and diagnostic.c.
11992 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11993 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11994 (init_error): Adjust to match.
11996 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11998 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
12000 2001-09-21 Richard Henderson <rth@redhat.com>
12002 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
12003 (build_vtbl_initializer): Likewise.
12004 (build_vfn_ref): New.
12005 * cp-tree.h: Declare it.
12006 * call.c (build_over_call): Use it.
12007 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
12008 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
12010 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
12012 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
12014 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
12016 Table-driven attributes.
12017 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
12018 * decl2.c (cplus_decl_attributes): Only take one attributes
12020 * cp-tree.c (cplus_decl_attributes): Update prototype.
12021 * class.c (finish_struct), decl.c (start_decl, start_function),
12022 decl2.c (grokfield), friend.c (do_friend), parse.y
12023 (parse_bitfield): Update calls to cplus_decl_attributes.
12024 * decl.c (grokdeclarator): Take a pointer to a single ordinary
12026 * decl.h (grokdeclarator): Update prototype.
12027 * decl2.c (grokfield): Take a single ordinary attribute list.
12028 * friend.c (do_friend): Likewise.
12029 * decl.c (shadow_tag, groktypename, start_decl,
12030 start_handler_parms, grokdeclarator, grokparms, start_function,
12031 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
12032 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
12033 (process_template_parm, do_decl_instantiation): Pass single
12034 ordinary attribute lists around.
12035 * decl.c (grokdeclarator): Correct handling of nested attributes.
12037 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12038 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12041 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
12042 (cp_attribute_table): Declare.
12043 * decl.c (valid_lang_attribute): Don't define.
12044 (lang_attribute_table): Define.
12045 (init_decl_processing): Initialize lang_attribute_table instead of
12046 valid_lang_attribute.
12047 * tree.c (cp_valid_lang_attribute): Remove.
12048 (handle_java_interface_attribute, handle_com_interface_attribute,
12049 handle_init_priority_attribute): New functions.
12050 (cp_attribute_table): New array.
12051 * decl2.c (import_export_class): Don't use
12052 targetm.valid_type_attribute.
12054 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12056 * Make-lang.in (cp/error.o): Depend on real.h
12057 * error.c: #include "real.h"
12059 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12061 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
12062 xmalloc/strcpy/strcat.
12064 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12066 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
12068 * pt.c (tsubst_decl): Likewise.
12070 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12072 * decl2.c (lang_f_options): Const-ification.
12073 * lex.c (cplus_tree_code_name): Likewise.
12074 * spew.c (yyerror): Likewise.
12076 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12079 * class.c (force_canonical_binfo_r): Check & move an indirect
12080 primary base first.
12081 (force_canonical_binfo): Check that it's not already
12083 (mark_primary_virtual_base): Remove BINFO parameter.
12084 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12086 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12088 Remove TYPE_NONCOPIED_PARTS.
12089 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12090 CLASSTYPE_PURE_VIRTUALS.
12091 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12092 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12093 (layout_class_type): Don't call fixup_inline_methods here ...
12094 (finish_struct_1): ... call it here.
12096 2001-09-04 Mark Mitchell <mark@codesourcery.com>
12098 * decl.c (duplicate_decls): Remove code deadling with
12100 * decl2.c (finish_file): Likewise.
12101 * pt.c (instantiate_decl): Likewise.
12102 * semantics.c (expand_body): Don't defer local functions if
12103 they wouldn't be deferred for some other reason. Don't
12104 generate RTL for functions that will not be emitted.
12105 (genrtl_start_function): Remove code deadling with
12107 (genrtl_finish_function): Likewise.
12109 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
12112 * call.c (build_over_call): Do not optimize any empty base
12115 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12117 * error.c (dump_template_decl): Output template parameters
12118 together with their specifiers.
12119 Output `class' prefix for template template parameter.
12120 (dump_decl): Fix formatting.
12122 2001-08-30 Kurt Garloff <garloff@suse.de>
12124 * optimize.c (inlinable_function_p): Allow only smaller single
12125 functions. Halve inline limit after reaching recursive limit.
12127 2001-08-30 Joern Rennecke <amylaar@redhat.com>
12128 Jason Merrill <jason_merrill@redhat.com>
12130 * class.c (build_vtable_entry_ref): Subtract in char*, not
12133 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
12135 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12136 (build_cplus_array_type): Use cp_build_qualified_type, not
12137 TYPE_MAIN_VARIANT, to get an unqualified version.
12139 * decl2.c (grok_alignof): Lose.
12140 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12141 * typeck.c (c_alignof): Lose.
12142 * semantics.c (finish_sizeof, finish_alignof): New.
12143 * parse.y: Use them.
12144 * cp-tree.h: Declare them.
12146 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
12148 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12149 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12150 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12152 2001-08-19 Jakub Jelinek <jakub@redhat.com>
12154 * typeck2.c (add_exception_specifier): Only require complete type if
12155 not in processing template declaration.
12157 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12159 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12160 GNU_xref_start_scope and GNU_xref_end_scope.
12162 * tree.c (TYPE_HASH): Moved to ../tree.h.
12164 2001-08-16 Mark Mitchell <mark@codesourcery.com>
12166 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12169 2001-08-14 Richard Henderson <rth@redhat.com>
12171 * class.c, cp-tree.h (build_vfn_ref): Remove.
12172 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12174 2001-08-13 Mark Mitchell <mark@codesourcery.com>
12176 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12177 empty class assignment as having side-effects to avoid
12180 2001-08-13 Zack Weinberg <zackw@panix.com>
12182 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12183 * except.c: Include libfuncs.h.
12185 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12187 * decl.c (grokdeclarator): Clarify diagnostic message.
12189 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12191 * decl2.c (do_nonmember_using_decl): Replace using directive
12192 with using declaration in the error message.
12194 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12196 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12197 criterion to avoid rebuilding expression tree instead of
12198 processing_template_decl.
12200 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12202 Support named return value optimization for inlines, too.
12203 * decl.c (finish_function): Nullify returns here.
12204 * semantics.c (genrtl_start_function): Not here.
12205 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12206 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12207 Also nullify the CLEANUP_STMT for the nrv.
12208 * cp-tree.h: Declare it.
12209 * optimize.c (declare_return_variable): Replace the nrv with the
12211 * typeck.c (check_return_expr): Be more flexible on alignment check.
12212 Ignore cv-quals when checking for a matching type.
12214 2001-08-09 Richard Henderson <rth@redhat.com>
12216 * decl2.c (finish_objects): Use target hooks instead of
12217 assemble_constructor and assemble_destructor.
12219 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12221 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12223 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12226 Stop using TYPE_NONCOPIED_PARTS.
12227 * call.c (build_over_call): Be careful when copy constructing
12228 or assigning to an empty class.
12229 * class.c (check_bases_and_members): It has a
12230 COMPLEX_ASSIGN_REF if it has a vptr.
12231 (layout_class_type): Don't add empty class padding to
12232 TYPE_NONCOPIED_PARTS.
12233 (finish_struct_1): Don't add the VFIELD either.
12234 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12237 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12239 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12241 2001-08-06 Richard Henderson <rth@redhat.com>
12243 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12244 assemble_{constructor,destructor}. Remove priority handling.
12246 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12248 Don't allow template-id in using-declaration.
12249 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12250 (do_class_using_decl): Likewise.
12252 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12254 * cp/spew.c (read_token): No need to pop buffers.
12256 2001-08-02 Stan Shebs <shebs@apple.com>
12258 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12259 (fnaddr_from_vtable_entry): Remove decl.
12260 * method.c (use_thunk): Update comment.
12262 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12264 * repo.c (get_base_filename): Change return value to const char
12267 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12271 * cp-tree.h (flag_honor_std): Remove.
12272 (CPTI_FAKE_STD): Remove.
12273 (std_node): Remove comment about it being NULL.
12274 (fake_std_node): Remove.
12275 * decl.c (in_fake_std): Remove.
12276 (walk_namespaces_r): Remove fake_std_node check.
12277 (push_namespace): Remove in_fake_std code.
12278 (pop_namespace): Likewise.
12279 (lookup_name_real): Remove fake_std_node check.
12280 (init_decl_processing): Always create std_node. Always add
12281 std:: things there.
12282 (builtin_function): Always put non '_' fns in std.
12283 * decl2.c (flag_honor_std): Remove.
12284 (lang_f_options): Remove honor-std.
12285 (unsupported_options): Add honor-std.
12286 (set_decl_namespace): Remove fake_std_node check.
12287 (validate_nonmember_using_decl): Likewise.
12288 (do_using_directive): Likewise.
12289 (handle_class_head): Likewise.
12290 * dump.c (cp_dump_tree): Likewise.
12291 * except.c (init_exception_processing): Adjust.
12292 * init.c (build_member_call): Remove fake_std_node check.
12293 (build_offset_ref): Likewise.
12294 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12295 * rtti.c (init_rtti_processing): Adjust.
12297 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12299 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12300 operand while calling cp_tree_equal.
12302 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12304 The 3.0 ABI no longer has vbase pointer fields.
12305 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12306 FORMAT_VBASE_NAME): Remove.
12307 * method.c (do_build_copy_constructor): Adjust.
12308 (do_build_assign_ref): Adjust.
12309 * search.c (lookup_field_r): Adjust.
12310 * typeck.c (build_component_ref): Adjust.
12312 The 3.0 ABI always has a vtable pointer at the start of every
12314 * rtti.c (build_headof_sub): Remove.
12315 (build_headof): Adjust.
12316 (get_tinfo_decl_dynamic): No need to check flag_rtti
12318 (create_real_tinfo_var): Explain why we need a hidden name.
12320 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12323 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12324 of a virtual thunk should be from declaring base.
12326 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12328 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12329 the shared virtual base, so preserving inheritance graph order.
12331 2001-07-30 Andreas Jaeger <aj@suse.de>
12333 * decl2.c: Remove unused var global_temp_name_counter.
12335 2001-07-28 Richard Henderson <rth@redhat.com>
12337 * method.c (pending_inlines): Remove.
12339 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12341 * class.c (mark_primary_virtual_base): Don't adjust base
12343 (dfs_unshared_virtual_bases): Adjust them here.
12344 (mark_primary_bases): Explain why we adjust at the end.
12346 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12348 * class.c (finish_struct_1): When copying the primary base's
12349 VFIELD, make sure we find it is at offset zero.
12351 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12353 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12354 tsubst_expr for default template arguments.
12356 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12359 * spew.c (yylex): Only copy the token's lineno, if it is
12362 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12365 * call.c (resolve_args): Simplify, call
12366 convert_from_reference.
12367 (build_new_op): Resolve and convert from reference ARG1
12368 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12370 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12372 * decl.c (last_function_parm_tags): Remove.
12373 (current_function_parm_tags): Remove.
12374 (init_decl_processing): Adjust.
12375 (start_function): Adjust.
12376 (store_parm_decls): Adjust.
12379 * decl.c (grokdeclarator): Detect when a function typedef is
12380 declaring a function, and create last_function_parms correctly.
12382 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12384 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12385 one if they have the same signature.
12387 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12388 it rather than toplevel_bindings_p. Give it a mangled name if static.
12389 (convert_to_reference): Adjust.
12390 * decl2.c (get_temp_name): Lose.
12391 * mangle.c (mangle_ref_init_variable): New fn.
12392 (mangle_guard_variable): Strip the ref-init header.
12393 * cp-tree.h: Adjust.
12394 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12396 (grok_reference_init): Always use DECL_INITIAL.
12398 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12401 * call.c (build_conditional_expr): Recheck args after
12403 * cp-tree.h (build_conditional_expr): Move to correct file.
12404 * typeck.c (decay_conversion): Diagnose any unknown types
12406 (build_binary_op): Don't do initial decay or default
12407 conversions on overloaded functions.
12408 (build_static_cast): Don't do a decay conversion here.
12410 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12413 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12414 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12416 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12418 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12419 (create_vtbl_ptr): ... here.
12421 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12423 * class.c (build_vbase_offset_vbtl_entries): Look for
12424 non-primary base of which we are a sub vtable.
12426 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12428 * semantics.c (finish_this_expr): Remove unused code.
12430 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12432 Simplify rtti, now we've only one ABI.
12433 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12435 (tinfo_decl_id, tinfo_var_id): Remove.
12436 (get_typeid_1): Remove.
12438 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12439 (typeid_ok_p): New function.
12440 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12441 (get_tinfo_decl): Remove old abi documentation.
12442 (tinfo_from_decl): Remove.
12443 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12444 (get_typeid_1): Remove.
12445 (get_base_offset): Remove.
12446 (synthesize_tinfo_var): Absorb get_base_offset.
12447 (create_real_tinfo_var): Don't use tinfo_decl_id.
12449 2001-07-23 Graham Stott <grahams@redhat.com>
12451 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12452 variable has_two_argument_delete_p.
12454 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12456 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12457 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12458 (CPTI_INDEX_IDENTIFIER): Remove.
12459 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12460 (delta2_identifier): Remove.
12461 (index_identifier): Remove.
12462 (pfn_or_delta2_identifier): Remove.
12463 (flag_vtable_thunks): Remove.
12464 (VTABLE_DELTA2_NAME): Remove.
12465 (VTABLE_INDEX_NAME): Remove.
12466 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12467 (vfunc_ptr_type_node): Adjust.
12468 (VTABLE_NAME_PREFIX): Adjust.
12469 (build_vfn_ref): Lose first parameter.
12470 (fixup_all_virtual_upcast_offsets): Remove.
12471 * decl.c (initialize_predefined_identifiers): Remove
12472 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12473 (init_decl_processing): Remove no-vtable-thunk code.
12474 * decl2.c (flag_vtable_thunks): Remove.
12475 (mark_vtable_entries): Remove no-vtable-thunk code.
12476 * error.c (dump_decl): Remove no-vtable-thunk code.
12477 (dump_expr): Adjust ptr to member function code.
12478 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12480 * rtti.c (build_headof): Remove no-vtable-thunk code.
12481 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12482 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12483 (virtual_context) Remove.
12484 (expand_upcast_fixups): Remove.
12485 (fixup_virtual_upcast_offsets): Remove.
12486 (fixup_all_virtual_upcast_offsets): Remove.
12487 * typeck.c (get_member_function_from_ptrfunc): Remove
12488 no-vtable-thunk code.
12489 * call.c (build_over_call): Adjust call to build_vfn_ref.
12490 * class.c (build_vfn_ref): Lose first parameter. Remove
12491 no-vtable-thunk code.
12492 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12493 (build_vtable_entry): Remove no-vtable-thunk code.
12495 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12497 Remove old-abi remnants. Remove comments about old abi
12498 behavior. Remove references to 'new-abi' in comments.
12499 * cp-tree.h: Adjust comments.
12500 (vbase_offsets_in_vtable_p): Delete.
12501 (vcall_offsets_in_vtable_p): Delete.
12502 (vptrs_present_everywhere_p): Delete.
12503 (all_overridden_vfuns_in_vtables_p): Delete.
12504 (merge_primary_and_secondary_vtables_p): Delete.
12505 (TYPE_CONTAINS_VPTR_P): Adjust.
12506 (VTT_NAME_PREFIX): Remove.
12507 (CTOR_VTBL_NAME_PREFIX): Remove.
12508 (init_vbase_pointers): Remove.
12509 * class.c: Adjust coments.
12510 (build_vbase_pointer_fields): Delete.
12511 (build_vbase_pointer): Remove old-abi code.
12512 (build_secondary_vtable): Likewise.
12513 (modify_all_vtables): Likewise.
12514 (create_vtable_ptr): Likewise.
12515 (layout_class_type): Likewise.
12516 (finish_struct_1): Likewise.
12517 (finish_vtbls): Likewise.
12518 (dfs_finish_vtbls): Delete.
12519 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12520 * cvt.c: Adjust comments.
12521 * decl.c: Adjust comments.
12522 * decl2.c: Adjust comments.
12523 * init.c: Adjust comments.
12524 (construct_virtual_bases): Remove old-abi code.
12525 * lang-specs.h: Remove -fno-new-abi.
12526 * mangle.c: Adjust comments.
12527 * rtti.c: Adjust comments.
12528 (get_base_offset): Remove old-abi-code.
12529 * search.c: Adjust comments.
12530 (dfs_init_vbase_pointers): Remove.
12531 (dfs_vtable_path_unmark): Remove.
12532 (init_vbase_pointers): Remove.
12533 * semantics.c: Adjust comments.
12534 (emit_associated_thunks): Remove old-abi code.
12535 * typeck.c: Adjust comments.
12537 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12539 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12542 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12544 * class.c (finish_struct_anon): Forbid nested classes.
12546 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12548 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12549 * optimize.c: Include debug.h.
12550 (maybe_clone_body): Use debug hook.
12551 * semantics.c: Include debug.h.
12552 (expand_body): Use debug hook.
12554 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12556 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12558 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12560 * class.c (type_requires_array_cookie): New function.
12561 (check_methods): Don't try to figure out whether the type needs a
12563 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12564 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12565 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12566 * pt.c (instantiate_class_template): Don't set
12567 TYPE_VEC_DELETE_TAKES_SIZE.
12568 * NEWS: Document ABI changes from GCC 3.0.
12570 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12571 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12573 * NEWS (Changes in GCC 3.0): Fix typo.
12575 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12577 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12578 which attributes are to be attached, and a flags argument. Update
12579 call to decl_attributes.
12580 (grokfield): Update call to decl_attributes.
12581 * class.c (finish_struct): Update call to cplus_decl_attributes.
12582 * cp-tree.h (cplus_decl_attributes): Update prototype.
12583 * decl.c (start_decl, grokdeclarator, start_function): Update
12584 calls to decl_attributes and cplus_decl_attributes.
12585 * friend.c (do_friend): Update call to cplus_decl_attributes.
12586 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12588 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12590 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12591 for `register' variables with an asm-specification.
12593 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12595 * semantics.c (finish_asm_stmt): Mark the output operands
12596 to an asm addressable, if necessary.
12598 2001-07-11 Ben Elliston <bje@redhat.com>
12600 * Revert this change -- there is a subtle bug.
12603 * decl.c (finish_enum): New "attributes" argument; pass it to
12604 cplus_decl_attributes. Use a narrower type if the enum is packed.
12605 * cp-tree.h (finish_enum): Adjust prototype.
12606 * parse.y (enum_head): New non-terminal.
12607 (structsp): Use it. Enums now may be preceded or followed by
12608 optional attributes -- pass their chained tree to finish_enum().
12609 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12611 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12613 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12616 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12618 * semantics.c (cp_expand_stmt): Fix for null
12619 current_function_return_value.
12621 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12623 * call.c (build_op_delete_call): Initialize fn.
12624 (convert_like_real): Delete conditional.
12625 (joust): Initialize *w and *l.
12626 * class.c: Add prototype for binfo_ctor_vtable.
12627 (get_primary_binfo): Initialize result.
12628 * init.c (build_java_class_ref): Initialize name.
12630 2001-07-09 Erik Rozendaal <dlr@acm.org>
12632 * typeck.c (unary_complex_lvalue): Do not duplicate the
12633 argument to modify, pre-, or post-increment when used as an
12634 lvalue and when the argument has side-effects.
12636 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12638 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12639 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12640 cplus_decl_attributes even if attrs is NULL.
12641 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12643 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12645 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12646 calls to decl_attributes.
12648 2001-07-06 Ira Ruben <ira@apple.com>
12650 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12651 be DECL_TEMPLATE_RESULT.
12653 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12655 * cp-tree.h (copy_template_template_parm): Rename to ...
12656 (bind_template_template_parm): ... here.
12657 * tree.c (copy_template_template_parm): Rename to ...
12658 (bind_template_template_parm): ... here. Remove the case when
12659 NEWARGS is NULL_TREE.
12660 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12661 BOUND_TEMPLATE_TEMPLATE_PARM.
12662 * pt.c (lookup_template_class): Adjust.
12664 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12666 * cvt.c (convert_lvalue): New fn.
12667 * cp-tree.h: Declare it.
12668 * method.c (do_build_assign_ref): Use it.
12669 (do_build_copy_constructor): Convert parm to base types
12670 before calling base constructors.
12672 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12673 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12675 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12677 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12679 * optimize.c (optimize_inline_calls): New function, broken out
12681 (optimize_function): ... here. Call it. Don't inline if it is
12683 (dump_function): Print name of dump flag causing this dump.
12684 * semantics.c (expand_body): Move thunk inline check to
12687 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12689 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12690 (comptypes): Use target.comp_type_attributes.
12692 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12694 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12696 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12698 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12701 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12703 * decl2.c (import_export_class): Update.
12705 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12707 * error.c (init_error): Adjust settings.
12709 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12711 * error.c (init_error): Adjust settings.
12713 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12715 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12716 return pointers to data members by reference rather than by value.
12718 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12720 Implement the Named Return Value optimization.
12721 * cp-tree.h (struct cp_language_function): Add x_return_value.
12722 (current_function_return_value): Now a macro.
12723 * decl.c: Don't define it.
12724 (define_label, finish_case_label): Don't clear it.
12725 (init_decl_processing): Don't register it with GC.
12726 * semantics.c (genrtl_finish_function): Don't check it for
12727 no_return_label. Copy the RTL from the return value to
12728 current_function_return_value and walk, calling...
12729 (nullify_returns_r): ...this new fn.
12730 * typeck.c (check_return_expr): Set current_function_return_value.
12732 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12734 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12735 sharing a ctor vtable with. Merge code for cases 1 and 2.
12736 (binfo_ctor_vtable): New fn.
12737 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12739 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12741 * class.c (dfs_find_final_overrider): Fix logic.
12743 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12744 virtual thunk instead of non-virtual.
12745 (get_matching_virtual): Uncomment.
12747 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12748 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12751 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12753 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12754 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12755 a non-virtual base.
12757 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12759 * NEWS: Update release number.
12761 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12763 PR c++/3130, c++/3131, c++/3132
12764 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12765 * class.c (force_canonical_binfo_r): Move
12766 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12767 virtual bases unless they're primary and what they're primary
12768 too has been moved.
12769 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12770 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12771 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12773 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12774 (layout_nonempty_base_or_field): Add most derived type
12776 (layout_empty_base): Likewise.
12777 (build_base_field): Likewise.
12778 (build_base_fields): Likewise.
12779 (propagate_binfo_offsets): Add most derived type
12780 parameter. Skip non canonical virtual bases too.
12781 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12782 bases. Do skip canonical bases.
12783 (layout_virtual_bases): Adjust.
12784 (layout_class_type): Adjust.
12785 (dfs_get_primary_binfo): Build list of virtual primary base
12787 (get_primary_binfo): Check that the shared virtual primary
12788 base candidate was found first.
12789 (accumulate_vtbl_inits): Don't do anything for non-vptr
12790 containing binfos. For case 1 primary virtual bases, keep
12791 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12793 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12796 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12797 hierarchy looking for primary bases for a ctor
12798 vtable. Recursively call oneself, if we meet our primary via
12799 this route and haven't met it yet via inheritance graph order.
12801 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12803 * lang-options.h: Emit documentation for -fno-honor-std, not
12806 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12808 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12809 Don't clobber delta.
12810 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12812 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12813 Gabriel Dos Reis <gdr@codesourcery.com>
12815 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12816 (cp/typeck.o): Depend on diagnostic.h
12817 (cp/typeck2.o): Depend on diagnostic.h
12818 (cp/repo.o): Depend on dignostic.h
12819 * typeck.c: #include diagnostic.h
12820 (convert_for_initialization): Remove extern declaration for
12821 warningcount and errorcount.
12823 * call.c: #include diagnostic.h
12824 (convert_like_real): Remove extern declaration for warnincount and
12827 * repo.c: #include diagnostic.h
12828 * typeck2.c: #include diagnostic.h
12830 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12832 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12833 in previous change.
12835 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12838 * friend.c (do_friend): Use push_decl_namespace for classes at
12841 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12842 Jason Merrill <jason_merrill@redhat.com>
12845 * class.c (build_secondary_vtable): Use assert, rather than an error
12847 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12848 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12849 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12850 Don't set BINFO_VTABLE for a primary virtual base.
12852 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12854 * decl.c (duplicate_decls): Update source position information
12855 when a template function is defined.
12857 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12859 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12861 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12864 * decl.c (pushtag): Don't push into a complete type's scope.
12866 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12868 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12869 (struct lang_decl_flags): Lose generate_with_vtable_p.
12870 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12871 * class.c (copy_virtuals): Adjust.
12872 * decl2.c (mark_vtable_entries): Adjust.
12873 * method.c (make_thunk, build_vtable_entry): Adjust.
12874 * class.c (update_vtable_entry_for_fn): Only look as far as the
12875 first defining class.
12876 (build_vtbl_initializer): Put nothing in the slot for a function only
12877 defined in a lost primary virtual base.
12878 (add_vcall_offset_vtbl_entries_1): Use the same code for
12879 the lost primary case and the normal case.
12880 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12881 (get_vfield_offset, get_derived_offset): Lose.
12882 (dfs_find_final_overrider): Use look_for_overrides_here.
12883 (get_matching_virtual): New fn.
12884 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12885 not BV_VCALL_INDEX.
12886 * search.c (look_for_overrides_here): Split out from...
12887 (look_for_overrides_r): Here.
12889 * class.c (find_final_overrider): Return error_mark_node on error.
12891 * decl2.c (key_method): #if 0 accidental change.
12893 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12895 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12896 (build_over_call): Likewise.
12897 * decl.c (grokparms): Likewise.
12898 * pt.c (tsubst_decl): Likewise.
12899 * typeck.c (convert_arguments): Likewise.
12901 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12903 * semantics.c (begin_class_definition): Robustify.
12905 * pt.c (instantiate_decl): Tell the repository code about the
12906 clones, not the cloned functions.
12907 * repo.c (repo_template_used): Explicitly instantiate the cloned
12908 function, not the clones.
12910 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12912 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12913 ICS_BAD_FLAG on created conversion.
12914 (compare_ics): Break out rank.
12916 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12918 * decl.c (xref_tag): Remove extraneous %s on dependent name
12921 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12923 * class.c (layout_vtable_decl): Fix off by one error on
12925 (build_vtt): Likewise.
12926 (build_ctor_vtbl_group): Likewise.
12928 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12930 * class.c (maybe_indent_hierarchy): New function.
12931 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12932 information, if enabled. Use maybe_indent_hierarchy. Adjust
12934 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12935 (dump_array, dump_vtable, dump_vtt): New functions.
12936 (finish_struct_1): Adjust hierarchy dumping.
12937 (initialize_vtable): Call dump_vtable.
12938 (build_vtt): Call dump_vtt.
12939 (build_ctor_vtbl_group): Call dump_vtable.
12940 * decl2.c (flag_dump_class_layout): Remove.
12941 (cxx_decode_option): Remove dump translation unit
12942 and dump class hierarchy check. Call dump_switch_p.
12943 (finish_file): Adjust dumping.
12944 (dump.c): Only dump base classes if not TDF_SLIM.
12945 Only dump namespace members if not TDF_SLIM.
12946 * optimize.c (dump_function): New function.
12947 (optimize_function): Call dump_function.
12948 * semantics.c (expand_body): Use dump_enabled_p.
12950 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12953 Part missed from first commit
12954 * decl2.c (finish_anon_union): Copy context.
12956 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12959 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12961 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12964 * semantics.c (expand_body): Don't optimize thunks.
12966 2001-05-25 Sam TH <sam@uchicago.edu>
12968 * cp-tree.h lex.h: Fix header include guards.
12970 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12972 * decl.c (init_decl_processing): Tweak.
12974 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12976 * decl.c (duplicate_decls): Tidy.
12977 (init_decl_processing): Always set flag_no_builtin.
12979 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12982 * decl2.c (do_local_using_decl): Push the decls, even in a
12985 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12987 * optimize.c (initialize_inlined_parameters): Don't set
12988 TREE_READONLY for a VAR_DECL taking the place of an inlined
12991 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12993 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12994 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12997 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12999 * parse.y: Refer to compound literals as such, not as
13000 constructor-expressions.
13002 2001-05-21 Mark Mitchell <mark@codesourcery.com>
13004 * call.c (build_op_delete_call): Ignore exception-specifications
13005 when looking for matching delete operators.
13006 * init.c (build_new_1): Compute whether or not the allocation
13007 function used is a placement allocation function or not, and
13008 communicate this information to build_op_delete_call.
13010 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
13012 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
13013 (build_vtbl_ref): Adjust.
13014 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
13015 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
13017 (unsupported_options): Correspondingly.
13019 * decl2.c (maybe_make_one_only): Check flag_weak, not
13020 supports_one_only().
13022 * cp-tree.def (START_CATCH_STMT): Lose.
13023 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
13024 * tree.c (cp_statement_code_p): Don't case it.
13025 * semantics.c (cp_expand_stmt): Likewise.
13026 * cp-tree.h (START_CATCH_TYPE): Lose.
13027 (HANDLER_TYPE): New.
13028 * except.c (expand_start_catch_block): Don't start any blocks.
13030 (expand_end_catch_block): Don't end any blocks.
13031 * parse.y (handler): Don't pass anything from finish_handler_parms
13033 * pt.c (tsubst_expr): Likewise.
13034 * semantics.c (begin_handler): Call note_level_for_catch here.
13035 (finish_handler_parms): Don't return anything.
13036 (genrtl_catch_block, begin_catch_block): Lose.
13037 (genrtl_handler): Call expand_start_catch here.
13039 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
13041 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
13042 (get_vtable_decl, build_vtt): Not here.
13044 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
13047 * optimize.c (update_cloned_parm): Copy addressability and other
13050 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13052 * pt.c (determine_specialization): Ignore artificial functions.
13054 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
13056 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
13057 (C_RID_CODE): Remove.
13058 * lex.c (cxx_init_options): Call set_identifier_size. Update.
13059 (init_parse): Don't do it here.
13061 2001-05-18 Diego Novillo <dnovillo@redhat.com>
13063 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
13064 function declaration to avoid stripping the symbol's attributes.
13066 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
13068 * decl.c (pushdecl): Adjust error string.
13069 (xref_tag): Adjust friend class injection warning. Remove the
13070 inherited name from the class shadowed scope.
13072 2001-05-17 Mark Mitchell <mark@codesourcery.com>
13074 * except.c (cp_protect_cleanup_actions): New function.
13075 (init_exception_processing): Don't set protect_cleanup_actions
13076 here. Do set lang_protect_cleanup_actions.
13078 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13080 * spew.c (read_token): Call yyerror on all unexpected tokens.
13082 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13084 * init.c (member_init_ok_or_else): Take a tree rather than
13086 (expand_member_init): Adjust.
13088 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
13090 * decl.c (duplicate_decls): Suppress warning about duplicate
13091 decls if the first decl is a friend.
13093 2001-05-12 Zack Weinberg <zackw@stanford.edu>
13095 * except.c (choose_personality_routine): Export. Add
13096 explanatory comment. Take an enum languages, not a boolean.
13097 (initialize_handler_parm): Adjust to match.
13098 * cp-tree.h: Prototype choose_personality_routine.
13099 * lex.c (handle_pragma_java_exceptions): New function.
13100 (init_cp_pragma): Register #pragma GCC java_exceptions.
13102 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
13104 * method.c (build_mangled_C99_name): Remove unused prototype.
13106 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
13108 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13109 * typeck.c (get_member_function_from_ptrfunc,
13110 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13111 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13113 Reverted Geoff Keating's 2001-05-03's patch.
13115 2001-05-11 Ira Ruben <ira@apple.com>
13117 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13119 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
13121 * cp-tree.h (finish_label_expr, lookup_label): Delete.
13122 * parse.y: Update for '&&'; don't issue warning here.
13123 * semantics.c (finish_label_expr): Delete.
13125 2001-05-07 Mark Mitchell <mark@codesourcery.com>
13127 * splay-tree.h (splay_tree_max): New function.
13128 (splay_tree_min): Likewise.
13130 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
13132 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13133 (pfn_vflag_identifier): Define.
13134 Update comment about layout of pointer functions.
13135 (build_ptrmemfunc1): Update prototype.
13136 (expand_ptrmemfunc_cst): Update prototype.
13137 * decl.c (initialize_predefined_identifiers): Initialize
13138 pfn_vflag_identifier.
13139 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13140 an extra field to the type.
13141 * expr.c (cplus_expand_constant): Pass 'flag' between
13142 expand_ptrmemfunc_cst and build_ptrmemfunc1.
13143 * typeck.c (get_member_function_from_ptrfunc): When
13144 FUNCTION_BOUNDARY < 16, look at additional field to determine
13145 if a pointer-to-member is a real pointer or a vtable offset.
13146 (build_ptrmemfunc1): Add new parameter to contain extra field.
13147 (build_ptrmemfunc): Pass the extra field around.
13148 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13149 (pfn_from_ptrmemfunc): Ignore the extra field.
13151 2001-05-03 Mark Mitchell <mark@codesourcery.com>
13153 * cp-tree.h (flag_inline_trees): Update documentation.
13154 * decl.c (init_decl_processing): Adjust handling of
13155 flag_inline_functions and flag_inline_trees to support -O3.
13156 (grokfndecl): Set DECL_INLINE on all functions if that's what
13157 the user requested.
13158 (save_function_data): Clear DECL_INLINE in
13159 current_function_cannot_inline is non-NULL.
13160 * decl2.c (flag_inline_trees): Update documentation.
13162 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
13164 * dump.c (cp_dump_tree, USING_STMT case): New case.
13165 * tree.c (cp_statement_code_p): Add USING_STMT.
13166 * decl2.c (do_using_directive): Add the using directive statement.
13168 * tree.c (walk_tree): Reformat an if block.
13170 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13172 * decl.c (compute_array_index_type): Don't try to do anything with
13173 the indices when processing a template.
13175 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13177 * call.c: NULL_PTR -> NULL.
13178 * class.c: Likewise.
13180 * decl.c: Likewise.
13181 * decl2.c: Likewise.
13182 * except.c: Likewise.
13183 * init.c: Likewise.
13184 * rtti.c: Likewise.
13185 * search.c: Likewise.
13186 * tree.c: Likewise.
13187 * typeck.c: Likewise.
13188 * typeck2.c: Likewise.
13190 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13192 * decl2.c (do_using_directive): Revert previous patch.
13194 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13196 * cp-tree.def (USING_STMT): New statement node.
13197 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13198 * decl2.c (do_using_directive): Add USING_STMT to statement
13199 tree. Don't emit errors when processing template decl.
13200 * pt.c (tsubst_expr, USING_STMT case): New case.
13201 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13203 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13205 * call.c (build_new_op): Convert args from reference here.
13206 (build_conditional_expr): Don't convert here.
13208 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13210 * spew.c (last_token_id): New static variable.
13211 (read_token): Set it here.
13212 (yyerror): Use it here.
13214 2001-04-30 Richard Henderson <rth@redhat.com>
13216 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13217 * decl.c: Likewise.
13219 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13221 * gxxint.texi: Remove.
13222 * Make-lang.in: Remove all traces of gxxint.texi.
13224 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13226 * decl2.c (start_static_initialization_or_destruction): Correct
13227 logic to handle the -fno-use-cxa-atexit case.
13229 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13231 * optimize.c (update_cloned_parm): New function.
13232 (maybe_clone_body): Use it. Update the `this' parameter too.
13234 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13236 * decl2.c (unsupported_options): Add new-abi.
13237 * lang-options.h: Remove no longer supported options.
13239 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13241 * except.c (can_convert_eh): Don't check template parms,
13242 typename types etc.
13244 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13246 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13248 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13250 * cp-tree.h (adjust_clone_args): Prototype new function.
13251 * class.c (adjust_clone_args): New function.
13252 * decl.c (start_function): Call it for in charge ctors.
13254 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13256 * method.c (use_thunk): Make sure that thunks really are emitted
13259 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13261 * mangle.c (write_chars): New macro.
13262 (hwint_to_ascii): New function
13263 (write_number): Use it.
13264 (write_integer_cst): Deal with really big numbers.
13266 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13268 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13271 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13273 * decl.c (grokdeclarator): Set context of namespace scope
13276 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13278 * cp/optimize.c: Include hashtab.h.
13279 (struct inline_data): Add tree_pruner.
13280 (expand_call_inline, expand_calls_inline): Use it when calling
13282 (optimize_function): Initialize and free tree_pruner.
13284 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13286 Lazy __FUNCTION__ generation.
13287 * cp-tree.def (FUNCTION_NAME): Remove.
13288 * cp-tree.h (function_name_declared_p): Remove.
13289 (cp_fname_init): Prototype.
13290 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13291 don't call declare_function_name. Call start_fname_decls.
13292 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13293 clobber the line number.
13294 (cp_fname_init): New function.
13295 (start_function): Call start_fname_decls.
13296 (finish_function): Call finish_fname_decls.
13297 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13298 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13299 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13300 * parse.y (VAR_FUNC_NAME): New token.
13301 (primary): Add VAR_FUNC_NAME.
13302 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13304 (tsubst, FUNCTION_NAME case): Remove.
13305 (tsubst_copy, FUNCTION_NAME case): Remove.
13306 (tsubst_expr, DECL_STMT case): Be careful with a
13307 DECL_PRETTY_FUNCTION_P.
13308 (instantiate_decl): Remove function_name_declared_p.
13309 * semantics.c (begin_compound_statement): Don't call
13310 declare_function_name here.
13311 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13312 (finish_translation_unit): Call finish_fname_decls.
13313 (expand_body): Remove function_name_declared_p.
13314 * typeck2.c (digest_init): Allow any ERROR_MARK.
13316 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13318 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13319 * semantics.c: Fix some typos.
13321 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13323 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13325 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13327 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13329 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13331 * except.c (build_throw): Wrap the initialization of the exception
13332 object in a MUST_NOT_THROW_EXPR.
13333 (do_free_exception): #if 0.
13335 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13337 * cp-tree.h (finish_enum): Change prototype.
13338 * decl.c (finish_enum): Reorganize.
13339 * parse.y (structsp): Adjust calls to finish_enum.
13341 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13343 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13346 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13348 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13349 (layout_empty_base): Return at end flag.
13350 (build_base_field): Likewise.
13351 (build_base_fields): Likewise.
13352 (layout_virtual_bases): Don't add 1 to eoc value.
13353 (end_of_class): Use full size for empty bases.
13354 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13355 empty bases. Don't add 1 to eoc value. Only add trailing padding
13356 if we're an empty class with no empty bases.
13357 (dump_class_hierarchy): Dump size and alignment.
13359 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13361 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13364 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13366 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13367 is found, look first if name does not match the structure name.
13369 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13371 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13373 (SET_DECL_LANGUAGE): New macro.
13374 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13375 (pushdecl): Likewise.
13376 (build_library_fn_1): Likewise.
13377 (build_cp_library_fn): Likewise.
13378 (grokfndecl): Likewise.
13379 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13380 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13381 * lex.c (retrofit_lang_decl): Likewise.
13382 * mangle.c (mangle_decl_string): Don't mangle the names of
13383 variables declared with C language linkage.
13384 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13386 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13388 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13389 flag_access_control from uninitialized storage.
13391 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13393 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13394 * mangle.c (write_pointer_to_member_type): Fix mangling of
13395 pointers to cv-qualified member function types.
13397 * init.c (build_delete): Create a SAVE_EXPR for the address if
13398 we're going to use it more than once.
13400 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13402 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13403 (expand_ptremfunc_cst): Change prototype.
13404 (delta2_from_ptrmemfunc): Remove.
13405 * expr.c (cplus_expand_constant): Adjust call to
13406 expand_ptrmemfunc_cst.
13407 * typeck.c (build_ptrmemfunc1): Simplify.
13408 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13409 results in a constant.
13410 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13411 (delta2_from_ptrmemfunc): Remove.
13412 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13414 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13416 * cp-tree.h (decl_namespace_list): New macro.
13417 (struct saved_scope): Add decl_ns_list.
13418 * decl.c (mark_saved_scope): Mark it.
13419 * decl2.c: Lose static decl_namespace_list.
13420 (init_decl2): Don't save it.
13422 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13424 * cp-tree.h (warn_return_type, yylex): Delete redundant
13427 * decl.c (current_class_depth, global_namespace): Likewise.
13429 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13431 * repo.c (flag_use_repository): Likewise.
13433 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13435 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13436 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13437 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13438 lvalue_or_else, print_lang_statistics, comp_target_types,
13439 unsigned_type, signed_type, signed_or_unsigned_type,
13440 build_function_call, mark_addressable, incomplete_type_error):
13441 Delete redundant declarations.
13443 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13445 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13446 (TYPE_ANONYMOUS_P): New macro.
13447 (TAGGED_TYPE_P): New macro.
13448 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13449 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13450 * tree.c (no_linkage_helper): Likewise.
13451 * semantics.c (begin_class_definition): Likewise.
13452 * pt.c (convert_template_argument): Likewise.
13453 * lex.c (check_for_missing_semicolon): Likewise.
13455 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13457 * class.c (dfs_unshared_virtual_bases): New function.
13458 (mark_primary_bases): Call it.
13459 (check_bases): Ignore virtual bases when determining
13462 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13464 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13466 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13468 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13469 cloned function to the clone.
13471 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13473 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13475 * semantics.c: Include expr.h.
13477 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13479 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13480 and assignment op. Set TREE_USED for parameter.
13482 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13484 * class.c (find_final_overrider_data): Add `candidates'.
13485 (dfs_find_final_overrider): Don't issue error messages
13487 (find_final_overrider): Issue error messages here.
13488 (build_base_field): Don't warn about amgibuous direct bases here.
13489 (warn_about_ambiguous_direct_bases): New function.
13490 (layout_class_type): Use it.
13492 2001-04-10 Richard Henderson <rth@redhat.com>
13494 * typeck.c (build_array_ref): Push the array reference inside
13495 COMPOUND_EXPR and COND_EXPR.
13497 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13499 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13500 * decl.c (duplicate_decls): Adjust accordingly.
13501 (maybe_commonize_var): Likewise.
13502 (grokfndecl): Likewise.
13503 (start_function): Likewise.
13504 (start_method): Likewise.
13505 * decl2.c (key_method): Likewise.
13506 (import_export_decl): Likewise.
13507 * method.c (implicitly_declare_fn): Likewise.
13508 * optimize.c (maybe_clone_body): Likewise.
13510 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13512 * lang-specs.h: Add __DEPRECATED.
13514 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13516 * search.c (get_dynamic_cast_base_type): When building a new
13517 constant, set its type to ssizetype.
13519 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13521 * optimize.c (expand_call_inline): Only add newly inlined statements
13522 into inlined_stmts.
13524 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13526 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13527 (OPERATOR_FORMAT): Likewise.
13528 (OPERATOR_TYPENAME_FORMAT): Likewise.
13529 * operators.def: Remove old name-mangling information.
13530 * decl.c (grok_op_properties): Adjust accordingly.
13531 * lex.c (init_operators): Likewise.
13532 * rtti.c (get_tinfo_decl): Issue error messages about types that
13533 have variable size.
13535 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13537 * decl2.c (import_export_decl): Don't call import_export_class
13538 when processing an inline member function.
13539 * semantics.c (expand_body): Call import_export_decl before
13540 emitting inline functions.
13542 2001-03-28 Richard Henderson <rth@redhat.com>
13544 IA-64 ABI Exception Handling:
13545 * cp-tree.def (EH_SPEC_BLOCK): New.
13546 (MUST_NOT_THROW_EXPR): New.
13547 * cp-tree.h: Update changed function declarations.
13548 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13549 (CPTI_CALL_UNEXPECTED): New.
13550 (struct cp_language_function): Rename x_eh_spec_try_block
13551 to x_eh_spec_block.
13552 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13553 * decl.c (current_binding_level): If no current function
13554 bindings, revert to scope_chain.
13555 (initialize_predefined_identifiers): Remove __cp_push_exception.
13556 (store_parm_decls): Use begin_eh_spec_block.
13557 (finish_function): Use finish_eh_spec_block.
13558 (mark_lang_function): Update for name changes.
13559 * decl2.c (finish_file): No mark_all_runtime_matches.
13560 * dump.c (cp_dump_tree): Handle new tree codes.
13561 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13562 * except.c (catch_language_init, catch_language): Remove.
13563 (init_exception_processing): Don't set language code.
13564 Initialize call_unexpected_node, protect_cleanup_actions,
13565 eh_personality_libfunc, lang_eh_runtime_type.
13566 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13567 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13568 (prepare_eh_type): Split out type canonicalizations ...
13569 (build_eh_type_type): ... from here.
13570 (build_eh_type_type_ref): Remove.
13571 (mark_all_runtime_matches): Remove.
13572 (build_exc_ptr): New.
13573 (do_begin_catch, do_end_catch): New.
13574 (do_pop_exception): Remove.
13575 (build_terminate_handler): Remove.
13576 (choose_personality_routine): Split out language choice from ...
13577 (initialize_handler_parm): ... here.
13578 Use MUST_NOT_THROW_EXPR.
13579 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13580 exception object handling.
13581 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13582 (expand_exception_blocks, alloc_eh_object): Remove.
13583 (begin_eh_spec_block, finish_eh_spec_block): New.
13584 (do_allocate_exception, do_free_exception): New.
13585 (expand_throw): Merge into ...
13586 (build_throw): ... here. Update for abi.
13587 * expr.c (cplus_expand_expr): No expand_internal_throw.
13588 Handle MUST_NOT_THROW_EXPR.
13589 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13590 * semantics.c (*) Update for except.h name changes.
13591 (genrtl_try_block): No protect_with_terminate.
13592 (genrtl_eh_spec_block): New.
13593 (genrtl_handler): Don't emit the goto here.
13594 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13595 (genrtl_finish_function): Don't expand_exception_blocks.
13596 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13598 2001-03-28 Richard Henderson <rth@redhat.com>
13600 * decl.c (struct named_label_list): Rename eh_region to
13601 in_try_scope, add in_catch_scope.
13602 (struct binding_level): Rename eh_region to is_try_scope,
13603 add is_catch_scope.
13604 (note_level_for_try): Rename from note_level_for_eh.
13605 (note_level_for_catch): New.
13606 (poplevel): Copy both is_try_scope and is_catch_scope to
13607 the named_label_list struct.
13608 (check_previous_goto_1): Don't check for catch block via
13609 DECL_ARTIFICIAL; use in_try_scope instead.
13610 (check_goto): Likewise.
13611 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13612 * except.c (expand_start_catch_block): Call note_level_for_catch.
13613 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13615 2001-03-27 Richard Henderson <rth@redhat.com>
13617 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13618 exceptions_via_longjmp.
13620 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13622 * pt.c (check_default_tmpl_args): Make error messages clearer.
13624 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13626 * error.c: Also undefine 'A' macro used for cp_printers definition.
13628 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13630 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13632 2001-03-26 Mike Yang <yang@research.att.com>
13633 Mark Mitchell <mark@codesourcery.com>
13635 * dump.c (dump_access): New function.
13636 (cp_dump_tree): Use it. Dump basetype information for class
13639 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13641 * Makefile.in (optimize.o): Depend on params.h.
13642 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13643 (init_decl_processing): Set flag_no_inline when doing
13645 * optimize.c: Include params.h.
13646 (struct inline_data): Improve documentation of FNS. Add
13647 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13648 (INSNS_PER_STMT): New macro.
13649 (remap_block): Use CLONING_P.
13650 (inlinable_function_p): Don't inline big functions.
13651 (expand_call_inline): Keep track of how much inlining we've done.
13652 (optimize_function): Set FIRST_INLINED_FN.
13653 (maybe_clone_body): Set CLONING_P.
13654 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13656 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13657 rest_of_compilation. Clear DECL_RTL for local variables
13659 (clear_decl_rtl): New function.
13661 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13664 * cp-tree.h (skip_type_access_control,
13665 reset_type_access_control): Prototype.
13666 * decl.c (grokdeclarator): Access of friends is not checked.
13667 * parse.y (component_decl_list): Reset type access control.
13668 * semantics.c (decl_type_access_control): Clear
13669 current_type_lookups.
13670 (save_type_access_control): Don't save if not deferring.
13671 (skip_type_access_control, reset_type_access_control): New
13673 (begin_class_definition): Do type access control for basetypes.
13674 Start deferred access control.
13675 (finish_class_definition): Resume immediate access control if
13676 this is a local class.
13678 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13680 * class.c (add_method): Use memcpy/memmove, not bcopy.
13682 * decl.c (duplicate_decls): Likewise.
13684 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13686 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13689 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13691 * decl.c (local_names): Define.
13692 (push_local_name): New.
13693 (grok_reference_init): Return init if initializing static reference
13694 variable with non-constant instead of emitting it.
13695 Move expand_static_init call to cp_finish_decl.
13696 (layout_var_decl): Call push_local_name.
13697 (maybe_commonize_var): Allow inlining functions even if they have
13698 static local variables, use comdat_linkage for them if flag_weak.
13699 (check_initializer): Call obscure_complex_init if
13700 grok_reference_init returned nonzero.
13701 (save_function_data): Clear x_local_names.
13702 (pop_cp_function_context): Free x_local_names.
13703 (mark_inlined_fns): Remove.
13704 (mark_lang_function): Mark x_local_names.
13705 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13706 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13707 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13708 DECL_DISCRIMINATOR_P.
13709 * cp-tree.h (cp_language_function): Add x_local_names.
13710 (lang_decl_flags): Add discriminator into u2.
13711 (lang_decl_inlined_fns): Remove.
13712 (lang_decl): inlined_fns is now a TREE_VEC.
13713 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13714 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13715 TREE_VEC, not a custom structure.
13716 (optimize_function): Likewise.
13717 * mangle.c (discriminator_for_local_entity): Discriminate among
13718 VAR_DECL local entities.
13719 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13722 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13724 Add support for Java interface method calls.
13725 * cp-tree.h (struct lang_type): Add java_interface flag.
13726 (TYPE_JAVA_INTERFACE): New macro.
13727 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13728 by setting TYPE_JAVA_INTERFACE.
13729 * call.c (java_iface_lookup_fn): New static.
13730 (build_over_call): If calling a method declared in a
13731 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13732 expression which resolves the function address.
13733 (build_java_interface_fn_ref): New function.
13735 2001-03-22 Richard Henderson <rth@redhat.com>
13737 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13738 * except.c: Don't include it.
13740 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13741 based on an idea from Joe Buck <jbuck@synopsys.com>
13743 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13745 (data_def, component_decl): Add reductions to bad_decl.
13747 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13749 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13750 anonymous aggregates, since they don't have assignment operator
13752 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13753 assignment operators for anonymous structure fields.
13755 2001-03-21 Jason Merrill <jason@redhat.com>
13757 * pt.c (instantiate_decl): Abort if we see a member constant
13758 instantiation that doesn't already have its initializer.
13759 Downgrade explicit instantiation without definition to pedwarn.
13761 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13762 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13763 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13765 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13766 (pending_vtables): Remove.
13767 * decl2.c (pending_vtables): Remove.
13768 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13769 CLASSTYPE_VTABLE_NEEDS_WRITING.
13770 (import_export_class): Likewise.
13771 (init_decl2): Don't mark pending_vtables.
13772 * lex.c (handle_pragma_vtable): Just sorry.
13773 * pt.c (instantiate_class_template): Don't mess with
13774 CLASSTYPE_VTABLE_NEEDS_WRITING.
13775 (mark_class_instantiated): Likewise.
13776 * ptree.c (print_lang_type): Don't print it.
13777 * semantics.c (begin_class_definition): Don't set it.
13779 * pt.c (template_tail): Replace with last_pending_template.
13780 (maybe_templates, maybe_template_tail): Remove.
13781 (add_pending_template): Adjust.
13782 (instantiate_pending_templates): Adjust.
13784 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13785 (current_lang_stack): Remove.
13786 * decl.c (maybe_push_to_top_level): Don't initialize it.
13787 (duplicate_decls): Use current_lang_depth.
13788 (xref_basetypes): Likewise.
13789 * class.c (current_lang_depth): New fn.
13790 (push_lang_context): Use more varray functionality.
13791 (pop_lang_context): Likewise.
13793 * error.c (GLOBAL_THING): Always use '__'.
13795 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13797 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13799 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13800 operators, even when they have `extern "C"' linkage.
13802 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13804 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13805 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13806 where it's not necessary.
13807 (add_method): Remove optimization involving comparison of
13808 DECL_ASSEMBLER_NAME.
13809 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13810 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13811 where it's not necessary.
13812 (check_methods): Likewise.
13813 (build_clone): Likewise.
13814 (built_vtt): Likewise.
13815 * cp-tree.h (DECL_NEEDED_P): Likewise.
13816 * decl.c (pushtag): Likewise.
13817 (duplicate_decls): Likewise.
13818 (pushdecl): Likewise.
13819 (builtin_function): Likewise.
13820 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13821 (build_cp_library_fn): Likewise.
13822 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13823 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13824 where it's not necessary.
13825 (make_rtl_for_nonlocal_decl): Likewise.
13826 (cp_finish_decl): Likewise.
13827 (grokfndecl): Likewise.
13828 (grokvardecl): Likewise.
13829 (grokdeclarator): Likewise.
13830 (start_function): Likewise.
13831 (cp_missing_return_ok_p): Likewise.
13832 * decl2.c (grokclassfn): Likewise.
13833 (check_classfn): Likewise.
13834 (finish_static_data_member_decl): Likewise.
13835 (grokfield): Likewise.
13836 * error.c (GLOBAL_IORD_P): Remove.
13837 (dump_global_iord): Improve output.
13838 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13839 * except.c (nothrow_libfn_p): Summarily reject any function not in
13841 * init.c (build_java_class_ref): Don't explicitly set
13842 DECL_ASSEMBLER_NAME after calling mangle_decl.
13843 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13844 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13845 * method.c (set_mangled_name_for_decl): Don't explicitly set
13846 DECL_ASSEMBLER_NAME after calling mangle_decl.
13847 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13848 IDENTIFIER_GLOBAL_VALUE for the thunk.
13849 * pt.c (set_mangled_name_for_template_decl): Remove.
13850 (check_explicit_specialization): Don't use it.
13851 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13852 (tsubst_friend_function): Likewise.
13853 (tsubst_decl): Likewise.
13854 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13855 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13856 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13857 where it's not necessary.
13858 (tinfo_base_init): Likewise.
13859 (create_real_tinfo_var): Likewise.
13860 * search.c (looup_field_1): Likewise.
13861 * semantics.c (finish_named_return_value): Likewise.
13862 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13864 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13866 Correct semantics restrictions checking in throw-expression.
13867 * except.c (is_admissible_throw_operand): New function.
13868 (build_throw): Use it.
13870 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13872 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13875 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13877 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13878 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13879 * decl.c (duplicate_decls): Likewise.
13880 (builtin_function): Likewise.
13881 (build_library_fn): Likewise.
13882 (build_cp_library_fn): Likewise.
13883 (check_initializer): Likewise.
13884 (cp_finish_decl): Likewise.
13885 * decl2.c (grokfield): Likewise.
13886 (grok_function_init): Remove #if 0'd code.
13887 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13888 * friend.c (do_friend): Likewise.
13889 * init.c (get_temp_regvar): Likewise.
13890 * method.c (make_thunk): Likewise.
13891 * pt.c (tsubst_friend_function): Likewise.
13892 (tsubst_decl): Likewise.
13893 (regenerate_decl_from_template): Likewise.
13894 * semantics.c (genrtl_named_return_value): Likewise.
13895 (expand_body): Likewise.
13896 (genrtl_finish_function): Likewise.
13897 * tree.c (cp_tree_equal): Likewise.
13899 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13901 * call.c (convert_like_real): Add extra semantics to INNER
13902 parameter. Don't convert to temporary if a user conversion
13903 gives us an lvalue that we're about to bind to a reference.
13904 Set INNER to indicate pending reference binding on recursive
13907 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13909 * cp/lex.c: Delete duplicate pending_lang_change.
13911 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13913 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13915 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13916 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13918 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13920 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13922 2001-03-08 Stan Shebs <shebs@apple.com>
13924 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13926 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13928 * spew.c: Remove references to CPP_OSTRING.
13930 2001-03-06 Andrew Haley <aph@redhat.com>
13932 * typeck.c (convert_arguments): Check that we have an fndecl.
13934 2001-03-05 Andrew Haley <aph@redhat.com>
13936 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13937 __built_in_constant_p.
13939 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13941 * typeck.c (build_static_cast): Allow enum to enum conversions
13944 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13946 * class.c (check_field_decls): Pointers to member do not a
13947 non-pod struct make, as per DR 148.
13949 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13951 * call.c (joust): cp_pedwarn when using gnu extension concerning
13952 worst conversion sequences.
13954 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13956 * decl.c: Replace all uses of 'boolean' with 'bool'.
13958 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13960 * lang-specs.h: Add zero initializer for cpp_spec field to
13961 all array elements that need one. Don't put an #ifdef inside
13962 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13965 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13967 Implement using decls inside template functions.
13968 * decl2.c (validate_nonmember_using_decl): Don't special case
13969 fake_std_node in the global namespace. Don't reject early when
13970 processing a template.
13971 (do_local_using_decl): Add to statement tree. Don't do further
13972 processing when building a template.
13973 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13975 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13977 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13978 same function. Do complain about ambiguating extern "C"
13981 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13983 Remove floating point and complex type template constant parms.
13984 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13985 COMPLEX_TYPE extensions.
13986 (invalid_nontype_parm_type_p): Likewise.
13988 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13990 * except.c (call_eh_info): Revert "match_function"'s type.
13992 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13994 Fix ctor vtable vcall offsets.
13995 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13996 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13997 (get_matching_base): Remove.
13998 (get_original_base): New function.
13999 (build_vtbl_initializer): Initialize vid.rtti_binfo.
14000 Use a virtual thunk for a ctor vtable with an index
14001 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
14002 primary base within a constructor vtable. Only set
14003 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
14004 when primary base has been lost.
14005 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
14007 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
14009 * call.c (joust): Ensure more_specialized()'s argument length
14010 parameter has correct value for constructors.
14012 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
14014 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
14016 * decl.c (mark_inlined_fns): Prototype.
14018 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14020 * spew.c (yylex): Correct handling of friends.
14022 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14024 * mangle.c (write_encoding): Pass write_function_type the
14025 FUNCTION_DECL for the function being encoded.
14026 (write_function_type): Pass it along to write_bare_function_type.
14027 (write_bare_function_type): Pass it along to write_method_parms.
14028 (write_method_parms): Don't mangle the compiler-generated
14029 parameters to a constructor or destructor.
14031 2001-02-22 Andreas Jaeger <aj@suse.de>
14033 * optimize.c: Include toplev.h for
14034 note_deferral_of_defined_inline_function prototype.
14036 2001-02-22 Jakub Jelinek <jakub@redhat.com>
14038 * cp-tree.h (struct lang_decl_inlined_fns): New.
14039 (struct lang_decls): Add inlined_fns.
14040 (DECL_INLINED_FNS): New macro.
14041 * optimize.c (struct inline_data): Add inlined_fns.
14042 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
14043 (inlinable_function_p): Likewise, fix typo in comment,
14044 function is not inlinable if it already inlined function currently
14046 (expand_call_inline): Add fn to inlined_fns if necessary.
14047 (optimize_function): Initialize inlined_fns.
14048 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
14049 * decl.c (mark_inlined_fns): New function.
14050 (lang_mark_tree): Call it.
14052 2001-02-21 Jason Merrill <jason@redhat.com>
14054 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
14055 (DECL_UNINLINABLE): Move to middle-end.
14057 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
14058 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
14059 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
14060 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
14061 parms and outer BLOCK. note_deferral_of_defined_inline_function.
14063 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
14064 second parm of op=.
14066 2001-02-19 Mark Mitchell <mark@codesourcery.com>
14068 * decl2.c (set_decl_namespace): Allow explicit instantiations in
14071 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14073 * optimize.c (expand_call_inline): Don't walk subtrees of type
14076 2001-02-18 Mark Mitchell <mark@codesourcery.com>
14078 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
14081 2001-02-18 Jason Merrill <jason@redhat.com>
14083 Do put the VTT parameter in DECL_ARGUMENTS.
14084 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14085 (current_vtt_parm): New macro.
14086 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14087 (DECL_HAS_VTT_PARM_P): New macro.
14088 (DECL_VTT_PARM): Remove.
14089 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14090 * decl.c (duplicate_decls): Only copy the operator code if
14092 (start_function): Set current_vtt_parm.
14093 (lang_mark_tree): Don't mark vtt_parm.
14094 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14095 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
14096 * class.c (build_clone): Maybe remove the VTT parm.
14097 * optimize.c (maybe_clone_body): Set up the VTT parm.
14098 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14099 * call.c (build_over_call): Just allow the VTT arg.
14100 * method.c (make_thunk): Don't set DECL_VTT_PARM.
14101 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14102 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14103 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14104 * error.c (dump_function_decl): Likewise.
14105 * call.c (build_user_type_conversion_1, convert_like_real): Abort
14106 if we try to call a constructor with in-charge or VTT parms.
14107 * method.c (skip_artificial_parms_for): New fn.
14108 * call.c (add_function_candidate, build_over_call): Call it.
14109 * call.c (build_new_method_call): Use current_vtt_parm.
14110 * init.c (expand_virtual_init): Likewise.
14111 * class.c (same_signature_p): No longer static.
14112 * cp-tree.h: Declare it.
14113 * search.c (look_for_overrides_r): Use it.
14115 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14117 * cp-tree.h (new_abi_rtti_p): Remove.
14118 (name_mangling_version): Likewise.
14119 (flag_do_squangling): Likewise.
14120 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14121 * decl.c (grokfndecl): Likewise.
14122 * decl2.c (name_mangling_version): Remove.
14123 (flag_do_squangling): Likewise.
14124 (lang_f_options): Remove `squangle'.
14125 (unsupported_options): Add `squangle'.
14126 (cxx_decode_option): Issue a warning about uses of
14127 -fname-mangling-version.
14128 (finish_file): Remove old ABI support.
14129 * pt.c (check_explicit_specialization): Likewise.
14130 (tsubst_decl): Likewise.
14131 * rtti.c (init_rtti_processing): Likewise.
14132 (build_headof): Likewise.
14133 (get_tinfo_decl_dynamic): Likewise.
14134 (tinfo_from_decl): Likewise.
14135 (build_dynamic_cast_1): Likewise.
14136 (synthesize_tinfo_var): Likewise.
14137 * init.c (build_new): Allow enumeration types for the array-bounds
14138 in a direct-new-declarator.
14140 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14142 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14143 TREE_PROTECTED from the template being specialized.
14145 2001-02-17 Jason Merrill <jason@redhat.com>
14147 * decl2.c (build_artificial_parm): Set TREE_READONLY.
14149 * decl.c (bad_specifiers): Allow throw specs on things with
14150 pointer-to-function or -member-function type.
14151 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14154 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14156 * call.c (check_dtor_name): Handle template names correctly.
14158 2001-02-16 Jason Merrill <jason@redhat.com>
14160 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14161 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14162 * optimize.c (maybe_clone_body): Don't substitute it.
14163 * call.c (build_new_method_call): Check in_chrg instead.
14164 * init.c (expand_virtual_init): Likewise.
14166 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
14168 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14169 class-type introduces at least a type-name.
14171 2001-02-16 Jakub Jelinek <jakub@redhat.com>
14173 * call.c (convert_like_real): Create a temporary for non-lvalue.
14175 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
14177 * cp-tree.h: Fix typos in comments.
14179 2001-02-16 Jason Merrill <jason@redhat.com>
14181 * optimize.c (remap_block): If we're compiling a clone, pass the
14182 new block to insert_block.
14184 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14186 * semantics.c (finish_asm_stmt): Robustify.
14188 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14190 * pt.c (push_template_decl_real): Don't remangle the name of a
14193 2001-02-15 Jim Meyering <meyering@lucent.com>
14195 * Make-lang.in (c++.install-common): Depend on installdirs.
14196 (c++.install-info): Likewise.
14197 (c++.install-man): Likewise.
14199 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14201 * typeck2.c (build_m_component_ref): Robustify.
14203 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14205 * friend.c (do_friend): Don't take the nested [template] class
14206 into account when deciding whether to warn about the friend
14207 function not referring to a template function.
14209 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14211 * typeck.c (build_unary_op): Clarify error message.
14213 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14215 * parse.y (component_constructor_declarator): allow optional
14216 parentheses around constructor class name.
14218 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14220 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14222 * init.c (emit_base_init): Remove incorrect comment about
14224 * method.c (make_thunk): Fix comment alignment.
14226 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14228 Kill remnants of this is variable.
14229 * cp-tree.h (flag_this_is_variable): Remove.
14230 * decl2.c (flag_this_is_variable): Remove.
14231 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14232 (build_vbase_path): The path is non-static, even in a cdtor.
14233 (resolves_to_fixed_type_p): Add additional return value.
14234 * search.c (init_vbase_pointers): Adjust.
14235 * tree.c (lvalue_p_1): Adjust.
14236 * typeck.c (mark_addressable): Adjust.
14238 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14240 * pt.c (unify): Don't check cv quals of array types.
14242 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14244 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14245 check whether we already have the type.
14247 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14249 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14250 * call.c (build_op_delete_call): Simplify to remove duplicate
14252 * class.c (clone_function_decl): Don't build the deleting variant
14253 of a non-virtual destructor.
14254 * decl.c (finish_destructor_body): Don't call delete if this is a
14255 non-virtual destructor.
14256 * init.c (build_delete): Explicitly call `operator delete' when
14257 deleting an object with a non-virtual destructor.
14259 2001-02-13 Jason Merrill <jason@redhat.com>
14261 * lang-specs.h: Add more __EXCEPTIONS.
14263 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14265 * typeck2.c (process_init_constructor): Check
14266 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14268 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14270 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14271 Remove spurious information in comment. Allow further
14272 adjustments of REFERENCE_TYPE args.
14274 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14276 * errfn.c (cp_deprecated): Tweak diagnostic text.
14277 * parse.y (new_initializer): Deprecate initializer lists
14280 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14282 Remove old ABI support.
14284 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14286 * decl2.c (flag_vtable_thunks): Always set it to 1.
14287 (flag_new_abi): Likewise.
14288 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14290 * Makefile.in (g++spec.o): Fix typo.
14292 2001-02-09 Jason Merrill <jason@redhat.com>
14294 * lang-specs.h: Restore definition of __EXCEPTIONS.
14296 2001-02-08 Jason Merrill <jason@redhat.com>
14298 * search.c (shared_member_p): New function.
14299 (lookup_field_r): Use it.
14300 * cp-tree.h (SHARED_MEMBER_P): Remove.
14302 * method.c (process_overload_item): Handle template-dependent array
14304 * pt.c (type_unification_real): If we end up with undeduced nontype
14307 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14310 * typeck2.c (friendly_abort): Don't say anything if we have
14311 earlier errors or sorries.
14313 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14314 wchar_t. Ignore if in_system_header.
14316 * decl.c (maybe_push_cleanup_level): New fn...
14317 (start_decl_1): ...split out from here.
14318 * cvt.c (build_up_reference): Use it.
14319 * cp-tree.h: Declare it.
14321 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14323 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14326 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14328 * pt.c (lookup_template_class): Make sure it's a primary
14329 template or template_template_parm when called from the parser.
14330 (instantiate_template_class): Add assertion.
14332 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14334 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14335 from error_mark_node.
14337 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14339 Fix specification and implementation bugs in V3 ABI
14340 construction vtables.
14341 * cp-tree.h (flag_dump_class_layout): New flag.
14342 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14343 (BINFO_LOST_PRIMARY_P): New flag.
14344 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14345 (BINFO_PRIMARY_MARKED_P): Rename to ...
14346 (BINFO_PRIMARY_P): ... here.
14347 (binfo_via_virtual): New prototype.
14348 * decl2.c (flag_dump_class_layout): New flag.
14349 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14350 use `=' as a file name separator.
14351 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14353 (build_vtbl_address): If this is a virtual primary base, then
14354 get the vtbl of what it is ultimately primary for.
14355 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14356 for BINFO_PRIMARY_P.
14357 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14358 (get_shared_vbase_if_not_primary): Likewise.
14359 (dfs_get_pure_virtuals): Likewise.
14360 (expand_upcast_fixups): Likewise.
14361 (fixup_virtual_upcast_offsets): Likewise.
14362 (dfs_find_vbase_instance): Likewise.
14363 (find_vbase_instance): Likewise.
14364 (binfo_from_vbase): Adjust comment to reflect reality.
14365 (binfo_via_virtual): New function.
14366 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14367 for binfo walking during VTT construction.
14368 (dfs_mark_primary_bases): Remove.
14369 (force_canonical_binfo_r): New function.
14370 (force_canonical_binfo): New function.
14371 (mark_primary_virtual_base): New function.
14372 (mark_primary_bases): Walk in inheritance graph order, use
14373 mark_primary_virtual_base.
14374 (determine_primary_base): Use some more intermediate variables.
14375 (dfs_find_final_overrider): Don't check for overriding along a
14377 (dfs_modify_vtables): Walk into primary virtual bases too.
14378 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14379 (build_base_fields): Likewise.
14380 (dfs_set_offset_for_unshared_vbases): Likewise.
14381 (layout_virtual_bases): Likewise.
14382 (end_of_class): Likewise.
14383 (finish_struct_1): Call dump_class_hierarchy, if requested.
14384 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14385 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14386 (dump_class_hierarchy): Add file parameter. Append to file, if
14388 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14389 Use canonical base for virtual bases.
14390 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14391 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14392 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14393 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14395 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14396 from DATA. We want virtual primary bases and all bases via virtual.
14397 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14398 virtual base when not a construction vtable.
14399 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14400 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14401 Use canonical bases when processing virtual bases.
14402 (accumulate_vtbl_inits): We're interested in any base via a
14404 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14405 within a construction vtable, determine what is being overridden.
14406 (build_vtbl_initializer): Add more comments
14407 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14408 (build_rtti_vtbl_entries): Check if the base has lost its
14411 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14413 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14415 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14417 * decl.c (pushdecl): Call abort instead of fatal.
14418 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14419 * init.c (build_new_1): Likewise.
14420 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14421 * decl.c (build_typename_type): hash_table_init now returns void.
14422 decl.c (init_decl_processing): Make an error non-fatal.
14424 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14426 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14428 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14429 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14430 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14431 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14432 * decl.c (maybe_commonize_var): Use the new name-mangling where
14434 * decl2.c (comdat_linkage): Enhance comments. Make all
14435 compiler-generated things static, if COMDAT is not available.
14436 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14438 (tinfo_base_init): Use the correct mangled name for typeinfo
14439 strings, and push them into the global scope.
14440 (typeinfo_in_lib_p): New function.
14441 (synthesize_tinfo_var): Use it.
14442 (create_real_tinfo_var): Likewise.
14444 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14446 * decl.c (push_class_binding): Use context_for_name_lookup instead
14447 of CP_DECL_CONTEXT.
14448 * search.c (context_for_name_lookup): Remove static. Check for NULL
14449 context in the loop.
14450 * cp-tree.h (context_for_name_lookup): Add prototype.
14452 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14454 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14455 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14457 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14458 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14460 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14462 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14463 of macros used when compiling g++spec.c.
14464 * g++spec.c (lang_specific_driver): Link with the shared
14467 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14469 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14470 make_reference_declarator, make_call_declarator), method.c
14471 (implicitly_declare_fn), parse.y (namespace_using_decl,
14472 notype_unqualified_id, expr_or_declarator, new_type_id,
14473 after_type_declarator, direct_after_type_declarator,
14474 notype_declarator, complex_notype_declarator,
14475 complex_direct_notype_declarator, qualified_id,
14476 notype_qualified_id, overqualified_id, direct_new_declarator,
14477 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14478 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14479 instead of build_parse_node.
14481 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14483 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14484 (minus_one_node): Moved to top level gcc directory. Renamed
14485 to integer_minus_one_node.
14487 * init.c (init_init_processing): Don't set minus_one_node.
14488 (build_vec_init): Use integer_minus_one_node.
14490 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14492 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14494 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14495 identical and they would be replaced with constant, remove
14496 MODIFY_EXPR from the tree.
14498 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14500 * Make-lang.in: Remove all dependencies on defaults.h.
14501 * call.c: Don't include defaults.h.
14502 * decl.c: Likewise.
14503 * decl2.c: Likewise.
14504 * except.c: Likewise.
14506 * rtti.c: Likewise.
14507 * tree.c: Likewise.
14508 * typeck.c: Likewise.
14510 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14512 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14513 operators even in "C" linkage.
14514 * method.c (set_mangled_name_for_decl): Likewise.
14515 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14516 overloaded operators in "C" linkage.
14518 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14520 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14521 (tsubst_arg_types): Check parameter is not void.
14522 (tsubst): Adjust tsubst_decl call.
14524 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14526 * call.c (add_builtin_candidate): Quote std properly, from
14529 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14531 * pt.c (check_explicit_specialization): Clone constructors and
14534 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14536 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14537 indicates anything special about template depth. Make sure we
14538 only count the user visible template classes.
14540 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14542 * call.c (build_conv): Typo in comment.
14543 (add_builtin_candidate): Add more explanation.
14544 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14545 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14546 when we have enumeral types.
14547 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14548 candidates for relops and eqops.
14549 (joust): Simplify control flow. Allow a non-template user
14550 function to hide a builtin.
14552 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14554 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14555 (more_specialized): Add deduction parameter.
14556 * call.c (joust): Adjust more_specialized call.
14557 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14558 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14559 (get_bindings_order): Remove.
14560 (get_bindings_real): Add DEDUCE parameter.
14561 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14562 REFERENCE_TYPE jig for DEDUCE_ORDER.
14563 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14564 maybe_adjust_types_for_deduction.
14565 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14567 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14568 (check_cv_quals_for_unify): Use new unify qualifier flags.
14569 (unify): Clear new unify qualifier flags.
14570 (get_bindings_real): Add DEDUCE parameter.
14571 (get_bindings): Adjust call to get_bindings_real.
14572 (get_bindings_overload): Likewise.
14573 (most_specialized_instantiation): Adjust call to
14576 2001-01-19 Jason Merrill <jason@redhat.com>
14578 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14580 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14583 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14585 * decl2.c (arg_assoc_class): Fix double iteration logic.
14587 2001-01-19 Jason Merrill <jason@redhat.com>
14589 * init.c (build_delete): Always call convert_force to strip cv-quals.
14591 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14592 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14593 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14595 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14597 * search.c (get_vbase_1): Count only virtual bases.
14599 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14601 * class.c (duplicate_tag_error): Robustify flag clearing.
14603 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14605 * cp-tree.h (lookup_template_class): Add complain parm.
14606 * decl.c (lookup_namespace_name): Adjust call to
14607 lookup_template_class.
14608 (make_typename_type): Likewise.
14609 * semantics.c (finish_template_type): Likewise.
14610 * pt.c (lookup_template_class): Add complain parm. Adjust.
14611 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14612 (tsubst): Likewise.
14614 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14616 * pt.c (copy_default_args_to_explicit_spec): Preserve
14617 object's CV quals. Reorganize.
14619 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14621 * typeck.c (build_modify_expr): Say `initialization' for
14623 * init.c (build_default_init): Convert to enumeral type, if
14626 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14628 * parse.y (nomods_initdcl0): Properly set things up for
14631 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14633 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14634 (type_unification_real): Set it.
14637 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14639 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14641 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14643 * semantics.c (begin_class_definition): Check we're not inside a
14644 template parm list.
14646 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14648 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14651 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14653 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14654 * call.c (build_over_call): Add comment.
14656 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14658 * cvt.c (ocp_convert): Handle vector type conversion
14659 * typeck2.c (digest_init): Handle vector type initializations
14661 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14663 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14666 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14668 * pt.c (check_nontype_parm): Rename to ...
14669 (invalid_nontype_parm_type_p): ... here.
14670 (process_template_parm): Adjust.
14671 (convert_template_argument): Adjust.
14673 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14675 * pt.c (check_nontype_parm): New function.
14676 (process_template_parm): Use it.
14677 (convert_template_argument): Use it.
14678 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14681 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14683 * tree.c: Add defaults.h
14684 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14685 * Make-lang.in (cp/tree.o): Add defaults.h.
14687 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14689 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14691 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14693 * g++.1: Change to be ".so man1/gcc.1".
14695 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14697 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14699 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14700 ($(srcdir)/cp/g++int.info): New target.
14701 * gxxint.texi: Add info directory entry. Use @@ in email address.
14702 * .cvsignore: Update.
14704 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14706 * typeck.c (build_c_cast): Do template processing earlier.
14707 Always pedwarn on array casts.
14709 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14711 * friend.c (make_friend_class): Make sure a templated class is
14712 actually a template.
14714 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14716 * decl2.c (get_guard): Set linkage from guarded decl.
14718 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14720 * call.c (convert_default_arg): Check for unprocessed
14722 * cp-tree.h (replace_defarg): Move to spew.c.
14723 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14724 spew.c, which is where they really are.
14725 (done_pending_defargs): Declare.
14726 (unprocessed_defarg_fn): Declare.
14727 * decl.c (replace_defarg): Move to spew.c
14728 * parse.y (structsp): Call done_pending_defargs.
14729 * spew.c (defarg_fns): Rearrange list structure.
14730 (defarg_fnsdone): New static variable.
14731 (defarg_depfns): New static variable.
14732 (init_spew): Adjust.
14733 (add_defarg_fn): Store the type in TREE_TYPE.
14734 (do_pending_defargs): Detect and deal with ordering constraints
14736 (done_pending_defargs): New function.
14737 (unprocessed_defarg_fn): New function.
14738 (replace_defarg): Moved from decl.c. Robustify. Don't save
14739 if circularity detected.
14741 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14743 * pt.c (unify): Check array has a domain, before checking
14744 whether it is variable sized.
14746 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14748 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14749 parameters with pointers to arrays of unknown bound.
14751 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14753 * parse.y (template_parm_header, template_spec_header): New
14754 reductions. Split out from ...
14755 (template_header): ... here. Use them.
14756 (template_template_parm): Use template_parm_header.
14757 * semantics.c (finish_template_template_parm): Add assert.
14759 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14761 * mangle.c (write_builtin_type): Fix thinko.
14763 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14764 (copy_default_args_to_explicit_spec): Likewise.
14765 (check_explicit_specialization): Use it.
14767 * class.c (finish_struct_1): Remove last argument in call to
14768 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14769 * decl.c (builtin_function): Likewise.
14770 (build_cp_library_fn): Likewise.
14771 (check_initializer): Likewise.
14772 (make_rtl_for_nonlocal_decl): Likewise.
14773 (cp_finish_decl): Likewise.
14774 (start_function): Likewise.
14775 * decl2.c (finish_anon_union): Likewise.
14776 * friend.c (do_friend): Likewise.
14777 * init.c (build_java_class_ref): Likewise.
14778 * method.c (make_thunk): Likewise.
14779 * pt.c (tsubst_friend_function): Likewise.
14780 * semantics.c (expand_body): Likewise.
14782 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14784 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14785 looking at DECL_CLONED_FUNCTION for non-functions.
14787 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14789 * error.c (dump_template_parameter): Use parm to determine how
14790 to print default value.
14792 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14794 * class.c (duplicate_tag_error): Clear more flags.
14796 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14798 * call.c (build_new_method_call): Use binfo_for_vbase.
14800 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14802 * cp-tree.h (flag_cond_mismatch): Don't declare.
14803 * decl2.c (flag_cond_mismatch): Don't define.
14804 (lang_f_options): Remove cond-mismatch.
14805 (unsupported_options): Add cond-mismatch.
14807 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14809 * class.c (handle_using_decl): Reject using of constructor name
14810 of sourcing class. Allow injecting of a method with same name as
14811 nested class. Fixup error messages.
14813 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14815 * decl2.c (lang_decode_option): Handle -Wformat=2.
14817 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14819 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14820 initialized_in_class.
14821 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14822 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14823 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14824 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14825 * pt.c (check_default_tmpl_args): Adjust for
14826 DECL_INITIALIZED_IN_CLASS_P.
14827 (instantiate_class_template): Likewise.
14828 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14830 * class.c (finish_struct): Constify saved_filename.
14832 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14834 * class.c (duplicate_tag_error): Adjust diagnostic.
14835 (finish_struct): Locally set location to start of struct.
14836 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14838 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14840 * decl.c (struct binding_level): Adjust class_shadowed comments
14841 to reflect reality.
14842 (push_class_level_binding): Adjust comments to reflect reality.
14843 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14844 Don't set TREE_VALUE on the class_shadowed list.
14846 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14848 * decl2.c (acceptable_java_type): Allow references too.
14849 * init.c (build_java_class_ref): When using the new ABI, search
14850 `class$' and have it mangled with `mangle_decl.'
14851 * mangle.c (write_java_integer_type_codes): New function.
14852 (write_builtin_type): Detect and mangle Java integer and real
14855 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14857 * decl2.c (grokfield): Don't accept `asm' specifiers for
14858 non-static data members.
14860 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14862 * expr.c (cplus_expand_expr): Don't reset `target'.
14864 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14866 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14868 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14870 * parse.y (template_datadef): Check for error_mark_node.
14872 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14874 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14876 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14878 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14879 (record_builtin_type): Make non-static.
14880 (flag_short_double): Don't declare.
14881 (init_decl_processing): Remove the creation of many tree nodes now
14882 in c_common_nodes_and_builtins.
14883 (build_void_list_node): New function.
14884 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14885 * cp-tree.h (flag_short_wchar): Don't declare.
14887 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14889 * call.c (build_conv): Don't use build1 for USER_CONV.
14890 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14892 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14894 * lex.c (lang_init): Call c_common_lang_init.
14896 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14898 * search.c (lookup_fnfields_here): Remove.
14899 (look_for_overrides_r): Use lookup_fnfields_1.
14900 Ignore functions from using declarations.
14902 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14904 Implement exceptions specifiers for implicit member functions.
14905 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14906 * method.c (synthesize_exception_spec): New function.
14907 (locate_dtor, locate_ctor, locate_copy): New functions.
14908 (implicitly_declare_fn): Generate the exception spec too.
14909 * search.c (check_final_overrider): Check artificial functions
14911 * typeck2.c (merge_exception_specifiers): New function.
14913 2001-01-03 Jason Merrill <jason@redhat.com>
14915 * init.c (build_default_init): New fn.
14916 (perform_member_init): Split out from here.
14917 (build_new_1): Use it. Simplify initialization logic.
14918 (build_vec_init): Take an array, rather than a pointer and maxindex.
14919 Speed up simple initializations. Don't clean up if we're assigning.
14920 * cp-tree.h: Adjust.
14921 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14922 * parse.y (new_initializer): Return void_zero_node for ().
14923 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14924 * typeck2.c (digest_init): Only complain about user-written
14927 2000-12-22 Mike Stump <mrs@wrs.com>
14929 * decl2.c: (max_tinst_depth): Increase to 50.
14931 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14933 * class.c (invalidate_class_lookup_cache): Zero the
14934 previous_class_values.
14935 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14937 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14938 * decl.c (free_bindings): New variable.
14939 (push_binding): Don't create a new binding if we have one on the
14941 (pop_binding): Put old bindings on the free list.
14942 (init_decl_processing): Use size_int, not build_int_2.
14943 Register free_bindings as a GC root.
14944 (cp_make_fname_decl): Use size_int, not build_int_2.
14945 (push_inline_template_parms_recursive): Likewise.
14946 (end_template_parm_list): Likewise.
14947 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14948 (tsubst_template_parms): Use size_int, not build_int_2.
14949 (tsubst): Likewise.
14950 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14952 2001-01-02 Richard Henderson <rth@redhat.com>
14954 * parse.y (asm): Set ASM_INPUT_P.
14956 2001-01-02 Jason Merrill <jason@redhat.com>
14958 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14961 * typeck.c (cp_truthvalue_conversion): New fn.
14962 * cvt.c (ocp_convert): Use it.
14964 * cp-tree.h: Lose c-common.c decls.
14966 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14967 * cvt.c (convert_to_void): Use type_unknown_p.
14969 * typeck.c (strip_all_pointer_quals): Also strip quals from
14970 pointer-to-member types.
14972 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14975 * call.c (build_new_method_call): Do evaluate the object parameter
14976 when accessing a static member.
14977 * typeck.c (build_component_ref): Likewise.
14979 2001-01-02 Andreas Jaeger <aj@suse.de>
14981 * decl.c (cp_missing_noreturn_ok_p): New.
14982 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14984 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14986 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14988 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14990 * class.c (pushclass): Remove #if 0'd code.
14991 * cp-tree.h (overload_template_name): Remove.
14992 * decl.c (store_bindings): Simplify.
14993 (pop_from_top_level): Likewise.
14994 * pt.c (overload_template_name): Remove.
14995 (instantiate_decl): Don't call push_to_top_level if it's not
14998 2000-12-28 Mark Mitchell <mark@codesourcery.com>
15000 * pt.c (register_local_specialization): Don't return a value.
15001 (lookup_template_class): Use move-to-front heuristic when looking
15002 up template instantiations.
15003 (instantiate_decl): Only push_to_top_level when we're actually
15004 going to instantiate the template.
15006 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
15008 * search.c (binfo_for_vtable): Return least derived class, not
15009 most. Handle secondary vtables.
15011 2000-12-22 Jason Merrill <jason@redhat.com>
15013 * pt.c (more_specialized): Don't optimize len==0.
15014 (fn_type_unification): If we're adding the return type, increase len.
15016 * typeck.c (build_binary_op): Fix pmf comparison logic.
15018 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
15019 DECL_STATIC_FUNCTION_P.
15021 * semantics.c (genrtl_finish_function): Don't try to jump to
15022 return_label unless it exists.
15024 In partial ordering for a call, ignore parms for which we don't have
15026 * call.c (joust): Pass len to more_specialized.
15027 (add_template_candidate_real): Strip 'this', pass len.
15028 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
15029 (get_bindings_order): New fn. Pass len down.
15030 (get_bindings_real): Strip 'this', pass len.
15031 (fn_type_unification): Likewise.
15032 (type_unification_real): Succeed after checking 'len' args.
15033 (most_specialized_instantiation): Lose explicit_args parm.
15034 * class.c (resolve_address_of_overloaded_function): Strip 'this',
15037 2000-12-21 Jason Merrill <jason@redhat.com>
15039 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
15040 DECL_TEMPLATE_RESULT.
15042 * search.c (lookup_field_r): Call lookup_fnfields_1, not
15043 lookup_fnfields_here.
15045 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
15047 * call.c (build_object_call): Also allow conversions that return
15048 reference to pointer to function.
15049 (add_conv_candidate): Handle totype being ref to ptr to fn.
15050 (build_field_call): Also allow members of type reference to function.
15051 Lose support for calling pointer to METHOD_TYPE fields.
15053 * error.c (dump_expr): Handle *_CAST_EXPR.
15055 * typeck2.c (build_scoped_ref): Always convert to the naming class.
15057 * tree.c (break_out_cleanups): Lose.
15058 * cp-tree.h: Remove prototype.
15059 * typeck.c (build_component_ref): Don't break_out_cleanups.
15060 (build_compound_expr): Likewise.
15061 * semantics.c (finish_expr_stmt): Likewise.
15063 2000-12-20 Richard Henderson <rth@redhat.com>
15065 * cp-tree.h: Update declarations.
15066 * decl.c (finish_case_label): Return the new stmt node.
15067 * semantics.c (finish_goto_stmt): Likewise.
15068 (finish_expr_stmt, finish_return_stmt): Likewise.
15069 (finish_break_stmt, finish_continue_stmt): Likewise.
15070 (finish_asm_stmt): Likewise.
15071 * parse.y (already_scoped_stmt): Set STMT_LINENO.
15072 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
15073 (simple_if, simple_stmt): Return the new stmt node.
15074 (save_lineno): New.
15076 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
15078 * cp-tree.h: Don't declare warn_long_long.
15080 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15082 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15085 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15087 * pt.c (unify): Handle when both ARG and PARM are
15088 BOUND_TEMPLATE_TEMPLATE_PARM.
15090 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15092 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15093 DECL_TEMPLATE_PARM_P.
15095 2000-12-15 Jason Merrill <jason@redhat.com>
15097 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
15099 * init.c (build_new_1): Don't strip quals from type.
15101 * decl.c (pushdecl): Don't check for linkage on a non-decl.
15103 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15105 * call.c (build_new_function_call): Lose space before paren in
15107 (build_new_method_call): Likewise.
15109 * typeck2.c (build_m_component_ref): Propagate quals from datum.
15111 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15113 * pt.c (check_explicit_specialization): Propagate default
15114 function arguments to explicit specializations.
15116 2000-12-13 DJ Delorie <dj@redhat.com>
15118 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15121 2000-12-08 Jason Merrill <jason@redhat.com>
15123 * error.c (dump_function_name): Don't let the user see __comp_ctor.
15125 Clean up copy-initialization in overloading code.
15126 * call.c (build_user_type_conversion_1): Die if we are asked to
15127 convert to the same or a base type.
15128 (implicit_conversion): Avoid doing so. Lose reference binding code.
15129 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15130 direct-initialization. Also do direct-init part of copy-init.
15131 (build_user_type_conversion): Don't provide context to convert_like.
15132 * cvt.c (ocp_convert): build_user_type_conversion will now provide
15133 the constructor call for copy-init.
15135 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15136 instantiation of a member template.
15137 (do_decl_instantiation): Not here.
15139 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15141 * class.c (check_field_decls): Don't special case anonymous
15142 fields in error messages.
15143 (note_name_declared_in_class): Use %D on diagnostic.
15145 * tree.c (pod_type_p): Use strip_array_types.
15146 (cp_valid_lang_attribute): Likewise.
15147 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15148 multiple evaluations.
15149 (cp_has_mutable_p): Use strip_array_types.
15151 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15153 * cp-tree.h (sufficient_parms_p): Declare new function.
15154 * call.c (sufficient_parms_p): New function, broken out of ...
15155 (add_function_candidate): ... here. Use it.
15156 (add_conv_candidate): Use it.
15157 * decl.c (grok_ctor_properties): Use it.
15159 2000-12-07 Jakub Jelinek <jakub@redhat.com>
15161 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15163 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
15165 * decl2.c (lang_decode_option): Handle -Wformat-security.
15167 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15169 * pt.c (verify_class_unification): New function.
15170 (get_class_bindings): Use it.
15171 (try_class_unification): Tidy.
15172 (unify): Handle when argument of a template-id is not
15173 template parameter dependent.
15174 (template_args_equal): Handle when TREE_CODE's do not match.
15176 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15178 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15179 for -save-temps, pass all relevant -Defines to it, and then don't
15180 pass them to cc1plus.
15182 2000-12-05 Will Cohen <wcohen@redhat.com>
15184 * decl.c (finish_case_label): Cleared
15185 more_cleanups_ok in surrounding function scopes.
15186 (define_label): Likewise.
15188 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15190 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15191 (get_matching_virtual): Remove.
15192 (look_for_overrides): Declare new function.
15193 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15195 * class.c (check_for_override): Move base class iteration code
15196 to look_for_overrides.
15197 * search.c (next_baselink): Remove.
15198 (get_virtuals_named_this): Remove.
15199 (get_virtual_destructor): Remove.
15200 (tree_has_any_destructors_p): Remove.
15201 (struct gvnt_info): Remove.
15202 (check_final_overrider): Remove `virtual' from error messages.
15203 (get_matching_virtuals): Remove. Move functionality to ...
15204 (look_for_overrides): ... here, and ...
15205 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15208 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15210 * typeck.c (get_delta_difference): If via a virtual base,
15212 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15215 2000-12-04 Richard Henderson <rth@redhat.com>
15217 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15219 2000-12-04 Jason Merrill <jason@redhat.com>
15221 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15222 (write_builtin_type): Pass intSI_type_node and the like through
15224 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15225 Pass intSI_type_node and the like through type_for_mode.
15226 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15227 * pt.c (tsubst, unify): Likewise.
15228 * tree.c (walk_tree): Likewise.
15229 * error.c (dump_type): Likewise.
15230 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15232 * Make-lang.in: Tweak top comment for emacs.
15233 (cp/TAGS): Restore.
15235 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15237 * class.c (clone_function_decl): Robustify.
15239 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15241 * decl.c (store_bindings): Only search in the non modified
15242 old_bindings for duplicates.
15244 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15246 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15247 TYPE_POLYMORPHIC_P.
15249 * typeck.c (build_static_cast): Remove unused variable.
15251 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15253 * pt.c: Fix typo in comment.
15255 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15257 * decl2.c (warn_format): Remove definition.
15258 (lang_decode_option): Handle -Wformat-nonliteral,
15259 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15261 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15263 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15264 (init_decl_processing): Don't create string_type_node,
15265 const_string_type_node, wint_type_node, intmax_type_node,
15266 uintmax_type_node, default_function_type, ptrdiff_type_node and
15267 unsigned_ptrdiff_type_node. Adjust position of call to
15268 c_common_nodes_and_builtins.
15269 (identifier_global_value): New function.
15271 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15273 * call.c (standard_conversion): Reject pointer to member
15274 conversions from ambiguous, inaccessible or virtual bases.
15275 * typeck.c (build_static_cast): Don't check pointers to members
15278 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15280 * method.c (do_build_copy_constructor): Preserve cv
15281 qualifications when accessing source object members.
15282 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15285 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15287 * method.c (do_build_assign_ref): Construct appropriately
15288 CV-qualified base reference. Don't allow const casts in base
15291 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15293 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15294 incomplete return type.
15296 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15298 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15299 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15302 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15304 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15306 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15308 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15310 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15312 * decl.c (grokdeclarator): Do type access control on friend
15315 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15317 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15318 bison parser ickiness.
15319 * pt.c (tsubst_friend_function): Enter namespace scope when
15320 tsubsting the function name.
15321 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15323 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15325 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15326 * cvt.c (cp_convert_to_pointer): Add force parameter.
15327 Allow conversions via virtual base if forced.
15328 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15329 (ocp_convert): Likewise.
15330 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15331 * typeck.c (get_delta_difference): Adjust handling of virtual
15334 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15336 * tree.c (struct list_hash): Remove.
15337 (list_hash_table): Make it be an htab.
15338 (struct list_proxy): New type.
15339 (list_hash_eq): New function.
15340 (list_hash_pieces): Renamed from ...
15341 (list_hash): ... this.
15342 (list_hash_lookup): Remove.
15343 (list_hash_add): Remove.
15344 (hash_tree_cons): Use the generic hashtable.
15345 (mark_list_hash): Remove.
15346 (init_tree): Create the hashtable.
15348 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15350 * method.c (build_mangled_C9x_name): Rename to
15351 build_mangled_C99_name. Change C9X references in comments to
15354 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15356 * parse.y (unary_expr): Move VA_ARG from here ...
15357 (primary): ... to here.
15359 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15361 * semantics.c (finish_id_expr): If type is error_mark, return
15364 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15366 * pt.c (lookup_template_class): Simplify loop exit constructs.
15367 Cope when there is no partial instantiation of a template
15370 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15372 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15374 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15376 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15379 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15380 destructors that haven't already been cloned.
15382 2000-11-20 Richard Henderson <rth@redhat.com>
15384 * parse.y (yyparse_1): Rename the parser entry point.
15386 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15388 * mangle.c (write_name): Use <unscoped-name> for names directly in
15390 (write_unscoped_name): Accept names directly in function scope.
15392 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15394 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15395 * parse.y (extdef): Add EXPORT reduction.
15396 * spew.c (yylex): Don't skip export here.
15398 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15400 * decl.c (init_decl_processing): Correct name of pure virtual
15401 function under the new ABI.
15402 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15403 (throw_bad_typeid): Likewise for bad typeid function.
15405 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15407 * decl.c (grokparms): Don't even function types of `void' type,
15409 * mangle.c (write_type): Don't crash when confronted with the
15412 * decl.c (grokparms): Don't create parameters of `void' type.
15414 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15416 * lex.c (mark_impl_file_chain): Delete.
15417 (init_parse): Remove call to ggc_add_string_root. No need to
15418 ggc_strdup a string constant. Do not add impl_file_chain to GC
15420 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15422 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15424 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15426 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15428 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15429 * decl.c (grokdeclarator): Don't reject void parms here.
15430 (require_complete_types_for_parms): Simplify, use
15431 complete_type_or_else.
15432 (grokparms): Remove bitrot. Remove funcdef parm.
15433 Deal with ellipsis parm lists here.
15434 * semantics.c (finish_parmlist): Don't append void_list_node
15435 here. Set PARMLIST_ELLIPSIS_P.
15437 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15439 * typeck2.c (incomplete_type_error): Reorganize to avoid
15440 excessive diagnostics.
15442 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15444 * lex.c (struct impl_files, internal_filename): Constify a char *.
15446 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15448 * mangle.c (write_special_name_constructor): Don't generate
15449 assembler junk when confronted with an old-style constructor.
15450 (write_special_name_destructor): Likewise.
15451 (mangle_decl_string): Do it here instead.
15453 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15455 * call.c (op_error): Make error messages clearer.
15457 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15459 * decl.c (wrapup_globals_for_namespace): Don't mark things
15460 TREE_ASM_WRITTEN when they're not.
15462 2000-11-15 Jason Merrill <jason@redhat.com>
15464 * typeck2.c (friendly_abort): Uncount the error before handing
15465 off to fancy_abort.
15467 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15469 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15471 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15473 * class.c (build_vtbl_initializer): Fix typo in comment.
15474 * typeck.c (expr_sizeof): Don't crash on errors.
15476 2000-11-14 Jim Wilson <wilson@redhat.com>
15478 * lang-specs.h: Add %2 after %(cc1_options).
15480 2000-11-14 Richard Henderson <rth@redhat.com>
15482 * typeck.c (c_sizeof): Be strict about casting result value
15483 back to c_size_type_node.
15484 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15486 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15488 * typeck.c (build_unary_op): Use boolean_increment from
15489 c-common.c, moving the relevant code there.
15491 2000-11-11 Jason Merrill <jason@redhat.com>
15493 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15495 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15498 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15500 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15501 * lex.c (copy_lang_decl): Likewise.
15503 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15505 * dump.c (cp_dump_tree): Don't dump function bodies here.
15507 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15508 (dump.o): Update dependency list.
15509 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15510 (flag_dump_translation_unit): Likewise.
15511 (CP_TYPE_QUALS): Adjust definition.
15512 (DECL_C_BIT_FIELD): Remove.
15513 (SET_DECL_C_BIT_FIELD): Likewise.
15514 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15515 (add_maybe_template): Likewise.
15516 (strip_array_types): Likewise.
15517 (dump_node_to_file): Likewise.
15518 (cp_dump_tree): New function.
15519 * decl.c (init_decl_processing): Set lang_dump_tree.
15520 * decl2.c (flag_dump_translation_unit): Remove.
15521 * dump.c: Move most of it to ../c-dump.c.
15522 (cp_dump_tree): New function.
15523 * pt.c (add_maybe_template): Remove.
15524 * typeck.c (strip_array_types): Likewise.
15526 2000-11-07 Eric Christopher <echristo@redhat.com>
15528 * decl.c (init_decl_processing): Change definition of
15529 __wchar_t to wchar_t. Remove artificial declaration of
15531 * lex.c: Change instances of __wchar_t to wchar_t.
15533 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15535 * lex.c (do_identifier): Don't lookup_name for operators.
15536 * parse.y (operator): Save looking_for_typename.
15537 (unoperator): Restore it.
15538 * spew.c (frob_opname): Use nth_token for lookahead.
15540 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15542 * decl.c (grok_op_properties): Always use coerce_new_type and
15543 coerce_delete_type.
15544 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15545 exception specification. Tidy up.
15546 (coerce_delete_type): Preserve exception specification. Tidy up.
15548 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15550 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15551 (push_binding_level), error.c (cp_tree_printer), pt.c
15552 (process_partial_specialization, tsubst_template_arg_vector),
15553 search.c (lookup_member): Use memset () instead of bzero ().
15555 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15557 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15559 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15561 * Make-lang.in (c++.distdir): Remove.
15563 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15565 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15566 declarations from different namespaces to be combined.
15568 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15570 * decl.c: Include tm_p.h.
15572 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15574 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15576 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15578 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15579 (build_overload_value), repo.c (open_repo_file), xref.c
15580 (open_xref_file): Use strchr () and strrchr () instead of index ()
15583 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15585 * call.c (build_over_call): Call fold on the CALL_EXPR.
15587 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15589 * error.c (dump_template_decl): Separate template hearders with
15592 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15594 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15595 TS_* flags with corresponding TFF_*. Adjust prototypes of
15596 functions (which used to take a tree_string_flags) to take an int.
15598 * cp-tree.h (enum tree_string_flags): Remove
15599 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15600 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15601 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15602 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15603 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15604 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15605 (type_as_string, decl_as_string, expr_as_string,
15606 context_as_string): Adjust prototype.
15608 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15609 instead of TS_PLAIN.
15611 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15612 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15615 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15617 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15618 (linkage_kind): New enumeration.
15619 (decl_linkage): New function.
15620 * decl2.c (comdat_linkage): Extend comment.
15621 * error.c (dump_function_decl): Print the arguments used to
15622 instantiate a template, even when not printing the type of the
15624 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15625 not TREE_PUBLIC, to test for external linkage.
15626 * tree.c (decl_linkage): New function.
15628 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15630 * pt.c (instantiate_decl): Always instantiate static data members
15631 initialized in-class.
15633 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15635 * Make-lang.in: Move all build rules here from Makefile.in,
15636 adapt to new context. Wrap all rules that change the current
15637 directory in parentheses. Expunge all references to $(P).
15638 When one command depends on another and they're run all at
15639 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15640 all object-file generation rules. Delete obsolete variables.
15642 * Makefile.in: Delete.
15643 * config-lang.in: Delete outputs= line.
15645 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15647 * error.c (dump_function_decl): Print no space between
15648 `ptr-operator' the `type-specifier' of the return type.
15649 (dump_type_prefix): Make sure we put space at the appropriate
15652 2000-10-23 Jason Merrill <jason@redhat.com>
15654 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15656 2000-10-22 Jason Merrill <jason@redhat.com>
15658 * call.c (build_conditional_expr): Use ocp_convert to force
15661 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15663 * call.c (standard_conversion): Use RVALUE_CONVs for all
15664 expressions that satisfy lvalue_p, not just those that satisfy
15667 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15669 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15670 not one with TYPE_IS_SIZETYPE set.
15671 (dubious_conversion_warnings): Remove special-case code.
15673 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15675 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15676 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15677 (dump_type_prefix): Print vector-of-int as 'int vector'.
15678 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15679 * tree.c (walk_tree): Handle VECTOR_TYPE.
15681 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15683 2000-10-21 Jason Merrill <jason@redhat.com>
15685 * parse.y (operator): Set got_object from got_scope.
15686 Set looking_for_typename.
15687 * decl.c (lookup_name_real): Clear val after setting from_obj.
15688 Reorganize diagnostic.
15690 2000-10-20 Jason Merrill <jason@redhat.com>
15692 * tree.c (walk_tree): Don't walk into default args.
15694 * error.c (dump_expr): Use host_integerp.
15696 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15698 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15699 "since" in error message.
15701 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15703 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15705 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15707 * decl.c (revert_static_member_fn): Fixed typo.
15709 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15711 * class.c (subobject_offset_fn): New type.
15712 (dfs_record_base_offsets): Remove.
15713 (record_base_offsets): Likewise.
15714 (dfs_search_base_offsets): Likewise.
15715 (record_subobject_offset): New function.
15716 (check_subobject_offset): Likewise.
15717 (walk_subobject_offsets): Likewise.
15718 (record_subobject_offsets): Likewise.
15719 (layout_conflict_p): Reimplement.
15720 (layout_nonempty_base_or_field): Correct handling of type
15721 conflicts during layout.
15722 (layout_empty_base): Likewise.
15723 (build_base_field): Adjust to handle new representation of empty
15725 (build_base_fields): Likewise.
15726 (layout_virtual_bases): Likewise.
15727 (splay_tree_compare_integer_csts): New function.
15728 (layout_class_type): Use a splay_tree, rather than a varray, to
15729 represent the offsets of empty bases.
15731 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15732 * decl.c (select_decl): Don't return declarations that are
15735 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15737 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15738 (fake_std_node): New macro.
15739 * decl.c (in_std): Rename to ...
15740 (in_fake_std): ... this.
15741 (flag_no_builtin): Remove.
15742 (flag_no_nonansi_builtin): Likewise.
15743 (walk_namespaces_r): Use fake_std_node.
15744 (push_namespace): Use std_identifier.
15745 (pop_namespace): Use in_fake_std.
15746 (lookup_name_real): Use fake_std_node.
15747 (init_decl_processing): When -fhonor-std, create the `std'
15748 namespace. Don't create a dummy fake_std_node in that case.
15749 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15750 (builtin_function): Put builtins whose names don't begin
15751 with `_' in the std namespace.
15752 * decl2.c (flag_no_builtin): Remove.
15753 (flag_no_nonansi_builtin): Likewise.
15754 (set_decl_namespace): Use fake_std_node.
15755 (validate_nonmember_using_decl): Likewise.
15756 (do_using_directive): Likewise.
15757 (handle_class_head): Likewise.
15758 * dump.c (dequeue_and_dump): Likewise.
15759 * except.c (init_exception_processing): Use std_identifier.
15760 * init.c (build_member_call): Use fake_std_node.
15761 * rtti.c (init_rtti_processing): Use std_identifier.
15763 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15765 * cp-tree.h (back_end_hook): Remove declaration.
15766 * decl2.c (back_end_hook): Remove definition.
15768 * dump.c (dequeue_and_dump): Dump TREE_USED.
15770 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15772 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15774 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15776 * decl.c (WINT_TYPE): Define.
15777 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15778 c_size_type_node, signed_size_type_node and wint_type_node.
15780 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15782 * decl2.c (warn_missing_format_attribute): New variable.
15783 (lang_decode_option): Decode -Wmissing-format-attribute.
15785 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15787 * typeck.c (qualify_type): Remove.
15788 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15790 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15792 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15794 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15796 * Makefile.in (parse.c, parse.h): Create atomically.
15798 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15800 * class.c (current_obstack): Remove.
15801 * decl.c (ggc_p): Remove.
15802 (start_decl): Don't use decl_tree_cons.
15803 (grokdeclarator): Don't use build_decl_list.
15804 (start_function): Don't use decl_tree_cons.
15805 (finish_function): Don't mess with obstacks.
15806 * decl2.c (grok_x_components): Don't use build_decl_list.
15807 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15808 (implicitly_declare_fn): Don't call build_decl_list.
15809 * parse.y (frob_specs): Don't call build_decl_list or
15811 (expr_or_declarator_intern): Don't call decl_tree_cons.
15812 (primary): Don't call build_decl_list.
15813 (fcast_or_absdcl): Likewise.
15814 (typed_declspecs): Don't call decl_tree_cons.
15815 (reserved_declspecs): Don't call build_decl_list.
15816 (declmods): Likewise.
15817 (reserved_typespecquals): Likewise.
15819 (new_type_id): Likewise.
15820 (cv_qualifiers): Likewise.
15821 (after_type_declarator_intern): Likewise.
15822 (notype_declarator_intern): Likewise.
15823 (absdcl_intern): Likewise.
15824 (named_parm): Likewise.
15825 * pt.c (most_specialized_class): Likewise.
15826 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15827 (init_repo): Initialize it.
15828 * search.c (current_obstack): Remove.
15829 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15831 2000-10-09 Richard Henderson <rth@cygnus.com>
15833 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15834 (c++ language support bits for libgcc): Remove.
15835 (c++.clean): Remove cplib2.txt cleanup.
15836 * config-lang.in (headers, lib2funcs): Remove.
15838 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15839 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15840 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15841 * inc/new.h, inc/typeinfo: Remove files.
15843 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15845 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15847 (init_decl_processing): Initialize intmax_type_node and
15850 2000-10-06 Richard Henderson <rth@cygnus.com>
15852 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15853 (original_result_rtx): Remove.
15854 * decl.c (save_function_data): Don't clear x_result_rtx.
15855 (mark_lang_function): Don't mark it either.
15856 * expr.c (fixup_result_decl): Remove.
15857 * semantics.c (genrtl_named_return_value): Frob the return decl
15858 before calling emit_local_var.
15859 (genrtl_finish_function): Don't call fixup_result_decl.
15860 Always emit the jump to return_label.
15862 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15864 * pt.c (lookup_template_class): Set current access for enum.
15865 (tsubst_enum): Set file & line for enum decl.
15867 * spew.c (yylex): Remove unused variable.
15869 2000-10-05 Richard Henderson <rth@cygnus.com>
15871 * semantics.c (genrtl_finish_function): Don't init or check
15872 can_reach_end; remove noreturn and return value checks.
15874 2000-10-05 Tom Tromey <tromey@cygnus.com>
15876 * init.c (build_java_class_ref): Use `build_static_name' with a
15877 suffix, not a prefix, to build the class object's name.
15879 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15881 * cp-tree.h (access_kind): Fix comment typo.
15882 * decl2.c (grokfield): Fix diagnostic typo.
15883 * semantics.c (finish_template_type): Fix comment typo.
15884 (finish_qualified_object_call_expr): Likewise.
15886 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15888 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15891 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15893 * spew.c (frob_id): New static function.
15894 (frob_opname): Use it.
15897 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15899 * decl.c (lang_mark_false_label_stack): Remove.
15900 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15902 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15904 * gxxint.texi: Use @email for formatting email addresses.
15906 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15908 * error.c: Remove direct obstack manipulation. Replace with
15909 output_buffer-based formatting. Adjust calls to removed macros.
15910 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15911 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15912 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15914 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15916 * ir.texi: Move to ../c-tree.texi.
15918 2000-09-20 Jason Merrill <jason@redhat.com>
15920 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15922 2000-09-21 Andreas Jaeger <aj@suse.de>
15924 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15925 * cp-tree.h: ... here.
15927 * error.c: Remove declaration of cp_printer.
15929 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15931 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15933 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15935 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15938 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15940 * decl.c (start_function): Robustify.
15942 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15944 * cp-tree.h (check_function_format): Accept a `status' parameter.
15946 * call.c, typeck.c: Updates calls to `check_function_format'.
15948 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15950 * decl2.c (handle_class_head): Always push some scope even
15953 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15955 * cp-tree.h (struct cp_language_function): Remove
15956 x_scope_stmt_stack and name_declared.
15957 (current_scope_stmt_stack): Remove.
15958 (function_name_declared_p): New macro.
15959 (struct lang_decl_flags): Use c_lang_decl as a base class.
15961 (struct lang_decl): Replace saved_tree with context.
15962 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15963 (SET_DECL_FRIEND_CONTEXT): Likewise.
15964 (DECL_VIRTUAL_CONTEXT): Likewise.
15965 (DECL_SAVED_TREE): Remove.
15966 (C_DECLARED_LABEL_FLAG): Likewise.
15967 (cplus_expand_expr_stmt): Don't declare.
15968 (add_decl_stmt): Likewise.
15969 (add_scope_stmt): Likewise.
15970 * decl.c (mark_stmt_tree): Remove.
15971 (case_compare): Likewise.
15972 (finish_case_label): Use c_add_case_label.
15973 (init_decl_processing): Set more language-specific hooks.
15974 (build_enumerator): Fix typo in comment.
15975 (cplus_expand_expr_stmt): Remove.
15976 (mark_lang_function): Use mark_c_language_function.
15977 (lang_mark_tree): Use c_mark_lang_decl.
15978 * decl2.c: Change order of inclusion.
15979 * except.c: Likewise.
15980 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15981 back on c_expand_expr.
15982 * friend.c: Include expr.h.
15983 * init.c: Change order of inclusion.
15984 * Makefile.in: Update dependencies.
15985 * lex.h (free_lang_decl_chain): Remove.
15986 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15987 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15989 (instantiate_decl): Use function_name_declared_p.
15990 * semantics.c (lang_expand_expr_stmt): Remove.
15991 (set_current_function_name_declared): Likewise.
15992 (current_function_name_declared): Likewise.
15993 (begin_compound_stmt): Use function_name_declared_p.
15994 (add_decl_stmt): Remove.
15995 (setup_vtbl_ptr): Use function_name_declared_p.
15996 (add_scope_stmt): Remove.
15997 (current_scope_stmt_stack): New function.
15998 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15999 (expand_body): Use function_name_declared_p.
16000 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
16001 * typeck.c: Change order of includes.
16002 (convert_sequence): Remove.
16004 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
16006 * lex.c (reswords): Add _Complex.
16008 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16010 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
16012 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
16014 * init.c (begin_init_stmts): Don't use // comments.
16016 2000-09-12 Jason Merrill <jason@redhat.com>
16018 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
16019 all non-extern arrays.
16021 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
16022 typenames, too. Downgrade complaint to pedwarn.
16023 (xref_tag): Warn about surprising behavior of 'friend struct T'.
16024 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
16025 'class This::Inherited'.
16027 2000-09-12 Mark Mitchell <mark@codesourcery.com>
16029 * decl.c (finish_case_label): Given the LABEL_DECL a
16032 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
16034 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
16035 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
16036 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
16037 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
16038 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
16040 (sorry_for_unsupported_tree, print_scope_operator,
16041 print_left_paren, print_right_paren, print_left_bracket,
16042 print_right_bracket, print_whitespace): Likewise.
16043 (aggr_variety): Rename to class_key_or_enum.
16044 (print_type): Rename to print_type_id.
16045 (print_type_specifier_seq, print_simple_type_specifier,
16046 print_elaborated_type_specifier,
16047 print_rest_of_abstract_declarator,
16048 print_parameter_declaration_clause, print_exception_specification,
16049 print_nested_name_specifier, print_template_id,
16050 typedef_original_name, print_template_argument_list_start,
16051 print_template_argument_list_end): New functions.
16053 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
16055 * ir.texi: Add more documentation.
16057 2000-09-11 Mark Mitchell <mark@codesourcery.com>
16059 * cp-tree.h (struct saved_scope): Remove x_function_parms.
16060 (current_function_parms): Don't define.
16061 (struct cp_language_function): Remove parms_stored.
16062 (current_function_just_assigned_this): Don't define.
16063 (current_function_parms_stored): Likewise.
16064 (static_ctors): Declare.
16065 (static_dtors): Likewise.
16066 (SF_EXPAND): Don't define.
16067 (expand_start_early_try_stmts): Remove declaration.
16068 (store_parm_decls): Likewise.
16069 * decl.c (static_ctors): Don't declare.
16070 (static_dtors): Likewise.
16071 (struct binding_level): Remove this_block.
16072 (poplevel): Remove dead code.
16073 (set_block): Likewise.
16074 (mark_binding_level): Don't mark this_block.
16075 (mark_saved_scope): Don't mark x_function_parms.
16076 (init_decl_processing): Don't add current_function_parms as a GC
16078 (check_function_type): Change prototype.
16079 (start_function): Remove RTL-generation code.
16080 (expand_start_early_try_stmts): Remove.
16081 (store_parm_decls): Give it internal linkage. Remove
16082 RTL-generation code.
16083 (finish_function): Remove RTL-generation code.
16084 * decl2.c (static_ctors): Fix formatting.
16085 (static_dtors): Likewise.
16086 * method.c (use_thunk): Don't call store_parm_decls.
16087 (synthesize_method): Likewise.
16088 * optimize.c (maybe_clone_body): Likewise.
16089 * parse.y (fn.def2): Likewise.
16090 (.set_base_init): Likewise.
16091 (nodecls): Likewise.
16092 * pt.c (instantiate_decl): Likewise.
16093 * rtti.c (synthesize_tinfo_fn): Likewise.
16094 * semantics.c (genrtl_try_block): Simplify.
16095 (expand_body): Use genrtl_start_function and
16096 genrtl_finish_function.
16097 (genrtl_start_function): New function.
16098 (genrtl_finish_function): Likewise.
16100 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16102 * error.c (cp_tree_printer, case 'P'): Append break.
16104 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16106 * cp-tree.h (frob_opname): Declare.
16107 * parse.y (saved_scopes): New static variable.
16108 (cp_parse_init): Adjust.
16109 (do_id): If lastiddecl is NULL, do do_identifier.
16110 (operator): Save scope information.
16111 (unoperator): New reduction. Restore scope information.
16112 (operator_name): Append unoperator. Call frob_opname.
16113 * spew.c (frob_opname): Define.
16115 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
16117 * decl.c, rtti.c: Include defaults.h if not already included.
16118 Don't define the *_TYPE_SIZE macros.
16120 2000-09-09 Mark Mitchell <mark@codesourcery.com>
16122 * cp-tree.h (push_switch): Change prototype.
16123 (check_cp_case_value): Remove declaration.
16124 (decl_constant_value): Likewise.
16125 * decl.c (struct cp_switch): Add switch_stmt and cases.
16126 (case_compare): New function.
16127 (push_switch): Set switch_stmt. Initialize cases.
16128 (pop_switch): Clean up cases.
16129 (define_case_label): Rename to ...
16130 (finish_case_label): ... this. Do semantic analysis for case
16132 (start_function): Correct comment.
16133 * decl2.c (check_cp_case_value): Remove.
16134 * expr.c (do_case): Remove.
16135 * pt.c (tsubst_expr): Adjust call to finish_case_label.
16136 * semantics.c (genrtl_do_poplevel): Remove declaration.
16137 (RECHAIN_STMTS): Remove.
16138 (finish_break_stmt): Use build_break_stmt.
16139 (finish_continue_stmt): Use build_continue_stmt.
16140 (finish_switch_cond): Adjust condition here, rater than in
16141 c_expand_start_case.
16142 (finish_case_label): Remove.
16143 * typeck.c (c_expand_return): Remove.
16144 (c_expand_start_case): Likewise.
16146 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
16148 * ir.texi: Document type nodes.
16150 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16152 * cp-tree.h (init_cp_semantics): Declare.
16153 (genrtl_try_block): Don't declare.
16154 (genrtl_handler): Likewise.
16155 (genrtl_catch_block): Likewise.
16156 (genrtl_ctor_stmt): Likewise.
16157 (genrtl_subobject): Likewise.
16158 (genrtl_do_poplevel): Likewise.
16159 (genrtl_named_return_value): Likewise.
16160 * lex.c (init_parse): Call init_cp_semantics.
16161 * semantics.c (genrtl_try_block): Give it internal linkage.
16162 (genrtl_handler): Likewise.
16163 (genrtl_catch_block): Likewise.
16164 (genrtl_ctor_stmt): Likewise.
16165 (genrtl_subobject): Likewise.
16166 (genrtl_do_poplevel): Likewise.
16167 (genrtl_named_return_value): Likewise.
16168 (lang_expand_stmt): Rename to ...
16169 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
16170 (init_cp_semantics): Define.
16172 * decl.c (initialize_local_var): Remove RTL-generating code.
16173 * semantics.c (genrtl_try_block): Fix formatting.
16175 Move statement-tree facilities from C++ to C front-end.
16176 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16177 (void_zero_node): Remove.
16178 (stmt_tree): Likewise.
16179 (scope_chain): Adjust.
16180 (language_function): Rename to cp_language_function.
16181 (cp_function_chain): Adjust.
16182 (current_stmt_tree): Remove.
16183 (last_tree): Likewise.
16184 (last_expr_type): Likewise.
16185 (struct lang_decl): Adjust.
16186 (STMT_IS_FULL_EXPR_P): Remove.
16187 (add_tree): Remove.
16188 (begin_stmt_tree): Likewise.
16189 (finish_stmt_tree): Likewise.
16190 (walk_tree_fn): Likewise.
16191 (walk_stmt_tree): Likewise.
16192 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16193 * decl.c (mark_stmt_tree): Adjust type.
16194 (init_decl_processing): Don't build void_zero_node.
16195 (initialize_local_var): Adjust usage of current_stmt_tree.
16196 (finish_enum): Use add_stmt, not add_tree.
16197 (save_function_data): Adjust use of language_function.
16198 (finish_constructor_body): Use add_stmt, not add_tree.
16199 (finish_destructor_body): Likewise.
16200 (push_cp_function_context): Adjust use of language_function.
16201 (pop_cp_function_context): Likewise.
16202 (mark_lang_function): Likewise.
16203 (mark_cp_function_context): Likewise.
16204 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16205 (build_vec_init): Likewise.
16206 * semantics.c (SET_LAST_STMT): Remove.
16207 (RECHAIN_STMTS): Don't use it.
16208 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16209 (current_stmt_tree): Define.
16210 (add_tree): Remove.
16211 (finish_goto_stmt): Use add_stmt, not add_tree.
16212 (finish_expr_stmt): Likewise.
16213 (begin_if_stmt): Likewise.
16214 (finish_then_clause): Likewise.
16215 (begin_while_stmt): Likewise.
16216 (begin_do_stmt): Likewise.
16217 (finish_return_stmt): Likewise.
16218 (begin_for_stmt): Likewise.
16219 (finish_break_stmt): Likewise.
16220 (finish_continue_stmt): Likewise.
16221 (begin_switch_stmt): Likewise.
16222 (finish_case_label): Likewise.
16223 (begin_try_block): Likewise.
16224 (begin_function_try_block): Likewise.
16225 (begin_handler): Likewise.
16226 (begin_catch_block): Likewise.
16227 (begin_compound_stmt): Likewise.
16228 (begin_asm_stmt): Likewise.
16229 (finish_asm_stmt): Likewise.
16230 (finish_label_stmt): Likewise.
16231 (add_decl_stmt): Likewise.
16232 (finish_subobject): Likewise.
16233 (finish_decl_cleanup): Likewise.
16234 (finish_named_return_value): Likewise.
16235 (setup_vtbl_ptr): Likewise.
16236 (add_scope_stmt): Likewise.
16237 (finish_stmt_expr): Likewise.
16238 (prune_unused_decls): Remove.
16239 (begin_stmt_tree): Likewise.
16240 (finish_stmt_tree): Likewise.
16241 (prep_stmt): Adjust use of current_stmt_tree.
16242 (lang_expand_stmt): Likewise.
16243 * tree.c (statement_code_p): Remove.
16244 (cp_statement_code_p): New function.
16245 (walk_stmt_tree): Remove.
16246 (init_tree): Set lang_statement_code_p.
16248 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16250 Integrated preprocessor.
16252 * Make-lang.in, Makefile.in: Remove all references to input.c,
16253 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16254 * gxx.gperf, hash.h, input.c: Delete.
16255 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16256 initialized properly.
16258 * class.c (fixup_pending_inline): Take a tree, not a
16259 struct pending_inline *. All callers changed.
16260 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16261 RID_PROTECTED entries in ridpointers[] array here.
16262 * decl.c (duplicate_decls): Do not refer to struct
16264 (record_builtin_type, init_decl_processing): Use RID_MAX not
16266 (grokdeclarator): Use C_IS_RESERVED_WORD.
16267 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16269 (grok_x_components): Do not inspect pending_inlines chain.
16271 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16272 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16273 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16274 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16275 TIME_IDENTIFIER_FILEINFO): Kill.
16277 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16278 single 32-bit word.
16279 * parse.y: Call do_pending_inlines unconditionally.
16280 reinit_parse_for_method is now snarf_method. fn.defpen is no
16281 longer necessary. Remove unnecessary <itype> annotation on
16282 SCOPE. Do not refer to end_of_file or struct pending_inline.
16283 * semantics.c (begin_inline_definitions): Call
16284 do_pending_inlines unconditionally.
16286 * lex.c: Remove all code now shared with C front end.
16287 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16288 into the get_identifier table. Rewrite pragma handling to
16289 work with the registry. Move code to save tokens for later
16290 processing to spew.c.
16292 * spew.c: Rewrite everything in terms of token streams instead
16293 of text. Move routines here from lex.c / input.c as
16294 appropriate. GC-mark trees hanging off the pending inlines
16297 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16299 * NEWS: Mention that the named return value extension has been
16301 * cp-tree.h (original_result_rtx): Define.
16302 (TREE_REFERENCE_EXPR): Remove.
16303 (DECL_VPARENT): Likewise.
16304 (pushdecl_nonclass_level): Likewise.
16305 (store_return_init): Likewise.
16306 (reinit_lang_specific): Likewise.
16307 (genrtl_named_return_value): Change prototype.
16308 * decl.c (original_result_rtx): Remove.
16309 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16310 Do not generate RTL for local variables here.
16311 (store_return_init): Remove.
16312 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16314 (finish_named_return_value): Adjust accordingly. Warn that this
16315 extension is deprecated.
16316 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16318 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16320 * pt.c (type_unification_real): Replace switch with if.
16321 (unify): Tsubst non-type parms before comparing.
16323 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16325 * error.c (dump_typename): New function, broken out of ...
16326 (dump_type): ... here. Use it.
16327 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16329 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16331 * init.c (build_offset_ref): Deal with namespace scoped
16334 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16336 * class.c (resolve_address_of_overloaded_function): Add
16337 explanation message.
16338 * decl.c (define_case_label): Reformat explanation.
16339 * decl2.c (finish_static_data_member_decl): Likewise.
16340 (grokfield): Likewise.
16341 * friend.c (do_friend): Likewise.
16343 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16345 * tree.c (walk_tree): Expose tail recursion.
16346 (walk_stmt_tree): New function.
16347 * cp-tree.h: Prototype walk_stmt_tree.
16348 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16349 the BLOCKs directly. If a BLOCK has no variables after
16350 pruning, discard it.
16351 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16352 restore the line number.
16354 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16356 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16357 (pt.o): Remove dependency on HTAB_H.
16358 * cp-tree.h: Include hashtab.h.
16359 (walk_tree): Change prototype.
16360 (walk_tree_without_duplicates): New function.
16361 * decl.c (check_default_argument): Use it.
16362 * optimize.c (remap_decl): Adjust calls to walk_tree.
16363 (copy_body): Likewise.
16364 (expand_calls_inline): Likewise.
16365 (calls_setjmp_p): Use walk_tree_without_duplicates.
16366 * pt.c: Don't include hashtab.h.
16367 (for_each_template_parm): Use walk_tree_without_duplicates.
16368 * semantics.c (finish-stmt_tree): Likewise.
16369 (expand_body): Likewise.
16370 * tree.c (walk_tree): Add additional parameter.
16371 (walk_tree_without_duplicates): New function.
16372 (count_trees): Use it.
16373 (verify_stmt_tree): Adjust call to walk_tree.
16374 (find_tree): Use walk_tree_without_duplicates.
16375 (no_linkage_check): Likewise.
16376 (break_out_target_exprs): Adjust call to walk_tree.
16377 (cp_unsave): Likewise.
16379 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16381 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16382 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16383 * cp-tree.h (TYPE_BINFO): Adjust comment.
16384 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16385 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16386 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16387 (TYPE_TEMPLATE_INFO): Likewise.
16388 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16389 * class.c (push_nested_class): Likewise.
16390 * decl.c (lookup_name_real): Likewise.
16391 (grokdeclarator): Likewise.
16392 (grok_op_properties): Likewise.
16393 (xref_tag): Likewise.
16394 (xref_basetypes): Likewise.
16395 * decl2.c (constructor_name_full): Likewise.
16396 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16397 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16398 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16399 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16400 (dump_type_suffix): Likewise.
16401 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16403 (get_aggr_from_typedef): Likewise.
16404 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16405 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16406 (write_template_parm): Likewise.
16407 (write_template_template_parm): Check tree code instead of
16408 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16409 * method.c (build_overload_nested_name): Add
16410 BOUND_TEMPLATE_TEMPLATE_PARM.
16411 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16412 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16413 * pt.c (convert_template_argument): Check tree code instead of
16414 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16415 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16416 (for_each_template_parm): Adjust comment.
16417 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16418 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16419 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16420 template_args_equal to compare template template parameter cases.
16421 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16422 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16424 * tree.c (copy_template_template_parm): Decide whether to create
16425 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16426 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16427 (copy_tree_r): Likewise.
16428 * typeck.c (comptypes): Likewise. Check tree code instead of
16429 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16431 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16433 * decl.c (finish_function): Move the code for handling functions
16434 marked with the constructor and destructor attributes inside the
16437 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16439 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16441 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16443 * pt.c (lookup_template_class): Remove abort.
16444 * tree.c (get_type_decl): Allow error_mark_node.
16446 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16448 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16451 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16453 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16456 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16458 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16459 union tag mismatch error reporting.
16461 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16463 * call.c (build_scoped_method_call): Check it is not a namespace.
16465 2000-08-30 Jason Merrill <jason@redhat.com>
16467 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16469 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16470 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16471 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16473 * decl.c (start_function): Always call make_function_rtl.
16475 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16477 * semantics.c (prune_unused_decls): New function.
16478 (finish_stmt_tree): Call it via walk_tree.
16480 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16482 * class.c (build_secondary_vtable): Constify a char *.
16483 * decl.c (init_decl_processing): Initialize function_id_node,
16484 pretty_function_id_node, and func_id_node.
16485 * input.c (struct input_source): Constify 'str'.
16486 (feed_input): Constify first argument.
16487 * mangle.c (write_identifier): Constify argument.
16488 * pt.c (mangle_class_name_for_template): Constify argument.
16490 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16492 * typeck.c (mark_addressable): Remove code that pokes around in
16495 2000-08-28 Jason Merrill <jason@redhat.com>
16497 * lex.c (file_name_nondirectory): Move to toplev.c.
16499 * cp-tree.h (LOCAL_CLASS_P): New macro.
16500 * class.c (finish_struct_1): Use it.
16502 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16504 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16505 (write_encoding): Pass another argument to write_name.
16506 (write_name): Add ignore_local_scope parameter. Fix handling of
16508 (write_nested_name): Use write_unqualified_name.
16509 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16510 (write_template_prefix): Use write_unqualified_name.
16511 (write_component): Remove.
16512 (write_local_name): Add parameter. Use direct local entity to
16513 discriminator calculation.
16514 (write_class_enum_type): Pass another argument to write_name.
16515 (write_template_template_arg): Likewise.
16516 (make_guard_variable): Likewise.
16518 2000-08-27 Jason Merrill <jason@redhat.com>
16520 * decl.c (pushdecl): Matching decls for local externs are found in
16521 the current level. Propagate linkage information from previous
16524 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16526 * ir.texi (Expressions): Fix typo.
16528 2000-08-25 Greg McGary <greg@mcgary.org>
16530 * tree.c (init_tree): Use ARRAY_SIZE.
16532 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16534 * error.c (cp_tree_printer): Rework.
16536 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16538 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16540 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16541 (cp-demangle.o): Remove target.
16542 (dyn-string.o): Likewise.
16544 * decl.c (grokfndecl): Require that `main' return an `int'.
16545 * mangle.c (write_encoding): Don't mangle return types for
16546 conversion functions.
16548 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16550 * error.c (tree_formatting_info): New data type.
16551 (tree_being_formatted): New macro.
16552 (tree_formatting_flags): Likewise.
16553 (put_whitespace): Likewise.
16554 (print_tree_identifier): Likewise.
16555 (print_identifier): Likewise.
16556 (cp_tree_printer, print_function_argument_list, print_declaration,
16557 print_expression, print_function_declaration,
16558 print_function_parameter, print_type, print_cv_qualifier): New
16560 (init_error): Initialize lang_printer.
16562 2000-08-24 Jason Merrill <jason@redhat.com>
16564 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16565 adjustment necessary.
16567 2000-08-24 Greg McGary <greg@mcgary.org>
16569 * cp-tree.h (MAIN_NAME_P): Remove macro.
16571 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16573 * error.c (print_instantiation_context): Don't forget to flush the
16576 2000-08-23 Jason Merrill <jason@redhat.com>
16578 * typeck.c (build_ptrmemfunc): Save the input pmf.
16580 * method.c (process_modifiers): Use same_type_p.
16582 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16584 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16585 * mangle.c (write_function_type): Change prototype.
16586 (write_encoding): Don't mangle return types for
16587 constructors or destructors.
16588 (write_type): Adjust call to write_function_type.
16589 * pt.c (instantiate_template): Instantiate alternate entry points
16590 when instantiating the main function.
16592 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16594 * error.c (cp_print_error_function): Don't use embedded '\n' in
16597 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16599 * decl.c (init_decl_processing): Remove bogus initialization.
16600 * error.c (lang_print_error_function): Restore here.
16601 (init_error): Initialize print_error_function.
16603 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16605 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16607 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16609 * Makefile.in (error.o): Depends on diagnostic.h
16611 * cp-tree.h (problematic_instantiation_changed,
16612 record_last_problematic_instantiation, current_instantiation,
16613 print_instantiation_context): Declare.
16614 (maybe_print_template_context): Remove.
16616 * decl.c (init_decl_processing): Set print_error_function to NULL.
16617 (lang_print_error_function): Remove, since we're using a new
16620 * error.c: #include diagnostic.h
16621 (function_category): New function.
16622 (cp_diagnostic_starter): Likewise.
16623 (cp_diagnostic_finalizer): Likewise.
16624 (cp_print_error_function): Likewise.
16625 (maybe_print_instantiation_context): Likewise.
16626 (print_instantiation_full_context): Likewise.
16627 (print_instantiation_partial_context): Likewise.
16628 (print_instantiation_context): Define.
16629 (init_error): Initialize diagnostic pager and finalizer.
16631 * pt.c (problematic_instantiation_changed): Define.
16632 (record_last_problematic_instantiation): Likewise.
16633 (current_instantiation): Likewise.
16634 (maybe_print_template_context): Remove.
16635 (print_template_context): Likewise.
16636 (current_tinst_level): Make static to reflect Brendan Kehoe's
16637 change of 1995-04-13.
16638 (push_tinst_level): Call print_instantiation_context.
16640 2000-08-21 Nix <nix@esperi.demon.co.uk>
16642 * lang-specs.h: Do not process -o or run the assembler if
16645 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16647 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16649 * decl2.c (lang_decode_option): Disable gettext attributes for
16652 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16654 * lex.c (lang_init_options): Default diagnostic message maximum
16655 length to 80, when line-wrapping.
16657 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16659 * class.c (build_vtbl_initializer): Clear the entire
16660 vtbl_init_data. Start keeping track of the functions for which we
16661 have created vcall offsets here.
16662 (dfs_build_vcall_offset_vtbl_entries): Remove.
16663 (build_vcall_offset_vtbl_entries): Reimplement.
16664 (add_vcall_offset_vtbl_entries_r): New function.
16665 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16666 computing when vcall offsets are necessary.
16668 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16670 * decl.c (member_function_or_else): Use cp_error ... %T.
16671 (grokdeclarator): Likewise.
16672 (start_method): Likewise.
16673 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16675 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16677 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16680 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16682 * cp-tree.h (PTRMEM_OK_P): New macro.
16683 (itf_ptrmem_ok): New enumeration value.
16684 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16685 argument. Diagnose implicit pointer to member.
16686 (instantiate_type): Don't diagnose implicit pointer to member
16687 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16688 resolve_address_of_overloaded_function.
16689 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16690 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16691 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16692 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16693 (build_unary_op): Deal with single non-static member in
16696 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16698 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16700 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16702 * cp-tree.h (enum_name_string): Remove prototype.
16703 (report_case_error): Remove prototype.
16704 * cp/typeck2.c (enum_name_string): Remove.
16705 (report_case_error): Remove.
16706 * error.c (dump_expr): Deal with enum values directly.
16707 Correctly negate integer constant.
16709 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16711 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16712 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16713 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16714 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16715 (__cxa_vec_new): Use __cxa_vec_new2.
16716 (__cxa_vec_delete): Use __cxa_vec_delete2.
16718 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16720 * vec.cc (__cxa_vec_new): Set "C" linkage.
16721 (__cxa_vec_ctor): Likewise.
16722 (__cxa_vec_cctor): Likewise.
16723 (__cxa_vec_dtor): Likewise.
16724 (__cxa_vec_delete): Likewise.
16725 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16726 (__cxa_vec_ctor): Likewise.
16727 (__cxa_vec_cctor): Likewise.
16728 (__cxa_vec_dtor): Likewise.
16729 (__cxa_vec_delete): Likewise.
16731 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16733 * class.c (instantiate_type): Reinstate local variable
16734 deleted in previous change.
16736 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16739 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16741 * cp-tree.h (instantiate_type_flags): New enumeration.
16742 (instantiate_type): Change parameter.
16743 * class.c (instantiate_type): Adjust prototype. Adjust.
16744 * call.c (standard_conversion): Adjust instantiate_type call.
16745 (reference_binding): Likewise.
16746 (build_op_delete_call): Likewise.
16747 (convert_like_real): Likewise.
16748 * cvt.c (cp_convert_to_pointer): Likewise.
16749 (convert_to_reference): Likewise.
16750 * pt.c (convert_nontype_argument): Likewise.
16751 * typeck.c (build_binary_op): Likewise.
16752 (build_ptrmemfunc): Likewise.
16753 (convert_for_assignment): Likewise.
16755 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16757 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16758 (current_aggr): Define.
16759 * decl.c (grokdeclarator): Make sure a friend class is an
16760 elaborated type specifier.
16761 * parse.y (current_aggr): Remove static definition.
16762 (cp_parse_init): Adjust.
16763 (structsp): Clear and restore current_aggr.
16764 (component_decl_list): Clear current_aggr.
16766 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16767 aggregate tag on the typename's context.
16769 * pt.c (tsubst_friend_class): Return error_mark_node, if
16770 parms becomes NULL.
16771 (instantiate_class_template): Ignore error_mark_node friend types.
16773 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16775 * cvt.c (warn_ref_binding): New static function, broken out of ...
16776 (convert_to_reference): ... here. Use it.
16778 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16780 * parse.y (template_arg): Add rule for template qualified with
16783 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16785 * decl2.c (add_function): Reorganize.
16786 (arg_assoc): Do not consider function template decls.
16788 2000-08-11 Jason Merrill <jason@redhat.com>
16790 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16793 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16795 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16796 (lookup_nested_tag): Likewise.
16798 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16801 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16803 * parse.y (named_complex_class_head_sans_basetype): Remove
16806 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16808 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16809 explicit TEMPLATE_ID_EXPR args.
16810 (build_expr_from_tree, case CALL_EXPR): Likewise.
16812 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16814 * decl.c (check_tag_decl): Diagnose typename's which don't
16817 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16819 * init.c (build_aggr_init): Reject bogus array initializers
16822 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16824 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16826 * cp/tinfo.cc (__dynamic_cast): Likewise.
16827 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16829 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16831 * cvt.c (convert_to_pointer_force): Fix error message when
16832 attempting to cast from ambiguous base.
16834 2000-08-08 Jason Merrill <jason@redhat.com>
16836 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16837 (tsubst_template_arg_vector): Likewise.
16839 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16840 assume that one will be as large as the union.
16842 2000-08-07 Kazu Hirata <kazu@hxi.com>
16844 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16845 * decl.c (pop_labels): Likewise.
16847 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16849 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16851 (__pointer_to_member_type_info): Likewise.
16852 (__base_class_info): Likewise.
16853 (__class_type_info): Likewise.
16854 (__si_class_type_info): Likewise.
16855 (__vmi_class_type_info): Likewise.
16856 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16857 Changed member names to match specifications.
16858 (__vmi_class_type_info::__do_find_public_src): Likewise.
16859 (__si_class_type_info::__do_dyncast): Likewise.
16860 (__vmi_class_type_info::__do_dyncast): Likewise.
16861 (__si_class_type_info::__do_upcast): Likewise.
16862 (__vmi_class_type_info::__do_upcast): Likewise.
16863 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16864 (__pbase_type_info::__pointer_catch): Likewise.
16865 (__pointer_type_info::__pointer_catch): Likewise.
16866 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16868 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16870 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16871 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16872 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16874 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16876 * cp-tree.h (add_method): Change prototype.
16877 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16878 Don't double the size of the method vector in the error case.
16879 (handle_using_decl): Adjust call to add_method.
16880 (add_implicitly_declared_members): Likewise.
16881 (clone_function_decl): Likewise.
16882 * decl2.c (check_classfn): Likewise.
16883 * semantics.c (finish_member_declaration): Likewise.
16885 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16887 * decl.c (flag_isoc94): New variable.
16889 2000-08-02 Jason Merrill <jason@redhat.com>
16891 * pt.c (do_type_instantiation): Add complain parm; don't complain
16892 if called recursively.
16893 * cp-tree.h, parse.y: Adjust.
16895 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16897 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16898 -Wno-strict-prototypes.
16900 * g++spec.c: Adjust type of second argument to
16901 lang_specific_driver, and update code as necessary.
16903 * cp-tree.h: Don't prototype min_precision here.
16904 (my_friendly_assert): Cast expression to void.
16905 * semantics.c (do_poplevel): Initialize scope_stmts.
16907 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16909 * cp-tree.h (DECL_NEEDED_P): Tweak.
16911 2000-07-28 Jason Merrill <jason@redhat.com>
16913 * lang-specs.h: Use %i in rule for .ii files.
16915 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16917 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16919 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16921 Allow indirect primary bases.
16922 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16924 (CLASSTYPE_VFIELD_PARENT): Remove.
16925 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16926 (BINFO_PRIMARY_BINFO): Remove.
16927 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16928 (BINFO_VBASE_PRIMARY_P): Likewise.
16929 (BINFO_PRIMARY_BASE_OF): New macro.
16930 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16931 (get_primary_binfo): New function.
16932 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16933 * class.c (vcall_offset_data_s): Rename to ...
16934 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16935 and add ctor_vtbl_p.
16936 (get_derived_offset): Use get_primary_binfo.
16937 (dfs_mark_primary_bases): Adjust handling of virtual primary
16939 (mark_primary_bases): Likewise.
16940 (set_primary_base): Take a binfo, not an integer, as a
16941 representation of the primary base.
16942 (indirect_primary_base_p): Remove.
16943 (determine_primary_base): Adjust for indirect primary bases.
16944 (dfs_find_final_overrider): Fix typo in coment.
16945 (update_vtable_entry_for_fn): Use get_primary_binfo.
16946 (layout_nonempty_base_or_field): Tweak.
16947 (build_base_fields): Adjust for new primary base semantics.
16948 (dfs_propagate_binfo_offsets): Remove.
16949 (propagate_binfo_offsets): Rewrite.
16950 (dfs_set_offset_for_shared_vbases): Remove.
16951 (layout_virtual_bases): Don't use it.
16952 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16954 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16955 CLASSTYPE_VFIELD_PARENT.
16956 (dfs_get_primary_binfo): New function.
16957 (get_primary_binfo): Likewise.
16958 (dump_class_hierarchy_r): Tweak printing of primary bases.
16959 (build_vtbl_initializer): Fix typo in comments. Use
16961 (build_vcall_and_vbase_vtbl_entries): Likewise.
16962 (build_vbaes_offset_vtbl_entries): Likewise.
16963 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16964 BV_VCALL_INDEX to handle indirect primary bases.
16965 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16966 (build_rtti_vtbl_entries): Likewise.
16967 * search.c (get_shared_vbase_if_not_primary): Tweak.
16968 (find_vbase_instance): Likewise.
16969 (binfo_for_vtable): Simplify.
16970 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16971 (make_binfo): Make it have 11 entries.
16973 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16975 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16976 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16977 ascertaining primaryness.
16978 (G): Remove template_args.
16979 (decl_is_template_id): New function.
16980 (write_encoding): Use decl_is_template_id.
16981 (write_name): Likewise. Handle type_decls. Get main variant of
16983 (write_nested_name): Likewise.
16984 (write_prefix): Likewise.
16985 (write_template_prefix): Likewise.
16986 (write_special_name_constructor): Remove defunct production from
16988 (write_bare_function_type): Remove comment about absent parameter.
16989 (write_template_template_arg): Add missing grammar production to
16992 2000-07-27 Jason Merrill <jason@redhat.com>
16994 * decl.c (duplicate_decls): If common_type produces a non-typedef
16995 type for a typedef, just use the old type.
16997 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16999 * cp-tree.h (function_depth): Declare.
17000 (verify_stmt_tree): Likewise.
17001 (find_tree): Likewise.
17002 * decl.c (function_depth): Give it external linkage.
17003 * optimize.c (optimize_function): Increment and decrement it.
17004 * tree.c (verify_stmt_tree_r): New function.
17005 (verify_stmt_tree): Likewise.
17006 (find_tree_r): Likewise.
17007 (find_tree): Likewise.
17009 2000-07-27 Jason Merrill <jason@redhat.com>
17011 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
17013 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
17015 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17017 * decl.c (start_cleanup_fn): Mark the function as `inline'.
17018 * decl2.c (get_guard): Call cp_finish_decl, not
17019 rest_of_decl_compilation, for local guards.
17020 * lex.c (do_identifier): Remove unused variable.
17022 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
17024 * parse.y: Add missing ';'.
17026 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17028 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
17031 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17033 Kill strict_prototype. Backwards compatibility only for
17034 non NO_IMPLICIT_EXTERN_C systems.
17035 * cp-tree.h (flag_strict_prototype): Remove.
17036 (strict_prototype): Remove.
17037 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17038 * decl.c (maybe_push_to_top_level): Adjust.
17039 (pop_from_top_level): Adjust.
17040 (decls_match): Only allow sloppy parm matching for ancient
17042 (init_decl_processing): Adjust.
17043 (grokdeclarator): Adjust.
17044 * decl2.c (flag_strict_prototype): Remove.
17045 (strict_prototype): Remove.
17046 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17047 (lang_f_options): Remove "strict-prototype".
17048 (unsupported-options): Add "strict-prototype".
17049 * lex.c (do_identifier): Adjust.
17050 (do_scoped_id): Adjust.
17051 * parse.y (empty_parms): Adjust.
17052 * class.c (push_lang_context): Adjust.
17053 (pop_lang_context): Adjust.
17054 * typeck.c (comp_target_parms): Adjust.
17056 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17058 * decl.c (poplevel): Deal with anonymous variables at for scope.
17059 (maybe_inject_for_scope_var): Likewise.
17061 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
17063 * decl.c: Remove all signal handling code, now done in toplev.c.
17065 2000-07-23 Mark Mitchell <mark@codesourcery.com>
17067 * decl.c (make_rtl_for_nonlocal_decl): Rework.
17069 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
17072 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
17074 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
17075 Define my_friendly_assert and my_friendly_abort as macros
17076 which may call friendly_abort. Prototype friendly abort, not
17077 my_friendly_abort or my_friendly_assert.
17078 * decl.c (signal_catch): Report the signal caught in the error
17079 message. Call fatal directly.
17080 * typeck2.c (ack, my_friendly_assert): Delete.
17081 (my_friendly_abort): Rename to friendly_abort. Expect file,
17082 line, and function parameters. Report the abort code, then
17083 call fancy_abort. Do not mask an abort if errors have
17086 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
17088 * typeck.c (comp_target_parms): Remove obsolete parameter.
17089 (comp_target_types): Adjust.
17091 2000-07-17 Jason Merrill <jason@redhat.com>
17093 * typeck.c (mark_addressable): Never set TREE_USED.
17094 * call.c (build_call): Don't abort on calls to library functions
17095 that have been declared normally.
17097 * typeck.c (build_binary_op): Fix grammar in warning.
17099 * exception.cc (__eh_free): Fix prototype.
17101 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17103 * decl.c (pushdecl): Handle seeing an OVERLOAD in
17104 IDENTIFIER_NAMESPACE_VALUE.
17106 2000-07-16 Mark Mitchell <mark@codesourcery.com>
17108 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17109 * method.c (use_thunk): Correct handling of vcall offsets.
17111 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
17113 * .cvsignore: parse.h and parse.c have no cp- prefix.
17115 2000-07-13 Mark Mitchell <mark@codesourcery.com>
17117 * .cvsignore: New file.
17119 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
17121 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
17123 2000-07-12 Mark Mitchell <mark@codesourcery.com>
17125 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17127 * parse.h: Likewise.
17129 2000-07-11 Mark Mitchell <mark@codesourcery.com>
17131 * class.c (layout_class_type): Add pointers to virtual bases after
17132 base classes under the old ABI.
17134 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
17136 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17137 (finish_continue_stmt): Likewise.
17138 (begin_for_stmt): Remove call to note_level_for_for.
17139 (finish_goto_stmt): Change call from build_min_nt
17141 (finish_expr_stmt): Likewise.
17142 (begin_if_stmt): Likewise.
17143 (begin_while_stmt): Likewise.
17144 (finish_while_stmt): Likewise.
17145 (finish_return_stmt): Likewise.
17146 (begin_for_stmt): Likewise.
17147 (finish_for_stmt): Likewise.
17148 (finish_break_stmt): Likewise.
17149 (begin_switch_stmt): Likewise.
17150 (finish_case_label): Likewise.
17151 (genrtl_try_block): Likewise.
17152 (begin_try_block): Likewise.
17153 (begin_handler): Likewise.
17154 (begin_compound_stmt): Likewise.
17155 (finish_asm_stmt): Likewise.
17156 (finish_label_stmt): Likewise.
17157 (add_decl_stmt): Likewise.
17158 (finish_subobject): Likewise.
17159 (finish_decl_cleanup): Likewise.
17160 (finish_named_return_value): Likewise.
17161 (setup_vtbl_ptr): Likewise.
17162 (add_scope_stmt): Likewise.
17163 * decl.c (finish_constructor_body): Likewise.
17164 (finish_destructor_body): Likewise.
17165 * optimize.c (copy_body_r): Likewise.
17166 (initialize_inlined_parameters): Likewise.
17167 (declare_return_variable): Likewise.
17168 (expand_call_inline): Likewise.
17170 2000-07-10 Jakub Jelinek <jakub@redhat.com>
17172 * semantics.c (expand_body): Sync interface information
17173 at the end of function body expansion.
17175 2000-07-09 Jason Merrill <jason@redhat.com>
17177 * init.c (build_new_1): Bail early if the call to new fails.
17179 * decl.c (compute_array_index_type): Check specifically for
17180 an INTEGER_CST, not just TREE_CONSTANT.
17182 * decl.c (duplicate_decls): Don't call duplicate_decls on
17183 the DECL_TEMPLATE_RESULT.
17184 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17187 * error.c (dump_template_bindings): Don't crash if we had an
17188 invalid argument list.
17190 * typeck.c (c_expand_start_case): Do narrowing here.
17191 * semantics.c (finish_switch_cond): Not here.
17193 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17195 * parse.y (asm_clobbers): Do string concatenation.
17197 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17199 * decl.c (pushtag): Don't put local classes in template functions
17200 on the local_classes list.
17202 2000-07-04 Scott Snyder <snyder@fnal.gov>
17204 * decl2.c (get_guard): Add missing return for old ABI local
17207 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17209 * cp-tree.h (char_type_p): New function.
17210 * decl.c (init_decl_processing): Don't initialize
17211 signed_wchar_type_node or unsigned_wchar_type_node.
17212 (complete_array_type): Handle brace-enclosed string-constants.
17213 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17214 * tree.c (char_type_p): New function.
17215 * typeck2.c (digest_init): Use char_type_p.
17217 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17219 * pt.c (tsubst): Don't layout type, if it's error_mark.
17221 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17223 * pt.c (instantiate_pending_templates): Reset template level.
17225 2000-07-05 Jason Merrill <jason@redhat.com>
17227 * call.c (joust): Don't complain about `operator char *()' beating
17228 `operator const char *() const'.
17230 2000-07-04 scott snyder <snyder@fnal.gov>
17231 Jason Merrill <jason@redhat.com>
17233 * repo.c (repo_get_id): Handle the case where a class with virtual
17234 bases has a null TYPE_BINFO_VTABLE.
17236 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17237 Jason Merrill <jason@redhat.com>
17239 * parse.y (member_init): Just pass in the type.
17240 * init.c (expand_member_init): Handle getting a type.
17242 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17243 Jason Merrill <jason@redhat.com>
17245 * decl.c (finish_function): Warn if a function has no return
17247 Suggested by Andrew Koenig.
17248 * typeck.c (check_return_expr): Do set current_function_returns_value
17249 if we got an error_mark_node.
17251 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17253 * decl2.c (push_decl_namespace): Push the original namespace.
17255 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17257 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17258 * semantics.c (begin_class_definition): Clear it.
17260 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17262 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17263 (genrtl_expr_stmt): Likewise.
17264 (genrtl_decl_stmt): Likewise.
17265 (genrtl_if_stmt): Likewise.
17266 (genrtl_while_stmt): Likewise.
17267 (genrtl_do_stmt): Likewise.
17268 (genrtl_return_stmt): Likewise.
17269 (genrtl_for_stmt): Likewise.
17270 (genrtl_break_stmt): Likewise.
17271 (genrtl_continue_stmt): Likewise.
17272 (genrtl_scope_stmt): Likewise.
17273 (genrtl_switch_stmt): Likewise.
17274 (genrtl_case_label): Likewise.
17275 (genrtl_begin_compound_stmt): Likewise.
17276 (genrtl_finish_compound_stmt): Likewise.
17277 (genrtl_compound_stmt): Likewise.
17278 (genrtl_asm_stmt): Likewise.
17280 * init.c (begin_init_stmts): Remove call to
17281 genrtl_begin_compound_stmt.
17282 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17284 * semantics.c (lang_expand_stmt): Changed call to
17285 genrtl_compound_stmt to ignore return value.
17287 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17289 * mangle.c (canonicalize_for_substitution): Return the canonical
17292 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17294 * typeck.c (commonparms): Remove obstack manipulations.
17296 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17298 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17300 * Makefile.in (OBJS): Added ../c-semantics.o.
17301 (OBJDEPS): Likewise.
17303 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17305 (struct stmt_tree): Added comment.
17306 (current_function_name_declared): Removed.
17307 (stmts_are_full_exprs_p): Likewise.
17308 (genrtl_do_pushlevel): Likewise.
17309 (genrtl_clear_out_block): Likewise.
17310 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17311 (DECL_ANON_UNION_ELEMS): Likewise.
17312 (emit_local_var): Likewise.
17313 (make_rtl_for_local_static): Likewise.
17314 (do_case): Likewise.
17315 (expand_stmt): Likewise.
17316 (genrtl_decl_cleanup): Likewise.
17317 (c_expand_asm_operands): Likewise.
17318 (c_expand_return): Likewise.
17319 (c_expand_start_case): Likewise.
17321 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17322 (emit_local_var): Likewise.
17323 (initialize_local_var): Change reference to
17324 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17325 Change reference to stmts_are_full_exprs_p to
17326 current_stmt_tree->stmts_are_full_exprs_p.
17327 (push_cp_function_context): Likewise.
17329 * expect.c (expand_throw): Change reference to
17330 stmts_are_full_exprs_p.
17332 * init.c (build_aggr_init): Change reference to
17333 stmts_are_full_exprs_p.
17334 (build_vec_init): Likewise.
17336 * optimize.c (maybe_clone_body): Change reference to
17337 current_function_name_declared to
17338 cp_function_chain->name_declared.
17340 * pt.c (instantiate_decl): Change reference to
17341 current_function_name_declared to
17342 cp_function_chain->name_declared.
17344 * semantics.c (expand_cond): Moved declaration to c-common.h.
17345 (genrtl_do_pushlevel): Moved to c-semantics.c.
17346 (genrtl_clear_out_block): Likewise.
17347 (genrtl_goto_stmt): Likewise.
17348 (genrtl_expr_stmt): Likewise.
17349 (genrtl_decl_stmt): Likewise.
17350 (gerntl_if_stmt): Likewise.
17351 (genrtl_while_stmt): Likewise.
17352 (genrtl_do_stmt): Likewise.
17353 (genrtl_return_stmt): Likewise.
17354 (genrtl_for_stmt): Likewise.
17355 (genrtl_break_stmt): Likewise.
17356 (genrtl_continue_stmt): Likewise.
17357 (genrtl_scope_stmt): Likewise.
17358 (genrtl_switch_stmt): Likewise.
17359 (genrtl_case_label): Likewise.
17360 (genrtl_begin_compound_stmt): Likewise.
17361 (genrtl_finish_compound_stmt): Likewise.
17362 (genrtl_compound_stmt): Likewise.
17363 (genrtl_asm_stmt): Likewise.
17364 (genrtl_decl_cleanup): Likewise.
17365 (expand_cond): Likewise.
17366 (expand_stmt): Renamed to ...
17367 (lang_expand_stmt): ... this.
17368 (lang_expand_expr_stmt): Initialize.
17369 (set_current_function_name_declared): Likewise.
17370 (stmts_are_full_exprs_p): Likewise.
17371 (current_function_name_declared): Likewise.
17372 (anon_aggr_type_p): Likewise.
17373 (do_poplevel): Change reference to
17374 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17375 Change reference to stmts_are_full_exprs_p to
17376 current_stmt_tree->stmts_are_full_exprs_p.
17377 (add_tree): Likewise.
17378 (finish_expr_stmt): Likewise.
17379 (prep_stmt): Likewise.
17380 (lang_expand_stmt): Likewise.
17381 (begin_compound_stmt): Change reference to
17382 current_function_name_declared to
17383 cp_function_chain->name_declared and call to
17384 current_function_name_declared().
17385 (setup_vtbl_ptr): Likewise.
17386 (genrtl_do_poplevel): Removed.
17388 2000-06-30 Jason Merrill <jason@redhat.com>
17390 * init.c (init_init_processing): Go back to aligning like
17391 double_type_node for old ABI.
17392 (get_cookie_size): Make cookie larger if we get a type that needs
17394 (build_vec_delete): Call it.
17396 * typeck.c (qualify_type_recursive): New fn.
17397 (composite_pointer_type): Use it.
17398 (build_binary_op): Use composite_pointer_type.
17400 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17401 Jason Merrill <jason@redhat.com>
17403 * typeck.c (check_return_expr): Don't complain about returning
17404 NULL from operator new if -fcheck-new.
17405 * cp-tree.h: Declare flag_check_new here.
17406 * init.c: Not here.
17408 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17410 * mangle.c (find_substitution): Use same_type_p.
17411 (write_encoding): Don't check for substitutions.
17413 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17415 * parse.y (expr_no_comma_rangle): New non-terminal.
17416 (template_parm): Use it for default parameter case.
17417 (template_arg): Use it.
17418 (expr_no_commas): Remove commented out undefined extensions.
17419 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17420 * parse.h, parse.c: Rebuilt.
17422 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17424 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17425 (finish_asm_stmt): Do it here, instead.
17427 * cp-tree.h (ridpointers): Don't declare.
17428 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17429 (record_builtin_java_type): Likewise.
17430 (init_decl_processing): Likewise.
17431 * lex.c: Move inclusion of lex.h.
17432 (ridpointers): Don't define.
17433 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17435 * lex.h (enum rid): Rename to ...
17436 (enum cp_rid): ... this.
17437 (ridpointers): Don't declare.
17438 * parse.y: Move inclusion of lex.h.
17439 * parse.c: Regenerated.
17440 * spew.c: Move inclusion of lex.h.
17442 * cp-tree.h (struct language_function): Remove temp_name_counter.
17443 (temp_name_counter): Remove.
17444 (get_temp_name): Change prototype.
17445 (get_guard): New function.
17446 (get_guard_cond): Likewise.
17447 (set_guard): Likewise.
17448 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17449 * decl.c (expand_static_init): Use get_guard and friends to
17450 implement guard variables.
17451 * decl2.c (get_temp_name): Assume that the variables created are
17453 (get_sentry): Rename to ...
17454 (get_guard): ... this. Implement new ABI guard variables.
17455 (get_guard_bits): New function.
17456 (get_guard_cond): Likewise.
17457 (set_guard): Likewise.
17458 (start_static_initialization_or_destruction): Use them.
17459 (do_static_initialization): Replace sentry with guard throughout.
17460 (do_static_destruction): Likewise.
17461 * init.c (create_temporary_var): Add comment.
17463 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17465 * mangle.c (find_substitution): Use same_type_p.
17466 (write_encoding): Don't check for substitutions.
17468 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17470 * parse.y (expr_no_comma_rangle): New non-terminal.
17471 (template_parm): Use it for default parameter case.
17472 (template_arg): Use it.
17473 (expr_no_commas): Remove commented out undefined extensions.
17474 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17475 * parse.h, parse.c: Rebuilt.
17477 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17479 * cp-tree.h (flag_const_strings): Remove.
17480 (warn_parentheses): Likewise.
17481 (warn_format): Likewise.
17482 (common_type): Likewise.
17483 (default_conversion): Likewise.
17484 (build_binary_op): Likewise.
17485 (cp_build_binary_op): New macro.
17486 * call.c (build_new_op): Use cp_build_binary_op instead of
17488 * class.c (build_vtable_entry_ref): Likewise.
17489 * decl.c (expand_static_init): Likewise.
17490 (compute_array_index_type): Likewise.
17491 (build_enumerator): Likewise.
17492 * decl2.c (delete_sanity): Likewise.
17493 (start_static_initialization_or_destruction): Likewise.
17494 * error.c (dump_type_suffix): Likewise.
17495 * init.c (resolve_offset_ref): Likewise.
17496 (build_new): Likewise.
17497 (build_new_1): Likewise.
17498 (build_vec_delete_1): Likewise.
17499 (build_vec_init): Likewise.
17500 (build_delete): Likewise.
17501 * rtti.c (synthesize_tinfo_fn): Likewise.
17502 (synthesize_tinfo_var): Likewise.
17503 * search.c (expand_upcast_fixups): Likewise.
17504 (fixup_all_virtual_upcast_offsets): Likewise.
17505 * typeck.c (build_array_ref): Likewise.
17506 (get_member_function_from_ptrfunc): Likewise.
17507 (build_binary_op): Add parameter.
17508 (pointer_int_sum): Use cp_build_binary_op.
17509 (pointer_diff): Likewise.
17510 (build_modify_expr): Likewise.
17511 (get_delta_difference): Likewise.
17512 (build_ptrmemfunc): Likewise.
17514 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17516 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17517 * decl.c (create_implicit_typedef): Adjust.
17518 * decl2.c (build_artificial_parm): Adjust.
17519 * method.c (implicitly_declare_fn): Adjust.
17520 * pt.c (push_inline_template_parms_recursive): Adjust.
17521 (process_template_parm): Adjust.
17522 (overloaded_template_name): Adjust.
17523 * semantics.c (finish_template_template_parm): Adjust.
17525 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17527 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17528 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17529 where to emit thunks.
17530 (build_vtt): Adjust call to build_vtt_inits.
17531 (build_vtt_inits): Add parameter to indicate whether or not
17532 sub-VTTs for virtual bases should be included. Adjust handling of
17533 construction vtables.
17534 (get_matching_base): New function.
17535 (dfs_build_vtt_inits): Rename to ...
17536 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17537 construction vtables.
17538 (dfs_fixup_binfo_vtbls): Likewise.
17539 (build_ctor_vtbl_groups): Build construction vtables for virtual
17541 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17542 to build construction vtbls.
17543 (dfs_accumulate_vtbl_inits): Adjust handling of
17544 construction vtables.
17546 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17549 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17551 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17553 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17555 * search.c (hides): Remove.
17556 (is_subobject_of_p): Add most_derived parameter. Use
17558 (lookup_field_queue_p): Adjust.
17559 (lookup_field_r): Adjust.
17561 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17563 * decl2.c (handle_class_head): Bash typedefs to the type's main
17566 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17568 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17569 (begin_global_stmt_expr): ... this.
17570 (genrtl_finish_stmt_expr): Rename to ...
17571 (finish_global_stmt_expr): ... this.
17572 * init.c (begin_init_stmts): Adjust calls.
17573 (finish_init_stmts): Likewise.
17574 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17575 (begin_global_stmt_expr): ... this.
17576 (genrtl_finish_stmt_expr): Rename to ...
17577 (finish_global_stmt_expr): ... this.
17579 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17581 * search.c (lookup_member): Fix typo in comment.
17583 2000-06-24 Jason Merrill <jason@redhat.com>
17585 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17586 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17588 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17590 * parse.y (complex_direct_notype_declarator): Support global_scope.
17591 * Makefile.in: Adjust conflict count.
17593 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17595 * parse.y (template_arg): Convert TEMPLATE_DECL
17596 that is a template template parameter to
17597 TEMPLATE_TEMPLATE_PARM here.
17599 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17600 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17601 (copy_template_template_parm): Adjust prototype.
17602 * decl.c (grokdeclarator): Remove dead code.
17603 * pt.c (process_template_parm): Tidy.
17604 (lookup_template_class): Construct nodes in
17605 copy_template_template_parm.
17606 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17607 lookup_template_class. Use TYPE_TI_TEMPLATE.
17608 * tree.c (copy_template_template_parm): Add NEWARGS
17610 (mapcar): Adjust call to copy_template_template_parm.
17611 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17612 * method.c (build_template_template_parm_names): Change error
17613 code to avoid compilation warning.
17615 * gxxint.texi: Document template template parameter
17618 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17620 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17621 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17622 (cp-demangle.o): New rule.
17623 (dyn-string.o): Likewise.
17624 * inc/cxxabi.h (__cxa_demangle): New declaration.
17626 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17628 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17629 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17630 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17631 a tree, not an int.
17632 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17633 (make_thunk): Change prototype.
17634 (emit_thunk): Rename to use_thunk.
17635 (mangle_thunk): Change prototype.
17636 * class.c (get_derived_offset): Simplify.
17637 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17638 BV_GENERATE_THUNK_WITH_VTABLE_P.
17639 (build_primary_vtable): Simplify.
17640 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17641 (dfs_find_base): Remove.
17642 (update_vtable_entry_for_fn): Correct bug in finding the base
17643 where a virtual function was first declared. Figure out whether
17644 or not to emit a vcall-thunk with the vtables in which it appears.
17645 Correct logic for deciding whether to use an ordinary thunk, or a
17647 (finish_struct_1): Remove unnecssary code.
17648 (build_vtbl_initializer): Use ssize_int for the running counter of
17650 (build_vtbl_initializer): Only use vcall thunks where necessary.
17651 Mark thunks as needing to be emitted with their vtables, or not.
17652 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17653 indices. Use size_binop.
17654 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17655 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17657 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17658 (build_vtable_entry): Mark thunks as needing to be emitted with
17659 their vtables, or not.
17660 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17661 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17663 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17665 * error.c (dump_expr): Use BV_FN.
17666 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17668 * method.c (make_thunk): Likewise.
17669 (emit_thunk): Rename to use_thunk. Allow callers to decide
17670 whether or not to actually emit the thunk. Adjust for changes in
17671 representation of vcall offsets.
17672 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17673 * semantics.c (emit_associated_thunks): New function.
17674 (expand_body): Use it.
17675 * ir.texi: Adjust decriptions of thunks.
17677 2000-06-22 Jason Merrill <jason@redhat.com>
17679 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17680 (tsubst_friend_function): Copy it here.
17682 * decl.c (grok_op_properties): Fix typo.
17684 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17687 * pt.c (check_explicit_specialization): Clarify error.
17689 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17690 an old OVERLOAD when we're declaring a non-function.
17691 (pushdecl, destroy_local_var): Check for error_mark_node.
17692 (warn_extern_redeclared_static): Also bail early if
17693 we're a CONST_DECL.
17694 (push_overloaded_decl): Ignore an old error_mark_node.
17696 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17698 * call.c (build_x_va_arg): Check if in a template decl.
17699 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17701 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17703 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17705 * decl.c (check_goto): Computed gotos assumed OK.
17707 2000-06-20 Jason Merrill <jason@redhat.com>
17709 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17710 for which we don't need to look for instantiations.
17712 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17714 * parse.y (program): Always call finish_translation_unit.
17715 * parse.c, parse.h: Rebuilt.
17717 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17719 * method.c: Don't include hard-reg-set.h.
17721 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17723 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17725 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17727 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17728 * cvt.c (cp_convert_to_pointer): Likewise.
17729 (convert_to_void): Likewise.
17730 * error.c (dump_expr): Likewise.
17731 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17732 * init.c (build_delete): Likewise.
17733 * method.c (emit_thunk): Likewise.
17734 * optmize.c (declare_return_variable): Likewise.
17735 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17736 (get_typeid): Likewise.
17737 (build_dynamic_cast_1): Likewise.
17738 * typeck.c (composite_pointer_type): Likewise.
17739 (common_type): Likewise.
17740 (build_indirect_ref): Likewise.
17741 (build_binary_op): Likewise.
17742 (build_x_compound_expr): Likewise.
17743 (check_return_expr): Likewise.
17744 * typeck2.c (add_exception_specifier): Likewise.
17746 * mangle.c (write_method_parms): Use direct comparison for end
17749 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17751 * cp-tree.h (genrtl_try_block): Declare function.
17752 (genrtl_handler): Likewise.
17753 (genrtl_catch_block): Likewise.
17754 (genrtl_ctor_stmt): Likewise.
17755 (genrtl_subobject): Likewise.
17756 (genrtl_decl_cleanup): Likewise.
17757 (genrtl_do_poplevel): Likewise.
17758 (genrtl_do_pushlevel): Likewise.
17759 (genrtl_clear_out_block): Likewise.
17760 (genrtl_goto_stmt): Likewise.
17761 (genrtl_expr_stmt): Likewise.
17762 (genrtl_decl_stmt): Likewise.
17763 (genrtl_if_stmt): Likewise.
17764 (genrtl_while_stmt): Likewise.
17765 (genrtl_do_stmt): Likewise.
17766 (genrtl_return_stmt): Likewise.
17767 (genrtl_for_stmt): Likewise.
17768 (genrtl_break_stmt): Likewise.
17769 (genrtl_continue_stmt): Likewise.
17770 (genrtl_scope_stmt): Likewise.
17771 (genrtl_switch_stmt): Likewise.
17772 (genrtl_case_label): Likewise.
17773 (genrtl_begin_compound_stmt): Likewise.
17774 (genrtl_finish_compound_stmt): Likewise.
17775 (genrtl_compound_stmt): Likewise.
17776 (genrtl_asm_stmt): Likewise.
17777 (genrtl_named_return_value): Likewise.
17778 (genrtl_begin_stmt_expr): Likewise.
17779 (genrtl_finish_stmt_expr): Likewise.
17780 (finish_for_stmt): Removed first argument.
17781 (finish_switch_stmt): Likewise.
17783 * semantics.c (genrtl_try_block): Define function.
17784 (genrtl_handler): Likewise.
17785 (genrtl_catch_block): Likewise.
17786 (genrtl_ctor_stmt): Likewise.
17787 (genrtl_subobject): Likewise.
17788 (genrtl_decl_cleanup): Likewise.
17789 (genrtl_do_poplevel): Likewise.
17790 (genrtl_do_pushlevel): Likewise.
17791 (genrtl_clear_out_block): Likewise.
17792 (genrtl_goto_stmt): Likewise.
17793 (genrtl_expr_stmt): Likewise.
17794 (genrtl_decl_stmt): Likewise.
17795 (genrtl_if_stmt): Likewise.
17796 (genrtl_while_stmt): Likewise.
17797 (genrtl_do_stmt): Likewise.
17798 (genrtl_return_stmt): Likewise.
17799 (genrtl_for_stmt): Likewise.
17800 (genrtl_break_stmt): Likewise.
17801 (genrtl_continue_stmt): Likewise.
17802 (genrtl_scope_stmt): Likewise.
17803 (genrtl_switch_stmt): Likewise.
17804 (genrtl_case_label): Likewise.
17805 (genrtl_begin_compound_stmt): Likewise.
17806 (genrtl_finish_compound_stmt): Likewise.
17807 (genrtl_compound_stmt): Likewise.
17808 (genrtl_asm_stmt): Likewise.
17809 (genrtl_named_return_value): Likewise.
17810 (genrtl_begin_stmt_expr): Likewise.
17811 (genrtl_finish_stmt_expr): Likewise.
17812 (finish_for_stmt): Removed first argument and generate rtl
17814 (finish_switch_stmt): Likewise.
17815 (do_poplevel): Removed generate rtl specific code.
17816 (do_pushlevel): Likewise.
17817 (add_tree): Likewise.
17818 (finish_goto_stmt): Likewise.
17819 (finish_expr_stmt): Likewise.
17820 (begin_if_stmt): Likewise.
17821 (finish_if_stmt_cond): Likewise.
17822 (finish_then_clause): Likewise.
17823 (begin_else_clause): Likewise.
17824 (finish_else_clause): Likewise.
17825 (finish_if_stmt): Likewise.
17826 (clear_out_block): Likewise.
17827 (begin_while_stmt): Likewise.
17828 (finish_while_stmt_cond): Likewise.
17829 (finish_while_stmt): Likewise.
17830 (begin_do_stmt): Likewise.
17831 (finish_do_body): Likewise.
17832 (finish_do_stmt): Likewise.
17833 (finish_return_stmt): Likewise.
17834 (begin_for_stmt): Likewise.
17835 (finish_for_init_stmt): Likewise.
17836 (finish_for_cond): Likewise.
17837 (finish_for_expr): Likewise.
17838 (finish_break_stmt): Likewise.
17839 (finish_continue_stmt): Likewise.
17840 (begin_switch_stmt): Likewise.
17841 (finish_switch_cond): Likewise.
17842 (finish_case_label): Likewise.
17843 (begin_try_block): Likewise.
17844 (begin_function_try_block): Likewise.
17845 (finish_try_block): Likewise.
17846 (finish_cleanup_try_block): Likewise.
17847 (finish_cleanup): Likewise.
17848 (finish_function_try_block): Likewise.
17849 (finish_handler_sequence): Likewise.
17850 (finish_function_handler_sequence): Likewise.
17851 (begin_handler): Likewise.
17852 (finish_handler_parms): Likewise.
17853 (begin_catch_block): Likewise.
17854 (finish_handler): Likewise.
17855 (begin_compound_stmt): Likewise.
17856 (finish_compound_stmt): Likewise.
17857 (finish_asm_stmt): Likewise.
17858 (finish_label_stmt): Likewise.
17859 (finish_label_decl): Likewise.
17860 (finish_subobject): Likewise.
17861 (finish_decl_cleanup): Likewise.
17862 (finish_named_return_value): Likewise.
17863 (begin_stmt_expr): Likewise.
17864 (finish_stmt_expr): Likewise.
17866 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17867 to call genrtl_expr_stmt when appropriate.
17869 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17870 begin_compound_expr to call genrtl_begin_stmt_expr and
17871 genrtl_begin_compound_expr when appropriate.
17872 (finish_init_stmts): Changed calls to finish_compound_expr and
17873 finish_stmt_expr to call genrtl_finish_compound_expr and
17874 genrtl_finish_stmt_expr when appropriate.
17875 (expand_default_init): Changed call to finish_expr_stmt to call
17876 genrtl_expr_stmt when appropriate.
17877 (build_vec_init): Likewise.
17879 * parse.y (simple_stmt): Removed first argument from call to
17880 finish_for_stmt. Removed first argument from call to
17881 finish_switch_stmt.
17883 * parse.c: Regenerated.
17885 * pt.c (tsubst_expr): Removed first argument from call to
17886 finish_for_stmt. Removed first argument from call to
17887 finish_switch_stmt.
17889 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17891 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17892 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17894 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17895 (cplus_tree_code_length[]): Likewise.
17896 (cplus_tree_code_name[]): Likewise.
17897 (init_parse): Added call to add_c_tree_codes. Changed
17898 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17900 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17902 * cp-tree.h (finish_mem_initializers): Declare.
17903 (count_trees): Likewise.
17904 * parse.y (base_init): Use finish_mem_initializers.
17905 * semantics.c (finish_mem_initializers): New function.
17907 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17908 the number of trees.
17910 (count_trees): Don't use it.
17912 2000-06-15 Jason Merrill <jason@redhat.com>
17914 * tree.c (count_trees): New debugging function.
17916 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17917 * init.c (build_member_call): Pull out the name of a DECL.
17919 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17920 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17921 * optimize.c (optimize_function): Not here.
17922 * pt.c (instantiate_decl): Push to TV_PARSE.
17924 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17926 * cp-tree.h (struct language_function): Remove x_base_init_list
17927 and x_member_init_list.
17928 (current_base_init_list): Remove.
17929 (current_member_init_list): Likewise.
17930 (setup_vtbl_ptr): Change prototype.
17931 (emit_base_init): Likewise.
17932 (expand_member_init): Likewise.
17933 (reinit_parse_for_function): Remove.
17934 * decl.c (save_function_data): Don't clear x_base_init_list and
17935 x_member_init_list.
17936 (mark_language_function): Don't mark them.
17937 * init.c (perform_member_init): Tweak comment.
17938 (sort_member_init): Take the list of initializers as an argument.
17939 (sort_base_init): Likewise.
17940 (emit_base_init): Likewise.
17941 (expand_member_init): Return the initializer. Don't use global
17943 * lex.c (reinit_parse_for_function): Remove.
17944 * method.c (build_template_parm_names): Correct substitution.
17945 (do_build_copy_constructor): Don't use current_member_init_list
17946 and current_base_init_list.
17947 (synthesize_method): Likewise.
17948 * parse.y (base_init): Split mem-initializers into
17949 base-initializers and field-initializers.
17950 (member_init_list): Build up the list here.
17951 (member_init): Return the initializer.
17952 (fn.depfn): Don't use reinit_parse_for_function.
17953 * parse.c: Regenerated.
17954 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17956 (tsubst_expr): Don't use current_member_init_list
17957 and current_base_init_list.
17958 (tsubst_expr_values): Rename to ...
17959 (tsubst_initializer_list): ... this. Use convert_from_reference.
17960 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17961 and current_base_init_list.
17962 (begin_function_definition): Don't call reinit_parse_for_function.
17964 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17966 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17969 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17971 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17973 * cp-tree.h (IF_COND): Move to c-common.h.
17974 (THEN_CLAUSE): Likewise.
17975 (ELSE_CLAUSE): Likewise.
17976 (WHILE_COND): Likewise.
17977 (WHILE_BODY): Likewise.
17978 (DO_COND): Likewise.
17979 (DO_BODY): Likewise.
17980 (RETURN_EXPR): Likewise.
17981 (EXPR_STMT_EXPR): Likewise.
17982 (FOR_INIT_STMT): Likewise.
17983 (FOR_COND): Likewise.
17984 (FOR_EXPR): Likewise.
17985 (FOR_BODY): Likewise.
17986 (SWITCH_COND): Likewise.
17987 (SWITCH_BODY): Likewise.
17988 (CASE_LOW): Likewise.
17989 (CASE_HIGH): Likewise.
17990 (GOTO_DESTINATION): Likewise.
17991 (COMPOUND_BODY): Likewise.
17992 (ASM_CV_QUAL): Likewise.
17993 (ASM_STRING): Likewise.
17994 (ASM_OUTPUTS): Likewise.
17995 (ASM_INPUTS): Likewise.
17996 (ASM_CLOBBERS): Likewise.
17997 (DECL_STMT_DECL): Likewise.
17998 (STMT_EXPR_STMT): Likewise.
17999 (LABEL_STMT_LABEL): Likewise.
18000 (SCOPE_BEGIN_P): Likewise.
18001 (SCOPE_END_P): Likewise.
18002 (SCOPE_STMT_BLOCK): Likewise.
18003 (SCOPE_NULLIFIED_P): Likewise.
18004 (SCOPE_NO_CLEANUPS_P): Likewise.
18005 (SCOPE_PARTIAL_P): Likewise.
18006 (ASM_VOLATILE_P): Likewise.
18007 (STMT_LINENO): Likewise.
18008 (STMT_LINENO_FOR_FN_P): Likewise.
18010 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
18011 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
18012 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
18013 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
18014 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
18016 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
18018 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
18019 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
18021 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
18022 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
18023 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
18025 2000-06-14 Mark Mitchell <mark@codesourcery.com>
18027 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
18028 * class.c (dfs_find_final_overrider): Set it appropriately.
18029 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
18030 avoid unneeded secondary vptrs.
18032 2000-06-13 Jakub Jelinek <jakub@redhat.com>
18034 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
18035 (check_bitfield_decl, check_field_decl): Likewise.
18036 (build_vtbl_or_vbase_field, build_base_field): Likewise.
18037 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
18038 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
18039 (xfer_tag, finish_enum): Likewise.
18040 * decl2.c (finish_builtin_type): Likewise.
18041 * init.c (init_init_processing): Likewise.
18042 * pt.c (instantiate_class_template): Likewise.
18043 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
18044 * cp-tree.h (struct lang_type): Add user_align member.
18045 (CLASSTYPE_USER_ALIGN): Define.
18047 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
18049 * Make-lang.in (c++.install-common): Install g++-cross in
18050 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
18051 $(target_alias)-g++ and $(target_alias)-c++.
18053 2000-06-12 Mark Mitchell <mark@codesourcery.com>
18055 * class.c (vcall_offset_data_s): Add last_init and fns.
18056 (overrides): Rename to same_signature_p.
18057 (dfs_find_final_overrider): Adjust accordingly.
18058 (mark_overriders): Likewise.
18059 (warn_hidden): Likewise.
18060 (build_vtbl_initializer): Reorganize machinery for building things
18061 at negative offsets.
18062 (build_vcall_and_vbase_vtbl_entries): Likewise.
18063 (build_vbase_offset_vtbl_entries): Likewise.
18064 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
18065 offset entries. Do not create two entries for functions with the
18067 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
18068 (build_rtti_vtbl_entries): Reorganize machinery for building things
18069 at negative offsets.
18071 * optimize.c (expand_call_inline): Don't recurse into the code
18072 used to initialize the parameters more than once.
18074 2000-06-11 Mark Mitchell <mark@codesourcery.com>
18076 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
18077 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
18078 (find_substitution): Only use the `Sa' substitution for
18079 std::allocator, not instantiations of it.
18080 (write_template_prefix): Move comment. Only use a TREE_LIST to
18081 represent substitutions for a member template.
18082 (write_array_type): Mangle array dimensions correctly.
18083 * optimize.c (maybe_clone_body): Copy more information from the
18085 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18086 on the regenerated declaration.
18088 2000-06-11 Chip Salzenberg <chip@valinux.com>
18089 Mark Mitchell <mark@codesourcery.com>
18091 * class.c (build_vtable): Clarify comment.
18092 (build_ctor_vtbl_group): Pass the most derived type to
18095 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18097 * decl2.c (compare_options): Don't needlessly cast away const-ness.
18099 2000-06-10 Mark Mitchell <mark@codesourcery.com>
18101 * decl.c (add_binding): Handle duplicate declarations of external
18104 2000-06-09 Chip Salzenberg <chip@valinux.com>
18105 Mark Mitchell <mark@codesourcery.com>
18107 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18109 (write_signed_number): New macro.
18110 (write_unsigned_number): Likewise.
18111 (write_source_name): Use them.
18112 (write_number): Handle signed and unsigned values.
18113 (write_integer_cst): Use tree_int_cst_sgn, and use
18114 write_unsigned_number or write_signed_number as appropriate.
18115 (write_discriminator): Use write_unsigned_number or
18116 write_signed_number as appropriate.
18117 (write_template_arg_literal): Likewise.
18118 (write_array_type): Use tree_low_cst.
18119 (write_template_parm): Use write_unsigned_number or
18120 write_signed_number as appropriate.
18121 (write_substitution): Adjust call to write_number.
18122 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18123 (write_expression): Handle non-type template arguments of
18124 reference type correctly.
18125 (mangle_thunk): Use write_signed_number.
18127 2000-06-09 Chip Salzenberg <chip@valinux.com>
18129 * mangle.c (find_substition): Don't mangle objects with typename
18130 substitutions (e.g. "cin" as "Si").
18132 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
18134 * call.c (add_candidate): Use ggc_alloc_cleared.
18135 * decl.c (lookup_label): Likewise.
18136 * lex.c (retrofit_lang_decl): Likewise.
18138 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
18140 * semantics.c (expand_body): Push to TV_EXPAND.
18141 * optimize.c (optimize_function): Push to TV_INTEGRATION.
18142 * decl.c (start_function): Always call announce_function.
18144 * tinfo2.cc: Just declare abort.
18146 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
18148 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18149 whenever @ is a symbolic name.
18151 2000-06-08 Jakub Jelinek <jakub@redhat.com>
18153 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18155 2000-06-07 Mark Mitchell <mark@codesourcery.com>
18157 * decl.c (pushdecl): Look up functions by DECL_NAME, not
18158 DECL_ASSEMBLER_NAME.
18160 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18162 * decl2.c (c_language): Define.
18164 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
18166 * lex.c (lang_init_options): Tweak.
18168 * decl2.c: Remove #inclusion of diagnostic.h
18169 (lang_decode_option): Move diagnostic formatting options to
18172 * lang-options.h: Remove documentation for diagnostic options.
18174 * Makefile.in (lex.o): Depends upon diagnostic.h
18176 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18178 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18179 the same DECL_RESULT, it's not a redefinition.
18180 * pt.c (tsubst_decl): Remove code to handle illegal
18183 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18185 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18187 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18189 * search.c (maybe_suppress_debug_info): Don't check
18190 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18192 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18195 Remember instantiation context in deferred instantiations.
18196 * cp-tree.h (struct tinst_level): Remove.
18197 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18198 * pt.c (current_tinst_level): Now a tree.
18199 (print_template_context, push_tinst_level, pop_tinst_level,
18200 tinst_for_decl): Adjust.
18201 (reopen_tinst_level): New fn.
18202 (init_pt): Register current_tinst_level as a root.
18203 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18204 of the pending templates list.
18205 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18206 * lex.c (extract_interface_info): Adjust.
18207 * decl2.c (warn_if_unknown_interface): Adjust.
18209 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18211 * class.c (indirect_primary_base_p): New function.
18212 (determine_primary_base): Use it.
18214 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18216 Update new-abi dynamic cast algorithm.
18217 * tinfo.cc (__class_type_info::__dyncast_result): Add
18218 whole_details. Adjust constructor.
18219 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18220 Avoid unnecessary searching.
18221 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18223 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18225 * decl.c (init_decl_processing): Don't call record_component_aliases.
18226 * tree.c (build_cplus_array_type_1): Likewise.
18228 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18230 * ir.texi: Correct typo.
18231 * mangle.c (write_expression): Handle non-type template arguments
18232 with reference type.
18233 * method.c (build_overload_value): Likewise.
18234 * pt.c (convert_nontype_argument): Explicitly represent conversion
18235 to a reference with an ADDR_EXPR.
18236 (unify): Always unify arguments in left-to-right order.
18238 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18239 Mark Mitchell <mark@codesourcery.com>
18241 * Make-lang.in (CXX_SRCS): Add mangle.c.
18242 * Makefile.in (CXX_OBJS): Add mangle.o.
18243 (mangle.o): New rule.
18245 * class.c (local_classes): New variable.
18246 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18247 (get_vtt_name): Use mangle_vtt_name for new ABI.
18248 (init_class_processing): Initialize local_classes.
18249 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18250 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18251 (std_identifier): New macro.
18252 (DECL_VOLATILE_MEMFUNC_P): New macro.
18253 (DECL_NAMESPACE_STD_P): Likewise.
18254 (local_classes): Declare.
18255 (get_mostly_instantiated_function_type): Declare.
18256 (init_mangle): Declare.
18257 (mangle_decl): Likewise.
18258 (mangle_type_string): Likewise.
18259 (mangle_type): Likewise.
18260 (mangle_typeinfo_for_type): Likewise.
18261 (mangle_typeinfo_string_for_type): Likewise.
18262 (mangle_vtbl_for_type): Likewise.
18263 (mangle_vtt_for_type): Likewise.
18264 (mangle_ctor_vtbl_for_type): Likewise.
18265 (mangle_thunk): Likewise.
18266 (mangle_conv_op_name_for_type): Likewise.
18267 (mangle_guard_variable): Likewise.
18268 * decl.c (pushtag): Keep track of local classes.
18269 (initialize_predefined_identifiers): Initialize std_identifier.
18270 (init_decl_processing): Use std_identifier.
18271 (start_decl): Don't treat instantiations as specializations.
18272 (grokdeclarator): Likewise.
18273 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18274 name for fully-instantiated templates.
18275 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18276 destructors with the new ABI.
18277 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18278 (grokfield): Use mangle_type for new ABI.
18279 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18280 (get_sentry): Use mangle_guard_variable for new ABI.
18281 (start_static_initialization_or_destruction): Likewise.
18282 * expr.c (extract_aggr_init): Remove.
18283 (extract_scalar_init): Likewise.
18284 (extract_init): Remove #if 0'd code.
18285 * mangle.c: New function.
18286 * method.c (build_mangled_name): Assert not flag_new_abi.
18287 (build_static_name): Likewise.
18288 (build_decl_overload_real): Likewise.
18289 (build_typename_overload): Likewise.
18290 (build_overload_with_type): Likewise.
18291 (build_overload_name): Likewise.
18292 (get_ctor_vtbl_name): Likewise.
18293 (start_squangling): Likewise.
18294 (get_id_2): Likewise.
18295 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18296 (init_method): Call init_mangle for new ABI.
18297 (make_thunk): Call mangle_thunk for new ABI.
18298 * operators.def: Correct new ABI manglings for the `%' operator.
18300 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18301 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18302 (lookup_template_class): Call mangle_decl for new ABI.
18303 (get_mostly_instantiated_function_type): New function.
18304 (set_mangled_name_for_template_decl): Use it.
18305 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18306 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18307 conversion op names.
18308 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18309 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18310 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18311 mangle_typeinfo_string_for_type.
18313 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18315 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18316 (INNERMOST_TEMPLATE_ARGS): New macro.
18317 (innermost_args): Remove.
18318 (get_innermost_template_args): New function.
18319 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18320 * error.c (dump_function_decl): Be caution when using
18321 most_general_template.
18322 * method.c (build_template_parm_names): Use
18323 INNERMOST_TEMPLATE_ARGS.
18324 * pt.c (add_to_template_args): Tidy comment
18325 (get_innermost_template_args): New function.
18326 (check_explicit_specialization): Clear DECL_INITIAL for a new
18328 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18330 (push_template_decl): Always register specializations of the most
18332 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18333 (coerce_template_parms): Likewise.
18334 (lookup_template_class): Likewise.
18335 (innermost_args): Remove.
18336 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18337 (tsubst_decl): Handle tricky specializations. Use
18338 get_innermost_template_args.
18339 (instantiate_template): Simplify handling of partial
18341 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18342 (most_general_template): Reimplement, in a more straightforward
18344 (regenerate_decl_from_template): Tweak formatting. Use
18345 TMPL_ARGS_DEPTH for clarity.
18346 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18348 * dump.c (dequeue_and_dump): Dump information about thunks.
18350 2000-06-01 Richard Henderson <rth@cygnus.com>
18352 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18354 2000-06-01 Richard Henderson <rth@cygnus.com>
18356 * decl2.c (unsupported_options): Fix typo, make const.
18357 (lang_decode_option): Fix bsearch argument order.
18359 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18361 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18364 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18366 * cp-tree.h (c_get_alias_set): Deleted.
18367 * Makefile.in (decl.o): Include ../expr.h.
18368 * decl.c (expr.h): Include.
18369 (init_decl_processing): Call record_component_aliases for arrays.
18370 (grokdeclarator): Likewise.
18371 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18372 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18374 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18376 Remove guiding declaration support.
18377 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18378 (flag_guiding_decls): Remove.
18379 * call.c (build_user_type_conversion_1): Remove support for
18381 (build_new_function_call): Likewise.
18382 (build_new_op): Likewise.
18383 (build_new_method_call): Likewise.
18384 * decl.c (start_function): Likewise.
18385 * friend.c (is_friend): Likewise.
18386 (do_friend): Likewise.
18387 * decl2.c ((flag_dump_translation_unit): Make it const.
18388 (flag_guiding_decls): Remove.
18389 (unsupported_options): New variable
18390 (compare_options): New function.
18391 (lang_decode_option): Use them.
18393 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18395 * method.c (mangle_expression): Adjust test for legal expression
18398 * pt.c (instantiate_decl): Save and restore the local
18399 specializations list.
18401 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18403 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18405 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18407 * call.c (add_template_candidate_real): Handle member template
18408 constructors for classes with virtual bases.
18409 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18410 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18412 * ir.texi: Update thunk documentation.
18414 * call.c (joust): Fix handling of overloaded builtin operators.
18416 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18418 * cp-tree.h (DECL_ANTICIPATED): New macro.
18419 Document new use of DECL_LANG_FLAG_7.
18420 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18421 in the user namespace.
18422 * lex.c (do_identifier): If the identifier's declaration has
18423 DECL_ANTICIPATED on, it has not yet been declared. But do not
18424 replace it with an ordinary implicit declaration.
18426 * tinfo2.cc: Include stdlib.h.
18428 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18430 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18431 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18434 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18436 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18439 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18441 * operators.def (<?): Duplicated, should have been...
18444 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18445 Mark Mitchell <mark@codesourcery.com>
18447 * cp-tree.h (ansi_opname): Make it a macro.
18448 (ansi_assopname): Likewise.
18449 (struct lang_decl_flags): Add assignment_operator_p.
18450 (struct lang_decl): Add operator_code.
18451 (DECL_VTT_PARM): Adjust.
18452 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18453 overloaded operator.
18454 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18455 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18456 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18457 (opname_tab): Remove.
18458 (assignop_tab): Likewise.
18459 (operator_name_info_t): New type.
18460 (operator_name_info): New variable.
18461 (assignment_operator_name_info): Likewise.
18462 (build_cp_library_fn): Remove declaration.
18463 (push_cp_library_fn): Likewise.
18464 (operator_name_string): Likewise.
18465 (build_decl_overload): Likewise.
18466 * call.c (print_z_candidates): Simplify.
18467 (build_object_call): Adjust usage of ansi_opname. Use
18468 DECL_OVERLOADED_OPERATOR_P.
18469 (op_error): Adjust operator name lookup.
18470 (build_conditional_expr): Adjust usage of ansi_opname.
18471 (build_new_op): Likewise.
18472 (build_op_delete_call): Likewise.
18473 (build_over_call): Likewise.
18474 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18475 * decl.c (duplicate_decls): Copy operator_code.
18476 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18477 (builtin_function): Adjust parameters to build_library_fn_1.
18478 (build_library_fn_1): Accept an overloaded operator code.
18479 (build_library_fn): Pass ERROR_MARK.
18480 (build_cp_library_fn): Accept an overloaded operator code.
18481 (push_cp_library_fn): Likewise.
18482 (grokfndecl): Tweak.
18483 (grokdeclarator): Simplify code to compute names of overloaded
18484 operators. Adjust use of ansi_opname.
18485 (ambi_op_p): Work on tree_codes, not identifiers.
18486 (unary_op_p): Likewise.
18487 (grok_op_properties): Likewise.
18488 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18489 (lang_mark_tree): Don't try to mark the operator_code.
18490 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18491 * error.c (dump_decl): Remove special handling for operator
18493 (dump_function_name): Likewise.
18494 (dump_expr): Adjust name lookup of operators.
18495 (op_to_string): Simplify.
18496 (assop_to_string): Likewise.
18497 * init.c (build_new_1): Adjust use of ansi_opname.
18498 * lex.c (opname_tab): Remove.
18499 (assignop_tab): Likewise.
18500 (ansi_opname): Likewise.
18501 (ansi_assopname): Likewise.
18502 (operator_name_string): Likewise.
18503 (reinit_lang_specific): Likewise.
18504 (operator_name_info): New variable.
18505 (assignment_operator_name_info): Likewise.
18506 (init_operators): New function.
18507 (init_parse): Use it.
18508 (do_identifier): Adjust use of ansi_opname.
18509 * method.c (mangle_expression): Don't use ansi_opname for
18511 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18512 (build_decl_overload): Remove.
18513 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18514 (do_build_assign_ref): Adjust use of ansi_opname.
18515 (synthesize_method): Likewise.
18516 (implicitly_declare_fn): Likewise.
18517 * operators.def: New file.
18518 * parse.y (operator): Adjust use of ansi_opname.
18519 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18520 (set_mangled_name_for_template_decl): Don't play games with
18522 (special_function_p): Adjust use of ansi_opname.
18523 * typeck.c (check_return_expr): Likewise.
18524 * Make-lang.in (cc1plus): Depend on operators.def.
18525 * Makefile.in (lex.o): Likewise.
18526 (decl.o): Likewise.
18528 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18530 * Make-lang.in (cplib2.ready): Eradicate.
18532 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18534 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18535 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18536 (built_min, cp_tree_equal): Likewise.
18538 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18540 * class.c (layout_nonempty_base_or_field): Replace
18541 `record_layout_info' with `record_layout_info_s'.
18543 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18546 * cp-tree.h (struct language_function): x_named_labels is now
18547 a struct named_label_list*.
18548 * decl.c (struct named_label_use_list): Renamed from...
18549 (struct named_label_list): ...this. New struct.
18550 (push_binding_level): Don't set eh_region.
18551 (note_level_for_eh): New fn.
18552 (pop_label): Take label and old value directly.
18553 (pop_labels): Adjust for new named_labels format.
18554 (lookup_label): Likewise.
18555 (poplevel): Note characteristics of a binding level containing a
18556 named label. Mess with named label lists earlier.
18557 (mark_named_label_lists): New fn.
18558 (mark_lang_function): Call it.
18559 (use_label): New fn, split out from...
18560 (make_label_decl): ...here. Don't call it.
18561 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18562 check_previous_gotos): New fns, split out from...
18563 (define_label): ...here.
18564 (check_switch_goto): New fn.
18565 (define_case_label): Call it.
18566 (check_goto): New fn.
18567 * semantics.c (finish_goto_stmt): Call it and use_label.
18568 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18569 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18571 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18573 * class.c (build_vtable_entry_ref): Correct usage of
18574 get_vtbl_decl_for_binfo.
18576 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18577 * method.c (implicitly_declare_fn): Not here.
18579 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18581 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18582 (CPTI_PTMD_DESC_TYPE): ... here.
18583 (ptmd_desc_type_node): Rename to ...
18584 (ptm_desc_type_node): ... here.
18585 * decl.c: Likewise.
18586 * rtti.c (ptmd_initializer): Rename to ...
18587 (ptm_initializer): ... here.
18588 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18590 (create_tinfo_types): Adjust.
18592 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18594 Finish implementation of VTTs.
18595 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18596 CPTI_VTT_PARM_IDENTIFIER.
18597 (vtt_parm_identifier): New macro.
18598 (vtt_parm_type): Likewise.
18599 (BINFO_SUBVTT_INDEX): Likewise.
18600 (BINFO_VPTR_INDEX): Likewise.
18601 (struct lang_decl): Add vtt_parm.
18602 (DECL_VTT_PARM): New macro.
18603 (DECL_USE_VTT_PARM): Likewise.
18604 (DECL_NEEDS_VTT_PARM_P): Likewise.
18605 (get_vtt_name): Declare.
18606 (build_artificial_parm): Likewise.
18607 (fixup_all_virtual_upcast_offsets): Likewise.
18608 (expand_indirect_vtbls_init): Remove.
18609 * call.c (build_new_method_call): Pass the vtt to subobject
18610 constructors and destructors.
18611 * class.c (get_vtt_name): Give it external linkage.
18612 (build_clone): Handle the magic VTT parameters for clones.
18613 (clone_function_decl): Fix typo in comment.
18614 (build_vtt): Keep track of the indices in the VTTs where various
18615 entities are stored.
18616 (build_vtt_inits): Likewise.
18617 (dfs_build_vtt_inits): Likewise.
18618 (build_ctor_vtbl_group): Tweak type of construction vtables.
18619 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18620 primary bases, when building construction vtables.
18621 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18622 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18623 (init_decl_processing): Initialize vtt_parm_type.
18624 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18625 (lang_mark_tree): Make vtt_parm.
18626 * decl2.c (build_artificial_parm): New function.
18627 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18628 (grokclassfn): Use build_artificial_parm.
18629 * init.c (initialize_vtbl_ptrs): Call
18630 fixup_all_virtual_upcast_offsets directly.
18631 (perform_member_init): Use the complete subobject destructor for
18633 (build_vtbl_address): New function.
18634 (expand_virtual_init): Handle VTTs.
18635 * optimize (maybe_clone_body): Likewise.
18636 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18638 (expand_indirect_vtbls_init): Remove.
18639 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18640 * tree.c (make_binfo): Make them bigger.
18642 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18644 * inc/cxxabi.h (__pbase_type_info): Define, based on
18645 __pointer_type_info.
18646 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18647 (__pointer_to_member_type_info): Likewise.
18648 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18649 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18650 (__pointer_type_info::__do_catch): Rename to ...
18651 (__pbase_type_info::__do_catch): ... here. Adjust.
18652 (__pbase_type_info::__pointer_catch): Implement.
18653 (__pointer_type_info::__pointer_catch): Adjust.
18654 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18656 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18658 * tinfo.h (__user_type_info::contained_virtual_p): New
18660 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18662 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18663 diamond shaped hierarchy. Add early out for mixed diamond and
18664 duplicate shaped hierarchy.
18666 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18668 * cp-tree.h (build_delete): Change prototype.
18669 (build_vec_delete): Likewise.
18670 * call.c (build_scoped_method_call): Use special_function_kind
18671 values to indicate the kind of destruction to be done.
18672 (build_method_call): Likewise.
18673 * decl.c (finish_destructor_body): Likewise.
18674 (maybe_build_cleanup_1): Likewise. Rename to ...
18675 (maybe_build_cleanup): ... this.
18676 * decl2.c (delete_sanity): Use special_function_kind
18677 values to indicate the kind of destruction to be done.
18678 (build_cleanup): Likewise.
18679 * init.c (perform_member_init): Likewise.
18680 (build_vec_delete_1): Likewise.
18681 (build_dtor_call): Simplify.
18682 (build_delete): Use special_function_kind
18683 values to indicate the kind of destruction to be done.
18684 (build_vbase_delete): Likewise.
18685 (build_vec_delete): Likewise.
18687 * init.c (sort_member_init): Fix typo in error message generation
18690 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18692 * semantics.c (begin_class_definition): make the packed
18693 attribute be sensitive to the "-fpack-struct" command line flag
18695 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18697 Update new-abi upcast algorithm.
18698 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18699 prototype and meaning of return value.
18700 (__si_class_type_info::__do_upcast): Likewise.
18701 (__vmi_class_type_info::__do_upcast): Likewise.
18702 * tinfo.cc (__class_type_info::__upcast_result): Replace
18703 whole2dst with part2dst. Adjust ctor.
18704 (__class_type_info::__do_upcast): Adjust call of worker function.
18705 (__class_type_info::__do_upcast): Adjust.
18706 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18708 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18709 virtual base in diamond hierarchy bug.
18711 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18713 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18714 and bitfield to tinfo_fn_p.
18715 (DECL_TINFO_FN_P): Adjust.
18716 (SET_DECL_TINFO_FN_P): Likewise.
18717 (DECL_MUTABLE_P): Likewise.
18718 (DECL_C_BIT_FIELD): Likewise.
18719 (SET_DECL_C_BIT_FIELD): Likewise.
18720 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18721 (DECL_UNINLINABLE): Likewise.
18722 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18723 (handle_using_decl): Remove assertion.
18724 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18725 to build FIELD_DECLs.
18726 (build_base_field): Likewise.
18727 (layout_class_type): Likewise.
18728 * decl.c (init_decl_processing): Likewise.
18729 (build_ptrmemfunc_type): Likewise.
18730 (grokdeclarator): Likewise.
18731 * decl2.c (grok_x_components): Likewise.
18732 * except.c (call_eh_info): Likewise.
18733 * init.c (init_init_processing): Likewise.
18734 * rtti.c (expand_class_desc): Likewise.
18735 (create_pseudo_type_info): Likewise.
18736 (get_vmi_pseudo_type_info): Likewise.
18737 (create_tinfo_types): Likewise.
18738 * ptree.c (print_lang_decl): Adjust.
18739 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18740 before checking DECL_MUTABLE_P.
18742 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18743 parameters for template functions.
18744 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18745 destructors as well as constructors.
18747 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18749 * class.c (build_ctor_vtbl_group): Set inits.
18750 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18751 DECL_THIS_INLINE appropriately for clones.
18753 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18754 (DECL_CONV_FN_P): Simplify.
18755 (DECL_OPERATOR): Remove.
18756 (language_to_string): Declare.
18757 * decl.c (duplicate_decls): Fix typo in comment.
18758 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18759 (grok_op_properties): Use DECL_CONV_FN_P instead of
18760 IDENTIFIER_TYPENAME_P.
18761 * dump.c (dequeue_and_dump): Dump the language linkage of
18763 * error.c (language_to_string): Give it external linkage.
18764 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18765 (implicitly_declare_fn): Set DECL_LANGUAGE.
18766 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18767 IDENTIFIER_TYPENAME_P.
18768 (tsubst_decl): Likewise.
18769 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18770 * semantics.c (finish_member_declaration): Don't mark members of
18771 classes declared in an extern "C" region as extern "C".
18773 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18775 * decl2.c (qualified_lookup_using_namespace): Look through
18778 * decl.c (push_using_decl): Return the old decl on namespace level.
18780 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18782 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18783 (VTT_NAME_PREFIX): New macro.
18784 (CTOR_VTBL_NAME_PREFIX): Likewise.
18785 (get_ctor_vtbl_name): New function.
18786 * class.c (get_vtable_name): Simplify.
18787 (get_vtt_name): New function.
18788 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18789 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18790 when a virtual base becomes primary.
18791 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18793 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18794 additional parameters.
18795 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18796 (initialize_array): New function.
18797 (build_vtt): Likewise.
18798 (build_vtt_inits): Likewise.
18799 (dfs_build_vtt_inits): Likewise.
18800 (dfs_fixup_binfo_vtbls): Likewise.
18801 (build_ctor_vtbl_group): Likewise.
18802 (initialize_vtable): Use initialize_array.
18803 (accumulate_vtbl_inits): Reimplement to handle construction
18805 (dfs_accumulate_vtbl_inits): Likewise.
18806 (bulid_vtbl_initializer): Adjust parameter name.
18807 * method.c (build_typename_overload): Remove #if 0'd code.
18808 (get_ctor_vtbl_name): New function.
18809 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18810 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18812 * cp-tree.h (struct lang_type): Remove search_slot.
18813 (CLASSTYPE_SEARCH_SLOT): Remove.
18814 (emit_base_init): Change prototype.
18815 (initialize_vtbl_ptrs): Likewise.
18816 (expand_indirect_vtbls_init): Likewise.
18817 (clear_search_slots): Remove.
18818 * decl.c (lang_mark_tree): Don't mark search_slot.
18819 * init.c (initialize_vtbl_ptrs): Simplify.
18820 (emit_base_init): Likewise.
18821 * search.c (struct vbase_info): Document decl_ptr.
18822 (convert_pointer_to_single_level): Remove.
18823 (dfs_find_vbases): Remove.
18824 (dfs_init_base_pointers): Simplify.
18825 (dfs_clear_vbase_slots): Remove.
18826 (dfs_vtable_path_unmark): New function.
18827 (init_vbase_pointers): Simplify.
18828 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18829 (expand_indirect_vtbls_init): Simplify. Don't call
18830 mark_all_temps_used.
18831 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18832 initialize_vtbl_ptrs.
18834 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18836 * except.c: Add static prototypes.
18838 2000-05-20 H.J. Lu <hjl@gnu.org>
18840 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18842 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18844 Don't create a separate copy of virtual bases for the
18845 CLASSTYPE_VBASECLASSES list.
18846 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18847 (BINFO_FOR_VBASE): Remove.
18848 (CANONICAL_BINFO): Adjust.
18849 (binfo_for_vbase): New function.
18850 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18851 instead of BINFO_FOR_VBASE.
18852 (build_vbase_pointer): Likewise.
18853 (build_secondary_vtable): Likewise.
18854 (dfs_mark_primary_bases): Likewise.
18855 (mark_primary_bases): Likewise.
18856 (layout_nonempty_base_or_field): Likewise.
18857 (dfs_set_offset_for_shared_vbases): Likewise.
18858 (dfs_set_offset_for_unshared_vbases): Likewise.
18859 (layout_virtual_bases): Likewise. Adjust for changes to the
18860 CLASSTYPE_VBASECLASSES list.
18861 (dump_class_hierarchy_r): Use binfo_for_vbase
18862 instead of BINFO_FOR_VBASE.
18863 (dump_class_hierarchy): Likewise.
18864 (finish_vtbls): Likewise.
18865 (build_vtbl_initializer): Adjust for changes to the
18866 CLASSTYPE_VBASECLASSES list.
18867 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18868 * decl.c (finish_destructor_body): Adjust for changes to the
18869 CLASSTYPE_VBASECLASSES list.
18870 * init.c (sort_base_init): Use binfo_for_vbase.
18871 (construct_virtual_bases): Adjust for changes to the
18872 CLASSTYPE_VBASECLASSES list.
18873 (expand_member_init): Use binfo_for_vbase.
18874 (build_vbase_delete): Adjust for changes to the
18875 CLASSTYPE_VBASECLASSES list.
18876 * method.c (do_build_copy_constructor): Likewise.
18877 * rtti.c (get_base_offset): Use binfo_for_vbase.
18878 (expand_class_desc): Remove #if 0'd code.
18879 * search.c (struct vbase_info): Remove vbase_types.
18880 (get_base_distance): Use binfo_for_vbase.
18881 (lookup_field_queue_p): Use CANONICAL_BINFO.
18882 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18883 (get_pure_virtuals): Adjust for changes to the
18884 CLASSTYPE_VBASECLASSES list.
18885 (dfs_find_vbases): Use binfo_for_vbase.
18886 (dfs_init_vbase_pointers): Likewise.
18887 (init_vbase_pointers): Don't initialize vi.vbase_types.
18888 (virtual_context): Use binfo_for_vbase.
18889 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18890 CLASSTYPE_VBASECLASSES list.
18891 (expand_indirect_vtbls_init): Simplify.
18892 (dfs_get_vbase_types): Don't replicate virtual bases.
18893 (find_vbase_instance): Use binfo_for_vbase.
18894 (binfo_for_vbase): New function.
18895 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18897 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18899 * decl2.c (finish_anon_union): Generalize error messages to handle
18900 anonymous structures.
18901 * init.c (perform_member_init): Remove `name' parameter.
18902 (build_field_list): New function.
18903 (sort_member_init): Handle anonymous union initialization order
18904 correctly. Check for multiple initializations of the same union.
18905 (emit_base_init): Don't look up fields by name here.
18906 (expand_member_init): Record the result of name lookup for future
18908 * typeck.c (build_component_ref): Fix formatting.
18910 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18912 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18913 * typeck.c (build_x_compound_expr): Replace warn_unused with
18916 * decl2.c (lang_decode_option): Update -Wall unused flags by
18917 calling set_Wunused.
18919 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18921 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18922 * init.c (dfs_vtable_path_unmark): Remove.
18923 * search.c (marked_new_vtable_p): Likewise.
18924 (unmarked_new_vtable_p): Likewise.
18925 (dfs_search_slot_nonempty_p): Likewise.
18926 (dfs_mark): Likewise.
18927 (dfs_vtable_path_unmark): Likewise.
18928 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18929 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18930 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18931 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18932 (init_vbase_pointers): Simplify.
18933 (expand_indirect_vtbls_init): Likewise.
18935 * class.c (copy_virtuals): New function.
18936 (build_primary_table): Use it.
18937 (build_secondary_vtable): Likewise.
18938 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18939 indicate that no vcall offset is required.
18940 (add_virtual_function): Likewise.
18941 (modify_all_vtables): Likewise.
18942 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18943 (dfs_accumulate_vtbl_inits): Likewise.
18944 (build_vtbl_initializer): Make changes to handle construction
18946 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18947 (build_rtti_vtbl_entries): Likewise.
18948 (build_vtable_entries): Handle a NULL vcall_index.
18950 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18952 * decl2.c (lang_decode_option): Fix thinko.
18954 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18956 * except.c (check_handlers): New fn.
18957 * cp-tree.h: Declare it.
18958 * semantics.c (finish_handler_sequence): Call it.
18959 (finish_function_handler_sequence): Likewise.
18960 (finish_handler_parms): Set TREE_TYPE on the handler.
18961 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18962 * search.c (get_base_distance_recursive): If protect>1, ignore
18964 (get_base_distance): Don't reduce watch_access.
18966 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18968 * lex.c: #include diagnostic.h.
18969 (lang_init_options): Set default prefixing rules.
18971 * lang-options.h: Add -fdiagnostics-show-location=.
18973 * decl2.c: #include diagnostic.h.
18974 (lang_decode_option): Handle -fdiagnostics-show-location=.
18976 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18978 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18979 * vec.cc: Revert my 2000-05-07 change.
18981 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18983 * class.c (check_field_decls): Complain about non-static data
18984 members with same name as class in class with constructor.
18986 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18988 * decl.c (grokdeclarator): Allow non-static data members with
18989 same name as class.
18991 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18993 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18994 and pending_inline.filename. Update prototypes.
18995 * decl.c (define_label): Constify filename parameter.
18996 * decl2.c (warn_if_unknown_interface): Constify local char *.
18997 * input.c Constify input_source.filename. Don't declare
18998 input_filename or lineno. Constify filename parameter to feed_input.
18999 * lex.c (init_parse): Constify parameter and return value.
19000 (cp_pragma_interface, cp_pragma_implementation): Constify
19002 (reinit_parse_for_method, reinit_parse_for_block,
19003 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
19004 Constify local char *.
19005 * pt.c: Don't declare lineno or input_filename.
19006 (print_template_context, tsubst_friend_function, tsubst_decl,
19007 tsubst, instantiate_decl): Constify local char *.
19008 * semantics.c (expand_body): Constify local char *.
19009 * tree.c (build_srcloc): Constify filename parameter.
19010 * typeck.c (c_expand_asm_operands): Constify filename
19013 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
19015 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
19016 offsetof expansion.
19018 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
19020 * inc/cxxabi.h: Fix typos in comment.
19021 (__base_class_info::__offset): Use a static_cast.
19023 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
19025 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
19026 of std::size_t and std::ptrdiff_t respectively.
19027 * tinfo.cc: Likewise.
19028 * vec.cc: Likewise.
19030 2000-05-06 Richard Henderson <rth@cygnus.com>
19032 * typeck.c (build_c_cast): Don't warn integer->pointer size
19033 mismatch for constants.
19035 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
19037 * rtti.c (ptmd_initializer): Set non-public, if class is
19040 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
19041 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19042 __cxa_vec_delete): Likewise.
19043 * tinfo.cc (__dynamic_cast): Likewise.
19044 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19045 __cxa_vec_delete): Likewise.
19047 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19049 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
19050 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
19051 (lang_decl_flags): Add vcall_offset.
19052 (THUNK_VCALL_OFFSET): Use it.
19053 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
19054 * method.c (make_thunk): Create the lang_decl here, not in
19056 (emit_thunk): Make generic thunks into ordinary functions once
19057 they have been fed to expand_body.
19058 * semantics.c (expand_body): Set current_function_is_thunk here.
19060 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19062 * class.c (update_vtable_entry_for_fn): Prototype.
19064 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
19067 * search.c (dfs_build_inheritance_graph_order): Prototype.
19069 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19071 * cp-tree.h (special_function_kind): Add various kinds of
19073 (special_function_p): New function.
19074 * class.c (overrides): Don't let one kind of destructor override
19076 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
19077 whether or not to instantiate a template.
19078 * tree.c (special_function_p): Define.
19080 2000-05-03 Mark Mitchell <mark@codesourcery.com>
19082 * cp-tree.def (THUNK_DECL): Remove.
19083 * cp-tree.h (DECL_THUNK_P): New macro.
19084 (DECL_NON_THUNK_FUNCTION_P): Likewise.
19085 (DECL_EXTERN_C_FUNCTION_P): Likewise.
19086 (SET_DECL_THUNK_P): Likewise.
19087 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19088 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19089 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19090 * decl.c (decls_match): Use DECL_EXTERN_C_P.
19091 (duplicate_decls): Likewise.
19092 (pushdecl): Likewise. Adjust thunk handling.
19093 (grokfndecl): Use DECL_EXTERN_C_P.
19094 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19095 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19096 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19097 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19098 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
19099 DECL_NO_STATIC_CHAIN.
19100 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
19101 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19102 * search.c (covariant_return_p): Remove THUNK_DECL handling.
19105 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19107 * tree.c (walk_tree): Set lineno.
19109 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19111 * exception.cc: Update license notice.
19112 * new.cc: Likewise.
19113 * new1.cc: Likewise.
19114 * new2.cc: Likewise.
19115 * tinfo.cc: Likewise.
19116 * tinfo2.cc: Likewise.
19117 * vec.cc: Likewise.
19118 * inc/cxxabi.h: Likewise.
19119 * inc/exception: Likewise.
19120 * inc/new: Likewise.
19121 * inc/new.h: Likewise.
19122 * inc/typeinfo: Likewise.
19124 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19126 * tree.c (build_target_expr_with_type): If we already have a
19127 TARGET_EXPR, just return it.
19129 * optimize.c (initialize_inlined_parameters): Don't generate an
19130 EXPR_STMT if we can just use DECL_INITIAL.
19131 * decl.c (emit_local_var): Only make the initialization a
19132 full-expression if stmts_are_full_exprs_p.
19134 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19136 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19138 * call.c (standard_conversion): Use it.
19139 (direct_reference_binding): Likewise.
19140 (build_over_call): Likewise.
19141 (is_properly_derived_from): Likewise.
19142 (compare_ics): Likewise.
19143 * class.c (resolves_to_fixed_type_p): Likewise.
19144 * optimize.c (declare_return_variable): Likewise.
19145 * pt.c (is_specialization_of): Likewise.
19147 * typeck.c (comp_target_parms): Likeiwse.
19148 (build_static_cast): Likewise.
19149 (build_reinterpret_cast): Likewise.
19150 (build_const_cast): Likewise.
19151 (comp_ptr_ttypes_real): Likewise.
19152 (comp_ptr_ttypes_const): Likewise.
19153 * typeck2.c (process_init_constructor): Likewise.
19155 2000-04-30 Scott Snyder <snyder@fnal.gov>
19157 * decl.c (finish_destructor_body): Use the base destructor when
19158 destroying virtual bases.
19160 2000-04-30 Mark Mitchell <mark@codesourcery.com>
19162 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19164 * optimize.c (struct inline_data): Add target_exprs field.
19165 (declare_return_variable): When a function returns an aggregate,
19166 use the variable declared in the TARGET_EXPR as the remapped
19168 (expand_call_inline): Update the pending target_exprs stack.
19169 (optimize_function): Initialize the stack.
19171 * decl2.c (finish_file): Fix typo in comment.
19173 * method.c (emit_thunk): Don't try to return a `void' value.
19175 * optimize.c (initialize_inlined_parameters): If the parameter is
19176 addressable, we need to make a new VAR_DECL, even if the
19177 initializer is constant.
19179 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19181 * decl.c (grok_op_properties): Add an extra check of argtypes.
19183 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19185 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19187 (initialize_inlined_parameters): Try to avoid creating new
19190 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19192 * lex.c (my_get_run_time): Remove.
19193 (init_filename_times): Use get_run_time instead of my_get_run_time.
19194 (check_newline): Likewise.
19195 (dump_time_statistics): Likewise.
19196 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19197 of computing elapsed time explicitly.
19199 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19201 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19202 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19203 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19204 before calling decl_constant_value.
19205 * class.c (check_bitfield_decl): Likewise.
19206 * cvt.c (ocp_convert): Likewise.
19207 (convert): Likewise.
19208 * decl.c (compute_array_index_type): Likewise.
19209 (build_enumerator): Likewise.
19210 * decl2.c (check_cp_case_value): Likewise.
19211 * pt.c (convert_nontype_argument): Likewise.
19212 (tsubst): Likewise.
19213 * typeck.c (decay_conversion): Likewise.
19214 (build_compound_expr): Likewise.
19215 (build_reinterpret_cast): Likewise.
19216 (build_c_cast): Likewise.
19217 (convert_for_assignment): Likewise.
19219 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19221 * decl.c (finish_function): Don't play games with DECL_INLINE.
19223 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19225 * ir.texi: Correct typo.
19227 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19229 * decl.c (grokdeclarator): Reject VLAs as members.
19231 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19233 * call.c (standard_conversion): Accept conversion between
19236 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19238 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19240 * decl2.c (finish_file): Remove double setup for accounting
19243 2000-04-24 Robert Lipe <robertlipe@usa.net>
19245 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19247 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19249 * new.cc (set_new_handler): Needs to be in std::.
19251 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19253 * cp-tree.h (lang_decl): Remove pretty_function_p.
19254 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19255 language-specific node.
19256 * decl.c (cp_make_fname_decl): Use build_decl, not
19257 build_lang_decl, to build the variables.
19258 (grokvardecl): Don't call build_lang_decl for local variables in
19260 (grokdeclarator): Don't call build_lang_decl for local type
19261 declarations in templates.
19262 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19263 zero'd memory, rather than calling memset.
19264 * pt.c: Include hashtab.h.
19265 (local_specializations): New variable.
19266 (retrieve_local_specialization): Use it.
19267 (register_local_specialization): Likewise.
19268 (tsubst_decl): Don't assume local variables have
19269 DECL_LANG_SPECIFIC.
19270 (instantiate_decl): Set up local_specializations.
19271 * Makefile.in (HTAB_H): New variable.
19273 2000-04-23 Richard Henderson <rth@cygnus.com>
19275 * typeck.c (c_expand_asm_operands): Restore the original
19276 contents of the output list.
19278 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19280 * ir.texi: Document complex number representation.
19282 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19284 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19285 (target_incomplete_p): New function.
19286 (tinfo_base_init): Create comdat NTBS name variable.
19287 (ptr_initializer): Add non_public parameter. Calculate it.
19288 (ptmd_initializer): Likewise.
19289 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19290 (create_real_tinfo_var): Add non_public parameter. Use it.
19291 Push proxy into global namespace.
19292 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19294 * inc/typeinfo (type_info::before, type_info::operator==):
19295 Compare __name addresses.
19297 * tinfo2.cc: Remove new-abi builtins comment.
19299 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19301 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19303 * call.c (joust): Exit early if we get the same function, too.
19305 * decl2.c (key_method): Return NULL_TREE for template classes.
19306 (import_export_class): Don't need to check for template classes.
19308 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19310 * lex.c: Remove references to cccp.c.
19312 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19314 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19315 volatile_memfunc. Add destructor_attr. Adjust dummy.
19316 (DECL_DESTRUCTOR_P): Use destructor_attr.
19317 (DECL_CONST_MEMFUNC_P): Reimplement.
19318 (DECL_VOLATILE_MEMFUNC_P): Remove.
19319 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19320 (overrides): Use DECL_DESTRUCTOR_P.
19321 (check_for_override): Likewise.
19322 * decl.c (start_function): Likewise.
19323 * decl2.c (grokfclassfn): Likewise.
19324 (check_classfn): Likewise.
19325 (grok_function_init): Likewise.
19327 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19329 * decl2.c (grokfield): Issue error on illegal data member
19332 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19334 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19336 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19338 * class.c (build_vtable_entry): Don't build thunks for type-info
19341 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19343 * decl.c (decls_match): Allow a redeclaration of a builtin to
19344 specify args while the builtin did not.
19346 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19348 * cp-tree.def (THUNK_DECL): Add to documentation.
19349 * cp-tree.h (flag_huge_objects): Declare.
19350 * class.c (modify_vtable_entry): Tidy.
19351 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19352 Calculate delta appropriately for the new ABI.
19353 (dfs_modify_vtables): Use it.
19354 (modify_all_vtables): Fix thinko in code to add overriding copies
19355 of functions to primary vtables.
19356 (build_clone): Fix typo in comment.
19357 (clone_function_decl): Correct order of destructors in vtable.
19358 (build_vbase_offset_vtbl_entries): Adjust comment.
19359 (dfs_vcall_offset_queue_p): Remove.
19360 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19361 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19362 (build_vtable_entry): Correct check for pure virtual functions.
19363 Don't declare flag_huge_objects.
19364 * decl.c (flag_huge_objects): Remove declaration.
19365 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19366 Use int_size_in_bytes.
19367 (emit_thunk): Handle vcall offset thunks.
19369 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19371 * decl2.c (parse_time, varconst_time): Delete declarations.
19372 (finish_file): Delete LINENO declaration.
19373 START_TIME and THIS_TIME now long.
19375 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19377 * class.c (build_base_field): Reformat comment.
19379 * inc/cxxabi.h (stddef.h): Comment inclusion.
19380 (__base_class_info::__offset): Comment shift.
19382 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19384 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19385 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19386 (cp_push_exception_identifier): New macro.
19387 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19388 (DECL_BASE_DESTRUCTOR_P): Likewise.
19389 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19390 (get_vtbl_decl_for_binfo): Fix formatting.
19391 (in_charge_arg_for_name): New macro.
19392 (maybe_build_cleanup_and_delete): Remove declaration.
19393 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19394 (in_charge_arg_for_name): New function.
19395 (build_new_method_call): Use it. Handle cloned destructors.
19396 (build_clone): Don't make the base constructor virtual.
19397 Automatically defer generated functions.
19398 (clone_function_decl): Handle destructors, too.
19399 (clone_constructors_and_destructors): Likewise.
19400 (create_vtable_ptr): Don't create a vtable entry for a cloned
19402 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19403 (initialize_predefined_identifiers): Update appropriately.
19404 (finish_destructor_body): Simplify.
19405 (maybe_build_cleanup_and_delete): Remove.
19406 * except.c (expand_throw): Handle new-ABI destructors.
19407 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19408 (build_dtor_call): New function.
19409 (build_delete): Use it. Simplify.
19410 * optimize.c (maybe_clone_body): Handle destructors.
19411 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19413 * exception.cc (cleanup_fn): New typedef.
19414 (CALL_CLEANUP): New macro.
19415 (cp_eh_info): Use them.
19416 (__cp_push_exception): Likewise.
19417 (__cp_pop_exception): Likewise.
19419 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19421 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19422 (complete_dtor_identifier): New macro.
19423 (CLASSTYPE_FIRST_CONVERSION): Remove.
19424 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19425 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19426 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19427 (CLASSTYPE_CONSTRUCTORS): Likewise.
19428 (CLASSTYPE_DESTRUCTORS): Likewise.
19429 (lang_decl): Add cloned_function.
19430 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19431 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19432 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19433 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19434 (DECL_CLONED_FUNCTION_P): Likewise.
19435 (DECL_CLONED_FUNCTION): Likewise.
19436 (clone_function_decl): Declare.
19437 (maybe_clone_body): Likewise.
19438 * call.c (build_user_type_conversion_1): Call complete object
19439 constructors in the new ABI.
19440 (build_new_method_call): Don't add in-charge parameters under the
19442 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19443 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19444 CLASSTYPE_DESTRUCTOR_SLOT.
19445 (build_clone): New function.
19446 (clone_function_decl): Likewise.
19447 (clone_constructors_and_destructors): Likewise.
19448 (check_bases_and_members): Use it.
19449 * decl.c (iniitialize_predefined_identifiers): Initialize
19450 complete_dtor_identifier.
19451 (finish_function): Don't add extra code to a clone.
19452 (lang_mark_tree): Mark cloned_function.
19453 * decl2.c (mark_used): Don't bother trying to instantiate things
19455 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19456 * method.c (set_mangled_name_for_decl): Don't treat clones as
19458 (synthesize_method): Sythesize cloned functions, not the clones.
19459 * optimize.c (inline_data): Update comment on ret_label.
19460 (remap_block): Don't assume DECL_INITIAL exists.
19461 (copy_body_r): Allow ret_label to be NULL.
19462 (maybe_clone_body): Define.
19463 * pt.c (tsubst_decl): Handle clones.
19464 (instantiate_clone): New function.
19465 (instantiate_template): Use it.
19466 (set_mangled_name_for_template_decl): Don't treat clones as
19468 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19469 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19470 * semantics.c (expand_body): Clone function bodies as necessary.
19472 * optimize.c (remap_decl): Avoid sharing structure for arrays
19473 whose size is only known at run-time.
19474 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19476 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19477 to has_in_charge_parm_p.
19478 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19479 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19480 (DECL_COPY_CONSTRUCTOR_P): New macro.
19481 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19482 (build_user_type_conversion_1): Likewise.
19483 (convert_like_real): Likewise.
19484 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19485 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19486 (copy_args_p): Likewise.
19487 (grok_ctor_properties): Likewise.
19488 (start_function): Likewise.
19489 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19490 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19491 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19492 * method.c (do_build_copy_constructor): Use
19493 DECL_HAS_IN_CHARGE_PARM_P.
19494 (synthesize_method): Likewise.
19495 * pt.c (instantiate_template): Remove goto.
19496 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19499 * cp-tre.h (finish_function): Change prototype.
19500 * decl.c (end_cleanup_fn): Adjust caller.
19501 (finish_function): Take only one parameter.
19502 * decl2.c (finish_objects): Adjust caller.
19503 (finish_static_storage_duration_function): Likewise.
19504 * method.c (emit_thunk): Likewise.
19505 * parse.y: Likewise.
19506 * parse.c: Regenerated.
19507 * pt.c (instantiate_decl): Likewise.
19508 * rtti.c (synthesize_tinfo_fn): Likewise.
19509 * semantics.c (expand_body): Likewise.
19511 * cp-tree.h (copy_decl): New function.
19512 * class.c (finish_struct_1): Use it.
19513 * lex.c (copy_decl): Define it.
19514 * pt.c (tsubst_decl): Likewise.
19515 * tree.c (copy_template_template_parm): Likewise.
19517 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19518 has_nonpublic_assign_ref.
19519 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19520 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19521 * class.c (finish_struct_methods): Don't set
19522 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19523 (interface_only): Don't declare.
19524 (interface_unknown): Likewise.
19526 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19528 * tree.h (HAVE_TEMPLATES): Remove definition.
19529 * lang-options.h (-fthis-is-variable): Remove documentation.
19531 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19533 * class.c (instantiate_type): Handle object-relative template-id.
19535 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19536 * decl.c (cplus_expand_expr_stmt): Not here.
19538 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19539 Initialize exprtype earlier.
19541 * parse.y (fn.def1): Check for defining types in return types.
19543 * decl.c (check_tag_decl): Notice extra fundamental types.
19544 Diagnose empty decls in classes, too.
19546 * decl.c (grokdeclarator): Don't override an anonymous name if no
19547 declarator was given.
19549 * cvt.c (convert_to_void): Call resolve_offset_ref.
19551 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19553 * decl2.c (decl_namespace): Handle getting a type.
19555 * typeck.c (build_c_cast): Re-enable warning for cast between
19556 pointer and integer of different size.
19558 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19560 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19562 (__pointer_type_info::__pointer_catch): New virtual function.
19563 (__pointer_to_member_type_info): Derive from
19564 __pointer_type_info. Adjust.
19565 (__pointer_to_member_type_info::__do_catch): Remove.
19566 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19567 (__pointer_to_member_type_info::__pointer_catch): Declare.
19568 * rtti.c (qualifier_flags): Add restrict flag.
19569 (ptmd_initializer): Reorder members.
19570 (create_tinfo_types): Expand comments. Reorder
19571 ptmd_desc_type_node members.
19572 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19574 (__pointer_type_info::__do_catch): Move specific code into
19575 __pointer_catch. Call it.
19576 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19577 specific catch checking. Fix void conversion check.
19578 (__pointer_to_member_type_info::__do_catch): Remove.
19579 (__pointer_to_member_type_info::__pointer_catch): Implement.
19581 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19583 * lex.c (init_parse): Remove traces of classof and headof.
19584 * decl2.c (flag_operator_names): Default to 1.
19585 (lang_decode_option): Do not set it for -ansi.
19587 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19589 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19590 (DECL_MAIN_VARIANT): Remove.
19591 * decl.c (duplicate_decls): Don't set it.
19592 (start_function): Likewise.
19593 (lang_mark_tree): Don't mark it.
19594 * decl2.c (defer_fn): Don't use it.
19595 * lex.c (retrofit_lang_decl): Don't set it.
19596 * pt.c (tsubst_decl): Likewise.
19597 * ptree.c (print_lang_decl): Don't print it.
19598 * typeck.c (mark_addressable): Don't use it.
19600 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19602 * vec.cc: Include <new> and <exception>.
19603 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19604 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19606 (__cxa_vec_delete): Catch dtor exceptions.
19608 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19610 Prepend __ to implementation defined names.
19611 * inc/typeinfo (type_info): Rename _name to __name.
19612 (type_info::type_info): Rename parameter.
19613 (type_info::operator==, type_info::operator!=,
19614 type_info::before): Likewise.
19615 (type_info::is_pointer_p, type_info::is_function_p,
19616 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19619 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19620 (__pointer_type_info::__pointer_type_info): Likewise.
19621 (__pointer_type_info::is_pointer_p,
19622 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19623 (__array_type_info::__array_type_info): Rename parameters.
19624 (__function_type_info::__function_type_info): Likewise.
19625 (__function_type_info::is_function_p): Prepend __.
19626 (__enum_type_info::__enum_type_info): Rename parameters.
19627 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19629 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19631 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19632 (__class_type_info::__class_type_info): Rename parameters.
19633 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19634 (__class_type_info::upcast_result,
19635 __class_type_info::dyncast_result): Prepend __. Move definition
19637 (__class_type_info::do_upcast, __class_type_info::do_catch,
19638 __class_type_info::find_public_src,
19639 __class_type_info::do_dyncast,
19640 __class_type_info::do_find_public_src): Prepend __. Rename
19642 (__si_class_type_info::__si_class_type_info): Rename parameters.
19643 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19644 __si_class_type_info::do_find_public_src): Prepent __. Rename
19646 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19647 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19648 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19650 (__dynamic_cast): Rename parameters.
19651 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19652 type_info::do_catch, type_info::do_upcast): Prepend __.
19653 (contained_p, public_p, virtual_p, contained_public_p,
19654 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19655 (__class_type_info::do_catch,
19656 __class_type_info::do_upcast): Prepend __. Adjust.
19657 (__class_type_info::__upcast_result,
19658 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19660 (__class_type_info::find_public_src): Prepend __. Adjust.
19661 (__class_type_info::do_find_public_src,
19662 __si_class_type_info::do_find_public_src,
19663 __vmi_class_type_info::do_find_public_src): Likewise.
19664 (__class_type_info::do_dyncast,
19665 __si_class_type_info::do_dyncast,
19666 __vmi_class_type_info::do_dyncast): Likewise.
19667 (__class_type_info::do_upcast,
19668 __si_class_type_info::do_upcast,
19669 __vmi_class_type_info::do_upcast): Likewise.
19670 (__dynamic_cast): Adjust.
19671 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19672 (__function_type_info::is_function_p): Likewise.
19673 (__pointer_type_info::do_catch): Likewise. Adjust.
19674 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19675 (__throw_type_match_rtti_2): Adjust.
19676 (__is_pointer): Adjust.
19678 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19680 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19681 (complete_ctor_identifier): New macro.
19682 (special_function_kind): Add sfk_copy_constructor and
19683 sfk_assignment_operator.
19684 (LOOKUP_HAS_IN_CHARGE): Remove.
19685 (cons_up_default_function): Rename to ...
19686 (implicitly_declare_fn): ... this.
19687 * call.c (build_new_method_call): Add in-charge parameters for
19689 * class.c (add_implicitly_declared_members): Change parameter name
19690 from cant_have_assignment to cant_have_const_assignment.
19691 Replace calls to cons_up_default_function to implicitly_declare_fn.
19692 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19693 * decl.c (initialize_predefined_identifiers): Initialize it.
19694 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19695 complex expression.
19696 * init.c (expand_default_init): Don't calculate the in-charge
19698 (build_new_1): Likewise.
19699 * lex.c (cons_up_default_function): Move to method.c.
19700 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19701 (implicitly_declare_fn): New function.
19702 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19703 (build_modify_expr): Likewise.
19704 * typeck2.c (build_functional_cast): Likewise.
19706 Under the new ABI, constructors don't return `this'.
19707 * cp-tree.h (warn_reorder): Declare.
19708 (special_function_kind): New enum.
19709 (global_base_init_list): Remove declaration.
19710 (emit_base_init): Don't return a value.
19711 (check_base_init): Don't declare.
19712 (is_aggr_typedef): Likewise.
19713 * decl.c (check_special_function_return_type): New function.
19714 (return_types): Remove.
19715 (grokdeclarator): Use check_special_function_return_type.
19716 (start_function): Don't initialize ctor_label under the new ABI.
19717 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19718 * init.c (begin_init_stmts): Move to top of file.
19719 (finish_init_stmts): Likewise.
19720 (warn_reorder): Don't declare.
19721 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19723 (check_base_init): Remove.
19724 (is_aggr_typedef): Likewise.
19725 (build_new_1): Don't use the return value of a constructor.
19726 * semantics.c (setup_vtbl_ptr): Don't use the return value
19728 * typeck.c (check_return_expr): Don't magically convert return
19729 statements into `return this' in constructors under the new ABI.
19731 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19732 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19733 (base_ctor_identifier): New macro.
19734 (base_dtor_identifier): Likewise.
19735 (deleting_dtor_identifier): Likewise.
19736 * decl.c: Don't include obstack.h.
19737 (obstack_chunk_alloc): Don't define.
19738 (obstack_chunk_free): Likewise.
19739 (struct predefined_identifier): New type.
19740 (initialize_predefined_identifiers): New function.
19741 (init_decl_processing): Use it.
19742 (debug_temp_inits): Remove.
19743 (start_method): Don't call preserve_data.
19744 (hack_incomplete_structures): Update comment.
19745 * init.c (init_init_processing): Don't initialize
19747 (build_offset_rf): Remove dead code.
19748 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19749 * search.c (init_search_processing): Don't initialize
19752 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19754 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19755 some sign_compare warnings.
19757 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19759 Rename abi::__vmi_class_type_info members.
19760 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19761 base_list, detail_masks members to vmi_flags, vmi_base_count,
19762 vmi_bases and vmi_flags_masks respectively.
19763 (__vmi_class_type_info::vmi_flags_masks): Rename
19764 details_unknown_mask to flags_unknown_mask.
19765 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19766 (__vmi_class_type_info::do_find_public_src): Adjust.
19767 (__vmi_class_type_info::do_dyncast): Adjust.
19768 (__vmi_class_type_info::do_upcast): Adjust.
19770 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19772 * tinfo.cc (convert_to_base): New function.
19773 (get_vbase_offset): Remove. Move into convert_to_base.
19774 (__vmi_class_type_info::do_find_public_src): Adjust.
19775 (__vmi_class_type_info::do_dyncast): Adjust.
19776 (__vmi_class_type_info::do_upcast): Adjust.
19778 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19780 * tinfo.cc (operator=): Use __builtin_strcmp.
19781 * tinfo2.cc (before): Likewise.
19783 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19785 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19786 (DECL_SAVED_INLINE): Rename to ...
19787 (DECL_DEFERRED_FN): ... this.
19788 (in_function_p): Remove declaration.
19789 (mark_inline_for_output): Rename to ...
19790 (defer_fn): ... this.
19791 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19792 (in_function_p): Remove definition.
19793 * decl2.c (saved_inlines): Rename to ...
19794 (deferred_fns): ... this.
19795 (saved_inlines_used): Rename to ...
19796 (deferred_fns_used): ... this.
19797 (mark_inline_for_output): Rename to ...
19798 (defer_fn): ... this.
19799 (finish_file): Adjust accordingly.
19800 (init_decl2): Likewise.
19801 * lex.c (cons_up_default_function): Likewise.
19802 * pt.c (mark_decl_instantiated): Likewise.
19803 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19805 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19806 * semantics.c (expand_body): Defer more functions.
19808 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19810 * vec.cc: New file.
19811 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19813 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19814 __cxa_vec_delete): Declare.
19816 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19818 * rtti.c (dfs_class_hint_mark): New static function.
19819 (dfs_class_hint_unmark): New static function.
19820 (class_hint_flags): Use them.
19822 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19824 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19826 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19828 * cp-tree.h (instantiate_decl): Change prototype.
19829 * decl2.c (mark_used): Adjust call.
19830 * optimize.c (inlinable_function_p): Adjust handling of templates.
19831 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19832 (do_type_instantiation): Likewise.
19833 (instantiate_decl): Defer more templates.
19834 (instantiate_pending_templates): Adjust logic to handle inline
19837 * Makefile.in (GGC_H): New variable. Use it throughout in place
19840 * call.c: Don't include obstack.h. Include ggc.h.
19841 (obstack_chunk_alloc): Don't define.
19842 (obstack_chunk_free): Likewise.
19843 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19844 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19845 (pop_switch): Free it.
19847 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19849 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19850 if we don't have a DECL_FIELD_OFFSET.
19852 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19854 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19855 special_function_p.
19857 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19859 * cfns.gperf (hash, libc_name_p): Prototype.
19861 * rtti.c (build_dynamic_cast_1): Constification.
19863 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19865 * semantics.c (deferred_type_access_control): Prototype.
19867 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19869 Correct many new ABI issues regarding vbase and vcall offset
19871 * cp-tree.h (BINFO_VTABLE): Document.
19872 (struct lang_type): Tweak formatting.
19873 (BINFO_PRIMARY_BINFO): Add to documentation.
19874 (CLASSTYPE_VSIZE): Fix typo in comment.
19875 (CLASSTYPE_VBASECLASSES): Update documentation.
19876 (BINFO_VBASE_MARKED): Remove.
19877 (SET_BINFO_VBASE_MARKED): Likewise.
19878 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19879 (BINFO_FIELDS_MARKED): Remove.
19880 (SET_BINFO_FIELDS_MARKED): Likewise.
19881 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19882 (enum access_kind): New enumeration.
19883 (num_extra_vtbl_entries): Remove declaration.
19884 (size_extra_vtbl_entries): Likewise.
19885 (get_vtbl_decl_for_binfo): New function.
19886 (dfs_vbase_unmark): Remove declaration.
19887 (mark_primary_bases): Likewise.
19888 * class.c (SAME_FN): Remove.
19889 (struct vcall_offset_data_s): Move definition.
19890 (build_vbase_pointer): Use `build', not `build_binary_op', to
19891 access the vbase pointer under the new ABI.
19892 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19893 (build_primary_vtable): Likewise.
19894 (dfs_mark_primary_bases): Move here from search.c.
19895 (mark_primary_bases): Likewise.
19896 (determine_primary_bases): Under the new ABI, don't make a base
19897 class a primary base just because we don't yet have any virtual
19899 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19900 (num_vfun_entries): Remove.
19901 (dfs_count_virtuals): Likewise.
19902 (num_extra_vtbl_entries): Likewise.
19903 (size_extra_vtbl_entries): Likewise.
19904 (layout_virtual_bases): Iterate in inheritance graph order under
19906 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19907 indicate that a vfield is present.
19908 (init_class_processing): Initialize access_public_node, etc., from
19910 (get_vtbl_decl_for_binfo): New function.
19911 (dump_class_hierarchy_r): Likewise.
19912 (dump_class_hierarchy): Use it.
19913 (finish_vtbls): Build the vtbls in inheritance graph order.
19914 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19915 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19916 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19918 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19919 where the vptr points, even for primary vtables.
19920 (build_vtbl_initializer): Adjust handling of vbase and vcall
19922 (build_vcall_and_vbase_vtable_entries): New function.
19923 (dfs_build_vbase_offset_vtbl_entries): Remove.
19924 (build_vbase_offset_vtbl_entries): Reimplement.
19925 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19926 were already handled in a primary base class vtable.
19927 (build_vcall_offset_vtbl_entries): Adjust.
19928 (build_rtti_vtbl_entries): Adjust.
19929 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19930 * init.c (expand_virtual_init): Simplify.
19931 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19932 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19933 * search.c (BINFO_ACCESS): New macro.
19934 (SET_BINFO_ACCESS): Likewise.
19935 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19936 (access_in_type): Likewise.
19937 (dfs_accessible_p): Likewise.
19938 (protected_accessible_p): Likewise.
19939 (lookup_fnfields_1): Adjust documentation.
19940 (dfs_mark_primary_bases): Move to class.c
19941 (mark_primary_bases): Likewise.
19942 (dfs_vbase_unmark): Remove.
19943 (virtual_context): Use BINFO_FOR_VBASE.
19944 (dfs_get_vbase_types): Simplify.
19945 (dfs_build_inheritance_graph_order): New function.
19946 (get_vbase_types): Use it.
19947 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19949 * tinfo.cc (get_vbase_offset): New function.
19950 (__vmi_class_type_info::do_find_public_src): Use it.
19951 (__vmi_class_type_info::do_dyncast): Likewise.
19952 (__vmi_class_type_info::do_upcast): Likewise.
19954 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19956 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19958 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19960 * rtti.c (class_hint_flags): Rename flags.
19961 (class_initializer): Remove flags.
19962 (synthesize_tinfo_var): Combine offset and flags. Add flags
19963 for __vmi_class_type_info.
19964 (create_tinfo_types): Remove flags from __class_type_info and
19965 __si_class_type_info. Merge flags and offset from
19966 base_class_type_info.
19967 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19968 (__base_class_info::is_virtual_p): Adjust.
19969 (__base_class_info::is_public_p): Adjust.
19970 (__base_class_info::offset): New accessor.
19971 (__class_type_info::details): Remove member.
19972 (__class_type_info::__class_type_info): Lose details.
19973 (__class_type_info::detail_masks): Remove.
19974 (__si_class_type_info::__si_class_type_info): Lose details.
19975 (__vmi_class_type_info::details): New member.
19976 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19977 (__vmi_class_type_info::detail_masks): New member.
19978 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19979 with unknown_details_mask.
19980 (__vmi_class_type_info::do_find_public_src): Adjust
19981 (__vmi_class_type_info::do_dyncast): Adjust.
19982 (__vmi_class_type_info::do_upcast): Set result details, if
19984 (__dynamic_cast): Temporarily #if out optimization.
19986 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19988 * rtti.c (get_tinfo_decl): Mark used.
19989 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19990 mark as dealt with, if we output it.
19992 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19994 * class.c: Reorganize to put virtual function table initialization
19995 machinery at the end of the file.
19997 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19999 * class.c (finish_struct): Use bitsize_zero_node.
20000 * pt.c (instantiate_class_template): Likewise.
20002 2000-03-28 Mark Mitchell <mark@codesourcery.com>
20004 Put RTTI entries at negative offsets in new ABI.
20005 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
20006 vbase offset at index -3, not -1.
20007 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
20008 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
20009 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
20010 (build_rtti_vtbl_entries): New function.
20011 (set_rtti_entry): Remove.
20012 (build_primary_vtable): Don't use it.
20013 (build_secondary_vtable): Likewise.
20014 (start_vtable): Remove.
20015 (first_vfun_index): New function.
20016 (set_vindex): Likewise.
20017 (add_virtual_function): Don't call start_vtable. Do call
20019 (set_primary_base): Rename parameter.
20020 (determine_primary_base): Likewise.
20021 (num_vfun_entries): Don't use skip_rtti_stuff.
20022 (num_extra_vtbl_entries): Include RTTI information.
20023 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
20024 (skip_rtti_stuff): Remove.
20025 (dfs_modify_vtables): Don't use it.
20026 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
20027 (layout_nonempty_base_or_field): Update size handling.
20028 (create_vtable_ptr): Tweak.
20029 (layout_class_type): Adjust parameter names.
20030 (finish_struct_1): Simplify.
20031 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
20032 (skip_rtti_stuff): Remove.
20033 (first_vfun_index): New function.
20034 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20035 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
20036 (marked_vtable_pathp): Declare.
20037 (unmarked_vtable_pathp): Likewise.
20038 * error.c (dump_expr): Use first_vfun_index to calculate vtable
20040 * rtti.c (build_headof): Look for RTTI at negative offsets.
20041 (get_tinfo_decl_dynamic): Likewise.
20042 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
20044 (create_pseudo_type_info): Do it here instead. Adjust so that
20045 vptr points at first virtual function.
20046 * search.c (marked_vtable_pathp): Make it global.
20047 (unmarked_vtable_pathp): Likewise.
20048 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20049 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20050 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
20051 (get_pure_virtuals): Likewise.
20052 (expand_upcast_fixups): Likewise.
20053 * tree.c (debug_binfo): Likewise.
20054 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
20057 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20059 * class.c (check_field_decl): Fix typo.
20060 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
20061 (check_methods): Likewise.
20062 (check_field_decls): Likewise.
20063 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
20064 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
20065 Use DECL_RESULT_FLD, not DECL_RESULT.
20066 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
20067 * lex.c (identifier_type): Likewise.
20068 * pt.c (determine_specialization, lookup_template_class): Likewise.
20069 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
20070 (resolve_overloaded_unification, more_specialized): Likewise.
20071 * semantics.c (finish_member_declaration): Likewise.
20072 * typeck.c (build_x_function_call): Likewise.
20074 2000-03-26 Mark Mitchell <mark@codesourcery.com>
20076 * class.c (layout_empty_base): Handle empty bases with non-byte
20078 (build_base_field): Likewise.
20079 (layout_virtual_bases): Likewise.
20081 * class.c (finish_struct_1): Fix typo in this change:
20083 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20085 2000-03-25 Mark Mitchell <mark@codesourcery.com>
20087 * decl.c (grokdeclarator): Count partial specializations when
20088 keeping track of how many template classes have been seen.
20090 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20092 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20094 * class.c (build_vbase_pointer_fields): layout_field now place_field.
20095 (get_vfield_offset): Use byte_position.
20096 (set_rtti_entry): Set OFFSET to ssizetype zero.
20097 (get_binfo_offset_as_int): Deleted.
20098 (dfs_record_base_offsets): Use tree_low_cst.
20099 (dfs_search_base_offsets): Likewise.
20100 (layout_nonempty_base_or_field): Reflect changes in RLI format
20101 and call byte_position.
20102 (layout_empty_base): Convert offset to ssizetype.
20103 (build_base_field): use rli_size_unit_so_far.
20104 (dfs_propagate_binfo_offsets): Do computation in proper type.
20105 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20106 (layout_class_type): Reflect changes in RLI names and fields.
20107 (finish_struct_1): Set DECL_FIELD_OFFSET.
20108 * dump.c (dequeue_and_dump): Call bit_position.
20109 * expr.c (cplus_expand_constant): Use byte_position.
20110 * rtti.c (expand_class_desc): Use bitsize_one_node.
20111 * typeck.c (build_component_addr): Use byte_position and don't
20112 special case for zero offset.
20114 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
20116 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20118 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20120 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20123 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20125 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20127 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20128 make_typename_type, check_initializer, cp_finish_decl,
20129 xref_tag): Likewise.
20130 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20131 decl_namespace, arg_assoc_template_arg, arg_assoc,
20132 validate_nonmember_using_decl, do_class_using_decl): Likewise.
20133 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20134 args_to_string): Likewise.
20135 * friend.c (is_friend): Likewise.
20136 * lex.c (note_got_semicolon, note_list_got_semicolon,
20137 is_global): Likewise.
20138 * method.c (build_overload_nested_name, build_overload_value,
20139 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20140 * parse.y (typename_sub, typename_sub1): Likewise.
20141 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20142 process_partial_specialization, convert_template_argument,
20143 template_args_equal, add_pending_template, lookup_template_class,
20144 for_each_template_parm_r, maybe_fold_nontype_arg,
20145 tsubst, instantiate_template, type_unification_real, unify,
20146 instantiate_pending_templates, set_mangled_name_for_template_decl):
20148 * repo.c (repo_get_id, repo_template_used): Likewise.
20149 * search.c (lookup_field_1): Likewise.
20150 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20151 * xref.c (classname): Likewise.
20153 2000-03-22 Mark Mitchell <mark@codesourcery.com>
20155 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20156 (CANONICAL_BINFO): New macro.
20157 (BINFO_NEW_VTABLE_MARKED): Use it.
20158 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20159 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20160 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20162 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20163 (build_secondary_vtable): Likewise.
20164 (dfs_finish_vtbls): Likewise.
20165 (dfs_accumulate_vtbl_inits): Likewise.
20166 (accumulate_vtbl_inits): New function.
20167 (finish_vtbls): Make sure that virtual bases come after
20168 non-virtual bases in the vtable group.
20169 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20170 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20171 * search.c (struct vbase_info): Move definition.
20172 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20173 (unmarked_new_vtable_p): Likewise.
20174 (dfs_mark_vtable_path): Remove.
20175 (dfs_mark_new_vtable): Remove.
20176 (dfs_unmark_new_vtable): Likewise.
20177 (dfs_clear_search_slot): Likewise.
20178 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20179 (dfs_clear_vbase_slots): Likewise.
20180 (init_vbase_pointers): LIkewise.
20182 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20184 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20185 SIZETYPE to a non-SIZETYPE.
20187 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20189 * class.c (layout_virtual_bases): Adjust names in conditionally
20192 * class.c (record_base_offsets): New function.
20193 (layout_conflict_p): Likewise.
20194 (layout_nonempty_base_or_field): Use it.
20195 (layout_empty_base): New function.
20196 (build_base_field): Use it.
20197 (build_base_fields): Update comment.
20198 (layout_virtual_bases): Fold in a little code form
20199 layout_basetypes. Use layout_empty_base.
20200 (layout_basetypes): Remove.
20201 (end_of_class): New function.
20202 (layout_class_type): Use it. Adjust.
20204 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20205 (fntype_p): Remove.
20206 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20208 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20209 * typeck.c (fntype_p): Remove.
20211 * cp-tree.h (TI_SPEC_INFO): Remove.
20212 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20213 * pt.c (process_partial_specialization): Likewise.
20215 * class.c (build_base_field): Fix thinko in computation of binfo
20218 * tree.c (mark_local_for_remap_p): Mark variables declared in
20219 TARGET_EXPRs as well.
20221 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20223 * typeck.c (require_complete_type, complete_type,
20224 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20225 build_array_ref, convert_arguments, pointer_diff,
20226 build_x_unary_op, build_unary_op, build_c_cast,
20227 build_modify_expr): Use COMPLETE_TYPE_P etc.
20228 * call.c (is_complete, convert_like_real,
20229 build_new_method_call): Likewise.
20230 * class.c (build_vbase_pointer_fields, check_bases,
20231 build_base_field, finish_struct_1, pushclass): Likewise.
20232 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20233 * decl.c (maybe_process_template_type_declaration, pushtag,
20234 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20235 layout_var_decl, check_initializer, cp_finish_decl,
20236 grokdeclarator, require_complete_types_for_parms,
20237 grok_op_properties, xref_tag, xref_basetypes,
20238 check_function_type): Likewise.
20239 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20240 * friend.c (do_friend): Likewise.
20241 * init.c (build_offset_ref): Likewise.
20242 * parse.y (structsp): Likewise.
20243 * pt.c (maybe_process_partial_specialization,
20244 tsubst_friend_function, instantiate_class_template, tsubst,
20245 do_type_instantiation, instantiate_pending_templates): Likewise.
20246 * repo.c (repo_get_id): Likewise.
20247 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20248 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20249 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20250 * semantics.c (begin_class_definition): Likewise.
20251 * tree.c (build_cplus_method_type): Likewise.
20252 * typeck2.c (digest_init, build_functional_cast,
20253 add_exception_specifier): Likewise.
20254 * parse.h, parse.c: Regenerated.
20256 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20258 * inc/cxxabi.h: New header file. Define new-abi entry points.
20259 (__pointer_type_info::target): Rename member to ...
20260 (__pointer_type_info::type): ... here.
20261 (__base_class_info::type): Rename member to ...
20262 (__base_class_info::base): ... here.
20263 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20264 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20265 (abi_node): New global tree node.
20266 * decl.c (abi_node): Document.
20267 (init_decl_processing): Initialize abi_node.
20268 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20269 (get_vmi_pseudo_type_info): Likewise.
20270 (create_tinfo_types): Likewise.
20271 (emit_support_tinfos): Likewise.
20272 * tinfo.h (cxxabi.h): Include for new-abi.
20273 Move rtti class definitions to new header file.
20274 * tinfo.cc (abi): Use the namespace.
20275 (std): Move new abi rtti classes from here ...
20276 (__cxxabiv1): ... to here.
20277 * tinfo2.cc (cxxabi.h): Include for new-abi.
20278 Move rtti class definitions to new header file.
20279 (std): Move new abi rtti classes from here ...
20280 (__cxxabiv1): ... to here.
20281 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20284 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20285 Jason Merrill <jason@casey.cygnus.com>
20287 * method.c (build_overload_int): Use host_integerp.
20289 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20291 * init.c (build_offset_ref): Handle the case of a templated member
20294 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20296 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20298 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20300 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20301 * class.c (check_bitfield_decl): Turn illegal bitfields into
20303 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20305 (dfs_offset_for_unshared_vbases): Likewise.
20306 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20307 pointer-to-member correctly under the new ABI.
20308 * expr.c (cplus_expand_constant): Don't use cp_convert when
20309 turning an offset into a pointer-to-member.
20310 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20311 when dereferencing them under the new ABI.
20312 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20313 of pointers-to-members under the new ABI.
20315 * class.c (check_bitfield_decl): Remove restriction on really long
20317 (layout_class_type): Implement new ABI handling of bitfields
20318 longer than their types.
20320 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20322 * parse.y (extdefs): Call ggc_collect.
20323 * parse.c: Regenerated.
20325 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20327 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20328 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20329 potential overload.
20331 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20333 * class.c (build_vbase_path): Use integer_zerop.
20334 (build_vtable_entry): Use tree_low_cst.
20335 (get_vfield_offset): Use bit_position.
20336 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20338 (check_bitfield_decl): Set DECL_SIZE using convert.
20339 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20340 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20342 (finish_struct_1): Use bit_position.
20343 (dump_class_hierarchy): Use tree_low_cst.
20344 * cp-tree.h (min_precision): Add declaration.
20345 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20346 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20347 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20348 * expr.c (cplus_expand_constant): Use bit_position.
20349 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20350 * rtti.c (get_base_offset): Use bit_position.
20351 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20352 host_integerp, and tree_low_cst.
20353 (pointer_int_sum): Use integer_zerop.
20354 (build_component_addr): Use bit_position.
20356 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20358 * typeck.c (require_complete_type): Don't assume size_zero_node.
20359 (complete_type_or_else): Likewise.
20361 2000-03-16 Steven Grady <grady@digitaldeck.com>
20362 Jason Merrill <jason@casey.cygnus.com>
20364 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20366 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20368 * decl2.c (grokfield): Bail out if type is error_mark_node.
20370 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20372 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20373 (__pointer_to_member_data): ... here. Adjust.
20374 * rtti.c (create_tinfo_types): Adjust.
20376 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20378 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20379 * decl.c (ref_desc_type_node): Undocument.
20380 * rtti.c (ptr_ref_initializer): Rename to ...
20381 (ptr_initializer): ... here. Adjust comments.
20382 (ptmd_initializer): Fix comment thinko.
20383 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20384 (create_tinfo_types): Remove ref_desc_type_node init.
20385 * tinfo2.cc (__reference_type_info): Remove.
20387 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20389 * decl.c (cp_finish_decl): Remove obsolete comment.
20391 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20393 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20395 * cp-tree.h: Tweak documentation.
20396 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20397 (avoid_overlap): Remove.
20398 (get_binfo_offset_as_int): New function.
20399 (dfs_serach_base_offsets): Likewise.
20400 (layout_nonempty_base_or_field): Likewise.
20401 (build_base_field): Layout fields here. Avoid placing two objects
20402 of the same type at the same address, under the new ABI.
20403 (build_base_fields): Adjust accordingly.
20404 (create_vtable_ptr): Return the new field, but don't attach it to
20406 (remove_base_field): Remove.
20407 (remove_base_fields): Remove.
20408 (layout_basetypes): Adjust accordingly.
20409 (layout_class_type): Call layout_field for each field, rather than
20410 just making a wholesale call to layout_type.
20412 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20414 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20416 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20418 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20420 * except.c (dtor_nothrow): New fn.
20421 (do_pop_exception): Use it. Take type parm.
20422 (push_eh_cleanup): Take type parm.
20423 (expand_start_catch_block): Pass it.
20424 (build_eh_type_type_ref): Accept null type.
20426 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20428 * cp-tree.h (revert_static_member_fn): Change prototype.
20429 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20430 (grok_op_properties): Likewise.
20431 (start_function): Likewise.
20432 (revert_static_member_fn): Simplify.
20433 * pt.c (check_explicit_specialization): Adjust call to
20434 revert_static_member_fn.
20436 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20438 * cp-tree.h (scope_kind): New type.
20439 (tmpl_spec_kind): Likewise.
20440 (declare_pseudo_global_level): Remove.
20441 (pseudo_global_level_p): Rename to template_parm_scope_p.
20442 (pushlevel): Remove declaration.
20443 (begin_scope): New function.
20444 (finish_scope): Likewise.
20445 (current_tmpl_spec_kind): Likewise.
20446 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20447 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20448 Add template_spec_p.
20449 (toplevel_bindings_p): Adjust.
20450 (declare_pseudo_global_level): Remove.
20451 (pseudo_global_level_p): Rename to template_parm_scope_p.
20452 (current_tmpl_spec_kind): New function.
20453 (begin_scope): Likewise.
20454 (finish_scope): Likewise.
20455 (maybe_push_to_top_level): Adjust.
20456 (maybe_process_template_type_declaration): Likewise.
20457 (pushtag): Likewise.
20458 (pushdecl_nonclass_level): Likewise.
20459 (lookup_tag): Likewise.
20460 (grokfndecl): Handle member template specializations. Share
20461 constructor and non-constructor code.
20462 * decl2.c (check_classfn): Handle member template specializations.
20463 * pt.c (begin_template_parm_list): Use begin_scope.
20464 (begin_specialization): Likewise.
20465 (end_specialization): Likewise.
20466 (check_explicit_specialization): Use current_tmpl_spec_kind.
20467 Handle member template specializations.
20468 (end_template_decl): Use finish_scope. Remove call to
20470 (push_template_decl_real): Remove bogus error message.
20471 (tsubst_decl): Fix typo in code contained in comment.
20472 (instantiate_template): Handle member template specializations.
20473 (most_general_template): Likewise.
20475 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20477 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20478 (do_identifier): Ditto for error().
20480 * pt.c (convert_nontype_argument): Ditto for cp_error().
20481 (convert_template_argument): Ditto for cp_pedwarn().
20483 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20485 * exception.cc (__check_null_eh_spec): New fn.
20486 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20488 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20490 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20491 * except.c (expand_end_eh_spec): Add the return type.
20492 * rtti.c (throw_bad_cast): Add the parmtypes.
20493 (throw_bad_typeid): Likewise.
20495 * semantics.c (expand_stmt): Only leave out rtl for unused
20496 artificials, and set DECL_IGNORED_P on them as well.
20497 * decl.c (wrapup_globals_for_namespace): Likewise.
20499 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20501 * decl.c (maybe_commonize_var): Skip all artificial decls.
20502 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20504 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20506 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20507 * cp-tree.h: Declare flag_enforce_eh_specs.
20508 * decl.c (store_parm_decls, finish_function): Check it.
20510 C library functions don't throw.
20511 * Makefile.in (cfns.h): New target.
20512 (except.o): Depend on it.
20513 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20514 * cfns.gperf: New file.
20515 * cfns.h: Generated.
20516 * except.c: Include it.
20517 (nothrow_libfn_p): New fn.
20518 * decl.c (grokfndecl): Use it.
20519 * cp-tree.h: Declare it.
20521 * decl.c (push_overloaded_decl_1, auto_function,
20522 define_function): Lose.
20523 (build_library_fn_1): New static fn.
20524 (builtin_function): Use it.
20525 (get_atexit_node): Use build_library_fn_ptr.
20526 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20527 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20528 push_void_library_fn, push_throw_library_fn): New fns.
20529 * cp-tree.h: Declare them.
20530 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20531 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20532 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20533 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20534 * rtti.c (build_runtime_decl): Lose.
20535 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20536 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20537 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20539 * call.c (build_call): Remove result_type parm.
20540 Call mark_used on unused artificial fns.
20541 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20543 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20545 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20547 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20548 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20549 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20550 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20551 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20552 expand_generic_desc): Likewise.
20554 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20556 * exception.cc (__cp_pop_exception): Cleanup the original object.
20558 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20560 * decl.c (grok_op_properties): Merge conversion to void warning
20561 with other silly op warnings.
20563 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20565 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20566 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20568 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20570 * decl.c (cp_make_fname_decl): New function.
20571 (wrapup_globals_for_namespace): Don't emit unused static vars.
20572 (init_decl_processing): Remove comment about use of
20573 array_domain_type. Set make_fname_decl.
20574 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20575 * semantics.c (begin_compound_stmt): Remove
20576 current_function_name_declared flagging.
20577 (expand_stmt): Don't emit unused local statics.
20578 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20581 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20583 * typeck.c (convert_for_assignment): Don't look at array
20585 * call.c (convert_like_real): Likewise.
20587 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20589 Add initial support for '\uNNNN' specifier.
20590 * lex.c (read_ucs): New fn.
20591 (readescape, skip_white_space): Call it.
20592 (is_extended_char, is_extended_char_1): New fns.
20593 (utf8_extend_token): New fn, #if 0'd out.
20594 (real_yylex): Treat extended chars like letters.
20596 * search.c (note_debug_info_needed): Walk the bases even if we
20597 weren't deferring the type itself.
20599 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20601 * decl2.c (finish_objects): Constify a char*.
20603 * method.c (emit_thunk): Likewise.
20605 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20607 * typeck.c (dubious_conversion_warnings): Look through
20610 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20612 * class.c (dfs_modify_vtables): I is now unsigned.
20613 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20614 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20615 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20616 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20617 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20618 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20619 Call integer_all_onesp.
20620 * typeck2.c (process_init_constructor): Use compare_tree_int.
20622 * lang-specs.h (as): Don't call if -syntax-only.
20624 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20626 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20627 RTL_EXPR_HAS_NO_SCOPE after all.
20629 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20631 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20632 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20633 RTL_EXPR_HAS_NO_SCOPE.
20635 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20638 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20640 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20642 * call.c (convert_like): Macrofy.
20643 (convert_like_with_context): New macro.
20644 (convert_like_real): Renamed from convert_like. Add calling
20645 context parameters, for diagnostics. Add recursive flag. Call
20646 dubious_conversion_warnings for outer conversion.
20647 (build_user_type_conversion): Use convert_like_with_context.
20648 (build_over_call): Likewise. Don't warn about dubious
20649 conversions here. Adjust convert_default_arg calls.
20650 (convert_default_arg): Add context parameters for diagnostics.
20651 Pass through to convert_like_with_context.
20652 * cp-tree.h (convert_default_arg): Add context parameters.
20653 (dubious_conversion_warnings): Prototype new function.
20654 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20655 (dubious_conversion_warnings): New function, broken
20656 out of convert_for_assignment.
20657 (convert_for_assignment): Adjust.
20659 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20661 * decl2.c (key_method): Break out from...
20662 (import_export_vtable, import_export_class): ...here.
20664 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20665 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20667 * search.c (note_debug_info_needed, dfs_debug_mark,
20668 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20669 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20671 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20673 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20676 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20678 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20679 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20680 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20681 (lang_type): Split gets_new into has_new and has_array_new.
20682 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20683 (TYPE_GETS_NEW): Split into ...
20684 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20685 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20686 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20687 (build_op_new_call): Don't declare.
20688 (build_new_1): Likewise.
20689 * call.c (build_op_new_call): Remove.
20690 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20691 instead of TYPE_NEEDS_DESTRUCTOR.
20692 (finish_struct_bits): Likewise.
20693 (add_implicitly_declared_members): Likewise.
20694 (check_field_decl): Likewise.
20695 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20696 correctly under the new ABI.
20697 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20698 instead of TYPE_NEEDS_DESTRUCTOR.
20699 (initialize_local_var): Likewise.
20700 (destroy_local_var): Likewise.
20701 (cp_finish_decl): Likewise.
20702 (register_dtor_fn): Likewise.
20703 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20704 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20705 TYPE_VEC_DELETE_TAKES_SIZE here.
20706 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20707 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20708 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20709 (finish_destructor_body): Likewise.
20710 (maybe_build_cleanup_1): Likewise.
20711 * decl2.c (do_static_destruction): Likewise.
20712 * init.c (build_new_1): Make it static.
20713 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20714 (expand_cleanup_for_base): Likewise.
20715 (get_cookie_size): New function.
20716 (build_new_1): Handle array-new cookies correctly under the new
20718 (build_vec_delete_1): Likewise.
20719 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20720 (build_delete): Likewise.
20721 (build_vec_delete): Handle array-new cookies correctly under the new
20723 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20724 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20725 TYPE_HAS_ARRAY_NEW_OPERATOR.
20726 * ptree.c (print_lang_type): Check them.
20727 * search.c (context_for_name_lookup): Fix typo in comment.
20728 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20729 * tree.c (break_out_cleanups): Likewise.
20730 (build_cplus_array_test_1): Likewise.
20731 (cp_build_qualified_type_real): Likewise.
20732 * typeck.c (complete_type): Likewise.
20734 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20735 the command-line, not the end.
20737 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20739 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20741 2000-03-02 Tom Tromey <tromey@cygnus.com>
20743 * cp-tree.h (build_java_class_ref): Declare.
20744 * init.c (build_java_class_ref): No longer static.
20745 * except.c (expand_throw): Generate a Java-style `throw' if the
20746 thrown object is a "Java" object.
20747 (initialize_handler_parm): Generate a Java-style lookup of
20748 exception info if the caught object is a "Java" object.
20749 (catch_language, catch_language_init): New globals.
20750 (decl_is_java_type): New function.
20751 (expand_start_catch_block): Don't call push_eh_info() or
20752 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20753 class reference to build_catch_block.
20755 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20757 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20759 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20761 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20762 to merge reference/pointer code and fix incorrect warnings.
20764 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20766 * search.c (protected_accessible_p): Use context_for_name_lookup.
20768 * init.c (construct_virtual_bases): Fix thinko.
20769 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20771 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20773 * decl.c (current_function_decl): Move to toplev.c.
20775 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20777 * pt.c (fn_type_unification): Unify return type, whenever
20779 (get_bindings_real): Only pass return type when necessary.
20780 Remove explicit return type check.
20781 * class.c (resolve_address_of_overloaded_function): Pass desired
20782 return type to fn_type_unification.
20784 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20786 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20788 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20790 * rtti.c (expand_class_desc): Likewise.
20791 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20792 (THUNK_VCALL_OFFSET): Likewise.
20793 (THUNK_DELTA): Reflect changes in ../tree.h.
20795 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20797 * search.c (protected_accessible_p): Also allow the access if
20798 the member is public in DERIVED. Lose TYPE parm.
20799 (friend_accessible_p): Lose TYPE parm.
20800 (accessible_p): Adjust.
20802 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20804 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20805 on things that are not sizes; ssize_binop deleted.
20806 Call size_diffop when appropriate.
20807 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20808 (build_primary_vtable, build_secondary_vtable): Likewise.
20809 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20810 Variable I is HOST_WIDE_INT.
20811 (get_vfield_offset): Pass proper types to size_binop.
20812 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20813 (finish_struct_1): Likewise.
20814 (skip_rtti_stuff): Arg N is now pointer to signed.
20815 (layout_class_type): Use size_zero_node.
20816 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20817 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20818 * decl.c (complete_arry_type): Pass proper types to size_binop.
20819 (xref_basetypes): BINFO_OFFSET is sizetype.
20820 * error.c (dump_expr): Don't use size_binop non-sizes.
20821 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20822 * init.c (construct_virtual_bases): Fix type error.
20823 (build_vec_delete_1): Pass proper type to size_binop and don't
20825 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20826 * rtti.c (get_base_offset): Pass proper type to size_binop.
20827 * search.c (dfs_find_vbases): Fix type error.
20828 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20829 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20830 * tree.c (debug_binfo): Variable N is signed.
20831 Use HOST_WIDE_INT_PRINT_DEC.
20832 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20833 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20834 size_one_node and size_zero_node.
20835 (c_alignof): Use size_one_node.
20836 (build_component_addr): Pass proper types to size_binop.
20837 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20839 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20841 Implement class scope using-declarations for functions.
20842 * class.c (handle_using_decl): Call add_method for used functions.
20843 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20844 (add_method): Used functions are hidden by local functions.
20845 (check_bases_and_members): Handle using-decls before finalizing
20846 CLASSTYPE_METHOD_VEC.
20847 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20848 override the type of 'this' accordingly.
20849 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20850 (convert_class_to_reference, build_user_type_conversion_1,
20851 build_new_function_call, build_object_call, build_new_op,
20852 build_new_method_call): Pass ctype parm.
20854 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20856 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20857 build_new_function_call, build_object_call, build_new_op,
20858 build_new_method_call, build_op_delete_call): Don't get basetype_path
20860 * typeck.c (build_component_ref): Likewise.
20861 * init.c (build_offset_ref): Likewise.
20862 (resolve_offset_ref): Don't call enforce_access.
20863 Call build_scoped_ref.
20864 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20865 would cause an error or if -pedantic.
20866 * class.c (alter_access): Lose binfo parm.
20868 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20870 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20873 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20875 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20876 pseudo_type_info creation into the std namespace
20878 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20880 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20881 (import_export_class): Remove declaration.
20882 * decl2.c (import_export_class): Make it static.
20883 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20884 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20885 EXPR_WITH_FILE_LOCATION.
20886 * lex.c (check_newline): Tweak filename/lineno setting.
20887 * semantics.c (begin_while_stmt): Fix typo in comment.
20889 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20891 * lang-options.h (-fmessage-length=): Add missing option.
20893 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20895 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20897 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20899 2000-02-25 Jim Wilson <wilson@cygnus.com>
20901 * optimize.c (expand_call_inline): Emit the return label before
20902 evaluating the return value.
20904 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20906 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20907 than duplicating functionality here.
20908 * optimize.c: Include input.h.
20909 (expand_call_inline): Use push_srcloc and pop_srcloc.
20910 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20911 * parse.c: Regenerated.
20912 * Makefile.in (lex.o): Depend on input.h.
20913 (optimize.o): Likewise.
20915 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20917 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20918 function type, rather than ICE.
20920 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20922 * decl.c (grokdeclarator): Call decl_type_access_control.
20923 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20926 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20928 * decl.c (decls_match): Remove obsolete static member nadgering.
20930 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20932 * decl.c (grokdeclarator): Change ANSI to ISO.
20933 * lex.c (consume_string, readescape, do_identifier): Likewise.
20934 (parse_float, real_yylex): Likewise.
20935 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20936 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20937 new_type_id, maybe_label_decls, simple_stmt,
20938 for.init.statement): Likewise.
20939 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20940 * semantics.c (finish_named_return_value): Likewise.
20941 * parse.c: Regenerate.
20943 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20945 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20946 (CPTI_CLASS_STAR_TYPE): Remove.
20947 (vtable_index_type): Likewise.
20948 (class_star_type_node): Remove.
20949 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20950 (build_binary_op_nodefault): Remove.
20951 * call.c (build_new_op): Use build_binary_op instead of
20952 build_binary_op_nodefault.
20953 * decl.c (init_decl_processing): Remove class_star_type_node
20954 initialization. Make delta_type_node ptrdiff_type_node under the
20955 new ABI. Initialize vtable_index_type.
20956 (build_ptrmemfunc_type): Build different structures for the new
20958 (build_enumerator): Use build_binary_op instead of
20959 build_binary_op_nodefault.
20960 * method.c (build_overload_value): Mangle pointers-to-members
20961 appropriately under the new ABI.
20962 * typeck.c (build_array_ref): Use build_binary_op instead of
20963 build_binary_op_nodefault.
20964 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20965 (build_binary_op_nodefault): Rename to ...
20966 (build_binary_op): ... this. Remove old version. Adjust for
20967 pointer-to-member comparisons under the new ABI.
20968 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20969 (build_ptrmemfunc): Adjust for the new ABI.
20970 (expand_ptrmemfunc_cst): Likewise.
20971 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20972 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20974 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20976 * call.c (build_object_call): Compress consecutive calls to
20978 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20979 (build_op_delete_call): Adjust message formatting.
20981 * class.c (check_bases): Compress consecutive calls to
20983 (finish_struct_anon): Say 'ISO C++'.
20985 * decl.c (start_decl): Same here.
20986 (grok_reference_init): Likewise.
20987 (grokfndecl): Correct message formatting.
20988 (grokfndecl): Improve diagnostic.
20989 (check_static_variable_definition): Likewise. Say 'ISO C++'
20990 (compute_array_index_type): Say 'ISO C++'
20991 (create_array_type_for_decl): Compress consecutive calls to
20993 (grokdeclarator): Say 'ISO C++'
20994 (grok_op_properties): Likewise.
20996 * decl2.c (delete_sanity): Clairify diagnostic.
20997 (check_member_template): Same here.
20998 (grok_function_init): Use consistent terminology.
21000 * expr.c (do_case): Say 'ISO C++'
21002 * friend.c (do_friend): Compress consecutive calls to warning.
21004 2000-02-20 Mark Mitchell <mark@codesourcery.com>
21006 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
21007 * class.c (build_secondary_vtable): Reorganize. Don't create a
21008 new vtable under the new ABI.
21009 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
21010 computing the size.
21011 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
21012 the initializing elements.
21013 (initialize_vtable): New function.
21014 (dfs_finish_vtbls): Use it.
21015 (dfs_accumulate_vtbl_inits): New function.
21016 (finish_vtbls): Merge primary and secondary vtables under the new
21018 (finish_struct_1): Remove redundant call to layout_vtable_decl.
21019 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
21022 * class.c (build_vtable): New function, split out from ...
21023 (get_vtable_decl): ... here, and ...
21024 (build_secondary_vtable): ... here.
21026 * pt.c (tsubst_decl): Fix formatting.
21028 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
21030 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
21031 (avoid_overlap, build_base_field): Likewise.
21032 (build_base_field, build_base_fields, is_empty_class):
21033 Test DECL_SIZE with integer_zero.
21034 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
21035 * cp-tree.h (struct lang_type): New field size_unit.
21036 (CLASSTYPE_SIZE_UNIT): New macro.
21037 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
21038 (cp_finish_decl): Delete -Wlarger-than processing.
21039 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
21040 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
21041 * tree.c (make_binfo): binfo vector is one entry longer.
21042 (walk_tree): Walk DECL_SIZE_UNIT.
21044 2000-02-19 Mark Mitchell <mark@codesourcery.com>
21046 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
21048 (build_vtable_entry): Don't assume all vtable entries are
21050 (build_vtbl_initializer): Adjust accordingly.
21051 (get_vtable_decl): Fix formatting.
21053 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
21055 * semantics.c (deferred_type_access_control): Walk the entire
21057 (save_type_access_control): Rename from
21058 initial_deferred_type_access_control. Just remember the value.
21059 (decl_type_access_control): New fn.
21060 (begin_function_definition): Use deferred_type_access_control, after
21061 we've started the function. Set type_lookups to error_mark_node.
21062 * parse.y (frob_specs, fn.def1): Adjust.
21063 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
21064 (parse_end_decl, parse_bitfield0, parse_method): New fns.
21065 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
21066 (after_type_component_declarator0): Likewise.
21067 (after_type_component_declarator): Likewise.
21068 (notype_component_declarator): Likewise.
21069 * cp-tree.h: Adjust.
21071 * decl.c (redeclaration_error_message): Allow redeclaration of
21072 namespace-scope decls.
21074 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
21076 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
21078 2000-02-17 Mark Mitchell <mark@codesourcery.com>
21080 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21081 * decl2.c (grokclassfn): Likewise.
21083 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21085 * decl2.c (lang_decode_option): Don't set default message length
21087 * lex.c (lang_init_options): Set it here.
21089 2000-02-16 Mark Mitchell <mark@codesourcery.com>
21091 Make DECL_CONTEXT mean the class in which a member function was
21092 declared, even for a virtual function.
21093 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21094 (DECL_FRIEND_CONTEXT): New macro.
21095 (DECL_REAL_CONTEXT): Remove.
21096 (SET_DECL_FRIEND_CONTEXT): Likewise.
21097 (DECL_VIRTUAL_CONTEXT): Adjust.
21098 (DECL_CLASS_SCOPE_P): Use TYPE_P.
21099 (add_friends): Remove.
21100 (hack_decl_function_context): Likewise.
21101 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21103 (build_over_call): Fix indentation. Use DECL_CONTEXT
21104 instead of DECL_CLASS_CONTEXT.
21105 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21106 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21107 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21108 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21109 (build_base_field): Likewise.
21110 (finish_struct_1): Likewise.
21111 (build_self_reference): Likewise.
21112 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21114 (pushtag): Use decl_function_context, not
21115 hack_decl_function_context.
21116 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21117 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21118 (pushdecl): Remove bogus code.
21119 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21120 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21121 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21122 Use decl_function_context, nothack_decl_function_context.
21123 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21124 (grokdeclarator): Likewise. Use decl_function_context, not
21125 hack_decl_function_context.
21126 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
21127 (start_function): Use DECL_FRIEND_CONTEXT, not
21128 DECL_CLASS_CONTEXT. Use decl_function_context, not
21129 hack_decl_function_context.
21130 (finish_function): Use decl_function_context, not
21131 hack_decl_function_context.
21132 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21133 DECL_CLASS_CONTEXT.
21134 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21135 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21136 (grokfield): Likewise.
21137 (finish_builtin_type): Likewise.
21138 (finish_vtable_vardec): Use decl_function_context, not
21139 hack_decl_function_context.
21140 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21141 (start_static_initialization_or_destruction): Likewise.
21142 (finish_static_initialization_or_destruction): Likewise.
21143 (mark_used): Adjust logic for deciding when to synthesize methods.
21144 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21146 * error.c (dump_function_decl): Use DECL_CONTEXT, not
21147 DECL_CLASS_CONTEXT.
21148 * friend.c (is_friend): Likewise.
21149 (add_friends): Remove.
21150 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21151 * lex.c (begin_definition_of_inclass_inline): Use
21152 decl_function_context, not hack_decl_function_context.
21153 (process_next_inline): Likewise.
21154 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21155 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21156 DECL_CLASSS_CONTEXT.
21157 (hack_identifier): Likewise.
21158 (synthesize_method): Use decl_function_context, not
21159 hack_decl_function_context.
21160 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21162 (is_member_template): Use decl_function_context, not
21163 hack_decl_function_context. Use DECL_CONTEXT, not
21164 DECL_CLASS_CONTEXT.
21165 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21166 DECL_CLASS_CONTEXT.
21167 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21169 (push_template_decl_real): Likewise.
21170 (instantiate_class_template): Don't call add_friends.
21171 (tsubst_default_argument): Use DECL_CONTEXT, not
21173 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21174 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21175 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21176 DECL_CLASS_CONTEXT.
21177 * repo.c (repo_inline_used): Likewise.
21178 * search.c (current_scope): Adjust for new _CONTEXT macros.
21179 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21181 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21182 (lookup_fnfields_here):Likewise.
21183 (check_final_overrider): Likewise.
21184 (init_vbase_pointers): Likewise.
21185 (virtual_context): Likewise.
21186 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21187 (expand_body): Use decl_function_context, not
21188 hack_decl_function_context.
21189 * tree.c (hack_decl_function_context): Remove.
21190 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21191 DECL_CLASS_CONTEXT.
21192 * typeck2.c (error_not_base_type): Likewise.
21194 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21196 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21198 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21200 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21202 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21204 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21206 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21208 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21210 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21212 * parse.y (frob_specs): Split out...
21213 (parse_decl): From here.
21214 (fn.def2): Call initial_deferred_type_access_control.
21215 (after_type_component_declarator0): Call frob_specs.
21216 (notype_component_declarator0): Likewise.
21217 * search.c (friend_accessible_p): Nested classes are friends of their
21220 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21222 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21223 used to create an implicit temporary.
21225 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21228 2000-02-08 Nathan Sidwell <nathan@acm.org>
21230 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21231 strip array element qualifiers too.
21233 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21235 * decl.c (store_parm_decls): Don't build cleanups for parameters
21236 while processing_template_decl.
21238 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21240 * cp-tree.h (struct saved_scope): Add incomplete field.
21241 (namespace_scope_incomplete): New macro.
21242 * decl.c (pushdecl): Use it.
21243 (hack_incomplete_structures): Use it. See through artificial
21245 (mark_saved_scope): Mark it.
21247 Implement access control for nested types.
21248 * search.c (type_access_control): New fn.
21249 (accessible_p): Now we do perform access control for types.
21250 * semantics.c (deferred_type_access_control): New fn.
21251 (initial_deferred_type_access_control): New fn.
21252 (begin_function_definition): Call it. Add lookups parm.
21253 * decl.c (struct binding_level): Add this_class field.
21254 (pushlevel_class): Set it.
21255 (mark_binding_level): Mark it.
21256 (lookup_name_real): Use it. Call type_access_control.
21257 (mark_saved_scope): Mark lookups field.
21258 * cp-tree.h (flagged_type_tree): Add lookups field.
21259 (struct saved_scope): Add lookups field.
21260 (type_lookups): New macro.
21261 * parse.y (declmods): Now <ftype>.
21262 (parse_decl): Add lookups parm. Call
21263 initial_deferred_type_access_control.
21264 (lang_extdef): Clear type_lookups.
21265 (typed_declspecs, declmods, typespec): Set lookups field.
21266 (initdcl): Call deferred_type_access_control.
21267 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21268 component_decl_1, named_parm): Adjust.
21269 * friend.c (is_friend): Nested classes are friends of their
21272 * class.c (currently_open_derived_class): New fn.
21273 * method.c (hack_identifier): Use it.
21275 * lex.c (do_identifier): Remove obsolete code.
21277 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21279 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21281 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21282 thinks this file is plain C).
21284 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21286 * Makefile.in (call.o): Depend on $(EXPR_H).
21288 * call.c: Include "expr.h".
21290 * class.c (dump_class_hierarchy): Add prototype.
21292 * search.c (dfs_get_pure_virtuals): Likewise.
21294 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21296 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21297 * parse.c: Rebuilt.
21299 2000-01-31 Jim Wilson <wilson@cygnus.com>
21301 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21302 Store it in DECL_FCONTEXT.
21303 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21305 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21307 * tinfo.h (old abi): #include "tconfig.h".
21308 * tinfo.cc (convert_to_base): Move into old abi section.
21310 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21312 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21313 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21314 (BINFO_PRIMARY_BINFO): New macro.
21315 (BF_DELTA): Rename to ...
21316 (BV_DELTA): ... this.
21317 (BF_VCALL_INDEX): Rename to ...
21318 (BV_VCALL_INDEX): ... this.
21319 (BF_FN): Rename to ...
21321 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21322 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21323 (modify_vtable_entry): Simplify.
21324 (add_virtual_function): Rename BF_ macros to BV_ variants.
21325 (build_vtable_initializer): Likewise.
21326 (get_class_offset_1): Remove.
21327 (dfs_get_class_offset): Likewise.
21328 (get_class_offset): Likewise.
21329 (dfs_find_final_overrider): New function.
21330 (find_final_overrider): Likewise.
21331 (modify_one_vtable): Remove.
21332 (dfs_find_base): New function.
21333 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21334 find_final_overrider.
21335 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21337 (dfs_fixup_vtable_deltas): Remove.
21338 (override_one_vtable): Remove.
21339 (merge_overrides): Likewise.
21340 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21341 unreal chilren of virtual bases.
21342 (finish_struct_1): Don't use merge_overrides. Don't use
21343 dfs_fixup_vtable_deltas.
21344 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21347 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21348 Jason Merrill <jason@yorick.cygnus.com>
21350 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21352 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21354 * exception.cc (__throw_bad_typeid): Add missing std::.
21356 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21358 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21360 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21362 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21364 Runtime support for new-abi rtti.
21365 * inc/typeinfo (type_info::operator!=): Define in class.
21366 (type_info::before, type_info::name, type_info::operator==,
21367 type_info::operator!=): Define new ABI implementations.
21368 (type_info::is_pointer_p, type_info::is_function_p): Declare
21369 new virtual functions.
21370 (type_info::do_catch, type_info::do_upcast): Likewise.
21372 * tinfo.h (__base_class_info): Define new class.
21373 (__class_type_info): Likewise.
21374 (__si_class_type_info): Likewise.
21375 (__vmi_class_type_info): Likewise.
21376 (__dynamic_cast): Prototype.
21378 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21379 (type_info::is_pointer_p): Define new function.
21380 (type_info::is_function_p): Likewise.
21381 (type_info::do_catch): Likewise.
21382 (type_info::do_upcast): Likewise.
21383 (vtable_prefix): New structure for vtable access.
21384 (adjust_pointer): Define new template function.
21385 (contained_p, public_p, virtual_p, contained_public_p,
21386 contained_nonpublic_p, contained_nonvirtual_p): Define new
21388 (nonvirtual_base_type): New local variable.
21389 (__class_type_info::~__class_type_info): Define.
21390 (__si_class_type_info::~__si_class_type_info): Likewise.
21391 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21392 (__class_type_info::do_catch): Define new function.
21393 (__class_type_info::do_upcast): Likewise.
21394 (__class_type_info::find_public_src): Likewise.
21395 (__class_type_info::do_find_public_src): Likewise.
21396 (__si_class_type_info::do_find_public_src): Likewise.
21397 (__vmi_class_type_info::do_find_public_src): Likewise.
21398 (__class_type_info::do_dyncast): Likewise.
21399 (__si_class_type_info::do_dyncast): Likewise.
21400 (__vmi_class_type_info::do_dyncast): Likewise.
21401 (__class_type_info::do_upcast): Likewise.
21402 (__si_class_type_info::do_upcast): Likewise.
21403 (__vmi_class_type_info::do_upcast): Likewise.
21404 (__dynamic_cast): Likewise.
21406 * tinfo2.cc (__fundamental_type_info): Define new class.
21407 (__pointer_type_info): Likewise.
21408 (__reference_type_info): Likewise.
21409 (__array_type_info): Likewise.
21410 (__function_type_info): Likewise.
21411 (__enum_type_info): Likewise.
21412 (__ptr_to_member_type_info): Likewise.
21413 (__fundamental_type_info::~__fundamental_type_info): Define.
21414 (__pointer_type_info::~__pointer_type_info): Likewise.
21415 (__reference_type_info::~__reference_type_info): Likewise.
21416 (__array_type_info::~__array_type_info): Likewise.
21417 (__function_type_info::~__function_type_info): Likewise.
21418 (__enum_type_info::~__enum_type_info): Likewise.
21419 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21420 (__pointer_type_info::do_catch): Define new function.
21421 (__ptr_to_member_type_info::do_catch): Define new function.
21423 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21424 (__is_pointer): Likewise.
21426 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21428 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21430 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21431 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21432 (make_new_vtable): New function.
21433 (modify_vtable_entry): Handle generation of new vtables correctly.
21434 (modify_one_vtable): Remove unused parameter.
21435 (dfs_fixup_vtable_deltas): Likewise.
21436 (override_one_vtable): Use build_secondary_vtable.
21437 (finish_struct_1): Use build_primary_vtable and
21438 build_secondary_vtable.
21440 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21442 * cp/decl.c: Adjust variable names, comments, help strings.
21444 2000-01-29 Nathan Sidwell <nathan@acm.org>
21446 * new2.cc (operator delete[]): Use operator delete, don't assume
21449 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21451 * class.c (build_vtbl_initializer): Add argument to
21452 build_vtable_entry call.
21454 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21456 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21457 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21458 (BF_DELTA): New macro.
21459 (BF_VCALL_INDEX): Likewise.
21461 (THUNK_VCALL_OFFSET): Likewise.
21462 (make_thunk): Change prototype.
21463 * class.c (build_vtable_entry): Integrate
21464 build_vtable_entry_for_fn. Handle vcall indices.
21465 (build_vtable_entry_for_fn): Remove.
21466 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21467 BF_VCALL_INDEX, BF_FN.
21468 (modify_vtable_entry): Integrate common code from
21469 modify_one_vtable and dfs_fixup_vtable_deltas.
21470 (add_virtual_function): Set BF_VCALL_INDEX.
21471 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21473 (modify_one_vtable): Simplify.
21474 (dfs_fixup_vtable_deltas): Likewise.
21475 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21476 * method.c (make_thunk): Handle vcall indices.
21478 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21480 Compiler side new abi rtti (not enabled).
21481 * cp-tree.h (new_abi_rtti_p): New macro.
21482 (emit_support_tinfos): Prototype new function.
21483 (tinfo_decl_p): Likewise.
21484 (emit_tinfo_decl): Likwise.
21485 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21487 (doing_runtime): New local static.
21488 (init_rtti_processing): Add new-abi initializer.
21489 (get_tinfo_decl): Add new-abi logic.
21490 (tinfo_from_decl): Likewise.
21491 (build_dynamic_cast_1): Likewise.
21492 (qualifier_flags): New static function.
21493 (tinfo_base_init): Likewise.
21494 (generic_initializer): Likewise.
21495 (ptr_ref_initializer): Likewise.
21496 (ptmd_initializer): Likewise.
21497 (class_hint_flags): Likewise.
21498 (class_initializer): Likewise.
21499 (synthesize_tinfo_var): Likewise.
21500 (create_real_tinfo_var): Likewise.
21501 (create_pseudo_type_info): Likewise.
21502 (get_vmi_pseudo_type_info): Likewise.
21503 (create_tinfo_types): Likewise.
21504 (emit_support_tinfos): New global function.
21505 (tinfo_decl_p): New global predicate.
21506 (emit_tinfo_decl): New global function.
21507 * class.c (set_rtti_entry): Generalize for old and new rtti.
21508 (build_vtbl_initializer): Likewise.
21509 * decl2.c (finish_file): Likewise.
21511 2000-01-27 Jim Wilson <wilson@cygnus.com>
21513 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21514 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21516 2000-01-27 Mike Stump <mrs@wrs.com>
21518 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21521 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21523 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21525 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21527 * optimize.c (calls_setjmp_r): Supply new argument
21528 to special_function_p.
21530 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21532 * call.c: PROTO -> PARAMS.
21533 * class.c: Likewise.
21534 * cp-tree.h: Likewise.
21536 * decl.c: Likewise.
21537 * decl.h: Likewise.
21538 * decl2.c: Likewise.
21539 * dump.c: Likewise.
21540 * errfn.c: Likewise.
21541 * error.c: Likewise.
21542 * except.c: Likewise.
21543 * expr.c: Likewise.
21544 * init.c: Likewise.
21545 * input.c: Likewise.
21548 * method.c: Likewise.
21549 * optimize.c: Likewise.
21550 * parse.y: Likewise.
21552 * repo.c: Likewise.
21553 * rtti.c: Likewise.
21554 * search.c: Likewise.
21555 * semantics.c: Likewise.
21556 * spew.c: Likewise.
21557 * tree.c: Likewise.
21558 * typeck.c: Likewise.
21559 * typeck2.c: Likewise.
21560 * xref.c: Likewise.
21562 2000-01-25 Richard Henderson <rth@cygnus.com>
21564 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21566 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21568 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21569 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21570 (struct vcall_offset_data_s): New type.
21571 (dfs_vcall_offset_queue_p): New function.
21572 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21573 (build_vcall_offset_vtbl_entries): Likewise.
21574 (layout_vtable_decl): Likewise.
21575 (num_vfun_entries): Likewise.
21576 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21577 (build_vtbl_initializer): Likewise.
21578 (dfs_finish_vtabls): Use layout_vtable_decl.
21579 (modify_one_vtables): Always duplicate vtables under the new ABI.
21580 (finish_struct_1): Use layout_vtable_decl.
21582 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21584 * decl.c (member_function_or_else): Change third arg from a format
21585 specifier to an `enum overload_flags'. Callers changed.
21587 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21589 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21590 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21591 build_const_cast, get_delta_difference, check_return_expr): Avoid
21592 ANSI string concatenation usage.
21594 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21596 * class.c (layout_class_type): Put the fields required to make a
21597 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21600 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21602 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21605 * decl2.c (mark_used): Do instantiate inlines that have been
21606 explicitly instantiated.
21608 2000-01-24 Richard Henderson <rth@cygnus.com>
21610 * call.c (build_over_call): Use expand_tree_builtin.
21611 * typeck.c (build_function_call_real): Likewise.
21612 (build_binary_op_nodefault): Handle unordered compares.
21614 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21616 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21617 cp_tree_index values.
21618 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21619 New global node #defines for them.
21620 * rtti.c (call_void_fn): Replace with ...
21621 (build_runtime_decl): ... new static function.
21622 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21623 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21624 (build_dynamic_cast_1): Always produce correctly typed result.
21625 Explicitly produce type_info addresses. Use dynamic_cast_node.
21626 * exception.cc (__throw_bad_cast): Return `void *'.
21627 (__throw_bad_typeid): Return `const type_info &'.
21629 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21631 * cp-tree.h (get_vtable_decl): Prototype new function.
21632 * class.c (get_vtable_decl): New function. Broken out from ...
21633 (build_vtable): ... here. Use it.
21634 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21635 by get_vtable_decl.
21637 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21639 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21640 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21641 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21642 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21643 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21644 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21645 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21646 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21647 (CPTI_TINFO_VAR_ID): New enumeration.
21648 (__tp_desc_type_node, __access_mode_type_node,
21649 __bltn_desc_type_node, __user_desc_type_node,
21650 __class_desc_type_node, __ptr_desc_type_node,
21651 __attr_desc_type_node, __func_desc_type_node,
21652 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21653 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21654 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21655 enum_desc_type_node, class_desc_type_node,
21656 si_class_desc_type_node, vmi_class_desc_type_node,
21657 ptmd_desc_type_node, base_desc_type_node): New #defines.
21658 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21659 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21660 (tinfo_var_id): New enumeration.
21661 (DECL_TINFO_FN_P): Augment comment.
21662 * decl.c (cp_global_trees): Adjust documentation.
21663 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21664 tinfo_decl_type and tinfo_var_id.
21665 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21666 (build_typeid): Remove unused variable.
21667 (get_tinfo_var): Use tinfo_var_id.
21668 (tinfo_name): New static function.
21669 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21670 (tinfo_from_decl): Likewise.
21671 (get_base_offset): New static function, broken out of
21673 (expand_si_desc): Use tinfo_name.
21674 (expand_class_desc): Likewise. Lose local static variable.
21675 Use base_desc_type_node. Use get_base_offset.
21676 (expand_ptr_desc): Use tinfo_name.
21677 (expand_attr_desc): Likewise.
21678 (expand_generic_desc): Likewise.
21680 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21681 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21683 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21685 * cp-tree.h (__eprintf): Remove declaration.
21686 * tree.c (__eprintf): Remove definition.
21688 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21689 Mark Mitchell <mark@codesourcery.com>
21691 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21692 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21694 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21696 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21698 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21700 * cp-tree.h (register_dtor_fn): New function.
21701 * decl.c (destroy_local_static): Rename to ...
21702 (register_dtor_fn): ... this. Give it external linkage.
21703 (expand_static_init): Use it.
21704 * decl2.c (do_static_initialization): Likewise, if using
21706 (do_static_destruction): Check that __cxa_atexit is not in use.
21707 (finish_file): Don't call do_static_destruction if using
21710 * typeck.c (convert_arguments): Restore two-message error
21713 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21715 Remap dynamic cast hint values to be consistent across ABIs.
21716 * search.c (dynamic_cast_base_recurse): Remap generated value.
21717 (get_dynamic_cast_base_type): Adjust documentation.
21718 * tinfo.h (__user_type_info::dyncast): Likewise.
21719 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21720 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21721 (__class_type_info::do_dyncast): Likewise.
21722 (__class_type_info::do_find_public_subobj): Likewise.
21723 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21725 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21727 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21729 * typeck2.c (incomplete_type_error): Restore previous
21730 cp_error and cp_error_at call sequence.
21732 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21734 * class.c (dump_class_hierarchy): Make format agree with argument;
21735 cast pointer to unsigned long and print with %lx.
21737 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21739 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21741 * typeck.c (composite_pointer_type, common_type,
21742 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21743 build_function_call_real, convert_arguments,
21744 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21745 build_unary_op, mark_addressable, build_compound_expr,
21746 build_static_cast, build_reinterpret_cast, build_const_cast,
21747 build_c_cast, build_modify_expr, get_delta_difference,
21748 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21749 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21751 * typeck2.c (readonly_error, abstract_virtuals_error,
21752 process_init_constructor, check_for_new_type): Likewise.
21754 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21756 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21759 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21761 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21762 (build_x_typeid): Likewise.
21763 (get_tinfo_fn): Likewise.
21764 (get_tinfo_fn_unused): Rename to ...
21765 (get_tinfo_decl): ... here.
21766 * rtti.c (build_headof): Replace logic error with assertion.
21767 (get_tinfo_fn_dynamic): Rename to ...
21768 (get_tinfo_decl_dynamic): ... here. Make static. Use
21769 complete_type_or_else.
21770 (build_x_typeid): Move into ...
21771 (build_typeid): ... here. Adjust call to
21772 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21773 throw_bad_typeid expression.
21774 (get_tinfo_fn_unused): Rename to ...
21775 (get_tinfo_decl): ... here. Adjust comment.
21776 (get_tinfo_fn): Delete.
21777 (tinfo_from_decl): New static function.
21778 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21779 (get_typeid): Use complete_type_or_else.
21780 (build_dynamic_cast_1): Adjust calls to
21781 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21782 * parse.y (primary): Adjust call to build_typeid.
21783 * except.c (build_eh_type_type_ref): Adjust call to
21784 get_tinfo_decl. Mark as used.
21785 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21786 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21787 * parse.c: Regenerated.
21789 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21791 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21792 calling convention.
21793 (resolves_to_fixed_type_p): Document calling convention.
21794 * rtti.c (build_x_typeid): Initialize NONNULL.
21796 * cp-tree.h (build_shared_int_cst): New function.
21797 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21798 * class.c (modify_vtable_entry): Likewise.
21799 (add_virtual_function): Split out code to generated shared
21800 INTEGER_CSTs to build_share_int_cst.
21801 (modify_all_vtables): Handle all the overridden functions here.
21802 Add overridden functions from non-primary virtual bases to the
21804 (finish_struct_1): Adjust call to modify_all_vtables. Add
21805 overridden functions from non-primary bases to the vtable.
21806 * tree.c (build_shared_int_cst): New function.
21808 * cp-tree.h (scratchalloc): Remove.
21809 (build_scratch_list): Likewise.
21810 * call.c (convert_class_to_reference): Replace build_scratch_list
21811 and build_expr_list with build_tree_list.
21812 (add_candidate): Replace scratchalloc with expralloc. Note memory
21814 (build_user_type_conversion_1): Replace build_scratch_list
21815 and build_expr_list with build_tree_list.
21816 (build_new_op): Likewise.
21817 (build_op_delete_call): Likewise.
21818 (convert_like): Likewise.
21819 * cvt.c (ocp_convert): Likewise.
21820 * decl.c (start_decl): Likewise.
21821 (start_function): Likewise.
21822 (finish_destructor_body): Likewise.
21823 (maybe_build_cleanup_1): Likewise.
21824 * decl2.c (reparse_decl_as_expr): Likewise.
21825 * init.c (perform_member_init): Likewise.
21826 (expand_cleanup_for_base): Likewise.
21827 (build_builtin_delete_call): Likewise.
21828 (build_new_1): Likewise.
21829 (build_delete): Likewise.
21830 * method.c (do_build_assign_ref): Likewise.
21831 * parse.y (already_scoped_stmt): Likewise.
21832 (nontrivial_exprlist): Likewise.
21833 (net_initializer): Likewise.
21834 (initlist): Likewise.
21835 * parse.c: Regenerated.
21836 * rtti.c (build_x_typeid): Likewise.
21837 (build_dynamic_cast_1): Likewise.
21838 * typeck.c (build_x_compound_expr): Likewise.
21839 (build_static_cast): Likewise.
21840 (build_modify_expr): Likewise.
21842 * cp-tree.h (DECL_VINDEX): Add documentation.
21843 * class.c (build_vtable_entry): Likewise.
21844 (start_vtable): Add comment.
21845 (add_virtual_function): Replace pending_hard_virtuals with
21846 overridden_virtuals and pending_virtuals with new_virtuals.
21847 Replace redundant assignments with assertions.
21848 (check_for_override): Add comment.
21849 (check_bases_and_members): Replace pending_hard_virtuals with
21850 overridden_virtuals and pending_virtuals with new_virtuals.
21851 (create_vtbl_ptr): Likewise.
21852 (layout_class_type): Likewise.
21853 (finish_struct_1): Likewise. Add comments.
21855 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21857 * class.c (finish_struct_1): Replace redundant code with
21860 * cp-tree.h (flag_new_abi): Move.
21861 (flag_use_cxa_atexit): Likewise.
21862 (flag_honor_std): Likewise.
21863 (flag_rtti): Likewise.
21864 (vbase_offsets_in_vtable_p): Define.
21865 (vptrs_present_everywhere_p): Likewise.
21866 (TYPE_CONTAINS_VPTR_P): Likewise.
21867 (dfs_walk_real): Declare.
21868 * class.c (build_vbase_pointer_fields): Check
21869 vbase_offsets_in_vtable_p.
21870 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21872 (build_vbase_offset_vtbl_entries): Simplify.
21873 (build_vbase_offset_vtbl_entries): Adjust.
21874 (build_vbase_pointer): Add ability to look up vbase offsets in
21876 (start_vtable): New function.
21877 (add_virtual_function): Use it.
21878 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21879 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21880 (build_vtbl_initializer): Take the type of the complete object as
21881 input. Use it to correctly calculate vbase offsets.
21882 (dfs_finish_vtbls): Pass the complete type to
21883 build_vtbl_initializer.
21884 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21885 (create_vtable_ptr): Create a vtable even if there are no
21886 new virtual functions, under the new ABI.
21887 (finish_struct_1): Likewise.
21888 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21889 * decl.c (exapnd_static_init): Remove call to
21890 preserve_initializer.
21891 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21893 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21894 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21895 (construct_virtual_bases): Don't initialize virtual base pointers
21897 (build_aggr_init): Clean up comment.
21898 (expand_aggr_init_1): Likewise.
21899 * rtti.c (expand_class_desc): Store the virtual function table
21900 index where the vbase offset lives in the offset field.
21901 * search.c (dfs_walk_real): Make it global.
21902 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21903 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21905 * tinfo.h (USItype): Make it signed under the new ABI.
21906 * tinfo.cc (convert_to_base): New function. Encapsulate base
21907 conversion logic here.
21908 (__class_type_info::do_upcast): Use it.
21909 (__class_type_info::do_dyncast): Likewise.
21910 (__class_type_info::do_find_public_subobj): Likewise.
21912 * init.c (construct_virtual_bases): Don't look up the addresses of
21913 virtual bases at run-time.
21915 * class.c (build_vbase_pointer): Relocate.
21916 (build_vbase_pointer_fields): Likewise.
21917 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21918 (build_vbase_offset_vtbl_entries): Likewise.
21920 * decl.c (init_decl_processing): Complain if -fnew-abi
21921 -fno-vtable-thunks is used.
21923 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21926 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21928 * cp-tree.h (num_extra_vtbl_entries): New function.
21929 (size_extra_vtbl_entries): Likewise.
21930 (dfs_vtable_path_unmark): Likewise.
21931 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21932 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21933 * class.c (num_extra_vtbl_entries): New function.
21934 (size_extra_vtbl_entries): Likewise.
21935 (dfs_build_vbase_offset_vtbl_entries): New function.
21936 (build_vbase_offset_vtbl_entries): Likewise.
21937 (build_vtbl_initializer): Use it.
21938 (finish_struct_1): Adjust vtable sizes (using
21939 num_extra_vtbl_entries).
21940 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21941 THUNK_DECL is non-NULL before expanding it.
21942 * init.c (expand_virtual_init): Adjust the vtable pointer by
21943 size_extra_vtbl_entries before storing it.
21944 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21945 Handle TREE_LIST parameters here, not in the dfs_* functions.
21946 (dfs_unmarked_real_bases_queue_p): Adjust.
21947 (dfs_marked_real_bases_queue_p): Likewise.
21948 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21949 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21950 (dfs_vtable_path_unmark): Likewise.
21952 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21954 * optimize.c (copy_body_r): Clear the operand three of a
21955 TARGET_EXPR when copying it.
21957 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21959 * method.c (build_decl_overload_real): Check whether we are in ::
21960 before returning __builtin_new/delete.
21962 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21964 * pt.c (tsubst_friend_function): Improve comment.
21965 (instantiate_decl): Avoid crashing when a "nested" function is
21966 instantiated from the top level.
21968 * dump.c (dqeueue_and_dump): Dump
21969 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21971 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21973 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21975 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21977 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21978 ENABLE_NEW_GXX_ABI defined.
21979 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21980 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21981 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21983 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21985 * decl.c (start_cleanup_fn): Call pushdecl.
21987 * call.c (convert_class_to_reference): Fix typos.
21988 (build_conditional_expr): Handle errors gracefully.
21989 * class.c (push_nested_class): Likewise.
21990 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21991 (DECL_THIS_EXTERN): Use it.
21992 (DECL_THIS_STATIC): Likewise.
21993 * cvt.c (convert_to_void): Handle errors gracefully.
21994 (build_expr_type_conversion): Likewise.
21995 * decl.c (maybe_push_decl): Likewise.
21996 (start_decl_1): Likewise.
21997 (require_complete_types_for_parms): Likewise.
21998 * parse.y (structsp): Likewise.
21999 (base_class): Likewise.
22000 * parse.c: Regenerated.
22001 * pt.c (finish_member_template_decl): Likewise.
22002 * typeck.c (decay_conversion): Likewise.
22004 * cp-tree.h (dfs_skip_vbases): New function.
22005 (find_vbase_instance): Likewise.
22006 * class.c (determine_primary_base): Allow a nearly empty base to
22007 serve as a primary base class under the new ABI.
22008 (get_class_offset_1): Rename to ...
22009 (dfs_get_class_offset): ... this. Simplify. Don't issue error
22011 (get_class_offset): Use it. Issue error messages here.
22012 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
22013 find the right copies of virtual bases.
22014 (fixup_vtable_deltas1): Rename to ...
22015 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
22016 bases as primary bases.
22017 (fixup_vtable_deltas): Remove.
22018 (override_one_vtable): Handle virtual bases as primary bases.
22019 (merge_overrides): Likewise.
22020 (finish_struct_1): Likewise.
22021 (dump_class_hierarchy): Dump primary-ness of bases as well.
22022 * search.c (mark_primary_bases): Use a pre-order traversal to
22023 handle primary virtual bases.
22024 (dfs_skip_vbases): New fiunction.
22025 (expand_upcast_fixups): Adjust to handle primary virtual bases.
22026 (fixup_virtual_upcast_offsets): Likewise.
22027 (fixup_all_virtual_upcast_offsets): Likewise.
22028 (dfs_find_vbase_instances): New function.
22029 (find_vbase_instance): Likewise.
22031 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
22033 * lex.c (DIR_SEPARATOR): Delete macro.
22035 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
22037 * decl2.c (lang_decode_option): Handle automatic line wrapping
22040 2000-01-11 Mark Mitchell <mark@codesourcery.com>
22042 * friend.c (do_friend): Don't resolve scopes when processing
22043 template declarations, even if the qualifying scope doesn't
22044 involve template parameters.
22046 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
22048 * class.c (dfs_modify_vtables_queue_p): Remove.
22049 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
22050 and dfs_marked_real_bases_queue_p instead of
22051 dfs_modify_vtables_queue_p.
22053 * class.c (build_vbase_path): Simplify.
22054 (dfs_propagate_binfo_offsets): New function.
22055 (propagate_binfo_offsets): Use it.
22056 (remove_base_field): Simplify.
22057 (dfs_set_offset_for_vbases): Remove.
22058 (dfs_set_offset_for_shared_vbases): New function.
22059 (dfs_set_offset_for_unshared_vbases): Likewise.
22060 (layout_virtual_bases): Use them.
22061 (layout_basetypes): Don't call propagate_binfo_offsets.
22062 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
22065 * class.c (build_base_field): New function, split out from ...
22066 (build_base_fields): ... here. Use it. Allocate primary bases
22067 first, under the new ABI.
22068 (get_vtable_entry): Remove.
22069 (remove_base_field): New function, split out from ...
22070 (remove_base_fields): ... here. Adjust since primary bases come
22071 first under the new ABI.
22073 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
22074 (initialize_vtbl_ptrs): New function.
22075 (expand_indirect_vtbls_init): Change prototype.
22076 (convert_pointer_to_vbase): Declare.
22077 * init.c (expand_direct_vtbls_init): Remove.
22078 (dfs_initialize_vtbl_ptrs): New function.
22079 (initialize_vtbl_ptrs): Likewise.
22080 (emit_base_init): Use initialize_vtbl_ptrs.
22081 * search.c (convert_pointer_to_vbase): Make it global.
22082 (expand_indirect_vtbls_init): Remove vtable initialization code.
22083 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22085 * class.c (dfs_finish_vtbls): New function.
22086 (finish_vtbls): Use it.
22087 (dump_class_hierarchy): New function.
22089 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22090 (BINFO_VBASE_PRIMARY_P): New macro.
22091 (BINFO_VIRTUALS): Add to documentation.
22092 (SET_BINFO_PRIMARY_MARKED_P): Remove.
22093 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22094 (dfs_mark_primary_bases_queue_p): Likewise.
22095 (dfs_unmarked_real_bases_queue_p): New function.
22096 (dfs_marked_real_bases_queue_p): Likewise.
22097 * search.c (dfs_mark_primary_bases): Adjust.
22098 (mark_primary_bases): Likewise.
22099 (get_shared_vbase_if_not_primary): New function.
22100 (dfs_unmarked_real_bases_queue_p): Likewise.
22101 (dfs_marked_real_bases_queue_p): Likewise.
22102 (dfs_get_pure_virtuals): Simplify.
22103 (get_pure_virtuals): Likewise.
22105 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22107 * lex.c: Include tm_p.h.
22109 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
22111 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22113 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
22115 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22116 * pt.c (instantiate_decl): Defer comdat templates that might not be
22119 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22120 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22121 (finish_file): Likewise.
22123 * decl2.c (import_export_class): Undo 12/14 change.
22125 * error.c (dump_decl): operator new, not operatornew.
22127 * class.c (field_decl_cmp): A nontype is "greater" than a type.
22128 * search.c (lookup_field_1): Look for the last field with the
22131 2000-01-05 Nathan Sidwell <nathan@acm.org>
22133 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22136 2000-01-05 Nathan Sidwell <nathan@acm.org>
22138 * typeck.c (build_static_cast): Don't strip target qualifiers
22139 when casting from a class.
22141 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22143 * class.c (warn_hidden): Initialize variable `fndecl'.
22145 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
22147 * decl.c (flag_isoc9x): New variable to be able to use code in
22148 c-common.c. For now always zero.
22150 2000-01-03 Mark Mitchell <mark@codesourcery.com>
22152 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22153 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22154 or unshare_base_binfos for virtual bases here.
22155 * search.c (dfs_get_vbase_types): Do it here.
22156 (get_vbase_types): Adjust.
22158 2000-01-02 Mark Mitchell <mark@codesourcery.com>
22160 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22161 (BINFO_PRIMARY_MARKED_P): Use flag 5.
22162 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22163 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22164 (unmark_primary_bases): Remove declaration.
22165 (unmarkedp): Declare.
22166 (dfs_vbase_unmark): Likewise.
22167 * class.c (determine_primary_base): Return immediately if there
22168 are no base classes. Call mark_primary_bases here.
22169 (modify_all_direct_vtables): Remove.
22170 (modify_all_indirect_vtables): Remove.
22171 (dfs_modify_vtables_queue_p): New function.
22172 (dfs_modify_vtables): New function.
22173 (modify_all_vtables): Use them.
22174 (build_base_fields): Build FIELD_DECLs for primary virtual base
22176 (create_vtable_ptr): Don't call determine_primary_base here.
22177 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22178 (dfs_set_offset_for_vbases): ... this.
22179 (layout_virtual_bases): Use it.
22180 (layout_class_type): Call determine_primary_base here.
22181 * search.c (unmarkedp): Make it global.
22182 (shared_marked_p): Simplify.
22183 (shared_unmarked_p): Likewise.
22184 (dfs_primary_bases_queue_p): Remove.
22185 (dfs_unmark_primary_bases): Likewise.
22186 (unmark_primary_bases): Likewise.
22187 (mark_primary_bases): Simplify.
22188 (get_pure_virtuals): Don't call mark_primary_bases here.
22189 (dfs_vbase_unmark): New function.
22190 (get_vbase_types): Simplify.
22192 * class.c (struct base_info): Remove.
22193 (determine_primary_base): Take has_virtual_p rather than a
22194 base_info as input. Don't calculate max_has_virtual.
22195 (finish_struct_bits): Remove max_has_virtual argument.
22196 (create_vtable_ptr): Remove max_has_virtual_p argument.
22197 (layout_virtual_bases): Remove max argument.
22198 (layout_basetypes): Likewise.
22199 (layout_class_type): Remove max_has_virtual_p argument.
22200 (finish_struct_1): Remove max_has_virtual.
22202 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22203 (layout_basetypes): Remove.
22204 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22205 Update to handle primary virtual bases.
22206 (remove_base_fields): New function, split out from
22208 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22209 (layout_virtual_bases): New function, split out from
22210 layout_basetypes. Update to handle primary virtual bases.
22211 (layout_basetypes): Moved here from tree.c. Use
22212 remove_base_fields and layout_virtual_bases.
22213 * search.c (dfs_mark_primary_bases_queue_p): New function.
22214 (mark_primary_bases): Use it.
22215 * tree.c (CEIL): Remove.
22216 (propagate_binfo_offsets): Remove.
22217 (layout_basetypes): Remove.
22219 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22221 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22222 (BINFO_PRIMARY_MARKED_P): New macro.
22223 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22224 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22225 (mark_primary_bases): New function.
22226 (unmark_primary_bases): Likewise.
22227 * search.c (get_abstract_virtuals_1): Remove.
22228 (dfs_mark_primary_bases): New function.
22229 (mark_primary_bases): Likewise.
22230 (dfs_unmark_primary_bases): Likewise.
22231 (unmark_primary_bases): Likewise.
22232 (dfs_get_pure_virtuals): Likewise.
22234 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22236 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22237 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22238 (modify_one_vtable): Adjust.
22239 (fixup_vtable_deltas1): Likewise.
22240 (override_one_vtable): Likewise.
22241 * search.c (get_abstract_virtuals_1): Likewise.
22242 (get_pure_virtuals): Likewise.
22243 (expand_upcast_fixups): Likewise.
22244 * tree.c (debug_binfo): Likewise.
22246 * class.c (build_vtable): Don't return a value. Don't rebuild
22247 vtables for bases that have already been handled.
22248 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22249 already been handled.
22250 (modify_one_vtable): Adjust accordingly.
22251 (fixup_vtable_deltas1): Likewise.
22252 (finish_struct_1): Likewise.
22254 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22256 * call.c (build_new_method_call): Also check destructors.