1 2003-09-20 Richard Henderson <rth@redhat.com>
3 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
5 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8 * parser.c (cp_parser_direct_declarator): Clear
9 parser->num_template_parameter_lists when parsing function
11 (cp_parser_constructor_declarator_p): Likewise.
13 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16 * pt.c (tsubst_friend_class): Only use innermost template
17 arguments for the injected friend class template.
19 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
22 * pt.c (instantiate_class_template): Increment
23 processing_template_decl around the tsubst of a template member
26 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
28 * decl.c (cxx_scope_descriptor): Fix thinko.
29 (struct cp_binding_level): Adjust type of binding_depth field.
31 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
34 * call.c (type_passed_as): Check for incomplete type.
35 (convert_for_arg_passing): Likewise.
37 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
40 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
42 * semantics.c (expand_body): Set it here on the remaining clones.
44 2003-09-18 Roger Sayle <roger@eyesopen.com>
46 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
47 * class.c (instantiate_type): Remove FFS_EXPR case.
49 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
51 * ChangeLog: Fix recent commit.
53 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
55 * ChangeLog: Add PR number to patch for PR c++/12316.
57 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
59 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
61 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
63 2003-09-17 Richard Henderson <rth@redhat.com>
65 * semantics.c (expand_body): Don't save/restore input_location.
67 2003-09-17 Mark Mitchell <mark@codesourcery.com>
70 * cp-tree.h (tsubst_flags_t): Add tf_conv.
71 * class.c (standard_conversion): Pass tf_conv to
73 (resolve_address_of_overloaded_function): Do not call mark_used
74 when just checking conversions.
77 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
78 * cp-tree.h (cxx_builtin_type_decls): Declare.
79 * decl.c (builtin_type_decls): New variables.
80 (cxx_builtin_type_decls): New function.
81 (record_builtin_type): Add to builtin_type_decls.
83 2003-09-17 Richard Henderson <rth@redhat.com>
86 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
88 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
91 * typeck.c (comptypes): Don't ICE when its first argument is
93 (compparms): Reverse the arguments of same_type_p.
95 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
98 * typeck.c (convert_arguments): Return error_mark_node for an
99 incomplete parameter. Make error message more informative.
101 2003-09-12 Mark Mitchell <mark@codesourcery.com>
104 * class.c (maybe_note_name_used_in_class): Refine test for whether
105 or not we are in a class scope.
107 * cp-tree.h (language_function): Remove x_expanding_p.
108 (expanding_p): Remove.
109 (doing_semantic_analysis_p): Remove.
110 (scope_kind): Add sk_function_parms, sk_class,
112 (innermost_scope_kind): New method.
113 * call.c (cxx_type_promotes_to): Use type_decays_to.
114 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
115 (LANG_HOOKS_POPLEVEL): Likewise.
116 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
117 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
118 is_catch_scope. Add kind and explicit_spec_p.
119 (cxx_scope_descriptor): Use a lookup table.
120 (find_class_binding_level): Use "kind" field in binding_level, not
122 (pop_binding_level): Likewise.
123 (innermost_nonclass_level): Likewise.
124 (toplevel_bindings_p): Likewise.
125 (namespace_bindings_p): Likewise.
126 (template_parm_scope_p): Likewise.
127 (innermost_scope_kind): New method.
128 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
130 (pushlevel): Remove check for doing_semantic_analysis_p.
131 (begin_scope): Simplify.
132 (add_decl_to_level): Use "kind" field in binding_level, not
134 (push_local_binding): Likewise.
135 (pop_label): Remove check for doing_semantic_analysis_p.
136 (poplevel): Use "kind" field in binding_level, not
138 (set_block): Remove check for doing_semantic_analysis_p.
139 (pushlevel_class): Use "kind" field in binding_level, not
141 (poplevel_class): Likewise.
142 (initial_push_namespace_scope): Likewise.
143 (maybe_push_to_top_level): Likewise.
144 (set_identifier_type_value_with_scope): Likewise.
145 (pop_everything): Likewise.
146 (maybe_process_template_type_declaration): Likewise.
148 (pushdecl): Likewise.
149 (pushdecl_with_scope): Likewise.
150 (check_previous_goto_1): Likewise.
151 (define_label): Likewise.
152 (finish_case_label): Likewise.
153 (lookup_tag): Likewise.
154 (unqualified_namespace_lookup): Likewise.
155 (lookup_name_real): Likewise.
156 (lookup_name_current_level): Likewise.
157 (lookup_type_current_level): Likewise.
158 (record_builtin_type): Likewise.
159 (cp_make_fname_decl): Likewise.
160 (maybe_inject_for_scope_var): Likewise.
161 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
162 (start_function): Use begin_scope, not pushlevel.
163 (finish_function): Use "kind" field in binding_level, not
165 (start_method): Use begin_scope, not pushlevel.
166 (make_label_decl): Do not check expanding_p.
167 (save_function-data): Do not set expanding_p.
168 (cxx_push_function_context): Do not clear expanding_p.
169 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
171 2003-09-14 Mark Mitchell <mark@codesourcery.com>
173 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
174 an bit-field whose width exceeds that of its type.
176 2003-09-14 Geoffrey Keating <geoffk@apple.com>
178 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
180 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
182 * ChangeLog: Follow spelling conventions.
183 * parser.c: Likewise.
185 2003-09-13 Richard Henderson <rth@redhat.com>
187 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
188 during relaxation loop.
190 2003-09-11 David Edelsohn <edelsohn@gnu.org>
192 * decl2.c (var_finalized_p): Swap arms of conditional.
194 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
197 * typeck.c (build_address): If it is a function, mark it used.
198 (build_unary_op): Do not lose object's side-effects when taking
199 address of static member function.
200 * class.c (resolve_address_of_overloaded_function): Use
201 tsubst_flags_t parameter. Only expect overload sets. Adjust.
202 (instantiate_type): Adjust flags passing. Do not lose object's
203 side-effects when taking address of static member function.
205 2003-09-11 Richard Henderson <rth@redhat.com>
207 * semantics.c (expand_or_defer_fn): Update for new
208 cgraph_finalize_function argument.
210 2003-09-10 Richard Henderson <rth@redhat.com>
212 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
214 2003-09-10 Jan Hubicka <jh@suse.cz>
216 * decl2.c (var_finalized_p): New.
217 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
219 2003-09-10 Richard Henderson <rth@redhat.com>
221 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
222 mark_member_pointers.
223 (lower_function): Remove.
224 * cp-tree.h: Update to match.
225 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
226 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
228 2003-09-09 Richard Henderson <rth@redhat.com>
230 * semantics.c (expand_or_defer_fn): Update call to
231 cgraph_finalize_function.
233 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
236 * decl2.c (finish_file): Avoid out-of-bounds array reference
239 2003-09-09 Richard Henderson <rth@redhat.com>
241 * decl2.c (mark_member_pointers): Rename from
242 mark_member_pointers_and_eh_handlers and don't check eh handlers.
244 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
247 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
249 2003-09-08 Mark Mitchell <mark@codesourcery.com>
251 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
252 c_register_builtin_type.
255 * decl2.c (add_function): Do not complain about seeing the same
257 * semantics.c (perform_koenig_lookup): Improve documentation.
260 * pt.c (try_one_overload): Add addr_p parameter.
261 (resolve_overloaded_unification): Pass it.
263 2003-09-08 Richard Henderson <rth@redhat.com>
265 * optimize.c (maybe_clone_body): Inc/dec function_depth.
267 2003-09-08 Richard Henderson <rth@redhat.com>
269 * decl.c (finish_function): Clear current_function_decl.
270 * decl2.c (mark_used): Don't push/pop gc context.
271 * optimize.c (optimize_function): Likewise.
272 * tree.c (cp_cannot_inline_tree_fn): Likewise.
273 * pt.c (instantiate_decl): Inc/dec function_depth instead.
274 * semantics.c (expand_body): Update for tree_rest_of_compilation
277 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
280 * error.c (dump_decl): Handle namespace-alias-definition.
281 * decl.c (warn_extern_redeclared_static): There is no point in
282 checking changes in storage class specifier for a namespace
284 (duplicate_decls): Tidy diagnostic message.
285 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
286 (pp_cxx_right_brace): Likewise.
287 (pp_cxx_original_namespace_definition): New function.
288 (pp_cxx_namespace_alias_definition): Likewise.
289 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
291 2003-09-07 Jan Hubicka <jh@suse.cz>
293 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
294 Avoid re-emitting variables in unit-at-a-time mode.
296 2003-09-06 Mark Mitchell <mark@codesourcery.com>
299 * call.c (standard_conversion): Improve comments.
300 (perform_direct_initialization): Make sure we return an expression
302 * typeck.c (build_static_cast): Check for ambiguity and
303 accessibility when performing conversions.
305 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
307 * cp-tree.h (add_binding): Remove declaration.
308 * name-lookup.h (supplement_binding): Declare.
309 * decl.c (add_binding): Move to name-lookup.c.
310 (push_local_binding): Adjust.
311 (push_class_binding): Likewise.
312 (set_identifier_type_value_with_scope): Likewise.
313 * name-lookup.c (supplement_binding): Rename from add_binding.
314 Return a bool. Improve documentation.
315 (set_namespace_binding): Adjust.
316 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
318 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
321 * class.c (pushclass): Push dependent using decls for nested
322 classes of templates too.
324 2003-09-06 Roger Sayle <roger@eyesopen.com>
327 * class.c (resolve_address_of_overloaded_function): When building
328 list of matching non-template function decls, ignore anticipated
329 declarations of undeclared or shadowed GCC builtins.
331 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
334 * decl.c (define_label): Remove unreachable timevar pop.
335 Always return the decl, even if the definition is invalid.
337 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
340 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
341 unparsed functions queue.
343 2003-09-05 Mark Mitchell <mark@codesourcery.com>
346 * call.c (perform_direct_initialization): Correct logic for
347 direct-initialization of a class type.
350 * pt.c (lookup_template_function): Robustify.
352 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
355 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
356 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
357 is_type_p to lookup_qualified_name.
359 * semantics.c (finish_call_expr): Refactor some code.
362 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
363 (build_min_non_dep): Declare.
364 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
365 (build_min_non_dep): New.
366 * cvt.c (convert_to_void): Don't explicitly copy
367 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
368 * call.c (build_new_method_call): Use build_min_non_dep.
369 * decl2.c (grok_array_decl): Likewise.
370 (build_offset_ref_call_from_tree): Likewise.
371 * typeck.c (finish_class_member_access_expr,
372 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
373 build_x_conditional_expr, build_x_compound_expr): Likewise.
374 (build_static_cast, build_reinterpret_cast,
375 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
376 * typeck2.c (build_x_arrow): Use build_min_non_dep.
377 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
379 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
380 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
381 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
383 2003-09-04 Richard Henderson <rth@redhat.com>
385 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
386 change in cgraph_mark_needed_node arguments.
388 2003-09-02 Geoffrey Keating <geoffk@apple.com>
391 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
392 * tree.c (cp_cannot_inline_tree_fn): Likewise.
394 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
396 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
397 (expr_sizeof): Replace with ...
398 (cxx_sizeof_or_alignof_expr): ... here.
399 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
400 * parser.c (cp_parser_unary_expression): Commonize alignof and
402 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
404 * semantics.c (finish_sizeof, finish_alignof): Remove.
405 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
406 becomes bool. Set TREE_READONLY.
407 (expr_sizeof): Replace with ...
408 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
410 2003-09-04 Mark Mitchell <mark@codesourcery.com>
412 Remove cast-as-lvalue extension.
413 * call.c (build_conditional_expr): Correct formatting.
414 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
415 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
416 * cp-tree.h (non_cast_lvalue_p): Remove.
417 (real_non_cast_lvalue_p): Remove.
418 (non_cast_lvalue_or_else): Remove.
419 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
420 (real_lvalue_p): Adjust call to lvalue_p_1.
421 (non_cast_lvalue_p): Remove.
422 (non_cast_lvalue_or_else): Remove.
423 (lvalue_p): Adjust call to lvalue_p_1.
424 (lvalue_or_else): Simplify.
425 * typeck.c (build_unary_op): Use lvalue_or_else, not
426 non_cast_lvalue_or_else.
427 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
429 2003-09-03 DJ Delorie <dj@redhat.com>
431 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
433 2003-09-03 Mark Mitchell <mark@codesourcery.com>
436 * class.c (include_empty_classes): Correct logic for ABI version 1.
438 2003-09-03 Richard Henderson <rth@redhat.com>
440 * optimize.c (optimize_function): Push/pop ggc context around
441 the call to optimize_inline_calls.
443 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
446 * parser.c (cp_parser_decl_specifier_seq): Add check for a
447 duplicate friend decl-specifier.
449 2003-09-02 Mark Mitchell <mark@codesourcery.com>
452 * pt.c (convert_nontype_argument): Correct representation of
453 REFERENCE_TYPE expressions.
456 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
457 (finish_call_expr): Change prototype.
458 * parser.c (cp_parser_postfix_expression): Adjust call to
460 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
461 * semantics.c (finish_call_expr): Add koenig_p parameter.
463 2003-09-01 Mark Mitchell <mark@codesourcery.com>
466 * cp-tree.h (initialize_reference): Change prototype.
467 * call.c (initialize_reference): Add cleanup parameter.
468 * decl.c (grok_reference_init): Likewise.
469 (check_initializer): Likewise.
470 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
471 (duplicate_decls): When replacing an anticipated builtin, do not
473 * typeck.c (convert_for_initialization): Correct call to
474 initialize_reference.
477 * pt.c (dependent_type_p_r): Pass only the innermost template
478 arguments to any_dependent_template_arguments_p.
480 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
482 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
483 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
484 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
485 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
486 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
488 2003-08-29 Mark Mitchell <mark@codesourcery.com>
491 * pt.c (build_non_dependent_expr): Do not build a
492 NON_DEPENDENT_EXPR for a STRING_CST.
495 * search.c (add_conversions): Avoid adding two conversion
496 operators for the same type.
498 2003-08-29 Mark Mitchell <mark@codesourcery.com>
501 * pt.c (tsubst_copy_and_build): Correct handling of
502 address-of-label extension.
503 * semantics.c (finish_goto_stmt): The address of a label must go
504 through the lvalue-to-rvalue conversion.
506 2003-08-29 Richard Henderson <rth@redhat.com>
507 Jason Merrill <jason@redhat.com>
509 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
510 (LANG_HOOKS_RTL_EXPAND_STMT): New.
511 * cp-tree.h (cxx_expand_function_start): Declare.
512 * decl.c (start_function): Use allocate_struct_function.
513 Move stmts_are_full_exprs_p assertion from expand_body.
514 Do not free_after_parsing or free_after_compilation.
515 (cxx_push_function_context): Move code to set struct function
516 data from genrtl_start_function.
517 * optimize.c (optimize_function): Don't inc/dec function_depth.
518 * semantics.c (expand_body): Use tree_rest_of_compilation.
519 (cxx_expand_function_start): Rename from genrtl_start_function,
520 omit bits done by tree_rest_of_compilation.
521 (genrtl_finish_function): Remove.
522 (clear_decl_rtl): Move to ../tree-optimize.c.
524 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
527 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
529 * cxx-pretty-print.h: Declare.
530 * error.c (dump_template_parameter): Use it.
531 (dump_type): Likewise.
533 2003-08-28 Mark Mitchell <mark@codesourcery.com>
535 * init.c (decl_constant_value): Deal with COND_EXPR specially.
536 * call.c (build_conditional_expr): Revert previous patch.
539 * call.c (build_conditional_expr): Use decl_constant_value to
540 simplify the arguments.
542 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
544 * parser.c (struct cp_token): Use enum bitfields.
545 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
546 512B allocation unit.
547 (cp_parser_token_tree_map_node): Use enum bitfields.
549 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
552 * decl.c (push_class_level_binding): Correct old_decl value from
553 my 2003-07-29 reorganization.
555 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
556 (build_new_method_call): Add goto finish.
557 * semantics.c (simplify_aggr_init_exprs_r): Don't set
558 TREE_SIDE_EFFECTS on a call.
560 2003-08-25 Richard Henderson <rth@redhat.com>
562 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
564 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
566 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
567 (cxx_pretty_printer): Adjust base type.
568 (pp_cxx_function_specifier): Declare.
569 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
570 (pp_cxx_left_paren): Likewise.
571 (pp_cxx_right_paren): Likewise.
572 (pp_cxx_dot): Likewise.
573 (pp_cxx_arrow): Likewise.
574 (pp_cxx_semicolon): Likewise.
575 (pp_cxx_identifier): Likewise.
576 (pp_cxx_cv_qualifier_seq): Likewise.
577 (pp_cxx_storage_class_specifier): Likewise.
578 (pp_cxx_expression_list): Likewise.
579 (pp_cxx_space_for_pointer_operator): Likewise.
580 (pp_cxx_init_declarator): Likewise.
581 (pp_cxx_call_argument_list): Likewise.
582 (pp_cxx_nonconsecutive_character): Tidy.
583 (pp_cxx_conversion_function_id): New function.
584 (pp_cxx_template_id): Likewise.
585 (pp_cxx_template_keyword_if_needed): Likewise.
586 (pp_cxx_nested_name_specifier): Likewise.
587 (pp_cxx_unqualified_id): Tidy
588 (pp_cxx_qualified_id): Handle more nodes.
589 (pp_cxx_primary_expression): Tidy.
590 (pp_cxx_postfix_expression): Likewise.
591 (pp_cxx_new_expression): Tidy.
592 (pp_cxx_delete_expression): Likewise.
593 (pp_cxx_cast_expression): New function.
594 (pp_cxx_pm_expression): Tidy.
595 (pp_cxx_conditional_expression): Likewise.
596 (pp_cxx_assignment_operator): New function.
597 (pp_cxx_assignment_expression): Tidy.
598 (pp_cxx_expression): New function.
599 (pp_cxx_function_specifier): Likewise.
600 (pp_cxx_decl_specifier_seq): Likewise.
601 (pp_cxx_simple_type_specifier): Tidy.
602 (pp_cxx_type_specifier_seq): Likewise.
603 (pp_cxx_ptr_operator): New function.
604 (pp_cxx_implicit_parameter_type): Likewise.
605 (pp_cxx_parameter_declaration): Tidy.
606 (pp_cxx_parameter_declaration_clause): New function.
607 (pp_cxx_exception_specification): Likewise.
608 (pp_cxx_direct_declarator): Tidy.
609 (pp_cxx_declarator): Likewise.
610 (pp_cxx_ctor_initializer): New function.
611 (pp_cxx_function_definition): Likewise.
612 (pp_cxx_abstract_declarator): Tidy.
613 (pp_cxx_direct_abstract_declarator): Likewise.
614 (pp_cxx_type_id): Likewise.
615 (pp_cxx_exception_declaration): New function.
616 (pp_cxx_statement): Likewise.
617 (pp_cxx_simple_declaration): Likewise.
618 (pp_cxx_template_parameter_list): Likewise.
619 (pp_cxx_template_parameter): Likewise.
620 (pp_cxx_template_declaration): Likewise.
621 (pp_cxx_explicit_specialization): Likewise.
622 (pp_cxx_explicit_instantiation): Likewise.
623 (pp_cxx_declaration): Tidy.
624 (pp_cxx_pretty_printer_init): Initialize more fields.
626 2003-08-25 Mark Mitchell <mark@codesourcery.com>
629 * cp-tree.h (build_cplus_method_type): Remove.
630 * call.c (standard_conversion): Use build_method_type_directly
631 instead of build_cplus_method_type.
632 * class.c (build_clone): Likewise.
633 (adjust_clone_args): Likewise.
634 * decl.c (build_ptrmem_type): Likewise.
635 (grokdeclarator): Likewise.
636 (check_function_type): Likewise.
637 * decl2.c (grok_method_quals): Likewise.
638 (maybe_retrofit_in_chrg): Likewise.
639 * pt.c (copy_default_args_to_explicit_spec): Likewise.
640 (tsubst_function_type): Likewise.
642 * tree.c (build_cplus_method_type): Remove.
643 * typeck.c (merge_types): Use build_method_type_directly.
645 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
648 * search.c (dfs_access_in_type): Fix typo in comment.
649 (dfs_accessible_queue_p): Likewise.
650 (dfs_accessible_p): Only terminate when a friend is found.
651 (accessible_p): Return immediately if access_in_type allows
654 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
656 PR c++/641, c++/11876
657 * friend.c (add_friend): Add complain parameter.
658 (make_friend_class): Likewise.
659 (do_friend): Adjust add_friend call.
660 * decl.c (grokdeclarator): Adjust make_friend_class call.
661 * parser.c (cp_parser_member_declaration): Likewise.
662 (cp_parser_template_declaration_after_exp): Likewise.
663 * pt.c (instantiate_class_template): Adjust make_friend_class
665 * cp-tree.h (make_friend_class): Adjust declaration.
666 (add_friend): Likewise.
668 2003-08-21 Jason Merrill <jason@redhat.com>
671 * call.c (build_conditional_expr): Ignore cv-qual differences for
674 2003-08-21 Mark Mitchell <mark@codesourcery.com>
677 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
678 (cp_parser_primary_expression): Adjust call to
679 cp_parser_id_expression.
680 (cp_parser_unqualified_id): Complain about the use of
681 typedef-names in a destructor declarator.
682 (cp_parser_postfix_expression): Adjust call to
683 cp_parser_id_expression.
684 (cp_parser_type_parameter): Likewise.
685 (cp_parser_template_argument): Likewise.
686 (cp_parser_declarator_id): Likewise.
689 * call.c (standard_conversion): Use same_type_p, not pointer
690 equality, to compare types.
693 * parser.c (cp_parser_using_declaration): Check for invalid uses
694 of template-ids here...
695 * decl2.c (do_class_using_decl): ... rather than here.
697 2003-08-20 Mark Mitchell <mark@codesourcery.com>
700 * pt.c (more_specialized): Bump processing_template_decl.
702 2003-08-21 Jason Merrill <jason@redhat.com>
705 * decl.c (grokdeclarator): Recognize a flexible array based on the
706 type, not the form of the declarator.
708 2003-08-20 Jason Merrill <jason@redhat.com>
710 * semantics.c (simplify_aggr_init_expr): Split out from
711 simplify_aggr_init_exprs_r. Convert slot address to match
713 * cp-tree.h: Declare it.
714 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
715 DECL_NAME of a user variable.
717 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
720 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
722 * semantics.c (finish_expr_stmt): Always convert to void.
723 * typeck.c (build_x_compound_exp): Always convert to void.
725 2003-08-19 Mark Mitchell <mark@codesourcery.com>
728 * cp-tree.h (grok_op_properties): Change prototype.
729 * decl.c (grok_op_properties): Add complain parameter.
730 (grokfndecl): Pass it.
731 * pt.c (tsubst_decl): Adjust accordingly.
734 * decl.c (start_method): Return immediately if push_template_decl
735 does not like the declaration.
736 * pt.c (push_template_decl_real): Disallow member template
740 * cp-tree.h (add_binding): Add prototype.
741 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
742 (maybe_warn_about_overly_private_class): Use
743 CLASSTYPE_DESTRUCTORS.
744 (pushclass): Adjust call to set_identifier_type_value.
745 * decl.c (add_binding): Give it external linkage.
746 (push_local_binding): Adjust call to add_binding.
747 (push_class_binding): Likewise.
748 (set_identifier_type_value_with_scope): Change prototype. Use
749 add_binding for global bindings.
750 (set_identifier_type_value): Adjust accordingly.
752 (pushdecl): Use set_identifier_type_value, not
753 set_identifier_type_value_with_scope.
754 (pushdecl_namespace_level): Adjust calls to
755 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
756 (pushdecl_class_level): Likewise.
757 (lookup_tag): Use select_decl.
758 (select_decl): Improve comment.
759 (record_builtin_type): Do not call pushdecl.
760 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
761 (cp_finish_decl): Adjust call to set_identifier_type_value.
762 (check_elaborated_type_specifier): Improve checks for invalid uses
764 (xref_tag): Adjust call to check_elaborated_type_specifier.
765 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
766 * name-lookup.c (set_namespace_binding): Use add_binding.
767 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
768 rather than an IDENTIFIER_NODE, to represent built-in types, if
769 requested by the caller.
770 (cp_parser_postfix_expression): Adjust call.
771 (cp_parser_type_specifier): Likewise.
772 (cp_parser_elaborated_type_specifier): Adjust call to
773 check_elaborated_type_specifier.
774 * typeck2.c (build_functional_cast): Do not perform name lookups.
777 * decl.c (expand_static_init): Remove unncessary code.
779 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
781 PR c++/10538, PR c/5582
782 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
784 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
787 * init.c (build_offset_ref): Perform access checking for
788 pointer to member correctly.
790 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
792 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
794 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
797 * cp-tree.h (finish_stmt_expr): Add bool parameter.
798 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
799 adjust the stmt_expr here.
800 (build_vec_init): Use finish_stmt_expr_expr, convert result to
802 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
804 * pt.c (tsubst_copy): Likewise.
805 * semantics.c (finish_stmt_expr): Add parameter.
807 * pt.c (instantiate_class_template): Push to class's scope before
810 2003-08-17 Jan Hubicka <jh@suse.cz>
813 * semantics.c (finish_id_expression): Mark all functions as used.
815 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
818 * cvt.c (convert_to_void): Indicate which side of conditional has
819 no effects, and rhs of comma operator. Test for no sideeffect
820 expressions here and always build a convert expr.
821 * init.c (expand_default_init): Convert the init to void.
822 * typeck.c (build_x_compound_expr): Do not check for side effects
824 (build_compound_expr): Do not convert lhs when building a
827 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
829 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
830 * decl2.c (build_offset_ref_call_from_tree): Use
831 build_non_dependent_expr.
832 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
833 * pt.c (build_non_dependent_expr): Set operand.
835 2003-08-14 Jan Hubicka <jh@suse.cz>
837 * decl2.c (mark_member_pointers): Rename to...
838 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
839 (lower_function): Update call.
840 * except.c (eh_type_info): Break out from ...
841 (build_eh_type): ... here; tinfo is already used.
842 (finish_eh_spec_block): Mark tinfos as used.
843 * semantics.c (finish_handler_params): Mark tinfo as used.
844 * cp-tree.h (eh_type_info): Declare.
846 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
848 * pt.c (instantiate_class_template): Set location before
851 * decl.c (make_typename_type): Use my_friendly_assert.
852 * pt.c (tsubst_aggr_type): Rearrange context substitution.
854 2003-08-14 Jan Hubicka <jh@suse.cz>
856 * method.c (use_thunk): Expand body directly.
858 2003-08-12 Mark Mitchell <mark@codesourcery.com>
861 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
862 determine whether or not to promote types.
863 (convert_for_arg_passing): Likewise.
864 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
866 * pt.c (tsubst_decl): Do not expect it to be set.
870 * cp-tree.h (check_elaborated_type_specifier): Declare.
871 (handle_class_head): Remove.
872 (note_got_semicolon): Likewise.
873 (note_list_got_semicolon): Likewise.
874 (finish_class_definition): Likewise.
875 * decl.c (check_elaborated_type_specifier): Make it public.
877 (handle_class_head): Remove.
878 * parser.c (cp_parser_elaborated_type_specifier): Use
879 check_elaborated_type_specifier.
880 (cp_parser_class_specifier): Do not call finish_class_definition.
881 (cp_parser_class_head): Or handle_class_head. Check for
882 over-qualified names.
883 * semantics.c (finish_class_definition): Remove.
885 * parser.c (cp_parser_check_for_definition_in_return_type): New
887 (cp_parser_simple_declaration): Adjust call to
888 cp_parser_init_declarator.
889 (cp_parser_decl_specifier_seq): Change type of
890 declares_class_or_enum parameter.
891 (cp_parser_explicit_instantiation): Adjust accordingly.
892 (cp_parser_type_specifier): Change type of
893 declares_class_or_enum parameter.
894 (cp_parser_init_declarator): Add declares_class_or_enum
896 (cp_parser_parameter_declaration): Adjust call to
897 cp_parser_decl_specifier_seq.
898 (cp_parser_function_definition): Likewise.
899 (cp_parser_member_declaration): Likewise.
900 (cp_parser_single_declaration): Likewise.
902 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
903 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
904 (TYPE_OVERLOADS_CALL_EXPR): Remove.
905 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
906 (TYPE_OVERLOADS_ARROW): Likewise.
907 (CLASSTYPE_GOT_SEMICOLON): Likewise.
908 * class.c (check_bases): Do not set them.
909 (finish_struct_1): Likewise.
910 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
911 (build_ptrmemfunc_type): Likewise.
912 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
913 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
914 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
915 * lex.c (note_got_semicolon): Remove.
916 (note_list_got_semicolon): Likewise.
917 * parser.c (cp_parser_simple_declaration): Do not call
918 note_list_got_semicolon.
919 * pt.c (list_eq): Remove.
920 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
921 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
922 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
923 * ptree.c (cxx_print_type): Do not print them.
924 * semantics.c (finish_member_class_template): Do not call
925 note_list_got_semicolon.
927 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
929 * call.c (standard_conversion): Opaque pointers interconvert.
931 * testsuite/g++.dg/other/opaque-3.C: New.
933 2003-08-11 Mark Mitchell <mark@codesourcery.com>
935 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
938 2003-08-10 Mark Mitchell <mark@codesourcery.com>
941 * cp-tree.h (get_vbase): Remove.
942 (get_vbase_types): Remove.
943 * init.c (expand_member_init): Correct logic for looking up base
946 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
948 * error.c (dump_expr): Tidy.
949 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
950 (pp_cxx_begin_template_argument_list): Likewise.
951 (pp_cxx_end_template_argument_list): Likewise.
952 (is_destructor_name): Likewise.
953 (pp_cxx_unqualified_id): Likewise.
954 (pp_cxx_qualified_id): Likewise.
955 (pp_cxx_id_expression): Likewise.
956 (pp_cxx_new_expression): Likewise.
957 (pp_cxx_delete_expression): Likewise.
958 (pp_cxx_pm_expression): Likewise.
959 (pp_cxx_type_specifier): Rework.
960 (pp_cxx_type_id): Likewise.
961 (pp_cxx_primary_expression): Likewise.
962 (pp_cxx_postfix_expression): Likewise.
963 (pp_cxx_unary_expression): Likewise.
964 (pp_cxx_multiplicative_expression): Likewise.
965 (pp_cxx_conditional_expression): Likewise.
966 (pp_cxx_assignment_expression): Likewise.
967 (pp_cxx_pretty_printer_init): Tidy.
969 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
971 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
972 NODE is always a TREE_VEC of nonzero size.
973 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
974 * decl2.c (arg_assoc): Template args will be a vec.
975 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
976 dump_template_argument_list.
977 (dump_template_parms): Args will be a vec.
978 * parser.c (cp_parser_template_argument_list): Produce a
980 * pt.c (coerce_template_parms): Args are always vectors.
981 (mangle_class_name_for_template): Likewise.
982 (lookup_template_function): Likewise.
983 (lookup_template_class): Likewise.
984 (tsubst_template_args): Likewise.
985 (tsubst_baselink): Use tsubst_template_args.
986 (tsubst_qualified_id): Likewise.
987 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
988 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
989 (any_dependent_template_args_p): Args are always vectors.
990 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
993 * call.c (convert_like_real): Add rvalue binding error message.
994 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
998 * pt.c (dependent_type_p_r): A dependent template-id is a class
999 type with dependent template arguments, or a bound template
1001 (type_dependent_expression_p): A template function decl cannot
1002 have a dependent context.
1004 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1007 * parser.c (cp_parser_class_name): Return immediately when scope
1010 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1012 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1014 * cp/call.c (standard_conversion): Support opaque types.
1016 (strip_top_quals): Use cp_build_qualified_type instead of
1019 * cp/typeck.c (convert_for_assignment): Support opaque types.
1021 * testsuite/g++.dg/other/opaque-1.C: New.
1023 * testsuite/g++.dg/other/opaque-2.C: New.
1025 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1027 * decl.c (grokparms): Use cp_build_qualified_type instead
1030 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1032 * cxx-pretty-print.h: New file.
1033 * cxx-pretty-print.c: Likewise.
1034 * error.c (scratch_pretty_printer): Change type.
1036 (dump_aggr_type): Likewise.
1037 (dump_global_iord): Likewise.
1038 (dump_expr): Likewise.
1039 (dump_char): Remove.
1040 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1041 (cxx_initialize_diagnostics): New function.
1042 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1043 (CXX_PRETTY_PRINT_H): New variable.
1044 (cp/cxx-pretty-print.o): New rule.
1045 (cp/cp-lang.o): Update dependence.
1046 (cp/error.o): Likewise.
1048 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1050 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1051 (DECL_DECLARED_INLINE_P): Remove.
1052 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1053 if decl is a FUNCTION_DECL. This never made sense, but now it is
1054 required to avoid a tree check failure.
1055 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1056 * optimize.c (maybe_clone_body): Likewise.
1058 2003-08-04 Roger Sayle <roger@eyesopen.com>
1060 * decl.c (cxx_insert_default_attributes): Delete.
1061 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1062 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1064 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1067 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1071 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1074 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1077 * cp-tree.def (USING_DECL): Document its type.
1078 * class.c (pushclass): If we're entering a template, push any
1079 dependent using decls it has.
1080 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1082 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1083 (tsubst): Remove USING_DECL checks.
1084 (type_dependent_expression_p): Remove USING_DECL case.
1085 * semantics.c (finish_member_declaration): A USING_DECL's type
1086 indicates whether it is dependent.
1088 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1090 * cp-tree.h (pushclass): Remove unneeded parameter.
1091 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1092 (push_nested_class): Adjust pushclass call.
1093 * pt.c (instantiate_class_template): Likewise.
1094 * semantics.c (begin_class_definition): Likewise.
1096 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1098 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1100 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1103 * decl.c (decls_match): Don't ignore the types of template
1107 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1109 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1111 PR c++/8442, c++/8806
1112 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1114 (check_elaborated_type_specifier): Add allow_template_p
1115 parameter. Check tag mismatch and class template.
1116 (xref_tag): Add template_header_p parameter. Add assertion
1117 that name is an IDENTIFIER_NODE. Remove implicit typename
1118 warning. Simplify lookup process if globalize is true.
1119 (cxx_init_decl_processing): Adjust call to xref_tag.
1120 (xref_tag_from_type): Likewise.
1121 * decl2.c (handle_class_head): Likewise.
1122 * parser.c (cp_parser_elaborated_type_specifier,
1123 cp_parser_class_head): Likewise.
1124 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1125 tinfo_base_init, emit_support_tinfos): Likewise.
1126 * class.c (is_base_of_enclosing_class): Remove.
1127 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1128 template template argument.
1129 * cp-tree.h (xref_tag): Adjust declaration.
1130 (is_base_of_enclosing_class): Remove.
1131 * NEWS: Document template template argument change.
1133 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1135 * parser.c (cp_parser_init_declarator,
1136 cp_paser_member_declaration): Reformat.
1137 * pt.c (lookup_template_class, type_unification_real, unify,
1138 type_dependent_expression_p): Reformat.
1141 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1143 (finish_stmt_expr_expr): Declare.
1144 * parser.c (cp_parser_primary_expression): Tell
1145 cp_parser_compount_statement that it is a statement expression.
1146 (cp_parser_statement, cp_parser_labeled_statement,
1147 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1148 in_statement_expr_p parameter.
1149 (cp_parser_expression_statement): Likewise. Call
1150 finish_stmt_expr_expr for final expression of a statement
1152 (cp_parser_for_init_statement,
1153 cp_parser_implicitly_scoped_statement,
1154 cp_parser_already_scoped_statement, cp_parser_function_definition,
1155 cp_parser_try_block, cp_parser_handled): Adjust.
1156 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1157 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1158 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1159 * semantics.c (finish_expr_stmt): Do not deal with statement
1161 (begin_stmt_expr): Clear last_expr_type.
1162 (finish_stmt_expr_expr): New.
1163 (finish_stmt_expr): Process the value expression.
1165 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1166 compound expr inside the target's initializer.
1169 * parser.c (cp_parser_primary_expression): Do not set
1170 non-constant-p merely because it is a dependent scope.
1173 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1174 * semantics.c (finish_expr_stmt): Do not convert to void in a
1177 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1179 * pt.c (coerce_template_parms): Refactor.
1180 (fn_type_unification): Increment processing_template_decl when
1181 tsubsting an incomplete set of explicit args.
1184 * pt.c (instantiate_class_template): Increment
1185 processing_template_decl around the tsubst of a template member
1187 (tsubst_qualified_id): Assert we do not have a dependent scope.
1189 * pt.c (coerce_template_template_parms, lookup_template_class,
1190 can_complete_type_without_circularity, instantiate_class_template,
1191 tsubst_decl, unify): Reformat.
1193 2003-07-31 Jan Hubicka <jh@suse.cz>
1195 * decl2.c (maybe_make_one_only): Use mark_referenced.
1196 * method.c (use_thunk): Likewsie.
1198 2003-07-30 Jan Hubicka <jh@suse.cz>
1200 * class.c (build_vtable_entry_ref): Kill.
1201 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1202 (build_vfn_ref): Do not call build_vtable_entry_ref.
1203 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1204 * cp-tree.h (prepare_assemble_variable): Kill.
1205 * cp-decl.c (prepare_assemble_variable): Kill.
1207 2003-07-29 Geoffrey Keating <geoffk@apple.com>
1209 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1210 of setting valid_pch by hand.
1212 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1214 * decl.c (finish_enum): Initialize underlying_type.
1216 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
1219 * decl.c (add_binding): Add bval local variable.
1220 (push_class_level_binding): Likewise. Allow a USING_DECL to be
1222 * decl2.c (do_class_using_decl): The type of a using decl is
1224 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1225 function call lookup code.
1226 * pt.c (tsubst): A USING_DECL will have unknown type.
1227 (tsubst_copy_and_build): Allow a using decl.
1228 (type_dependent_expression_p): A USING_DECL will make it
1230 * semantics.c (finish_member_declaration): Push a dependent using
1233 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1236 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1237 * semantics.c (finish_id_expression): Call mark_used for all
1240 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1243 * call.c (standard_conversion): Allow all integral->enumeral
1244 conversions, after marking them as bad.
1245 * decl.c (finish_enum): Make sure that all enumerators are
1246 properly converted to the underlying type.
1247 (build_enumerator): Set DECL_CONTEXT for namespace-scope
1249 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1250 (tsubst_enum): Tidy.
1252 * Make-lang.in (typeck.o): Depend on convert.h.
1253 (class.o): Likewise.
1255 * call.c: Include convert.h.
1256 (convert_arg_to_ellipsis): Use convert_to_real.
1257 * class.c: Include convert.h.
1258 (build_base_path): Use convert_to_integer.
1259 * rtti.c: Include convert.h.
1260 (build_headof): Use convert_to_integer.
1261 * typeck.c: Include convert.h.
1262 (decay_conversion): Use convert_to_integer.
1263 (build_unary_op): Use build_nop.
1264 (get_delta_difference): Use convert_to_integer.
1265 (build_ptrmemfunc): Avoid unncessary conversions.
1267 2003-07-28 Jan Hubicka <jh@suse.cz>
1269 * decl2.c (mark_member_pointers): Verify that member pointer points to
1272 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
1274 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1275 (finish_compound_stmt): Remove no scope arg.
1276 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1277 end_compound_stmt calls.
1278 (expand_static_init, begin_destructor_body, begin_function_body,
1279 finish_function_body): Likewise.
1280 * decl2.c (start_objects, finish_objects,
1281 start_static_storage_duration_function,
1282 finish_static_storage_duration_function): Likewise.
1283 * init.c (begin_init_stmts, finish_init_stmts,
1284 construct_virtual_base, build_vec_init): Likewise.
1285 * method.c (do_build_assign_ref, synthesize_method): Likewise.
1286 * parser.c (cp_parser_compound_statement,
1287 cp_parser_implicitly_scoped_statement,
1288 cp_parser_already_scoped_statement): Likewise.
1289 * pt.c (tsubst_expr): Likewise.
1290 * semantics.c (begin_compound_stmt): No scope arg is a bool.
1291 (finish_compound_stmt): Remove no scope arg.
1293 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1296 2003-07-27 Mark Mitchell <mark@codesourcery.com>
1298 * call.c (standard_conversion): Tweak handling of
1299 pointer-to-member types.
1300 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1301 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1302 pointer-to-data member types.
1304 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
1306 * parser.c (cp_parser_type_parameter): Reformat.
1307 (cp_parser_parameter_declaration): Deprecate default args where
1310 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
1314 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1315 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1316 * init.c (begin_init_stmts): Make static. Return is_global
1317 value. Always call begin_stmt_expr.
1318 (finish_init_stmts): Make static. Add is_global parm. Always
1319 building a stmt tree.
1320 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1321 (build_vec_init): Likewise. Always building a stmt tree.
1322 (expand_default_init): Always building a stmt tree.
1323 (get_temp_regvar): Likewise.
1324 * semantics.c (begin_global_stmt_expr,
1325 finish_global_stmt_expr): Remove.
1327 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1329 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1330 (build_x_compound_expr_from_list): Declare.
1331 * typeck.c (build_x_compound_expr_from_list): New.
1332 (build_x_compound_expr): Adjust.
1333 (build_compound_expr): Remove unreachable code. Take two
1335 * decl.c (grok_reference_init): Use
1336 build_x_compound_expr_from_list.
1337 (expand_static_init): Adjust build_compound_expr call.
1338 (cxx_maybe_build_cleanup): Likewise.
1339 * init.c (perform_member_init): Use
1340 build_x_compound_expr_from_list.
1341 (build_new_1): Likewise.
1342 (build_vec_delete): Adjust build_compound_expr calls.
1343 (build_vbase_delete): Likewise.
1344 * typeck2.c (store_init_value): Use
1345 build_x_compound_expr_from_list.
1346 (build_functional_cast): Likewise.
1348 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1350 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1351 * decl.c (make_typename_type): Pass it.
1352 * pt.c (lookup_template_class): Use it.
1353 (resolve_typename_type): Pass it.
1354 * semantics.c (finish_template_type): Pass it.
1356 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1359 * cp-tree.h (qualified_name_lookup_error): Declare.
1360 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1362 (tsubst_expr) <DECL_STMT case>: Likewise.
1363 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1364 * semantics.c (qualified_name_lookup_error): New, broken out of ...
1365 (finish_id_expression): ... here. Use it.
1367 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
1369 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1371 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1374 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1375 (tsubst_template_arg): New.
1376 (tsubst_template_arg_vector): Rename to ...
1377 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1378 tsubst_template_arg.
1379 (coerce_template_parms): Use tsubst_template_arg for default
1381 (tsubst_template_parms): Likewise.
1382 (tsubst_aggr_type): Adjust.
1383 (tsubst_decl): Likewise.
1384 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1385 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1387 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1389 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1390 * error.c: Use the new pretty-printer framework.
1392 2003-07-24 Per Bothner <pbothner@apple.com>
1394 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1395 which causes errors messages to incorrectly mention included files.
1397 2003-07-24 Mark Mitchell <mark@codesourcery.com>
1399 * cp-tree.h (convert_to_base_statically): Declare.
1400 * call.c (build_special_member_call): Convert INSTANCE to the base
1402 * class.c (convert_to_base_statically): New method.
1403 * init.c (construct_virtual_base): Use it.
1404 * method.c (do_build_assign_ref): Fix typo in comment.
1406 2003-07-24 Jason Merrill <jason@redhat.com>
1408 * decl.c: Just set truthvalue_* to boolean_*.
1410 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
1412 * decl.c (reshape_init): Remove unreachable code.
1414 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1417 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1419 2003-07-23 Mark Mitchell <mark@codesourcery.com>
1422 * cp-tree.h (accessible_base_p): Declare.
1423 * call.c (build_over_call): Use it.
1424 * search.c (accessible_base_p): New function, split out from ...
1425 (lookup_base): ... here.
1428 * call.c (build_conditional_expr): Use perform_implicit_conversion
1429 and error_operand_p. Robustify.
1430 * typeck.c (build_unary_op): Use perform_implicit_conversion.
1432 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
1435 * parser.c (cp_parser_nested_name_specifier): Reset scope on
1437 (cp_parser_elaborated_type_specifier): Likewise.
1439 2003-07-22 Mark Mitchell <mark@codesourcery.com>
1441 Eliminate use of POINTER_TYPE for pointers-to-members.
1442 * call.c (standard_conversion): Rework pointer-to-member handling.
1444 (add_builtin_candidate): Likewise.
1445 (resolve_scoped_fn_name): Remove.
1446 (build_conditional_expr): Rework pointer-to-member handling.
1447 (compare_ics): Likewise.
1448 * class.c (check_field_decls): Use TYPE_PTR_P.
1449 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1451 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1452 (TYPE_PTRMEM_P): Add comment.
1453 (TYPE_PTR_P): Simplify.
1454 (TYPE_PTROB_P): Correct definition.
1455 (TYPE_PTR_TO_MEMBER_P): New macro.
1456 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1457 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1458 (resolved_scoped_fn_name): Remove declaration.
1459 (build_offset_ref): Change prototype.
1460 (resolve_offset_ref): Remove.
1461 (comp_target_types): Remove.
1462 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1464 (convert_to_reference): Use can_convert.
1465 (ocp_convert): Improve error handling. Rework pointer-to-member
1467 (perform_qualification_conversions): Rework pointer-to-member
1469 * decl.c (build_ptrmem_type): Handle functions too.
1470 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1471 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1472 (grokparms): Remove OFFSET_TYPE error message.
1473 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1474 * error.c (dump_type_prefix): Likewise.
1475 * expr.c (cplus_expand_constant): Use build_nop.
1476 * init.c (build_offset_ref): Add address_p parameter. Fold in
1477 necessary bits from resolve_offset_ref.
1478 (resolve_offset_ref): Remove.
1479 * parser.c (cp_parser_postfix_expression): Remove special case
1480 code for OFFSET_TYPE.
1481 * pt.c (convert_nontype_argument): Rework pointer-to-member
1483 (convert_template_argument): Likewise.
1485 (invalid_nontype_parm_type_p): Likewise.
1486 (dependent_type_p_r): Likewise.
1487 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1488 (target_incomplete_p_): Rework pointer-to-member
1490 (get_pseudo_ti_init): Likewise.
1491 (get_pseudo_ti_desc): Likewise.
1492 * semantics.c (finish_qualified_id_expr): Adjust call to
1493 build_offset_ref. Remove use of resolve_offset_ref.
1494 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1495 * typeck.c (target_type): Use TYPE_PTRMEM_P.
1496 (type_unknown_p): Remove obsolete code about the time before
1497 non-dependent expressions were handled correctly.
1498 (qualify_type_recursive): Remove.
1499 (composite_pointer_type_r): New function.
1500 (composite_pointer_type): Use it.
1501 (merge_types): Remove dead comments.
1502 (comp_cv_target_types): Remove.
1503 (comp_target_types): Likewise.
1504 (comp_target_parms): Likewise.
1505 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1506 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1507 (build_binary_op): Do not use of comp_target_types.
1508 (pointer_diff): Remove OFFSET_TYPE case.
1509 (build_unary_op): Adjust pointer-to-member handling.
1510 (unary_complex_lvalue): Likewise.
1511 (check_for_casting_away_constness): Add description parameter.
1512 (build_static_cast): Pass it.
1513 (build_reinterpret_cast): Use check_for_casting_away_constness.
1514 (build_const_cast): Adjust pointer-to-member handling.
1515 (build_c_cast): Likewise.
1516 (convert_for_assignment): Remove OFFSET_TYPE error message.
1517 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1518 (comp_ptr_ttypes_reinterpret): Remove.
1519 (casts_away_constness_r): Adjust pointer-to-member handling.
1520 (casts_away_constness): Liekwise.
1521 (strip_all_pointer_quals): Remove.
1522 * typeck2.c (digest_init): Adjust pointer-to-member handling.
1523 (build_m_component_ref): Likewise.
1525 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
1527 * lex.c (unqualified_fn_lookup_error): Mention that the error
1528 message needs to be kept in synch with the manual.
1530 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1533 * decl.c (grokdeclarator): An array member is only a flexible
1534 array member if the field itself is the array.
1536 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1539 * decl.c (xref_basetypes): Handle error_mark_node.
1541 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1543 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1544 * tree.c (lvalue_p_1): Set it.
1545 * class.c (check_field): Don't allow non-packed non-POD fields to
1547 * call.c (reference_binding): Need a temporary for all bitfield
1549 (convert_like_real): Check it is ok to make a temporary here.
1551 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
1553 * cp-tree.h (hack_identifier): Remove.
1554 * method.c (hack_identifier): Remove.
1555 * semantics.c (finish_id_expression): Expand hack_identifier
1558 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1560 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1561 semantics.c typeck.c: Remove unnecessary casts.
1563 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1565 * cp-tree.h (hack_identifier): Remove.
1566 * method.c (hack_identifier): Remove.
1567 * semantics.c (finish_id_expression): Expand hack_identifier
1570 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1572 * cp-tree.h (finish_non_static_data_member): Add object param.
1573 * method.c (hack_identifier): Adjust.
1574 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1575 again for a FIELD_DECL.
1576 * semantics.c (finish_non_static_data_member): Add object
1577 parameter. Always save the DECL in the COMPONENT_REF.
1578 * call.c (resolve_scoped_fn_name): Adjust.
1580 2003-07-17 Zack Weinberg <zack@codesourcery.com>
1582 * pt.c (get_bindings): Make definition consistent with
1583 forward declaration.
1585 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1588 * friend.c (add_friend): Check access for member functions
1591 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1594 * typeck.c (build_class_member_access_expr): Improve diagnostic.
1596 2003-07-16 Mark Mitchell <mark@codesourcery.com>
1599 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1601 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1602 * decl.c (duplicate_decls): Merge
1603 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1604 * parser.c (cp_parser_postfix_expression): Adjust call to
1605 cp_parser_initializer_list and
1606 cp_parser_parenthesized_expression_list.
1607 (cp_parser_parenthesized_expression_list): Add non_constant_p.
1608 (cp_parser_new_placement): Adjust call to
1609 cp_parser_parenthesized_expression_list.
1610 (cp_parser_direct_new_declarator): Likewise.
1611 (cp_parser_conditional_expression): Remove.
1612 (cp_parser_constant_expression): Parse an assignment-expression,
1613 not a conditional-expression.
1614 (cp_parser_simple_declaration): Resolve expression/declaration
1615 ambiguity more quickly.
1616 (cp_parser_mem_initializer): Adjust call to
1617 cp_parser_parenthesized_expression_list.
1618 (cp_parser_init_declarator): Keep track of whether or not the
1619 initializer is a constant-expression.
1620 (cp_parser_initializer): Add non_constant_p parameter.
1621 (cp_parser_initializer_clause): Likewise.
1622 (cp_parser_initializer_list): Likewise.
1623 (cp_parser_attribute_list): Adjust call to
1624 cp_parser_parenthesized_expression_list.
1625 (cp_parser_functional_cast): Likewise.
1626 * pt.c (tsubst_decl): Copy
1627 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1628 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1629 * semantics.c (finish_id_expression): Use
1630 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1632 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
1634 * lang-options.h: Remove.
1636 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
1639 * class.c (field_decl_cmp): Remove.
1640 (resort_field_decl_cmp): Remove.
1641 (resort_sorted_fields): Remove.
1642 (add_fields_to_vec): Rename to ...
1643 (add_fields_to_record_type): this.
1644 (finish_struct_1): Change to be using
1645 sorted_fields_type's fields.
1646 * cp-tree.h (lang_decl): In lang_decl_u3
1647 change sorted_fields to be a pointer to
1649 (resort_sorted_fields): Remove prototype.
1650 * search.c (lookup_field_1): Change to be using
1651 sorted_fields_type's fields.
1653 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1656 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1657 is a member of other class.
1658 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1659 is a specialization of function template.
1661 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1664 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1667 2003-07-15 Mark Mitchell <mark@codesourcery.com>
1669 * cp-tree.def (LOOKUP_EXPR): Remove.
1670 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1671 (LOOKUP_EXPR_GLOBAL): Remove.
1672 (get_bindings): Remove.
1673 (is_aggr_type_2): Remove.
1674 * call.c (resolved_scoped_fn_name): Remove support for
1676 * decl.c (grokfndecl): Likewise.
1677 (grokdeclarator): Likewise.
1678 * error.c (dump_decl): Likewise.
1679 (dump_expr): Likewise.
1680 * friend.c (do_friend): Likewise.
1681 * init.c (build_offset_ref): Likewise.
1682 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
1684 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1685 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1687 * pt.c (get_bindings): Give it internal linkage.
1688 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1689 (lookup_template_function): Likewise.
1690 (for_each_tempalte_parm_r): Likewise.
1691 (tsubst_decl): Likewise.
1692 (tsubst_qualified_id): Handle template template parameters.
1693 (tsubst_copy): Remove support for LOOKUP_EXPR.
1694 (tsubst_copy_and_build): Likewise.
1695 (most_general_template): Likewise.
1696 (value_dependent_expression_p): Likewise.
1697 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1699 * semantics.c (perform_koenig_lookup): Do not create
1701 (finish_fname): Likewise.
1702 (finish_id_expression): Likewise.
1703 * tree.c (is_aggr_type_2): Remove.
1705 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1708 * typeck.c (check_return_expr): Fix thinko in diagnostic.
1710 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1713 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1716 2003-07-14 Mark Mitchell <mark@codesourcery.com>
1719 * pt.c (dependent_scope_ref_p): New function.
1720 (value_dependent_expression_p): Use it.
1721 (type_dependent_expression_p): Likewise.
1723 * pt.c (tsubst_friend_function): Use reregister_specialization.
1726 * cp-tree.h (lookup_qualified_name): Adjust prototype.
1727 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
1728 call to is_aggr_type.
1729 * parser.c (cp_parser_lookup_name): Adjust call to
1730 lookup_qualified_name.
1731 * pt.c (tsubst_qualified_id): Likewise.
1732 (tsubst_copy_and_build): Likewise.
1733 * semantics.c (finish_qualified_id_expr): Deal with erroneous
1736 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1739 * call.c (op_error): Properly format REALPART_EXPR and
1741 * error.c (dump_expr): Likewise.
1743 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1745 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1747 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1750 * call.c (initialize_reference): Improve diagnostic.
1752 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1755 * pt.c (more_specialized_class): Add full_args parameter.
1756 (most_specialized_class): Adjust calls to more_specialized_class.
1757 * cp-tree.h (more_specialized_class): Adjust declaration.
1759 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
1761 * lex.c (enum tree_node_kind): Delete.
1763 2003-07-13 Mark Mitchell <mark@codesourcery.com>
1766 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1767 (SET_DECL_SELF_REFERENCE_P): Likewise.
1768 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1769 * pt.c (tsubst_decl): Copy it.
1770 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1772 * pt.c (reregister_specialization): Fix thinko in previous change.
1774 * cp-tree.h (cp_id_kind): New type.
1775 (unqualified_name_lookup_error): Change prototype.
1776 (unqualified_fn_lookup_error): New function.
1777 (do_identifier): Remove.
1778 (do_scoped_id): Likewise.
1779 (tsubst_copy_and_build): Change prototype.
1780 (reregister_specialization): New function.
1781 (perform_koenig_lookup): Likewise.
1782 (finish_id_expression): Likewise.
1783 * call.c (build_method_call): Adjust call to
1784 unqualified_name_lookup_error.
1785 * decl.c (duplicate_decls): Use reregister_specialization.
1786 * lex.c (is_global): Remove.
1787 (unqualified_name_lookup_error): Return a value.
1788 (do_identifier): Remove.
1789 (do_scoped_id): Likewise.
1790 (identifier_typedecl_value): Remove.
1791 (unqualified_fn_lookup_error): New function.
1792 * parser.c (cp_parser_id_kind): Remove.
1793 (cp_parser_non_constant_id_expression): Remove.
1794 (cp_parser_primary_expression): Use finish_id_expression.
1795 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1797 (cp_parser_postfix_expression): Use perform_koenig_lookup.
1798 (cp_parser_template_argument): Use cp_id_kind.
1799 (cp_parser_fold_non_dependent_expr): Adjust call to
1800 tsubst_copy_and_build.
1801 * pt.c (unregister_specialization): Rename to ...
1802 (reregister_specialization): This.
1803 (tsubst_friend_function): Use it.
1804 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1805 (tsubst_qualified_id): Likewise.
1806 (tsubst_expr): Likewise.
1807 (tsubst_copy_and_build): Add function_p parameter. Use
1808 finish_id_expression. Introduce RECUR macro.
1809 (tsubst_non_call_postfix_expression): New function.
1810 (regenerate_decl_from_template): Use reregister_specialization.
1811 * semantics.c (perform_koenig_lookup): New function.
1812 (finish_id_expression): Likewise.
1814 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1816 * pt.c (push_access_scope_real): Remove.
1817 (push_access_scope): Move code from push_access_scope_real.
1818 (pop_access_scope): Don't check for TEMPLATE_DECL.
1819 (instantiate_template): Defer access checking during template
1821 (regenerate_decl_from_template): Tidy.
1823 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
1826 * operators.def: Add definitions for __imag__, __real__.
1828 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
1831 * parser.c (cp_parser_expression_list): Rename to ...
1832 (cp_parser_parenthesized_expression_list): ... here. Add attribute
1833 parameter, parse the surounding parentheses.
1834 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1835 parameters. Return int.
1836 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1837 (cp_parser_postfix_expression): Adjust function call parsing.
1838 (cp_parser_new_placement): Adjust.
1839 (cp_parser_new_initializer): Likewise.
1840 (cp_parser_cast_expression): Likewise.
1841 (cp_parser_selection_statement): Likewise.
1842 (cp_parser_mem_initializer): Likewise.
1843 (cp_parser_asm_definition): Likewise.
1844 (cp_parser_init_declarator): Likewise.
1845 (cp_parser_declarator): Make
1846 cdtor_or_conv_p an int ptr.
1847 (cp_parser_direct_declarator): Likewise. Check for a parameter
1848 list on cdtors & conv functions.
1849 (cp_parser_initializer): Adjust.
1850 (cp_parser_member_declaration): Adjust.
1851 (cp_parser_attribute_list): Move code into
1852 cp_parser_parens_expression_list.
1853 (cp_parser_functional_cast): Adjust.
1854 * pt.c (type_dependent_expression_p): Erroneous expressions are
1857 2003-07-11 Geoffrey Keating <geoffk@apple.com>
1859 * decl.c (cp_finish_decl): Handle 'used' attribute.
1861 * cp-lang.c (c_reset_state): New dummy routine.
1862 * cp-tree.h (finish_file): Move prototype to c-common.h.
1863 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1865 2003-07-11 Mark Mitchell <mark@codesourcery.com>
1868 * pt.c (tsubst_qualified_id): Implement suggested resolution for
1870 (type_dependent_expression_p): Likewise.
1872 2003-07-10 Mark Mitchell <mark@codesourcery.com>
1874 * typeck.c (build_binary_op): Do not warn about signed
1875 vs. unsigned comparisons in the bodies of templates.
1878 * parser.c (cp_parser_postfix_expression): Check dependency of
1881 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1884 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1888 * error.c (decl_to_string): Do not print default argument
1891 * cp-tree.h (break_out_calls): Remove declaration.
1892 * tree.c (break_out_calls): Remove.
1893 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1895 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
1898 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1899 * decl2.c (constructor_name_p): Avoid repeated constructor_name
1901 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1903 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1905 * typeck.c (build_x_unary_op): Take note of the fact that
1906 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1909 * parser.c (cp_parser_primary_expression): Preserve the form of
1910 qualified expressions in templates, even if they are not
1912 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1913 (tsubst_qualified_id): Likewise.
1914 * search.c (accessible_p): Treat everything in the body of a
1915 template as accessible.
1917 2003-07-08 Mark Mitchell <mark@codesourcery.com>
1919 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1920 * cp-tree.h (build_call_from_tree): Remove.
1921 (build_member_call): Likewise.
1922 (dependent_template_arg_p): Remove.
1923 (any_dependent_template_arguments_p): New function.
1924 (dependent_template_id_p): Likewise.
1925 (any_type_dependent_arguments_p): Likewise.
1926 (build_non_dependent_expr): Likewise.
1927 (build_non_dependent_args): Likewise.
1928 (build_x_compound_expr): Adjust prototype.
1929 * call.c (build_new_method_call): Handle non-dependent expressions
1931 * decl2.c (grok_array_decl): Likewise.
1932 (build_offset_ref_call_from_tree): Likewise.
1933 (build_call_from_tree): Remove.
1934 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1935 (dump_expr): Likewise.
1936 * init.c (build_member_call): Remove.
1937 * mangle.c (write_expression): Update handling for template-ids.
1938 * parser.c (cp_parser_primary_expression): Use
1939 any_dependent_template_arguments_p. Update constant-expression
1941 (cp_parser_postfix_expression): Use
1942 any_type_dependent_arguments_p. Simplify call processing.
1943 (cp_parser_unary_expression): Simplify.
1944 (cp_parser_expression): Adjust for changes to
1945 build_x_compound_expr.
1946 (cp_parser_template_argument): Implement standard-conforming
1947 parsing of non-type template arguments.
1948 (cp_parser_direct_declarator): Use
1949 cp_parser_fold_non_dependent_expr.
1950 (cp_parser_fold_non_dependent_expr): New function.
1951 (cp_parser_next_token_ends_template_argument_p): Likewise.
1952 * pt.c (convert_template_argument): Do not call
1953 maybe_fold_nontype_arg.
1954 (tsubst_baselink): Likewise.
1955 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
1956 processing work correctly for non-dependent expressions. Adjust
1957 handling of COMPOUND_EXPR. Simplify call processing.
1958 (value_dependent_expression_p): Deal with functional casts and
1959 sizeof/alignof correctly.
1960 (type_dependent_expression_p): Handle overloaded functions.
1961 (any_type_dependent_arguments_p): New function.
1962 (any_dependent_template_arguments_p): Likewise.
1963 (dependent_template_p): Treat SCOPE_REFs as dependent.
1964 (dependent_template_id_p): Simplify.
1965 (build_non_dependent_expr): New function.
1966 (build_non_dependent_args): Likewise.
1967 * semantics.c (finish_stmt_expr): Don't make dependent
1968 statement-expresions have void type.
1969 (finish_call_expr): Handle non-dependent expressions
1971 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1972 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1973 type size_t, even in templates.
1974 (expr_sizeof): Likewise.
1975 (finish_class_member_access_expr): Handle non-dependent expressions
1977 (build_x_indirect_ref): Likewise.
1978 (build_x_binary_op): Likewise.
1979 (build_x_unary_op): Likewise.
1980 (build_x_conditional_expr): Likewise.
1981 (build_x_compound_expr): Likewise.
1982 * typeck2.c (build_x_arrow): Likewise.
1984 2003-07-09 Jan Hubicka <jh@suse.cz>
1986 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1987 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1988 (start_function): Use DECL_ESTIMATED_INSNS.
1989 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1991 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1994 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1997 * pt.c (instantiate_class_template): Don't call xref_tag to
1998 inject name when the friend class is a specialization.
2000 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2002 * cp-tree.h (build_scoped_method_call): Remove.
2003 (lookup_qualified_name): Remove parameter.
2004 (tsubst_copy_and_build): Declare.
2005 (finish_qualified_object_call_expr): Remove.
2006 (check_accessibility_of_qualified_id): New function.
2007 (finish_qualified_id_expr): Likewise.
2008 (non_reference): Likewise.
2009 (build_expr_from-tree): Remove.
2010 * call.c (non_reference): Remove.
2011 (build_scoped_method_call): Likewise.
2012 (build_method_call): Use error_operand_p. Assert that we are not
2013 processing a template.
2014 (standard_conversion): Use non_reference.
2015 * class.c (build_vtbl_entry_ref): Likewise.
2016 (build_vtbl_ref_1): Likewise.
2017 * cvt.c (build_expr_type_conversion): Use non_reference.
2018 * decl.c (lookup_qualified_name): Remove flags parameter.
2019 (grok_op_properties): Use non_reference.
2020 * decl2.c (grok_array_decl): Likewise.
2021 (build_expr_from_tree): Remove.
2022 (build_offset_ref_call_from_tree): Update comment.
2023 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2024 * except.c (prepare_eh_types): Use non_reference.
2025 (can_convert_eh): Likewise.
2026 * init.c (build_dtor_call): Avoid using build_method_call.
2027 * mangle.c (write_template_param): Remove misleading comment.
2028 * method.c (locate_copy): Use non_reference.
2029 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2030 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2031 non-dependent contexts.
2032 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2033 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2034 build_expr_from_tree.
2035 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2036 Use check_accessibility_of_qualified_id.
2037 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2038 build_expr_from_tree.
2039 (tsubst_baselink): New function.
2040 (tsubst_qualified_id): Likewise.
2041 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2042 (tsubst_expr): Adjust call to lookup_qualified_name.
2043 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2044 handling of CALL_EXPRs.
2045 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2046 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2047 * search.c (check_final_overrider): Likewise.
2048 * semantics.c (check_accessibility_of_qualified_id): New function.
2049 (finish_qualified_object_call_expr): Remove.
2050 * typeck.c (target_type): Use non_reference.
2051 (cxx_sizeof_or_alignof_type): Likewise.
2052 (dubious_conversion_warnings): Likewise.
2053 (convert_for_initialization): Likewise.
2054 (non_reference): New function.
2056 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2058 * decl.c (print_binding_level, print_other_binding_stack,
2059 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2061 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2063 2003-07-07 Andreas Jaeger <aj@suse.de>
2065 * friend.c: Convert to ISO C90 prototypes.
2067 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2069 * cfns.h: Regenerate.
2071 * typeck.c: Convert remaining prototypes to ISO C90.
2072 * search.c: Likewise.
2074 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2075 * semantics.c (expand_or_defer_fn): Likewise
2076 * mangle.c (discriminator_for_string_literal): Likewise.
2077 * g++spec.c (lang_specific_driver): Likewise.
2079 * search.c (lookup_base_r): Remove unused variable.
2081 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2083 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2086 2003-07-07 Andreas Jaeger <aj@suse.de>
2088 * search.c (lookup_base_r): Remove unused variable.
2090 2003-07-06 Michael Chastain <mec@shout.net>
2093 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2094 assigning to input_filename directly.
2096 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2098 * call.c: Fix comment formatting.
2099 * class.c: Likewise.
2100 * cp-tree.h: Likewise.
2102 * decl2.c: Likewise.
2103 * error.c: Likewise.
2104 * method.c: Likewise.
2105 * name-lookup.c: Likewise.
2106 * parser.c: Likewise.
2109 * search.c: Likewise.
2110 * typeck.c: Likewise.
2112 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2115 * search.c (lookup_base_r): Remove is_non_public and
2116 within_current_scope parameters. Remove other dead code.
2117 (lookup_base): Adjust call to lookup_base_r.
2118 (adjust_result_of_qualified_name_lookup): Improve comment.
2119 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2121 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2123 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2124 LANG_HOOKS_MISSING_ARGUMENT): Override.
2126 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2129 * typeck.c (build_static_cast): Check for reference conversions
2132 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2134 * cp-tree.h (perform_integral_promotions): Declare.
2135 * call.c (build_addr_func): Use decay_conversion.
2136 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2137 (convert_for_arg_passing): Use perform_integral_promotions.
2138 * cvt.c (build_expr_type_conversion): Use decay_conversion.
2139 (type_promotes_to): Do not return a cv-qualified type.
2140 * decl.c (grok_reference_init): Fix formatting.
2141 (get_atexit_node): Use decay_conversion.
2142 (build_enumerator): Use perform_integral_promotions.
2143 * init.c (build_vec_init): Use decay_conversion.
2144 * semantics.c (finish_expr_stmt): Likewise.
2145 (finish_switch_cond): Use perform_integral_promotions.
2146 * typeck.c (default_conversion): Likewise.
2147 (perform_integral_promotions): New function.
2148 (build_indirect_ref): Use decay_conversion.
2149 (build_array_ref): Use perform_integral_promotions.
2150 (convert_arguments): Use decay_conversion.
2151 (build_unary_op): Use perform_integral_promotions.
2152 (build_c_cast): Use decay_conversion.
2153 (build_modify_expr): Likewise.
2154 (convert_for_initialization): Likewise.
2155 * typeck2.c (build_x_arrow): Likewise.
2157 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
2159 * call.c: Fix comment typos.
2160 * class.c: Likewise.
2161 * cp-tree.h: Likewise.
2163 * decl2.c: Likewise.
2166 * mangle.c: Likewise.
2167 * parser.c: Likewise.
2169 * search.c: Likewise.
2170 * semantics.c: Likewise.
2172 * typeck.c: Likewise.
2174 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2176 * parser.c (cp_lexer_read_token): No need to handle string
2177 constant concatenation.
2179 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2181 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2182 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2183 ATTRIBUTE_GCC_CXXDIAG.
2185 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2187 * call.c (build_addr_func): Handle bound pointers-to-members.
2188 (build_method_call): Do not call resolve_offset_ref.
2189 (implicit_conversion): Likewise.
2190 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2192 (resolve_args): Do not call resolve_offset_ref.
2193 (build_conditional_expr): Likewise.
2194 (build_new_method_call): Likewise.
2195 * cp-tree.def (OFFSET_REF): Update documentation.
2196 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2197 pointers to members to pointers.
2198 (ocp_convert): Do not call resolve_offset_ref.
2199 (convert_to_void): Likewise.
2200 (build_expr_type_conversion): Likewise.
2201 * decl2.c (delete_sanity): Likewise.
2202 * init.c (resolve_offset_ref): Simplify greatly.
2203 (build_vec_delete): Do not call resolve_offset_ref.
2204 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2206 (cp_parser_unary_expression): Use
2207 cp_parser_simple_cast_expression.
2208 (cp_parser_delete_expression): Likewise.
2209 (cp_parser_cast_expression): Likewise.
2210 (cp_parser_pm_expression): Use cp_parser_binary_op.
2211 (cp_parser_simple_cast_expression): New function.
2212 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2213 * semantics.c (finish_increment_expr): Likewise.
2214 (finish_typeof): Likewise.
2215 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2216 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2217 (decay_conversion): Do not call resolve_offset_ref.
2218 (finish_class_member_access_expr): Likewise.
2219 (convert_arguments): Likewise.
2220 (build_x_binary_op): Handle DOTSTAR_EXPR.
2221 (condition_conversion): Do not call resolve_offset_ref.
2222 (unary_complex_lvalue): Likewise.
2223 (build_static_cast): Likewise.
2224 (build_reinterpret_cast): Likewise.
2225 (build_const_cast): Likewise.
2226 (build_c_cast): Likewise.
2227 (build_modify_expr): Likewise.
2228 (convert_for_assignment): Likewise.
2229 (convert_for_initialization): Likewise.
2230 * typeck2.c (build_x_arrow): Likewise.
2231 (build_m_component_ref): Simplify.
2233 * call.c (build_scoped_method_call): Use convert_to_void.
2234 (build_method_call): Likewise.
2235 * class.c (check_field_decls): Remove dead code.
2236 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2237 * decl2.c (grok_array_decl): Remove dead code.
2238 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2239 as pointer-to-member representation.
2240 * init.c (build_offset_ref): Tidy.
2241 (build_vec_delete_1): Use convert_to_void.
2242 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2243 as pointer-to-member representation.
2245 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
2248 * decl.c (grokdeclarator): Return friend decls, not
2250 * decl2.c (grokfield): Alter friend decl check.
2251 * parser.c (struct cp_parser): Document default_arg chain on
2252 unparsed_functions_queue.
2253 (cp_parser_save_default_args): New.
2254 (cp_parser_init_declarator, cp_parser_function_definition,
2255 cp_parser_member_declaration): Call it.
2256 (cp_parser_class_specifier): Remove unused variable. Alter
2257 processing of unparsed_functions_queue.
2259 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2261 * class.c (add_method, check_field_decl): Fix format specifier.
2262 * decl.c (duplicate_decls, pushdecl, check_goto,
2263 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2264 start_enum): Likewise.
2265 * decl2.c (ambiguous_decl): Likewise.
2266 * pt.c (redeclare_class_template): Likewise.
2268 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
2271 * pt.c (type_unification_real): Don't unify exprs of error type.
2272 * tree.c (error_type): Don't die on error_type.
2275 * decl2.c (arg_assoc_class): Don't die on NULL type.
2276 * typeck.c (type_unknown_p): Don't die on untyped expressions.
2278 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2281 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2284 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2286 * error.c (locate_error): %P takes an `int', not a `tree'.
2288 2003-07-02 Jan Hubicka <jh@suse.cz>
2290 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2291 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2292 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2295 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2296 (expand_or_defer_fn): Declare.
2297 (lower_function): Declare.
2298 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2299 * decl2.c: Include cgraph.h and varpool.h
2300 (maybe_emit_vtables): Make explicit instantations as needed.
2301 (mark_member_pointers, lower_function): New functions.
2302 (finish_file): Do unit-at-a-time.
2303 * method.c (synthesize_method): Use expand_or_defer_fn.
2304 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2305 * parser.c (cp_parser_function_definition_after_decl): Use
2307 * pt.c (instantiate_decl): Likewise.
2308 * semantics.c: Include cgraph.h
2309 (expand_or_defer_fn): Break out from ...
2310 (expand_body): ... here; deal with unit-at-a-time.
2311 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2312 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2314 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2316 * call.c (resolve_scoped_fn_name): Return error_mark_node for
2319 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2322 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2325 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
2328 * error.c (dump_decl): Handle BIT_NOT_EXPR as
2329 pseudo destructor calls.
2331 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
2333 * cp-tree.h (define_label): Replace filename and lineno
2334 arguments with a location_t.
2335 * decl.c (pop_label): Adjust define_label call.
2336 (define_label): Replace filename and lineno arguments with a
2338 * semantics.c (finish_label): Adjust define_label call.
2340 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2343 * decl2.c (grokfield): Do not build NOP_EXPRs around the
2346 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
2348 * Make-lang.in: Update.
2349 * cp-lang.c (c_language): Define.
2350 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2351 * cp-tree.h (cxx_init_options): Remove.
2352 * lex.c: Don't include diagnostic.h.
2353 (cxx_init_options): Remove.
2355 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2358 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2359 tree generated within a template. Use dump_expr to dump an
2362 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2364 * mangle.c (write_expression): Exit gracefully when trying to
2367 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2370 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2371 (value- or type-) dependent expression as DECL_INITIAL is a
2372 valid constant-expression (at parser time).
2374 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2377 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2378 USING_DECL, instead of print_tree_identifier.
2380 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2382 * cp-tree.h (language_to_string): Adjust declaration.
2383 * dump.c (cp_dump_tree): Adjust usage.
2384 * error.c (dump_char): Use output_formatted_scalar. Tidy.
2385 (parm_to_string): Lose unused parameter. Tidy.
2386 (expr_to_string): Likewise.
2387 (code_to_string): Likewise.
2388 (language_to_string): Likewise.
2389 (op_to_string): Likewise.
2390 (assop_to_string): Likewise.
2391 (digit_buffer): Remove.
2392 (dump_type): Format builtin vector type as __vector__.
2394 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2396 * error.c (print_integer): Remove.
2397 (dump_type_suffix): Adjust.
2398 (dump_expr): Likewise.
2400 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2402 * error.c (print_instantiation_partial_context): Take a
2404 (print_instantiation_full_context): Adjust.
2405 (print_instantiation_context): Adjust.
2407 * cp-tree.h (cp_line_of, cp_file_of): Remove.
2408 * error.c (cp_line_of, cp_file_of): Merge into ...
2409 (location_of): ... here. Make static, return a location_t.
2410 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2412 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2415 * call.c (joust): Move warn_conversion check outwards.
2417 2003-06-27 Zack Weinberg <zack@codesourcery.com>
2419 * decl.c (build_typename_type)
2420 * mangle.c (write_template_template_arg)
2421 * parser.c (cp_parser_scope_through_which_access_occurs)
2422 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2423 * repo.c (get_base_filename)
2424 * semantics.c (maybe_convert_cond):
2425 Mark the definition static, matching the forward declaration.
2427 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2430 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2432 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2435 * decl.c (finish_enum): Implement DR377.
2437 * decl.c (cp_finish_decl): Don't make variables with reference
2438 type readonly while they are being initialized.
2440 2003-06-26 Mark Mitchell <mark@codesourcery.com>
2443 * typeck.c (build_static_cast): Avoid returning expressions with
2446 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
2448 * call.c (build_op_delete_call): Use strip_array_call. Correct
2449 error message to say 'delete' or 'delete[]'.
2451 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
2454 * pt.c (check_explicit_specialization): When looking up a
2455 template function from an identifier outside class-scope, bind
2456 it to CP_DECL_CONTEXT.
2458 2003-06-25 Mark Mitchell <mark@codesourcery.com>
2461 * search.c (lookup_base_r): Rely on accessible_p, rather than
2462 trying to emulate that logic here.
2465 * call.c (convert_like): Pass issue_conversion_warnings.
2466 (convert_like_with_context): Likewise.
2467 (convert_like_real): Add issue_conversion_warnings parameter.
2468 (perform_direct_initialization_if_possible): New function.
2469 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2470 * typeck.c (check_for_casting_away_constness): New function.
2471 (build_static_cast): Rewrite.
2473 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
2475 * call.c (enforce_access): Assert we get a binfo.
2476 (build_op_delete_call): Pass a binfo to
2477 perform_or_defer_access_check.
2478 * class.c (alter_access): Likewise.
2479 * decl.c (make_typename_type): Likewise.
2480 (make_unbound_class_template): Likewise.
2481 * lex.c (do_identifier): Likewise.
2482 * method.c (hack_identifier): Likewise.
2483 * parser.c (cp_parser_lookup_name): Likewise.
2484 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2486 * semantics.c (finish_non_static_data_member): Likewise.
2487 (perform_or_defer_access_check): Expect a binfo.
2488 * typeck.c (comptypes): Expect types.
2490 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2491 * friend.c (make_friend_class): Likewise.
2492 * pt.c (check_default_tmpl_args): Likewise.
2493 (lookup_template_class): Likewise.
2495 2003-06-24 Jan Hubicka <jh@suse.cz>
2497 * method.c (thunk_labelno): Move outside ifdef block to make garbage
2500 2003-06-24 Jan Hubicka <jh@suse.cz>
2502 * class.c (build_vtable): Make vtables.
2503 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2504 * decl2.c (output_vtable_inherit): Rename to ...
2505 (prepare_assemble_variable): ... this one; change interface.
2506 (maybe_emit_vtables): Do not call output_vtable_inherit.
2507 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2508 * cp-tree.h (prepare_assemble_variable): New.
2510 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
2512 * method.c: add prototype for make_alias_for_thunk.
2513 (thunk_labelno, make_alias_for_thunk): only define
2514 if ASM_OUTPUT_DEF is defined.
2516 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2518 * method.c (thunk_labelno): New variable.
2519 (make_alias_for_thunk): New function.
2520 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
2521 into the same section as the function it is calling.
2522 Include gt-cp-method.h.
2523 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2524 (cp/method.o): Depend on gt-cp-method.h.
2525 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2527 2003-06-23 Jan Hubicka <jh@suse.cz>
2529 * decl.c (register_dtor_fn): Mark cleanup as used.
2530 * decl2.c (mark_vtable_entries): Skip nops.
2531 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2532 (build_dynamic_cast_1): Likewise.
2533 (tinfo_base_init): Likewise.
2534 (emit_tinfo_decl): Likewise.
2536 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2538 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2541 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2544 * call.c (joust): Warn about choosing conversion sequence only if
2547 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2550 * call.c (op_error): Tidy.
2551 * error.c (dump_expr): Properly format 'T()' when T is an
2554 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2557 * decl.c (grok_op_properties): Warn possible confusing conversion
2558 only if -Wconversion.
2560 2003-06-20 Mark Mitchell <mark@codesourcery.com>
2563 * parser.c (cp_parser_class_head): See through dependent names
2564 when parsing a class-head.
2567 * pt.c (try_class_unification): Correct handling of member class
2570 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
2572 * semantics.c (genrtl_finish_function): Adjust
2573 expand_function_end call.
2575 2003-06-19 Mark Mitchell <mark@codesourcery.com>
2578 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2580 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2583 * cp-tree.h (pushdecl_class_level): Change prototype.
2584 (push_class_level_binding): Likewise.
2585 * decl.c (add_binding): Reject duplicate static data members.
2586 (pushdecl_class_level): Return a value indicating whether or not
2587 the binding was valid.
2588 (push_class_level_binding): Likewise.
2589 * semantics.c (finish_member_declaration): Don't keep invalid
2593 * call.c (initialize_reference): Do not use cp_finish_decl to emit
2594 temporary variables.
2595 * cp-tree.h (static_aggregates): Declare.
2596 (pushdecl_top_level_and_finish): Likewise.
2597 * decl.c (pushdecl_top_level_1): New function.
2598 (pushdecl_top_level): Use it.
2599 (pushdecl_top_level_and_finish): New function.
2600 (initialize_local_var): Remove redundant code.
2601 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
2603 * decl.h (static_aggregates): Remove.
2604 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2605 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2606 (tinfo_base_init): Likewise.
2608 2003-06-19 Matt Austern <austern@apple.com>
2611 * init.c (build_zero_init): Assert that number of array elements
2612 is an integer constant.
2613 (build_default_init) Don't use build_zero_init for arrays with
2614 variable number of elements.
2616 2003-06-19 Andreas Jaeger <aj@suse.de>
2618 * cp-tree.h: Remove duplicated declarations.
2620 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
2622 * pt.c: Convert to ISO C.
2623 * semantics.c: Convert to ISO C.
2625 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2627 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2628 at_least_as_qualified_p, more_qualified_p): Return bool.
2629 * typeck.c: ANSIFY function definitions.
2630 (comp_array_types): Take redeclaration bool parameter.
2631 (comptypes): Rearrange STRICT handling.
2632 (at_least_as_qualified_p, more_qualified_p,
2633 comp_cv_qualification): Cache cv quals.
2634 (compparms): Rearrange loop.
2636 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2638 * cp-tree.h (COMPARE_RELAXED): Rename to ...
2639 (COMPARE_DERIVED): ... here. Adjust comment.
2640 (resolve_typename_type_in_current_instantiation): Remove.
2641 (cp_tree_equal, comptypes): Return a bool.
2642 * cvt.c (convert_to_reference): Adjust comptypes call.
2643 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2644 (resolve_typename_type_in_current_instantiation): Remove.
2645 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2646 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2647 calls. Refactor code.
2648 * typeck.c (comp_array_types): Return bool. Lose callback.
2649 parameter. Adjust cp_tree_equal calls.
2650 (comptypes): Return bool. Adjust strict handling. Remove relaxed
2651 enumeration and java type handling. Deal with typename types here.
2652 Adjust recursive and cp_tree_equals calls. Adjust base and derived
2654 (comp_target_types): Remove unreachable code. Adjust
2655 same_or_base_type_p calls.
2656 (ptr_reasonably_similar): Adjust base and derived check.
2658 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2660 (check_return_expr): Adjust error messages.
2661 * cp-tree.def (SCOPE_REF): Correct comment.
2663 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2665 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2668 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
2670 * optimize.c (dump_function): Form complete flag name by
2671 prefixing 'fdump-' to string returned by dump_flag_name().
2673 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2675 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2678 2003-06-17 Jason Merrill <jason@redhat.com>
2681 * decl.c (grokfndecl): Don't mark a function inline for
2682 -finline-functions if it isn't defined.
2684 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2687 * class.c (handle_using_decl): Robustify.
2690 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2691 * mangle.c (struct globals): Remove internal_mangling_p.
2692 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2693 (write_template_parm): Don't write out the level number.
2694 (conv_type_names): New variable.
2695 (hash_type): New function.
2696 (compare_type): Likewise.
2697 (mangle_conv_op_name_for_type): Don't try to mangle conversion
2699 * search.c (lookup_conversion_operator): New function.
2700 (lookup_fnfields_1): Use it.
2702 2003-06-17 Andreas Jaeger <aj@suse.de>
2704 * except.c: Remove duplicate declaration of push_eh_cleanup.
2706 * call.c: Remove extra declaration of inhibit_warnings.
2708 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2710 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
2711 * mangle.c: Convert to ISO C.
2713 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2715 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2718 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2720 * tree.c: Convert to ISO C.
2722 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
2724 * cp-tree.h: Follow spelling conventions.
2725 * mangle.c: Likewise.
2726 * method.c: Likewise.
2727 * parser.c: Likewise.
2729 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
2731 * decl.c (start_function): Adjust init_function_start call.
2732 * method.c (use_thunk): Likewise.
2733 * semantics.c (genrtl_start_function): Likewise.
2735 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2737 * Make-lang.in: Remove c-options.o.
2739 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
2741 * lex.c: Convert to ISO C.
2743 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
2744 * init.c: removes use of PARAMS macro. Use ISO style function
2745 declarations. (Not copyright-significant change.)
2747 * rtti.c: Remove PARAMS.
2749 * typeck2.c: Convert to ISO C.
2751 2003-06-12 Mark Mitchell <mark@codesourcery.com>
2754 * typeck.c (build_c_cast): Check that the destination type is
2757 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2760 * cp-tree.h (finish_declarator): Remove.
2761 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2762 erroneous declarations.
2763 * semantics.c (finish_declarator): Remove.
2765 2003-06-11 Roger Sayle <roger@eyesopen.com>
2767 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2768 global static constructor/destructor if it will be empty, i.e.
2769 either doesn't call any ctors/dtors or only calls pure or const
2772 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2774 * mangle.c (tm_p.h): Include it.
2775 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2778 * tree.c (cp_cannot_inline_fn): Check for "inline" before
2781 2003-06-10 Jason Merrill <jason@redhat.com>
2784 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2786 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
2788 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2789 (start_cleanup_cnt): New.
2791 2003-06-10 Mark Mitchell <mark@codesourcery.com>
2794 * cp-tree.h (template_for_substitution): Declare.
2795 * decl2.c (mark_used): Use it when figuring out whether or not a
2797 * pt.c (template_for_substitution): Give it external linkage.
2798 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2801 2003-06-09 Zack Weinberg <zack@codesourcery.com>
2804 * mangle.c (write_real_cst): New function. Implement
2805 ABI-compliant mangling of floating-point literals when
2806 -fabi-version>=2; provide backward compatibility with 3.3 when
2807 -fabi-version=1 (with warning). Clarify commentary.
2808 (write_template_arg_literal): Use write_real_cst.
2810 2003-06-07 Andreas Jaeger <aj@suse.de>
2812 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2814 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
2816 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2817 (LANG_HOOKS_HANDLE_OPTION): Override.
2818 * cp-tree.h (cxx_init_options): Update.
2819 * lex.c (cxx_init_options): Update.
2821 2003-06-05 Jan Hubicka <jh@suse.cz>
2823 * Make-lang.in: Add support for stageprofile and stagefeedback
2825 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
2827 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2829 2003-06-04 Andreas Jaeger <aj@suse.de>
2831 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2833 2003-06-03 Jason Merrill <jason@redhat.com>
2835 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2837 * cp/decl.c (reshape_init): Handle vectors.
2839 * testsuite/g++.dg/init/array10.C: New.
2841 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2844 * pt.c (check_explicit_specialization): Check for 'static'
2847 2003-05-31 Diego Novillo <dnovillo@redhat.com>
2849 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2850 the operand of a CONSTRUCTOR node.
2852 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2854 * decl.c (cp_binding_level::this_entity): Rename from this_class.
2855 (cxx_scope_descriptor): New function.
2856 (cxx_scope_debug): Likewise.
2857 (push_binding_level): Use it.
2858 (pop_binding_level): Likewise.
2859 (suspend_binding_level): Likewise.
2860 (resume_binding_level): Likewise.
2861 (pushlevel_class): Adjust use of this_class.
2862 (pushtag): Likewise.
2863 (lookup_name_real): Likewise.
2864 (global_scope_name): New variable.
2865 (initialize_predefined_identifiers): Initialize it.
2866 (push_namespace): Use it.
2867 (make_cxx_scope): New function.
2868 (pushlevel): Use it.
2869 (pushlevel_class): Likewise.
2870 (push_binding_level): Simplify. Loose the last two arguments.
2871 (make_binding_level): Remove.
2872 (initial_push__namespace_scope): New function.
2873 (push_namespace): Use it. Simplify.
2874 (cxx_init_decl_processing): Likewise.
2875 (declare_namespace_level): Remove.
2877 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2880 * pt.c (instantiate_decl): Don't use full template arguments if
2881 we are dealing with specializations.
2883 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2885 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2886 (binding_depth): Unconditionally define.
2887 (is_class_level): Likewise.
2888 (indent): Likewise. Take an indenting parameter.
2889 (push_binding_level): Remove conditional definittion.
2890 (pop_binding_level): Likewise.
2891 (suspend_binding_level): Likewise.
2892 (resume_binding_level): Likewise.
2893 (pushlevel): Likewise.
2894 (pushlevel_class): Likewise.
2895 (poplevel_class): Likewise.
2896 (pop_everything): Likewise.
2898 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2900 * name-lookup.h (global_scope_p): New macro.
2901 * decl.c (pop_binding_level): Use it. Don't refer directly to
2902 global_binding_level.
2903 (suspend_binding_level): Likewise.
2904 (global_bindings_p): Likewise.
2905 (print_other_binding_stack): Likewise.
2906 (print_binding_stack): Likewise.
2907 (maybe_push_to_top_level): Likewise.
2908 (pushdecl_namespace_level): Likewise.
2909 (cxx_init_decl_processing): Likewise.
2910 (start_decl): Likewise.
2911 (cp_finish_decl): Likewise.
2912 (start_function): Likewise.
2913 (global_binding_level): Remove.
2915 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2917 * parser.c (cp_parser_explicit_instantiation): Restore old
2918 access before template instantiation.
2920 2003-05-23 Geoffrey Keating <geoffk@apple.com>
2922 * lang-specs.h: Use -o to specify preprocessor's output file.
2923 Make -no-integrated-cpp work when building PCH files.
2925 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2928 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2929 check for implicitly created typedef to an enum.
2931 2003-05-21 Jason Merrill <jason@redhat.com>
2933 * init.c (build_vec_delete): Copy the address into a temporary
2934 variable before calling build_vec_delete_1.
2935 * decl2.c (delete_sanity): Don't call stabilize_reference.
2937 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
2939 * pt.c (register_specialization): Update the decl's location,
2941 (check_explicit_specialization): Likewise.
2943 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2945 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2947 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
2950 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2951 if the old decl had instantiated DECL_RTL.
2952 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2954 2003-05-19 Matt Austern <austern@apple.com>
2956 * lang-options.h: Document -Wno-invalid-offsetof
2957 * typeck.c (build_class_member_access_expr): Don't complain about
2958 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2960 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2962 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2963 (binding_entry_make): Make entry->chain NULL after getting an entry.
2964 fix the spelling of chain in a comment.
2965 (binding_table_free): speed up by having temporary variable.
2966 (binding_table_new): set table->chain to be NULL after allocating
2968 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2969 binding->previous to NULL after getting an binding for speed.
2971 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
2973 * cp-tree.h (struct lang_type_class): Replace data member tags
2974 with hash-table nested_udts.
2975 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2976 * class.c (unreverse_member_declarations): Don't touch
2978 (pushclass): Use cxx_remember_type_decls.
2979 * decl.c (struct cp_binding_level): Replace data member tags with
2980 hash-table type_decls.
2981 (pop_binding_level): Handle level->type_decls.
2982 (kept_level_p): Adjust.
2983 (poplevel): Remove unused local variable.
2984 (bt_print_entry): New function.
2985 (print_binding_level): Use it.
2986 (push_namespace): Build current_binding_level->type_decls.
2987 (maybe_process_template_type_declaration): Adjust.
2988 (pushtag): Likewise.
2989 (clear_anon_tags): Use binding_table_remove_anonymous_types.
2991 (cxx_remember_type_decls): Rename from storetags. Adjust.
2992 (lookup_tag): Use binding_table_find_anon_type. Tidy.
2993 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2994 (cxx_init_decl_processing): Build global_binding_level->type_decls.
2995 (store_parm_decls): Remove pointless code.
2996 * name-lookup.c (free_binding_entry): New variable.
2997 (ENTRY_INDEX): New macro.
2998 (struct binding_table_s): New datatype.
2999 (binding_entry_make): New function.
3000 (binding_entry_free): Likewise.
3001 (binding_table_construct): Likewise.
3002 (binding_table_free): Likewise.
3003 (binding_table_new): Likewise.
3004 (binding_table_expand): Likewise.
3005 (binding_table_insert): Likewise.
3006 (binding_table_find): Likewise.
3007 (binding_table_find_anon_type): Likewise.
3008 (binding_table_reverse_maybe_remap): Likewise.
3009 (binding_table_remove_anonymous_types): Likewise.
3010 (binding_table_foreach): Likewise.
3011 * name-lookup.h (binding_table): New type.
3012 (binding_entry): Likewise.
3013 (bt_foreach_proc): Likewise.
3014 (struct binding_entry_s): New datatype.
3015 (SCOPE_DEFAULT_HT_SIZE): New macro.
3016 (CLASS_SCOPE_HT_SIZE): Likewise.
3017 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3018 (NAMESPACE_STD_HT_SIZE): Likewise.
3019 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3020 (binding_table_new): Declare.
3021 (binding_table_free): Likewise.
3022 (binding_table_insert): Likewise.
3023 (binding_table_find_anon_type): Likewise.
3024 (binding_table_reverse_maybe_remap): Likewise.
3025 (binding_table_remove_anonymous_types): Likewise.
3026 (binding_table_foreach): Likewise.
3027 (binding_table_find): Likewise.
3028 (cxx_remember_type_decls): Likewise.
3029 * pt.c (bt_instantiate_type_proc): New function.
3030 (do_type_instantiation): Use it.
3031 * search.c (lookup_field_r): Use binding_table_find.
3033 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3035 * semantics.c (perform_deferred_access_checks): Don't discard
3038 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3040 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3041 libiberty VA_ macros, always use stdarg.
3042 * rtti.c (create_pseudo_type_info): Likewise.
3043 * tree.c (build_min_nt, build_min): Likewise.
3045 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3047 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3048 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3049 collapse multiple function calls into one.
3050 * tree.c (debug_binfo): Likewise.
3052 2003-05-15 Jason Merrill <jason@redhat.com>
3055 * call.c (conditional_conversion): Don't consider implicit
3056 conversions if T2 is a base of T1.
3057 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3058 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3060 * parser.c (cp_parser_primary_expression): Convert a static data
3061 member from reference.
3063 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3065 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3066 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3067 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3068 (COMPARE_NO_ATTRIBUTES): Remove.
3069 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3072 * semantics.c (finish_typeof): Refine type-dependency check.
3074 2003-05-13 Jason Merrill <jason@redhat.com>
3076 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3077 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3079 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3081 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3083 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3085 PR c++/10230, c++/10481
3086 * semantics.c (finish_non_static_data_member): Handle when the
3087 non-static member is not from a base of the current class type.
3089 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3092 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3093 template and has dependent context.
3095 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3097 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3099 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3102 * cp-tree.h (saved_scope): Remove check_access field.
3103 (tsubst_flags_t): Remove tf_parsing.
3104 * decl.c (maybe_push_to_top_level): Don't initialize
3105 scope_chain->check_access.
3106 (make_typename_type, make_unbound_class_template): Don't use
3108 (register_dtor_fn): Use push/pop_deferring_access_checks
3109 instead of scope_chain->check_access.
3110 * method.c (use_thunk): Likewise.
3111 * parser.c (cp_parser_explicit_instantiation
3112 (cp_parser_constructor_declarator_p): Don't call
3113 push/pop_deferring_access_checks here.
3114 (cp_parser_template_argument, cp_parser_class_name): Don't use
3116 (yyparse): Check flag_access_control.
3117 * pt.c (instantiate_class_template): Call
3118 push/pop_deferring_access_checks.
3119 * semantics.c (push_deferring_access_checks): Propagate
3121 (perform_or_defer_access_check): Make sure basetype_path is
3122 a type before comparison.
3123 * call.c (build_op_delete_call, build_over_call): Use
3124 perform_or_defer_access_check.
3125 * class.c (alter_access): Likewise.
3126 * init.c (build_offset_ref): Likewise.
3127 * lex.c (do_identifier): Likewise.
3128 * method.c (hack_identifier): Likewise.
3129 * search.c (lookup_member): Likewise.
3130 * semantics.c (finish_non_static_data_member): Likewise.
3131 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3132 instead of flag_access_control.
3134 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3137 * parser.c (cp_parser_class_name): Remove check_access parameter.
3138 All caller adjusted. Update declaration.
3139 (cp_parser_lookup_name): Likewise.
3140 * semantics.c (push_deferring_access_checks): Change parameter type
3141 to enum deferring_kind. All caller adjusted.
3142 (resume_deferring_access_checks): Adjust to use new enum.
3143 (stop_deferring_access_checks): Likewise.
3144 (perform_or_defer_access_check): Likewise.
3145 * cp-tree.h (deferring_kind): New enum.
3146 (deferred_access): Adjust field type.
3147 (push_deferring_access_checks): Update declaration.
3149 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3151 PR c++/10555, c++/10576
3152 * pt.c (lookup_template_class): Handle class template with
3153 multiple levels of parameters when one of the levels contain
3156 2003-05-08 Jason Merrill <jason@redhat.com>
3158 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3159 expression. Undo some of the recent reorg.
3161 2003-05-07 Richard Henderson <rth@redhat.com>
3164 * cfns.gperf: Comment out POSIX thread cancellation points,
3165 plus abort and raise.
3166 * cfns.h: Regenerate.
3168 2003-05-07 Jason Merrill <jason@redhat.com>
3170 * call.c (build_conditional_expr): Don't assume that the folded
3171 expression has result_type.
3173 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3175 * typeck.c (build_unary_op): Deal with const qualifier in
3176 invalid pointer-to-member earlier.
3178 2003-05-05 Jason Merrill <jason@redhat.com>
3181 * call.c (conditional_conversion): Build an RVALUE_CONV if
3182 we're just changing the cv-quals.
3183 (build_conditional_expr): Don't call convert to change
3186 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3189 * typeck.c (build_unary_op): Don't output const qualifier when
3190 output invalid pointer-to-member diagnostics.
3192 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3194 * decl.c: Fix typos.
3196 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3199 * decl.c (start_function): Use same_type_p to check return type
3202 2003-05-03 Zack Weinberg <zack@codesourcery.com>
3205 * cp/typeck.c (build_x_compound_expr): No need to check
3206 extra_warnings as well as warn_unused_value.
3208 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3210 PR c++/9364, c++/10553, c++/10586
3211 * decl.c (make_typename_type): Don't crash on illegal code.
3213 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
3215 * class.c (finish_struct): Use location_t and input_location
3217 * decl.c (make_label_decl): Likewise.
3218 (use_label): Likewise.
3219 * decl2.c (warn_if_unknown_interface): Likewise.
3220 (start_static_initialization_or_destruction): Likewise.
3221 (generate_ctor_or_dtor_function): Likewise.
3222 (finish_file): Likewise.
3223 * error.c (print_instantiation_full_context): Likewise.
3224 * init.c (create_temporary_var): Likewise.
3225 * method.c (synthesize_method): Likewise.
3226 * parser.c (cp_token): Likewise.
3227 (cp_lexer_set_source_position_from_token): Likewise.
3228 (cp_lexer_get_preprocessor_token): Likewise.
3229 (cp_parser_statement): Likewise.
3230 * pt.c (tsubst_friend_function): Likewise.
3231 (instantiate_class_template): Likewise.
3232 (tsubst_decl): Likewise.
3234 (instantiate_decl): Likewise.
3235 * semantics.c (begin_class_definition): Likewise.
3236 (expand_body): Likewise.
3238 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3240 * class.c (finish_struct): Rename lineno to input_line.
3241 * decl.c (push_binding_level, pop_binding_level,
3242 suspend_binding_level, resume_binding_level, make_label_decl,
3243 use_label, start_function): Likewise.
3244 * decl2.c (warn_if_unknown_interface,
3245 start_static_initialization_or_destruction,
3246 generate_ctor_or_dtor_function, finish_file): Likewise.
3247 * error.c (cp_line_of, print_instantiation_full_context,
3248 print_instantiation_context): Likewise.
3249 * except.c (check_handlers_1, check_handlers): Likewise.
3250 * init.c (create_temporary_var): Likewise.
3251 * method.c (use_thunk, synthesize_method): Likewise.
3252 * parser.c (cp_lexer_set_source_position_from_token,
3253 cp_lexer_get_preprocessor_token): Likewise.
3254 * pt.c (push_tinst_level, pop_tinst_level,
3255 tsubst_friend_function, instantiate_class_template, tsubst_decl,
3256 tsubst, tsubst_expr, instantiate_decl): Likewise.
3257 * semantics.c (genrtl_try_block, finish_label_stmt,
3258 begin_class_definition, expand_body,
3259 genrtl_finish_function): Likewise.
3260 * tree.c (build_min_nt, build_min): Likewise.
3262 2003-05-01 Mark Mitchell <mark@codesourcery.com>
3264 * decl2.c (comdat_linkage): Don't externalize explicit
3267 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3270 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3273 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
3275 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
3276 (struct lang_identifier): ... to here.
3277 (LANG_ID_FIELD): Remove.
3278 (SET_LANG_ID): Remove.
3279 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3280 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3281 (IDENTIFIER_IMPLICIT_DECL): Likewise.
3282 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3283 (IDENTIFIER_ERROR_LOCUS): Likewise.
3284 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3286 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3289 * pt.c (convert_template_argument): Correct diagnostic.
3291 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3293 PR c++/9432, c++/9528
3294 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3296 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
3298 * decl.c (check_previous_goto_1): Adjust prototype.
3299 (check_previous_goto): Adjust use.
3300 (check_switch_goto): Likewise.
3301 (use_label): Adjust.
3302 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3303 (struct named_label_use_list): Use location_t datatype.
3305 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3308 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3309 that have not yet been written out.
3311 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3314 * class.c (layout_class_type): Mark overlong bitfields as having
3315 the maximum size permitted by their type, after layout.
3318 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3320 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3322 * call.c (build_operator_new_call): Fix typo.
3323 * lang-options.h: Likewise.
3325 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3328 * cp-tree.h (lookup_field_1): Declare it.
3329 * search.c (lookup_field_1): Make it public.
3330 * decl.c (reshape_init): Handle designated initializers.
3332 * decl.c (maybe_commonize_var): Further tweak support for systems
3333 without weak symbols.
3335 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3337 * decl.c (maybe_commonize_var): Fix thinko in last patch.
3339 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3342 * method.c (use_thunk): Decrement immediate_size_expand.
3345 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3346 (DECL_MAYBE_TEMPLATE): Remove.
3347 * class.c (fixed_type_or_null): Avoid infinite recursion.
3349 * decl.c (maybe_commonize_var): Make the code match the comments.
3350 * pt.c (instantiate_decl): Move call to import_export_decl.
3352 2003-04-26 Mark Mitchell <mark@codesourcery.com>
3354 * decl2.c (finish_file): Fix merge botch.
3356 2003-04-25 Mark Mitchell <mark@codesourcery.com>
3358 * decl2.c (finish_file): Don't call import_export_decl for
3359 functions that are not defined.
3360 (handle_class_head): Robustify.
3361 * pt.c (instantiate_decl): Do not call cp_finish_decl for
3362 variables that are not defined.
3364 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
3366 * call.c (print_z_candidates): Fix off by one error.
3368 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
3371 * call.c (joust): Don't warn about conversion ops that are exact
3372 or cv-conversions. Rearrange to avoid multiple type comparisons.
3374 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3377 * call.c (build_cxx_call): Robustify.
3379 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
3381 * Make-lang.in (lex.o): Remove mbchar.h.
3382 * lex.c (MULTIBYTE_CHARS): Lose.
3383 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3386 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3389 * cp-tree.h (duplicate_tag_error): Remove.
3390 * class.c (duplicate_tag_error): Remove.
3391 * semantics.c (begin_class_definition): Return immediately for a
3392 duplicate class definition.
3395 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3397 2003-04-22 Mark Mitchell <mark@codesourcery.com>
3400 * search.c (lookup_fnfields_1): Handle empty slots in the method
3404 * decl.c (check_elaborated_type_specifier): New function, split
3406 (xref_tag): ... here. Use the new function in more places.
3408 * rtti.c (throw_bad_typeid): Use build_cxx_call.
3410 2003-04-21 Mark Mitchell <mark@codesourcery.com>
3412 * call.c (build_over_call): Use build_cxx_call.
3413 (build_cxx_call): New method, split out of build_over_call.
3414 * cp-tree.h (language_function): Add can_throw.
3415 (build_cxx_call): Declare it.
3416 * decl.c (finish_function): If a function does not contain any
3417 calls to functions that can throw an exception, indicate that
3419 * decl2.c (mark_used): Do not defer the instantiation of
3420 functions, if the current function does not throw.
3421 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3422 * pt.c (instantiate_decl): Make sure import_export_decl is called
3423 before emitting things.
3424 * rtti.c (throw_bad_cast): Use build_cxx_call.
3425 (build_dynamic_cast_1): Likewise.
3426 * typeck.c (build_function_call): Likewise.
3428 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
3431 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3432 expressions. Reverts my 2002-08-08 patch.
3434 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3437 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3439 * cp/decl2.c (start_static_storage_duration_function): Take count
3440 arg, don't check if it wraps round.
3441 (generate_ctor_or_dtor_function): Add locus arg, use it.
3442 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3444 (finish_file): Set line numbers to past EOF for synthesized
3447 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3450 * search.c (lookup_field_1): Final scan goes backwards for
3451 types, forwards for non-types.
3453 2003-04-17 Roger Sayle <roger@eyesopen.com>
3456 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3457 "nothrow" function attributes.
3459 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3462 * pt.c (type_dependent_expression_p): Handle array new.
3464 2003-04-15 Mark Mitchell <mark@codesourcery.com>
3467 * parser.c (cp_parser_primary_expression): Reorganize logic for
3468 dealing with name lookup failures.
3470 2003-04-15 Jason Merrill <jason@redhat.com>
3472 * decl2.c (mark_used): Don't instantiate anything if
3475 2003-04-14 Ziemowit Laski <zlaski@apple.com>
3477 * tree.c (build_cplus_array_type_1): Do not call
3478 uses_template_parms() on a NULL index_type.
3480 2003-04-13 Roger Sayle <roger@eyesopen.com>
3482 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3484 2003-04-12 Mark Mitchell <mark@codesourcery.com>
3487 * init.c (build_new_1): Reorganize.
3489 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3491 * class.c (initialize_array)
3492 * decl.c (reshape_init)
3493 * decl2.c (build_expr_from_tree)
3494 * init.c (build_zero_init)
3495 * pt.c (tsubst_copy, tsubst_copy_and_build)
3496 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3497 (ptm_initializer, class_initializer, get_pseudo_ti_init)
3498 * semantics.c (finish_compound_literal)
3499 * typeck.c (build_ptrmemfunc1)
3500 * typeck2.c (store_init_value, process_init_constructor)
3501 (build_functional_cast): Use build_constructor.
3503 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3505 * call.c (print_z_candidates): Use gcc_gettext_width, not
3506 strlen, to determine how much padding to use.
3508 2003-04-10 Zack Weinberg <zack@codesourcery.com>
3510 * decl.c: Update all calls to shadow_warning.
3512 2003-04-10 Mark Mitchell <mark@codesourcery.com>
3514 * class.c (layout_class_type): Correct handling for overlong
3515 bit-fields whose width is the same as an integer type.
3517 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3519 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3520 * cp-lang.c (cp_tree_size): New function.
3521 (LANG_HOOKS_TREE_SIZE): Override.
3523 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3524 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3525 (union lang_tree_node): Remove common and srcloc members.
3526 (build_srcloc_here): Don't prototype.
3527 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3528 * pt.c (pending_templates): Correct comment.
3529 * tree.c (build_srcloc, build_srcloc_here): Kill.
3531 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3533 * call.c: Include intl.h.
3534 (print_z_candidate): Always use inform; get rid of errfn
3535 argument. Reorganize so that all the strings get picked up
3536 by xgettext. Note obligation of caller to pass first argument
3538 (print_z_candidates): Update to match. Indent second and
3539 successive candidates by strlen() of translated message.
3540 (joust): Restructure ambiguous-conversion pedwarn so that
3541 translators see a complete sentence. Update calls to
3544 * Make-lang.in (cp/call.o): Update dependencies.
3546 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3548 * decl.c (set_current_binding_level): Delete, revert last change.
3549 (current_binding_level): Modify to allow it as as lvalue.
3551 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3553 * name-lookup.c (find_binding): Pass appropriate pointer type to
3554 POP_TIMEVAR_AND_RETURN.
3556 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3558 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3559 * cp-tree.h: Don't insist on having GNUC.
3561 2003-04-03 Jason Merrill <jason@redhat.com>
3563 * cvt.c (ocp_convert): Only abort if we try to convert an object
3564 of TREE_ADDRESSABLE type.
3566 * class.c (build_vtable): Set DECL_ALIGN here.
3567 (get_vtable_decl): Not here.
3568 (layout_vtable_decl): Or here.
3569 (create_vtable_ptr): Or here.
3570 (layout_class_type): Or here.
3571 (check_bitfield_decl): Don't mess with field alignment.
3573 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3575 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3576 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3577 * rtti.c (dfs_class_hint_mark): Likewise.
3579 * decl.c (push_local_name, push_class_level_binding,
3580 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3581 functions returning void.
3582 * decl2.c (add_using_namespace): Likewise.
3584 * decl.c (print_binding_level, print_other_binding_stack,
3585 print_binding_stack): Cast argument of %p specifier to void*.
3586 * ptree.c (cxx_print_decl): Likewise.
3588 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3589 VAR_FUNCTION_OR_PARM_DECL_CHECK,
3590 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3591 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3592 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3594 * decl.c (set_current_binding_level): New macro. Use throughout
3595 when setting the current binding level.
3597 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3599 * method.c (mangling_flags): Likewise.
3601 * cp-tree.h (lang_type_header): Add __extension__ and use
3602 CHAR_BITFIELD for members.
3604 2003-04-02 Geoffrey Keating <geoffk@apple.com>
3607 * mangle.c: Include gt-cp-mangle.h.
3608 (subst_identifiers): Mark with GTY.
3609 * config-lang.in (gtfiles): Add cp/mangle.c.
3610 * Make-lang.in: (gt-cp-mangle.h): New rule.
3611 (cp/mangle.o): Depends on gt-cp-mangle.h.
3613 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
3615 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3616 after \$(srcdir)/cp/name-lookup.h.
3617 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3618 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
3619 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3620 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3622 2003-03-31 Jason Merrill <jason@redhat.com>
3625 * class.c (check_field_decl): Don't set DECL_ALIGN.
3627 2003-03-30 Mark Mitchell <mark@codesourcery.com>
3630 * decl.c (grokdeclarator): Tidy, slightly.
3631 * search.c (lookup_field_1): Add want_type parameter.
3632 (lookup_field_r): Adjust call to lookup_field_1.
3634 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3636 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3638 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3640 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
3642 (cxx_scope_find_binding_for_name): Likewise.
3643 * decl.c (find_binding: Move to name-lookup.c.
3644 (binding_for_name): Likewise.
3645 (cxx_scope_find_binding_for_name): Likewise.
3646 (BINDING_LEVEL): Remove.
3647 (push_binding): Tidy.
3648 (push_class_binding): Likewise.
3649 (pop_binding): Likewise.
3650 (poplevel): Likewise.
3651 (poplevel_class): Likewise.
3652 (set_identifier_type_value_with_scope): Likewise.
3653 (push_overloaded_decl): Likewise.
3654 (lookup_tag): Likewise.
3655 (unqualified_namespace_lookup): Likewise.
3656 (lookup_name_current_level): Likewise.
3657 (maybe_inject_for_scope_var): Likewise.
3658 (namespace_binding): Move to name-lookup.c.
3659 (set_namespace_binding): Likewise.
3660 * decl2.c (lookup_using_namespace): Tidy.
3661 (qualified_lookup_using_namespace): Likewise.
3662 (do_toplevel_using_decl): Likewise.
3663 * name-lookup.c: Include "timevar.h"
3664 * name-lookup.h (cxx_scope): Declare.
3665 (struct cxx_binding): Lose member "has_level". Adjust "scope"
3667 (BINDING_SCOPE): Adjust definition.
3668 (BINDING_HAS_LEVEL_P): Remove.
3670 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3672 * name-lookup.c: New file.
3673 * name-lookup.h: Likewise..
3674 * decl.c (push_binding): Adjust use cxx_binding_make.
3675 (free_bindings): Move to name-lookup.c
3676 (pop_binding): Use cxx_binding_free.
3677 (binding_for_name): Tidy.
3678 * cp-tree.h: Include "name-lookup.h"
3679 (cxx_binding_make): Move to name-lookup.h
3680 (cxx_binding_clear): Likewise.
3681 (struct cxx_binding): Likewise.
3682 (LOCAL_BINDING_P): Likewise.
3683 (INHERITED_VALUE_BINDING_P): Likewise.
3684 (BINDING_SCOPE): Likewise.
3685 (BINDING_HAS_LEVEL_P): Likewise.
3686 (BINDING_VALUE): Likewise.
3687 (BINDING_TYPE): Likewise.
3688 * config-lang.in (gtfiles): Add cp/name-lookup.h
3689 * Make-lang.in (cp/name-lookup.o): New rule.
3690 (CXX_OBJS): Add cp/name-lookup.o
3691 (CXX_TREE_H): Add cp/name-lookup.h
3693 2003-03-28 Jason Merrill <jason@redhat.com>
3696 * cvt.c (force_rvalue): New fn.
3697 * call.c (build_conditional_expr): Use it.
3698 * cp-tree.h: Declare it.
3700 2003-03-28 Mike Stump <mrs@apple.com>
3702 * error.c (dump_expr): Add 0x to printed hex numbers to make
3703 output match source code better.
3705 2003-03-28 Mark Mitchell <mark@codesourcery.com>
3708 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3711 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3712 non-existant ssdf_decls array.
3713 (finish_file): Call generator_ctor_or_dtor_function when there are
3714 static constructors or destructors and no other static
3717 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
3720 * decl2.c (finish_file): Don't warn about explicitly instantiated
3723 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3726 * pt.c (lookup_template_class): Only check instantiated args if
3727 they do not contain template parameters.
3729 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3732 * parser.c (cp_parser_function_definition): Set
3733 DECL_INITIALIZED_IN_CLASS for members.
3734 * pt.c (instantiate_decl): Only reduce the template args for
3735 friends that are not defined in class.
3737 2003-03-25 Jason Merrill <jason@redhat.com>
3739 * call.c (print_z_candidate): Change name of first arg to msgid.
3740 (joust): Add comment for translators.
3742 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3744 PR c++/9898, PR c++/383, DR 322
3745 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3746 through reference types on both PARM and ARG.
3748 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3751 * error.c (dump_expr) <BASELINK>: Use dump_expr.
3752 * pt.c (maybe_fold_nontype_args): New function.
3753 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3754 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3755 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3756 maybe_fold_nontype_args.
3758 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3761 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3763 2003-03-23 Mark Mitchell <mark@codesourcery.com>
3766 * typeck.c (cxx_mark_addressable): Adjust call to
3767 gen_mem_addressof or put_var_into_stack.
3769 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
3771 PR c++/9978, c++/9708
3772 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3773 * call.c (add_template_candidate_real): Adjust
3774 instantiate_template call.
3775 * class.c (resolve_address_of_overloaded_function): Likewise.
3776 * decl.c (build_enumerator): Set TREE_CONSTANT.
3777 * pt.c (check_instantiated_args): New.
3778 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3780 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3781 (reduce_template_parm_level): Likewise.
3782 (process_template_parm): Likewise.
3783 (check_explicit_specialization): Adjust instantiate_template call.
3784 (convert_template_argument): Don't check non-type argument here.
3785 (lookup_template_class): Check them here.
3786 (tsubst_friend_function): Adjust instantiate_template call.
3787 (instantiate_template): Add tsubst_flags parameter, use it. Check
3790 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3792 * decl.c: Update calls to shadow_warning.
3794 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
3797 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3798 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3800 2003-03-20 Mark Mitchell <mark@codesourcery.com>
3802 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3804 * cp/pt.c (instantiate_class_template): Fix formatting.
3806 2003-03-14 Matt Austern <austern@apple.com>
3808 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3809 (unemitted_tinfo_decl_p): Remove.
3810 (emit_tinfo_decl): Change declaration to remove unused parameter.
3811 * decl2.c (finish_file): Change tinfo emission to loop through
3812 unemitted_tinfo_decls array instead of looping through all decls.
3813 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3814 unused second parameter.
3815 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3816 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3817 (emit_tinfo_decl): remove unused second parameter, add assertion
3818 that decl hasn't already been emitted.
3820 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3822 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3823 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3826 2003-03-19 Jason Merrill <jason@redhat.com>
3828 PR c++/8316, c++/9315, c++/10136
3829 * call.c (print_z_candidate): Split out from...
3830 (print_z_candidiates): ...here.
3833 2003-03-17 Roger Sayle <roger@eyesopen.com>
3836 * decl.c (duplicate_decls): Use the new type when prototyping
3837 anticipated decls, even when the types match. This defines the
3838 exception list for the built-in function.
3840 2003-03-17 Jason Merrill <jason@redhat.com>
3843 * typeck.c (build_class_member_access_expr): Compare
3846 2003-03-17 Mark Mitchell <mark@codesourcery.com>
3849 * parser.c (cp_parser_declarator_id): Clear parser->scope.
3851 2003-03-16 Jason Merrill <jason@redhat.com>
3854 * decl.c (finish_function): Only allow the NRVO to use variables
3855 declared at function scope.
3857 2003-03-17 Andreas Jaeger <aj@suse.de>
3859 * Make-lang.in (cp/TAGS): Remove.
3861 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
3864 * cp-tree.h (struct language_function): Add in_base_initializer.
3865 (in_base_initializer): define it.
3866 (expand_member_init): Remove INIT param.
3867 * init.c (expand_member_init): Remove INIT param, return the member.
3868 (emit_mem_initializers): Set in_base_initializer.
3869 * class.c (build_base_path): Check in_base_initializer.
3870 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3871 * pt.c (tsubst_initializer_list): Likewise.
3873 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
3875 * decl.c (binding_for_name): Fix initialization thinko.
3877 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3879 Compile-time improvement: 2/n.
3880 * cp-tree.h (struct cxx_binding): New datatype;
3881 (struct lang_identifier): Use it.
3882 (LOCAL_BINDING_P): Adjust definition.
3883 (INHERITED_VALUE_BINDING_P): Likewise.
3884 (BINDING_SCOPE): Likewise.
3885 (BINDING_HAS_LEVEL_P): Likewise.
3886 (BINDING_VALUE): Likewise.
3887 (BINDING_TYPE): Likewise.
3888 (IDENTIFIER_VALUE): Likewise.
3889 (struct tree_binding): Remove.
3890 (TS_CP_BINDING): Likewise.
3891 ((union lang_tree_node): Remove field "binding".
3892 (cxx_binding_clear): New macro.
3893 (binding_for_name): Adjust return type.
3894 (qualified_lookup_using_namespace): Adjust prototype.
3895 (lookup_using_namespace): Adjust prototype.
3896 (cxx_scope_find_binding_for_name): Declare.
3897 * cp-tree.def: Remove CPLUS_BINDING definition.
3898 * decl.c (push_binding): Adjust local variable type.
3899 (add_binding): Likewise.
3900 (push_class_binding): Likewise.
3901 (pop_binding): Likewise.
3902 (poplevel): Likewise.
3903 (poplevel_class): Likewise.
3904 (free_bindings): Adjust type.
3905 (find_binding): Adjust return type, add a third parameter. Remove
3906 non-useful assertion now that we use static typing.
3907 (cxx_scope_find_binding_for_name): New function.
3908 (binding_for_name): Use it. Adjust local variable type. Simplify.
3909 (namespace_binding): Simplify.
3910 (set_namespace_binding): Likewise.
3911 (set_identifier_type_value_with_scope): Adjust local variable type.
3912 (lookup_tag): Don't type-abuse of local variable 'old'.
3913 (lookup_namespace_name): Likewise. Allocate binding on stack.
3914 (select_decl): Adjust prototype.
3915 (unqualified_namespace_lookup): Allocate binding on stack.
3916 Don't type-abuse of local variable 'val'.
3917 (lookup_name_real): Likewise.
3918 (maybe_inject_for_scope_var): Adjust local variable type.
3919 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3920 (namespace_binding): Adjust logic, simplify.
3921 (BINDING_LEVEL): Adjust definition.
3922 (push_class_level_binding): Adjust local variable type.
3923 (struct cxx_saved_binding): Adjust field 'binding' type.
3924 * decl2.c (ambiguous_decl): Adjust prototype.
3925 (lookup_using_namespace): Adjust local variable type.
3926 (qualified_lookup_using_namespace): Catch type error and correct
3927 ensueing logic error.
3928 (do_nonmember_using_decl): Adjust local variable type. Allocate
3929 temporary cxx_binding on stack.
3930 (do_toplevel_using_decl): Adjust local variable type.
3931 * ptree.c (cxx_print_cxx_binding): New function.
3932 (cxx_print_identifier): Use it.
3933 (cxx_print_xnode): Delete CPLUS_BINDING case label.
3935 2003-03-15 Roger Sayle <roger@eyesopen.com>
3937 * tree.c (count_functions): Fix whitespace.
3939 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
3941 * Make-lang.in: Update.
3943 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3946 * pt.c (maybe_process_partial_specialization): Handle
3947 member class template when enclosing class template is
3948 explicit specialized.
3949 (most_general_template): Stop looking when DECL is already
3952 2003-03-13 Jason Merrill <jason@redhat.com>
3955 * search.c (lookup_conversions): Call complete_type here.
3956 * call.c (implicit_conversion): Not here.
3958 2003-03-13 Mark Mitchell <mark@codesourcery.com>
3960 * decl2.c (do_nonmember_using_decl): Correct handling of
3961 simultaneous type/non-type bindings.
3963 * call.c (initialize_reference): Remove bogus assertion.
3964 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3966 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
3969 * expr.c (cxx_expand_expr): Return const0_rtx for throw
3972 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3975 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3976 to merge old and new declarations.
3978 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3981 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3982 (cp/g++.1): Build it from scratch in the build tree.
3983 (c++.install-man): Depend on it. Install it from the build tree.
3984 (c++.mostlyclean): Clean it.
3986 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3989 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3990 to merge old and new declarations.
3993 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3995 2003-03-11 Jason Merrill <jason@redhat.com>
3998 * search.c (lookup_member): Fix handling of functions in a class
4001 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4004 * call.c (convert_class_to_reference): Adjust usage of
4006 (any_viable): Remove.
4007 (splice_viable): Combine with any_viable.
4008 (print_z_candidates): Avoid printing duplicates.
4009 (build_user_type_conversion_1): Adjust usage of splice_viable.
4010 (build_new_function_call): Likewise.
4011 (build_operator_new_call): Likewise.
4012 (build_object_call): Likewise.
4013 (build_conditional_expr): Likewise.
4014 (build_new_op): Likewise.
4015 (build_new_method_call): Likewise.
4016 (joust): Remove spurious comment.
4017 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4018 * decl2.c (arg_assoc_class): Simplify.
4019 * friend.c (add_friend): Likewise.
4021 2003-03-11 Jason Merrill <jason@redhat.com>
4024 * decl2.c (check_classfn): A member template only matches a
4027 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4029 * Make-lang.in (CXX_C_OBJS): Update.
4030 * lang-specs.h: Don't define __GNUG__ here.
4032 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4034 * call.c (perform_overload_resolution): New function.
4035 (build_new_function_call): Use it.
4036 (build_operator_new_call): Likewise.
4037 (add_candidates): Add explicit_targs and template_only parameters.
4038 (build_new_op): Adjust accordingly.
4039 * cp-tree.h (build_operator_new_call): New function.
4040 (build_function_call_real): Remove.
4041 (build_function_call_maybe): Likewise.
4042 * init.c (build_new_1): Use build_operator_new_call.
4043 * typeck.c (build_function_call_real): Rename to ...
4044 (build_function_call): ... this.
4046 2003-03-10 Devang Patel <dpatel@apple.com>
4049 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4051 2003-03-10 Jason Merrill <jason@redhat.com>
4054 * decl.c (push_using_directive): Push before recursing.
4056 PR c++/9868, c++/9524
4057 * call.c (resolve_scoped_fn_name): Handle the case of a function
4060 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4061 argument in the pointer-to-member case.
4063 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4066 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4067 pointers to member functions.
4070 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4071 in pointer-to-member-function types.
4073 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4075 * expr.c (cplus_expand_constant): Use C90 prototype style.
4076 (cxx_expand_expr): Likewise.
4078 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4081 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4084 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4086 * lang-specs.h (c++-header): Change .pch to .gch.
4088 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4090 * cp-tree.h (cxx_init): Update prototype.
4091 * lex.c (cxx_init): Similarly.
4093 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4096 * cp-tree.h (begin_mem_initializers): Remove.
4097 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4098 Do not call finish_mem_initializers if not in a constructor.
4099 (cp_parser_class_head): Fix typo in error message.
4100 * semantics.c (begin_mem_initializers): Remove.
4101 * testsuite/g++.dg/parser/constructor1.C: New test.
4104 * call.c (add_function_candidate): Skip builtin fuctions that have
4105 not yet been declared.
4108 * init.c (build_new_1): Correct logic for determining whether or
4109 not to use an array cookie.
4112 * parser.c (cp_parser_postfix_expression): Call
4113 finish_non_static_data_member, even when processing_template_decl.
4116 * cp-tree.h (is_ancestor): New function.
4117 (handle_class_head): Change prototype.
4118 * decl2.c (is_namespace_ancestor): Rename to ...
4119 (namespace_anecestor): ... this.
4120 (set_decl_namespace): Adjust accordingly.
4121 (handle_class_head): Remove unncessary parameters.
4122 * parser.c (cp_parser_class_head): Check that
4123 nested-name-specifiers are used appropriately.
4125 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4127 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4128 (implicit_conversion): Adjust call to reference_binding.
4129 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4130 (initialize_reference): Adjust handling for references bound to
4132 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4134 (real_non_cast_lvalue_p): New method.
4135 * cvt.c (build_up_reference): Adjust use of
4136 make_temporary_var_for_ref_to_temp.
4137 * tree.c (real_non_cast_lvalue_p): New method.
4139 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4141 * except.c (init_exception_processing): Use C90 prototype style.
4142 (cp_protect_cleanup_actions): Likewise.
4143 (prepare_eh_type): Likewise.
4144 (build_eh_type_type): Likewise.
4145 (build_exc_ptr): Likewise.
4146 (do_begin_catch): Likewise.
4147 (dtor_nothrow): Likewise.
4148 (do_end_catch): Likewise.
4149 (push_eh_cleanup): Likewise.
4150 (decl_is_java_type): Likewise.
4151 (choose_personality_routine): Likewise.
4152 (initialize_handler_parm): Likewise.
4153 (expand_start_catch_block): Likewise.
4154 (expand_end_catch_block): Likewise.
4155 (begin_eh_spec_block): Likewise.
4156 (finish_eh_spec_block): Likewise.
4157 (do_allocate_exception): Likewise.
4158 (do_free_exception): Likewise.
4159 (wrap_cleanups_r): Likewise.
4160 (stabilize_throw_expr): Likewise.
4161 (build_throw): Likewise.
4162 (complete_ptr_ref_or_void_ptr_p): Likewise.
4163 (is_admissible_throw_operand): Likewise.
4164 (nothrow_libfn_p): Likewise.
4165 (can_convert_eh): Likewise.
4166 (check_handlers_1): Likewise.
4167 (check_handlers): Likewise.
4169 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4171 * call.c (merge_conversion_sequences): New function.
4172 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4173 (convert_class_to_reference): Correct handling of second
4174 standard conversion sequence in a user-defined conversion
4176 (build_user_type_conversion_1): Use merge_conversion_sequences.
4177 * cp-tree.def: Add comments for CONV nodes.
4178 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4180 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4182 * error.c (init_error): Use C90 prototype style.
4183 (dump_scope): Likewise.
4184 (dump_qualifiers): Likewise.
4185 (dump_template_argument): Likewise.
4186 (dump_template_argument_list): Likewise.
4187 (dump_template_parameter): Likewise.
4188 (dump_template_bindings): Likewise.
4189 (dump_type): Likewise.
4190 (dump_typename): Likewise.
4191 (class_key_or_enum): Likewise.
4192 (dump_aggr_type): Likewise.
4193 (dump_type_prefix): Likewise.
4194 (dump_type_suffix): Likewise.
4195 (dump_global_iord): Likewise.
4196 (dump_simple_decl): Likewise.
4197 (dump_decl): Likewise.
4198 (dump_template_decl): Likewise.
4199 (dump_function_decl): Likewise.
4200 (dump_parameters): Likewise.
4201 (dump_exception_spec): Likewise.
4202 (dump_function_name): Likewise.
4203 (dump_template_parms): Likewise.
4204 (dump_char): Likewise.
4205 (dump_expr_list): Likewise.
4206 (dump_expr): Likewise.
4207 (dump_binary_op): Likewise.
4208 (dump_unary_op): Likewise.
4209 (type_as_string): Likewise.
4210 (expr_as_string): Likewise.
4211 (decl_as_string): Likewise.
4212 (context_as_string): Likewise.
4213 (lang_decl_name): Likewise.
4214 (cp_file_of): Likewise.
4215 (cp_line_of): Likewise.
4216 (decl_to_string): Likewise.
4217 (expr_to_string): Likewise.
4218 (fndecl_to_string): Likewise.
4219 (code_to_string): Likewise.
4220 (language_to_string): Likewise.
4221 (parm_to_string): Likewise.
4222 (op_to_string): Likewise.
4223 (type_to_string): Likewise.
4224 (assop_to_string): Likewise.
4225 (args_to_string): Likewise.
4226 (cv_to_string): Likewise.
4227 (cxx_print_error_function): Likewise.
4228 (cp_diagnostic_starter): Likewise.
4229 (cp_diagnostic_finalizer): Likewise.
4230 (cp_print_error_function): Likewise.
4231 (function_category): Likewise.
4232 (print_instantiation_full_context): Likewise.
4233 (print_instantiation_partial_context): Likewise.
4234 (maybe_print_instantiation_context): Likewise.
4235 (print_instantiation_context): Likewise.
4236 (cp_printer): Likewise.
4237 (print_integer): Likewise.
4238 (print_non_consecutive_character): Likewise.
4239 (locate_error): Likewise.
4241 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4244 * call.c (reference_binding): Add ref_is_var parameter.
4245 (implicit_conversion): Adjust call to reference_binding.
4246 (initialize_reference): Likewise.
4249 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4253 * class.c (get_basefndecls): Use lookup_fnfields_1.
4255 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4258 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4260 (cp_parser_single_declaration): Likewise.
4262 2003-03-05 Jason Merrill <jason@redhat.com>
4265 * call.c (build_conditional_expr): Use convert rather than an
4268 2003-03-02 Matt Austern <austern@apple.com>
4270 * decl.c (cp_binding_level): Add static_decls varray member.
4271 (add_decl_to_level): Add static/inline namespace scope
4272 declarations to static_decls array.
4273 (wrapup_global_for_namespace): Pass static_decls only, instead of
4274 all decls, to wrapup_global_declarations/check_global_declarations.
4275 (push_namespace): Initialize static_decls for ordinary namespaces.
4276 (cxx_init_decl_processing): Initialize static_decls for global
4279 2003-03-05 Mark Mitchell <mark@codesourcery.com>
4281 * class.c (end_of_class): Correct thinko.
4283 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
4285 * config-lang.in: Replace ${libstdcxx_version} by its value.
4287 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4289 * cp-tree.h (cxx_saved_binding): Declare.
4290 (struct saved_scope): Adjust type of field 'old_binding'.
4291 * decl.c (cxx_saved_binding_make): New macro.
4292 (struct cxx_saved_binding): Define.
4293 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
4295 (maybe_push_to_top_level): Adjust local variable type.
4296 (pop_from_top_level): Likewise.
4298 2003-03-04 Tom Tromey <tromey@redhat.com>
4300 * Make-lang.in (c++.tags): New target.
4302 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
4304 * Make-lang.in: Update.
4306 2003-03-03 Jason Merrill <jason@redhat.com>
4308 * decl.c (finish_enum): Do set the type in a template. Simplify.
4309 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4311 2003-03-03 Mark Mitchell <mark@codesourcery.com>
4314 * call.c (convert_class_to_reference): Correct conversion
4316 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4317 (implicit_conversion): Adjust call to reference_binding.
4318 (add_candidate): Change type of candidates parameter.
4319 (add_function_candidate): Likewise.
4320 (add_conv_candidate): Likewise.
4321 (build_builtin_candidate): Likewise.
4322 (add_builtin_candidate): Likewise.
4323 (add_builtin_candidates): Likewise.
4324 (add_template_candidate_real): Likewise.
4325 (add_template_candidate): Likewise.
4326 (add_template_conv_candidate): Likewise.
4327 (build_user_type_conversion_1): Adjust accordingly.
4328 (build_object_call): Likewise.
4329 (build_conditional_expr): Likewise.
4330 (add_candidates): Likewise.
4331 (build_new_op): Likewise.
4332 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
4333 (build_new_method_call): Adjust calls to add_function_candidate.
4334 (make_temporary_var_for_ref_to_temp): New function.
4335 (initialize_reference): Add decl parameter.
4336 * class.c (build_rtti_vtbl_entries): Use build_address and
4338 * cp-tree.h (initialize_reference): Change prototype.
4339 (make_temporary_var_for_ref_to_temp): New function.
4340 (build_type_conversion): Change prototype.
4341 (build_address): New function.
4342 (build_nop): Likewise.
4343 * cvt.c (cp_convert_to_pointer): Adjust call to
4344 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
4346 (convert_to_pointer_force): Use build_nop.
4347 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4348 (convert_to_reference): Adjust call to build_type_conversion.
4349 (ocp_convert): Likewise.
4350 (build_type_conversion): Remove for_sure parameter.
4351 * decl.c (grok_reference_init): Use initialize_reference.
4352 * typeck.c (build_address): New function.
4353 (build_nop): Likewise.
4354 (build_unary_op): Use them.
4355 (build_ptrmemfunc): Tidy slightly.
4356 (convert_for_initialization): Adjust call to
4357 initialize_reference.
4358 * typeck2.c (store_init_value): Remove #if 0'd code.
4360 2003-03-03 Jason Merrill <jason@redhat.com>
4362 * decl.c (start_function): Clear DECL_NUM_STMTS.
4364 * class.c (get_vtable_decl): Use vtbl_type_node.
4365 (build_primary_vtable): Check for it.
4367 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
4369 * decl.c (check_initializer): Check for vector_opaque_p.
4371 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
4373 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4374 invoke an external cpp during compilation.
4376 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4378 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4380 (start_decl): Likewise.
4381 (start_function): Likewise.
4383 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
4385 * Make-lang.in (CXX_C_OBJS): Update.
4387 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4390 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4393 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
4395 * parser.c (cp_parser_init_declarator): Revert opaque
4396 vector_opaque_p change.
4397 Do not include target.h.
4399 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4402 * cp-tree.h (build_zero_init): Add parameter.
4403 * decl.c (cp_finish_decl): Adjust call.
4404 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
4406 (build_default_init): Add nelts parameter. Adjust calls to
4408 (build_new_1): Adjust call to build_default_init.
4409 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4411 2003-02-26 Devang Patel <dpatel@apple.com>
4413 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4414 required. Postpone enum setting for template decls.
4415 (build_enumerator): Delay copying value node until finish_enum
4416 (). Remove #if 0'ed code.
4417 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4418 (tsubst_copy): Add check for enum type.
4420 2003-02-25 Mark Mitchell <mark@codesourcery.com>
4423 * decl2.c (prune_vars_needing_no_initialization): Do not throw
4424 away initializations for DECL_EXTERNAL VAR_DECLs.
4425 (finish_file): Adjust accordingly.
4426 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4428 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4430 * decl.c (add_binding): Time TV_NAME_LOOKUP.
4431 (push_class_binding): Likewise.
4432 (set_namespace_binding): Likewise.
4434 2003-02-24 Mark Mitchell <mark@codesourcery.com>
4437 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4438 specializations back to the main template.
4439 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4440 * pt.c (resolve_typename_type): Likewise.
4442 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
4445 * pt.c (tsubst_copy_and_build): For a templated function inside a
4446 scope, process template arguments.
4448 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4451 * typeck2.c (abstract_virtuals_error): Don't check when
4452 TYPE is still template parameter dependent.
4454 2003-02-23 Mark Mitchell <mark@codesourcery.com>
4457 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4458 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4459 * pt.c (instantiate_class_template): Don't try to instantiate
4461 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4463 2003-02-21 Mark Mitchell <mark@codesourcery.com>
4466 * decl.c (grokdeclarator): Do not allow parameters with variably
4469 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
4471 * search.c (grow_bfs_bases): Remove. Fold into ...
4472 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4475 2003-02-20 Mark Mitchell <mark@codesourcery.com>
4478 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4479 when the G++ 3.2 ABI prevents correct compilation.
4481 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
4483 Change base class access representation. Share virtual base
4485 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4487 * cp/class.c (build_base_path): Likewise.
4488 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4489 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4490 (make_new_vtable): Adjust.
4491 (force_canonical_binfo_r): Delete.
4492 (force_canonical_binfo): Delete.
4493 (mark_primary_virtual_base): Delete.
4494 (dfs_unshared_virtual_bases): Delete.
4495 (mark_primary_bases): Adjust.
4496 (maybe_warn_about_overly_private_class): Adjust.
4497 (dfs_base_derived_from): Delete.
4498 (base_derived_from): Follow the inheritance chain.
4499 (struct find_final_overrider_data): Add vpath member.
4500 (dfs_find_final_overrider): Adjust.
4501 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4502 (find_final_overrider): Adjust.
4503 (update_vtable_entry_for_fn): Adjust.
4504 (modify_all_vtables): Adjust.
4505 (walk_subobject_offsets): Adjust.
4506 (layout_nonempty_base_or_field): Adjust.
4507 (layout_empty_base): Remove last parameter. Adjust.
4508 (build_base_field): Adjust.
4509 (build_base_fields): Adjust.
4510 (propagate_binfo_offsets): Remove last parameter. Adjust.
4511 (dfs_set_offset_for_unshared_vbases): Delete.
4512 (layout_virtual_bases): Adjust.
4513 (finish_struct_1): Adjust.
4514 (init_class_processing): Don't init access nodes.
4515 (dfs_get_primary_binfo): Delete.
4516 (get_primary_binfo): Adjust.
4517 (dump_class_hierarchy_r): Remove most derived arg, add IGO
4519 (dump_class_hierarchy): Adjust.
4520 (finish_vtbls): Adjust.
4521 (get_original_base): Delete.
4522 (build_vtt_inits): Adjust.
4523 (dfs_build_secondary_vptr_vtt_inits): Adjust.
4524 (dfs_ctor_vtable_bases_queue_p): Adjust.
4525 (build_ctor_vtbl_group): Adjust.
4526 (dfs_accumulate_vtbl_inits): Adjust.
4527 (build_vtbl_initializer): Adjust.
4528 (build_vbase_offset_vtbl_entries): Adjust.
4529 (add_vcall_offset_vtbl_entries_1): Adjust.
4530 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4531 (access_*_node): Remove.
4532 (CANONICAL_BINFO): Delete.
4533 (BINFO_UNSHARED_MARKED): Remove.
4534 (BINFO_MARKED): Set LANG_FLAG_0 directly.
4535 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4536 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4537 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4539 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4540 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4541 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4543 (BINFO_DEPENDENT_BASE_P): New.
4544 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4546 (markedp, unmarkedp): Adjust.
4547 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4548 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4549 find_vbase_instance, binfo_for_vbase): Delete.
4550 (copied_binfo, original_binfo): Declare.
4551 (finish_base_specifier): Add virtual_p arg.
4552 (unshare_base_binfos): Delete.
4553 (copy_base_binfos): Declare.
4554 (reverse_path): Delete.
4555 * cp/decl.c (xref_basetypes): Access and virtuality passed
4556 differently. Don't copy direct base binfos here. Call
4558 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4559 (initialize_vtbl_ptrs): Adjust.
4560 (expand_member_init): Adjust.
4561 * cp/parser.c (cp_parser_base_specifier): Adjust.
4562 * cp/pt.c (instantiate_class_template): Adjust.
4563 (get_template_base_recursive): Adjust.
4564 * cp/rtti.c (get_pseudo_ti_init): Adjust.
4565 (get_pseudo_ti_desc): Adjust.
4566 * cp/tree.c (unshare_base_binfos): Rename to ...
4567 (copy_base_binfos): ... here, reimplement.
4568 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4569 (reverse_path): Remove.
4570 * cp/typeck.c (get_delta_difference): Adjust error messages.
4571 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4572 * cp/search.c (lookup_base_r): Adjust.
4573 (dynamic_cast_base_recurse): Adjust.
4574 (canonical_binfo): Remove.
4575 (dfs_canonical_queue): Remove.
4576 (dfs_assert_unmarked_p): Remove.
4577 (assert_canonical_unmarked): Remove.
4578 (shared_marked_p, shared_unmarked_p): Remove.
4579 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4580 (dfs_access_in_type): Adjust.
4581 (access_in_type): Adjust.
4582 (dfs_accessible_queue_p): Adjust.
4583 (dfs_accessible_p): Adjust.
4584 (is_subobject_of_p_1, is_subobject_of_p): Remove.
4585 (struct lookup_field_info): Remove from_dep_base_p field.
4586 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4587 (lookup_field_r): Remove dependent base code.
4588 (lookup_member): Likewise.
4589 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4590 (dfs_unmarked_real_bases_queue_p): Remove.
4591 (dfs_marked_real_bases_queue_p): Remove.
4592 (dfs_skip_vbases): Remove.
4593 (dfs_get_pure_virtuals): Adjust.
4594 (markedp, unmarkedp): Adjust.
4595 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4596 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4597 (dfs_unmark): Adjust.
4598 (dfs_get_vbase_types):Remove.
4599 (dfs_build_inheritance_graph_order): Remove.
4600 (get_vbase_types): Remove
4601 (dfs_find_vbase_instance): Remove.
4602 (find_vbase_instance): Remove.
4603 (dfs_debug_unmarkedp): Adjust.
4604 (dependent_base_p): Remove.
4605 (dfs_push_type_decls): Adjust.
4606 (dfs_push_decls): Adjust.
4607 (dfs_no_overlap_yet): Adjust.
4608 (copied_binfo): New function.
4609 (original_binfo): New function.
4610 (binfo_for_vbase): Remove.
4612 2003-02-18 Zack Weinberg <zack@codesourcery.com>
4614 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4615 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4618 2003-02-18 Mark Mitchell <mark@codesourcery.com>
4621 * class.c (layout_class_type): In the 3.2 ABI, take into account
4622 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4624 2003-02-18 Matt Austern <austern@apple.com>
4626 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4628 * cp/decl.c (wrapup_globals_for_namespace): Remove special
4629 handling of global namespace.
4631 2003-02-18 Geoffrey Keating <geoffk@apple.com>
4633 * cp-tree.h (rid_to_yy): Delete.
4634 (C_RID_YYCODE): Delete.
4635 (finish_file): Delete redundant declaration.
4637 2003-02-18 Jason Merrill <jason@redhat.com>
4640 * decl.c (reshape_init): Don't mess with initializer labels.
4643 * parser.c (cp_parser_postfix_expression): Set idk properly for
4644 object->scope::member.
4646 2003-02-18 Ben Elliston <bje@redhat.com>
4649 * decl.c (duplicate_decls): Fix typo in comment.
4651 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
4654 * class.c (build_base_field): Mark fields for base classes with
4657 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4660 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4661 CONSTRUCTOR_ELTS only once.
4663 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4666 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4667 (dump_type_suffix): Likewise.
4669 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
4671 * search.c: ANSIfy function declarations and definitions.
4672 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4673 * call.c (build_method_call, resolve_scoped_fn_name,
4674 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4676 * class.c (handle_using_decl): Likewise.
4677 * decl.c (make_typename_type, make_unmound_class_template,
4678 start_decl, compute_array_index_type): Likewise.
4679 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4680 * init.c (expand_member_init, build_member_call): Likewise.
4681 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4682 resolve_typename_type): Likewise.
4683 * typeck.c (lookup_destructor, finish_class_member_access_exprm
4684 build_prememfunc_access_expr): Likewise.
4686 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4688 * decl2.c: Include "timevar.h".
4689 (namespace_ancestor): Time name lookup.
4690 (add_using_namespace): Likewise.
4691 (lookup_using_namespace): Likewise.
4692 (qualified_lookup_using_namespace): Likewise.
4693 (decl_namespace): Likewise.
4694 (lookup_arg_dependent): Likewise.
4695 * lex.c (do_identifier): Likewise.
4696 (do_scoped_id): Likewise.
4697 * pt.c (lookup_template_class): Likewise.
4699 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
4701 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4703 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4705 * decl.c: Include "timevar.h".
4706 (poplevel): Time name lookup.
4707 (find_binding): Likewise.
4708 (push_namespace): Likewise.
4709 (pop_nested_namespace): Likewise.
4710 (store_bindings): Likewise.
4711 (maybe_push_to_top_level): Likewise.
4712 (pop_from_top_level): Likewise.
4713 (push_local_name): Likewise.
4714 (pushtag): Likewise.
4715 (pushdecl): Likewise.
4716 (pushdecl_with_scope): Likewise.
4717 (pushdecl_namespace_level): Likewise.
4718 (pushdecl_top_level): Likewise.
4719 (pushdecl_class_level): Likewise.
4720 (push_class_level_binding): Likewise.
4721 (push_using_decl): Likewise.
4722 (push_using_directive): Likewise.
4723 (push_overloaded_decl): Likewise.
4724 (lookup_label): Likewise.
4725 (define_label): Likewise.
4726 (lookup_tag): Likewise.
4727 (lookup_tag_reverse): Likewise.
4728 (lookup_namespace_name): Likewise.
4729 (select_decl): Likewise.
4730 (unqualified_namespace_lookup): Likewise.
4731 (lookup_name_real): Likewise.
4732 (lookup_name_current_level): Likewise.
4733 (lookup_type_current_level): Likewise.
4734 (maybe_inject_for_scope_var): Likewise.
4735 (xref_tag): Likewise.
4737 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4739 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
4741 * decl.c (build_enumerator): Remove unneeded test.
4743 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
4745 * cp-tree.h (struct lang_type_header): Make all fields unsigned
4748 2003-02-03 Mark Mitchell <mark@codesourcery.com>
4751 * call.c (z_candidate): Add args.
4752 (convert_class_to_reference): Set it.
4753 (implicit_conversion): Tidy.
4754 (add_candidate): Add args parameter.
4755 (add_function_candidate): Adjust call to add_candidate.
4756 (add_conv_candidate): Likewise.
4757 (build_builtin_candidate): Likewise.
4758 (build_user_type_conversion_1): Eliminate wasteful tree_cons
4760 (build_new_function_call): Likewise.
4761 (build_object_call): Likewise.
4762 (add_candidates): New function.
4763 (build_new_op): Use it.
4764 (covert_like_real): Adjust call to build_over_call.
4765 (build_over_call): Remove args parameter.
4766 * operators.def: Add <?= and >?=.
4768 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
4770 * typeck.c (build_indirect_ref): Don't check flag_volatile.
4772 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4775 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4777 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
4779 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4780 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4781 (BINFO_LANG_ELTS): New #define.
4782 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4784 2003-01-30 Geoffrey Keating <geoffk@apple.com>
4786 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4788 2003-01-30 Mark Mitchell <mark@codesourcery.com>
4790 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4792 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4793 rather than TYPE_LANG_FLAG_0.
4794 (TYPE_BUILT_IN): Remove.
4795 (TYPE_DEPENDENT_P): New macro.
4796 (TYPE_DEPENDENT_P_VALID): Likewise.
4797 (lang_type_class): Add fields_readonly.
4798 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4799 * pt.c (dependent_type_p_r): New function, split out from ...
4800 (dependent_type_p): ... here. Memoize results.
4801 * search.c (dependent_base_p): Use dependent_type_p, not
4802 uses_template_parms.
4803 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4806 2003-01-29 Mark Mitchell <mark@codesourcery.com>
4808 * call.c (build_field_call): Use build_new_op, not build_opfncall.
4809 (prep_operand): New function.
4810 (build_new_op): Use it. Remove dead code.
4811 * class.c (pushclass): Change "modify" parameter type from int to
4813 (currently_open_class): Use same_type_p, not pointer equality.
4814 (push_nested_class): Adjust calls to pushclass, remove modify
4816 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4817 (pushclass): Change prototype.
4818 (push_nested_class): Likewise.
4819 (grokoptypename): Remove.
4820 (build_opfncall): Remove.
4821 (value_dependent_expression_p): Declare.
4822 (resolve_typename_type): Likewise.
4823 (resolve_typename_type_in_current_instantiation): Likewise.
4824 (enter_scope_of): Remove.
4826 (tsubst_expr): Likewise.
4827 (tsubst_copy): Likewise.
4828 (tsubst_copy_and_build): Likewise.
4829 * decl.c (warn_about_implicit_typename_lookup): Remove.
4830 (finish_case_label): Return error_mark_node for erroneous labels.
4831 (start_decl): Adjust calls to push_nested_class.
4832 (grokfndecl): Call push_scope/pop_scope around call to
4834 (grokdeclarator): Do not call tsubst.
4835 (start_function): Adjust calls to push_nested_class.
4836 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4837 (check_classfn): Use push_scope/pop_scope around type comparisions.
4838 (grokoptypename): Remove.
4839 (push_sscope): Adjust call to push_nested_class.
4840 * error.c (dump_type): Show cv-qualification of typename types.
4841 * init.c (build_member_call): Use build_new_op, not
4843 * method.c (build_opfncall): Remove.
4844 * parser.c (cp_parser): Add allow_non_constant_expression_p and
4845 non_constant_expression_p.
4846 (cp_parser_constant_expression): Adjust prototype.
4847 (cp_parser_resolve_typename_type): Remove.
4848 (cp_parser_non_constant_expression): New function.
4849 (cp_parser_non_constant_id_expression): Likewise.
4850 (cp_parser_new): Set allow_non_constant_expression_p and
4851 non_constant_expression_p.
4852 (cp_parser_primary_expression): Reject `this' and `va_arg' in
4853 constant-expressions. Note that dependent names aren't really
4855 (cp_parser_postfix_expression): Reject conversions to non-integral
4856 types in constant-expressions. Neither are increments or
4858 (cp_parser_unary_expression): Reject increments and decrements in
4859 constant-expressions.
4860 (cp_parser_direct_new_declarator): Adjust call to
4861 cp_parser_constant_expression.
4862 (cp_parser_cast_expression): Reject conversions to non-integral
4863 types in constant-expressions.
4864 (cp_parser_assignment_expression): Rejects assignments in
4865 constant-expressions.
4866 (cp_parser_expression): Reject commas in constant-expressions.
4867 (cp_parser_labeled_statement): Adjust call to
4868 cp_parser_constant_expression.
4869 (cp_parser_direct_declarator): Simplify array bounds, even in
4870 templates, when they are non-dependent. Use
4871 resolve_typename_type, not cp_parser_resolve_typename_type.
4872 (cp_parser_class_head): Use resolve_typename_type, not
4873 cp_parser_resolve_typename_type.
4874 (cp_parser_member_declaration): Adjust call to
4875 cp_parser_constant_expression.
4876 (cp_parser_constant_initializer): Likewise.
4877 (cp_parser_constructor_declarator): Use resolve_typename_type, not
4878 cp_parser_resolve_typename_type.
4879 (cp_parser_late_parsing_default_args): Adjust call to
4881 * pt.c (tsubst): Give it internal linkage.
4882 (tsubst_expr): Likewise.
4883 (tsubst_copy): Likewise.
4884 (tsubst_copy_and_build): Likewise.
4885 (push_access_scope_real): Likewise.
4886 (tsubst_friend_class): Likewise.
4887 (instantiate_class_template): Adjust call to pushclass.
4888 (value_dependent_expression_p): Give it external linkage.
4890 (resolve_typename_type): New function.
4891 * semantics.c (finish_call_expr): Use build_new_op, not
4893 (begin_constructor_declarator): Remove.
4894 (begin_class_definition): Adjust call to pushclass.
4895 (enter_scope_of): Remove.
4896 * typeck.c (comptypes): Resolve typename types as appropriate.
4897 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4898 (build_x_compound_expr): Likewise.
4899 (build_modify_expr): Likewise.
4900 (build_x_modify_expr): Likewise.
4901 * typeck2.c (build_x_arrow): Likewise.
4903 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
4905 * pt.c (last_pending_template) Declare GTY().
4907 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4910 * parser.c (cp_parser_elaborated_type_specifier): Convert
4911 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4912 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4914 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
4917 * pt.c (unify): Don't unify '*T' with 'U C::*'.
4920 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4921 inside a declarator.
4923 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
4925 * class.c (update_vtable_entry_for_fn): Add index parameter.
4926 Generate vcall thunk for covariant overriding from a virtual
4928 (dfs_modify_vtables): Adjust.
4930 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
4933 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4935 (cp_parser_base_specifier): Look for and consume a
4936 TEMPLATE keyword. Replace switch with array index.
4939 * semantics.c (finish_non_static_data_member): Remember the
4940 field's type even in a template.
4943 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4947 * parser.c (cp_parser_cast_expression): Be more tentative.
4949 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4951 * cp-tree.h (flagged_type_tree_s): Remove.
4952 (check_for_new_type): Likewise.
4953 * typeck2.c (check_for_new_type): Likewise.
4955 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
4957 * dump.c: ANSIfy function declarations and definitions.
4959 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
4961 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4964 * init.c (build_new): Set the type of the new-expression, even
4965 when processing_templte_decl.
4968 * parser.c (cp_parser_primary_expression): Improve error message
4969 for templates used in an expression context.
4972 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4973 parse when encountering "typedef".
4975 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
4977 * class.c, parser.c: ANSIfy function definitions and declarations.
4979 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4982 * error.c (dump_decl): For an OVERLOAD, just print the name of the
4983 function; it doesn't make sense to try to print its type.
4984 * semantics.c (finish_typeof): Issue errors about invalid uses.
4987 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4989 (cp_parser_expression_statement): Use it.
4990 (cp_parser_explicit_instantiation): Likewise.
4991 * pt.c (do_decl_instantiation): Improve error handling logic.
4993 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4996 * parser.c (cp_parser_using_declaration): Issue error messages
4997 about name resolution failures here.
5000 * class.c (currently_open_derived_class): Use dependent_type_p.
5001 * cp-tree.h (dependent_type_p): New function.
5002 (dependent_template_arg_p): Likewise.
5003 (dependent_template_p): Likewise.
5004 (type_dependent_expression_p): Likewise.
5005 * parser.c (cp_parser_dependent_type_p): Remove.
5006 (cp_parser_value_dependent_type_p): Likewise.
5007 (cp_parser_type_dependent_expression_p): Likewise.
5008 (cp_parser_dependent_template_arg_p): Likewise.
5009 (cp_parser_dependent_template_id_p): Likewise.
5010 (cp_parser_dependent_template_p): Likewise.
5011 (cp_parser_diagnose_invalid_type_name): Replace
5012 cp_parser_dependent_type_p with dependent_type_p, etc.
5013 (cp_parser_primary_expresion): Likewise.
5014 (cp_parser_nested_name_specifier_opt): Likewise.
5015 (cp_parser_postfix_expression): Likewise.
5016 (cp_parser_unary_expression): Likewise.
5017 (cp_parser_template_name): Likewise.
5018 (cp_parser_class_name): Likewise.
5019 (cp_parser_lookup_name): Likewise.
5020 * pt.c (dependent_type_p): New function.
5021 (value_dependent_expression_p): Likewise.
5022 (type_dependent_expression_p): Likewise.
5023 (dependent_template_arg_p): Likewise.
5024 (dependent_template_id_p): Likewise.
5025 (dependent_template_p): Likewise.
5029 * parser.c (cp_parser_simple_declaration): Return quickly when
5030 encountering errors.
5032 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5034 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5036 2003-01-17 Jason Merrill <jason@redhat.com>
5038 PR c++/9167, c++/9358
5039 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5041 2003-01-17 Jason Merrill <jason@redhat.com>
5044 * call.c (build_conditional_expr): Always do lvalue-rvalue
5047 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5050 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5051 * cp-tree.h (BASELINK_BINFO): Adjust.
5052 (BASELINK_FUNCTIONS): Likewise.
5053 (BASELINK_ACCESS_BINFO): Likewise.
5054 (tree_baselink): New structure.
5055 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5056 (lang_tree_node): Add baselink.
5057 * decl.c (cp_tree_node_structure): Add BASELINK case.
5058 * search.c (build_baselink): Adjust.
5059 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5060 test from TREE_LIST case.
5063 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5064 that a constructor cannot be declared outside of its own class.
5066 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5067 be resolved, neither can the qualified name.
5069 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5071 2003-01-16 Jason Merrill <jason@redhat.com>
5074 * init.c (build_vec_init): Re-add maxindex parm.
5075 (perform_member_init, build_aggr_init): Pass it.
5076 (build_new_1): Pass it. Use an incomplete array type for full_type.
5077 * typeck.c (build_modify_expr): Pass it.
5078 * cp-tree.h: Adjust.
5080 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5082 * cp-tree.h (tsubst_copy_and_build): New declaration.
5083 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5084 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5085 (tsubst_copy_and_build): New function.
5087 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5089 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5090 (PARTIAL_INSTANTIATION_P): Remove.
5091 (IMPLICIT_TYPENAME_P): Likewise.
5092 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5093 (build_typename_type): Remove declaration.
5094 (parmlist_is_exprlist): Likewise.
5095 * decl.c (build_typename_type): Make it static, remove third
5097 (push_class_binding): Don't do implicit typename stuff.
5098 (make_typename_type): Likewise.
5099 (lookup_name_real): Likewise.
5100 (grokdeclarator): Don't try to convert declarations into
5101 initializations. Don't do implicit typename stuff.
5102 (parmlist_is_exprlist): Remove.
5103 (xref_basetypes): Simplify.
5104 * decl2.c (grokfield): Don't try to convert declarations into
5106 (build_anon_union_vars): Do this while processing templates, too.
5107 (finish_anon_union): Likewise.
5108 * error.c (dump_type): Remove implicit typename handling.
5109 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5110 (cp_parser_primary_expression): Correct handling of names not
5111 found by unqualified name lookup in templates.
5112 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5113 of types when possible.
5114 (cp_parser_simple_declaration): Complain intelligently about some
5115 invalid declarations.
5116 (cp_parser_member_declaration): Likewise.
5117 (cp_parser_constructor_declarator_p): Don't check when we're in a
5119 * pt.c (instantiate_class_template): Remove
5120 PARTIAL_INSTANTIATION_P gunk.
5121 * search.c (lookup_field_r): Don't build implicit typenames.
5122 (marked_pushdecls_p): Don't enter dependent base types.
5123 (unmarked_pushdecls_p): Likewise.
5124 * semantics.c (begin_class_definition): Remove implicit typename
5127 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5130 * parser.c (cp_parser_direct_declarator): If accepting either
5131 abstract or named, the name must be an unqualified-id.
5133 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5135 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5137 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5139 * decl2.c (check_classfn): Fix uninitialized warning.
5140 (build_anon_union_vars): Likewise.
5141 * pt.c (tsubst_copy): Likewise.
5143 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
5145 Further conform g++'s __vmi_class_type_info to the C++ ABI
5147 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5149 (class_hint_flags): Likewise.
5151 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5153 * config-lang.in: Add semantics.c to gtfiles.
5154 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5155 (saved_scope): Likewise.
5156 (type_lookups): Remove.
5157 (deferred_access): New structure.
5158 (type_access_control): Remove.
5159 (save_type_access_control): Likewise.
5160 (reset_type_access_control): Likewise.
5161 (decl_type_access_control): Likewise.
5162 (push_deferring_access_checks): Declare.
5163 (resume_deferring_access_checks): Likewise.
5164 (stop_deferring_access_checks): Likewise.
5165 (pop_deferring_access_checks): Likewise.
5166 (get_deferred_access_checks): Likewise.
5167 (pop_to_parent_deferring_access_checks): Likewise.
5168 (perform_deferred_access_checks): Likewise.
5169 (perform_or_defer_access_check): Likewise.
5170 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5171 (make_unbound_class_template): Likewise.
5172 (grokdeclarator): Don't call decl_type_access_control.
5173 * parser.c (cp_parser_context): Remove deferred_access_checks
5174 and deferring_access_checks_p fields.
5175 (cp_parser_context_new): Adjust.
5176 (cp_parser): Remove access_checks_lists.
5177 (cp_parser_defer_access_check): Remove.
5178 (cp_parser_start_deferring_access_checks): Remove.
5179 (cp_parser_stop_deferring_access_checks): Remove.
5180 (cp_parser_perform_deferred_access_checks): Remove.
5181 (cp_parser_nested_name_specifier_opt): Use new deferred access
5183 (cp_parser_simple_declaration): Likewise.
5184 (cp_parser_template_id): Likewise.
5185 (cp_parser_function_definition): Likewise.
5186 (cp_parser_class_specifier): Likewise.
5187 (cp_parser_lookup_name): Likewise.
5188 (cp_parser_single_declaration): Likewise.
5189 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5190 (cp_parser_parse_tentatively): Likewise.
5191 (cp_parser_parse_definitely): Likewise.
5192 (yyparse): Likewise.
5193 (cp_parser_init_declarator): Remove access_checks parameter.
5194 Use new deferred access functions.
5195 (cp_parser_function_definition_from_specifiers_and_declarator):
5197 (cp_parser_class_head): Remove deferring_access_checks_p and
5198 saved_access_checks parameters. Use new deferred access functions.
5199 (cp_parser_member_specification_opt): Don't call
5200 reset_type_access_control.
5201 * search.c (type_access_control): Remove.
5202 * semantics.c: Include "gt-cp-semantics.h".
5203 (deferred_type_access_control): Remove.
5204 (deferred_access_stack): New variable.
5205 (deferred_access_free_list): Likewise.
5206 (push_deferring_access_checks): New function.
5207 (resume_deferring_access_checks): Likewise.
5208 (stop_deferring_access_checks): Likewise.
5209 (pop_deferring_access_checks): Likewise.
5210 (get_deferred_access_checks): Likewise.
5211 (pop_to_parent_deferring_access_checks): Likewise.
5212 (perform_deferred_access_checks): New function, adapted from
5213 cp_parser_perform_deferred_access_checks.
5214 (perform_or_defer_access_check): New function, adapted from
5215 cp_parser_defer_access_check.
5216 (current_type_lookups): Remove.
5217 (deferred_type_access_control): Likewise.
5218 (decl_type_access_control): Likewise.
5219 (save_type_access_control): Likewise.
5220 (reset_type_access_control): Likewise.
5221 (begin_function_definition): Adjust.
5222 (begin_class_definiton): Likewise.
5224 2003-01-13 Jason Merrill <jason@redhat.com>
5227 * class.c (build_base_path): Take the address before calling save_expr.
5229 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5230 all the ambiguous conversions are bad.
5232 * class.c (maybe_warn_about_overly_private_class): Don't stop
5233 searching when we find a nonprivate method.
5235 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5237 2003-01-12 Mark Mitchell <mark@codesourcery.com>
5239 * cp-tree.h (get_arglist_len_in_bytes): Remove.
5242 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5243 typeame types more robustly.
5245 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
5247 * parser.c: Fix comment typos.
5249 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5252 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5253 an object_type which is not a class type.
5255 2003-01-10 Geoffrey Keating <geoffk@apple.com>
5257 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5258 (cp_parser_late_parsing_default_args): Likewise.
5260 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
5262 * cfns.gperf: ANSIfy function declarations.
5263 * cfns.h: Regenerate.
5264 * cp-tree.h: ANSIfy function declarations.
5266 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5268 * cp-tree.h (reparse_absdcl_as_expr): Remove.
5269 (reparse_absdcl_as_casts): Likewise.
5270 (reparse_decl_as_expr): Likewise.
5271 (finish_decl_parsing): Likewise.
5272 * decl2.c (reparse_absdcl_as_expr): Remove.
5273 (reparse_absdcl_as_casts): Likewise.
5274 (repase_decl_as_expr): Likewise.
5275 (finish_decl_parsing): Likewise.
5280 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5282 (cp_parser_nested_name_specifier_opt): Correct the
5283 check_dependency_p false.
5284 (cp_parser_postfix_expression): Fix formatting.
5285 (cp_parser_decl_specifier_seq): Avoid looking for constructor
5286 declarators when possible.
5287 (cp_parser_template_id): Avoid performing name-lookup when
5289 (cp_parser_class_head): Do not count specializations when counting
5290 levels of templates.
5291 (cp_parser_constructor_declarator_p): Return immediately if
5292 there's no chance that the tokens form a constructor declarator.
5293 * rtti.c (throw_bad_typeid): Add comment. Do not return an
5294 expression with reference type.
5295 (get_tinfo_decl_dynamic): Do not return an expression with
5297 (build_typeid): Add comment. Do not return an expression with
5299 * typeck.c (build_class_member_access_expr): Improve handling of
5300 conditionals and comma-expressions as objects.
5302 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5304 * cfns.gperf: ANSIfy function declarations.
5305 * cfns.h: Regenerate.
5306 * cp-tree.h: ANSIfy function declarations.
5307 * parser.c: ANSIfy function declarations & definitions.
5309 * decl.c (bad_specifiers): Fix parameter order error I introduced.
5311 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5313 Merge from pch-branch:
5315 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5317 Merge to tag pch-merge-20030102:
5319 * semantics.c (finish_translation_unit): Don't call finish_file.
5320 * parser.c: Don't include ggc.h.
5321 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5322 read first token here. Don't allow PCH files after the first
5324 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5325 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5326 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5327 (cp_parser_late_parsing_for_member): Don't duplicate call to
5328 cp_lexer_set_source_position_from_token.
5329 (cp_parser_late_parsing_default_args): Likewise.
5330 (yyparse): Call finish_file after clearing the_parser.
5332 2002-12-11 Geoffrey Keating <geoffk@apple.com>
5334 * Make-lang.in: Remove $(GGC_H) from all dependencies.
5335 (CXX_TREE_H): Add $(GGC_H).
5336 * class.c: Don't include ggc.h.
5337 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5338 (method_name_cmp): Likewise.
5339 (resort_data): New variable.
5340 (resort_field_decl_cmp): New.
5341 (resort_method_name_cmp): New.
5342 (resort_sorted_fields): New.
5343 (resort_type_method_vec): New.
5344 (finish_struct_methods): Delete cast.
5345 (finish_struct_1): Delete cast.
5346 * cp-tree.h: Include ggc.h.
5347 (struct lang_type_class): Add reorder attribute to field `methods'.
5348 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5349 (resort_sorted_fields): New prototype.
5350 (resort_type_method_vec): New prototype.
5351 * call.c: Don't include ggc.h.
5353 * decl2.c: Likewise.
5356 * method.c: Likewise.
5357 * optimize.c: Likewise.
5358 * parse.y: Likewise.
5361 * search.c: Likewise.
5362 * semantics.c: Likewise.
5366 * lang-specs.h: Remove comment.
5368 2002-12-03 Geoffrey Keating <geoffk@apple.com>
5370 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5371 (operator_name_info): Mark to be saved for PCH, specify size.
5372 (assignment_operator_name_info): Likewise.
5374 2002-11-19 Geoffrey Keating <geoffk@apple.com>
5376 * decl.c (anon_cnt): Mark to be saved for PCH.
5378 2002-10-25 Geoffrey Keating <geoffk@apple.com>
5380 * lex.c (init_reswords): Delete now-untrue comment.
5381 Allocate ridpointers using GGC.
5383 2002-10-04 Geoffrey Keating <geoffk@apple.com>
5385 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5387 * g++spec.c (lang_specific_driver): Don't include standard
5388 libraries in `added'.
5390 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
5392 * decl2.c (finish_file): Call c_common_write_pch.
5393 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5395 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
5397 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5398 files when using g++.
5399 * lang-specs.h: Handle compiling C++ header files.
5401 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5403 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5405 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5407 * pt.c (push_access_scope_real): Call push_to_top_level for
5408 function in namespace scope.
5409 (pop_access_scope): Call pop_from_top_level for function in
5412 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5414 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5416 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
5418 * Make-lang.in (c++.install-common, c++.install-man,
5419 c++.uninstall): Prepend $(DESTDIR) to destination paths in
5420 all (un)installation commands.
5421 (c++.install-common): Rewrite $(LN) commands to support
5422 DESTDIR with "ln" as well as with "ln -s".
5424 2003-01-08 Jason Merrill <jason@redhat.com>
5426 * parser.c (cp_parser_primary_expression): See through explicitly
5427 scoped ALIAS_DECLs, too.
5429 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
5431 * decl.c: Remove some #if 0 code.
5433 * decl.c: ANSIfy function declarations.
5435 2003-01-07 Mark Mitchell <mark@codesourcery.com>
5437 * parser.c (cp_parser_asm_definition): Correct handling of omitted
5440 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5443 * decl.c (make_typename_type): Check access only when tf_error.
5444 (make_unbound_class_template): Likewise.
5445 * pt.c (saved_access_scope): New variable.
5446 (push_access_scope_real): New function.
5447 (push_access_scope): Likewise.
5448 (pop_access_scope): Likewise.
5449 (tsubst_default_argument): Use them.
5450 (instantiate_template): Likewise.
5451 (regenerate_decl_from_template): Likewise.
5452 (instantiate_decl): Likewise.
5453 (get_mostly_instantiated_function_type): Likewise.
5455 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
5457 * tree.c: Delete bogus #if 0 code.
5459 2003-01-07 Andreas Schwab <schwab@suse.de>
5461 * class.c (layout_class_type): Don't use
5462 PCC_BITFIELD_TYPE_MATTERS if not defined.
5464 2003-01-06 Mark Mitchell <mark@codesourcery.com>
5467 * decl2.c (build_cleanup): Mark the object as used.
5469 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5470 (hash_local_specialization): New function.
5471 (register_local_specialization): Revert 2003-01-05 change.
5472 (instantiate_decl): Use hash_local_specialization when creating
5473 the local_specializations table.
5475 * decl2.c (mark_used): Do not synthesize thunks.
5477 * class.c (layout_class_type): Correct handling of unnamed
5478 bitfields wider than their types.
5481 * parser.c (cp_parser): Remove default_arg_types. Update
5482 documentation for unparsed_functions_queues.
5483 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5485 (cp_parser_new): Don't set parser->default_arg_types.
5486 (cp_parser_function_definition): Adjust usage of
5487 unparsed_funtions_queues.
5488 (cp_parser_class_specifier): Don't mess with
5489 parser->default_arg_types. Handle default argument processing in
5490 a separate phase from function body processing.
5491 (cp_parser_template_declaration_after_export): Adjust usage of
5492 unparsed_functions_queues.
5493 (cp_parser_late_parsing_for_member): Do not handle default
5496 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
5499 * parser.c (cp_parser_declarator_kind): New enum.
5500 (cp_parser_declarator): Adjust.
5501 (cp_parser_direct_declarator): Adjust. Allow for either named or
5502 abstract declarator. Prefer abstract, if possible. Allow
5503 parenthesized function name.
5504 (cp_parser_condition): Adjust cp_parser_declarator call.
5505 (cp_parser_explicit_instantiation): Likewise.
5506 (cp_parser_init_declarator): Likewise.
5507 (cp_parser_type_id): Likewise.
5508 (cp_parser_function_definition): Likewise.
5509 (cp_parser_member_declaration): Likewise.
5510 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5511 the tentative parsing.
5512 (cp_parser_exception_declaration): Likewise.
5514 2003-01-05 Mark Mitchell <mark@codesourcery.com>
5516 * parser.c (cp_parser_template_parameter): Adjust call to
5517 cp_parser_parameter_declaration.
5518 (cp_parser_parameter_declaration_list): Likewise.
5519 (cp_parser_parameter_declaration): Replace
5520 greater_than_is_operator_p with template_parm_p parameter. Do not
5521 cache tokens for template default arguments.
5523 * pt.c (retrieve_local_specialization): Use htab_find, not
5524 htab_find_with_hash.
5525 (register_local_specialization): Use htab_find_slot, not
5526 htab_find_slot_with_hash.
5527 (instantiate_decl): Pass a hash function to htab_create.
5529 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5531 * parser.c (cp_parser_binary_expression,
5532 cp_parser_multiplicative_expression,
5533 cp_parser_additive_expression, cp_parser_shift_expression,
5534 cp_parser_relational_expression, cp_parser_equality_expression,
5535 cp_parser_and_expression, cp_parser_exclusive_or_expression,
5536 cp_parser_inclusive_or_expression,
5537 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5538 cp_parser_binary_expression): Const-ify.
5540 2003-01-04 Mark Mitchell <mark@codesourcery.com>
5542 * method.c (use_thunk): Disable access control while building the
5545 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
5547 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5550 2003-01-03 Matt Austern <austern@apple.com>
5552 * cp-tree.h (struct lang_type_class): add field for key method
5553 (cp_global_trees): rename dynamic_classes to keyed_classes
5554 (key_method): add definition
5555 * class.c (finish_struct_1): compute class's key method, and add
5556 the class to keyed_classes list if there is no key method.
5557 * decl.c (finish_function): add class to keyed_classes list if we
5558 see a definition of the class's key method.
5559 * pt.c (instantiate_class_template): add template specialization
5560 of a dynamic class to keyed_classes list.
5561 * decl2.c (key_method): remove
5562 (finish_file): iterate only through keyed_classes list when
5563 deciding whether to emit vtables, remove class from its list after
5566 2003-01-02 Jason Merrill <jason@redhat.com>
5568 * call.c (build_conditional_expr): Stabilize lvalues properly.
5569 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5570 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5571 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5573 * call.c (convert_like_real): Call decl_constant_value for an
5574 IDENTITY_CONV even if there are no more conversions.
5576 * cvt.c (build_up_reference): Don't push unnamed temps.
5578 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5580 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5581 for a backend struct.
5583 * except.c (wrap_cleanups_r, build_throw): Make
5584 MUST_NOT_THROW_EXPRs void.
5585 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5587 * init.c (build_vec_delete_1): Pre-evaluate the base address.
5589 * init.c (get_temp_regvar): Simplify logic.
5591 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5592 our replacement is a decl.
5594 * decl.c (cp_make_fname_decl): Push the decls inside the
5597 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
5600 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5603 2003-01-03 Graham Stott <graham.stott@btinternet.com>
5605 * parser.c (struct cp_parser): Add access_checks_lists field
5606 (cp_parser_simple_declaration): Use.
5607 (cp_parser_init_declarator): Likewise.
5609 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5611 * parser.c (cp_parser_declaration): Accept the __extension__
5612 keyword before the declaration.
5615 * parser.c (cp_parser_parameter_declaration): Allow attributes to
5616 appear after the declarator.
5618 * call.c (build_new_method_call): Fix typo in message format
5621 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5623 * parser.c (cp_lexer_next_token_is): Declare it inline.
5624 (cp_lexer_set_source_position_from_token): Likewise.
5625 (cp_lexer_debugging_p): Likewise.
5626 (cp_parser_parsing_tentatively): Likewise.
5627 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5628 to the cp_lexer_peek_token.
5630 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5633 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
5635 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5636 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5637 cp/repo.c: Fix copyright years.
5639 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
5641 * lex.c: Remove superfluous include of cpplib.h.
5642 (CONSTRAINT): Define without conditions.
5643 (init_cp_pragma): Use c_register_pragma.
5645 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5647 * .cvsignore: Remove.
5649 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
5651 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5652 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5653 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5654 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5655 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5657 * lex.h: parse.y is dead, so don't mention it. Also replace the
5658 copyright header with the default GNU copyright header.
5660 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5662 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5663 (lookup_name_namespace_only): Likewise.
5664 (begin_only_namespace_names): Likewise.
5665 (end_only_namespace_names): Likewise.
5666 * decl.c (only_namespace_names): Remove.
5667 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5668 (lookup_name_real): Do not check only_namespace_names.
5669 (lookup_name_namespace_only): Remove.
5670 (begin_only_namespace_names): Likewise.
5671 (end_only_namespace_names): Likewise.
5672 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5673 nested-name-specifiers more gracefully.
5674 (cp_parser_class_or_namespace_name): Avoid looking up namespace
5675 names when they cannot possibly appear.
5676 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5677 (cp_parser_elaborated_type_specifier): Likewise.
5678 (cp_parser_namespace_name): Only look for namespace names.
5679 (cp_parser_lookup_name): Add is_namespace parameter.
5680 (cp_parser_lookup_name_simple): Adjust call to
5681 cp_parser_lookup_name.
5683 * parser.c (cp_parser_dependent_type_p): Fix thinko.
5685 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5687 * .cvsignore: Update.
5689 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
5691 * class.c (modify_vtable_entry): Remove unused variable.
5692 (get_vcall_index): Always expect a non-thunk.
5693 (update_vtable_entry_for_fn): Combine covariant adjustments, when
5694 overriding a thunk. Pass get_vcall_index a non-thunk.
5696 * decl2.c (finish_file): Mark undefined inlines as extern.
5698 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5700 * cp-tree.def (RETURN_INIT): Remove.
5701 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5702 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5703 (note_level_for_for): Remove.
5704 (note_level_for_try): Likewise.
5705 (note_level_for_catch): Likewise.
5706 (finish_named_return_value): Likewise.
5707 (do_pushlevel): Change prototype.
5708 (pending_lang_change): Remove.
5709 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5711 (note_level_for_for): Remove.
5712 (note_level_for_try): Likewise.
5713 (note_level_for_catch): Likewise.
5714 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5715 * parser.c (cp_parser_context_free_list): Make it "deletable".
5716 (cp_parser_template_argument): Remove misleading comment.
5717 * pt.c (tsubst_expr): Remove RETURN_INIT code.
5718 * semantics.c (genrtl_named_return_value): Remove.
5719 (do_pushlevel): Take a scope kind as an argument.
5720 (begin_if_stmt): Adjust.
5721 (begin_while_stmt): Likewise.
5722 (begin_for_stmt): Likewise.
5723 (finish_for_init_stmt): Likewise.
5724 (begin_switch_stmt): Likewise.
5725 (begin_handler): Likewise.
5726 (begin_compound_stmt): Likewise.
5727 (finish_named_return_value): Remove.
5728 (cp_expand_stmt): Remove RETURN_INIT case.
5729 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5731 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5734 * parser.c (cp_parser_direct_declarator): Handle erroneous
5735 parenthesized declarators correctly.
5737 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5739 * cp-tree.h (pending_lang_change): Declare.
5741 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5743 * parser.c (cp_parser_context_free_list): New variable.
5744 (cp_parser_context_new): Use it.
5745 (cp_parser_error): Check return code from
5746 cp_parser_simulate_error.
5747 (cp_parser_simulate_error): Return a value.
5748 (cp_parser_id_expression): Optimize common case.
5749 (cp_parser_class_name): Likewise.
5750 (cp_parser_class_specifier): Adjust call to
5751 cp_parser_late_parsing_default_args.
5752 (cp_parser_lookup_name): Optimize common case.
5753 (cp_parser_late_parsing_for_member): Adjust call to
5754 cp_parser_late_parsing_default_args.
5755 (cp_parser_late_parsing_default_args): Add scope parameter.
5756 (cp_parser_require): Avoid creating the error message unless it's
5758 (cp_parser_parse_definitely): Place free'd contexts on the free
5761 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5763 2002-12-30 David Edelsohn <edelsohn@gnu.org>
5765 * parser.c (cp_parser_parameter_declaration_clause): Treat system
5766 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5768 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5770 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5773 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5777 * Make-lang.in (gt-cp-spew.h): Remove.
5778 * cp-tree.h (do_pending_lang_change): Remove.
5779 (do_identifier): Change prototype.
5780 (finish_id_expr): Remove.
5781 * decl.c (lookup_name_real): Remove yylex variable.
5782 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5783 * lex.c (init_cpp_parse): Remove.
5784 (reduce_cmp): Likewise.
5785 (token_cmp): Likewise.
5787 (lastiddecl): Likewise.
5788 (token_count): Likewise.
5789 (reduce_count): Likewise.
5791 (print_parse_statistics): Likewise.
5792 (do_pending_lang_change): Likewise.
5793 (do_identifier): Remove parsing parameter.
5794 * lex.h (lastiddecl): Remove.
5795 (looking_for_typename): Remove.
5796 (looking_for_template): Likewise.
5797 (pending_lang_change): Likewise.
5799 * semantics.c (finish_id_expr): Remove.
5801 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5804 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5806 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
5807 end, not the C front end.
5809 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
5811 * cp-tree.h (THUNK_TARGET): New macro.
5812 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5813 (finish_thunk): Remove offset parms.
5814 * class.c (find_final_overrider): Look through thunks.
5815 (get_vcall_index): Use THUNK_TARGET.
5816 (update_vtable_entry_for_fn): Look through thunks. Set covariant
5817 fixed offset here. Adjust finish_thunk call.
5818 (build_vtbl_initializer): Adjust finish_thunk calls.
5819 * mangle.c (mangle_call_offset): Remove superfluous if.
5820 (mangle_thunk): Adjust.
5821 * method.c (make_thunk): Adjust.
5822 (finish_thunk): Adjust.
5823 (thunk_adjust): Remove assert.
5824 (use_thunk): Use THUNK_TARGET
5825 * dump1.c (cp_dump_tree): Adjust thunk dumping.
5828 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5829 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5831 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5833 Remove traditional C constructs 4/n.
5834 * decl2.c (grok_method_quals, warn_if_unknown_interface,
5835 grok_x_components, cp_build_parm_decl, build_artificial_parm,
5836 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5837 delete_sanity, check_member_template, check_java_method,
5838 check_classfn, finish_static_data_member_decl, grokfield,
5839 grokbitfield, grokoptypename, grok_function_init,
5840 cplus_decl_attributes, constructor_name, defer_fn,
5841 build_anon_union_vars, finish_anon_union, coerce_new_type,
5842 coerce_delete_type, comdat_linkage, maybe_make_one_only,
5843 key_method, import_export_vtable, import_export_class,
5844 output_vtable_inherit, import_export_decl, import_export_tinfo,
5845 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5846 set_guard, start_objects, finish_objects,
5847 start_static_storage_duration_function,
5848 finish_static_storage_duration_function, get_priority_info,
5849 start_static_initialization_or_destruction,
5850 finish_static_initialization_or_destruction,
5851 do_static_initialization, do_static_destruction,
5852 prune_vars_needing_no_initialization, write_out_vars,
5853 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5854 add_using_namespace, merge_functions, ambiguous_decl,
5855 lookup_using_namespace, lookup_using_namespace,
5856 qualified_lookup_using_namespace, set_decl_namespace,
5857 decl_namespace, current_decl_namespace, push_decl_namespace,
5858 pop_decl_namespace, push_scope, pop_scope, add_function,
5859 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5860 lookup_arg_dependent, do_namespace_alias,
5861 validate_nonmember_using_decl, do_nonmember_using_decl,
5862 do_toplevel_using_decl, do_local_using_decl,
5863 do_class_using_decl, do_using_directive, check_default_args,
5864 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
5865 * parser.c (cp_parser_class_head): Use booleanss.
5866 * decl.c (walk_globals, walk_vtables): Likewise.
5867 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5868 walk_globals): Change return type from 'int' to 'bool'.
5869 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5870 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5871 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5872 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5873 qualifier_flags, tinfo_base_init, generic_initializer,
5874 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5875 dfs_class_hint_unmark, class_hint_flags, class_initializer,
5876 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5877 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5878 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5879 * repo.c (repo_compile_flags, repo_template_declared,
5880 repo_template_defined, repo_class_defined, repo_get_id,
5881 repo_template_used, repo_vtable_used, repo_inline_used,
5882 repo_tinfo_used, repo_template_instantiated, extract_string,
5883 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5884 finish_repo): Likewise.
5885 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5886 cxx_print_xnode): Likewise..
5887 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5888 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5889 * cxxfilt.c (demangle_it, print_demangler_list, usage,
5890 standard_symbol_characters, hp_symbol_characters, main, fatal):
5892 (strip_underscore): Change type from 'int' to 'bool'.
5893 (main): Use boolean constants.
5895 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5897 Remove traditional C constructs 3/n.
5898 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5899 build_up_reference, warn_ref_binding, convert_to_reference,
5900 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5901 convert_to_void, convert, convert_force, build_type_conversion,
5902 build_expr_type_conversion, type_promotes_to,
5903 perform_qualification_conversions): Use C90 prototyping style.
5904 * decl2.c (grok_array_decl): Use boolean constant.
5905 (delete_sanity): Likewise.
5906 * typeck.c (build_unary_op): Likewise.
5907 * semantics.c (finish_switch_cond): Likewise.
5908 * parser.c (cp_parser_direct_new_declarator): Likewise.
5909 * init.c (build_new): Likewise.
5911 2002-12-27 Mark Mitchell <mark@codesourcery.com>
5913 * Make-lang.in (po-generated): Remove parse.c.
5914 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
5915 ($(srcdir)/cp/parse.h): Remove target.
5916 ($(srcdir)/cp/parse.c): Likewise.
5917 (gt-cp-parse.h): Likewise.
5918 (gt-cp-parser.h): New target.
5919 (c++.distclean): Do not remove parse.output.
5920 (c++.maintainer-clean): Do not remove parse.c or parse.h.
5921 (cp/spew.o): Remove target.
5922 (cp/lex.o): Adjust dependencies.
5923 (cp/pt.o): Likewise.
5924 (cp/parse.o): Likewise.
5925 (cp/TAGS): Do not mention parse.c.
5926 (cp/parser.o): New target.
5927 * NEWS: Mention the new parser.
5928 * call.c (build_scoped_method_call): Simplify.
5929 (build_method_call): Likewise.
5930 (build_new_function_call): Adjust calls to add_function_candidate
5931 and add_template_candidate.
5932 (build_new_op): Improve handling of erroroneous operands.
5933 (convert_default_arg): Remove circular argument processing.
5934 (name_as_c_string): New function.
5935 (build_new_method_call): Use it.
5936 (perform_implicit_conversion): Use error_operand_p.
5937 * class.c (finish_struct_anon): Use constructor_name_p.
5938 (check_field_decls): Likewise.
5939 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5940 (resolve_address_of_overloaded_function): Likewise.
5941 (instantiate_type): Tweak pointer-to-member handling.
5942 (get_primary_binfo): Remove incorrect assertion.
5943 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5944 * cp-tree.h (DEFARG_TOKENS): New macro.
5945 (default_arg): New structure.
5946 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5947 (lang_tree_node): Add default_arg.
5948 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5949 (type_info_ref_type): New macro.
5950 (saved_scope): Make processing_explicit_instantiation a boolean.
5951 (check_access): New field.
5952 (unparsed_text): Remove.
5953 (language_function): Remove unparsed_inlines.
5954 (error_operand_p): New macro.
5955 (lang_decl): Adjust pending_inline_info.
5956 (DEFARG_POINTER): Remove.
5957 (tag_types): Add typenames.
5958 (lookup_ualified_name): Declare.
5959 (lookup_name_real): Likewise.
5960 (shadow_tag): Adjust prototype.
5961 (get_scope_of_declarator): Declare it.
5962 (process_next_inline): Remove it.
5963 (check_for_missing_semicolon): Likewise.
5964 (maybe_get_template_decl_from_type_decl): Declare it.
5965 (finish_label_stmt): Adjust prototype.
5966 (finish_non_static_data_meber): Declare it.
5967 (finish_pseudo_destructor_call_expr): Rename to ...
5968 (finish_pseudo_destructor_expr): ... this.
5969 (finish_compound_literal): Declare it.
5970 (begin_inline_definitions): Remove it.
5971 (init_spew): Remove.
5972 (peekyylex): Likewise.
5973 (arbitrate_lookup): Likewise.
5974 (frob_opname): Likewise.
5975 (maybe_snarf_defarg): Likewise.
5976 (add_defarg_fn): Likewise.
5977 (do_pending_defargs): Likewise.
5978 (done_pending_defargs): Likewise.
5979 (unprocessed_defarg_fn): Likewise.
5980 (replace_defarg): Likewise.
5981 (end_input): Likewise.
5982 (get_overloaded_fn): Likewise.
5983 * cvt.c (convert_to_reference): Improve error handling.
5984 * decl.c (lookup_name_real): Do not declare it static.
5985 (maybe_push_to_top_level): Set check_access.
5986 (identifier_type_value): Adjust call to lookup_name_real.
5987 (lookup_qualified_name): New method.
5988 (lookup_name_real): Remove special-case parsing code.
5989 (lookup_name-nonclass): Adjust call to lookup_name_real.
5990 (lookup_name_namespace_only): Likewise.
5991 (lookup_name): Likewise.
5992 (check_tag_decl): Return the type declared.
5993 (shadow_tag): Likewise.
5994 (register_dtor_fn): Tweak check_access.
5995 (grokfndecl): Use constructor_name_p.
5996 (get_scope_of_declarator): New function.
5997 (grokdeclarator): Obscure tweaks for slightly different declarator
5999 (start_method): Return error_mark_node to indicate failure.
6000 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6001 * decl2.c (constructor_name_full): Simplify.
6002 (constructor_name): Use it.
6003 (build_expr_from_tree): Adjust for changes to do new parser.
6004 (push_scope): Improve robustness.
6005 (validate_nonmember_using_decl): Process declarations, not names.
6006 (do_class_using_decl): Likewise.
6007 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6009 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6010 * expr.c (cxx_expand_expr): Handle BASELINKs.
6011 * init.c (member_init_ok_or_else): Issue more errors.
6012 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6013 * lex.c: Do not include parse.h.
6014 (yypring): Do not declare.
6016 (make_reference_declarator): Remove error-generating code.
6017 (rid_to_yy): Remove.
6018 (cxx_init): Do not call init_spew.
6020 (check_for_missing_semicolon): Remove.
6021 * lex.h (got_scope): Remove.
6022 (got_object): Remove.
6023 * method.c (hack_identifier): Use finish_non_static_data_member.
6024 (implicitly_declare_fn): Adjust use of constructor_name.
6025 * parser.c: New file.
6026 * pt.c (parse.h): Do not include it.
6027 (maybe_get_template_decl_from_template): Do not declare it.
6028 (finish_member_template_decl): Tweak.
6029 (begin_explicit_instantiation): Adjust for
6030 processing_explicit_instantiation being boolean.
6031 (end_explicit_instantiation): Likewise.
6032 (maybe_process_partial_specialization): Tighten specialization
6034 (retrieve_local_specialization): Adjust ue of hash table.
6035 (eq_local_specializations): New function.
6036 (register_local_specialization): Likewise.
6037 (push_template_decl_real): Remove unnecessary test.
6038 (maybe_get_template_decl_from_type_decl): Don't make it static.
6039 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6040 (tsubst_copy): Use retrieive_local_specialization to handle
6041 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6042 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6043 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6044 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6045 (unify): Tweak handling of CONST_DECLs.
6046 (regenerate_decl_from_template): Use push_nested_class.
6047 (template_for_substitution): New funciton.
6048 (instantiate_decl): Use it. Register parameters as local
6050 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6051 (build_typeid): Use it.
6052 (get_typeid): Likeise.
6053 * search.c (accessible_p): Use check_access, not
6054 flag_access_control.
6055 (adjust_result_of_qualified_name_lookup): Pay attention to the
6057 * semantics.c (finish_asm_stmt): Adjust error handling.
6058 (finish_label_stmt): Return the statement.
6059 (finish_non_static_data_member): New function.
6060 (finish_class_expr): Handle BASELINKs.
6061 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6062 (finish_object_call_expr): Simplify handling during templates.
6063 (finish_pseudo_destructor_call_expr): Rename to ...
6064 (finish_pseudo_dtor_expr): ... this.
6065 (finish_compound_literal): New function.
6066 (begin_inline_definitions): Remove.
6067 (finish_sizeof): Remove special template handling.
6068 * spew.c: Do not include parse.h.
6069 * tree.c (get_overloaded_fn): Remove.
6070 * typeck.c (build_class_member_access_expr): Handle
6071 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6072 (lookup_destructor): New function.
6073 (finish_class_member_access_expr): Use it.
6074 (convert_arguments): Simplify.
6075 (build_unary_op): Handle BASELINKs.
6077 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6080 * decl2.c (mark_used): Defer inline functions.
6081 (finish_file): Merge deferred_fns loops. Check all used
6082 inline functions have a definition.
6083 * method.c (make_thunk): Thunks are not inline.
6085 PR c++/5116, c++/764
6086 * call.c (build_new_op): Make sure template class operands are
6089 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6092 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6093 * call.c (resolve_scoped_fn_name): New function. Deal with
6094 more template expansion. Broken out of ...
6095 * parse.y (parse_finish_call_expr): ... here. Call it.
6096 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6097 resolve_scoped_fn_name and build_call_from_tree.
6100 * decl.c (duplicate_decls): Templates may be disambiguated by
6104 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6105 conversion operators on failure.
6107 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6109 Remove traditional C constructs 2/n.
6110 * call.c (tourney, build_field_call, equal_functions, joust,
6111 compare_ics, build_over_call, build_java_interface_fn_ref,
6112 convert_like_real, op_error, build_object_call, resolve_args,
6113 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6114 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6115 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6116 standard_conversion, reference_related_p,
6117 reference_compatible_p, convert_class_to_reference,
6118 direct_reference_binding, reference_binding,
6119 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6120 add_template_conv_candidate, any_viable, any_strictly_viable,
6121 build_this, splice_viable, print_z_candidates,
6122 build_user_type_conversion, build_new_function_call,
6123 conditional_conversion, build_conditional_expr, build_new_op,
6124 build_op_delete_call, enforce_access, call_builtin_trap,
6125 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6126 convert_default_arg, type_passed_as, convert_for_arg_passing,
6127 in_charge_arg_for_name, is_properly_derived_from,
6128 maybe_handle_implicit_object, maybe_handle_ref_bind,
6129 source_type, add_warning, can_convert, can_convert_arg,
6130 perform_implicit_conversion, can_convert_arg_bad,
6131 initialize_reference, add_conv_candidate,
6132 add_template_candidate_real, add_template_candidate): Ansify.
6134 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6137 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6138 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6139 if in a template scope.
6140 * parse.y (unoperator): Return the scope.
6141 (operator_name): Adjust grokoptypename call.
6143 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6145 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6146 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
6147 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6149 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
6151 * ChangeLog: Fix a typo.
6152 * class.c: Fix comment typos.
6153 * cp-tree.h: Likewise.
6155 2002-12-18 Jason Merrill <jason@redhat.com>
6157 Handle anonymous unions at the tree level.
6158 C++ ABI change: Mangle anonymous unions using the name of their
6159 first named field (by depth-first search). Should not cause
6160 binary compatibility problems, though, as the compiler previously
6161 didn't emit anything for affected unions.
6162 * cp-tree.def (ALIAS_DECL): New tree code.
6163 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
6164 first field, not the largest.
6165 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
6166 push the decl, and write it out at namespace scope.
6167 * decl.c (lookup_name_real): See through an ALIAS_DECL.
6168 (pushdecl): Add namespace bindings for ALIAS_DECLs.
6169 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6170 of a decl which doesn't have one.
6171 * typeck.c (build_class_member_access_expr): Don't recurse if
6172 we already have the type we want.
6174 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6177 * friend.c (make_friend_class): Allow partial specialization
6178 when declaration is not a template friend.
6180 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6183 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6184 TREE_PROTECTED to created decl nodes.
6186 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6188 * class.c (build_base_field): Do not set DECL_PACKED on the
6191 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
6193 * cp-tree.h (struct tree_srcloc): Use location_t.
6194 (SOURCE_LOCUS): New.
6195 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6197 2002-12-17 Jason Merrill <jason@redhat.com>
6199 * decl.c (finish_function): Also complain about no return in
6201 * semantics.c (finish_return_stmt): Also call check_return_expr in
6203 * typeck.c (check_return_expr): In a template, just remember that we
6206 2002-12-16 Jason Merrill <jason@redhat.com>
6208 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6211 * semantics.c (do_pushlevel): Call pushlevel after adding the
6213 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6214 * parse.y (function_body): Go back to using compstmt.
6215 * decl.c (pushdecl): Skip another level to get to the parms level.
6217 * call.c (build_new_method_call): Use is_dummy_object to determine
6218 whether or not to evaluate the object parameter to a static member
6221 2002-12-14 Jason Merrill <jason@redhat.com>
6223 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6224 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6225 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6226 don't bother with an AGGR_INIT_EXPR.
6227 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6228 just generate a new decl normally. Take return slot parm.
6229 * cp-tree.h: Adjust prototype.
6231 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
6234 * cvt.c (convert_to_pointer_force): Don't try comparing against
6237 2002-12-13 Geoffrey Keating <geoffk@apple.com>
6239 * cp-tree.h: Have the multiple-include guards around
6242 2002-12-10 David Edelsohn <edelsohn@gnu.org>
6244 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6246 (snarf_method): Same.
6247 (snarf_defarg): Same.
6249 2002-12-10 Mark Mitchell <mark@codesourcery.com>
6252 * pt.c (tsubst_copy): Handle destructor names more correctly.
6254 2002-12-10 Matt Austern <austern@apple.com>
6256 * cp-tree.h: get rid of needs_virtual_reinit bit.
6258 2002-12-09 Mark Mitchell <mark@codesourcery.com>
6260 * NEWS: Document removal of in-class initialization extension for
6261 static data members of non-arithmetic, non-enumeration type.
6262 * decl.c (check_static_variable_definition): Do not allow that
6264 * decl2.c (grokfield): Do not call digest_init when processing
6267 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6269 * error.c (dump_expr): Fix format specifier warning.
6271 2002-12-04 Geoffrey Keating <geoffk@apple.com>
6273 * class.c (finish_struct_1): Correct comment.
6274 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6276 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6279 * error.c (dump_expr): Don't ever try to dump a non-existent
6282 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
6284 Implement covariant returns.
6285 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6286 (struct lang_decl_flags): Add this_thunk_p flag.
6287 Rename vcall_offset to virtual_offset.
6288 (struct lang_decl): Rename delta to fixed_offset.
6289 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6290 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6291 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6292 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6293 (make_thunk): Add this_adjusting arg.
6294 (finish_thunk): Declare.
6295 (mangle_thunk): Add this_adjusting arg.
6296 * class.c (get_vcall_index): Use base function for lookup.
6297 (update_vtable_entry_for_fn): Generate covariant thunk.
6298 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6299 (build_vtbl_initializer): Use base function for lookup.
6300 Finish covariant thunk here. Adjust thunk generation.
6301 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6302 Adjust thunk dumping.
6303 * mangle.c (mangle_call_offset): New function.
6304 (mangle_thunk): Adjust for covariant thunks.
6305 * method.c (make_thunk): Adjust. Do not set name here.
6306 (finish_thunk): New function. Set name here.
6307 (use_thunk): Generate covariant thunks too.
6308 (thunk_adjust): New function.
6309 * search.c (covariant_return_p): Remove. Fold into ...
6310 (check_final_overrider): ... here. Simplify.
6311 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6313 2002-12-03 Jason Merrill <jason@redhat.com>
6316 * call.c (build_over_call): Check specifically for TARGET_EXPR
6319 PR c++/8461, c++/8625
6320 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6321 (cp_convert_parm_for_inlining): Remove.
6322 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6324 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6325 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6327 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6328 an ambiguous conversion.
6330 2002-12-03 Mark Mitchell <mark@codesourcery.com>
6333 * decl.c (reshape_init): Handle erroneous initializers.
6335 2002-12-02 Mark Mitchell <mark@codesourcery.com>
6338 * spew.c (remove_last_token): Make sure that last_chunk is set
6342 * error.c (dump_expr): Handle character constants with
6345 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6348 * decl.c (grokdeclarator): Require class-key for all friend class.
6349 Output the correct type and context in the error message.
6351 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6354 * pt.c (unify): Use variably_modified_type_p to test validity of
6355 template argument types.
6358 * cp-tree.h (lang_type_class): Add typeinfo_var.
6359 (CLASSTYPE_TYPEINFO_VAR): New macro.
6360 * rtti.c (get_tinfo_decl): Use it.
6363 * init.c (expand_member_init): Always get the main variant of a
6366 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6370 * decl.c (cxx_init_decl_processing): Use size_type_node, not
6372 * decl2.c (coerce_new_type): Likewise.
6373 * except.c (do_allocate_exception): Likewise.
6375 2002-11-30 Zack Weinberg <zack@codesourcery.com>
6377 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6378 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6379 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6380 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6381 typeck2.c: Include coretypes.h and tm.h.
6382 * Make-lang.in: Update dependencies.
6384 2002-11-30 Mark Mitchell <mark@codesourcery.com>
6387 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6388 (check_initializer): Validate the type of the initialized
6389 variable, even if the initializer is absent.
6390 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6393 * typeck.c (convert_for_assignment): Do not use
6394 decl_constant_value on the operand.
6397 * pt.c (instantiate_decl): Handle template friends defined outside
6398 of the class correctly.
6400 2002-11-29 Joe Buck <jbuck@synopsys.com>
6402 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6405 2002-11-29 Mark Mitchell <mark@codesourcery.com>
6407 * class.c (walk_subobject_offsets): Recur on binfos as well as on
6409 (layout_nonempty_base_or_field): Pass it a binfo when processing a
6411 (layout_empty_base): Likewise.
6412 (build_base_field): Likewise.
6414 2002-11-27 Mark Mitchell <mark@codesourcery.com>
6416 * class.c (build_base_field): Make sure we get the canonical base
6417 when descending through primary bases.
6419 2002-11-26 Geoffrey Keating <geoffk@apple.com>
6421 * decl.c (check_initializer): Don't error on initialisation of
6422 a scalar with a brace-enclosed expression.
6424 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
6426 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6427 (template_parms_equal): Remove prototype.
6428 * typeck.c (buuld_indirect_ref): Reformat.
6430 2002-11-25 Jason Merrill <jason@redhat.com>
6432 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6435 2002-11-25 Mark Mitchell <mark@codesourcery.com>
6437 * tree.c (cp_build_qualified_type_real): Correct handling of
6439 * class.c (walk_subobject_offsets): Fix thinko.
6440 (build_base_field): Record offsets of empty bases in primary
6442 (layout_class_type): Record offsets of empty bases in fields.
6444 * search.c (is_subobject_of_p_1): Fix thinko.
6445 (lookup_field_queue_p): Likewise.
6447 2002-11-24 Mark Mitchell <mark@codesourcery.com>
6449 * class.c (layout_class_type): Reuse tail padding when laying out
6452 2002-11-22 Mark Mitchell <mark@codesourcery.com>
6454 * rtti.c (qualifier_flags): Fix thinko.
6456 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6458 Remove traditional C constructs 1/n.
6459 * cp-tree.h (init_method, set_mangled_name_for_decl,
6460 build_opfncall, hack_identifier, make_thunk, use_thunk,
6461 synthesize_method, implicitly_declare_fn,
6462 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6463 maybe_clone_body): Remove use of PARAMS.
6465 * method.c (do_build_assign_ref, do_build_copy_constructor,
6466 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6468 (synthesize_method): Use 'bool' type and constants instead of
6470 (locate_copy): Likewise.
6471 (implicitly_declare_fn): Likewise.
6473 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6474 Remove old-style declaration.
6475 (maybe_clone_body): Use 'bool' type and constants.
6477 2002-11-21 Glen Nakamura <glen@imodulo.com>
6480 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6481 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6482 of the branches of a COND_EXPR.
6484 2002-11-19 Mark Mitchell <mark@codesourcery.com>
6486 * pt.c (for_each_template_parm): Free allocated memory.
6487 * search.c (is_subobject_of_p_1): New function.
6488 (is_subobject_of_p): Avoid walking virtual bases multiple times.
6490 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6492 * g++spec.c (lang_specific_spec_functions): New.
6494 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
6496 * ChangeLog: Follow spelling conventions.
6497 * class.c: Likewise.
6498 * decl2.c: Likewise.
6500 2002-11-14 Zack Weinberg <zack@codesourcery.com>
6502 * search.c (dfs_push_decls): Do not try to reorder elements
6503 3..n of method_vec if method_vec has only two elements.
6504 Reverse order of two tests to avoid accessing unallocated
6507 2002-11-14 Mark Mitchell <mark@codesourcery.com>
6509 * class.c (dfs_find_final_overrider): Adjust so that the most
6510 derived object is a binfo, rather than a class type.
6511 (find_final_overrider): Likewise.
6512 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6513 (add_vcall_offset): Likewise.
6515 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6518 * pt.c (instantiate_template): Push class scope for member
6520 (get_mostly_instantiated_function_type): Likewise. Don't call
6521 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
6522 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6523 * mangle.c (write_encoding, write_unqualified_name): Adjust.
6525 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6527 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6528 vcall offfsets. Split out ...
6529 (add_vcall_offset): ... new function.
6532 * pt.c (for_each_template_parm): Add htab parameter.
6533 (process_partial_specialization): Adjust call.
6534 (push_template_decl_real): Likewise.
6535 (pair_fn_data): Add visited.
6536 (for_each_template_parm_r): Avoid walking duplicates more than
6538 (uses_template_parms): Adjust call to for_each_template_parm.
6540 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6542 * class.c (add_implicitly_declared_members): Put implicitly
6543 declared functions at the end of TYPE_METHODs when -fabi-version
6546 2002-11-05 Geoffrey Keating <geoffk@apple.com>
6548 * decl2.c (finish_file): Correct spelling.
6550 2002-11-03 Mark Mitchell <mark@codesourcery.com>
6552 * call.c (build_special_member_call): Do not try to lookup VTTs by
6554 * class.c (vtbl_init_data): Add generate_vcall_entries.
6555 (get_vtable_decl): Do not look up virtual tables by name.
6556 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6557 (set_primary_base): Do not set CLASSTYPE_RTTI.
6558 (determine_primary_base): Likewise.
6559 (get_matching_virtual): Remove.
6560 (get_vcall_index): New function.
6561 (update_vtable_entry_for_fn): Do not try to use virtual thunks
6562 when they are not required. Assign vcall indices at this point.
6563 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6564 Do update dynamic_classes.
6565 (build_vtt): Do not add VTTs to the symbol table.
6566 (build_ctor_vtbl_group): Likewise.
6567 (build_vtbl_initializer): Simplify handling of vcall indices.
6568 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6569 for the most derived class.
6570 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6572 * cp-tree.h (dynamic_classes): New macro.
6573 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
6574 (CLASSTYPE_RTTI): Remove.
6575 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6576 (CLASSTYPE_VCALL_INDICES): New macro.
6577 (CLASSTYPE_VTABLES): Likewise.
6578 (BV_USE_VCALL_INDEX_P): Remove.
6579 (build_vtable_path): Remove.
6580 * decl2.c (finish_vtable_vardecl): Remove.
6581 (key_method): Remove #if 0'd code.
6582 (finish_vtable_vardecl): Rename to ...
6583 (maybe_emit_vtables): ... this.
6584 (finish_file): Use it.
6585 * search.c (look_for_overrides_here): Update comment.
6587 2002-11-01 Zack Weinberg <zack@codesourcery.com>
6590 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6592 2002-10-30 Jason Merrill <jason@redhat.com>
6595 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6596 * call.c (convert_for_arg_passing): Set it.
6597 * except.c (stabilize_throw_expr): Recurse for such an arg.
6599 2002-10-31 Mark Mitchell <mark@codesourcery.com>
6601 * cp-tree.h (lang_decl_flags): Remove init_priority.
6602 (lang_decl): Add delta.
6603 (GLOBAL_INIT_PRIORITY): Remove.
6604 (THUNK_DELTA): Revise definition.
6605 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6606 * dump.c (cp_dump_tree): Don't dump it.
6608 2002-10-30 Mark Mitchell <mark@codesourcery.com>
6611 * typeck2.c (process_init_constructor): Call complete_array_type.
6614 * decl.c (make_typename_type): Issue errors about invalid results.
6616 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6618 Core issue 287, PR c++/7639
6619 * cp-tree.h (lang_type_class): Add decl_list field.
6620 (CLASSTYPE_DECL_LIST): New macro.
6621 (maybe_add_class_template_decl_list): Add declaration.
6622 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6623 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6624 (maybe_add_class_template_decl_list): New function.
6625 (add_implicitly_declared_members): Use it.
6626 * decl.c (maybe_process_template_type_declaration): Likewise.
6627 (pushtag): Likewise.
6628 * friend.c (add_friend): Likewise.
6629 (make_friend_class): Likewise.
6630 * semantics.c (finish_member_declaration): Likewise.
6631 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6632 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6633 to process members and friends in the order of declaration.
6635 2002-10-29 Mark Mitchell <mark@codesourcery.com>
6638 * decl.c (finish_destructor_body): Create the label to jump to
6639 when returning from a destructor here.
6640 (finish_function_body): Rather than here.
6642 2002-10-25 Zack Weinberg <zack@codesourcery.com>
6645 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6646 SCOPE_REF is not null before dereferencing it.
6648 2002-10-25 Mark Mitchell <mark@codesourcery.com>
6650 * call.c (build_over_call): Use DECL_CONTEXT, not
6651 DECL_VIRTUAL_CONTEXT.
6652 * class.c (modify_vtable_entry): Don't mess with
6653 DECL_VIRTUAL_CONTEXT.
6654 (set_vindex): Remove.
6655 (set_primary_base): Remove vfuns_p parameter.
6656 (determine_primary_base): Likewise.
6657 (modify_all_vtables): Likewise.
6658 (layout_class_type): Likewise. Adjust calls to other functions
6660 (finish_struct_1): Adjust calls to modified functions. Set
6662 * cp-tree.h (lang_type_class): Remove vsize.
6663 (CLASSTYPE_VSIZE): Remove.
6664 (lang_decl): Remove thunks.
6665 (DECL_THUNKS): Adjust.
6666 (DECL_VIRTUAL_CONTEXT): Remove.
6667 (duplicate_decls): Don't copy it.
6668 * pt.c (build_template_decl): Don't set it.
6669 (tsubst_decl): Likewise.
6670 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6672 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6673 (build_vtable_entry): Remove.
6674 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6675 (lang_decl): Add thunks.
6676 (DECL_THUNKS): New macro.
6677 * decl.c (duplicate_decls): Copy it.
6678 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6679 * semantics.c (emit_associated_thunks): Simplify.
6681 2002-10-24 David Edelsohn <edelsohn@gnu.org>
6684 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6685 lang_type structure exists before accessing field.
6686 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6687 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6688 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6689 * class.c (check_field_decls): Use new macros.
6690 * typeck2.c (process_init_constructor): Remove redundant check for
6691 existence of lang_type structure.
6693 2002-10-24 Mark Mitchell <mark@codesourcery.com>
6695 * class.c (end_of_base): New method.
6696 (end_of_class): Use it. Check indirect virtual bases.
6698 * class.c (check_field_decls): Fix typo.
6700 2002-10-23 Mark Mitchell <mark@codesourcery.com>
6703 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6707 * spew.c (next_token): Do not return an endless stream of
6708 END_OF_SAVED_INPUT tokens.
6709 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6710 the cached token stream.
6711 (snarf_defarg): Likewise.
6713 2002-10-23 Zack Weinberg <zack@codesourcery.com>
6715 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6716 variably_modified_type_p.
6717 * cp-tree.h: Remove prototype of variably_modified_type_p.
6718 * tree.c (variably_modified_type_p): Remove; now implemented
6719 in language-independent code.
6721 2002-10-22 Mark Mitchell <mark@codesourcery.com>
6724 * spew.c (snarf_parenthesized_expression): New function.
6725 (snarf_block): Use it.
6727 2002-10-22 Richard Henderson <rth@redhat.com>
6729 * method.c (use_thunk): Always compute vcall_value; assert that
6730 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
6731 for vcall thunks as well.
6733 2002-10-21 Mark Mitchell <mark@codesourcery.com>
6735 * class.c (empty_base_at_nonzero_offset_p): New function.
6736 (layout_nonempty_base_or_field): Do not check for conflicts when
6737 laying out a virtual base using the GCC 3.2 ABI.
6738 (build_base_field): Correct checking for presence of empty classes
6739 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6741 * class.c (include_empty_classes): Use normalize_rli.
6742 (layout_class_type): Likewise.
6744 * decl.c (reshape_init): Tweak handling of character arrays.
6747 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6748 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6749 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6750 (check_field_decls): Likewise.
6751 (layout_class_type): Likewise.
6752 (finish_struct_1): Initialize it.
6753 (walk_subobject_offsets): Use it to prune searches.
6755 2002-10-20 Mark Mitchell <mark@codesourcery.com>
6757 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6758 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6759 TARGET_ASM_OUTPUT_MI_THUNK in comments.
6761 2002-10-18 Zack Weinberg <zack@codesourcery.com>
6763 * decl.c (start_decl): Point users of the old initialized-
6764 typedef extension at __typeof__.
6766 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6768 * Make-lang.in (method.o): Depend on TARGET_H.
6769 * method.c (target.h): Include it.
6770 (use_thunk): Use target hooks. Use vcall thunks, if available.
6772 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6774 * class.c (base_derived_from): Make sure return value is a bool.
6776 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6778 * class.c (find_final_overrider_data_s): Remove overriding_fn and
6780 (dfs_base_derived_from): New function.
6781 (base_derived_from): Likewise.
6782 (dfs_find_final_overrider): Use base_derived_from.
6783 (find_final_overrider): Adjust.
6785 2002-10-18 Jason Merrill <jason@redhat.com>
6788 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6789 with condition decls in a template.
6791 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
6793 * class.c (add_method): Compare template parms too.
6795 2002-10-17 Mark Mitchell <mark@codesourcery.com>
6798 * class.c (handle_using_decl): Allow the declaration used to be
6799 from an ambiguous base.
6801 * pt.c (convert_template_argument): Revert this change:
6802 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6803 * pt.c (convert_template_argument): Do not fold non-type
6804 template rguments when inside a template.
6806 * init.c (expand_default_init): Handle brace-enclosed initializers
6809 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6811 * mangle.c (write_expression): Correct handling of enumeration
6813 (write_template_arg): Likewise.
6814 * pt.c (convert_template_argument): Do not fold non-type template
6815 arguments when inside a template.
6818 * cvt.c (convert_to_reference): Allow references as the incoming
6821 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6824 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6825 build_qualified_type.
6827 2002-10-15 Richard Henderson <rth@redhat.com>
6829 * error.c (dump_expr): Use real_to_decimal directly, and with
6832 2002-10-15 Mark Mitchell <mark@codesourcery.com>
6834 * decl.c (reshape_init): Fix typo.
6836 * cp-tree.h (operator_name_info_t): Add arity.
6837 * lex.c (init_operators): Initialize it.
6838 * mangle.c (write_conversion_operator_name): New function.
6839 (write_unqualified_name): Use it.
6840 (write_template_args): Accept template arguments as a TREE_LIST.
6841 (write_expression): Adjust handling of qualified names to match
6844 2002-10-15 Jason Merrill <jason@redhat.com>
6846 * call.c (call_builtin_trap): New fn.
6847 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
6848 (build_call): Don't set current_function_returns_abnormally outside
6851 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6853 * class.c (check_field_decls): Remove empty_p parameter. Instead,
6854 clear CLASSTYPE_EMPTY_P.
6855 (build_base_field): Likewise.
6856 (build_base_fields): Likewise.
6857 (check_bases_and_members): Likewise.
6858 (create_vtbl_ptr): Likewise.
6859 (layout_class_type): Likewise. Ensure that empty classes have
6860 size zero when used as base classes in the 3.2 ABI.
6861 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6862 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
6864 (is_empty_class): Correct definition when using post-3.2 ABI.
6865 * cp-tree.h (lang_type_class): Add empty_p.
6866 (CLASSTYPE_EMPTY_P): New macro.
6868 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
6870 * init.c (build_delete): Do not apply save_expr for arrays.
6871 (build_vec_delete): Likewise.
6873 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6875 * decl.c (layout_var_decl): Call layout_decl even for variables
6876 whose type is an array with unspecified bounds.
6879 * lex.c (do_identifier): Add another option for the parsing
6881 * parse.y (do_id): Use it.
6883 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
6885 PRs C++/6803, C++/7721 and C++/7803
6886 * decl.c (grokdeclarator): Gracefully handle template-name as
6889 2002-10-11 Jason Molenda <jmolenda@apple.com>
6891 * init.c (build_field_list): Provide uses_unions_p with a default
6894 2002-10-11 Mark Mitchell <mark@codesourcery.com>
6897 * cp-tree.h (variably_modified_type_p): New function.
6898 (grokdeclarator) Tighten check for variably modified types as
6900 * pt.c (convert_template_argument): Do not allow variably modified
6901 types as template arguments.
6902 * tree.c (variably_modified_type_p): New function.
6904 * NEWS: Document removal of "new X = ..." extension.
6905 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6906 brace-enclosed initializers.
6907 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6908 (initialize_local_var): Remove declaration.
6909 (expand_static_init): Likewise.
6910 * decl.c (next_initializable_field): New function.
6911 (reshape_init): Likewise.
6912 (check_initializer): Use them. Build dynamic initializer for
6913 aggregates here too.
6914 (initialize_local_var): Simplify, and incorporate cleanup
6915 insertion code as well.
6916 (destroy_local_var): Remove.
6917 (cp_finish_decl): Tidy.
6918 (expand_static_init): Fold checks for whether or not a variable
6919 needs initialization into this function. Simplify.
6920 * decl2.c (do_static_initialization): Simplify.
6921 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6922 be done for us automatically.
6923 (expand_default_init): Handle brace-enclosed initializers
6925 (expand_aggr_init_1): Remove RTL-generation code.
6926 (build_vec_init): Remove "new X = ..." support.
6927 * parse.y (new_initializer): Likewise.
6928 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6929 brace-enclosed initializer.
6930 (create_pseudo_type_info): Likewise.
6931 * typeck2.c (store_init_value): Don't try to handle digest_init
6932 being called more than once.
6933 (digest_init): Tidy handling of brace-enclosed initializers.
6935 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6937 * decl.c (typename_hash): Use htab_hash_pointer.
6939 2002-10-10 Jim Wilson <wilson@redhat.com>
6941 * decl.c (duplicate_decls): Don't call decl_attributes.
6943 2002-10-09 Zack Weinberg <zack@codesourcery.com>
6946 * decl.c (start_decl): Unconditionally issue error for
6947 'typedef foo = bar'.
6948 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6949 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6951 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6953 * decl2.c (prune_vtable_vardecl): Delete unused function.
6955 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6958 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6959 procesing template functions.
6960 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6961 type. Call layout_decl.
6962 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6964 2002-10-07 Richard Henderson <rth@redhat.com>
6966 * decl2.c, pt.c: Revert c++/7754 fix.
6968 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6971 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6973 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6976 * pt.c (for_each_template_parm_r): Handle BASELINKs.
6979 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6980 procesing template functions.
6981 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6982 type. Call layout_decl.
6983 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6985 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6988 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6989 template parameters.
6990 (globals): Add entity and need_abi_warning.
6991 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6992 CLASSTYPE_TEMPLATE_INFO.
6993 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6995 (write_prefix): Handle typename types correctly.
6996 (write_template_prefix): Handle template template parameters
6998 (start_mangling): Add entity parameter.
6999 (finish_mangling): Warn about names whose mangling will change.
7000 (mangle_decl_string): Adjust.
7001 (mangle_type_string): Likewise.
7002 (mangle_special_for_type): Likewise.
7003 (mangle_ctor_vtbl_for_type): Likewise.
7004 (mangle_thunk): Likewise.
7005 (mangle_guard_variable): Likewise.
7006 (mangle_ref_init_variable): Likewise.
7008 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7011 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7012 * cp-tree.h (emit_base_init): Rename to ....
7013 (emit_mem_initializers): ... this.
7014 (expand_member_init): Change prototype.
7015 * init.c (perform_member_init): Compute explicit, rather than
7016 requiring it as a parameter.
7017 (sort_member_init): Rename to ...
7018 (sort_mem_initializers): ... this. Process bases and data members
7020 (sort_base_init): Remove.
7021 (emit_base_init): Rename to ...
7022 (emit_mem_initializers): ... this.
7023 (expand_aggr_vbase_init_1): Remove.
7024 (construct_virtual_bases): Rename to ...
7025 (construct_virtual_base): ... this.
7026 (expand_member_init): Rework handling of base initializers.
7027 * method.c (do_build_copy_constructor): Use
7028 finish_mem_initializers.
7029 * parse.y (member_init): Adjust calls to expand_member_init.
7030 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7031 (tsubst_initializer_list): Use expand_member_init.
7032 * semantics.c (finish_mem_intiailizers): Simplify.
7034 2002-10-02 Matt Austern <austern@apple.com>
7035 * decl.c (walk_vtables_r): Fixed typo that caused result to
7036 never get a nonzero value.
7038 2002-10-02 Roger Sayle <roger@eyesopen.com>
7040 PR optimization/6627
7041 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7042 from here, and move it to tree.h.
7043 * decl.c (cxx_init_decl_processing): If storing the vbit
7044 in function pointers, ensure that force_align_functions_log
7047 2002-10-02 Matt Austern <austern@apple.com>
7049 * class.c (check_field_decls): Changed warning about const member
7050 variables so that it doesn't get issued for a class aggregate.
7052 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7054 * decl.c (cp_finish_decl): Make sure array types are laid out,
7055 even if the array bounds are unknown.
7057 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7059 * class.c (build_vtbl_initializer): Change build_c_cast
7062 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7064 * decl.c (cp_finish_decl): Make sure array types are laid out,
7065 even if the array bounds are unknown.
7067 * decl.c (cp_finish_decl): Correct check for dynamic
7068 initialization of thread-local storage.
7070 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7072 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7075 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7077 * class.c (build_vtbl_initializer): Add cast.
7078 (add_vcall_offset_vtbl_entries_1):
7079 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7081 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7083 * class.c (walk_subobject_offsets): Correct the calculation of
7084 offsets for virtual bases. Correct the counting of array
7086 (layout_nonempty_base_or_field): Simplify. Correct the
7087 calculation of offsets to be propagated through the binfo
7089 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7090 Add the FIELD_DECL to TYPE_FIELDS.
7091 (build_base_fields): Adjust accordingly.
7092 (layout_virtual_bases): Use build_base_field.
7093 (end_of_class): Return a tree, not an integer.
7094 (warn_about_ambiguous_direct_bases): Rename to ...
7095 (warn_about_ambiguous_bases): ... this.
7096 (include_empty_classes): New function.
7097 (layout_class_type): Create an alternative version of the type to
7098 be used when as a base class type. Do not call
7099 finish_record_layout until we are done laying out the class.
7100 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7102 (CLASSTYPE_SIZE): Reimplement.
7103 (CLASSTYPE_SIZE_UNIT): Likewise.
7104 (CLASSTYPE_ALIGN): Likweise.
7105 (CLASSTYPE_USER_ALIGN): Likewise.
7106 (CLASSTYPE_AS_BASE): New macro.
7107 (DECL_INITIALIZED_P): Likewise.
7108 (extract_init): Remove prototype.
7109 (build_forced_zero_init): Rename to ...
7110 (build_zero_init): ... this.
7111 (force_store_init_value): Remove.
7112 * decl.c (obscure_complex_init): Remove.
7113 (duplicate_decls): Copy DECL_INITIALIZED_P.
7114 (check_initializer): Do not leave junk in DECL_INITIAL.
7115 (cp_finish_decl): Handle zero-initialization of entities with
7116 static storage duration.
7117 * expr.c (extract_init): Remove.
7118 * init.c (build_forced_zero_init): Remove.
7119 (build_zero_init): New function.
7120 (build_default_init): Use it.
7121 (build_field_list): Skip FIELD_DECLs for base subobjects.
7122 (push_base_cleanups): Likewise.
7123 * method.c (do_build_assign_ref): Likewise.
7124 (synthesize_exception_spec): Likewise.
7125 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7126 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7127 static data member whose initialization took place in its class.
7128 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7130 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7131 (dfs_unuse_fields): Likewise.
7132 * tree.c (pod_type_p): Handle error_mark_node.
7133 (zero_init_p): Likewise.
7134 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7136 * typeck2.c (store_init_value): Remove #if 0'd code.
7137 (force_store_init_value): Remove.
7138 (process_init_constructor): Use build_zero_init.
7140 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
7143 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7145 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
7147 * cp-tree.h: Fix comment typos.
7151 2002-09-25 Mark Mitchell <mark@codesourcery.com>
7153 * cp/class.c (contains_empty_class_p): New method.
7154 (walk_subobject_offsets): Correct computation of field offset.
7155 (layout_empty_base): Correct placement of emtpy base classes.
7156 (layout_class_type): Warn about ABI changes.
7158 2002-09-23 Mark Mitchell <mark@codesourcery.com>
7160 * cp/class.c (layout_virtual_bases): Do not round the size of the
7161 type to a multiple of the alignment before laying out virtual bases.
7162 (layout_class_type): Correct handling of bit-fields that are wider
7163 than their type inside unions. Round the size of the type to a
7164 even number of bytes when computing the size without virtual
7166 * cp/cp-tree.h (abi_version_at_least): New macro.
7168 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7170 * ChangeLog: Follow spelling conventions.
7171 * ChangeLog.2: Likewise.
7173 * class.c: Likewise.
7174 * cp-tree.h: Likewise.
7177 * decl2.c: Likewise.
7178 * except.c: Likewise.
7179 * friend.c: Likewise.
7180 * g++spec.c: Likewise.
7183 * mangle.c: Likewise.
7184 * method.c: Likewise.
7185 * operators.def: Likewise.
7186 * optimize.c: Likewise.
7189 * search.c: Likewise.
7190 * semantics.c: Likewise.
7193 * typeck.c: Likewise.
7195 2002-09-18 Devang Patel <dpatel@apple.com>
7197 * cp/cp-tree.h: New prototype for walk_vtabls().
7198 * cp/decl.c (walk_vtables_r): New function.
7199 (struct cp_binding_level): Add new members, namespaces,
7200 names_size and vtables.
7201 (add_decl_to_level): Add decl in namespaces or vtables
7202 chain, if conditions match.
7203 (walk_vtables): New function.
7204 (walk_namespaces_r): Travers separate namespace chain
7205 for namespace decls.
7206 (wrapup_globals_for_namespace): Use names_size instead
7208 * cp/decl2.c (finish_file): Use walk_vtables() instead of
7209 walk_globals() to walk vtable decls.
7211 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
7213 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7214 ICE with invalid pointers & references.
7216 2002-09-17 Zack Weinberg <zack@codesourcery.com>
7218 * Make-lang.in: Remove all references to the demangler.
7219 * cxxfilt.c: Moved to binutils.
7221 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7224 * pt.c (tsubst_decl): Remove assert.
7226 Remove DR 295 implementation.
7227 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7228 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7229 about ignoring volatile qualifiers.
7231 * search.c (lookup_member): Correct documentation.
7233 2002-09-16 Geoffrey Keating <geoffk@apple.com>
7235 * cp-tree.h (union lang_tree_node): Add chain_next option.
7237 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7239 * parse.y (parse_finish_call_expr): Check lookup_member result.
7242 * semantic.c (finish_asm_stmt): Fix operand/output_operands
7244 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7246 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
7249 * call.c (build_over_call): Convert this pointer for fns found by
7252 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
7254 * ChangeLog: Follow spelling conventions.
7255 * ChangeLog.1: Likewise.
7257 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
7260 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7262 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
7264 * error.c: Fix comment formatting.
7265 * except.c: Likewise.
7267 * friend.c: Likewise.
7268 * g++spec.c: Likewise.
7271 * mangle.c: Likewise.
7272 * method.c: Likewise.
7273 * optimize.c: Likewise.
7276 * search.c: Likewise.
7277 * semantics.c: Likewise.
7280 * typeck.c: Likewise.
7281 * typeck2.c: Likewise.
7283 2002-09-13 Matt Austern <austern@apple.com>
7286 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7287 * cp/call.c: Change call-by-const-reference mechanism to use
7288 non_cast_lvalue_p when deciding whether the create a temporary.
7289 We need a temporary when passing, e.g. (long) x by const ref.
7291 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
7293 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7295 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
7297 * decl.c: Fix comment formatting.
7298 * decl2.c: Likewise.
7300 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
7302 * call.c: Fix comment formatting.
7303 * class.c: Likewise.
7304 * cp-lang.c: Likewise.
7305 * cp-tree.h: Likewise.
7308 2002-09-11 Zack Weinberg <zack@codesourcery.com>
7310 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7311 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7312 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7313 minor adjustments (use version_string, eliminate yet another
7314 duplicate of xmalloc)
7316 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7318 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7320 2002-09-05 Jason Merrill <jason@redhat.com>
7322 * typeck2.c (add_exception_specifier): Only pedwarn for an
7324 (require_complete_eh_spec_types): New fn.
7325 (cxx_incomplete_type_diagnostic): Also support pedwarning.
7326 * typeck.c (complete_type_or_diagnostic): Likewise.
7327 * call.c (build_call): Call require_complete_eh_spec_types.
7328 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7329 on an incomplete type.
7331 2002-09-04 Jakub Jelinek <jakub@redhat.com>
7333 * decl.c (start_cleanup_fn): Clear interface_only before
7334 start_function, restore it afterwards.
7336 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
7338 * cp-tree.h (finish_builtin_type): Remove.
7339 * decl2.c (finish_builtin_type): Move to common code.
7340 * decl.c (build_ptrmemfunc_type): Adjust.
7341 * rtti.c (create_pseudo_type_info): Adjust.
7342 (create_tinfo_types): Adjust.
7344 2002-08-31 Jason Merrill <jason@redhat.com>
7346 * cp-lang.c (cp_expr_size): Allow initialization from a
7349 2002-08-30 Richard Henderson <rth@redhat.com>
7352 * tree.c: Include target.h.
7353 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7355 * Makefile.in (tree.o): Update.
7357 2002-08-27 Mark Mitchell <mark@codesourcery.com>
7359 * class.c (layout_virtual_bases): Warn about bugs in G++ that
7360 result in incorrect object layouts.
7361 (layout_class_type): Likewise.
7363 2002-08-24 Matt Austern <austern@apple.com>
7365 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7367 (real_lvalue_p): Update caller.
7369 (non_cast_lvalue_or_else): New.
7370 * tree.h: Declare it.
7371 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7373 2002-08-22 Mark Mitchell <mark@codesourcery.com>
7375 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7376 and COND_EXPR specially; fix error message output.
7378 2002-08-22 Jason Merrill <jason@redhat.com>
7380 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7381 * semantics.c (nullify_returns_r): Likewise.
7383 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
7386 * typeck.c (finish_class_member_access_expr): Diagnose cases where
7387 name lookup finds nothing.
7389 2002-08-15 Jason Merrill <jason@redhat.com>
7391 * semantics.c (finish_then_clause): Remove redundant assignment.
7392 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7393 extra binding level outside the if/switch statement.
7394 (finish_while_cond, finish_for_cond): Rewrite complex condition
7397 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
7399 * parse.y (sizeof, alignof, typeof): New non-terminals to
7400 increment skip_evaluation. Replace terminals with them and
7401 decrement skip_evaluation at the end of rules using them.
7402 * decl2.c (mark_used): Don't assemble_external if
7403 skipping evaluation.
7405 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
7408 * parse.y (parse_finish_call_expr): Handle incomplete
7409 type used to name a scope.
7411 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
7414 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7415 regression caused by my 2002-08-08 patch.
7417 2002-08-13 Mark Mitchell <mark@codesourcery.com>
7419 * decl.c (pushdecl_class_level): Honor requests to bind names to
7422 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7424 * decl2.c (build_call_from_tree): Fix uninitialized variable.
7425 * parse.y (parse_finish_call_expr): Likewise.
7426 * repo.c (old_args, old_dir, old_main): Const-ify.
7428 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
7430 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7431 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7432 * optimize.c (maybe_clone_body): Likewise.
7433 * pt.c (tsubst_enum): Likewise.
7434 (lookup_template_class): Likewise.
7435 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7437 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
7439 * lang-specs.h: Remove -ansi.
7441 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
7443 * tree.c (maybe_dummy_object): Replace // with /* */
7445 2002-08-09 Mark Mitchell <mark@codesourcery.com>
7447 * call.c (standard_conversion): Use build_ptrmem_type.
7448 * cp-tree.h (build_ptrmem_type): New function.
7449 (adjust_result_of_qualified_name_lookup): Likewise.
7450 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7451 static data members.
7452 (build_ptrmem_type): New function.
7453 (grokdeclarator): Do not use build_offset_type when encountering a
7455 * parse.y (parse_finish_call_expr): Use
7456 adjust_result_of_qualified_name_lookup.
7457 * search.c (adjust_result_of_qualified_name_lookup): New function.
7458 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7459 accessing OFFSET_TYPEs directly.
7461 2002-08-08 Mike Stump <mrs@apple.com>
7463 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7464 (type_decays_to): Likewise.
7465 * class.c (find_final_overrider): Likewise.
7466 (maybe_note_name_used_in_class): Likewise.
7467 * decl.c (current_tmpl_spec_kind): Likewise.
7468 (add_binding): Likewise.
7469 (push_class_binding): Likewise.
7470 (duplicate_decls): Likewise.
7471 (layout_var_decl): Likewise.
7472 (grokfndecl): Likewise.
7473 (grokdeclarator): Likewise.
7474 (check_default_argument): Likewise.
7475 * decl2.c (handle_class_head): Likewise.
7476 * error.c (dump_template_decl): Likewise.
7477 * init.c (build_offset_ref): Likewise.
7478 * pt.c (check_specialization_scope): Likewise.
7479 (determine_specialization): Likewise.
7480 (check_explicit_specialization): Likewise.
7481 (maybe_check_template_type): Likewise.
7482 (process_partial_specialization): Likewise.
7483 (check_default_tmpl_args): Likewise.
7484 (push_template_decl_real): Likewise.
7485 (convert_template_argument): Likewise.
7486 (try_class_unification): Likewise.
7487 (get_bindings_real): Likewise.
7488 (do_decl_instantiation): Likewise.
7489 * semantics.c (begin_function_definition): Likewise.
7490 (finish_member_declaration): Likewise.
7491 (check_multiple_declarators): Likewise.
7492 * typeck.c (comp_array_types): Likewise.
7493 (comptypes): Likewise.
7494 (expr_sizeof): Likewise.
7495 (build_binary_op): Likewise.
7496 (dubious_conversion_warnings): Likewise.
7497 (check_return_expr): Likewise.
7499 2002-08-08 Mark Mitchell <mark@codesourcery.com>
7501 * typeck.c (build_class_member_access_expr): Do not return
7502 error_mark_node when no error has occurred.
7504 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7506 * typeck.c (build_component_addr): Remove.
7507 (build_unary_op): Just check it's not a bitfield, and then build
7510 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7512 * class.c (convert_to_base): Correct check for error_mark_node.
7513 (create_vtable_ptr): Remove unused VFUNS_P parm.
7515 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7517 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7519 2002-08-07 Mark Mitchell <mark@codesourcery.com>
7521 Rework build_component_ref.
7522 * call.c (build_vfield_ref): Do not go through build_component_ref.
7523 (build_field_call): Use build_class_member_access_expr.
7524 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7525 (build_object_call): Likewise.
7526 * class.c (convert_to_base): New function.
7527 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7528 (instantiate_type): Handle BASELINKs.
7529 * cp-tree.def (BASELINK): New tree code.
7530 * cp-tree.h (BASELINK_P): Reimplement.
7531 (SET_BASELINK_P): Remove.
7532 (BASELINK_BINFO): Reimplement.
7533 (BASELINK_FUNCTIONS): Likewise.
7534 (BASELINK_ACCESS_BINFO): Likewise.
7535 (BASELINK_OPTYPE): Likewise.
7536 (convert_to_base): New function.
7538 (build_object_ref): Remove.
7539 (build_component_ref_1): Likewise.
7540 (build_component_ref): Likewise.
7541 (build_x_component_ref): Likewise.
7542 (build_class_member_access_expr): New function.
7543 (finish_class_member_access_expr): Likewise.
7544 (build_ptrmemfunc_access_expr): Likewise.
7545 * decl.c (grokdeclarator): Handle BASELINKs.
7546 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7547 finish_class_member_access_expr.
7548 (arg_assoc): Handle BASELINKs.
7549 (do_class_using_decl): Likewise.
7550 * error.c (dump_decl): Likewise.
7551 (dump_expr): Use build_ptrmemfunc_access_expr.
7552 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7554 (build_throw): Use BASELINK_FUNCTIONS.
7555 * init.c (perform_member_init): Use
7556 build_class_member_access_expr.
7557 (build_offset_ref): Handle BASELINKs. Use
7558 build_class_member_access_expr.
7559 * method.c (hack_identifier): Likewise.
7560 * parse.y (do_id): Use BASELINK, not TREE_LIST.
7561 (primary): Remove uses of build_object_ref.
7562 * pt.c (lookup_template_function): Handle BASELINKs.
7563 (resolve_overloaded_unification): Likewise.
7564 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7565 (lookup_field): Use BASELINK, not TREE_LIST.
7566 (lookup_fnfiels): Likewise.
7567 (setup_class_bindings): Likewise.
7568 * semantics.c (finish_object_call_expr): Do not use
7569 build_method_call when we already know what function is being
7571 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7572 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7574 (name_p): New function.
7575 * typeck.c (build_object_ref): Remove.
7576 (build_component_ref_1): Likewise.
7577 (build_x_component_ref): Likewise.
7578 (build_class_member_access_expr): New function.
7579 (finish_class_member_access_expr): Likewise.
7580 (build_ptrmemfunc_access_expr): Likewise.
7581 (get_member_function_from_ptrfunc): Use
7582 build_ptrmemfunc_access_expr.
7583 (build_binary_op): Likewise.
7584 (build_unary_op): Likewise.
7585 (build_ptrmemfunc): Likewise.
7586 (pfn_from_ptrmemfunc): Likewise.
7587 * typeck2.c (build_m_component_ref): Adjust comment.
7589 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
7591 * Make-lang.in (CXX_C_OBJS): Update.
7592 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7593 * cp-tree.h (cxx_decode_option): Remove.
7594 * decl2.c (compare_options, lang_f_options, unsupported_options,
7595 cxx_decode_option): Remove.
7597 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
7599 * typeck.c (build_x_unary_op): Handle pointer-to-member.
7601 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
7603 * class.c: Don't include obstack.h.
7605 * decl2.c: Delete bogus comment.
7606 * error.c: Don't include obstack.h.
7607 * except.c: Likewise.
7608 (dump_type): Correct comment.
7609 * method.c: Don't include obstack.h.
7612 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
7615 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7616 expressions to pointer-to-data-member of pointer-to-member-functions.
7618 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
7620 * cvt.c (ocp_convert): Delete obsolete code.
7621 * parse.y (permanent_obstack): Delete declaration.
7622 * pt.c (permanent_obstack): Delete declaration.
7623 * repo.c (permanent_obstack): Delete declaration.
7624 (open_repo_file): Use xmalloc instead of permanent_obstack.
7625 (init_repo): Use xstrdup instead of permanent_obstack.
7627 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
7629 * cp-tree.h (VF_DERIVED_VALUE): Remove.
7630 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7632 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
7635 C++ ABI change - vfunc ordering.
7636 * class.c (add_virtual_function): Remove.
7637 (dfs_modify_all_vtables): Take list of all declared
7638 virtuals. Assign all that are not in primary base.
7639 (check_for_override): Adjust comments.
7640 (create_vtable_ptr): Take single list of virtuals. Build chain
7641 of declared virtuals here.
7642 (layout_class_type): Take single list of virtuals. Adjust.
7643 (finish_struct_1): Keep virtuals on single list. Adjust.
7645 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7647 * init.c (build_member_call): Use build_new_method_call, not
7650 2002-08-02 Krister Walfridsson <cato@df.lth.se>
7652 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7654 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7656 * call.c (build_method_call): Issue a more helpful error message
7657 about ambiguous method names.
7659 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
7661 * tree.c (build_shared_int_cst): Make cache file scope, and
7664 2002-08-02 Jason Merrill <jason@redhat.com>
7666 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7667 (cp_expr_size): New fn.
7668 * call.c (build_over_call): Lose empty class hackery.
7669 (convert_arg_to_ellipsis): Promote non-POD warning to error.
7670 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7672 * semantics.c (expand_body): Do tree optimization in the function
7675 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
7677 * cp-tree.h: Move all warning and flag declarations to c-common.h.
7678 * decl.c: Move all warning and flag variables to c-common.c.
7679 * decl2.c: Move all warning and flag variables to c-common.c.
7680 * lex.c (flag_digraphs): Remove.
7681 (warn_traditional): Now in c-common.c.
7683 2002-07-31 Mark Mitchell <mark@codesourcery.com>
7685 * call.c (build_field_call): Do not look up the field by name.
7686 (build_method_call): Simplify.
7687 (struct z_candidate): Add access_path and conversion_path. Remove
7689 (convert_class_to_reference): Adjust use of
7690 add_function_candidate.
7691 (add_candidate): Add conversion_path argument.
7692 (add_function_candidate): Use it.
7693 (add_conv_dndidate): Likewise.
7694 (build_builtin_candidate): Likewise.
7695 (add_template_candidate_real): Add conversion_path argument.
7696 (add_template_conv_candidate): Likewise.
7697 (add_template_candidate): Likewise.
7698 (build_user_type_conversion_1): Use it.
7699 (build_new_function_call): Remove name lookup code. Adjust use of
7700 add_template_candidate and add_function_candidate.
7701 (build_new_op): Likewise.
7702 (convert_like_real): Use build_special_member_call.
7703 (build_over_call): Use cand->conversion_path.
7704 (build_special_member_call): New method.
7705 (build_new_method_call): Remove name lookup code.
7706 * cp-tree.def (OFFSET_REF): Update documentation.
7707 (TEMPLATE_ID_EXPR): Likewise.
7708 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7709 (BASELINK_OPTYPE): Likewise.
7710 (build_new_method_call): Adjust prototype.
7711 (build_special_member_call): New method.
7712 (build_baselink): New method.
7713 (build_offset_ref_call_from_tree): Likewise.
7714 (build_call_from_tree): Likewise.
7715 (finish_qualified_call_expr): Remove.
7716 (finish_call_expr): Adjust prototype.
7717 (build_x_function_call): Remove.
7718 * cvt.c (ocp_convert): Use build_special_member_call.
7719 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7720 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7722 (build_offset_ref_call_from_tree): New function.
7723 (build_call_from_tree): Likewise.
7724 * init.c (expand_cleanup): Use build_special_member_call.
7725 (expand_default_init): Likewise.
7726 (build_member_call): Use finish_call_expr.
7727 (build_new_1): Use build_special_member_call.
7728 (push_base_cleanups): Likewise.
7729 * method.c (do_build_assign_ref): Likewise.
7730 * parse.y (template_id): Do not pass a COMPONENT_REF to
7731 lookup_template_function.
7732 (primary): Use parse_finish_call_epxr, not finish_call_expr.
7733 (parse_finish_call_expr): New function.
7734 * pt.c (lookup_template_function): Add assertions.
7735 * search.c (lookup_base): Allow T to be a binfo.
7736 (build_baselink): New function.
7737 (lookup_member): Use it.
7738 * semantics.c (finish_call_expr): Do not do name lookup.
7739 (finish_object_call_expr): Remove #if 0'd code.
7740 (finish_qualified_call_expr): Remove.
7741 * typeck.c (build_x_function_call): Remove.
7742 (build_static_case): Use build_special_member_call.
7743 * typeck2.c (build_functional_cast): Likewise.
7745 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7747 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7749 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
7751 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7753 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
7755 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7758 2002-07-29 Alan Modra <amodra@bigpond.net.au>
7760 * cp-tree.h: Comment typo fix.
7762 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
7764 * spew.c (space_for_token): Allocate zeroed memory for a new token
7767 2002-07-27 Roger Sayle <roger@eyesopen.com>
7769 * decl.c (builtin_function_1): No need to explicitly mark
7770 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7772 2002-07-27 Roger Sayle <roger@eyesopen.com>
7774 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7776 2002-07-26 Jason Merrill <jason@redhat.com>
7778 * call.c (build_over_call): Likewise.
7779 (cp_convert_parm_for_inlining): New fn.
7780 (convert_for_arg_passing): New fn.
7781 (convert_default_arg, build_over_call): Use it.
7782 (type_passed_as): New fn.
7783 * pt.c (tsubst_decl): Use it.
7784 * decl2.c (cp_build_parm_decl): New fn.
7785 (build_artificial_parm): Use it.
7786 (start_static_storage_duration_function): Likewise.
7787 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7788 (grokparms): Don't mess with DECL_ARG_TYPE.
7789 * typeck.c (convert_arguments): Use convert_for_arg_passing.
7790 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7792 * cp-tree.h: Declare new fns.
7794 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
7796 * cp-tree.h (flag_operator_names): Remove.
7797 * decl2.c (flag_operator_names): Remove.
7798 (lang_f_options): Remove operator-names.
7799 * lex.c (D_OPNAME): Remove.
7800 (reswords): Remove operator names.
7801 (rid_to_yy): Remove operator names.
7802 (init_reswords): No need to handle D_OPNAME.
7803 * spew.c (read_process_identifier): There are no operator
7806 2002-07-26 Jason Merrill <jason@redhat.com>
7808 * dump.c (cp_dump_tree): Call c_dump_tree.
7809 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7811 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7813 * error.c (print_whitespace): Remove.
7814 * g++spec.c (LIBUNWIND): Move.
7815 * mangle.c (mangled_position, write_signed_number): Remove.
7817 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7819 * decl2.c (cxx_decode_option): Similarly.
7821 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
7823 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7824 (cxx_sizeof_or_alignof_type): Take a third argument.
7825 (cxx_sizeof): Adjust definition.
7826 (cxx_alignof): Likewise.
7827 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7828 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7830 (c_sizeof_nowarn): Remove definition.
7831 (build_unary_op): Use cxx_sizeof_nowarn.
7833 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
7835 * tree.c (cp_build_qualified_type_real): When copying
7836 pointer-to-method types, unshare the record that holds
7837 the cached pointer-to-member-function type.
7839 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7841 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7843 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
7846 * typeck.c (cxx_sizeof_or_alignof_type): New function.
7847 (c_sizeof): Remove definition.
7848 (expr_sizeof): Use cxx_sizeof.
7849 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7850 * decl.c (finish_destructor_body): Use cxx_sizeof.
7851 * semantics.c (finish_alignof): Likewise.
7852 (finish_alignof): Use cxx_alignof.
7853 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7854 (cxx_sizeof_or_alignof_type): Declare.
7855 (my_friendly_assert): Move to ../c-common.h.
7857 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7859 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7861 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7863 PR c++/7347, c++/7348
7864 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7865 * decl.c (make_typename_type): Use it.
7866 (make_unbound_class_template): Likewise.
7867 (lookup_name_real): Don't call type_access_control if scope is
7868 template parameter dependent.
7869 * parse.y (template_arg): Call make_unbound_class_template with
7871 (nest_name_specifier): Call make_typename_type with tf_parsing set.
7872 (typename_sub0): Likewise.
7873 (typename_sub1): Likewise.
7874 (instantiate_decl): Push class scope.
7875 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7876 for both static variable and member function template.
7877 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7879 * search.c (type_access_control): Do type access for TEMPLATE_DECL
7882 2002-07-20 Roger Sayle <roger@eyesopen.com>
7884 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7885 test by using positive_option. Make whitespace consistent.
7887 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
7889 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7890 members with 'locus'. Adjust use throughout.
7891 (struct feed): Likewise.
7892 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7894 (snarf_defarg): Use error(), not error_with_file_and_line().
7896 2002-07-19 Chris Demetriou <cgd@broadcom.com>
7898 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7899 cpp_options is included.
7901 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7903 PR c++/2862, c++/2863
7904 * pt.c (determine_specialization): Compare the length of
7905 TYPE_ARG_TYPES. Tidy.
7907 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7910 * decl.c (duplicate_decls): Don't propagate inlining parameters from
7911 olddecl to newdecl when newdecl is a specialization of the
7912 instantiation olddecl.
7914 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7916 PR c++/4802, c++/5387
7917 * decl.c (make_typename_type): Use enforce_access.
7919 2002-07-17 Scott Snyder <snyder@fnal.gov>
7922 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7924 2002-07-12 Mark Mitchell <mark@codesourcery.com>
7926 * class.c (add_method): Correct handling of conversion operators.
7928 2002-07-11 Mark Mitchell <mark@codesourcery.com>
7931 * class.c (add_method): Simplify.
7933 2002-07-11 Jason Merrill <jason@redhat.com>
7936 * tree.c (cp_copy_res_decl_for_inlining): Also copy
7939 2002-07-10 Graham Stott <graham.stott@btinternet.com>
7941 * pt.c (template_parm_this_level_p, push_template_decl_real):
7942 Pass depth as int pointer.
7944 2002-07-11 Tim Josling <tej@melbpc.org.au>
7946 Remove front end hard coding from gengtype.c.
7948 * config-lang.in (gtfiles): Add files needed for this front end.
7950 2002-07-10 Mark Mitchell <mark@codesourcery.com>
7952 * cp-tree.h (unqualified_name_lookup_error): Declare it.
7953 (begin_function_definition): Adjust prototype.
7954 * lex.c (unqualified_name_lookup_error): New function, split out
7956 (do_identifier): ... here.
7957 * parse.y (parse_begin_function_definition): New function.
7959 * semantics.c (begin_function_definition): Accept decl-specifiers
7960 and attributes as separate parameters.
7962 2002-07-10 Jason Merrill <jason@redhat.com>
7965 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7966 modifying the old one.
7968 2002-07-09 Mark Mitchell <mark@codesourcery.com>
7970 * cp-tree.h (constructor_name_p): Declare it.
7971 (check_template_template_default_arg): Likewise.
7972 * class.c (handle_using_decl): Use constructor_name_p.
7973 * decl.c (grokdeclarator): Likewise.
7974 * decl2.c (constructor_name_p): Define it.
7975 * init.c (build_member_call): Use constructor_name_p.
7976 * parse.y (template_parm): Use check_template_template_default_arg.
7977 * pt.c (check_explicit_specialization): Use constructor_name_p.
7978 * semantics.c (check_template_template_default_arg): New function.
7980 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7982 * pt.c (can_complete_type_without_circularity): Add static to
7983 function definition.
7985 2002-07-08 Mark Mitchell <mark@codesourcery.com>
7987 * cp-tree.h (have_extern_spec): Declare it
7988 * decl.c (have_extern_spec): Define it.
7989 (start_decl): Eliminate use of used_extern_spec.
7990 (start_function): Likewise.
7991 * parse.y (have_extern_spec): Remove declaration.
7992 (used_extern_spec): Likewise.
7993 (frob_specs): Eliminate use of used_extern_spec.
7994 (.hush_warning): Likewise.
7996 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7998 * Make-lang.in (cp/parse.o): Depend on decl.h.
7999 * cp-tree.h (do_decl_instantiation): Change prototype.
8000 * parse.y: Include decl.h.
8001 (parse_decl_instantiation): New function.
8002 (explicit_instantiation): Use it.
8003 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8006 2002-07-07 Roger Sayle <roger@eyesopen.com>
8008 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8009 constructor and destructor tests when passed a TEMPLATE_DECL.
8011 2002-07-05 Jason Merrill <jason@redhat.com>
8013 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8016 PR optimization/7145
8017 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8019 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8021 Repair damage on weak-impared targets caused by my previous patch.
8022 * cp-tree.h (import_export_tinfo): Add parameter.
8023 * decl2.c (import_export_tinfo): Add parameter, post adjust
8025 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8026 import_export_tinfo.
8028 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8031 * init.c (build_aggr_init): Remove qualifiers of init before calling
8033 (build_vec_init): Flatten multi-dimensional array during cleanup.
8034 (build_vec_delete_1): Abort if the type of each element is array.
8036 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8038 * pt.c (instantiate_class_template): Fix typo.
8040 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8042 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8043 by CVS conflict in my last patch.
8045 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8048 * pt.c (can_complete_type_without_circularity): New function.
8049 (instantiate_class_template): Use it.
8050 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8051 message due to incomplete fields.
8053 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8056 * mangle.c (write_expression): Add mangling for sizeof when
8058 * operators.def: Remove stale comment.
8060 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8062 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8063 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8064 (tinfo_decl_type): Replace with ...
8065 (type_info_ptr_type): ... this.
8066 (import_export_tinfo): Declare.
8067 (tinfo_decl_p): Rename to ...
8068 (unemitted_tinfo_decl_p): ... this.
8069 * decl2.c (import_export_decl): Break out tinfo handling into ...
8070 (import_export_tinfo): ... here. New function.
8071 (finish_file): Adjust.
8072 * rtti.c (TINFO_REAL_NAME): New macro.
8073 (init_rtti_processing): Create the tinfo types.
8074 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8075 (get_tinfo_decl): Adjust.
8076 (get_tinfo_ptr): New function.
8077 (get_type_id): Use it.
8078 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8079 (ptr_initializer): Use get_tinfo_ptr.
8080 (ptm_initializer): Likewise.
8081 (synthesize_tinfo_var): Break into ...
8082 (get_pseudo_ti_init): ... this. Just create the initializer.
8083 (get_pseudo_ti_desc): .. and this.
8084 (create_real_tinfo_var): Remove.
8085 (create_pseudo_type_info): Don't create the vtable decl here.
8086 (get_vmi_pseudo_type_info): Remove.
8087 (create_tinfo_types): Adjust.
8088 (tinfo_decl_p): Rename to ...
8089 (unemitted_tinfo_decl_p): ... here. Adjust.
8090 (emit_tinfo_decl): Adjust. Create the initializer.
8092 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8095 * pt.c (tsubst_friend_class): Substitute into the context of the
8096 friend before using it.
8098 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8100 * cp-tree.h (xref_tag): Change prototype.
8101 (handle_class_head): Likewise.
8102 (build_x_component_ref): Likewise.
8103 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8104 (xref_tag): Take attributes as a separate parameter.
8105 (xref_tag_from_type): Adjust call to xref_tag.
8106 * decl2.c (build_expr_from_tree): Adjust call to
8107 build_x_component_ref.
8108 (handle_class_head): Take attributes as a separate parameter.
8109 * parse.y (parse_xref_tag): New function.
8110 (parse_handle_class_head): Likewise.
8111 (primary): Use parse_xref_tag.
8112 (class_head_decl): Use parse_handle_class_head.
8113 (class_head_defn): Likewise.
8114 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8115 (build_dynamic_cast_1): Likewise.
8116 (create_pseudo_type_info): Likewise.
8117 (emit_support_tinfos): Likewise.
8118 * typeck.c (build_object_ref): Adjust call to
8119 build_x_component_ref.
8120 (build_x_component_ref): Remove protect parameter.
8122 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8124 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8125 * class.c (handle_using_decl): Likewise.
8126 (instantiate_type): Likewise.
8127 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8128 (xref_basetypes): Change prototype.
8129 (begin_mem_initializers): New function.
8130 (get_overloaded_fn): Likewise.
8131 * decl.c (xref_basetypes): Simplify.
8132 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8133 * init.c (build_offset_ref): Likewise.
8134 * parse.y (base_init): Use begin_mem_initializers().
8135 (structsp): Adjust call to xref_basetypes.
8136 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8137 (instantiate_class_template): Adjust call to xref_basetypes.
8138 * semantics.c (begin_mem_initializers): New function.
8139 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8140 (really_overlaoded_fn): Likewise.
8141 (get_overloaded_fn): New function.'
8142 (get_first_fn): USe BASELINK_FUNCTIONS.
8144 2002-06-24 Mark Mitchell <mark@codesourcery.com>
8146 * cp-tree.h (SCALAR_TYPE_P): New macro.
8147 (check_for_out_of_scope_variable): New function.
8148 (at_class_scope_p): Likewise.
8149 (finish_fname): Likewise.
8150 * class.c (finish_struct): Use at_function_scope_p.
8151 * decl.c (check_for_out_of_scope_variable): New function, split
8152 out from do_identifier.
8153 (finish_enum): Use at_function_scope_p.
8154 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8155 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
8156 (primary): Use at_function_scope_p.
8157 * search.c (at_class_scope_p): New function.
8158 * semantics.c (finish_fname): Likewise.
8159 (check_multiple_declarators): Use at_function_scope_p.
8161 2002-06-23 Mark Mitchell <mark@codesourcery.com>
8163 * parse.y (parse_scoped_id): New function.
8165 * cp-tree.h (do_scoped_id): Adjust declaration.
8166 * lex.c (do_scoped_id): Remove call to yylex.
8167 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8168 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8169 expanding it inline.
8171 2002-06-23 Matt Thomas <matt@3am-software.com>
8173 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8176 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8178 * mangle.c (integer_type_codes): Const-ify.
8180 2002-06-20 Richard Henderson <rth@redhat.com>
8183 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8184 Call put_var_into_stack.
8186 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8188 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8189 array size calculation.
8191 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8194 * pt.c (tsubst_expr): Handle FILE_STMT.
8196 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8199 * pt.c (lookup_template_class): Don't build complete argument of
8200 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8203 2002-06-19 Akim Demaille <akim@epita.fr>
8205 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8207 * spew.c, lex.c: Adjust.
8208 * parse.y (explicit_instantiation): Add empty action to override
8209 the default $$ = $1 where it introduces a type clash.
8211 2002-06-14 Jason Merrill <jason@redhat.com>
8213 * semantics.c (begin_for_stmt): Push the 'for' scope before
8214 adding the FOR_STMT.
8217 * class.c (build_base_field): Set DECL_PACKED.
8218 (layout_class_type): Don't use tail padding of PODs.
8219 * mangle.c (write_unqualified_name): Fix template conversion op
8222 2002-06-16 Richard Henderson <rth@redhat.com>
8225 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8226 after template instantiation.
8228 2002-06-16 Richard Henderson <rth@redhat.com>
8230 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8232 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
8234 * cp-tree.h (compiler_error): Remove declaration.
8235 * lex.c (compiler_error): Remove definition.
8237 2002-06-14 Steve Ellcey <sje@cup.hp.com>
8239 * g++spec.c (LIBUNWIND): New.
8240 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8242 2002-06-13 Jessica Han <jessica@cup.hp.com>
8244 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8245 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8246 (build_vbase_offset_vtbl_entries): Likewise.
8247 * rtti.c (build_headof): Likewise.
8248 (get_tinfo_decl_dynamic): Likewise.
8249 (create_pseudo_type_info): Likewise.
8251 2002-06-12 Stan Shebs <shebs@apple.com>
8253 * mpw-config.in: Remove file, no longer used.
8254 * mpw-make.sed: Ditto.
8256 2002-06-07 Zack Weinberg <zack@codesourcery.com>
8258 * decl2.c: Update call to cpp_handle_option.
8260 2002-06-07 H.J. Lu (hjl@gnu.org)
8262 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8264 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
8266 * error.c (cp_error_at): Fix typo.
8268 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
8270 * error.c (cp_diagnostic_starter): Adjust call.
8271 (maybe_print_instantiation_context): Change prototype to take a
8272 'diagnostic_info *'.
8273 (print_instantiation_full_context): Likewise.
8274 (print_instantiation_partial_context): Likewise.
8275 (cp_diagnostic_starter): Likewise.
8276 (cp_diagnostic_finalizer): Likewise.
8277 (cp_print_error_function): Likewise.
8278 (cp_printer): Take a secondary parameter as a 'text_info *'.
8279 Remove output_state savings. Adjust calls.
8281 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8283 * pt.c (inline_parm_levels): Mark for GC.
8285 * mangle.c (start_mangling): Allocate G.substitutions here...
8286 (init_mangle): ... rather than here.
8287 (finish_mangling): Clear the varray pointer when done with it.
8288 * spew.c (yylexstring): Don't use VARRAY_FREE.
8289 * search.c (bfs_walk): Don't use VARRAY_FREE.
8290 * decl2.c (pending_statics): Use gengtype to mark.
8291 (deferred_fns): Likewise.
8292 (ssdf_decls): Likewise.
8293 (init_decl2): Delete.
8294 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8295 (cxx_init_decl_processing): Don't call init_decl2.
8296 (cxx_pop_function_context): Don't use VARRAY_FREE.
8297 * cp-tree.h (struct saved_scope): No need for special marking
8299 (struct language_function): Likewise.
8300 (local_classes): Use gengtype to mark.
8301 (init_decl2): Delete prototype.
8302 * class.c (init_class_processing): Don't use
8303 ggc_add_tree_varray_root.
8304 (build_vtbl_initializer): Don't use VARRAY_FREE.
8306 * decl.c (typename_compare): Don't use same_type_p.
8308 * decl.c: Include hashtab.h instead of hash.h.
8309 (typename_hash): Update to use htab_h.
8310 (typename_compare): Likewise.
8311 (typename_htab): Use gengtype to mark.
8312 (build_typename_type): Update to use htab_h.
8313 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8315 * Make-lang.in (gt-cp-tree.h): New rule.
8316 (cp/tree.o): Depend on gt-cp-tree.h.
8317 * config-lang.in (gtfiles): Add cp/tree.c.
8318 * tree.c: Include gt-cp-tree.h.
8319 (list_hash_table): Use gengtype to mark.
8320 (init_tree): Use gengtype to mark trees.
8322 * Make-lang.in (cp/decl.o): Add debug.h dependency.
8323 * call.c (struct z_candidate): Use gengtype.
8324 (USER_CONV_CAND): Use WRAPPER_ZC.
8325 (convert_class_to_reference): Use build_zc_wrapper.
8326 (build_type_conversion_1): Likewise.
8327 (build_over_call): Use WRAPPER_ZC.
8328 (add_warning): Use build_zc_wrapper.
8329 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8330 * cp-tree.h (struct lang_identifier): Use gengtype.
8331 (struct template_parm_index_s): Likewise.
8332 (struct ptrmem_cst): Likewise.
8333 (struct tree_binding): Likewise.
8334 (struct tree_overload): Likewise.
8335 (struct tree_srcloc): Likewise.
8336 (struct tree_wrapper): Likewise. Also modify to have a pointer
8337 to struct z_candidate rather than void.
8338 (enum cp_tree_node_structure_enum): New.
8339 (union lang_tree_node): New.
8340 (cxx_mark_tree): Delete prototype.
8341 (cp_tree_node_structure): New prototype.
8342 (build_ptr_wrapper): Delete prototype.
8343 (build_int_wrapper): Delete prototype.
8344 (build_zc_wrapper): New prototype.
8345 * decl.c: Include debug.h
8346 (cxx_mark_tree): Delete.
8347 (cp_tree_node_structure): New.
8348 * tree.c (build_ptr_wrapper): Delete.
8349 (build_int_wrapper): Delete.
8350 (build_zc_wrapper): New.
8352 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8353 Correct typo. Patch from k_fukui@highway.ne.jp.
8355 * semantics.c (current_stmt_tree): Update for change to
8356 struct language_function.
8357 (finish_mem_initializers): Likewise.
8358 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8359 * cp-tree.h (struct language_function): Rename from
8360 cp_language_function. Change all uses.
8361 (cp_function_chain): Don't need to cast.
8363 * class.c (duplicate_tag_error): Reset discriminator.
8364 (check_bases_and_members): Update for data structure changes.
8365 * cp-tree.h (struct lang_id2): Use gengtype.
8366 (flagged_type_tree): Likewise.
8367 (SET_LANG_ID): Use GGC on struct lang_id2.
8368 (struct cp_language_function): Use gengtype. Remove field
8369 'x_vcalls_possible_p'.
8370 (current_vcalls_possible_p): Delete.
8371 (struct lang_type_header): New.
8372 (struct lang_type_class): Rename from struct lang_type. Include
8373 struct lang_type_header.
8374 (struct lang_type_ptrmem): New.
8375 (struct lang_type): New.
8376 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
8377 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
8378 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8379 (struct lang_decl_flags): Use gengtype. Add discriminators.
8380 (struct lang_decl): Use gengtype. Add and use discriminators.
8381 Update the macros that reference moved fields.
8382 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
8383 (SET_DECL_THUNK_P): Set discriminator too.
8384 (clear_inline_text_obstack): Delete prototype.
8385 (finish_inline_definitions): Delete prototype.
8386 (mark_pending_inlines): Delete prototype.
8387 (lang_check_failed): New prototype.
8388 * decl.c (struct named_label_use_list): Use gengtype.
8389 (struct named_label_list): Likewise.
8390 (mark_binding_level): Delete.
8391 (mark_named_label_lists): Delete.
8392 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8393 (cxx_init_decl_processing): Use generated marker routine.
8394 (begin_destructor_body): Delete dead set to
8395 current_vcalls_possible_p.
8396 (mark_lang_function): Delete.
8397 (mark_cp_function_context): Delete.
8398 (lang_mark_tree): Use generated marker routines.
8399 * decl2.c (start_objects): Set discriminator when setting
8400 GLOBAL_INIT_PRIORITY.
8401 * lex.c (retrofit_lang_decl): Set discriminators.
8402 (copy_lang_type): Update for changes to lang_type structure.
8403 (cp_make_lang_type): Set discriminator.
8404 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
8405 * search.c: Include ggc.h.
8406 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8407 (finish_inline_definitions): Delete.
8408 * spew.c (struct token): Use gengtype.
8409 (struct token_chunk): New.
8410 (struct unparsed_text): Use gengtype. Store tokens in chunks.
8411 (struct feed): Use gengtype.
8412 (feed_obstack): Delete.
8413 (feed): Mark as GC root.
8414 (pending_inlines): Mark as GC root.
8415 (pending_inlines_tail): Likewise.
8416 (processing_these_inlines): Likewise.
8417 (token_obstack): Make static.
8418 (first_token): Likewise.
8419 (init_spew): Don't initialize deleted things; use gengtype for roots.
8420 (clear_inline_text_obstack): Delete.
8421 (feed_input): Use GC for struct feed. Update for changes to
8422 struct unparsed_text.
8423 (mark_pending_inlines): Delete.
8424 (next_token): Rename from add_token. Change all callers. Update
8425 for changes to struct unparsed_text.
8426 (space_for_token): New.
8427 (remove_last_token): New.
8428 (alloc_unparsed_text): New.
8429 (snarf_block): Take an unparsed_text. Update for changes to struct
8431 (snarf_method): Update for changes to struct unparsed_text.
8432 (snarf_defarg): Update for changes to struct unparsed_text.
8433 * tree.c (lang_check_failed): New.
8435 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8436 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8437 (cp/spew.o): Add dependency on gt-<filename>.h.
8438 (cp/decl2.o): Add dependency on gt-<filename>.h.
8439 (cp/call.o): Add dependency on gt-<filename>.h.
8440 (cp/pt.o): Add dependency on gt-<filename>.h.
8441 (cp/repo.o): Add dependency on gt-<filename>.h.
8442 (cp/parse.o): Add dependency on gt-<filename>.h.
8443 * call.c: Use gengtype for roots.
8444 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8445 decl2.c parse.y pt.c repo.c spew.c.
8446 * cp-tree.h: Use gengtype for roots.
8447 (struct saved_scope): Use GGC, gengtype.
8448 (cp_parse_init): Delete prototype.
8449 (init_pt): Delete prototype.
8450 * decl.c: Use gengtype for roots.
8451 (mark_saved_scope): Delete.
8452 (cxx_init_decl_processing): Don't call deleted initilisation
8454 (signed_size_zero_node): Delete, unused.
8455 * decl.h: Use gengtype for roots.
8456 * decl2.c: Use gengtype for roots.
8457 * lex.h: Use gengtype for roots.
8458 * parse.y: Use gengtype for roots.
8459 (cp_parse_init): Delete.
8460 * pt.c: Use gengtype for roots.
8462 * repo.c: Use gengtype for roots.
8463 * spew.c: Use gengtype for roots.
8465 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
8466 (cp/decl.o): Add dependency on gtype-cp.h.
8467 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8468 Include gtype-cp.h. Allow for filename changes.
8470 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8471 (cp/decl.o): Add cp/gt-decl.h dependency.
8472 * config-lang.in (gtfiles): New.
8473 * tree.h: Rename struct binding_level to struct cp_binding_level.
8474 * decl.c: Rename struct binding_level to struct cp_binding_level.
8475 Include cp/gt-decl.h.
8476 (struct cp_binding_level): Use gengtype.
8477 (make_binding_level): Use GGC on struct cp_binding_level.
8478 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8479 (cxx_init_decl_processing): Mark free_binding_level as
8482 * decl.c (mark_cp_function_context): Update calling sequence.
8484 * decl.c (start_function): Don't free 'struct
8485 cp_language_function'.
8486 (pop_cp_function_context): Likewise.
8487 (save_function_data): Allocate it using GC.
8488 * semantics.c (genrtl_start_function): Don't free 'struct
8489 cp_language_function'.
8491 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
8493 * lang-specs.h: Use cpp_debug_options.
8495 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8497 * mangle.c, tree.c: Include real.h.
8498 * Make-lang.in: Update dependency lists.
8500 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
8502 * lex.c: Don't include c-lex.h.
8503 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8505 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
8507 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8509 2002-05-22 Richard Henderson <rth@redhat.com>
8511 * decl.c (obscure_complex_init): Check for VAR_DECL
8512 before using DECL_THREAD_LOCAL.
8514 2002-05-22 Richard Henderson <rth@redhat.com>
8516 * decl.c (check_tag_decl): Handle RID_THREAD.
8517 (obscure_complex_init): Reject run-time init of tls.
8518 (grokvardecl, grokdeclarator): Handle RID_THREAD.
8519 * lex.c (reswords): Add __thread.
8520 (rid_to_yy): Map RID_THREAD to SCSPEC.
8522 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
8524 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8525 * cp-tree.h (cxx_post_options): Kill.
8526 * cp-lex.c (cxx_post_options): Kill.
8528 2002-05-21 Richard Henderson <rth@redhat.com>
8530 * lex.c (rid_to_yy): Add RID_THREAD.
8532 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
8534 * init.c (build_vec_init): Test for trivial copy-assignment when
8535 copy-assigning arrays.
8537 2002-05-20 Andreas Jaeger <aj@suse.de>
8539 * init.c (build_default_init): Remove unused variable.
8541 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
8543 * call.c (any_strictly_viable): New.
8544 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8546 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8548 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8550 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8553 * pt.c (do_decl_instantiation): Don't complain explicit
8554 instantiation after explicit specialization.
8555 (do_type_instantiation): Likewise.
8557 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
8559 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8561 (complete_type_or_else): ... this. Redefined as macro.
8562 (cxx_incomplete_type_diagnostic): Declare.
8563 (cxx_incomplete_type_error): Define as macro.
8564 * init.c (build_delete): Warn about incomplete types other than
8565 void, and use the built-in operator delete for them.
8566 * typeck.c (complete_type_or_diagnostic): Renamed from
8567 complete_type_or_else. Added warn_only argument, passed to...
8568 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
8569 warnings or errors depending on new warn_only argument. Renamed
8571 (cxx_incomplete_type_error): ... this. New implementation in
8572 terms of cxx_incomplete_type_diagnostic.
8574 2002-05-18 Jason Merrill <jason@redhat.com>
8577 * decl2.c (import_export_decl): If we clear
8578 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8580 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8583 * pt.c (verify_class_unification): Don't check if PARM is template
8584 parameter dependent. Simplify.
8585 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8586 parameter dependent expression.
8588 2002-05-14 Jason Merrill <jason@redhat.com>
8590 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8592 (synthesize_tinfo_var): Take the public decl.
8593 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
8594 (emit_tinfo_decl): Adjust. Call import_export_decl.
8595 * decl2.c (import_export_decl): Simplify tinfo decl handling.
8597 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
8599 * cp-tree.h (struct lang_type): Added non_zero_init.
8600 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8601 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8602 * class.c (check_field_decls): Test non_zero_init.
8603 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8604 zero-to-NULL conversions.
8605 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8606 type that needs zero-initialization without zeros.
8607 (check_initializer_decl): Compute zero-initializer for types
8608 that require a non-trivial one.
8609 * init.c (build_forced_zero_init): New function.
8610 (build_default_init): Use it.
8611 * tree.c (zero_init_p): New function.
8612 * typeck2.c (force_store_init_value): New function.
8613 (process_init_constructor): Create non-trivial zero-initializers
8614 for array members and class fields.
8616 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
8618 * lang-specs.h: Remove redundant -lang-c++.
8620 2002-05-13 Jason Merrill <jason@redhat.com>
8622 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8623 (fixed_type_or_null): See through reference vars.
8624 (build_base_path): Vtable contents are constant.
8625 * typeck.c (get_member_function_from_ptrfunc): Likewise.
8627 2002-05-12 Jason Merrill <jason@redhat.com>
8629 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8632 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
8634 * cp-tree.h (flag_ansi): Remove.
8635 * decl2.c (flag_ansi): Remove.
8636 (cxx_decode_option): Set flag_iso and flag_undef.
8638 2002-05-09 Jason Merrill <jason@redhat.com>
8640 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8641 Use subtraction rather than a bitmask to get the index.
8642 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8644 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8646 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
8648 * Make-lang.in (decl2.o): Update.
8649 * cp-tree.h (warn_multichar): Remove.
8650 * decl2.c: Include c-common.h.
8651 (warn_multichar): Remove.
8653 2002-05-03 Jason Merrill <jason@redhat.com>
8655 * tree.c (build_cplus_array_type): Only const and volatile get
8658 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8660 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8662 ABI change, returning simple classes from functions.
8663 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8664 TYPE_HAS_TRIVIAL_INIT_REF is false or
8665 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8667 2002-04-30 Jason Merrill <jason@redhat.com>
8670 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8671 anonymous class with a typedef if there are attributes.
8673 2002-04-29 Paul Eggert <eggert@twinsun.com>
8675 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8677 2002-04-29 Jakub Jelinek <jakub@redhat.com>
8680 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8683 2002-04-29 Mark Mitchell <mark@codesourcery.com>
8686 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8687 enter that scope before name lookup.
8690 * method.c (do_build_copy_constructor): Avoid building
8691 cv-qualified reference types.
8693 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
8696 * decl.c (grok_op_properties): Assignment ops don't have to return
8697 by value. operator% should.
8699 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8702 * decl.c (duplicate_decls): Call merge_weak.
8704 2002-04-26 Richard Henderson <rth@redhat.com>
8706 * parse.y (malloced_yyss, malloced_yyvs): New.
8707 (yyoverflow): Re-add. Set them.
8708 (free_parser_stacks): New.
8710 2002-04-26 Mark Mitchell <mark@codesourcery.com>
8713 * method.c (do_build_assign_ref): Pass a derivation to
8714 build_method_call when calling base class assignment operators.
8716 2002-04-26 Richard Henderson <rth@redhat.com>
8718 * parse.y (yyoverflow): Revert.
8720 2002-04-26 Richard Henderson <rth@redhat.com>
8723 * parse.y (string): Remove. Update all uses to use STRING
8724 instead, and not call combine_strings.
8725 * rtti.c (tinfo_name): Use fix_string_type.
8726 * semantics.c (finish_asm_stmt): Don't call combine_strings.
8727 * spew.c (yylexstring): New.
8728 (read_token): Use it.
8730 2002-04-25 Richard Henderson <rth@redhat.com>
8733 * parse.y (yyoverflow): New.
8735 2002-04-25 Jason Merrill <jason@redhat.com>
8738 * search.c (check_final_overrider): No longer static.
8739 * class.c (update_vtable_entry_for_fn): Call it.
8740 * cp-tree.h: Adjust.
8742 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8744 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8745 * cp-tree.h (cxx_set_yydebug): Die.
8746 * lex.c (YYDEBUG): Get from c-lex.h.
8747 (cxx_set_yydebug): Remove.
8748 * parse.y: Include c-lex.h.
8749 (YYDEBUG): Get from c-lex.h.
8751 2002-04-24 Mark Mitchell <mark@codesourcery.com>
8754 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8757 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
8759 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8760 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8762 * cp-tree.h (cp_attribute_table): Rename.
8763 * decl.c (lang_attribute_table): Remove declaration.
8764 (cxx_init_decl_processing): Don't set it.
8765 * tree.c (cp_attribute_table): Rename.
8767 2002-04-24 Jason Merrill <jason@redhat.com>
8770 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8771 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8772 The pedwarn for array assignment is now unconditional.
8773 * tree.c (build_cplus_array_type_1): Still process simple array types
8774 normally in templates.
8777 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8780 2002-04-23 Jakub Jelinek <jakub@redhat.com>
8782 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8783 node with attributes.
8785 2002-2-23 David O'Brien <obrien@FreeBSD.org>
8787 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8788 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8790 2002-04-23 Mark Mitchell <mark@codesourcery.com>
8793 * pt.c (tsubst_friend_class): Handle templates with explicit
8797 * typeck.c (merge_types): Remember the cv-qualification of pointer
8798 types when merging them.
8800 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
8802 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8803 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8804 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8805 cxx_mark_function_context): New.
8806 * decl.c (push_cp_function_context, pop_cp_function_context,
8807 mark_cp_function_context): Rename for consistency.
8808 (cxx_init_decl_processing): Don't set old hooks.
8810 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
8812 * call.c (convert_type_from_ellipsis): Rename, update.
8813 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8814 * cp-tree.h (convert_type_from_ellipsis): Rename.
8815 * decl.c (cxx_init_decl_processing): Don't set hook.
8817 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8819 * call.c (build_new_method_call): Update.
8820 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8821 * cp-tree.h (cxx_incomplete_type_error): New.
8822 * decl.c (grokdeclarator, grokparms): Update.
8823 * decl2.c (check_classfn): Update.
8824 * pt.c (tsubst): Update.
8825 * typeck.c (complete_type_or_else, expr_sizeof,
8826 decay_conversion): Update.
8827 * typeck2.c (incomplete_type_error): Rename.
8828 (add_exception_specifier): Update.
8830 2002-04-18 Jason Merrill <jason@redhat.com>
8833 * search.c (setup_class_bindings): A class template qualifies as a
8836 2002-04-17 Jakub Jelinek <jakub@redhat.com>
8839 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8842 2002-04-16 Mark Mitchell <mark@codesourcery.com>
8844 * init.c (begin_init_stmts): Remove commented out code.
8845 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8846 * semantics.c (begin_gobal_stmt_expr): Adjust call to
8847 expand_start_stmt_expr.
8849 2002-04-15 Mark Mitchell <mark@codesourcery.com>
8851 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8852 dso_handle itself, to __cxa_atexit.
8854 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8856 * error.c (cxx_print_error_function): Adjust call to macros.
8858 2002-04-14 Jakub Jelinek <jakub@redhat.com>
8860 * class.c (layout_virtual_bases): Do all dsize computation on trees.
8862 2002-04-14 Jason Merrill <jason@redhat.com>
8864 * typeck.c (get_member_function_from_ptrfunc): Don't do
8865 gratuitious division and multiplication on
8866 ptrmemfunc_vbit_in_delta targets.
8868 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8871 * semantics.c (finish_expr_stmt): Remember the type of the
8872 expression before any conversions are performed.
8874 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8877 * call.c (add_template_candidate_real): Do not treat member
8878 templates as copy constructors.
8880 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8882 * decl.c (duplicate_decls): Do not copy the RTL for a variable
8883 declaration if the old variable had an incomplete type and the new
8885 (complete_vars): Do not call layout_decl for completed variables.
8887 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
8889 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8890 with an explicit one.
8891 (follow_tag_typedef): New.
8892 (lookup_tag): Use it to extract the tag of an explicit typedef.
8893 (xref_tag): Likewise.
8895 2002-04-11 Andrew Haley <aph@redhat.com>
8897 * typeck.c (type_after_usual_arithmetic_conversions):
8898 If two types have the same variant, return immediately.
8899 When two floating-point operands are the same precision:
8900 convert to float if one of the operands is float;
8901 if neither operand is one of the standard types, return the type
8902 of the first operand.
8904 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
8907 * decl.c (make_typename_type): Remove implicit typenameness.
8909 2002-04-09 Jason Merrill <jason@redhat.com>
8911 PR optimization/6189
8912 * semantics.c (genrtl_start_function): Don't free
8913 DECL_SAVED_FUNCTION_DATA for inline functions.
8915 * init.c (build_member_call): For now, don't convert to
8916 intermediate base if it would cause an error.
8918 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
8920 * parse.y (namespace_qualifier, maybe_identifier,
8921 begin_explicit_instantiation, end_explicit_instantiation,
8922 apparent_template_type, .finish_template_type,
8923 do_id, maybe_init, defarg_again, component_decl_1):
8924 Add ending ';', in accordance with POSIX.
8926 2002-04-06 Mark Mitchell <mark@codesourcery.com>
8929 * class.c (layout_class_type): Remember incomplete static
8931 (finish_struct_1): Call complete_vars, not
8932 hack_incomplete_structures.
8933 * cp-tree.h (hack_incomplete_structures): Rename to ...
8934 (complete_vars): ... this.
8935 (struct saved_scope): Remove incomplete.
8936 (namespace_scope_incomplete): Remove.
8937 * decl.c (struct binding_level): Remove incomplete.
8938 (incomplete_vars): New variable.
8939 (mark_binding_level): Don't mark incomplete.
8940 (print_binding_level): Don't print it.
8941 (mark_saved_scope): Don't mark incomplete.
8942 (pushdecl): Use maybe_register_incopmlete_var.
8943 (cxx_init_decl_processing): Register incomplete_vars for GC.
8944 (start_decl_1): Clarify error message.
8945 (hack_incomplete_vars): Remove.
8946 (maybe_register_incomplete_var): New function.
8947 (complete_vars): Likewise.
8949 2002-04-06 Jason Merrill <jason@redhat.com>
8952 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8953 set before checking it.
8956 * init.c (build_member_call): Use build_scoped_ref.
8957 (resolve_offset_ref): Likewise.
8958 * call.c (build_scoped_method_call): Likewise.
8959 * tree.c (maybe_dummy_object): Kludge around current_class_type being
8961 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8962 * cp-tree.h: Adjust.
8964 * init.c (push_base_cleanups): Just use build_scoped_method_call.
8967 * method.c (implicitly_declare_fn): Pass unqualified type to
8968 synthesize_exception_spec.
8970 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8972 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8973 * cvt.c: Update comment.
8974 * init.c (expand_cleanup_for_base): Update.
8975 * semantics.c (finish_parenthesized_expr): Update.
8976 * typeck.c (cp_truthvalue_conversion): Update.
8978 2002-04-04 Jason Merrill <jason@redhat.com>
8980 * semantics.c (finish_eh_cleanup): New fn.
8981 * cp-tree.h: Add prototype.
8982 * init.c (perform_member_init, expand_cleanup_for_base): Use
8984 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8985 * cp-tree.h: Remove references.
8986 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8987 * dump.c (cp_dump_tree): Likewise.
8988 * pt.c (tsubst_expr): Likewise.
8989 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8990 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8991 * tree.c (cp_statement_code_p): Likewise.
8993 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8996 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9000 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9002 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9004 2002-04-03 Richard Henderson <rth@redhat.com>
9006 * cp-lang.c (cxx_warn_unused_global_decl): New.
9007 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9009 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9011 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9012 * tree.c (init_tree): Don't set hook.
9014 2002-04-03 Roger Sayle <roger@eyesopen.com>
9017 * decl.c (duplicate_decls): Don't mess with assembler names when
9018 redeclaring builtin functions as static.
9020 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9022 * call.c (build_addr_func): Update.
9023 * class.c (resolve_address_of_overloaded_function): Update.
9024 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9025 * cp-tree.h (cxx_mark_addressable): New.
9026 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9027 * decl2.c (build_cleanup): Update.
9028 * except.c (build_throw): Update.
9029 * init.c (resolve_offset_ref): Update.
9030 * pt.c (convert_nontype_argument): Update.
9031 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9032 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9033 unary_complex_lvalue): Update.
9034 (mark_addressable): Rename.
9036 2002-04-01 Roger Sayle <roger@eyesopen.com>
9039 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9040 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9041 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9043 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9045 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9046 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9047 * decl.c (grokdeclarator): Update.
9048 * mangle.c (write_integer_cst): Update.
9049 * typeck.c (build_binary_op): Update.
9051 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9053 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9054 * lex.c (cxx_init): Don't set hook.
9056 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9058 * Make-lang.in (error.o): Update.
9059 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9060 * cp-tree.h (struct diagnostic_context): Predeclare.
9061 (cxx_print_error_function): New.
9062 * error.c: Include langhooks-def.h.
9063 (lang_print_error_function): Rename. Update.
9064 (init_error): Don't set hook.
9066 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9068 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9070 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9071 * decl.c (finish_enum): Similarly.
9072 * error.c (dump_type): Similarly.
9073 * lex.c (cxx_init): Similarly.
9074 * mangle.c (write_builtin_type): Similarly.
9075 * typeck.c (comptypes): Similarly.
9077 2002-03-28 Roger Sayle <roger@eyesopen.com>
9080 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9081 in the g++ front-end.
9082 (duplicate_decl): Allow redefinition of anticipated built-ins.
9083 Fix inlining problem by over-writing the old DECL_RTL.
9084 (lookup_namespace_name): Fail to find an identifier in the
9085 specified namespace if its still anticipated.
9086 (builtin_function_1): New function split out from builtin_function
9087 to create a builtin in the current namespace with given context.
9088 (builtin_function): Call builtin_function_1 to define the
9089 appropriate builtins in both the std and global namespaces.
9090 (select_decl): Don't test for anticipated decls here.
9091 (unqualified_namespace_lookup): Instead ignore them whilst
9092 searching through scopes and namespaces.
9093 * decl2.c (do_nonmember_using_decl): If a using declaration
9094 specifies an anticipated built-in function, mark it as no longer
9095 anticipated in that scope.
9096 (ambiguous_decl): Avoid resolving to an anticipated decl.
9097 * lex.c (do_scoped_id): Fail to find an identifier in the global
9098 namespace if its still anticipated.
9100 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9102 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9103 * cp-tree.h (cp_make_lang_type): Rename.
9104 * lex.c (cp_make_lang_type): Rename.
9105 (make_aggr_type): Update.
9106 * tree.c (init_tree): Don't set make_lang_type_fn.
9108 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9111 * class.c (finish_struct_1): Update static field's DECL_MODE even
9112 if its type is a variant of t.
9114 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9116 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9117 * cp-tree.h (cxx_insert_default_attributes): New.
9118 * decl.c (insert_default_attributes): Rename.
9120 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9123 * call.c (build_op_delete_call): Allow for the fact the placement
9124 may be a COMPOUND_EXPR.
9126 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9128 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9129 * cp-tree.h (init_cplus_expand): Remove.
9130 (cxx_expand_expr): New.
9131 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9133 (init_cplus_expand): Remove.
9134 * lex.c (cxx_init): Don't call init_cplus_expand.
9136 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9139 * init.c (build_new_1): Allow for the fact the result of
9140 build_function_call may be a COMPOUND_EXPR.
9142 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
9145 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9146 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9147 (dfs_skip_nonprimary_vbases_markedp): Remove.
9148 * search.c (get_shared_vbase_if_not_primary): Remove.
9149 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9150 (dfs_skip_nonprimary_vbases_markedp): Remove.
9151 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9152 (dfs_marked_real_bases_queue_p): Likewise.
9154 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9156 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9157 * cp-tree.h (cxx_mark_tree): New.
9158 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9160 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9162 * cp-tree.h (cxx_maybe_build_cleanup): New.
9163 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9164 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9165 * tree.c (build_target_expr): Update.
9166 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9168 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9170 * decl2.c (cxx_decode_option): Handle -E.
9171 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9172 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9174 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9177 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9179 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9181 * error.c (dump_type): Be careful about implicit typenames.
9183 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9186 * semantics.c (finish_base_specifier): Handle erronous base
9189 2002-03-22 Zack Weinberg <zack@codesourcery.com>
9191 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9194 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
9196 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9197 an index into the vtable_entry array regardless of
9198 TARGET_PTRMEMFUNC_VBIT_LOCATION.
9200 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
9202 * tree.c (cp_cannot_inline_tree_fn): Same.
9204 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9206 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9207 insert_block, getdecls, global_bindings_p): New.
9209 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
9212 * mangle.c (struct globals) Add internal_mangling_p member.
9213 (write_template_param): Do internal mangling, if needed.
9214 (mangle_conv_op_name_for_type): Request internal mangling.
9216 2002-03-20 Jason Merrill <jason@redhat.com>
9219 * init.c (build_delete): Check access for a member op delete here.
9220 * decl2.c (delete_sanity): Not here.
9222 2002-03-19 Jason Merrill <jason@redhat.com>
9225 * class.c (get_vfield_name): Use the constructor_name.
9227 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9229 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9230 * cp-tree.h (lang_printable_name): Rename.
9231 * error.c (lang_decl_name): Use new hook.
9232 * lex.c (cxx_init): Remove old hook.
9233 * pt.c (tsubst_decl): Use new hook.
9234 * tree.c (lang_printable_name): Rename.
9236 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
9239 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9240 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9241 only after recording the declaration.
9243 2002-03-18 Jason Merrill <jason@redhat.com>
9246 * init.c (resolve_offset_ref): Hand off to build_component_ref.
9248 PR c++/4222, c++/5995
9249 * call.c (build_over_call): Fix empty class logic.
9252 * cp-tree.h (struct saved_scope): Add last_parms field.
9253 * decl.c (maybe_push_to_top_level): Save last_function_parms.
9254 (pop_from_top_level): Restore it.
9257 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
9261 * pt.c (tsubst_friend_function): Use decl_namespace_context.
9263 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9264 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9265 type with a nontrivial destructor.
9267 2002-03-17 Jason Merrill <jason@redhat.com>
9270 * class.c (build_base_path): Virtual base layout is fixed in
9273 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9275 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9276 * parse.y (yyparse): Remove macro.
9278 2002-03-17 Jason Merrill <jason@redhat.com>
9281 * init.c (build_new_1): Pass the right pointer to op delete.
9283 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
9286 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9287 conversion operators go.
9288 (struct lang_decl_flags): Add template_conv_p and unused
9290 (DECL_TEMPLATE_CONV_FN_P): New macro.
9291 * call.c (build_user_type_conversion_1): Don't check second type
9292 conversion of overload set first.
9293 * class.c (add_method): Make sure templated conversion operators
9294 all end up on slot 2.
9295 * lex.c (do_identifier): A conversion operator token might be
9296 satisfied by a templated conversion operator.
9297 * pt.c (check_explicit_specialization): Use
9298 CLASSTYPE_FIRST_CONVERSION_SLOT.
9299 (template_parm_this_level_p): New function.
9300 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9301 * search.c (lookup_fnfields_1): Template conversions will be on
9303 * typeck.c (build_component_ref): Preserve the type of an
9304 conversion operator name on the overload type.
9305 (build_x_function_call): Retrieve the conversion operator name.
9307 2002-03-15 Richard Henderson <rth@redhat.com>
9309 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9311 2002-03-15 Mark Mitchell <mark@codesourcery.com>
9313 * cp-tree.h (CLEANUP_DECL): Remove.
9314 (CLEANUP_EXPR): Likewise.
9315 * decl.c (destroy_local_var): Simplify.
9316 (maybe_build_cleanup): Tidy.
9317 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9318 * semantics.c (cp_expand_stmt): Likewise.
9319 * cp/tree.c (cp_statement_code_p): Likewise.
9321 2002-03-15 Jason Merrill <jason@redhat.com>
9324 * decl.c (duplicate_decls): Use merge_types instead of common_type.
9325 * typeck.c (common_type): Just hand off to
9326 type_after_usual_arithmetic_conversions and
9327 composite_pointer_type.
9328 (merge_types): New fn.
9329 (commonparms): Use it instead of common_type.
9330 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9331 (composite_pointer_type): Also handle attributes.
9332 * cp-tree.h: Declare merge_types.
9334 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9336 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9338 2002-03-14 Richard Henderson <rth@redhat.com>
9340 * decl.c: Include c-pragma.h.
9341 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9342 * Make-lang.in: Update dependencies.
9344 2002-03-14 Jakub Jelinek <jakub@redhat.com>
9347 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9348 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9350 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9352 * mangle.c (write_builtin_type): Handle 128-bit integers even if
9353 they are not a standard integer type.
9355 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9357 * cp-tree.h (init_init_processing): Remove declaration.
9358 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9359 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9361 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9363 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9365 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9367 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9368 cplus_tree_code_name): Delete.
9369 (cxx_init): Don't call add_c_tree_codes, instead set
9370 lang_unsafe_for_reeval. Don't try to copy into the various
9373 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
9376 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9377 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9380 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9382 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
9383 DR209 is now not a defect.
9384 * cp-tree.h (skip_type_access_control): Remove.
9385 * decl.c (grokdeclarator): Do type access control for friend
9387 * semantics.c (decl_type_access_control): Don't reset
9388 current_type_lookups.
9389 (save_type_access_control): Always save the lookups.
9390 (skip_type_access_control): Remove.
9391 (finish_class_definition): Don't change type_lookups.
9393 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9395 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
9397 * typeck.c (build_static_cast): Compare non-qualified types
9398 with pointer to member conversions.
9400 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
9401 Daniel Berlin <dan@dberlin.org>
9403 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9404 (cxx_get_alias_set): Use it.
9406 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9408 * cp-tree.h (stabilize_expr): Prototype.
9410 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
9412 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9413 conditional return void.
9415 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
9417 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9418 * cp-tree.h (cxx_unsave): New.
9419 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9420 (init_tree): Update.
9422 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9424 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9425 explicit sizeof/sizeof.
9426 * decl2.c (cxx_decode_option): Likewise.
9427 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9429 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
9432 * decl.c (lookup_tag): Only reject enum/class mismatch, not
9433 class/union mismatch.
9434 * parse.y (check_class_key): New function.
9435 (structsp): Call it.
9437 2002-03-01 Michael Matz <matz@suse.de>
9439 * typeck.c (cp_pointer_int_sum): Complete inner type which is
9440 used later by size_in_bytes().
9442 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
9444 * cp-tree.h: Require __GNUC__ to be #defined.
9445 (build_init): Add missing prototype.
9447 2002-03-01 Jason Merrill <jason@redhat.com>
9449 * except.c: Don't include decl.h or obstack.h. Do include
9451 (build_throw): Destroy temporaries from the thrown
9452 expression before calling __cxa_throw. Construct a thrown
9453 temporary directly into the exception object.
9454 (stabilize_throw_expr): New function.
9455 (wrap_cleanups_r): New function.
9456 * tree.c (stabilize_expr): New function.
9457 * init.c (build_init): New function.
9458 * Make-lang.in (cp/except.o): Adjust .h deps.
9460 2002-02-28 Jason Merrill <jason@redhat.com>
9462 * search.c (lookup_base_r): Don't clear is_non_public just because
9463 we found a friendly scope.
9465 * decl.c (finish_function): Only warn about missing return
9466 statement with -Wreturn-type.
9468 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9470 * class.c (build_clone): Update.
9471 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9472 * cp-tree.h (cxx_dup_lang_specific_decl): New.
9473 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9474 (copy_decl): Update.
9475 * method.c (make_thunk): Update.
9477 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9479 * decl2.c: Delete traditional-mode-related code copied from
9480 the C front end but not used, or used only to permit the
9483 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
9486 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9489 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9492 * semantics.c (finish_switch_cond): Don't call get_unwidened
9495 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
9498 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9500 (make_typename_type): Use tsubst_flags_t.
9501 * decl.c (make_typename_type): Adjust. Return non-artificial
9502 TYPE_DECLs, if required.
9503 (grokdeclarator): Simplify CVR qualification handling. Allow bad
9504 qualifiers on typedef types.
9505 * decl2.c (handle_class_head): Adjust make_typename_type call.
9506 * parse.y (nested_name_specifier): Likewise.
9507 (typename_sub0): Likewise.
9508 (typename_sub1): Likewise.
9509 * pt.c (convert_template_argument): Adjust make_typename_type
9511 (tsubst): Adjust cp_build_qualified_type_real calls.
9512 (check_cv_quals_for_unify): Cope with allowing bad qualifications
9513 on template type parms.
9514 (instantiate_decl): Recheck substitutions to give warnings on bad
9516 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9518 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
9520 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9522 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9523 unless DECL_ALWAYS_INLINE.
9525 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9527 * typeck.c (cp_pointer_int_sum): Renamed from
9528 pointer_int_sum, call pointer_int_sum.
9530 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9532 * decl.c (duplicate_decls): Return 0 if issued error about
9535 2002-02-19 Jason Merrill <jason@redhat.com>
9537 ABI change: Mangle `void (A::*)() const' as
9538 M1AKFvvE, not MK1AFvvE.
9539 * mangle.c (write_function_type): Write cv-quals for member
9541 (write_pointer_to_member_type): Not here.
9543 2002-02-18 Jason Merrill <jason@redhat.com>
9545 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9546 (do_decl_instantiation): Likewise.
9548 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
9551 * decl.c (duplicate_decls): Make warning unconditional
9552 if duplicate default argument declarations are present.
9554 2002-02-17 Jakub Jelinek <jakub@redhat.com>
9556 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9559 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
9561 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9562 remove incorrect comment. Move #if 0'd code to common path. Use
9563 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9565 2002-02-13 Jason Merrill <jason@redhat.com>
9567 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9568 (finish_function): Don't warn if current_function_returns_null.
9570 * typeck2.c (digest_init): Do handle values of vector type.
9572 * typeck2.c (digest_init, process_init_constructor): Treat vectors
9575 2002-02-11 Jason Merrill <jason@redhat.com>
9577 * parse.y (reserved_declspecs): Don't handle attributes.
9578 (reserved_typespecquals): Handle them here.
9579 * Make-lang.in (parse.c): Adjust expected conflicts.
9581 2002-02-08 Jakub Jelinek <jakub@redhat.com>
9583 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9584 instead of compstmt.
9585 (compstmt_or_stmtexpr): Renamed from compstmt.
9586 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9588 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9590 Rename instantiate_type_flags to tsubst_flags_t & expand use.
9591 * cp-tree.h (instantiate_type_flags): Rename to ...
9592 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9593 add tf_warning flag.
9594 (instantiate_type): Adjust prototype.
9595 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9596 do_type_instantiation, cp_build_qualified_type_real): Likewise.
9597 cp_build_qualified_type: Adjust.
9598 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9600 * call.c (standard_conversion): Rename itf_* to tf_*.
9601 (reference_binding): Likewise.
9602 (convert_like_real): Likewise.
9603 * cvt.c (cp_convert_to_pointer): Likewise.
9604 (convert_to_reference): Likewise.
9605 * decl.c (lookup_namespace_name): Use tf_* flags.
9606 (make_typename_type): Likewise.
9607 (grokdeclarator): Likewise.
9608 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9609 (coerce_template_template_parms, convert_template_argument,
9610 coerce_template_parms, maybe_get_template_decl_from_type_decl,
9611 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9612 instantiate_class_template, tsubst_template_arg_vector,
9613 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9614 tsubst_decl, tsubst_arg_types, tsubst_function_type,
9615 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9616 instantiate_template, fn_type_unification,
9617 resolve_overloaded_unification, verify_class_unification,
9618 unify, get_bindings_real, do_type_instantiation,
9619 regenerate_decl_from_template, instantiate_decl,
9620 tsubst_initializer_list, tsubst_enum,
9621 get_mostly_instantiated_function_type,
9622 invalid_nontype_parm_type_p): Likewise.
9623 * tree.c (cp_build_qualified_type_real): Likewise.
9624 * typeck.c (build_binary_op): Rename itf_* to tf_*.
9625 (build_ptrmemfunc): Likewise.
9626 (convert_for_assignment): Likewise.
9628 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9631 * decl.c (grokdeclarator): Allow friend declarations from
9633 * decl2.c (handle_class_head): Don't push into template parm contexts.
9634 * pt.c (push_template_decl_real): Template parm contexts are never
9637 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
9639 * class.c: Include target.h.
9640 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9641 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9643 * Make-lang.in: Adjust deps.
9645 2002-02-05 Jason Merrill <jason@redhat.com>
9647 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9649 2002-02-04 Jakub Jelinek <jakub@redhat.com>
9651 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9652 (finish_switch_cond): Set SWITCH_TYPE.
9654 2002-02-04 Richard Henderson <rth@redhat.com>
9656 * method.c (use_thunk): Always initialize the block tree. Reindent.
9657 * semantics.c (expand_body): Emit thunks after function, not before.
9659 2002-02-04 Jason Merrill <jason@redhat.com>
9661 * decl.c (start_function): Call cplus_decl_attributes immediately
9662 after grokdeclarator.
9664 * decl.c (start_function): Combine DECL_RESULT handling code.
9666 2002-02-03 Jason Merrill <jason@redhat.com>
9669 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9670 (cp/xref.o): Remove dependencies.
9671 * class.c (finish_struct_1, check_methods): Don't call xref fns.
9672 (finish_struct_1): Likewise.
9673 * friend.c (make_friend_class): Likewise.
9674 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9675 * spew.c (read_process_identifier): Likewise.
9677 2002-02-01 Jason Merrill <jason@redhat.com>
9680 * decl.c (finish_function): Warn about a non-void function with
9681 no return statement and no abnormal exit.
9682 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9683 (current_function_returns_abnormally): New macro.
9684 * call.c (build_call): Set it.
9686 * typeck.c (build_component_ref): Always complain about offsetof
9687 constructs on non-PODs. Only make it an error for members of
9690 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9691 (dump_function_decl): Always dump parms.
9693 * decl2.c (finish_static_data_member_decl): Complain about a local
9694 class with a static data member.
9697 * search.c (lookup_field_1): Don't xref a static data member
9698 just because we looked it up.
9700 2002-01-31 Jason Merrill <jason@redhat.com>
9702 * Make-lang.in (parse.c): Handle .output file.
9705 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9707 * semantics.c (finish_class_definition): Adjust.
9709 Allow attributes in parms and casts.
9710 * parse.y (named_parm): Don't strip attrs.
9711 (declmods): Remove 'attributes' production.
9712 (nonempty_cv_qualifiers): Accept attributes.
9713 (ATTRIBUTE): Give precedence.
9714 * decl.c (groktypename): Handle attributes.
9715 (grokparms): Likewise.
9717 2002-01-29 Jakub Jelinek <jakub@redhat.com>
9719 * decl2.c (cxx_decode_option): Pass 0 as last argument to
9721 * lang-specs.h: Use cpp_unique_options instead of cpp_options
9722 when used together with cc1_options.
9724 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
9727 * typeck2.c (digest_init): Make sure non-array core type is
9729 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9730 constructor, rather than build a new one.
9731 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9732 PURPOSE of constructor elts.
9734 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9736 * Make-lang.in (parse.c): Adjust expected number of
9737 shift-reduce conflicts.
9738 (decl.o): Depend on diagnostic.h.
9739 * decl.c: Include diagnostic.h.
9740 (grokdeclarator): Check for null pointer.
9741 (finish_function): Don't abort when
9742 current_binding_level->parm_flag != 1, if errors have
9743 occurred; throw away the statement tree and extra binding
9744 levels, and continue.
9745 * lex.c (note_list_got_semicolon): Check for null pointer.
9746 * method.c (hack_identifier): Just return error_mark_node if
9747 value is error_mark_node.
9748 * parse.y (primary: TYPEID(type_id)): No need to use
9749 TYPE_MAIN_VARIANT here.
9750 (handler_seq): Accept an empty list of catch clauses and
9751 generate a fake handler block to avoid later crashes.
9752 (ansi_raise_identifier): Accept the error token too.
9753 * semantics.c (begin_class_definition,
9754 finish_class_definition): Check for error_mark_node.
9756 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9758 * typeck2.c (friendly_abort): Delete definition.
9759 * cp-tree.h (friendly_abort): Don't prototype.
9760 (my_friendly_assert): Use fancy_abort.
9762 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9764 * cp-tree.h (my_friendly_abort): Remove.
9766 2002-01-23 Jakub Jelinek <jakub@redhat.com>
9768 * spew.c (pending_inlines, pending_inlines_tail,
9769 processing_these_inlines): Make static.
9770 (mark_pending_inlines): Remove static.
9771 (begin_parsing_inclass_inline): If in function, save pi
9772 for GC to cp_function_chain->unparsed_inlines instead.
9773 (process_next_inline): Likewise.
9774 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9775 (mark_pending_inlines): Add prototype.
9776 * decl.c (spew_debug): Remove unused extern.
9777 (mark_lang_function): Call mark_pending_inlines.
9779 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9781 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9782 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9783 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9784 Change my_fancy_abort() to abort().
9786 2002-01-23 Jason Merrill <jason@redhat.com>
9789 * class.c (fixed_type_or_null): Fix thinko.
9792 * init.c (resolve_offset_ref): Use build_indirect_ref.
9794 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9796 2002-01-22 Jason Merrill <jason@redhat.com>
9798 * parse.y (function_body): Suppress the block for the outermost
9800 * decl.c (pushdecl): Don't try to skip it.
9801 (begin_function_body): Keep the block we create, not the next one.
9802 * init.c (emit_base_init): Don't mess with keep_next_level.
9804 * class.c (build_base_path): Tweak formatting.
9806 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
9808 Fix regression introduced with patch for c++/775
9809 * parse.y (class_head_defn): Check for template specializations
9810 with a different class-key.
9812 2002-01-17 Jason Merrill <jason@redhat.com>
9814 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9815 (begin_function_body): Call them and keep_next_level.
9816 * init.c (emit_base_init): Call keep_next_level.
9817 * semantics.c (setup_vtbl_ptr): Lose.
9818 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9819 (vtbls_set_up_p): Lose.
9820 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9821 * method.c (do_build_copy_constructor): Likewise.
9822 (synthesize_method): Call finish_mem_initializers.
9823 * parse.y (nodecls): Likewise.
9825 * error.c (dump_type_suffix): Print the exception specs before
9827 (dump_function_decl): Here, too.
9829 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9831 2002-01-10 Ira Ruben <ira@apple.com>
9834 * decl.c (start_method): Handle attrlist.
9836 2002-01-10 Jakub Jelinek <jakub@redhat.com>
9838 * decl2.c (max_tinst_depth): Increase default limit to 500.
9840 2002-01-10 Graham Stott <grahams@redhat.com>
9842 * spew.c (YYCHAR): Uppercase macro parameter and add
9845 (NAME): Uppercase macro parameter.
9847 2002-01-09 Graham Stott <grahams@redhat.com>
9849 * decl.h (grokdeclarator): Wrap long line.
9851 * semantics.c (FINISH_COND): Uppercase macro paramaters and
9854 2002-01-08 Graham Stott <grahams@redhat.com>
9856 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9857 (PALLOC): Uppercase macro parameter and whitespace.
9858 (SALLOC): Uppercase macro parameter.
9859 (SFREE): Uppercase macros parameter, add parenthese and
9861 (STREQL): Uppercase macro parameter and whitespace.
9868 * call.c (convert_like): Add parenthesis and wrap.
9869 (convert_like_with_context): Likewise.
9870 (ICS_RANK): Whitespace.
9871 (NEED_TEMPORARY_P): Remove parenthesis.
9873 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9875 (VTT_MARKED_BINFO_P): Likewise.
9877 * decl.c (BINDING_LEVEL): Add parenthesis.
9878 (DEF_OPERATOR): Likewise.
9880 * mangle.c (MANGLE_TRACE): Add parenthesis.
9881 (MANGLE_TRACE_TREE): Likewise.
9882 (write_signed_number): Likewise.
9883 (write_unsigned_number): Likewise.
9885 * pt.c (ccat): Uppercase macro parameter.
9888 * search.c (SET_BINFO_ACCESS): Add parenthesis.
9890 2002-01-07 Jason Merrill <jason@redhat.com>
9892 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9896 * method.c (make_thunk): If !flag_weak, give the thunk the
9898 (use_thunk): Here, too.
9900 2002-01-07 Graham Stott <grahams@redhat.com>
9902 * error.c: Update copyright date.
9903 (print_scope_operator): Add parenthesis.
9904 (print_left_paren): Likewise.
9905 (print_right_paren): Likewise.
9906 (print_left_bracket): Likewise.
9907 (print_right_bracket): Likewise.
9908 (print_template_argument_list_start): Likewise.
9909 (print_template_argument_list_end): Likewise.
9910 (print_non_consecutive_character): Likewise.
9911 (print_tree_identifier): Likewise.
9912 (print_identifier): Likewise.
9913 (NEXT_CODE): Uppercase macro parameter.
9914 (ident_fndecl): Delete unused.
9915 (GLOBAL_THING): Likewise.
9917 2002-01-06 Graham Stott <grahams@redhat.com>
9919 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9920 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9921 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9922 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9923 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9924 (C_IS_RESERVED_WORD): Uppercase macro parameter.
9925 (C_RID_YYCODE) Likewise.
9926 (ptrmem_cst): Use rtx.
9927 (LOCAL_BINDING_P): Add whitespace.
9928 (INHERITED_VALUE_BINDING_P): Likewise.
9929 (BINDING_SCOPE): Wrap long line.
9930 (BINDING_HAS_LEVEL_P): Remove parenthesis.
9931 (BINDING_VALUE): Wrap long line.
9932 (BINDING_TYPE): Whitespace.
9933 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9934 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9935 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9936 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9937 (same_type_p): Uppercase macro parameters.
9938 (same_type_ignoring_top_level_qualifiers_p): Likewise.
9939 (OVL_FUNCTION): Wrap long line.
9940 (OVL_CHAIN): Whitespace.
9941 (OVL_CURRENT): Add parenthesis and whitespace.
9942 (OVL_NEXT): Whitespace.
9943 (OVL_USED): Likewise.
9944 (IDENTIFIER_TYPE_VALUE): Likewise.
9945 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9946 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9947 (LANG_ID_FIELD): Whitespace.
9948 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9949 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9950 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9951 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9952 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9953 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9954 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9955 (IDENTIFIER_VIRTUAL_P): Likewise.
9956 (IDENTIFIER_OPNAME_P): Likewise.
9957 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9958 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9959 (C_SET_EXP_ORIGINAL_CODE): Likewise.
9960 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9961 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9962 (IS_AGGR_TYPE): Uppercase macro parameter.
9963 (CLASS_TYPE_P): Likewise.
9964 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9965 (IS_AGGR_TYPE_2): Whitespace.
9966 (TAGGED_TYPE_P): Uppercase macro parameter.
9967 (TYPE_BUILT_IN): Whitespace.
9968 (TYPE_FOR_JAVA): Likewise.
9969 (FUNCTION_ARG_CHAIN): Remove parenthesis.
9970 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9971 (FUNCTION_FIRST_USER_PARAM): Likewise.
9972 (PROMOTES_TO_AGGR_TYPE): Whitespace.
9973 (DERIVED_FROM_P): Add parenthesis and wrap.
9974 (UNIQUELY_DERIVED_FROM_P): Likewise.
9975 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9976 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9977 (CLASSTYPE_USE_TEMPLATE): Whitespace.
9978 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9979 (TYPE_GETS_DELETE): Add parenthesis.
9980 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9981 (TYPE_HAS_ASSIGN_REF): Likewise,
9982 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9983 (TYPE_HAS_INIT_REF): Likewise.
9984 (TYPE_HAS_CONST_INIT_REF): Likewise.
9985 (TYPE_BEING_DEFINED): Likewise.
9986 (TYPE_LANG_SPECIFIC): Likewise.
9987 (CLASSTYPE_RTTI): Likewise.
9988 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9989 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9990 (TYPE_OVERLOADS_ARROW): Likewise.
9991 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9992 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9993 (CLASSTYPE_METHOD_VEC): Likewise.
9994 (CLASSTYPE_MARKED_N): Likewise.
9995 (CLASSTYPE_MARKED): Likewise.
9996 (CLASSTYPE_MARKED2): Likewise.
9997 (CLASSTYPE_MARKED3): Likewise.
9998 (CLASSTYPE_MARKED4): Likewise.
9999 (CLASSTYPE_MARKED5): Likewise.
10000 (CLASSTYPE_MARKED6): Likewise.
10001 (SET_CLASSTYPE_MARKED): Whitespace.
10002 (CLEAR_CLASSTYPE_MARKED): Likewise.
10003 (SET_CLASSTYPE_MARKED2): Likewise.
10004 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10005 (SET_CLASSTYPE_MARKED3): Likewise.
10006 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10007 (SET_CLASSTYPE_MARKED4): Likewise.
10008 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10009 (SET_CLASSTYPE_MARKED5): Likewise.
10010 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10011 (SET_CLASSTYPE_MARKED6): Likewise.
10012 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10013 (CLASSTYPE_TAGS): Likewise.
10014 (CLASSTYPE_VSIZE): Likewise.
10015 (CLASSTYPE_VBASECLASSES): Likewise.
10016 (CANONICAL_BINFO): Add parenthesis.
10017 (CLASSTYPE_SIZE(NODE): Likewise.
10018 (CLASSTYPE_SIZE_UNIT): Likewise.
10019 (CLASSTYPE_ALIGN(NODE): Likewise.
10020 (CLASSTYPE_USER_ALIGN): Likewise.
10021 (TYPE_JAVA_INTERFACE): Likewise.
10022 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10023 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10024 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10025 (CLASSTYPE_HAS_MUTABLE): Likewise.
10026 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10027 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10028 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10029 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10030 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10031 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10032 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10033 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10034 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10035 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10036 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10037 (BINFO_UNSHARED_MARKED): Whitespace.
10038 (BINFO_MARKED): Whitespace and wrap.
10039 (SET_BINFO_MARKED): Likewise.
10040 (CLEAR_BINFO_MARKED): Likewise.
10041 (BINFO_VTABLE_PATH_MARKED): Likewise.
10042 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10043 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10044 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10045 (BINFO_VPTR_INDEX): Likewise.
10046 (BINFO_PRIMARY_BASE_OF): Likewise,
10047 (CLASSTYPE_VFIELDS): Whitespace.
10048 (VF_DERIVED_VALUE): Wrap long line.
10049 (NAMESPACE_LEVEL): Whitespace.
10050 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10051 (DEFARG_POINTER): Whitespace.
10052 (DECL_NEEDED_P): Remove parenthesis.
10053 (DECL_LANGUAGE): Whitespace.
10054 (SET_DECL_LANGUAGE): Add parenthesis.
10055 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10056 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10057 (DECL_IN_AGGR_P): Whitespace.
10058 (DECL_FRIEND_P): Likewise.
10059 (DECL_BEFRIENDING_CLASSES): Likewise.
10060 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10061 (DECL_NONCONVERTING_P): Whitespace.
10062 (DECL_PURE_VIRTUAL_P): Likewise.
10063 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10064 (DECL_PENDING_INLINE_INFO): Whitespace.
10065 (DECL_SORTED_FIELDS): Likewise.
10066 (DECL_DEFERRED_FN): Likewise.
10067 (DECL_TEMPLATE_INFO): Likewise.
10068 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10069 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10070 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10071 (TMPL_ARGS_LEVEL): Likewise.
10072 (SET_TMPL_ARGS_LEVEL): Likewise.
10073 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10074 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10075 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10076 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10077 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10078 (TREE_HAS_CONSTRUCTOR): Likewise.
10079 (TYPE_HAS_DESTRUCTOR): Likewise.
10080 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10081 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10082 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10083 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10084 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10085 (TYPE_PTRMEMFUNC_P): Likewise.
10086 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10087 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10088 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10089 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10090 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10091 (DECL_ACCESS): Whitespace.
10092 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10093 (DECL_GLOBAL_DTOR_P): Likewise.
10094 (GLOBAL_INIT_PRIORITY): Likewise.
10095 (DECL_TEMPLATE_PARMS): Likewise.
10096 (DECL_TEMPLATE_RESULT): Likewise.
10097 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10098 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10099 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10100 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10101 (PRIMARY_TEMPLATE_P): Add parenthesis.
10102 (DECL_USE_TEMPLATE): Whitespace.
10103 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10104 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10105 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10106 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10107 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10108 (CALL_DECLARATOR_QUALS): Likewise.
10109 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10110 (TEMP_NAME_P): Wrap.
10111 (VFIELD_NAME_P): Likewise.
10112 (B_SET): Uppercase macro parameters and add parenthesis.
10115 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10116 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10117 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10118 (same_or_base_type_p): Likewise.
10119 (cp_deprecated): Likewise.
10121 2002-01-05 Richard Henderson <rth@redhat.com>
10123 * semantics.c (expand_body): Revert last change.
10125 2002-01-04 Jason Merrill <jason@redhat.com>
10128 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10131 * class.c (build_vtbl_initializer): Check for a lost primary
10132 before calculating the vtable entry to throw away.
10134 2002-01-02 Jason Merrill <jason@redhat.com>
10136 * semantics.c (expand_body): Call outlining_inline_function when
10137 emitting an inline function out of line.
10139 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10141 PR c++/5116, c++/764 reversion
10142 * call.c (build_new_op): Revert the instantiations. They are
10145 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10148 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10150 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10153 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10154 (tsubst, case POINTER_TYPE): Handle pmfs here.
10155 (tsubst, case OFFSET_TYPE): Check it is not an offset to
10156 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10158 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10161 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10162 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10163 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10165 (tsubst_template_parms): Break up loop statements.
10166 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10167 parm PARM_DECLs don't get promoted.
10169 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10172 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10173 (build_x_function_call): Cope with a COMPONENT_REF containing a
10176 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10179 * pt.c (convert_template_argument): Be more careful determining
10180 when RECORD_TYPE templates are or are not templates.
10182 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10185 * cp-tree.h (handle_class_head): Adjust prototype.
10186 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10187 parameters. Use for all class heads.
10188 * parse.y (named_class_head_sans_basetype, named_class_head,
10189 named_complex_class_head_sans_basetype,
10190 named_class_head_sans_basetype_defn,
10191 unnamed_class_head): Remove.
10192 (class_head, class_head_apparent_template): Recognize class heads
10193 (class_head_decl, class_head_defn): New reductions. Process class
10195 (structsp): Adjust class definition and class declaration
10197 (maybe_base_class_list): Give diagnostic on empty list.
10199 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10202 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10203 single non-static member.
10204 (unary_complex_lvalue): If it cannot be a pointer to member, don't
10205 make it so. Check it is not pointer to reference.
10207 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10210 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10211 are processing a template decl.
10213 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10215 PR c++/5116, c++/764
10216 * call.c (build_new_op): Make sure template class operands are
10217 instantiated. Simplify arglist construction.
10219 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10221 * call.c (build_user_type_conversion_1): Use my_friendly_assert
10222 rather than if ... abort.
10223 * cvt.c (convert_to_reference): Likewise.
10224 * semantics.c (setup_vtbl_ptr): Likewise.
10225 * pt.c (lookup_template_class): Comment typo.
10227 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10230 * pt.c (push_template_decl_real): Make sure DECL has
10231 DECL_LANG_SPECIFIC.
10233 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10236 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10237 for non-reference fields.
10238 * typeck.c (require_complete_type): Use resolve_offset_ref).
10240 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
10243 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10245 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
10248 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10249 up. Don't stabilize_references when initializing a reference.
10251 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10253 * decl2.c (lang_f_options): Const-ify.
10255 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10257 * config-lang.in (diff_excludes): Remove.
10259 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
10262 * typeck.c (build_function_call_real): Use original function
10263 expression for errors.
10265 2001-12-18 Jason Merrill <jason@redhat.com>
10268 * class.c (add_method): Do compare 'this' quals when trying to match a
10269 used function. Don't defer to another used function.
10271 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10273 * pt.c (instantiate_clone): Remove, fold into ...
10274 (instantiate_template): ... here. Simplify by removing mutual
10276 * typeck2.c (build_m_component_ref): Don't cv qualify the function
10277 pointed to by a pointer to function.
10278 * class.c (delete_duplicate_fields_1): Typo.
10280 2001-12-18 Jason Merrill <jason@redhat.com>
10282 C++ ABI change: destroy value arguments in caller.
10283 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10284 create an extra binding level for the parameters.
10285 * decl.c (store_parm_decls): Don't do parameter cleanups.
10287 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10289 * call.c (build_new_method_call): Use '%#V'.
10290 * error.c (cv_to_string): Use V parameter to determine padding.
10292 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
10294 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10295 spellings in messages.
10297 2001-12-17 Zack Weinberg <zack@codesourcery.com>
10299 * cp-tree.h: Delete #defines for cp_error, cp_warning,
10300 cp_pedwarn, and cp_compiler_error.
10301 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10302 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10303 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10304 typeck2.c: Change calls to the above macros to use their
10305 language-independent equivalents: error, warning, pedwarn, and
10306 internal_error respectively.
10308 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
10310 * decl2.c (finish_file): Remove back_end_hook.
10312 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10314 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10315 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10316 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10318 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
10320 * lang-options.h: Use American spelling in messages.
10322 2001-12-13 Jason Merrill <jason@redhat.com>
10324 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10326 Use cleanups to run base and member destructors.
10327 * init.c (push_base_cleanups): New function, split out from...
10328 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
10329 * decl.c (finish_destructor_body): Move vbase destruction code to
10330 push_base_cleanups.
10331 (begin_function_body, finish_function_body): New fns.
10332 (finish_function): Move [cd]tor handling and call_poplevel to
10333 finish_function_body.
10334 (pushdecl): Skip the new level.
10335 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10336 (setup_vtbl_ptr): Call push_base_cleanups.
10337 * method.c (synthesize_method): Call {begin,end}_function_body.
10338 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10339 * cp-tree.h: Declare new fns.
10340 * parse.y (function_body, .begin_function_body): New nonterminals.
10341 (fndef, pending_inline, function_try_block): Use function_body.
10342 (ctor_initializer_opt, function_try_block): No longer has a value.
10343 (base_init): Remove .set_base_init token.
10344 (.set_base_init, compstmt_or_error): Remove.
10345 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10347 * optimize.c (maybe_clone_body): Fix parameter updating.
10349 2001-12-12 Jason Merrill <jason@redhat.com>
10351 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10352 * semantics.c (genrtl_start_function): Don't pass
10353 parms_have_cleanups or push an extra binding level.
10354 (genrtl_finish_function): Lose cleanup_label cruft.
10356 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10357 (ctor_label): Remove.
10358 * semantics.c (finish_return_stmt): Lose ctor_label support.
10359 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10360 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10363 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10364 check for [cd]tors.
10365 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10367 * decl.c (finish_function): Check VMS_TARGET, not VMS.
10369 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10370 (end_cleanup_fn): And poplevel.
10372 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10373 if we're in a template.
10375 2001-12-12 Jakub Jelinek <jakub@redhat.com>
10377 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10378 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10379 THIS_NAME_P): Delete.
10380 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10381 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10382 with internal naming scheme.
10383 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10385 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
10387 * decl.c (grokdeclarator): Deprecated implicit typename use.
10389 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
10392 * parse.y (frob_specs): Indicate it is a language linkage which
10393 contained the extern.
10394 * decl.c (grokdeclarator): Allow extern language linkage with
10397 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
10400 * decl.c (add_binding): Don't reject duplicate typedefs involving
10401 template parameters.
10403 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
10405 * parse.y, semantics.c: Similarly.
10407 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
10410 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10411 (copy_args_p): Rename to ...
10412 (copy_fn_p): ... here.
10413 (grok_special_member_properties): New function.
10414 (grok_op_properties): Lose VIRTUALP parameter.
10415 (copy_assignment_arg_p): Remove.
10416 * call.c (build_over_call): Use copy_fn_p.
10417 * decl.c (grokfndecl): Reformat. Adjust call to
10418 grok_op_properties.
10419 (copy_args_p): Rename to ...
10420 (copy_fn_p): ... here. Reject template functions. Check for pass
10422 (grok_special_member_properties): Remember special functions.
10423 (grok_ctor_properties): Don't remember them here, just check.
10424 (grok_op_properties): Likewise.
10425 (start_method): Call grok_special_member_properties.
10426 * decl2.c (grokfield): Likewise.
10427 (copy_assignment_arg_p): Remove.
10428 (grok_function_init): Don't remember abstract assignment here.
10429 * pt.c (instantiate_class_template): Call
10430 grok_special_member_properties.
10431 (tsubst_decl): Adjust grok_op_properties call.
10433 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
10435 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10436 RID_TYPES_COMPATIBLE_P.
10438 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10440 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10441 call to build_aggr_init.
10442 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10444 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
10446 * parse.y: Replace uses of the string non-terminal with STRING.
10447 Don't perform string concatentaion here.
10448 (string): Remove non-terminal.
10449 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10451 2001-12-05 Jason Merrill <jason@redhat.com>
10453 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10454 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10455 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10456 * pt.c (push_tinst_level): No longer static.
10457 * cp-tree.h: Declare them.
10459 * init.c (resolve_offset_ref): Don't check access for the base
10460 conversion to access a FIELD_DECL.
10462 * cp-tree.h (TYPE_REFFN_P): New macro.
10463 * decl.c (bad_specifiers): Check it, too.
10465 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10466 on the __*_type_info type if we haven't seen a definition.
10468 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
10470 * decl.c: Include c-common.h.
10471 (shadow_warning): Move to c-common.c.
10473 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10475 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10477 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10479 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10481 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10484 * init.c (sort_base_init): Allow binfos to be directly specified.
10485 * method.c (do_build_copy_constructor): Explicitly convert to the
10487 (do_build_assign_ref): Likewise.
10489 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
10491 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10492 declaration and initialization.
10494 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10496 * typeck2.c: Remove leading capital from diagnostic messages, as
10497 per GNU coding standards.
10499 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
10502 * decl.c (xref_basetypes): Handle attributes between
10505 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
10508 * parse.y (named_complex_class_head_sans_basetype): Add new
10510 * Make-lang.in (parse.c): Adjust expected conflict count.
10512 2001-12-03 Jason Merrill <jason@redhat.com>
10514 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10515 immediate binfos for our virtual bases.
10517 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
10519 * call.c (build_java_interface_fn_ref): Similarly.
10520 * except.c (is_admissible_throw_operand): Similarly.
10521 * init.c (build_java_class_ref): Similarly.
10522 * xref.c (open_xref_file): Similarly.
10524 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10526 * class.c (finish_struct): Remove trailing periods from messages.
10527 * decl.c (check_tag_decl): Similarly.
10528 * lex.c (cxx_set_yydebug): Similarly.
10529 * typeck2.c (friendly_abort): Similarly.
10531 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10534 * cp-tree.h (ovl_member): Remove.
10535 * decl2.c (merge_functions): Handle extern "C" functions
10537 * tree.c (ovl_member): Remove.
10539 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10542 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10543 FUNCTION_DECL, as input.
10544 (mark_overriders): Remove.
10545 (warn_hidden): Rework for the new ABI.
10547 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10550 * call.c (convert_like_real): Do not build additional temporaries
10551 for rvalues of class type.
10553 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
10555 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10556 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10557 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10558 (DERIVED_FROM_P): Likewise.
10559 (enum base_access): Renumber, add ba_quiet bit mask.
10560 (get_binfo): Remove.
10561 (get_base_distance): Remove.
10562 (binfo_value): Remove.
10563 (ACCESSIBLY_DERIVED_FROM_P): Remove.
10564 * call.c (standard_conversion): Use lookup_base.
10565 * class.c (strictly_overrides): Likewise.
10566 (layout_virtual_bases): Likewise.
10567 (warn_about_ambiguous_direct_bases): Likewise.
10568 (is_base_of_enclosing_class): Likewise.
10569 (add_vcall_offset_vtbl_entries_1): Likewise.
10570 * cvt.c (build_up_reference): Adjust comment.
10571 * init.c (build_member_call): Reformat.
10572 * search.c (get_binfo): Remove.
10573 (get_base_distance_recursive): Remove.
10574 (get_base_distance): Remove.
10575 (lookup_base_r): Tweak.
10576 (lookup_base): Add ba_quiet control. Complete the types here.
10577 (covariant_return_p): Use lookup_base.
10578 * tree.c (binfo_value): Remove.
10579 (maybe_dummy_object): Use lookup_base.
10580 * typeck.c (build_static_cast): Use lookup_base.
10581 (get_delta_difference): Likewise.
10582 * typeck2.c (binfo_or_else): Use lookup_base.
10583 (build_scoped_ref): Add back error_mark_check.
10584 (build_m_component_ref): Use lookup_base.
10586 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10588 * Make-lang.in (c++.generated-manpages): New dummy target.
10590 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10592 * Make-lang.in (cp-lang.o): Depends on c-common.h.
10593 * cp-lang.c (c-common.h): Include.
10594 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10595 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10596 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10598 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
10600 * decl2.c (c_language): Move to c-common.c.
10601 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10603 (cxx_init): Update.
10605 2001-11-26 Jason Merrill <jason@redhat.com>
10607 * call.c (joust): Remove COND_EXPR hack.
10609 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
10611 * search.c (lookup_base_r): Declare bk in variable declaration
10614 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
10617 * class.c (build_vbase_pointer): Remove.
10618 (build_vbase_path): Remove.
10619 (build_base_path): New function.
10620 * cp-tree.h (base_access, base_kind): New enumerations.
10621 (build_base_path): Declare.
10622 (convert_pointer_to_real): Remove.
10623 (convert_pointer_to): Remove.
10624 (lookup_base): Declare.
10625 (convert_pointer_to_vbase): Remove.
10626 * call.c (build_scoped_method_call): Use lookup_base &
10627 build_base_path instead of convert_pointer_to_real,
10628 get_base_distance & get_binfo.
10629 (build_over_call): Likewise.
10630 * cvt.c (cp_convert_to_pointer): Likewise.
10631 (convert_to_pointer_force): Likewise.
10632 (build_up_reference): Likewise.
10633 (convert_pointer_to_real): Remove.
10634 (convert_pointer_to): Remove.
10635 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10636 instead of convert_pointer_to_vbase & build_vbase_path.
10637 (emit_base_init): Use build_base_path instead of
10638 convert_pointer_to_real.
10639 (expand_virtual_init): Lose unrequired conversions.
10640 (resolve_offset_ref): Use lookup_base and build_base_path
10641 instead of convert_pointer_to.
10642 * rtti.c (build_dynamic_cast_1): Use lookup_base &
10643 build_base_path instead of get_base_distance & build_vbase_path.
10644 * search.c (get_vbase_1): Remove.
10645 (get_vbase): Remove.
10646 (convert_pointer_to_vbase): Remove.
10647 (lookup_base_r): New function.
10648 (lookup_base): New function.
10649 * typeck.c (require_complete_type): Use lookup_base &
10650 build_base_path instead of convert_pointer_to.
10651 (build_component_ref): Likewise.
10652 (build_x_function_call): Likewise.
10653 (get_member_function_from_ptrfunc): Likewise.
10654 (build_component_addr): Likewise.
10655 * typeck2.c (build_scoped_ref): Likewise.
10657 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10659 * cp-tree.h (CP_TYPE_QUALS): Removed.
10660 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10661 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10662 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10663 * dump.c (cp_dump_tree): Use void* dump_info argument to match
10664 lang-hooks prototype.
10665 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10666 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10667 CP_TYPE_QUALS changed to cp_type_quals.
10668 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10669 (CXX_C_OBJS): Remove c-dump.o.
10671 2001-11-21 Mark Mitchell <mark@codesourcery.com>
10674 * pt.c (lookup_template_class): Ensure that all specializations
10675 are registered on the list corresponding to the most general
10678 2001-11-20 Mark Mitchell <mark@codesourcery.com>
10680 * call.c (non_reference): Add documentation.
10681 (convert_class_to_reference): Do not strip reference types
10682 from conversion operators.
10683 (maybe_handle_ref_bind): Simplify.
10684 (compare_ics): Correct handling of references.
10686 2001-11-19 John Wilkinson <johnw@research.att.com>
10688 * dump.c (dump_op): New function.
10689 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
10690 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10691 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10693 2001-11-19 Mark Mitchell <mark@codesourcery.com>
10696 * semantics.c (finish_sizeof): Make sure that expression created
10697 while processing a template do not have a type.
10698 (finish_alignof): Likewise.
10699 * typeck.c (c_sizeof): Likewise.
10700 (expr_sizeof): Likewise.
10702 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10704 * lex.c (cxx_finish): Call c_common_finish.
10705 (finish_parse): Remove.
10707 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10709 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10710 when displaying error message about missing array bounds.
10712 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10714 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10716 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10718 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
10720 * cp-tree.h (print_class_statistics): Restore.
10722 2001-11-15 Jason Merrill <jason@redhat.com>
10724 * method.c (use_thunk): Don't emit debugging information for thunks.
10726 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10727 * decl.c (make_typename_type): Handle getting a class template.
10728 * search.c (lookup_field_r): A class template is good enough for
10731 * call.c (convert_like_real): Only use cp_convert for the bad part.
10732 (standard_conversion): Also allow bad int->enum.
10733 * typeck.c (ptr_reasonably_similar): Also allow functions to
10734 interconvert. Pointers to same-size integers are reasonably
10737 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10740 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
10743 * init.c (sort_base_init): Remove unreachable code.
10744 (expand_member_init): Adjust comment to reflect reality. Simplify
10745 and remove unreachable code.
10747 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10749 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10750 (cxx_init): Update prototype.
10751 * decl.c (init_decl_processing): Rename. Move null node init
10752 to its creation time.
10753 * lex.c (cxx_init_options): Update.
10754 (cxx_init): Combine with old init_parse; also call
10755 cxx_init_decl_processing.
10757 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
10759 * decl.c (check_initializer): Try to complete the type of an
10760 array element before checking whether it's complete. Don't
10761 complain about arrays with complete element types but an
10763 (cp_finish_decl): Build the hierarchical constructor before
10764 calling maybe_deduce_size_from_array_init.
10766 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
10768 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10770 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
10773 * parse.y (already_scoped_stmt): Remove.
10774 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10776 2001-11-12 H.J. Lu <hjl@gnu.org>
10778 * cvt.c (ocp_convert): Don't warn the address of a weak
10779 function is always `true'.
10781 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10783 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10784 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10785 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10786 * cp-tree.h (print_class_statistics): Remove.
10787 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10788 cxx_print_identifier, cxx_set_yydebug): New.
10789 * lex.c (set_yydebug): Rename c_set_yydebug.
10790 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10791 lang_print_xnode): Rename.
10792 * tree.c (print_lang_statistics): Rename.
10794 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10796 * class.c (dump_array): Fix format specifier warning.
10798 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10800 * cp-lang.c (LANG_HOOKS_NAME): Override.
10801 (struct lang_hooks): Constify.
10802 * lex.c (cxx_init_options): Update.
10803 (lang_identify): Remove.
10804 * parse.y (language_string): Remove.
10806 2001-11-08 Andreas Franck <afranck@gmx.de>
10808 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10809 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10810 suggested by autoconf.
10811 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10812 (c++.install-common): Use the transformed target alias names.
10814 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10816 * Make-lang.in: Update.
10817 * cp-lang.c: Include langhooks-def.h.
10819 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10821 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10823 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10825 * lex.c (copy_lang_type): Add static prototype.
10827 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10829 * pt.c (unify): Handle SCOPE_REF.
10831 2001-11-01 Jakub Jelinek <jakub@redhat.com>
10833 * tree.c (cp_copy_res_decl_for_inlining): Adjust
10834 DECL_ABSTRACT_ORIGIN for the return variable.
10836 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10838 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10840 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
10842 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10843 semantics.c, spew.c: Fix spelling errors.
10845 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10847 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10849 2001-10-25 Zack Weinberg <zack@codesourcery.com>
10851 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10854 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10856 * cp-lang.c (cxx_get_alias_set): New function.
10857 Point LANG_HOOKS_GET_ALIAS_SET to it.
10859 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10861 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10862 * cp-tree.h (make_unbound_class_template): Prototype new function.
10863 * decl.c (make_unbound_class_template): New function.
10864 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10865 * error.c (dump_type): Likewise.
10866 * mangle.c (write_type): Likewise.
10867 * parse.y (template_parm): Likewise.
10868 (template_argument): Use make_unbound_class_template.
10869 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10870 (tsubst): Likewise.
10871 (tsubst_copy): Likewise.
10873 * tree.c (walk_tree): Likewise.
10874 * typeck.c (comptypes): Likewise.
10876 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10878 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10879 extra calls into fewer ones.
10881 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
10883 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10884 Warn when merging inline with attribute noinline.
10885 (start_decl, start_function): Warn if inline and attribute
10886 noinline appear in the same declaration.
10888 2001-10-16 H.J. Lu <hjl@gnu.org>
10890 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10891 for tree checking disabled.
10893 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
10895 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10896 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10898 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10900 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10901 (unify): Only handle MINUS_EXPR specially if the above flag is set
10902 and the subtracted constant is 1. Clear the flag on recursive calls.
10903 Set it when unifying the maximum value in an INTEGER_TYPE's range.
10905 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10907 * decl.c (bad_specifiers): Don't allow exception specifications
10910 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
10912 * cp/lex.c (init_cp_pragma): Similarly.
10914 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10916 * pt.c (lookup_template_class): Build complete template arguments
10917 for BOUND_TEMPLATE_TEMPLATE_PARM.
10919 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10921 * cp-tree.h (TYPE_BINFO): Update comment.
10922 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10923 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10924 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10925 (copy_type): Prototype new function.
10926 * lex.c (copy_lang_decl): Gather tree node statistics.
10927 (copy_lang_type): New function.
10928 (copy_type): Likewise.
10929 (cp_make_lang_type): Create lang_type for
10930 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
10931 and BOUND_TEMPLATE_TEMPLATE_PARM.
10932 * pt.c (tsubst): Use copy_type instead of copy_node.
10933 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10935 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10937 * pt.c (determine_specialization): Ignore functions without
10938 DECL_TEMPLATE_INFO.
10940 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
10943 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10945 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
10947 * typeck2.c (store_init_value): Don't re-digest a bracketed
10950 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10953 2001-10-11 Richard Henderson <rth@redhat.com>
10955 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10956 of an asm statement.
10957 (build_vtbl_ref_1): Split out from build_vtbl_ref.
10958 (build_vfn_ref): Use it to handle vtable descriptors before
10959 calling build_vtable_entry_ref.
10960 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10962 2001-10-10 Richard Henderson <rth@redhat.com>
10964 * parse.y (asm_operand): Allow named operands.
10965 * semantics.c (finish_asm_stmt): Tweek for changed location
10966 of the operand constraint.
10968 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
10970 * call.c (standard_conversion): Add bad conversion between
10971 integers and pointers.
10972 (convert_like_real): Don't use convert_for_initialization for bad
10973 conversions; complain here and use cp_convert.
10974 (build_over_call): Don't handle bad conversions specially.
10975 (perform_implicit_conversion): Allow bad conversions.
10976 (can_convert_arg_bad): New fn.
10977 * cp-tree.h: Declare it.
10978 * typeck.c (convert_for_assignment): Use it.
10979 (ptr_reasonably_similar): Any target type is similar to void.
10981 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
10983 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10984 (cp/cp-lang.o): New rule.
10985 * cp-tree.h: Declare hooks.
10986 * tree.c: Make hooks non-static.
10987 (init_tree): Don't initialize hooks here.
10988 * lex.c: Likewise. Move definition of lang_hooks to...
10989 * cp-lang.c: ... new file.
10991 2001-10-08 Richard Henderson <rth@redhat.com>
10993 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10994 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10996 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10998 * class.c (build_vtable_entry_ref): Const-ify.
10999 * decl.c (predefined_identifier,
11000 initialize_predefined_identifiers): Likewise.
11001 * init.c (build_new_1): Likewise.
11002 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11005 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11007 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11008 (INSNS_PER_STMT): Likewise.
11009 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11010 (copy_body, initialize_inlined_parameters): Likewise.
11011 (declare_return_variable, inlinable_function_p): Likewise.
11012 (expand_call_inline, expand_calls_inline): Likewise.
11013 (optimize_inline_calls, clone_body): Likewise.
11014 * tree.c (walk_tree): Moved to ../tree-inline.c.
11015 (walk_tree_without_duplicates): Likewise.
11016 (copy_tree_r, remap_save_expr): Likewise.
11018 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11020 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11021 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11022 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11023 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11024 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11025 (walk_tree): Moved declaration to ../tree-inline.h.
11026 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11027 (remap_save_expr): Likewise.
11028 * decl.c: Include tree-inline.h.
11029 (lang_mark_tree): Don't mark inlined_fns.
11030 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11031 * optimize.c: Include tree-inline.h.
11032 (optimize_inline_calls): Move declaration to ../tree.h, as
11034 (remap_decl): Use language-independent constructs and hooks.
11035 (remap_block, copy_body_r, declare_return_variable): Likewise.
11036 (inlinable_function_p): Likewise. Don't test for
11037 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11038 no longer language-specific.
11039 (optimize_inline_calls): Likewise. Make it non-static. Moved
11040 call of dump_function to...
11041 (optimize_function): Here...
11042 (clone_body): New function, extracted from...
11043 (maybe_clone_body): ... here. Build decl_map locally and pass
11044 it on to clone_body.
11045 * pt.c, semantics.c: Include tree-inline.h.
11046 * tree.c: Likewise.
11047 (cp_walk_subtrees): New language-specific hook for tree inlining.
11048 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11049 cp_is_overload_p, cp_auto_var_in_fn_p,
11050 cp_copy_res_decl_for_inlining): Likewise.
11051 (walk_tree): Move language-specific constructs into...
11052 (cp_walk_subtrees): this new function.
11053 (copy_tree_r): Use language-independent constructs and hooks.
11054 (init_tree): Initialize tree inlining hooks.
11055 (remap_save_expr): Adjust prototype so that the declaration
11056 does not require the definition of splay_tree.
11058 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11060 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11061 to build the declaration instead of the declaration itself.
11063 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11065 * decl2.c (cxx_decode_option): Add 'else'.
11067 * spew.c (end_input): No longer static.
11068 * cp-tree.h: Declare it.
11069 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11071 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11073 * call.c (build_over_call), typeck.c (build_function_call_real):
11074 Pass type attributes to check_function_format rather than name or
11075 assembler name. Don't require there to be a name or assembler
11076 name to check formats.
11078 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11080 * decl.c (init_decl_processing): Don't call
11081 init_function_format_info. Initialize lang_attribute_table
11083 (builtin_function): Call decl_attributes.
11084 (insert_default_attributes): New.
11086 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11088 * decl.c (grokdeclarator): Copy array typedef handling from C
11091 * decl.c (grokdeclarator): Copy too-large array handling from C
11094 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11096 * config-lang.in (target_libs): Added target-gperf, so that we
11097 don't try to build it if C++ is disabled.
11099 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11101 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11102 (cp/errfn.o): Delete rule.
11103 (cp/error.o): Depend on flags.h.
11104 * errfn.c: Delete file.
11105 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11106 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11107 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11108 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11109 internal_error respectively. Make cp_deprecated into a macro.
11110 Don't define cp_printer typedef or declare cp_printers.
11111 * error.c: Include flags.h.
11112 Delete: struct tree_formatting_info, print_function_argument_list,
11113 print_declaration, print_expression, print_function_declaration,
11114 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11115 print_type_specifier_seq, print_simple_type_specifier,
11116 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11117 print_parameter_declaration_clause, print_exception_specification,
11118 print_nested_name_specifier, and definition of cp_printers.
11119 (locate_error): New function.
11120 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11121 rewritten in terms of locate_error and diagnostic.c.
11122 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11123 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11124 (init_error): Adjust to match.
11126 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11128 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11130 2001-09-21 Richard Henderson <rth@redhat.com>
11132 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11133 (build_vtbl_initializer): Likewise.
11134 (build_vfn_ref): New.
11135 * cp-tree.h: Declare it.
11136 * call.c (build_over_call): Use it.
11137 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11138 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11140 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
11142 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11144 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
11146 Table-driven attributes.
11147 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11148 * decl2.c (cplus_decl_attributes): Only take one attributes
11150 * cp-tree.c (cplus_decl_attributes): Update prototype.
11151 * class.c (finish_struct), decl.c (start_decl, start_function),
11152 decl2.c (grokfield), friend.c (do_friend), parse.y
11153 (parse_bitfield): Update calls to cplus_decl_attributes.
11154 * decl.c (grokdeclarator): Take a pointer to a single ordinary
11156 * decl.h (grokdeclarator): Update prototype.
11157 * decl2.c (grokfield): Take a single ordinary attribute list.
11158 * friend.c (do_friend): Likewise.
11159 * decl.c (shadow_tag, groktypename, start_decl,
11160 start_handler_parms, grokdeclarator, grokparms, start_function,
11161 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11162 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11163 (process_template_parm, do_decl_instantiation): Pass single
11164 ordinary attribute lists around.
11165 * decl.c (grokdeclarator): Correct handling of nested attributes.
11167 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11168 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11171 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11172 (cp_attribute_table): Declare.
11173 * decl.c (valid_lang_attribute): Don't define.
11174 (lang_attribute_table): Define.
11175 (init_decl_processing): Initialize lang_attribute_table instead of
11176 valid_lang_attribute.
11177 * tree.c (cp_valid_lang_attribute): Remove.
11178 (handle_java_interface_attribute, handle_com_interface_attribute,
11179 handle_init_priority_attribute): New functions.
11180 (cp_attribute_table): New array.
11181 * decl2.c (import_export_class): Don't use
11182 targetm.valid_type_attribute.
11184 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11186 * Make-lang.in (cp/error.o): Depend on real.h
11187 * error.c: #include "real.h"
11189 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11191 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11192 xmalloc/strcpy/strcat.
11194 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11196 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11198 * pt.c (tsubst_decl): Likewise.
11200 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11202 * decl2.c (lang_f_options): Const-ification.
11203 * lex.c (cplus_tree_code_name): Likewise.
11204 * spew.c (yyerror): Likewise.
11206 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11209 * class.c (force_canonical_binfo_r): Check & move an indirect
11210 primary base first.
11211 (force_canonical_binfo): Check that it's not already
11213 (mark_primary_virtual_base): Remove BINFO parameter.
11214 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11216 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11218 Remove TYPE_NONCOPIED_PARTS.
11219 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11220 CLASSTYPE_PURE_VIRTUALS.
11221 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11222 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11223 (layout_class_type): Don't call fixup_inline_methods here ...
11224 (finish_struct_1): ... call it here.
11226 2001-09-04 Mark Mitchell <mark@codesourcery.com>
11228 * decl.c (duplicate_decls): Remove code deadling with
11230 * decl2.c (finish_file): Likewise.
11231 * pt.c (instantiate_decl): Likewise.
11232 * semantics.c (expand_body): Don't defer local functions if
11233 they wouldn't be deferred for some other reason. Don't
11234 generate RTL for functions that will not be emitted.
11235 (genrtl_start_function): Remove code deadling with
11237 (genrtl_finish_function): Likewise.
11239 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
11242 * call.c (build_over_call): Do not optimize any empty base
11245 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11247 * error.c (dump_template_decl): Output template parameters
11248 together with their specifiers.
11249 Output `class' prefix for template template parameter.
11250 (dump_decl): Fix formatting.
11252 2001-08-30 Kurt Garloff <garloff@suse.de>
11254 * optimize.c (inlinable_function_p): Allow only smaller single
11255 functions. Halve inline limit after reaching recursive limit.
11257 2001-08-30 Joern Rennecke <amylaar@redhat.com>
11258 Jason Merrill <jason_merrill@redhat.com>
11260 * class.c (build_vtable_entry_ref): Subtract in char*, not
11263 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
11265 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11266 (build_cplus_array_type): Use cp_build_qualified_type, not
11267 TYPE_MAIN_VARIANT, to get an unqualified version.
11269 * decl2.c (grok_alignof): Lose.
11270 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11271 * typeck.c (c_alignof): Lose.
11272 * semantics.c (finish_sizeof, finish_alignof): New.
11273 * parse.y: Use them.
11274 * cp-tree.h: Declare them.
11276 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
11278 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11279 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11280 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11282 2001-08-19 Jakub Jelinek <jakub@redhat.com>
11284 * typeck2.c (add_exception_specifier): Only require complete type if
11285 not in processing template declaration.
11287 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11289 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11290 GNU_xref_start_scope and GNU_xref_end_scope.
11292 * tree.c (TYPE_HASH): Moved to ../tree.h.
11294 2001-08-16 Mark Mitchell <mark@codesourcery.com>
11296 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11299 2001-08-14 Richard Henderson <rth@redhat.com>
11301 * class.c, cp-tree.h (build_vfn_ref): Remove.
11302 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11304 2001-08-13 Mark Mitchell <mark@codesourcery.com>
11306 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11307 empty class assignment as having side-effects to avoid
11310 2001-08-13 Zack Weinberg <zackw@panix.com>
11312 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11313 * except.c: Include libfuncs.h.
11315 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11317 * decl.c (grokdeclarator): Clarify diagnostic message.
11319 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11321 * decl2.c (do_nonmember_using_decl): Replace using directive
11322 with using declaration in the error message.
11324 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11326 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11327 criterion to avoid rebuilding expression tree instead of
11328 processing_template_decl.
11330 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11332 Support named return value optimization for inlines, too.
11333 * decl.c (finish_function): Nullify returns here.
11334 * semantics.c (genrtl_start_function): Not here.
11335 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11336 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
11337 Also nullify the CLEANUP_STMT for the nrv.
11338 * cp-tree.h: Declare it.
11339 * optimize.c (declare_return_variable): Replace the nrv with the
11341 * typeck.c (check_return_expr): Be more flexible on alignment check.
11342 Ignore cv-quals when checking for a matching type.
11344 2001-08-09 Richard Henderson <rth@redhat.com>
11346 * decl2.c (finish_objects): Use target hooks instead of
11347 assemble_constructor and assemble_destructor.
11349 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11351 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11353 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
11356 Stop using TYPE_NONCOPIED_PARTS.
11357 * call.c (build_over_call): Be careful when copy constructing
11358 or assigning to an empty class.
11359 * class.c (check_bases_and_members): It has a
11360 COMPLEX_ASSIGN_REF if it has a vptr.
11361 (layout_class_type): Don't add empty class padding to
11362 TYPE_NONCOPIED_PARTS.
11363 (finish_struct_1): Don't add the VFIELD either.
11364 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11367 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11369 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11371 2001-08-06 Richard Henderson <rth@redhat.com>
11373 * decl2.c (finish_objects): Pass a symbol_ref and priority to
11374 assemble_{constructor,destructor}. Remove priority handling.
11376 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11378 Don't allow template-id in using-declaration.
11379 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11380 (do_class_using_decl): Likewise.
11382 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11384 * cp/spew.c (read_token): No need to pop buffers.
11386 2001-08-02 Stan Shebs <shebs@apple.com>
11388 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11389 (fnaddr_from_vtable_entry): Remove decl.
11390 * method.c (use_thunk): Update comment.
11392 2001-08-01 Andrew Cagney <ac131313@redhat.com>
11394 * repo.c (get_base_filename): Change return value to const char
11397 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
11401 * cp-tree.h (flag_honor_std): Remove.
11402 (CPTI_FAKE_STD): Remove.
11403 (std_node): Remove comment about it being NULL.
11404 (fake_std_node): Remove.
11405 * decl.c (in_fake_std): Remove.
11406 (walk_namespaces_r): Remove fake_std_node check.
11407 (push_namespace): Remove in_fake_std code.
11408 (pop_namespace): Likewise.
11409 (lookup_name_real): Remove fake_std_node check.
11410 (init_decl_processing): Always create std_node. Always add
11411 std:: things there.
11412 (builtin_function): Always put non '_' fns in std.
11413 * decl2.c (flag_honor_std): Remove.
11414 (lang_f_options): Remove honor-std.
11415 (unsupported_options): Add honor-std.
11416 (set_decl_namespace): Remove fake_std_node check.
11417 (validate_nonmember_using_decl): Likewise.
11418 (do_using_directive): Likewise.
11419 (handle_class_head): Likewise.
11420 * dump.c (cp_dump_tree): Likewise.
11421 * except.c (init_exception_processing): Adjust.
11422 * init.c (build_member_call): Remove fake_std_node check.
11423 (build_offset_ref): Likewise.
11424 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11425 * rtti.c (init_rtti_processing): Adjust.
11427 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11429 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11430 operand while calling cp_tree_equal.
11432 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11434 The 3.0 ABI no longer has vbase pointer fields.
11435 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11436 FORMAT_VBASE_NAME): Remove.
11437 * method.c (do_build_copy_constructor): Adjust.
11438 (do_build_assign_ref): Adjust.
11439 * search.c (lookup_field_r): Adjust.
11440 * typeck.c (build_component_ref): Adjust.
11442 The 3.0 ABI always has a vtable pointer at the start of every
11444 * rtti.c (build_headof_sub): Remove.
11445 (build_headof): Adjust.
11446 (get_tinfo_decl_dynamic): No need to check flag_rtti
11448 (create_real_tinfo_var): Explain why we need a hidden name.
11450 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11453 * class.c (update_vtable_entry_for_fn): The fixed adjustment
11454 of a virtual thunk should be from declaring base.
11456 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11458 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11459 the shared virtual base, so preserving inheritance graph order.
11461 2001-07-30 Andreas Jaeger <aj@suse.de>
11463 * decl2.c: Remove unused var global_temp_name_counter.
11465 2001-07-28 Richard Henderson <rth@redhat.com>
11467 * method.c (pending_inlines): Remove.
11469 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11471 * class.c (mark_primary_virtual_base): Don't adjust base
11473 (dfs_unshared_virtual_bases): Adjust them here.
11474 (mark_primary_bases): Explain why we adjust at the end.
11476 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11478 * class.c (finish_struct_1): When copying the primary base's
11479 VFIELD, make sure we find it is at offset zero.
11481 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11483 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11484 tsubst_expr for default template arguments.
11486 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11489 * spew.c (yylex): Only copy the token's lineno, if it is
11492 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11495 * call.c (resolve_args): Simplify, call
11496 convert_from_reference.
11497 (build_new_op): Resolve and convert from reference ARG1
11498 earlier. Adjust ARG2 & ARG3 resolve and conversion.
11500 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11502 * decl.c (last_function_parm_tags): Remove.
11503 (current_function_parm_tags): Remove.
11504 (init_decl_processing): Adjust.
11505 (start_function): Adjust.
11506 (store_parm_decls): Adjust.
11509 * decl.c (grokdeclarator): Detect when a function typedef is
11510 declaring a function, and create last_function_parms correctly.
11512 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
11514 * call.c (joust): Only prefer a non-builtin candidate to a builtin
11515 one if they have the same signature.
11517 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
11518 it rather than toplevel_bindings_p. Give it a mangled name if static.
11519 (convert_to_reference): Adjust.
11520 * decl2.c (get_temp_name): Lose.
11521 * mangle.c (mangle_ref_init_variable): New fn.
11522 (mangle_guard_variable): Strip the ref-init header.
11523 * cp-tree.h: Adjust.
11524 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11526 (grok_reference_init): Always use DECL_INITIAL.
11528 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11531 * call.c (build_conditional_expr): Recheck args after
11533 * cp-tree.h (build_conditional_expr): Move to correct file.
11534 * typeck.c (decay_conversion): Diagnose any unknown types
11536 (build_binary_op): Don't do initial decay or default
11537 conversions on overloaded functions.
11538 (build_static_cast): Don't do a decay conversion here.
11540 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11543 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11544 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11546 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11548 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11549 (create_vtbl_ptr): ... here.
11551 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11553 * class.c (build_vbase_offset_vbtl_entries): Look for
11554 non-primary base of which we are a sub vtable.
11556 2001-07-24 Phil Edwards <pme@sources.redhat.com>
11558 * semantics.c (finish_this_expr): Remove unused code.
11560 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
11562 Simplify rtti, now we've only one ABI.
11563 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11565 (tinfo_decl_id, tinfo_var_id): Remove.
11566 (get_typeid_1): Remove.
11568 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11569 (typeid_ok_p): New function.
11570 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11571 (get_tinfo_decl): Remove old abi documentation.
11572 (tinfo_from_decl): Remove.
11573 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11574 (get_typeid_1): Remove.
11575 (get_base_offset): Remove.
11576 (synthesize_tinfo_var): Absorb get_base_offset.
11577 (create_real_tinfo_var): Don't use tinfo_decl_id.
11579 2001-07-23 Graham Stott <grahams@redhat.com>
11581 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11582 variable has_two_argument_delete_p.
11584 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
11586 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11587 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11588 (CPTI_INDEX_IDENTIFIER): Remove.
11589 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11590 (delta2_identifier): Remove.
11591 (index_identifier): Remove.
11592 (pfn_or_delta2_identifier): Remove.
11593 (flag_vtable_thunks): Remove.
11594 (VTABLE_DELTA2_NAME): Remove.
11595 (VTABLE_INDEX_NAME): Remove.
11596 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11597 (vfunc_ptr_type_node): Adjust.
11598 (VTABLE_NAME_PREFIX): Adjust.
11599 (build_vfn_ref): Lose first parameter.
11600 (fixup_all_virtual_upcast_offsets): Remove.
11601 * decl.c (initialize_predefined_identifiers): Remove
11602 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11603 (init_decl_processing): Remove no-vtable-thunk code.
11604 * decl2.c (flag_vtable_thunks): Remove.
11605 (mark_vtable_entries): Remove no-vtable-thunk code.
11606 * error.c (dump_decl): Remove no-vtable-thunk code.
11607 (dump_expr): Adjust ptr to member function code.
11608 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11610 * rtti.c (build_headof): Remove no-vtable-thunk code.
11611 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11612 * search.c (get_base_distance): Remove expand_upcast_fixups case.
11613 (virtual_context) Remove.
11614 (expand_upcast_fixups): Remove.
11615 (fixup_virtual_upcast_offsets): Remove.
11616 (fixup_all_virtual_upcast_offsets): Remove.
11617 * typeck.c (get_member_function_from_ptrfunc): Remove
11618 no-vtable-thunk code.
11619 * call.c (build_over_call): Adjust call to build_vfn_ref.
11620 * class.c (build_vfn_ref): Lose first parameter. Remove
11621 no-vtable-thunk code.
11622 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11623 (build_vtable_entry): Remove no-vtable-thunk code.
11625 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
11627 Remove old-abi remnants. Remove comments about old abi
11628 behavior. Remove references to 'new-abi' in comments.
11629 * cp-tree.h: Adjust comments.
11630 (vbase_offsets_in_vtable_p): Delete.
11631 (vcall_offsets_in_vtable_p): Delete.
11632 (vptrs_present_everywhere_p): Delete.
11633 (all_overridden_vfuns_in_vtables_p): Delete.
11634 (merge_primary_and_secondary_vtables_p): Delete.
11635 (TYPE_CONTAINS_VPTR_P): Adjust.
11636 (VTT_NAME_PREFIX): Remove.
11637 (CTOR_VTBL_NAME_PREFIX): Remove.
11638 (init_vbase_pointers): Remove.
11639 * class.c: Adjust coments.
11640 (build_vbase_pointer_fields): Delete.
11641 (build_vbase_pointer): Remove old-abi code.
11642 (build_secondary_vtable): Likewise.
11643 (modify_all_vtables): Likewise.
11644 (create_vtable_ptr): Likewise.
11645 (layout_class_type): Likewise.
11646 (finish_struct_1): Likewise.
11647 (finish_vtbls): Likewise.
11648 (dfs_finish_vtbls): Delete.
11649 (build_vbase_offset_vtbl_entries): Remove old-abi code.
11650 * cvt.c: Adjust comments.
11651 * decl.c: Adjust comments.
11652 * decl2.c: Adjust comments.
11653 * init.c: Adjust comments.
11654 (construct_virtual_bases): Remove old-abi code.
11655 * lang-specs.h: Remove -fno-new-abi.
11656 * mangle.c: Adjust comments.
11657 * rtti.c: Adjust comments.
11658 (get_base_offset): Remove old-abi-code.
11659 * search.c: Adjust comments.
11660 (dfs_init_vbase_pointers): Remove.
11661 (dfs_vtable_path_unmark): Remove.
11662 (init_vbase_pointers): Remove.
11663 * semantics.c: Adjust comments.
11664 (emit_associated_thunks): Remove old-abi code.
11665 * typeck.c: Adjust comments.
11667 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
11669 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11672 2001-07-19 Mark Mitchell <mark@codesourcery.com>
11674 * class.c (finish_struct_anon): Forbid nested classes.
11676 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11678 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11679 * optimize.c: Include debug.h.
11680 (maybe_clone_body): Use debug hook.
11681 * semantics.c: Include debug.h.
11682 (expand_body): Use debug hook.
11684 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11686 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11688 2001-07-18 Mark Mitchell <mark@codesourcery.com>
11690 * class.c (type_requires_array_cookie): New function.
11691 (check_methods): Don't try to figure out whether the type needs a
11693 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11694 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11695 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11696 * pt.c (instantiate_class_template): Don't set
11697 TYPE_VEC_DELETE_TAKES_SIZE.
11698 * NEWS: Document ABI changes from GCC 3.0.
11700 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
11701 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11703 * NEWS (Changes in GCC 3.0): Fix typo.
11705 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
11707 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11708 which attributes are to be attached, and a flags argument. Update
11709 call to decl_attributes.
11710 (grokfield): Update call to decl_attributes.
11711 * class.c (finish_struct): Update call to cplus_decl_attributes.
11712 * cp-tree.h (cplus_decl_attributes): Update prototype.
11713 * decl.c (start_decl, grokdeclarator, start_function): Update
11714 calls to decl_attributes and cplus_decl_attributes.
11715 * friend.c (do_friend): Update call to cplus_decl_attributes.
11716 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11718 2001-07-12 Mark Mitchell <mark@codesourcery.com>
11720 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11721 for `register' variables with an asm-specification.
11723 2001-07-11 Mark Mitchell <mark@codesourcery.com>
11725 * semantics.c (finish_asm_stmt): Mark the output operands
11726 to an asm addressable, if necessary.
11728 2001-07-11 Ben Elliston <bje@redhat.com>
11730 * Revert this change -- there is a subtle bug.
11733 * decl.c (finish_enum): New "attributes" argument; pass it to
11734 cplus_decl_attributes. Use a narrower type if the enum is packed.
11735 * cp-tree.h (finish_enum): Adjust prototype.
11736 * parse.y (enum_head): New non-terminal.
11737 (structsp): Use it. Enums now may be preceded or followed by
11738 optional attributes -- pass their chained tree to finish_enum().
11739 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11741 2001-07-10 Mark Mitchell <mark@codesourcery.com>
11743 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11746 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
11748 * semantics.c (cp_expand_stmt): Fix for null
11749 current_function_return_value.
11751 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
11753 * call.c (build_op_delete_call): Initialize fn.
11754 (convert_like_real): Delete conditional.
11755 (joust): Initialize *w and *l.
11756 * class.c: Add prototype for binfo_ctor_vtable.
11757 (get_primary_binfo): Initialize result.
11758 * init.c (build_java_class_ref): Initialize name.
11760 2001-07-09 Erik Rozendaal <dlr@acm.org>
11762 * typeck.c (unary_complex_lvalue): Do not duplicate the
11763 argument to modify, pre-, or post-increment when used as an
11764 lvalue and when the argument has side-effects.
11766 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11768 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11769 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
11770 cplus_decl_attributes even if attrs is NULL.
11771 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11773 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11775 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11776 calls to decl_attributes.
11778 2001-07-06 Ira Ruben <ira@apple.com>
11780 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11781 be DECL_TEMPLATE_RESULT.
11783 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11785 * cp-tree.h (copy_template_template_parm): Rename to ...
11786 (bind_template_template_parm): ... here.
11787 * tree.c (copy_template_template_parm): Rename to ...
11788 (bind_template_template_parm): ... here. Remove the case when
11789 NEWARGS is NULL_TREE.
11790 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11791 BOUND_TEMPLATE_TEMPLATE_PARM.
11792 * pt.c (lookup_template_class): Adjust.
11794 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
11796 * cvt.c (convert_lvalue): New fn.
11797 * cp-tree.h: Declare it.
11798 * method.c (do_build_assign_ref): Use it.
11799 (do_build_copy_constructor): Convert parm to base types
11800 before calling base constructors.
11802 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11803 DECL_USER_ALIGN. Check flag_elide_constructors instead of
11805 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11807 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
11809 * optimize.c (optimize_inline_calls): New function, broken out
11811 (optimize_function): ... here. Call it. Don't inline if it is
11813 (dump_function): Print name of dump flag causing this dump.
11814 * semantics.c (expand_body): Move thunk inline check to
11817 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
11819 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11820 (comptypes): Use target.comp_type_attributes.
11822 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
11824 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11826 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11828 * error.c (lang_print_error_function): Add a `diagnostic_context *'
11831 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11833 * decl2.c (import_export_class): Update.
11835 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11837 * error.c (init_error): Adjust settings.
11839 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11841 * error.c (init_error): Adjust settings.
11843 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
11845 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11846 return pointers to data members by reference rather than by value.
11848 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
11850 Implement the Named Return Value optimization.
11851 * cp-tree.h (struct cp_language_function): Add x_return_value.
11852 (current_function_return_value): Now a macro.
11853 * decl.c: Don't define it.
11854 (define_label, finish_case_label): Don't clear it.
11855 (init_decl_processing): Don't register it with GC.
11856 * semantics.c (genrtl_finish_function): Don't check it for
11857 no_return_label. Copy the RTL from the return value to
11858 current_function_return_value and walk, calling...
11859 (nullify_returns_r): ...this new fn.
11860 * typeck.c (check_return_expr): Set current_function_return_value.
11862 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
11864 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11865 sharing a ctor vtable with. Merge code for cases 1 and 2.
11866 (binfo_ctor_vtable): New fn.
11867 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11869 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
11871 * class.c (dfs_find_final_overrider): Fix logic.
11873 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11874 virtual thunk instead of non-virtual.
11875 (get_matching_virtual): Uncomment.
11877 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11878 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
11881 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
11883 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11884 we've not emerged from the hierarchy of RTTI_BINFO on reaching
11885 a non-virtual base.
11887 2001-06-13 Mark Mitchell <mark@codesourcery.com>
11889 * NEWS: Update release number.
11891 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11893 PR c++/3130, c++/3131, c++/3132
11894 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11895 * class.c (force_canonical_binfo_r): Move
11896 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11897 virtual bases unless they're primary and what they're primary
11898 too has been moved.
11899 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11900 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11901 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11903 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11904 (layout_nonempty_base_or_field): Add most derived type
11906 (layout_empty_base): Likewise.
11907 (build_base_field): Likewise.
11908 (build_base_fields): Likewise.
11909 (propagate_binfo_offsets): Add most derived type
11910 parameter. Skip non canonical virtual bases too.
11911 (dfs_set_offset_for_unshared_vbases): Don't skip primary
11912 bases. Do skip canonical bases.
11913 (layout_virtual_bases): Adjust.
11914 (layout_class_type): Adjust.
11915 (dfs_get_primary_binfo): Build list of virtual primary base
11917 (get_primary_binfo): Check that the shared virtual primary
11918 base candidate was found first.
11919 (accumulate_vtbl_inits): Don't do anything for non-vptr
11920 containing binfos. For case 1 primary virtual bases, keep
11921 checking that we've not emerged from the hierarchy of RTTI_BINFO.
11923 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11926 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11927 hierarchy looking for primary bases for a ctor
11928 vtable. Recursively call oneself, if we meet our primary via
11929 this route and haven't met it yet via inheritance graph order.
11931 2001-06-11 Mark Mitchell <mark@codesourcery.com>
11933 * lang-options.h: Emit documentation for -fno-honor-std, not
11936 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
11938 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11939 Don't clobber delta.
11940 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11942 2001-06-10 Mark Mitchell <mark@codesourcery.com>
11943 Gabriel Dos Reis <gdr@codesourcery.com>
11945 * Make-lang.in (cp/call.o): Depend on diagnostic.h
11946 (cp/typeck.o): Depend on diagnostic.h
11947 (cp/typeck2.o): Depend on diagnostic.h
11948 (cp/repo.o): Depend on dignostic.h
11949 * typeck.c: #include diagnostic.h
11950 (convert_for_initialization): Remove extern declaration for
11951 warningcount and errorcount.
11953 * call.c: #include diagnostic.h
11954 (convert_like_real): Remove extern declaration for warnincount and
11957 * repo.c: #include diagnostic.h
11958 * typeck2.c: #include diagnostic.h
11960 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11962 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11963 in previous change.
11965 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11968 * friend.c (do_friend): Use push_decl_namespace for classes at
11971 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11972 Jason Merrill <jason_merrill@redhat.com>
11975 * class.c (build_secondary_vtable): Use assert, rather than an error
11977 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11978 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11979 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11980 Don't set BINFO_VTABLE for a primary virtual base.
11982 2001-06-07 Mark Mitchell <mark@codesourcery.com>
11984 * decl.c (duplicate_decls): Update source position information
11985 when a template function is defined.
11987 2001-06-07 Phil Edwards <pme@sources.redhat.com>
11989 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
11991 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
11994 * decl.c (pushtag): Don't push into a complete type's scope.
11996 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
11998 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11999 (struct lang_decl_flags): Lose generate_with_vtable_p.
12000 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12001 * class.c (copy_virtuals): Adjust.
12002 * decl2.c (mark_vtable_entries): Adjust.
12003 * method.c (make_thunk, build_vtable_entry): Adjust.
12004 * class.c (update_vtable_entry_for_fn): Only look as far as the
12005 first defining class.
12006 (build_vtbl_initializer): Put nothing in the slot for a function only
12007 defined in a lost primary virtual base.
12008 (add_vcall_offset_vtbl_entries_1): Use the same code for
12009 the lost primary case and the normal case.
12010 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12011 (get_vfield_offset, get_derived_offset): Lose.
12012 (dfs_find_final_overrider): Use look_for_overrides_here.
12013 (get_matching_virtual): New fn.
12014 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12015 not BV_VCALL_INDEX.
12016 * search.c (look_for_overrides_here): Split out from...
12017 (look_for_overrides_r): Here.
12019 * class.c (find_final_overrider): Return error_mark_node on error.
12021 * decl2.c (key_method): #if 0 accidental change.
12023 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12025 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12026 (build_over_call): Likewise.
12027 * decl.c (grokparms): Likewise.
12028 * pt.c (tsubst_decl): Likewise.
12029 * typeck.c (convert_arguments): Likewise.
12031 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12033 * semantics.c (begin_class_definition): Robustify.
12035 * pt.c (instantiate_decl): Tell the repository code about the
12036 clones, not the cloned functions.
12037 * repo.c (repo_template_used): Explicitly instantiate the cloned
12038 function, not the clones.
12040 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12042 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12043 ICS_BAD_FLAG on created conversion.
12044 (compare_ics): Break out rank.
12046 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12048 * decl.c (xref_tag): Remove extraneous %s on dependent name
12051 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12053 * class.c (layout_vtable_decl): Fix off by one error on
12055 (build_vtt): Likewise.
12056 (build_ctor_vtbl_group): Likewise.
12058 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12060 * class.c (maybe_indent_hierarchy): New function.
12061 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12062 information, if enabled. Use maybe_indent_hierarchy. Adjust
12064 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12065 (dump_array, dump_vtable, dump_vtt): New functions.
12066 (finish_struct_1): Adjust hierarchy dumping.
12067 (initialize_vtable): Call dump_vtable.
12068 (build_vtt): Call dump_vtt.
12069 (build_ctor_vtbl_group): Call dump_vtable.
12070 * decl2.c (flag_dump_class_layout): Remove.
12071 (cxx_decode_option): Remove dump translation unit
12072 and dump class hierarchy check. Call dump_switch_p.
12073 (finish_file): Adjust dumping.
12074 (dump.c): Only dump base classes if not TDF_SLIM.
12075 Only dump namespace members if not TDF_SLIM.
12076 * optimize.c (dump_function): New function.
12077 (optimize_function): Call dump_function.
12078 * semantics.c (expand_body): Use dump_enabled_p.
12080 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12083 Part missed from first commit
12084 * decl2.c (finish_anon_union): Copy context.
12086 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12089 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12091 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12094 * semantics.c (expand_body): Don't optimize thunks.
12096 2001-05-25 Sam TH <sam@uchicago.edu>
12098 * cp-tree.h lex.h: Fix header include guards.
12100 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12102 * decl.c (init_decl_processing): Tweak.
12104 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12106 * decl.c (duplicate_decls): Tidy.
12107 (init_decl_processing): Always set flag_no_builtin.
12109 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12112 * decl2.c (do_local_using_decl): Push the decls, even in a
12115 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12117 * optimize.c (initialize_inlined_parameters): Don't set
12118 TREE_READONLY for a VAR_DECL taking the place of an inlined
12121 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12123 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12124 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12127 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12129 * parse.y: Refer to compound literals as such, not as
12130 constructor-expressions.
12132 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12134 * call.c (build_op_delete_call): Ignore exception-specifications
12135 when looking for matching delete operators.
12136 * init.c (build_new_1): Compute whether or not the allocation
12137 function used is a placement allocation function or not, and
12138 communicate this information to build_op_delete_call.
12140 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
12142 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
12143 (build_vtbl_ref): Adjust.
12144 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12145 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12147 (unsupported_options): Correspondingly.
12149 * decl2.c (maybe_make_one_only): Check flag_weak, not
12150 supports_one_only().
12152 * cp-tree.def (START_CATCH_STMT): Lose.
12153 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
12154 * tree.c (cp_statement_code_p): Don't case it.
12155 * semantics.c (cp_expand_stmt): Likewise.
12156 * cp-tree.h (START_CATCH_TYPE): Lose.
12157 (HANDLER_TYPE): New.
12158 * except.c (expand_start_catch_block): Don't start any blocks.
12160 (expand_end_catch_block): Don't end any blocks.
12161 * parse.y (handler): Don't pass anything from finish_handler_parms
12163 * pt.c (tsubst_expr): Likewise.
12164 * semantics.c (begin_handler): Call note_level_for_catch here.
12165 (finish_handler_parms): Don't return anything.
12166 (genrtl_catch_block, begin_catch_block): Lose.
12167 (genrtl_handler): Call expand_start_catch here.
12169 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12171 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12172 (get_vtable_decl, build_vtt): Not here.
12174 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12177 * optimize.c (update_cloned_parm): Copy addressability and other
12180 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12182 * pt.c (determine_specialization): Ignore artificial functions.
12184 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12186 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12187 (C_RID_CODE): Remove.
12188 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12189 (init_parse): Don't do it here.
12191 2001-05-18 Diego Novillo <dnovillo@redhat.com>
12193 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12194 function declaration to avoid stripping the symbol's attributes.
12196 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
12198 * decl.c (pushdecl): Adjust error string.
12199 (xref_tag): Adjust friend class injection warning. Remove the
12200 inherited name from the class shadowed scope.
12202 2001-05-17 Mark Mitchell <mark@codesourcery.com>
12204 * except.c (cp_protect_cleanup_actions): New function.
12205 (init_exception_processing): Don't set protect_cleanup_actions
12206 here. Do set lang_protect_cleanup_actions.
12208 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12210 * spew.c (read_token): Call yyerror on all unexpected tokens.
12212 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12214 * init.c (member_init_ok_or_else): Take a tree rather than
12216 (expand_member_init): Adjust.
12218 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
12220 * decl.c (duplicate_decls): Suppress warning about duplicate
12221 decls if the first decl is a friend.
12223 2001-05-12 Zack Weinberg <zackw@stanford.edu>
12225 * except.c (choose_personality_routine): Export. Add
12226 explanatory comment. Take an enum languages, not a boolean.
12227 (initialize_handler_parm): Adjust to match.
12228 * cp-tree.h: Prototype choose_personality_routine.
12229 * lex.c (handle_pragma_java_exceptions): New function.
12230 (init_cp_pragma): Register #pragma GCC java_exceptions.
12232 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12234 * method.c (build_mangled_C99_name): Remove unused prototype.
12236 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
12238 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12239 * typeck.c (get_member_function_from_ptrfunc,
12240 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12241 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12243 Reverted Geoff Keating's 2001-05-03's patch.
12245 2001-05-11 Ira Ruben <ira@apple.com>
12247 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12249 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
12251 * cp-tree.h (finish_label_expr, lookup_label): Delete.
12252 * parse.y: Update for '&&'; don't issue warning here.
12253 * semantics.c (finish_label_expr): Delete.
12255 2001-05-07 Mark Mitchell <mark@codesourcery.com>
12257 * splay-tree.h (splay_tree_max): New function.
12258 (splay_tree_min): Likewise.
12260 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
12262 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12263 (pfn_vflag_identifier): Define.
12264 Update comment about layout of pointer functions.
12265 (build_ptrmemfunc1): Update prototype.
12266 (expand_ptrmemfunc_cst): Update prototype.
12267 * decl.c (initialize_predefined_identifiers): Initialize
12268 pfn_vflag_identifier.
12269 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12270 an extra field to the type.
12271 * expr.c (cplus_expand_constant): Pass 'flag' between
12272 expand_ptrmemfunc_cst and build_ptrmemfunc1.
12273 * typeck.c (get_member_function_from_ptrfunc): When
12274 FUNCTION_BOUNDARY < 16, look at additional field to determine
12275 if a pointer-to-member is a real pointer or a vtable offset.
12276 (build_ptrmemfunc1): Add new parameter to contain extra field.
12277 (build_ptrmemfunc): Pass the extra field around.
12278 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12279 (pfn_from_ptrmemfunc): Ignore the extra field.
12281 2001-05-03 Mark Mitchell <mark@codesourcery.com>
12283 * cp-tree.h (flag_inline_trees): Update documentation.
12284 * decl.c (init_decl_processing): Adjust handling of
12285 flag_inline_functions and flag_inline_trees to support -O3.
12286 (grokfndecl): Set DECL_INLINE on all functions if that's what
12287 the user requested.
12288 (save_function_data): Clear DECL_INLINE in
12289 current_function_cannot_inline is non-NULL.
12290 * decl2.c (flag_inline_trees): Update documentation.
12292 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
12294 * dump.c (cp_dump_tree, USING_STMT case): New case.
12295 * tree.c (cp_statement_code_p): Add USING_STMT.
12296 * decl2.c (do_using_directive): Add the using directive statement.
12298 * tree.c (walk_tree): Reformat an if block.
12300 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12302 * decl.c (compute_array_index_type): Don't try to do anything with
12303 the indices when processing a template.
12305 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12307 * call.c: NULL_PTR -> NULL.
12308 * class.c: Likewise.
12310 * decl.c: Likewise.
12311 * decl2.c: Likewise.
12312 * except.c: Likewise.
12313 * init.c: Likewise.
12314 * rtti.c: Likewise.
12315 * search.c: Likewise.
12316 * tree.c: Likewise.
12317 * typeck.c: Likewise.
12318 * typeck2.c: Likewise.
12320 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12322 * decl2.c (do_using_directive): Revert previous patch.
12324 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12326 * cp-tree.def (USING_STMT): New statement node.
12327 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12328 * decl2.c (do_using_directive): Add USING_STMT to statement
12329 tree. Don't emit errors when processing template decl.
12330 * pt.c (tsubst_expr, USING_STMT case): New case.
12331 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12333 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12335 * call.c (build_new_op): Convert args from reference here.
12336 (build_conditional_expr): Don't convert here.
12338 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12340 * spew.c (last_token_id): New static variable.
12341 (read_token): Set it here.
12342 (yyerror): Use it here.
12344 2001-04-30 Richard Henderson <rth@redhat.com>
12346 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12347 * decl.c: Likewise.
12349 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12351 * gxxint.texi: Remove.
12352 * Make-lang.in: Remove all traces of gxxint.texi.
12354 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
12356 * decl2.c (start_static_initialization_or_destruction): Correct
12357 logic to handle the -fno-use-cxa-atexit case.
12359 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12361 * optimize.c (update_cloned_parm): New function.
12362 (maybe_clone_body): Use it. Update the `this' parameter too.
12364 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
12366 * decl2.c (unsupported_options): Add new-abi.
12367 * lang-options.h: Remove no longer supported options.
12369 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12371 * except.c (can_convert_eh): Don't check template parms,
12372 typename types etc.
12374 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12376 * optimize.c (maybe_clone_body): Copy parameter names and locations.
12378 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12380 * cp-tree.h (adjust_clone_args): Prototype new function.
12381 * class.c (adjust_clone_args): New function.
12382 * decl.c (start_function): Call it for in charge ctors.
12384 2001-04-26 Mark Mitchell <mark@codesourcery.com>
12386 * method.c (use_thunk): Make sure that thunks really are emitted
12389 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
12391 * mangle.c (write_chars): New macro.
12392 (hwint_to_ascii): New function
12393 (write_number): Use it.
12394 (write_integer_cst): Deal with really big numbers.
12396 2001-04-25 Mark Mitchell <mark@codesourcery.com>
12398 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12401 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
12403 * decl.c (grokdeclarator): Set context of namespace scope
12406 2001-04-24 Zack Weinberg <zackw@stanford.edu>
12408 * cp/optimize.c: Include hashtab.h.
12409 (struct inline_data): Add tree_pruner.
12410 (expand_call_inline, expand_calls_inline): Use it when calling
12412 (optimize_function): Initialize and free tree_pruner.
12414 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12416 Lazy __FUNCTION__ generation.
12417 * cp-tree.def (FUNCTION_NAME): Remove.
12418 * cp-tree.h (function_name_declared_p): Remove.
12419 (cp_fname_init): Prototype.
12420 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12421 don't call declare_function_name. Call start_fname_decls.
12422 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12423 clobber the line number.
12424 (cp_fname_init): New function.
12425 (start_function): Call start_fname_decls.
12426 (finish_function): Call finish_fname_decls.
12427 * lex.c (reswords): Add slots for __FUNCTION__ et al.
12428 (rid_to_yy): Add mappings for __FUNCTION__ et al.
12429 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12430 * parse.y (VAR_FUNC_NAME): New token.
12431 (primary): Add VAR_FUNC_NAME.
12432 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12434 (tsubst, FUNCTION_NAME case): Remove.
12435 (tsubst_copy, FUNCTION_NAME case): Remove.
12436 (tsubst_expr, DECL_STMT case): Be careful with a
12437 DECL_PRETTY_FUNCTION_P.
12438 (instantiate_decl): Remove function_name_declared_p.
12439 * semantics.c (begin_compound_statement): Don't call
12440 declare_function_name here.
12441 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12442 (finish_translation_unit): Call finish_fname_decls.
12443 (expand_body): Remove function_name_declared_p.
12444 * typeck2.c (digest_init): Allow any ERROR_MARK.
12446 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12448 * pt.c (tsubst_decl): Use VOID_TYPE_P.
12449 * semantics.c: Fix some typos.
12451 2001-04-23 Phil Edwards <pme@sources.redhat.com>
12453 * cp/decl2.c (flag_honor_std): Always initialize to 1.
12455 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12457 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12459 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
12461 * except.c (build_throw): Wrap the initialization of the exception
12462 object in a MUST_NOT_THROW_EXPR.
12463 (do_free_exception): #if 0.
12465 2001-04-20 Mark Mitchell <mark@codesourcery.com>
12467 * cp-tree.h (finish_enum): Change prototype.
12468 * decl.c (finish_enum): Reorganize.
12469 * parse.y (structsp): Adjust calls to finish_enum.
12471 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12473 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12476 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12478 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12479 (layout_empty_base): Return at end flag.
12480 (build_base_field): Likewise.
12481 (build_base_fields): Likewise.
12482 (layout_virtual_bases): Don't add 1 to eoc value.
12483 (end_of_class): Use full size for empty bases.
12484 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12485 empty bases. Don't add 1 to eoc value. Only add trailing padding
12486 if we're an empty class with no empty bases.
12487 (dump_class_hierarchy): Dump size and alignment.
12489 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12491 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12494 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12496 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12497 is found, look first if name does not match the structure name.
12499 2001-04-19 Mark Mitchell <mark@codesourcery.com>
12501 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12503 (SET_DECL_LANGUAGE): New macro.
12504 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12505 (pushdecl): Likewise.
12506 (build_library_fn_1): Likewise.
12507 (build_cp_library_fn): Likewise.
12508 (grokfndecl): Likewise.
12509 (grokvardecl): Mark `extern "C"' variables as having C linkage.
12510 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12511 * lex.c (retrofit_lang_decl): Likewise.
12512 * mangle.c (mangle_decl_string): Don't mangle the names of
12513 variables declared with C language linkage.
12514 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12516 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
12518 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12519 flag_access_control from uninitialized storage.
12521 2001-04-15 Mark Mitchell <mark@codesourcery.com>
12523 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12524 * mangle.c (write_pointer_to_member_type): Fix mangling of
12525 pointers to cv-qualified member function types.
12527 * init.c (build_delete): Create a SAVE_EXPR for the address if
12528 we're going to use it more than once.
12530 2001-04-13 Mark Mitchell <mark@codesourcery.com>
12532 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12533 (expand_ptremfunc_cst): Change prototype.
12534 (delta2_from_ptrmemfunc): Remove.
12535 * expr.c (cplus_expand_constant): Adjust call to
12536 expand_ptrmemfunc_cst.
12537 * typeck.c (build_ptrmemfunc1): Simplify.
12538 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12539 results in a constant.
12540 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12541 (delta2_from_ptrmemfunc): Remove.
12542 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12544 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
12546 * cp-tree.h (decl_namespace_list): New macro.
12547 (struct saved_scope): Add decl_ns_list.
12548 * decl.c (mark_saved_scope): Mark it.
12549 * decl2.c: Lose static decl_namespace_list.
12550 (init_decl2): Don't save it.
12552 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12554 * cp-tree.h (warn_return_type, yylex): Delete redundant
12557 * decl.c (current_class_depth, global_namespace): Likewise.
12559 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12561 * repo.c (flag_use_repository): Likewise.
12563 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12565 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12566 set_block, pushdecl, getdecls, gettags, init_decl_processing,
12567 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12568 lvalue_or_else, print_lang_statistics, comp_target_types,
12569 unsigned_type, signed_type, signed_or_unsigned_type,
12570 build_function_call, mark_addressable, incomplete_type_error):
12571 Delete redundant declarations.
12573 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
12575 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12576 (TYPE_ANONYMOUS_P): New macro.
12577 (TAGGED_TYPE_P): New macro.
12578 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12579 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12580 * tree.c (no_linkage_helper): Likewise.
12581 * semantics.c (begin_class_definition): Likewise.
12582 * pt.c (convert_template_argument): Likewise.
12583 * lex.c (check_for_missing_semicolon): Likewise.
12585 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12587 * class.c (dfs_unshared_virtual_bases): New function.
12588 (mark_primary_bases): Call it.
12589 (check_bases): Ignore virtual bases when determining
12592 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12594 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12596 2001-04-11 Mark Mitchell <mark@codesourcery.com>
12598 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12599 cloned function to the clone.
12601 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12603 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12605 * semantics.c: Include expr.h.
12607 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
12609 * method.c (implicitly_declare_fn): Commonize code for copy ctor
12610 and assignment op. Set TREE_USED for parameter.
12612 2001-04-10 Mark Mitchell <mark@codesourcery.com>
12614 * class.c (find_final_overrider_data): Add `candidates'.
12615 (dfs_find_final_overrider): Don't issue error messages
12617 (find_final_overrider): Issue error messages here.
12618 (build_base_field): Don't warn about amgibuous direct bases here.
12619 (warn_about_ambiguous_direct_bases): New function.
12620 (layout_class_type): Use it.
12622 2001-04-10 Richard Henderson <rth@redhat.com>
12624 * typeck.c (build_array_ref): Push the array reference inside
12625 COMPOUND_EXPR and COND_EXPR.
12627 2001-04-05 Mark Mitchell <mark@codesourcery.com>
12629 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12630 * decl.c (duplicate_decls): Adjust accordingly.
12631 (maybe_commonize_var): Likewise.
12632 (grokfndecl): Likewise.
12633 (start_function): Likewise.
12634 (start_method): Likewise.
12635 * decl2.c (key_method): Likewise.
12636 (import_export_decl): Likewise.
12637 * method.c (implicitly_declare_fn): Likewise.
12638 * optimize.c (maybe_clone_body): Likewise.
12640 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
12642 * lang-specs.h: Add __DEPRECATED.
12644 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
12646 * search.c (get_dynamic_cast_base_type): When building a new
12647 constant, set its type to ssizetype.
12649 2001-04-04 Jakub Jelinek <jakub@redhat.com>
12651 * optimize.c (expand_call_inline): Only add newly inlined statements
12652 into inlined_stmts.
12654 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12656 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12657 (OPERATOR_FORMAT): Likewise.
12658 (OPERATOR_TYPENAME_FORMAT): Likewise.
12659 * operators.def: Remove old name-mangling information.
12660 * decl.c (grok_op_properties): Adjust accordingly.
12661 * lex.c (init_operators): Likewise.
12662 * rtti.c (get_tinfo_decl): Issue error messages about types that
12663 have variable size.
12665 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12667 * decl2.c (import_export_decl): Don't call import_export_class
12668 when processing an inline member function.
12669 * semantics.c (expand_body): Call import_export_decl before
12670 emitting inline functions.
12672 2001-03-28 Richard Henderson <rth@redhat.com>
12674 IA-64 ABI Exception Handling:
12675 * cp-tree.def (EH_SPEC_BLOCK): New.
12676 (MUST_NOT_THROW_EXPR): New.
12677 * cp-tree.h: Update changed function declarations.
12678 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12679 (CPTI_CALL_UNEXPECTED): New.
12680 (struct cp_language_function): Rename x_eh_spec_try_block
12681 to x_eh_spec_block.
12682 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12683 * decl.c (current_binding_level): If no current function
12684 bindings, revert to scope_chain.
12685 (initialize_predefined_identifiers): Remove __cp_push_exception.
12686 (store_parm_decls): Use begin_eh_spec_block.
12687 (finish_function): Use finish_eh_spec_block.
12688 (mark_lang_function): Update for name changes.
12689 * decl2.c (finish_file): No mark_all_runtime_matches.
12690 * dump.c (cp_dump_tree): Handle new tree codes.
12691 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12692 * except.c (catch_language_init, catch_language): Remove.
12693 (init_exception_processing): Don't set language code.
12694 Initialize call_unexpected_node, protect_cleanup_actions,
12695 eh_personality_libfunc, lang_eh_runtime_type.
12696 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12697 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12698 (prepare_eh_type): Split out type canonicalizations ...
12699 (build_eh_type_type): ... from here.
12700 (build_eh_type_type_ref): Remove.
12701 (mark_all_runtime_matches): Remove.
12702 (build_exc_ptr): New.
12703 (do_begin_catch, do_end_catch): New.
12704 (do_pop_exception): Remove.
12705 (build_terminate_handler): Remove.
12706 (choose_personality_routine): Split out language choice from ...
12707 (initialize_handler_parm): ... here.
12708 Use MUST_NOT_THROW_EXPR.
12709 (expand_start_catch_block): Use do_begin_catch. Simplify Java
12710 exception object handling.
12711 (expand_start_eh_spec, expand_end_eh_spec): Remove.
12712 (expand_exception_blocks, alloc_eh_object): Remove.
12713 (begin_eh_spec_block, finish_eh_spec_block): New.
12714 (do_allocate_exception, do_free_exception): New.
12715 (expand_throw): Merge into ...
12716 (build_throw): ... here. Update for abi.
12717 * expr.c (cplus_expand_expr): No expand_internal_throw.
12718 Handle MUST_NOT_THROW_EXPR.
12719 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12720 * semantics.c (*) Update for except.h name changes.
12721 (genrtl_try_block): No protect_with_terminate.
12722 (genrtl_eh_spec_block): New.
12723 (genrtl_handler): Don't emit the goto here.
12724 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12725 (genrtl_finish_function): Don't expand_exception_blocks.
12726 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12728 2001-03-28 Richard Henderson <rth@redhat.com>
12730 * decl.c (struct named_label_list): Rename eh_region to
12731 in_try_scope, add in_catch_scope.
12732 (struct binding_level): Rename eh_region to is_try_scope,
12733 add is_catch_scope.
12734 (note_level_for_try): Rename from note_level_for_eh.
12735 (note_level_for_catch): New.
12736 (poplevel): Copy both is_try_scope and is_catch_scope to
12737 the named_label_list struct.
12738 (check_previous_goto_1): Don't check for catch block via
12739 DECL_ARTIFICIAL; use in_try_scope instead.
12740 (check_goto): Likewise.
12741 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12742 * except.c (expand_start_catch_block): Call note_level_for_catch.
12743 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12745 2001-03-27 Richard Henderson <rth@redhat.com>
12747 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12748 exceptions_via_longjmp.
12750 2001-03-27 Phil Edwards <pme@sources.redhat.com>
12752 * pt.c (check_default_tmpl_args): Make error messages clearer.
12754 2001-03-26 Phil Edwards <pme@sources.redhat.com>
12756 * error.c: Also undefine 'A' macro used for cp_printers definition.
12758 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12760 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12762 2001-03-26 Mike Yang <yang@research.att.com>
12763 Mark Mitchell <mark@codesourcery.com>
12765 * dump.c (dump_access): New function.
12766 (cp_dump_tree): Use it. Dump basetype information for class
12769 2001-03-26 Mark Mitchell <mark@codesourcery.com>
12771 * Makefile.in (optimize.o): Depend on params.h.
12772 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12773 (init_decl_processing): Set flag_no_inline when doing
12775 * optimize.c: Include params.h.
12776 (struct inline_data): Improve documentation of FNS. Add
12777 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12778 (INSNS_PER_STMT): New macro.
12779 (remap_block): Use CLONING_P.
12780 (inlinable_function_p): Don't inline big functions.
12781 (expand_call_inline): Keep track of how much inlining we've done.
12782 (optimize_function): Set FIRST_INLINED_FN.
12783 (maybe_clone_body): Set CLONING_P.
12784 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12786 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12787 rest_of_compilation. Clear DECL_RTL for local variables
12789 (clear_decl_rtl): New function.
12791 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
12794 * cp-tree.h (skip_type_access_control,
12795 reset_type_access_control): Prototype.
12796 * decl.c (grokdeclarator): Access of friends is not checked.
12797 * parse.y (component_decl_list): Reset type access control.
12798 * semantics.c (decl_type_access_control): Clear
12799 current_type_lookups.
12800 (save_type_access_control): Don't save if not deferring.
12801 (skip_type_access_control, reset_type_access_control): New
12803 (begin_class_definition): Do type access control for basetypes.
12804 Start deferred access control.
12805 (finish_class_definition): Resume immediate access control if
12806 this is a local class.
12808 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12810 * class.c (add_method): Use memcpy/memmove, not bcopy.
12812 * decl.c (duplicate_decls): Likewise.
12814 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12816 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12819 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12821 * decl.c (local_names): Define.
12822 (push_local_name): New.
12823 (grok_reference_init): Return init if initializing static reference
12824 variable with non-constant instead of emitting it.
12825 Move expand_static_init call to cp_finish_decl.
12826 (layout_var_decl): Call push_local_name.
12827 (maybe_commonize_var): Allow inlining functions even if they have
12828 static local variables, use comdat_linkage for them if flag_weak.
12829 (check_initializer): Call obscure_complex_init if
12830 grok_reference_init returned nonzero.
12831 (save_function_data): Clear x_local_names.
12832 (pop_cp_function_context): Free x_local_names.
12833 (mark_inlined_fns): Remove.
12834 (mark_lang_function): Mark x_local_names.
12835 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12836 Mark inlined_fns as tree, remove call to mark_inlined_fns.
12837 * class.c (alter_access): Ensure DECL_ACCESS is never set if
12838 DECL_DISCRIMINATOR_P.
12839 * cp-tree.h (cp_language_function): Add x_local_names.
12840 (lang_decl_flags): Add discriminator into u2.
12841 (lang_decl_inlined_fns): Remove.
12842 (lang_decl): inlined_fns is now a TREE_VEC.
12843 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12844 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12845 TREE_VEC, not a custom structure.
12846 (optimize_function): Likewise.
12847 * mangle.c (discriminator_for_local_entity): Discriminate among
12848 VAR_DECL local entities.
12849 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12852 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
12854 Add support for Java interface method calls.
12855 * cp-tree.h (struct lang_type): Add java_interface flag.
12856 (TYPE_JAVA_INTERFACE): New macro.
12857 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12858 by setting TYPE_JAVA_INTERFACE.
12859 * call.c (java_iface_lookup_fn): New static.
12860 (build_over_call): If calling a method declared in a
12861 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12862 expression which resolves the function address.
12863 (build_java_interface_fn_ref): New function.
12865 2001-03-22 Richard Henderson <rth@redhat.com>
12867 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12868 * except.c: Don't include it.
12870 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12871 based on an idea from Joe Buck <jbuck@synopsys.com>
12873 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12875 (data_def, component_decl): Add reductions to bad_decl.
12877 2001-03-22 Jakub Jelinek <jakub@redhat.com>
12879 * method.c (do_build_assign_ref): Don't use build_modify_expr for
12880 anonymous aggregates, since they don't have assignment operator
12882 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12883 assignment operators for anonymous structure fields.
12885 2001-03-21 Jason Merrill <jason@redhat.com>
12887 * pt.c (instantiate_decl): Abort if we see a member constant
12888 instantiation that doesn't already have its initializer.
12889 Downgrade explicit instantiation without definition to pedwarn.
12891 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12892 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12893 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12895 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12896 (pending_vtables): Remove.
12897 * decl2.c (pending_vtables): Remove.
12898 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12899 CLASSTYPE_VTABLE_NEEDS_WRITING.
12900 (import_export_class): Likewise.
12901 (init_decl2): Don't mark pending_vtables.
12902 * lex.c (handle_pragma_vtable): Just sorry.
12903 * pt.c (instantiate_class_template): Don't mess with
12904 CLASSTYPE_VTABLE_NEEDS_WRITING.
12905 (mark_class_instantiated): Likewise.
12906 * ptree.c (print_lang_type): Don't print it.
12907 * semantics.c (begin_class_definition): Don't set it.
12909 * pt.c (template_tail): Replace with last_pending_template.
12910 (maybe_templates, maybe_template_tail): Remove.
12911 (add_pending_template): Adjust.
12912 (instantiate_pending_templates): Adjust.
12914 * cp-tree.h (struct saved_scope): Remove lang_stack field.
12915 (current_lang_stack): Remove.
12916 * decl.c (maybe_push_to_top_level): Don't initialize it.
12917 (duplicate_decls): Use current_lang_depth.
12918 (xref_basetypes): Likewise.
12919 * class.c (current_lang_depth): New fn.
12920 (push_lang_context): Use more varray functionality.
12921 (pop_lang_context): Likewise.
12923 * error.c (GLOBAL_THING): Always use '__'.
12925 2001-03-21 Mark Mitchell <mark@codesourcery.com>
12927 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12929 * mangle.c (mangle_decl_string): Mangle the names of overloaded
12930 operators, even when they have `extern "C"' linkage.
12932 2001-03-19 Mark Mitchell <mark@codesourcery.com>
12934 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12935 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12936 where it's not necessary.
12937 (add_method): Remove optimization involving comparison of
12938 DECL_ASSEMBLER_NAME.
12939 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12940 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12941 where it's not necessary.
12942 (check_methods): Likewise.
12943 (build_clone): Likewise.
12944 (built_vtt): Likewise.
12945 * cp-tree.h (DECL_NEEDED_P): Likewise.
12946 * decl.c (pushtag): Likewise.
12947 (duplicate_decls): Likewise.
12948 (pushdecl): Likewise.
12949 (builtin_function): Likewise.
12950 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12951 (build_cp_library_fn): Likewise.
12952 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12953 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12954 where it's not necessary.
12955 (make_rtl_for_nonlocal_decl): Likewise.
12956 (cp_finish_decl): Likewise.
12957 (grokfndecl): Likewise.
12958 (grokvardecl): Likewise.
12959 (grokdeclarator): Likewise.
12960 (start_function): Likewise.
12961 (cp_missing_return_ok_p): Likewise.
12962 * decl2.c (grokclassfn): Likewise.
12963 (check_classfn): Likewise.
12964 (finish_static_data_member_decl): Likewise.
12965 (grokfield): Likewise.
12966 * error.c (GLOBAL_IORD_P): Remove.
12967 (dump_global_iord): Improve output.
12968 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12969 * except.c (nothrow_libfn_p): Summarily reject any function not in
12971 * init.c (build_java_class_ref): Don't explicitly set
12972 DECL_ASSEMBLER_NAME after calling mangle_decl.
12973 * mangle.c (mangle_decl_string): Handle extern "C" functions.
12974 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12975 * method.c (set_mangled_name_for_decl): Don't explicitly set
12976 DECL_ASSEMBLER_NAME after calling mangle_decl.
12977 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12978 IDENTIFIER_GLOBAL_VALUE for the thunk.
12979 * pt.c (set_mangled_name_for_template_decl): Remove.
12980 (check_explicit_specialization): Don't use it.
12981 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12982 (tsubst_friend_function): Likewise.
12983 (tsubst_decl): Likewise.
12984 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12985 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12986 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12987 where it's not necessary.
12988 (tinfo_base_init): Likewise.
12989 (create_real_tinfo_var): Likewise.
12990 * search.c (looup_field_1): Likewise.
12991 * semantics.c (finish_named_return_value): Likewise.
12992 * tree.c (init_tree): Set lang_set_decl_assembler_name.
12994 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
12996 Correct semantics restrictions checking in throw-expression.
12997 * except.c (is_admissible_throw_operand): New function.
12998 (build_throw): Use it.
13000 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13002 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13005 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13007 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13008 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13009 * decl.c (duplicate_decls): Likewise.
13010 (builtin_function): Likewise.
13011 (build_library_fn): Likewise.
13012 (build_cp_library_fn): Likewise.
13013 (check_initializer): Likewise.
13014 (cp_finish_decl): Likewise.
13015 * decl2.c (grokfield): Likewise.
13016 (grok_function_init): Remove #if 0'd code.
13017 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13018 * friend.c (do_friend): Likewise.
13019 * init.c (get_temp_regvar): Likewise.
13020 * method.c (make_thunk): Likewise.
13021 * pt.c (tsubst_friend_function): Likewise.
13022 (tsubst_decl): Likewise.
13023 (regenerate_decl_from_template): Likewise.
13024 * semantics.c (genrtl_named_return_value): Likewise.
13025 (expand_body): Likewise.
13026 (genrtl_finish_function): Likewise.
13027 * tree.c (cp_tree_equal): Likewise.
13029 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13031 * call.c (convert_like_real): Add extra semantics to INNER
13032 parameter. Don't convert to temporary if a user conversion
13033 gives us an lvalue that we're about to bind to a reference.
13034 Set INNER to indicate pending reference binding on recursive
13037 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13039 * cp/lex.c: Delete duplicate pending_lang_change.
13041 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13043 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13045 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13046 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13048 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13050 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13052 2001-03-08 Stan Shebs <shebs@apple.com>
13054 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13056 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13058 * spew.c: Remove references to CPP_OSTRING.
13060 2001-03-06 Andrew Haley <aph@redhat.com>
13062 * typeck.c (convert_arguments): Check that we have an fndecl.
13064 2001-03-05 Andrew Haley <aph@redhat.com>
13066 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13067 __built_in_constant_p.
13069 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13071 * typeck.c (build_static_cast): Allow enum to enum conversions
13074 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13076 * class.c (check_field_decls): Pointers to member do not a
13077 non-pod struct make, as per DR 148.
13079 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13081 * call.c (joust): cp_pedwarn when using gnu extension concerning
13082 worst conversion sequences.
13084 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13086 * decl.c: Replace all uses of 'boolean' with 'bool'.
13088 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13090 * lang-specs.h: Add zero initializer for cpp_spec field to
13091 all array elements that need one. Don't put an #ifdef inside
13092 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13095 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13097 Implement using decls inside template functions.
13098 * decl2.c (validate_nonmember_using_decl): Don't special case
13099 fake_std_node in the global namespace. Don't reject early when
13100 processing a template.
13101 (do_local_using_decl): Add to statement tree. Don't do further
13102 processing when building a template.
13103 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13105 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13107 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13108 same function. Do complain about ambiguating extern "C"
13111 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13113 Remove floating point and complex type template constant parms.
13114 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13115 COMPLEX_TYPE extensions.
13116 (invalid_nontype_parm_type_p): Likewise.
13118 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13120 * except.c (call_eh_info): Revert "match_function"'s type.
13122 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13124 Fix ctor vtable vcall offsets.
13125 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13126 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13127 (get_matching_base): Remove.
13128 (get_original_base): New function.
13129 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13130 Use a virtual thunk for a ctor vtable with an index
13131 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13132 primary base within a constructor vtable. Only set
13133 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13134 when primary base has been lost.
13135 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13137 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13139 * call.c (joust): Ensure more_specialized()'s argument length
13140 parameter has correct value for constructors.
13142 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
13144 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13146 * decl.c (mark_inlined_fns): Prototype.
13148 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13150 * spew.c (yylex): Correct handling of friends.
13152 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13154 * mangle.c (write_encoding): Pass write_function_type the
13155 FUNCTION_DECL for the function being encoded.
13156 (write_function_type): Pass it along to write_bare_function_type.
13157 (write_bare_function_type): Pass it along to write_method_parms.
13158 (write_method_parms): Don't mangle the compiler-generated
13159 parameters to a constructor or destructor.
13161 2001-02-22 Andreas Jaeger <aj@suse.de>
13163 * optimize.c: Include toplev.h for
13164 note_deferral_of_defined_inline_function prototype.
13166 2001-02-22 Jakub Jelinek <jakub@redhat.com>
13168 * cp-tree.h (struct lang_decl_inlined_fns): New.
13169 (struct lang_decls): Add inlined_fns.
13170 (DECL_INLINED_FNS): New macro.
13171 * optimize.c (struct inline_data): Add inlined_fns.
13172 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13173 (inlinable_function_p): Likewise, fix typo in comment,
13174 function is not inlinable if it already inlined function currently
13176 (expand_call_inline): Add fn to inlined_fns if necessary.
13177 (optimize_function): Initialize inlined_fns.
13178 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13179 * decl.c (mark_inlined_fns): New function.
13180 (lang_mark_tree): Call it.
13182 2001-02-21 Jason Merrill <jason@redhat.com>
13184 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13185 (DECL_UNINLINABLE): Move to middle-end.
13187 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13188 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13189 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13190 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13191 parms and outer BLOCK. note_deferral_of_defined_inline_function.
13193 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13194 second parm of op=.
13196 2001-02-19 Mark Mitchell <mark@codesourcery.com>
13198 * decl2.c (set_decl_namespace): Allow explicit instantiations in
13201 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13203 * optimize.c (expand_call_inline): Don't walk subtrees of type
13206 2001-02-18 Mark Mitchell <mark@codesourcery.com>
13208 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13211 2001-02-18 Jason Merrill <jason@redhat.com>
13213 Do put the VTT parameter in DECL_ARGUMENTS.
13214 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13215 (current_vtt_parm): New macro.
13216 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13217 (DECL_HAS_VTT_PARM_P): New macro.
13218 (DECL_VTT_PARM): Remove.
13219 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13220 * decl.c (duplicate_decls): Only copy the operator code if
13222 (start_function): Set current_vtt_parm.
13223 (lang_mark_tree): Don't mark vtt_parm.
13224 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13225 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
13226 * class.c (build_clone): Maybe remove the VTT parm.
13227 * optimize.c (maybe_clone_body): Set up the VTT parm.
13228 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13229 * call.c (build_over_call): Just allow the VTT arg.
13230 * method.c (make_thunk): Don't set DECL_VTT_PARM.
13231 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13232 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13233 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13234 * error.c (dump_function_decl): Likewise.
13235 * call.c (build_user_type_conversion_1, convert_like_real): Abort
13236 if we try to call a constructor with in-charge or VTT parms.
13237 * method.c (skip_artificial_parms_for): New fn.
13238 * call.c (add_function_candidate, build_over_call): Call it.
13239 * call.c (build_new_method_call): Use current_vtt_parm.
13240 * init.c (expand_virtual_init): Likewise.
13241 * class.c (same_signature_p): No longer static.
13242 * cp-tree.h: Declare it.
13243 * search.c (look_for_overrides_r): Use it.
13245 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13247 * cp-tree.h (new_abi_rtti_p): Remove.
13248 (name_mangling_version): Likewise.
13249 (flag_do_squangling): Likewise.
13250 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13251 * decl.c (grokfndecl): Likewise.
13252 * decl2.c (name_mangling_version): Remove.
13253 (flag_do_squangling): Likewise.
13254 (lang_f_options): Remove `squangle'.
13255 (unsupported_options): Add `squangle'.
13256 (cxx_decode_option): Issue a warning about uses of
13257 -fname-mangling-version.
13258 (finish_file): Remove old ABI support.
13259 * pt.c (check_explicit_specialization): Likewise.
13260 (tsubst_decl): Likewise.
13261 * rtti.c (init_rtti_processing): Likewise.
13262 (build_headof): Likewise.
13263 (get_tinfo_decl_dynamic): Likewise.
13264 (tinfo_from_decl): Likewise.
13265 (build_dynamic_cast_1): Likewise.
13266 (synthesize_tinfo_var): Likewise.
13267 * init.c (build_new): Allow enumeration types for the array-bounds
13268 in a direct-new-declarator.
13270 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13272 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13273 TREE_PROTECTED from the template being specialized.
13275 2001-02-17 Jason Merrill <jason@redhat.com>
13277 * decl2.c (build_artificial_parm): Set TREE_READONLY.
13279 * decl.c (bad_specifiers): Allow throw specs on things with
13280 pointer-to-function or -member-function type.
13281 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13284 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13286 * call.c (check_dtor_name): Handle template names correctly.
13288 2001-02-16 Jason Merrill <jason@redhat.com>
13290 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13291 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13292 * optimize.c (maybe_clone_body): Don't substitute it.
13293 * call.c (build_new_method_call): Check in_chrg instead.
13294 * init.c (expand_virtual_init): Likewise.
13296 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
13298 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13299 class-type introduces at least a type-name.
13301 2001-02-16 Jakub Jelinek <jakub@redhat.com>
13303 * call.c (convert_like_real): Create a temporary for non-lvalue.
13305 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
13307 * cp-tree.h: Fix typos in comments.
13309 2001-02-16 Jason Merrill <jason@redhat.com>
13311 * optimize.c (remap_block): If we're compiling a clone, pass the
13312 new block to insert_block.
13314 2001-02-16 Mark Mitchell <mark@codesourcery.com>
13316 * semantics.c (finish_asm_stmt): Robustify.
13318 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13320 * pt.c (push_template_decl_real): Don't remangle the name of a
13323 2001-02-15 Jim Meyering <meyering@lucent.com>
13325 * Make-lang.in (c++.install-common): Depend on installdirs.
13326 (c++.install-info): Likewise.
13327 (c++.install-man): Likewise.
13329 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13331 * typeck2.c (build_m_component_ref): Robustify.
13333 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
13335 * friend.c (do_friend): Don't take the nested [template] class
13336 into account when deciding whether to warn about the friend
13337 function not referring to a template function.
13339 2001-02-14 Jakub Jelinek <jakub@redhat.com>
13341 * typeck.c (build_unary_op): Clarify error message.
13343 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
13345 * parse.y (component_constructor_declarator): allow optional
13346 parentheses around constructor class name.
13348 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13350 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13352 * init.c (emit_base_init): Remove incorrect comment about
13354 * method.c (make_thunk): Fix comment alignment.
13356 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13358 Kill remnants of this is variable.
13359 * cp-tree.h (flag_this_is_variable): Remove.
13360 * decl2.c (flag_this_is_variable): Remove.
13361 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13362 (build_vbase_path): The path is non-static, even in a cdtor.
13363 (resolves_to_fixed_type_p): Add additional return value.
13364 * search.c (init_vbase_pointers): Adjust.
13365 * tree.c (lvalue_p_1): Adjust.
13366 * typeck.c (mark_addressable): Adjust.
13368 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13370 * pt.c (unify): Don't check cv quals of array types.
13372 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13374 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13375 check whether we already have the type.
13377 2001-02-13 Mark Mitchell <mark@codesourcery.com>
13379 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13380 * call.c (build_op_delete_call): Simplify to remove duplicate
13382 * class.c (clone_function_decl): Don't build the deleting variant
13383 of a non-virtual destructor.
13384 * decl.c (finish_destructor_body): Don't call delete if this is a
13385 non-virtual destructor.
13386 * init.c (build_delete): Explicitly call `operator delete' when
13387 deleting an object with a non-virtual destructor.
13389 2001-02-13 Jason Merrill <jason@redhat.com>
13391 * lang-specs.h: Add more __EXCEPTIONS.
13393 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13395 * typeck2.c (process_init_constructor): Check
13396 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13398 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13400 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13401 Remove spurious information in comment. Allow further
13402 adjustments of REFERENCE_TYPE args.
13404 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13406 * errfn.c (cp_deprecated): Tweak diagnostic text.
13407 * parse.y (new_initializer): Deprecate initializer lists
13410 2001-02-12 Mark Mitchell <mark@codesourcery.com>
13412 Remove old ABI support.
13414 2001-02-11 Mark Mitchell <mark@codesourcery.com>
13416 * decl2.c (flag_vtable_thunks): Always set it to 1.
13417 (flag_new_abi): Likewise.
13418 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13420 * Makefile.in (g++spec.o): Fix typo.
13422 2001-02-09 Jason Merrill <jason@redhat.com>
13424 * lang-specs.h: Restore definition of __EXCEPTIONS.
13426 2001-02-08 Jason Merrill <jason@redhat.com>
13428 * search.c (shared_member_p): New function.
13429 (lookup_field_r): Use it.
13430 * cp-tree.h (SHARED_MEMBER_P): Remove.
13432 * method.c (process_overload_item): Handle template-dependent array
13434 * pt.c (type_unification_real): If we end up with undeduced nontype
13437 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13440 * typeck2.c (friendly_abort): Don't say anything if we have
13441 earlier errors or sorries.
13443 * decl.c (check_tag_decl): Notice attempts to redefine bool and
13444 wchar_t. Ignore if in_system_header.
13446 * decl.c (maybe_push_cleanup_level): New fn...
13447 (start_decl_1): ...split out from here.
13448 * cvt.c (build_up_reference): Use it.
13449 * cp-tree.h: Declare it.
13451 2001-02-07 Mark Mitchell <mark@codesourcery.com>
13453 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13456 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
13458 * pt.c (lookup_template_class): Make sure it's a primary
13459 template or template_template_parm when called from the parser.
13460 (instantiate_template_class): Add assertion.
13462 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
13464 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13465 from error_mark_node.
13467 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
13469 Fix specification and implementation bugs in V3 ABI
13470 construction vtables.
13471 * cp-tree.h (flag_dump_class_layout): New flag.
13472 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13473 (BINFO_LOST_PRIMARY_P): New flag.
13474 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13475 (BINFO_PRIMARY_MARKED_P): Rename to ...
13476 (BINFO_PRIMARY_P): ... here.
13477 (binfo_via_virtual): New prototype.
13478 * decl2.c (flag_dump_class_layout): New flag.
13479 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13480 use `=' as a file name separator.
13481 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13483 (build_vtbl_address): If this is a virtual primary base, then
13484 get the vtbl of what it is ultimately primary for.
13485 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13486 for BINFO_PRIMARY_P.
13487 (dfs_skip_nonprimary_vbases_markedp): Likewise.
13488 (get_shared_vbase_if_not_primary): Likewise.
13489 (dfs_get_pure_virtuals): Likewise.
13490 (expand_upcast_fixups): Likewise.
13491 (fixup_virtual_upcast_offsets): Likewise.
13492 (dfs_find_vbase_instance): Likewise.
13493 (find_vbase_instance): Likewise.
13494 (binfo_from_vbase): Adjust comment to reflect reality.
13495 (binfo_via_virtual): New function.
13496 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13497 for binfo walking during VTT construction.
13498 (dfs_mark_primary_bases): Remove.
13499 (force_canonical_binfo_r): New function.
13500 (force_canonical_binfo): New function.
13501 (mark_primary_virtual_base): New function.
13502 (mark_primary_bases): Walk in inheritance graph order, use
13503 mark_primary_virtual_base.
13504 (determine_primary_base): Use some more intermediate variables.
13505 (dfs_find_final_overrider): Don't check for overriding along a
13507 (dfs_modify_vtables): Walk into primary virtual bases too.
13508 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13509 (build_base_fields): Likewise.
13510 (dfs_set_offset_for_unshared_vbases): Likewise.
13511 (layout_virtual_bases): Likewise.
13512 (end_of_class): Likewise.
13513 (finish_struct_1): Call dump_class_hierarchy, if requested.
13514 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13515 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13516 (dump_class_hierarchy): Add file parameter. Append to file, if
13518 (finish_vtbls): Adjust accumulate_vtbl_inits call.
13519 Use canonical base for virtual bases.
13520 (build_vtt): Add more comments. Adjust build_vtt_inits call.
13521 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13522 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13523 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13525 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13526 from DATA. We want virtual primary bases and all bases via virtual.
13527 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13528 virtual base when not a construction vtable.
13529 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13530 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13531 Use canonical bases when processing virtual bases.
13532 (accumulate_vtbl_inits): We're interested in any base via a
13534 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13535 within a construction vtable, determine what is being overridden.
13536 (build_vtbl_initializer): Add more comments
13537 (add_vcall_offset_vtbl_entries_1): Adjust comment.
13538 (build_rtti_vtbl_entries): Check if the base has lost its
13541 2001-02-05 Mark Mitchell <mark@codesourcery.com>
13543 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13545 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13547 * decl.c (pushdecl): Call abort instead of fatal.
13548 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13549 * init.c (build_new_1): Likewise.
13550 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13551 * decl.c (build_typename_type): hash_table_init now returns void.
13552 decl.c (init_decl_processing): Make an error non-fatal.
13554 2001-02-04 Mark Mitchell <mark@codesourcery.com>
13556 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13558 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13559 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13560 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13561 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13562 * decl.c (maybe_commonize_var): Use the new name-mangling where
13564 * decl2.c (comdat_linkage): Enhance comments. Make all
13565 compiler-generated things static, if COMDAT is not available.
13566 (get_tinfo_decl): Do not make typeinfo objects that belong in the
13568 (tinfo_base_init): Use the correct mangled name for typeinfo
13569 strings, and push them into the global scope.
13570 (typeinfo_in_lib_p): New function.
13571 (synthesize_tinfo_var): Use it.
13572 (create_real_tinfo_var): Likewise.
13574 2001-02-03 Jakub Jelinek <jakub@redhat.com>
13576 * decl.c (push_class_binding): Use context_for_name_lookup instead
13577 of CP_DECL_CONTEXT.
13578 * search.c (context_for_name_lookup): Remove static. Check for NULL
13579 context in the loop.
13580 * cp-tree.h (context_for_name_lookup): Add prototype.
13582 2001-02-02 Jakub Jelinek <jakub@redhat.com>
13584 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13585 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13587 * call.c (convert_class_to_reference, build_user_type_conversion_1,
13588 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13590 2001-02-02 Mark Mitchell <mark@codesourcery.com>
13592 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13593 of macros used when compiling g++spec.c.
13594 * g++spec.c (lang_specific_driver): Link with the shared
13597 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
13599 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13600 make_reference_declarator, make_call_declarator), method.c
13601 (implicitly_declare_fn), parse.y (namespace_using_decl,
13602 notype_unqualified_id, expr_or_declarator, new_type_id,
13603 after_type_declarator, direct_after_type_declarator,
13604 notype_declarator, complex_notype_declarator,
13605 complex_direct_notype_declarator, qualified_id,
13606 notype_qualified_id, overqualified_id, direct_new_declarator,
13607 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13608 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13609 instead of build_parse_node.
13611 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13613 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13614 (minus_one_node): Moved to top level gcc directory. Renamed
13615 to integer_minus_one_node.
13617 * init.c (init_init_processing): Don't set minus_one_node.
13618 (build_vec_init): Use integer_minus_one_node.
13620 * rtti.c (get_tinfo_decl_dynamic): Likewise.
13622 2001-01-28 Jakub Jelinek <jakub@redhat.com>
13624 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13625 identical and they would be replaced with constant, remove
13626 MODIFY_EXPR from the tree.
13628 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13630 * Make-lang.in: Remove all dependencies on defaults.h.
13631 * call.c: Don't include defaults.h.
13632 * decl.c: Likewise.
13633 * decl2.c: Likewise.
13634 * except.c: Likewise.
13636 * rtti.c: Likewise.
13637 * tree.c: Likewise.
13638 * typeck.c: Likewise.
13640 2001-01-25 Jakub Jelinek <jakub@redhat.com>
13642 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13643 operators even in "C" linkage.
13644 * method.c (set_mangled_name_for_decl): Likewise.
13645 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13646 overloaded operators in "C" linkage.
13648 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13650 * pt.c (tsubst_decl): Remove IN_DECL parameter.
13651 (tsubst_arg_types): Check parameter is not void.
13652 (tsubst): Adjust tsubst_decl call.
13654 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13656 * call.c (add_builtin_candidate): Quote std properly, from
13659 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13661 * pt.c (check_explicit_specialization): Clone constructors and
13664 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13666 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13667 indicates anything special about template depth. Make sure we
13668 only count the user visible template classes.
13670 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13672 * call.c (build_conv): Typo in comment.
13673 (add_builtin_candidate): Add more explanation.
13674 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13675 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13676 when we have enumeral types.
13677 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13678 candidates for relops and eqops.
13679 (joust): Simplify control flow. Allow a non-template user
13680 function to hide a builtin.
13682 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
13684 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13685 (more_specialized): Add deduction parameter.
13686 * call.c (joust): Adjust more_specialized call.
13687 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13688 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13689 (get_bindings_order): Remove.
13690 (get_bindings_real): Add DEDUCE parameter.
13691 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13692 REFERENCE_TYPE jig for DEDUCE_ORDER.
13693 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13694 maybe_adjust_types_for_deduction.
13695 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13697 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13698 (check_cv_quals_for_unify): Use new unify qualifier flags.
13699 (unify): Clear new unify qualifier flags.
13700 (get_bindings_real): Add DEDUCE parameter.
13701 (get_bindings): Adjust call to get_bindings_real.
13702 (get_bindings_overload): Likewise.
13703 (most_specialized_instantiation): Adjust call to
13706 2001-01-19 Jason Merrill <jason@redhat.com>
13708 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13710 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13713 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
13715 * decl2.c (arg_assoc_class): Fix double iteration logic.
13717 2001-01-19 Jason Merrill <jason@redhat.com>
13719 * init.c (build_delete): Always call convert_force to strip cv-quals.
13721 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13722 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13723 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13725 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13727 * search.c (get_vbase_1): Count only virtual bases.
13729 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13731 * class.c (duplicate_tag_error): Robustify flag clearing.
13733 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13735 * cp-tree.h (lookup_template_class): Add complain parm.
13736 * decl.c (lookup_namespace_name): Adjust call to
13737 lookup_template_class.
13738 (make_typename_type): Likewise.
13739 * semantics.c (finish_template_type): Likewise.
13740 * pt.c (lookup_template_class): Add complain parm. Adjust.
13741 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13742 (tsubst): Likewise.
13744 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13746 * pt.c (copy_default_args_to_explicit_spec): Preserve
13747 object's CV quals. Reorganize.
13749 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13751 * typeck.c (build_modify_expr): Say `initialization' for
13753 * init.c (build_default_init): Convert to enumeral type, if
13756 2001-01-18 Jakub Jelinek <jakub@redhat.com>
13758 * parse.y (nomods_initdcl0): Properly set things up for
13761 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13763 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13764 (type_unification_real): Set it.
13767 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13769 * decl.c (finish_destructor_body): Convert to vbase pointer here.
13771 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13773 * semantics.c (begin_class_definition): Check we're not inside a
13774 template parm list.
13776 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13778 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13781 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13783 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13784 * call.c (build_over_call): Add comment.
13786 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13788 * cvt.c (ocp_convert): Handle vector type conversion
13789 * typeck2.c (digest_init): Handle vector type initializations
13791 2001-01-16 Phil Edwards <pme@sources.redhat.com>
13793 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
13796 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13798 * pt.c (check_nontype_parm): Rename to ...
13799 (invalid_nontype_parm_type_p): ... here.
13800 (process_template_parm): Adjust.
13801 (convert_template_argument): Adjust.
13803 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13805 * pt.c (check_nontype_parm): New function.
13806 (process_template_parm): Use it.
13807 (convert_template_argument): Use it.
13808 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13811 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
13813 * tree.c: Add defaults.h
13814 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13815 * Make-lang.in (cp/tree.o): Add defaults.h.
13817 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13819 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13821 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13823 * g++.1: Change to be ".so man1/gcc.1".
13825 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13827 * Make-lang.in (c++.info, c++.install-info): Build and install g++
13829 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13830 ($(srcdir)/cp/g++int.info): New target.
13831 * gxxint.texi: Add info directory entry. Use @@ in email address.
13832 * .cvsignore: Update.
13834 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13836 * typeck.c (build_c_cast): Do template processing earlier.
13837 Always pedwarn on array casts.
13839 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13841 * friend.c (make_friend_class): Make sure a templated class is
13842 actually a template.
13844 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13846 * decl2.c (get_guard): Set linkage from guarded decl.
13848 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13850 * call.c (convert_default_arg): Check for unprocessed
13852 * cp-tree.h (replace_defarg): Move to spew.c.
13853 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13854 spew.c, which is where they really are.
13855 (done_pending_defargs): Declare.
13856 (unprocessed_defarg_fn): Declare.
13857 * decl.c (replace_defarg): Move to spew.c
13858 * parse.y (structsp): Call done_pending_defargs.
13859 * spew.c (defarg_fns): Rearrange list structure.
13860 (defarg_fnsdone): New static variable.
13861 (defarg_depfns): New static variable.
13862 (init_spew): Adjust.
13863 (add_defarg_fn): Store the type in TREE_TYPE.
13864 (do_pending_defargs): Detect and deal with ordering constraints
13866 (done_pending_defargs): New function.
13867 (unprocessed_defarg_fn): New function.
13868 (replace_defarg): Moved from decl.c. Robustify. Don't save
13869 if circularity detected.
13871 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13873 * pt.c (unify): Check array has a domain, before checking
13874 whether it is variable sized.
13876 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13878 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13879 parameters with pointers to arrays of unknown bound.
13881 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13883 * parse.y (template_parm_header, template_spec_header): New
13884 reductions. Split out from ...
13885 (template_header): ... here. Use them.
13886 (template_template_parm): Use template_parm_header.
13887 * semantics.c (finish_template_template_parm): Add assert.
13889 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13891 * mangle.c (write_builtin_type): Fix thinko.
13893 * pt.c (copy_default_args_to_explicit_spec_1): New function.
13894 (copy_default_args_to_explicit_spec): Likewise.
13895 (check_explicit_specialization): Use it.
13897 * class.c (finish_struct_1): Remove last argument in call to
13898 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13899 * decl.c (builtin_function): Likewise.
13900 (build_cp_library_fn): Likewise.
13901 (check_initializer): Likewise.
13902 (make_rtl_for_nonlocal_decl): Likewise.
13903 (cp_finish_decl): Likewise.
13904 (start_function): Likewise.
13905 * decl2.c (finish_anon_union): Likewise.
13906 * friend.c (do_friend): Likewise.
13907 * init.c (build_java_class_ref): Likewise.
13908 * method.c (make_thunk): Likewise.
13909 * pt.c (tsubst_friend_function): Likewise.
13910 * semantics.c (expand_body): Likewise.
13912 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13914 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13915 looking at DECL_CLONED_FUNCTION for non-functions.
13917 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13919 * error.c (dump_template_parameter): Use parm to determine how
13920 to print default value.
13922 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13924 * class.c (duplicate_tag_error): Clear more flags.
13926 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13928 * call.c (build_new_method_call): Use binfo_for_vbase.
13930 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
13932 * cp-tree.h (flag_cond_mismatch): Don't declare.
13933 * decl2.c (flag_cond_mismatch): Don't define.
13934 (lang_f_options): Remove cond-mismatch.
13935 (unsupported_options): Add cond-mismatch.
13937 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
13939 * class.c (handle_using_decl): Reject using of constructor name
13940 of sourcing class. Allow injecting of a method with same name as
13941 nested class. Fixup error messages.
13943 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
13945 * decl2.c (lang_decode_option): Handle -Wformat=2.
13947 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13949 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13950 initialized_in_class.
13951 (DECL_DEFINED_IN_CLASS_P): Rename to ...
13952 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13953 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13954 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13955 * pt.c (check_default_tmpl_args): Adjust for
13956 DECL_INITIALIZED_IN_CLASS_P.
13957 (instantiate_class_template): Likewise.
13958 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13960 * class.c (finish_struct): Constify saved_filename.
13962 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13964 * class.c (duplicate_tag_error): Adjust diagnostic.
13965 (finish_struct): Locally set location to start of struct.
13966 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13968 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13970 * decl.c (struct binding_level): Adjust class_shadowed comments
13971 to reflect reality.
13972 (push_class_level_binding): Adjust comments to reflect reality.
13973 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13974 Don't set TREE_VALUE on the class_shadowed list.
13976 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13978 * decl2.c (acceptable_java_type): Allow references too.
13979 * init.c (build_java_class_ref): When using the new ABI, search
13980 `class$' and have it mangled with `mangle_decl.'
13981 * mangle.c (write_java_integer_type_codes): New function.
13982 (write_builtin_type): Detect and mangle Java integer and real
13985 2001-01-07 Mark Mitchell <mark@codesourcery.com>
13987 * decl2.c (grokfield): Don't accept `asm' specifiers for
13988 non-static data members.
13990 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13992 * expr.c (cplus_expand_expr): Don't reset `target'.
13994 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
13996 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13998 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14000 * parse.y (template_datadef): Check for error_mark_node.
14002 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14004 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14006 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14008 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14009 (record_builtin_type): Make non-static.
14010 (flag_short_double): Don't declare.
14011 (init_decl_processing): Remove the creation of many tree nodes now
14012 in c_common_nodes_and_builtins.
14013 (build_void_list_node): New function.
14014 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14015 * cp-tree.h (flag_short_wchar): Don't declare.
14017 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14019 * call.c (build_conv): Don't use build1 for USER_CONV.
14020 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14022 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14024 * lex.c (lang_init): Call c_common_lang_init.
14026 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14028 * search.c (lookup_fnfields_here): Remove.
14029 (look_for_overrides_r): Use lookup_fnfields_1.
14030 Ignore functions from using declarations.
14032 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14034 Implement exceptions specifiers for implicit member functions.
14035 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14036 * method.c (synthesize_exception_spec): New function.
14037 (locate_dtor, locate_ctor, locate_copy): New functions.
14038 (implicitly_declare_fn): Generate the exception spec too.
14039 * search.c (check_final_overrider): Check artificial functions
14041 * typeck2.c (merge_exception_specifiers): New function.
14043 2001-01-03 Jason Merrill <jason@redhat.com>
14045 * init.c (build_default_init): New fn.
14046 (perform_member_init): Split out from here.
14047 (build_new_1): Use it. Simplify initialization logic.
14048 (build_vec_init): Take an array, rather than a pointer and maxindex.
14049 Speed up simple initializations. Don't clean up if we're assigning.
14050 * cp-tree.h: Adjust.
14051 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14052 * parse.y (new_initializer): Return void_zero_node for ().
14053 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14054 * typeck2.c (digest_init): Only complain about user-written
14057 2000-12-22 Mike Stump <mrs@wrs.com>
14059 * decl2.c: (max_tinst_depth): Increase to 50.
14061 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14063 * class.c (invalidate_class_lookup_cache): Zero the
14064 previous_class_values.
14065 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14067 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14068 * decl.c (free_bindings): New variable.
14069 (push_binding): Don't create a new binding if we have one on the
14071 (pop_binding): Put old bindings on the free list.
14072 (init_decl_processing): Use size_int, not build_int_2.
14073 Register free_bindings as a GC root.
14074 (cp_make_fname_decl): Use size_int, not build_int_2.
14075 (push_inline_template_parms_recursive): Likewise.
14076 (end_template_parm_list): Likewise.
14077 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14078 (tsubst_template_parms): Use size_int, not build_int_2.
14079 (tsubst): Likewise.
14080 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14082 2001-01-02 Richard Henderson <rth@redhat.com>
14084 * parse.y (asm): Set ASM_INPUT_P.
14086 2001-01-02 Jason Merrill <jason@redhat.com>
14088 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14091 * typeck.c (cp_truthvalue_conversion): New fn.
14092 * cvt.c (ocp_convert): Use it.
14094 * cp-tree.h: Lose c-common.c decls.
14096 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14097 * cvt.c (convert_to_void): Use type_unknown_p.
14099 * typeck.c (strip_all_pointer_quals): Also strip quals from
14100 pointer-to-member types.
14102 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14105 * call.c (build_new_method_call): Do evaluate the object parameter
14106 when accessing a static member.
14107 * typeck.c (build_component_ref): Likewise.
14109 2001-01-02 Andreas Jaeger <aj@suse.de>
14111 * decl.c (cp_missing_noreturn_ok_p): New.
14112 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14114 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14116 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14118 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14120 * class.c (pushclass): Remove #if 0'd code.
14121 * cp-tree.h (overload_template_name): Remove.
14122 * decl.c (store_bindings): Simplify.
14123 (pop_from_top_level): Likewise.
14124 * pt.c (overload_template_name): Remove.
14125 (instantiate_decl): Don't call push_to_top_level if it's not
14128 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14130 * pt.c (register_local_specialization): Don't return a value.
14131 (lookup_template_class): Use move-to-front heuristic when looking
14132 up template instantiations.
14133 (instantiate_decl): Only push_to_top_level when we're actually
14134 going to instantiate the template.
14136 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14138 * search.c (binfo_for_vtable): Return least derived class, not
14139 most. Handle secondary vtables.
14141 2000-12-22 Jason Merrill <jason@redhat.com>
14143 * pt.c (more_specialized): Don't optimize len==0.
14144 (fn_type_unification): If we're adding the return type, increase len.
14146 * typeck.c (build_binary_op): Fix pmf comparison logic.
14148 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14149 DECL_STATIC_FUNCTION_P.
14151 * semantics.c (genrtl_finish_function): Don't try to jump to
14152 return_label unless it exists.
14154 In partial ordering for a call, ignore parms for which we don't have
14156 * call.c (joust): Pass len to more_specialized.
14157 (add_template_candidate_real): Strip 'this', pass len.
14158 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
14159 (get_bindings_order): New fn. Pass len down.
14160 (get_bindings_real): Strip 'this', pass len.
14161 (fn_type_unification): Likewise.
14162 (type_unification_real): Succeed after checking 'len' args.
14163 (most_specialized_instantiation): Lose explicit_args parm.
14164 * class.c (resolve_address_of_overloaded_function): Strip 'this',
14167 2000-12-21 Jason Merrill <jason@redhat.com>
14169 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14170 DECL_TEMPLATE_RESULT.
14172 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14173 lookup_fnfields_here.
14175 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14177 * call.c (build_object_call): Also allow conversions that return
14178 reference to pointer to function.
14179 (add_conv_candidate): Handle totype being ref to ptr to fn.
14180 (build_field_call): Also allow members of type reference to function.
14181 Lose support for calling pointer to METHOD_TYPE fields.
14183 * error.c (dump_expr): Handle *_CAST_EXPR.
14185 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14187 * tree.c (break_out_cleanups): Lose.
14188 * cp-tree.h: Remove prototype.
14189 * typeck.c (build_component_ref): Don't break_out_cleanups.
14190 (build_compound_expr): Likewise.
14191 * semantics.c (finish_expr_stmt): Likewise.
14193 2000-12-20 Richard Henderson <rth@redhat.com>
14195 * cp-tree.h: Update declarations.
14196 * decl.c (finish_case_label): Return the new stmt node.
14197 * semantics.c (finish_goto_stmt): Likewise.
14198 (finish_expr_stmt, finish_return_stmt): Likewise.
14199 (finish_break_stmt, finish_continue_stmt): Likewise.
14200 (finish_asm_stmt): Likewise.
14201 * parse.y (already_scoped_stmt): Set STMT_LINENO.
14202 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14203 (simple_if, simple_stmt): Return the new stmt node.
14204 (save_lineno): New.
14206 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
14208 * cp-tree.h: Don't declare warn_long_long.
14210 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14212 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14215 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14217 * pt.c (unify): Handle when both ARG and PARM are
14218 BOUND_TEMPLATE_TEMPLATE_PARM.
14220 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14222 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14223 DECL_TEMPLATE_PARM_P.
14225 2000-12-15 Jason Merrill <jason@redhat.com>
14227 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
14229 * init.c (build_new_1): Don't strip quals from type.
14231 * decl.c (pushdecl): Don't check for linkage on a non-decl.
14233 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14235 * call.c (build_new_function_call): Lose space before paren in
14237 (build_new_method_call): Likewise.
14239 * typeck2.c (build_m_component_ref): Propagate quals from datum.
14241 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14243 * pt.c (check_explicit_specialization): Propagate default
14244 function arguments to explicit specializations.
14246 2000-12-13 DJ Delorie <dj@redhat.com>
14248 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14251 2000-12-08 Jason Merrill <jason@redhat.com>
14253 * error.c (dump_function_name): Don't let the user see __comp_ctor.
14255 Clean up copy-initialization in overloading code.
14256 * call.c (build_user_type_conversion_1): Die if we are asked to
14257 convert to the same or a base type.
14258 (implicit_conversion): Avoid doing so. Lose reference binding code.
14259 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14260 direct-initialization. Also do direct-init part of copy-init.
14261 (build_user_type_conversion): Don't provide context to convert_like.
14262 * cvt.c (ocp_convert): build_user_type_conversion will now provide
14263 the constructor call for copy-init.
14265 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14266 instantiation of a member template.
14267 (do_decl_instantiation): Not here.
14269 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14271 * class.c (check_field_decls): Don't special case anonymous
14272 fields in error messages.
14273 (note_name_declared_in_class): Use %D on diagnostic.
14275 * tree.c (pod_type_p): Use strip_array_types.
14276 (cp_valid_lang_attribute): Likewise.
14277 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14278 multiple evaluations.
14279 (cp_has_mutable_p): Use strip_array_types.
14281 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14283 * cp-tree.h (sufficient_parms_p): Declare new function.
14284 * call.c (sufficient_parms_p): New function, broken out of ...
14285 (add_function_candidate): ... here. Use it.
14286 (add_conv_candidate): Use it.
14287 * decl.c (grok_ctor_properties): Use it.
14289 2000-12-07 Jakub Jelinek <jakub@redhat.com>
14291 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14293 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
14295 * decl2.c (lang_decode_option): Handle -Wformat-security.
14297 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14299 * pt.c (verify_class_unification): New function.
14300 (get_class_bindings): Use it.
14301 (try_class_unification): Tidy.
14302 (unify): Handle when argument of a template-id is not
14303 template parameter dependent.
14304 (template_args_equal): Handle when TREE_CODE's do not match.
14306 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
14308 * lang-specs.h (c++): When invoking the stand-alone preprocessor
14309 for -save-temps, pass all relevant -Defines to it, and then don't
14310 pass them to cc1plus.
14312 2000-12-05 Will Cohen <wcohen@redhat.com>
14314 * decl.c (finish_case_label): Cleared
14315 more_cleanups_ok in surrounding function scopes.
14316 (define_label): Likewise.
14318 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14320 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14321 (get_matching_virtual): Remove.
14322 (look_for_overrides): Declare new function.
14323 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14325 * class.c (check_for_override): Move base class iteration code
14326 to look_for_overrides.
14327 * search.c (next_baselink): Remove.
14328 (get_virtuals_named_this): Remove.
14329 (get_virtual_destructor): Remove.
14330 (tree_has_any_destructors_p): Remove.
14331 (struct gvnt_info): Remove.
14332 (check_final_overrider): Remove `virtual' from error messages.
14333 (get_matching_virtuals): Remove. Move functionality to ...
14334 (look_for_overrides): ... here, and ...
14335 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14338 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14340 * typeck.c (get_delta_difference): If via a virtual base,
14342 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14345 2000-12-04 Richard Henderson <rth@redhat.com>
14347 * error.c (dump_tree): Use output_add_string not OB_PUTS.
14349 2000-12-04 Jason Merrill <jason@redhat.com>
14351 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14352 (write_builtin_type): Pass intSI_type_node and the like through
14354 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14355 Pass intSI_type_node and the like through type_for_mode.
14356 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14357 * pt.c (tsubst, unify): Likewise.
14358 * tree.c (walk_tree): Likewise.
14359 * error.c (dump_type): Likewise.
14360 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14362 * Make-lang.in: Tweak top comment for emacs.
14363 (cp/TAGS): Restore.
14365 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14367 * class.c (clone_function_decl): Robustify.
14369 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
14371 * decl.c (store_bindings): Only search in the non modified
14372 old_bindings for duplicates.
14374 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
14376 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14377 TYPE_POLYMORPHIC_P.
14379 * typeck.c (build_static_cast): Remove unused variable.
14381 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14383 * pt.c: Fix typo in comment.
14385 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14387 * decl2.c (warn_format): Remove definition.
14388 (lang_decode_option): Handle -Wformat-nonliteral,
14389 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
14391 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14393 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14394 (init_decl_processing): Don't create string_type_node,
14395 const_string_type_node, wint_type_node, intmax_type_node,
14396 uintmax_type_node, default_function_type, ptrdiff_type_node and
14397 unsigned_ptrdiff_type_node. Adjust position of call to
14398 c_common_nodes_and_builtins.
14399 (identifier_global_value): New function.
14401 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
14403 * call.c (standard_conversion): Reject pointer to member
14404 conversions from ambiguous, inaccessible or virtual bases.
14405 * typeck.c (build_static_cast): Don't check pointers to members
14408 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14410 * method.c (do_build_copy_constructor): Preserve cv
14411 qualifications when accessing source object members.
14412 (do_build_assign_ref): Likewise. Remove separate diagnostics for
14415 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14417 * method.c (do_build_assign_ref): Construct appropriately
14418 CV-qualified base reference. Don't allow const casts in base
14421 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14423 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14424 incomplete return type.
14426 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14428 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14429 * semantics.c (finish_base_specifier): Accept a _TYPE not a
14432 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14434 * spew.c (yyerror): Cope if yylval.ttype is NULL.
14436 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14438 * decl.c (grokdeclarator): Diagnose undefined template contexts.
14440 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14442 * decl.c (grokdeclarator): Do type access control on friend
14445 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14447 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14448 bison parser ickiness.
14449 * pt.c (tsubst_friend_function): Enter namespace scope when
14450 tsubsting the function name.
14451 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14453 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14455 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14456 * cvt.c (cp_convert_to_pointer): Add force parameter.
14457 Allow conversions via virtual base if forced.
14458 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14459 (ocp_convert): Likewise.
14460 * search.c (binfo_from_vbase): Return the virtual base's binfo.
14461 * typeck.c (get_delta_difference): Adjust handling of virtual
14464 2000-11-26 Mark Mitchell <mark@codesourcery.com>
14466 * tree.c (struct list_hash): Remove.
14467 (list_hash_table): Make it be an htab.
14468 (struct list_proxy): New type.
14469 (list_hash_eq): New function.
14470 (list_hash_pieces): Renamed from ...
14471 (list_hash): ... this.
14472 (list_hash_lookup): Remove.
14473 (list_hash_add): Remove.
14474 (hash_tree_cons): Use the generic hashtable.
14475 (mark_list_hash): Remove.
14476 (init_tree): Create the hashtable.
14478 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
14480 * method.c (build_mangled_C9x_name): Rename to
14481 build_mangled_C99_name. Change C9X references in comments to
14484 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14486 * parse.y (unary_expr): Move VA_ARG from here ...
14487 (primary): ... to here.
14489 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14491 * semantics.c (finish_id_expr): If type is error_mark, return
14494 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
14496 * pt.c (lookup_template_class): Simplify loop exit constructs.
14497 Cope when there is no partial instantiation of a template
14500 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
14502 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14504 2000-11-22 Mark Mitchell <mark@codesourcery.com>
14506 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14509 * pt.c (do_decl_instantiate): Explicitly clone constructors and
14510 destructors that haven't already been cloned.
14512 2000-11-20 Richard Henderson <rth@redhat.com>
14514 * parse.y (yyparse_1): Rename the parser entry point.
14516 2000-11-20 Alex Samuel <samuel@codesourcery.com>
14518 * mangle.c (write_name): Use <unscoped-name> for names directly in
14520 (write_unscoped_name): Accept names directly in function scope.
14522 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
14524 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14525 * parse.y (extdef): Add EXPORT reduction.
14526 * spew.c (yylex): Don't skip export here.
14528 2000-11-19 Mark Mitchell <mark@codesourcery.com>
14530 * decl.c (init_decl_processing): Correct name of pure virtual
14531 function under the new ABI.
14532 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14533 (throw_bad_typeid): Likewise for bad typeid function.
14535 2000-11-18 Mark Mitchell <mark@codesourcery.com>
14537 * decl.c (grokparms): Don't even function types of `void' type,
14539 * mangle.c (write_type): Don't crash when confronted with the
14542 * decl.c (grokparms): Don't create parameters of `void' type.
14544 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
14546 * lex.c (mark_impl_file_chain): Delete.
14547 (init_parse): Remove call to ggc_add_string_root. No need to
14548 ggc_strdup a string constant. Do not add impl_file_chain to GC
14550 (handle_pragma_implementation): No need to ggc_strdup main_filename.
14552 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14554 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14556 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14558 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14559 * decl.c (grokdeclarator): Don't reject void parms here.
14560 (require_complete_types_for_parms): Simplify, use
14561 complete_type_or_else.
14562 (grokparms): Remove bitrot. Remove funcdef parm.
14563 Deal with ellipsis parm lists here.
14564 * semantics.c (finish_parmlist): Don't append void_list_node
14565 here. Set PARMLIST_ELLIPSIS_P.
14567 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14569 * typeck2.c (incomplete_type_error): Reorganize to avoid
14570 excessive diagnostics.
14572 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
14574 * lex.c (struct impl_files, internal_filename): Constify a char *.
14576 2000-11-16 Mark Mitchell <mark@codesourcery.com>
14578 * mangle.c (write_special_name_constructor): Don't generate
14579 assembler junk when confronted with an old-style constructor.
14580 (write_special_name_destructor): Likewise.
14581 (mangle_decl_string): Do it here instead.
14583 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
14585 * call.c (op_error): Make error messages clearer.
14587 2000-11-15 Mark Mitchell <mark@codesourcery.com>
14589 * decl.c (wrapup_globals_for_namespace): Don't mark things
14590 TREE_ASM_WRITTEN when they're not.
14592 2000-11-15 Jason Merrill <jason@redhat.com>
14594 * typeck2.c (friendly_abort): Uncount the error before handing
14595 off to fancy_abort.
14597 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
14599 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14601 2000-11-14 Mark Mitchell <mark@codesourcery.com>
14603 * class.c (build_vtbl_initializer): Fix typo in comment.
14604 * typeck.c (expr_sizeof): Don't crash on errors.
14606 2000-11-14 Jim Wilson <wilson@redhat.com>
14608 * lang-specs.h: Add %2 after %(cc1_options).
14610 2000-11-14 Richard Henderson <rth@redhat.com>
14612 * typeck.c (c_sizeof): Be strict about casting result value
14613 back to c_size_type_node.
14614 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14616 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
14618 * typeck.c (build_unary_op): Use boolean_increment from
14619 c-common.c, moving the relevant code there.
14621 2000-11-11 Jason Merrill <jason@redhat.com>
14623 * typeck.c (mark_addressable): Don't call put_var_into_stack.
14625 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14628 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14630 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14631 * lex.c (copy_lang_decl): Likewise.
14633 2000-11-09 Mark Mitchell <mark@codesourcery.com>
14635 * dump.c (cp_dump_tree): Don't dump function bodies here.
14637 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14638 (dump.o): Update dependency list.
14639 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14640 (flag_dump_translation_unit): Likewise.
14641 (CP_TYPE_QUALS): Adjust definition.
14642 (DECL_C_BIT_FIELD): Remove.
14643 (SET_DECL_C_BIT_FIELD): Likewise.
14644 (CLEAR_DECL_C_BIT_FIELD): Likewise.
14645 (add_maybe_template): Likewise.
14646 (strip_array_types): Likewise.
14647 (dump_node_to_file): Likewise.
14648 (cp_dump_tree): New function.
14649 * decl.c (init_decl_processing): Set lang_dump_tree.
14650 * decl2.c (flag_dump_translation_unit): Remove.
14651 * dump.c: Move most of it to ../c-dump.c.
14652 (cp_dump_tree): New function.
14653 * pt.c (add_maybe_template): Remove.
14654 * typeck.c (strip_array_types): Likewise.
14656 2000-11-07 Eric Christopher <echristo@redhat.com>
14658 * decl.c (init_decl_processing): Change definition of
14659 __wchar_t to wchar_t. Remove artificial declaration of
14661 * lex.c: Change instances of __wchar_t to wchar_t.
14663 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
14665 * lex.c (do_identifier): Don't lookup_name for operators.
14666 * parse.y (operator): Save looking_for_typename.
14667 (unoperator): Restore it.
14668 * spew.c (frob_opname): Use nth_token for lookahead.
14670 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
14672 * decl.c (grok_op_properties): Always use coerce_new_type and
14673 coerce_delete_type.
14674 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14675 exception specification. Tidy up.
14676 (coerce_delete_type): Preserve exception specification. Tidy up.
14678 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
14680 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14681 (push_binding_level), error.c (cp_tree_printer), pt.c
14682 (process_partial_specialization, tsubst_template_arg_vector),
14683 search.c (lookup_member): Use memset () instead of bzero ().
14685 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
14687 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14689 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
14691 * Make-lang.in (c++.distdir): Remove.
14693 2000-11-04 Mark Mitchell <mark@codesourcery.com>
14695 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14696 declarations from different namespaces to be combined.
14698 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
14700 * decl.c: Include tm_p.h.
14702 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
14704 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14706 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
14708 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14709 (build_overload_value), repo.c (open_repo_file), xref.c
14710 (open_xref_file): Use strchr () and strrchr () instead of index ()
14713 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
14715 * call.c (build_over_call): Call fold on the CALL_EXPR.
14717 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
14719 * error.c (dump_template_decl): Separate template hearders with
14722 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
14724 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
14725 TS_* flags with corresponding TFF_*. Adjust prototypes of
14726 functions (which used to take a tree_string_flags) to take an int.
14728 * cp-tree.h (enum tree_string_flags): Remove
14729 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14730 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14731 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14732 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14733 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14734 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14735 (type_as_string, decl_as_string, expr_as_string,
14736 context_as_string): Adjust prototype.
14738 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14739 instead of TS_PLAIN.
14741 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14742 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14745 2000-10-30 Mark Mitchell <mark@codesourcery.com>
14747 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14748 (linkage_kind): New enumeration.
14749 (decl_linkage): New function.
14750 * decl2.c (comdat_linkage): Extend comment.
14751 * error.c (dump_function_decl): Print the arguments used to
14752 instantiate a template, even when not printing the type of the
14754 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14755 not TREE_PUBLIC, to test for external linkage.
14756 * tree.c (decl_linkage): New function.
14758 2000-10-28 Mark Mitchell <mark@codesourcery.com>
14760 * pt.c (instantiate_decl): Always instantiate static data members
14761 initialized in-class.
14763 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
14765 * Make-lang.in: Move all build rules here from Makefile.in,
14766 adapt to new context. Wrap all rules that change the current
14767 directory in parentheses. Expunge all references to $(P).
14768 When one command depends on another and they're run all at
14769 once, use && to separate them, not ;. Add OUTPUT_OPTION to
14770 all object-file generation rules. Delete obsolete variables.
14772 * Makefile.in: Delete.
14773 * config-lang.in: Delete outputs= line.
14775 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
14777 * error.c (dump_function_decl): Print no space between
14778 `ptr-operator' the `type-specifier' of the return type.
14779 (dump_type_prefix): Make sure we put space at the appropriate
14782 2000-10-23 Jason Merrill <jason@redhat.com>
14784 * call.c (equal_functions): Also call decls_match for extern "C" fns.
14786 2000-10-22 Jason Merrill <jason@redhat.com>
14788 * call.c (build_conditional_expr): Use ocp_convert to force
14791 2000-10-22 Mark Mitchell <mark@codesourcery.com>
14793 * call.c (standard_conversion): Use RVALUE_CONVs for all
14794 expressions that satisfy lvalue_p, not just those that satisfy
14797 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14799 * typeck.c (c_sizeof): Return an expression of `size_t' type,
14800 not one with TYPE_IS_SIZETYPE set.
14801 (dubious_conversion_warnings): Remove special-case code.
14803 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
14805 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14806 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14807 (dump_type_prefix): Print vector-of-int as 'int vector'.
14808 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14809 * tree.c (walk_tree): Handle VECTOR_TYPE.
14811 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14813 2000-10-21 Jason Merrill <jason@redhat.com>
14815 * parse.y (operator): Set got_object from got_scope.
14816 Set looking_for_typename.
14817 * decl.c (lookup_name_real): Clear val after setting from_obj.
14818 Reorganize diagnostic.
14820 2000-10-20 Jason Merrill <jason@redhat.com>
14822 * tree.c (walk_tree): Don't walk into default args.
14824 * error.c (dump_expr): Use host_integerp.
14826 2000-10-20 David Edelsohn <edelsohn@gnu.org>
14828 * typeck2.c (abstract_virtuals_error): Use "because" instead of
14829 "since" in error message.
14831 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14833 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14835 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
14837 * decl.c (revert_static_member_fn): Fixed typo.
14839 2000-10-19 Mark Mitchell <mark@codesourcery.com>
14841 * class.c (subobject_offset_fn): New type.
14842 (dfs_record_base_offsets): Remove.
14843 (record_base_offsets): Likewise.
14844 (dfs_search_base_offsets): Likewise.
14845 (record_subobject_offset): New function.
14846 (check_subobject_offset): Likewise.
14847 (walk_subobject_offsets): Likewise.
14848 (record_subobject_offsets): Likewise.
14849 (layout_conflict_p): Reimplement.
14850 (layout_nonempty_base_or_field): Correct handling of type
14851 conflicts during layout.
14852 (layout_empty_base): Likewise.
14853 (build_base_field): Adjust to handle new representation of empty
14855 (build_base_fields): Likewise.
14856 (layout_virtual_bases): Likewise.
14857 (splay_tree_compare_integer_csts): New function.
14858 (layout_class_type): Use a splay_tree, rather than a varray, to
14859 represent the offsets of empty bases.
14861 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14862 * decl.c (select_decl): Don't return declarations that are
14865 2000-10-18 Mark Mitchell <mark@codesourcery.com>
14867 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14868 (fake_std_node): New macro.
14869 * decl.c (in_std): Rename to ...
14870 (in_fake_std): ... this.
14871 (flag_no_builtin): Remove.
14872 (flag_no_nonansi_builtin): Likewise.
14873 (walk_namespaces_r): Use fake_std_node.
14874 (push_namespace): Use std_identifier.
14875 (pop_namespace): Use in_fake_std.
14876 (lookup_name_real): Use fake_std_node.
14877 (init_decl_processing): When -fhonor-std, create the `std'
14878 namespace. Don't create a dummy fake_std_node in that case.
14879 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
14880 (builtin_function): Put builtins whose names don't begin
14881 with `_' in the std namespace.
14882 * decl2.c (flag_no_builtin): Remove.
14883 (flag_no_nonansi_builtin): Likewise.
14884 (set_decl_namespace): Use fake_std_node.
14885 (validate_nonmember_using_decl): Likewise.
14886 (do_using_directive): Likewise.
14887 (handle_class_head): Likewise.
14888 * dump.c (dequeue_and_dump): Likewise.
14889 * except.c (init_exception_processing): Use std_identifier.
14890 * init.c (build_member_call): Use fake_std_node.
14891 * rtti.c (init_rtti_processing): Use std_identifier.
14893 2000-10-17 Mark Mitchell <mark@codesourcery.com>
14895 * cp-tree.h (back_end_hook): Remove declaration.
14896 * decl2.c (back_end_hook): Remove definition.
14898 * dump.c (dequeue_and_dump): Dump TREE_USED.
14900 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
14902 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14904 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14906 * decl.c (WINT_TYPE): Define.
14907 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14908 c_size_type_node, signed_size_type_node and wint_type_node.
14910 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14912 * decl2.c (warn_missing_format_attribute): New variable.
14913 (lang_decode_option): Decode -Wmissing-format-attribute.
14915 2000-10-16 Mark Mitchell <mark@codesourcery.com>
14917 * typeck.c (qualify_type): Remove.
14918 (composite_pointer_type): Fix handling of conversions to `cv void*'.
14920 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14922 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14924 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14926 * Makefile.in (parse.c, parse.h): Create atomically.
14928 2000-10-12 Mark Mitchell <mark@codesourcery.com>
14930 * class.c (current_obstack): Remove.
14931 * decl.c (ggc_p): Remove.
14932 (start_decl): Don't use decl_tree_cons.
14933 (grokdeclarator): Don't use build_decl_list.
14934 (start_function): Don't use decl_tree_cons.
14935 (finish_function): Don't mess with obstacks.
14936 * decl2.c (grok_x_components): Don't use build_decl_list.
14937 * lex.c (make_call_declarator): Don't call decl_tree_cons.
14938 (implicitly_declare_fn): Don't call build_decl_list.
14939 * parse.y (frob_specs): Don't call build_decl_list or
14941 (expr_or_declarator_intern): Don't call decl_tree_cons.
14942 (primary): Don't call build_decl_list.
14943 (fcast_or_absdcl): Likewise.
14944 (typed_declspecs): Don't call decl_tree_cons.
14945 (reserved_declspecs): Don't call build_decl_list.
14946 (declmods): Likewise.
14947 (reserved_typespecquals): Likewise.
14949 (new_type_id): Likewise.
14950 (cv_qualifiers): Likewise.
14951 (after_type_declarator_intern): Likewise.
14952 (notype_declarator_intern): Likewise.
14953 (absdcl_intern): Likewise.
14954 (named_parm): Likewise.
14955 * pt.c (most_specialized_class): Likewise.
14956 * repo.c (temporary_obstack): Make it a structure, not a pointer.
14957 (init_repo): Initialize it.
14958 * search.c (current_obstack): Remove.
14959 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14961 2000-10-09 Richard Henderson <rth@cygnus.com>
14963 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14964 (c++ language support bits for libgcc): Remove.
14965 (c++.clean): Remove cplib2.txt cleanup.
14966 * config-lang.in (headers, lib2funcs): Remove.
14968 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14969 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14970 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14971 * inc/new.h, inc/typeinfo: Remove files.
14973 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
14975 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14977 (init_decl_processing): Initialize intmax_type_node and
14980 2000-10-06 Richard Henderson <rth@cygnus.com>
14982 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14983 (original_result_rtx): Remove.
14984 * decl.c (save_function_data): Don't clear x_result_rtx.
14985 (mark_lang_function): Don't mark it either.
14986 * expr.c (fixup_result_decl): Remove.
14987 * semantics.c (genrtl_named_return_value): Frob the return decl
14988 before calling emit_local_var.
14989 (genrtl_finish_function): Don't call fixup_result_decl.
14990 Always emit the jump to return_label.
14992 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
14994 * pt.c (lookup_template_class): Set current access for enum.
14995 (tsubst_enum): Set file & line for enum decl.
14997 * spew.c (yylex): Remove unused variable.
14999 2000-10-05 Richard Henderson <rth@cygnus.com>
15001 * semantics.c (genrtl_finish_function): Don't init or check
15002 can_reach_end; remove noreturn and return value checks.
15004 2000-10-05 Tom Tromey <tromey@cygnus.com>
15006 * init.c (build_java_class_ref): Use `build_static_name' with a
15007 suffix, not a prefix, to build the class object's name.
15009 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15011 * cp-tree.h (access_kind): Fix comment typo.
15012 * decl2.c (grokfield): Fix diagnostic typo.
15013 * semantics.c (finish_template_type): Fix comment typo.
15014 (finish_qualified_object_call_expr): Likewise.
15016 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15018 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15021 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15023 * spew.c (frob_id): New static function.
15024 (frob_opname): Use it.
15027 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15029 * decl.c (lang_mark_false_label_stack): Remove.
15030 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15032 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15034 * gxxint.texi: Use @email for formatting email addresses.
15036 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15038 * error.c: Remove direct obstack manipulation. Replace with
15039 output_buffer-based formatting. Adjust calls to removed macros.
15040 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15041 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15042 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15044 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15046 * ir.texi: Move to ../c-tree.texi.
15048 2000-09-20 Jason Merrill <jason@redhat.com>
15050 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15052 2000-09-21 Andreas Jaeger <aj@suse.de>
15054 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15055 * cp-tree.h: ... here.
15057 * error.c: Remove declaration of cp_printer.
15059 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15061 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15063 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15065 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15068 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15070 * decl.c (start_function): Robustify.
15072 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15074 * cp-tree.h (check_function_format): Accept a `status' parameter.
15076 * call.c, typeck.c: Updates calls to `check_function_format'.
15078 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15080 * decl2.c (handle_class_head): Always push some scope even
15083 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15085 * cp-tree.h (struct cp_language_function): Remove
15086 x_scope_stmt_stack and name_declared.
15087 (current_scope_stmt_stack): Remove.
15088 (function_name_declared_p): New macro.
15089 (struct lang_decl_flags): Use c_lang_decl as a base class.
15091 (struct lang_decl): Replace saved_tree with context.
15092 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15093 (SET_DECL_FRIEND_CONTEXT): Likewise.
15094 (DECL_VIRTUAL_CONTEXT): Likewise.
15095 (DECL_SAVED_TREE): Remove.
15096 (C_DECLARED_LABEL_FLAG): Likewise.
15097 (cplus_expand_expr_stmt): Don't declare.
15098 (add_decl_stmt): Likewise.
15099 (add_scope_stmt): Likewise.
15100 * decl.c (mark_stmt_tree): Remove.
15101 (case_compare): Likewise.
15102 (finish_case_label): Use c_add_case_label.
15103 (init_decl_processing): Set more language-specific hooks.
15104 (build_enumerator): Fix typo in comment.
15105 (cplus_expand_expr_stmt): Remove.
15106 (mark_lang_function): Use mark_c_language_function.
15107 (lang_mark_tree): Use c_mark_lang_decl.
15108 * decl2.c: Change order of inclusion.
15109 * except.c: Likewise.
15110 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15111 back on c_expand_expr.
15112 * friend.c: Include expr.h.
15113 * init.c: Change order of inclusion.
15114 * Makefile.in: Update dependencies.
15115 * lex.h (free_lang_decl_chain): Remove.
15116 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15117 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15119 (instantiate_decl): Use function_name_declared_p.
15120 * semantics.c (lang_expand_expr_stmt): Remove.
15121 (set_current_function_name_declared): Likewise.
15122 (current_function_name_declared): Likewise.
15123 (begin_compound_stmt): Use function_name_declared_p.
15124 (add_decl_stmt): Remove.
15125 (setup_vtbl_ptr): Use function_name_declared_p.
15126 (add_scope_stmt): Remove.
15127 (current_scope_stmt_stack): New function.
15128 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15129 (expand_body): Use function_name_declared_p.
15130 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15131 * typeck.c: Change order of includes.
15132 (convert_sequence): Remove.
15134 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15136 * lex.c (reswords): Add _Complex.
15138 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15140 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15142 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
15144 * init.c (begin_init_stmts): Don't use // comments.
15146 2000-09-12 Jason Merrill <jason@redhat.com>
15148 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15149 all non-extern arrays.
15151 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15152 typenames, too. Downgrade complaint to pedwarn.
15153 (xref_tag): Warn about surprising behavior of 'friend struct T'.
15154 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15155 'class This::Inherited'.
15157 2000-09-12 Mark Mitchell <mark@codesourcery.com>
15159 * decl.c (finish_case_label): Given the LABEL_DECL a
15162 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
15164 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15165 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15166 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15167 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15168 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15170 (sorry_for_unsupported_tree, print_scope_operator,
15171 print_left_paren, print_right_paren, print_left_bracket,
15172 print_right_bracket, print_whitespace): Likewise.
15173 (aggr_variety): Rename to class_key_or_enum.
15174 (print_type): Rename to print_type_id.
15175 (print_type_specifier_seq, print_simple_type_specifier,
15176 print_elaborated_type_specifier,
15177 print_rest_of_abstract_declarator,
15178 print_parameter_declaration_clause, print_exception_specification,
15179 print_nested_name_specifier, print_template_id,
15180 typedef_original_name, print_template_argument_list_start,
15181 print_template_argument_list_end): New functions.
15183 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15185 * ir.texi: Add more documentation.
15187 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15189 * cp-tree.h (struct saved_scope): Remove x_function_parms.
15190 (current_function_parms): Don't define.
15191 (struct cp_language_function): Remove parms_stored.
15192 (current_function_just_assigned_this): Don't define.
15193 (current_function_parms_stored): Likewise.
15194 (static_ctors): Declare.
15195 (static_dtors): Likewise.
15196 (SF_EXPAND): Don't define.
15197 (expand_start_early_try_stmts): Remove declaration.
15198 (store_parm_decls): Likewise.
15199 * decl.c (static_ctors): Don't declare.
15200 (static_dtors): Likewise.
15201 (struct binding_level): Remove this_block.
15202 (poplevel): Remove dead code.
15203 (set_block): Likewise.
15204 (mark_binding_level): Don't mark this_block.
15205 (mark_saved_scope): Don't mark x_function_parms.
15206 (init_decl_processing): Don't add current_function_parms as a GC
15208 (check_function_type): Change prototype.
15209 (start_function): Remove RTL-generation code.
15210 (expand_start_early_try_stmts): Remove.
15211 (store_parm_decls): Give it internal linkage. Remove
15212 RTL-generation code.
15213 (finish_function): Remove RTL-generation code.
15214 * decl2.c (static_ctors): Fix formatting.
15215 (static_dtors): Likewise.
15216 * method.c (use_thunk): Don't call store_parm_decls.
15217 (synthesize_method): Likewise.
15218 * optimize.c (maybe_clone_body): Likewise.
15219 * parse.y (fn.def2): Likewise.
15220 (.set_base_init): Likewise.
15221 (nodecls): Likewise.
15222 * pt.c (instantiate_decl): Likewise.
15223 * rtti.c (synthesize_tinfo_fn): Likewise.
15224 * semantics.c (genrtl_try_block): Simplify.
15225 (expand_body): Use genrtl_start_function and
15226 genrtl_finish_function.
15227 (genrtl_start_function): New function.
15228 (genrtl_finish_function): Likewise.
15230 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15232 * error.c (cp_tree_printer, case 'P'): Append break.
15234 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15236 * cp-tree.h (frob_opname): Declare.
15237 * parse.y (saved_scopes): New static variable.
15238 (cp_parse_init): Adjust.
15239 (do_id): If lastiddecl is NULL, do do_identifier.
15240 (operator): Save scope information.
15241 (unoperator): New reduction. Restore scope information.
15242 (operator_name): Append unoperator. Call frob_opname.
15243 * spew.c (frob_opname): Define.
15245 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
15247 * decl.c, rtti.c: Include defaults.h if not already included.
15248 Don't define the *_TYPE_SIZE macros.
15250 2000-09-09 Mark Mitchell <mark@codesourcery.com>
15252 * cp-tree.h (push_switch): Change prototype.
15253 (check_cp_case_value): Remove declaration.
15254 (decl_constant_value): Likewise.
15255 * decl.c (struct cp_switch): Add switch_stmt and cases.
15256 (case_compare): New function.
15257 (push_switch): Set switch_stmt. Initialize cases.
15258 (pop_switch): Clean up cases.
15259 (define_case_label): Rename to ...
15260 (finish_case_label): ... this. Do semantic analysis for case
15262 (start_function): Correct comment.
15263 * decl2.c (check_cp_case_value): Remove.
15264 * expr.c (do_case): Remove.
15265 * pt.c (tsubst_expr): Adjust call to finish_case_label.
15266 * semantics.c (genrtl_do_poplevel): Remove declaration.
15267 (RECHAIN_STMTS): Remove.
15268 (finish_break_stmt): Use build_break_stmt.
15269 (finish_continue_stmt): Use build_continue_stmt.
15270 (finish_switch_cond): Adjust condition here, rater than in
15271 c_expand_start_case.
15272 (finish_case_label): Remove.
15273 * typeck.c (c_expand_return): Remove.
15274 (c_expand_start_case): Likewise.
15276 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
15278 * ir.texi: Document type nodes.
15280 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15282 * cp-tree.h (init_cp_semantics): Declare.
15283 (genrtl_try_block): Don't declare.
15284 (genrtl_handler): Likewise.
15285 (genrtl_catch_block): Likewise.
15286 (genrtl_ctor_stmt): Likewise.
15287 (genrtl_subobject): Likewise.
15288 (genrtl_do_poplevel): Likewise.
15289 (genrtl_named_return_value): Likewise.
15290 * lex.c (init_parse): Call init_cp_semantics.
15291 * semantics.c (genrtl_try_block): Give it internal linkage.
15292 (genrtl_handler): Likewise.
15293 (genrtl_catch_block): Likewise.
15294 (genrtl_ctor_stmt): Likewise.
15295 (genrtl_subobject): Likewise.
15296 (genrtl_do_poplevel): Likewise.
15297 (genrtl_named_return_value): Likewise.
15298 (lang_expand_stmt): Rename to ...
15299 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
15300 (init_cp_semantics): Define.
15302 * decl.c (initialize_local_var): Remove RTL-generating code.
15303 * semantics.c (genrtl_try_block): Fix formatting.
15305 Move statement-tree facilities from C++ to C front-end.
15306 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15307 (void_zero_node): Remove.
15308 (stmt_tree): Likewise.
15309 (scope_chain): Adjust.
15310 (language_function): Rename to cp_language_function.
15311 (cp_function_chain): Adjust.
15312 (current_stmt_tree): Remove.
15313 (last_tree): Likewise.
15314 (last_expr_type): Likewise.
15315 (struct lang_decl): Adjust.
15316 (STMT_IS_FULL_EXPR_P): Remove.
15317 (add_tree): Remove.
15318 (begin_stmt_tree): Likewise.
15319 (finish_stmt_tree): Likewise.
15320 (walk_tree_fn): Likewise.
15321 (walk_stmt_tree): Likewise.
15322 * class.c (finish_struct): Replace use of add_tree with add_stmt.
15323 * decl.c (mark_stmt_tree): Adjust type.
15324 (init_decl_processing): Don't build void_zero_node.
15325 (initialize_local_var): Adjust usage of current_stmt_tree.
15326 (finish_enum): Use add_stmt, not add_tree.
15327 (save_function_data): Adjust use of language_function.
15328 (finish_constructor_body): Use add_stmt, not add_tree.
15329 (finish_destructor_body): Likewise.
15330 (push_cp_function_context): Adjust use of language_function.
15331 (pop_cp_function_context): Likewise.
15332 (mark_lang_function): Likewise.
15333 (mark_cp_function_context): Likewise.
15334 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15335 (build_vec_init): Likewise.
15336 * semantics.c (SET_LAST_STMT): Remove.
15337 (RECHAIN_STMTS): Don't use it.
15338 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15339 (current_stmt_tree): Define.
15340 (add_tree): Remove.
15341 (finish_goto_stmt): Use add_stmt, not add_tree.
15342 (finish_expr_stmt): Likewise.
15343 (begin_if_stmt): Likewise.
15344 (finish_then_clause): Likewise.
15345 (begin_while_stmt): Likewise.
15346 (begin_do_stmt): Likewise.
15347 (finish_return_stmt): Likewise.
15348 (begin_for_stmt): Likewise.
15349 (finish_break_stmt): Likewise.
15350 (finish_continue_stmt): Likewise.
15351 (begin_switch_stmt): Likewise.
15352 (finish_case_label): Likewise.
15353 (begin_try_block): Likewise.
15354 (begin_function_try_block): Likewise.
15355 (begin_handler): Likewise.
15356 (begin_catch_block): Likewise.
15357 (begin_compound_stmt): Likewise.
15358 (begin_asm_stmt): Likewise.
15359 (finish_asm_stmt): Likewise.
15360 (finish_label_stmt): Likewise.
15361 (add_decl_stmt): Likewise.
15362 (finish_subobject): Likewise.
15363 (finish_decl_cleanup): Likewise.
15364 (finish_named_return_value): Likewise.
15365 (setup_vtbl_ptr): Likewise.
15366 (add_scope_stmt): Likewise.
15367 (finish_stmt_expr): Likewise.
15368 (prune_unused_decls): Remove.
15369 (begin_stmt_tree): Likewise.
15370 (finish_stmt_tree): Likewise.
15371 (prep_stmt): Adjust use of current_stmt_tree.
15372 (lang_expand_stmt): Likewise.
15373 * tree.c (statement_code_p): Remove.
15374 (cp_statement_code_p): New function.
15375 (walk_stmt_tree): Remove.
15376 (init_tree): Set lang_statement_code_p.
15378 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
15380 Integrated preprocessor.
15382 * Make-lang.in, Makefile.in: Remove all references to input.c,
15383 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
15384 * gxx.gperf, hash.h, input.c: Delete.
15385 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15386 initialized properly.
15388 * class.c (fixup_pending_inline): Take a tree, not a
15389 struct pending_inline *. All callers changed.
15390 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15391 RID_PROTECTED entries in ridpointers[] array here.
15392 * decl.c (duplicate_decls): Do not refer to struct
15394 (record_builtin_type, init_decl_processing): Use RID_MAX not
15396 (grokdeclarator): Use C_IS_RESERVED_WORD.
15397 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15399 (grok_x_components): Do not inspect pending_inlines chain.
15401 * cp-tree.h (struct lang_identifier): Add rid_code entry.
15402 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15403 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15404 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15405 TIME_IDENTIFIER_FILEINFO): Kill.
15407 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
15408 single 32-bit word.
15409 * parse.y: Call do_pending_inlines unconditionally.
15410 reinit_parse_for_method is now snarf_method. fn.defpen is no
15411 longer necessary. Remove unnecessary <itype> annotation on
15412 SCOPE. Do not refer to end_of_file or struct pending_inline.
15413 * semantics.c (begin_inline_definitions): Call
15414 do_pending_inlines unconditionally.
15416 * lex.c: Remove all code now shared with C front end.
15417 Initialize cpplib properly if USE_CPPLIB. Put reserved words
15418 into the get_identifier table. Rewrite pragma handling to
15419 work with the registry. Move code to save tokens for later
15420 processing to spew.c.
15422 * spew.c: Rewrite everything in terms of token streams instead
15423 of text. Move routines here from lex.c / input.c as
15424 appropriate. GC-mark trees hanging off the pending inlines
15427 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15429 * NEWS: Mention that the named return value extension has been
15431 * cp-tree.h (original_result_rtx): Define.
15432 (TREE_REFERENCE_EXPR): Remove.
15433 (DECL_VPARENT): Likewise.
15434 (pushdecl_nonclass_level): Likewise.
15435 (store_return_init): Likewise.
15436 (reinit_lang_specific): Likewise.
15437 (genrtl_named_return_value): Change prototype.
15438 * decl.c (original_result_rtx): Remove.
15439 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15440 Do not generate RTL for local variables here.
15441 (store_return_init): Remove.
15442 * semantics.c (genrtl_named_return_value): Simplify. Fold in
15444 (finish_named_return_value): Adjust accordingly. Warn that this
15445 extension is deprecated.
15446 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15448 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15450 * pt.c (type_unification_real): Replace switch with if.
15451 (unify): Tsubst non-type parms before comparing.
15453 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15455 * error.c (dump_typename): New function, broken out of ...
15456 (dump_type): ... here. Use it.
15457 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15459 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15461 * init.c (build_offset_ref): Deal with namespace scoped
15464 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15466 * class.c (resolve_address_of_overloaded_function): Add
15467 explanation message.
15468 * decl.c (define_case_label): Reformat explanation.
15469 * decl2.c (finish_static_data_member_decl): Likewise.
15470 (grokfield): Likewise.
15471 * friend.c (do_friend): Likewise.
15473 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
15475 * tree.c (walk_tree): Expose tail recursion.
15476 (walk_stmt_tree): New function.
15477 * cp-tree.h: Prototype walk_stmt_tree.
15478 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15479 the BLOCKs directly. If a BLOCK has no variables after
15480 pruning, discard it.
15481 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
15482 restore the line number.
15484 2000-09-05 Mark Mitchell <mark@codesourcery.com>
15486 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15487 (pt.o): Remove dependency on HTAB_H.
15488 * cp-tree.h: Include hashtab.h.
15489 (walk_tree): Change prototype.
15490 (walk_tree_without_duplicates): New function.
15491 * decl.c (check_default_argument): Use it.
15492 * optimize.c (remap_decl): Adjust calls to walk_tree.
15493 (copy_body): Likewise.
15494 (expand_calls_inline): Likewise.
15495 (calls_setjmp_p): Use walk_tree_without_duplicates.
15496 * pt.c: Don't include hashtab.h.
15497 (for_each_template_parm): Use walk_tree_without_duplicates.
15498 * semantics.c (finish-stmt_tree): Likewise.
15499 (expand_body): Likewise.
15500 * tree.c (walk_tree): Add additional parameter.
15501 (walk_tree_without_duplicates): New function.
15502 (count_trees): Use it.
15503 (verify_stmt_tree): Adjust call to walk_tree.
15504 (find_tree): Use walk_tree_without_duplicates.
15505 (no_linkage_check): Likewise.
15506 (break_out_target_exprs): Adjust call to walk_tree.
15507 (cp_unsave): Likewise.
15509 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15511 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15512 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15513 * cp-tree.h (TYPE_BINFO): Adjust comment.
15514 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15515 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15516 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15517 (TYPE_TEMPLATE_INFO): Likewise.
15518 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15519 * class.c (push_nested_class): Likewise.
15520 * decl.c (lookup_name_real): Likewise.
15521 (grokdeclarator): Likewise.
15522 (grok_op_properties): Likewise.
15523 (xref_tag): Likewise.
15524 (xref_basetypes): Likewise.
15525 * decl2.c (constructor_name_full): Likewise.
15526 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15527 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15528 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15529 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15530 (dump_type_suffix): Likewise.
15531 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15533 (get_aggr_from_typedef): Likewise.
15534 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15535 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15536 (write_template_parm): Likewise.
15537 (write_template_template_parm): Check tree code instead of
15538 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15539 * method.c (build_overload_nested_name): Add
15540 BOUND_TEMPLATE_TEMPLATE_PARM.
15541 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15542 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15543 * pt.c (convert_template_argument): Check tree code instead of
15544 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15545 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15546 (for_each_template_parm): Adjust comment.
15547 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
15548 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15549 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
15550 template_args_equal to compare template template parameter cases.
15551 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15552 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15554 * tree.c (copy_template_template_parm): Decide whether to create
15555 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15556 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15557 (copy_tree_r): Likewise.
15558 * typeck.c (comptypes): Likewise. Check tree code instead of
15559 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15561 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
15563 * decl.c (finish_function): Move the code for handling functions
15564 marked with the constructor and destructor attributes inside the
15567 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15569 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15571 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15573 * pt.c (lookup_template_class): Remove abort.
15574 * tree.c (get_type_decl): Allow error_mark_node.
15576 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15578 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15581 2000-09-03 Mark Mitchell <mark@codesourcery.com>
15583 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15586 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15588 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15589 union tag mismatch error reporting.
15591 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15593 * call.c (build_scoped_method_call): Check it is not a namespace.
15595 2000-08-30 Jason Merrill <jason@redhat.com>
15597 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15599 * tree.c (bot_manip): Check TREE_CONSTANT rather than
15600 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
15601 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15603 * decl.c (start_function): Always call make_function_rtl.
15605 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15607 * semantics.c (prune_unused_decls): New function.
15608 (finish_stmt_tree): Call it via walk_tree.
15610 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15612 * class.c (build_secondary_vtable): Constify a char *.
15613 * decl.c (init_decl_processing): Initialize function_id_node,
15614 pretty_function_id_node, and func_id_node.
15615 * input.c (struct input_source): Constify 'str'.
15616 (feed_input): Constify first argument.
15617 * mangle.c (write_identifier): Constify argument.
15618 * pt.c (mangle_class_name_for_template): Constify argument.
15620 2000-08-29 Mark Mitchell <mark@codesourcery.com>
15622 * typeck.c (mark_addressable): Remove code that pokes around in
15625 2000-08-28 Jason Merrill <jason@redhat.com>
15627 * lex.c (file_name_nondirectory): Move to toplev.c.
15629 * cp-tree.h (LOCAL_CLASS_P): New macro.
15630 * class.c (finish_struct_1): Use it.
15632 2000-08-27 Alex Samuel <samuel@codesourcery.com>
15634 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15635 (write_encoding): Pass another argument to write_name.
15636 (write_name): Add ignore_local_scope parameter. Fix handling of
15638 (write_nested_name): Use write_unqualified_name.
15639 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
15640 (write_template_prefix): Use write_unqualified_name.
15641 (write_component): Remove.
15642 (write_local_name): Add parameter. Use direct local entity to
15643 discriminator calculation.
15644 (write_class_enum_type): Pass another argument to write_name.
15645 (write_template_template_arg): Likewise.
15646 (make_guard_variable): Likewise.
15648 2000-08-27 Jason Merrill <jason@redhat.com>
15650 * decl.c (pushdecl): Matching decls for local externs are found in
15651 the current level. Propagate linkage information from previous
15654 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
15656 * ir.texi (Expressions): Fix typo.
15658 2000-08-25 Greg McGary <greg@mcgary.org>
15660 * tree.c (init_tree): Use ARRAY_SIZE.
15662 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15664 * error.c (cp_tree_printer): Rework.
15666 2000-08-25 Mark Mitchell <mark@codesourcery.com>
15668 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15670 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15671 (cp-demangle.o): Remove target.
15672 (dyn-string.o): Likewise.
15674 * decl.c (grokfndecl): Require that `main' return an `int'.
15675 * mangle.c (write_encoding): Don't mangle return types for
15676 conversion functions.
15678 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15680 * error.c (tree_formatting_info): New data type.
15681 (tree_being_formatted): New macro.
15682 (tree_formatting_flags): Likewise.
15683 (put_whitespace): Likewise.
15684 (print_tree_identifier): Likewise.
15685 (print_identifier): Likewise.
15686 (cp_tree_printer, print_function_argument_list, print_declaration,
15687 print_expression, print_function_declaration,
15688 print_function_parameter, print_type, print_cv_qualifier): New
15690 (init_error): Initialize lang_printer.
15692 2000-08-24 Jason Merrill <jason@redhat.com>
15694 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15695 adjustment necessary.
15697 2000-08-24 Greg McGary <greg@mcgary.org>
15699 * cp-tree.h (MAIN_NAME_P): Remove macro.
15701 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
15703 * error.c (print_instantiation_context): Don't forget to flush the
15706 2000-08-23 Jason Merrill <jason@redhat.com>
15708 * typeck.c (build_ptrmemfunc): Save the input pmf.
15710 * method.c (process_modifiers): Use same_type_p.
15712 2000-08-23 Mark Mitchell <mark@codesourcery.com>
15714 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15715 * mangle.c (write_function_type): Change prototype.
15716 (write_encoding): Don't mangle return types for
15717 constructors or destructors.
15718 (write_type): Adjust call to write_function_type.
15719 * pt.c (instantiate_template): Instantiate alternate entry points
15720 when instantiating the main function.
15722 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15724 * error.c (cp_print_error_function): Don't use embedded '\n' in
15727 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15729 * decl.c (init_decl_processing): Remove bogus initialization.
15730 * error.c (lang_print_error_function): Restore here.
15731 (init_error): Initialize print_error_function.
15733 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15735 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15737 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
15739 * Makefile.in (error.o): Depends on diagnostic.h
15741 * cp-tree.h (problematic_instantiation_changed,
15742 record_last_problematic_instantiation, current_instantiation,
15743 print_instantiation_context): Declare.
15744 (maybe_print_template_context): Remove.
15746 * decl.c (init_decl_processing): Set print_error_function to NULL.
15747 (lang_print_error_function): Remove, since we're using a new
15750 * error.c: #include diagnostic.h
15751 (function_category): New function.
15752 (cp_diagnostic_starter): Likewise.
15753 (cp_diagnostic_finalizer): Likewise.
15754 (cp_print_error_function): Likewise.
15755 (maybe_print_instantiation_context): Likewise.
15756 (print_instantiation_full_context): Likewise.
15757 (print_instantiation_partial_context): Likewise.
15758 (print_instantiation_context): Define.
15759 (init_error): Initialize diagnostic pager and finalizer.
15761 * pt.c (problematic_instantiation_changed): Define.
15762 (record_last_problematic_instantiation): Likewise.
15763 (current_instantiation): Likewise.
15764 (maybe_print_template_context): Remove.
15765 (print_template_context): Likewise.
15766 (current_tinst_level): Make static to reflect Brendan Kehoe's
15767 change of 1995-04-13.
15768 (push_tinst_level): Call print_instantiation_context.
15770 2000-08-21 Nix <nix@esperi.demon.co.uk>
15772 * lang-specs.h: Do not process -o or run the assembler if
15775 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
15777 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15779 * decl2.c (lang_decode_option): Disable gettext attributes for
15782 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
15784 * lex.c (lang_init_options): Default diagnostic message maximum
15785 length to 80, when line-wrapping.
15787 2000-08-20 Mark Mitchell <mark@codesourcery.com>
15789 * class.c (build_vtbl_initializer): Clear the entire
15790 vtbl_init_data. Start keeping track of the functions for which we
15791 have created vcall offsets here.
15792 (dfs_build_vcall_offset_vtbl_entries): Remove.
15793 (build_vcall_offset_vtbl_entries): Reimplement.
15794 (add_vcall_offset_vtbl_entries_r): New function.
15795 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
15796 computing when vcall offsets are necessary.
15798 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15800 * decl.c (member_function_or_else): Use cp_error ... %T.
15801 (grokdeclarator): Likewise.
15802 (start_method): Likewise.
15803 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15805 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15807 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15810 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15812 * cp-tree.h (PTRMEM_OK_P): New macro.
15813 (itf_ptrmem_ok): New enumeration value.
15814 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15815 argument. Diagnose implicit pointer to member.
15816 (instantiate_type): Don't diagnose implicit pointer to member
15817 here. Pass itf_ptrmem_ok if ok. Adjust calls to
15818 resolve_address_of_overloaded_function.
15819 * init.c (build_offset_ref): Set PTRMEM_OK_P.
15820 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15821 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15822 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15823 (build_unary_op): Deal with single non-static member in
15826 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15828 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15830 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15832 * cp-tree.h (enum_name_string): Remove prototype.
15833 (report_case_error): Remove prototype.
15834 * cp/typeck2.c (enum_name_string): Remove.
15835 (report_case_error): Remove.
15836 * error.c (dump_expr): Deal with enum values directly.
15837 Correctly negate integer constant.
15839 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15841 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15842 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15843 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15844 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15845 (__cxa_vec_new): Use __cxa_vec_new2.
15846 (__cxa_vec_delete): Use __cxa_vec_delete2.
15848 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15850 * vec.cc (__cxa_vec_new): Set "C" linkage.
15851 (__cxa_vec_ctor): Likewise.
15852 (__cxa_vec_cctor): Likewise.
15853 (__cxa_vec_dtor): Likewise.
15854 (__cxa_vec_delete): Likewise.
15855 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15856 (__cxa_vec_ctor): Likewise.
15857 (__cxa_vec_cctor): Likewise.
15858 (__cxa_vec_dtor): Likewise.
15859 (__cxa_vec_delete): Likewise.
15861 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15863 * class.c (instantiate_type): Reinstate local variable
15864 deleted in previous change.
15866 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15869 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15871 * cp-tree.h (instantiate_type_flags): New enumeration.
15872 (instantiate_type): Change parameter.
15873 * class.c (instantiate_type): Adjust prototype. Adjust.
15874 * call.c (standard_conversion): Adjust instantiate_type call.
15875 (reference_binding): Likewise.
15876 (build_op_delete_call): Likewise.
15877 (convert_like_real): Likewise.
15878 * cvt.c (cp_convert_to_pointer): Likewise.
15879 (convert_to_reference): Likewise.
15880 * pt.c (convert_nontype_argument): Likewise.
15881 * typeck.c (build_binary_op): Likewise.
15882 (build_ptrmemfunc): Likewise.
15883 (convert_for_assignment): Likewise.
15885 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15887 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15888 (current_aggr): Define.
15889 * decl.c (grokdeclarator): Make sure a friend class is an
15890 elaborated type specifier.
15891 * parse.y (current_aggr): Remove static definition.
15892 (cp_parse_init): Adjust.
15893 (structsp): Clear and restore current_aggr.
15894 (component_decl_list): Clear current_aggr.
15896 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15897 aggregate tag on the typename's context.
15899 * pt.c (tsubst_friend_class): Return error_mark_node, if
15900 parms becomes NULL.
15901 (instantiate_class_template): Ignore error_mark_node friend types.
15903 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
15905 * cvt.c (warn_ref_binding): New static function, broken out of ...
15906 (convert_to_reference): ... here. Use it.
15908 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15910 * parse.y (template_arg): Add rule for template qualified with
15913 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15915 * decl2.c (add_function): Reorganize.
15916 (arg_assoc): Do not consider function template decls.
15918 2000-08-11 Jason Merrill <jason@redhat.com>
15920 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15923 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15925 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15926 (lookup_nested_tag): Likewise.
15928 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15931 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15933 * parse.y (named_complex_class_head_sans_basetype): Remove
15936 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15938 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15939 explicit TEMPLATE_ID_EXPR args.
15940 (build_expr_from_tree, case CALL_EXPR): Likewise.
15942 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15944 * decl.c (check_tag_decl): Diagnose typename's which don't
15947 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
15949 * init.c (build_aggr_init): Reject bogus array initializers
15952 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15954 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15956 * cp/tinfo.cc (__dynamic_cast): Likewise.
15957 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15959 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15961 * cvt.c (convert_to_pointer_force): Fix error message when
15962 attempting to cast from ambiguous base.
15964 2000-08-08 Jason Merrill <jason@redhat.com>
15966 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15967 (tsubst_template_arg_vector): Likewise.
15969 * decl2.c (build_anon_union_vars): Choose the largest field; don't
15970 assume that one will be as large as the union.
15972 2000-08-07 Kazu Hirata <kazu@hxi.com>
15974 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15975 * decl.c (pop_labels): Likewise.
15977 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
15979 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15981 (__pointer_to_member_type_info): Likewise.
15982 (__base_class_info): Likewise.
15983 (__class_type_info): Likewise.
15984 (__si_class_type_info): Likewise.
15985 (__vmi_class_type_info): Likewise.
15986 * tinfo.cc (__si_class_type_info::__do_find_public_src):
15987 Changed member names to match specifications.
15988 (__vmi_class_type_info::__do_find_public_src): Likewise.
15989 (__si_class_type_info::__do_dyncast): Likewise.
15990 (__vmi_class_type_info::__do_dyncast): Likewise.
15991 (__si_class_type_info::__do_upcast): Likewise.
15992 (__vmi_class_type_info::__do_upcast): Likewise.
15993 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15994 (__pbase_type_info::__pointer_catch): Likewise.
15995 (__pointer_type_info::__pointer_catch): Likewise.
15996 (__pointer_to_member_type_info::__pointer_catch): Likewise.
15998 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16000 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16001 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16002 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16004 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16006 * cp-tree.h (add_method): Change prototype.
16007 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16008 Don't double the size of the method vector in the error case.
16009 (handle_using_decl): Adjust call to add_method.
16010 (add_implicitly_declared_members): Likewise.
16011 (clone_function_decl): Likewise.
16012 * decl2.c (check_classfn): Likewise.
16013 * semantics.c (finish_member_declaration): Likewise.
16015 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16017 * decl.c (flag_isoc94): New variable.
16019 2000-08-02 Jason Merrill <jason@redhat.com>
16021 * pt.c (do_type_instantiation): Add complain parm; don't complain
16022 if called recursively.
16023 * cp-tree.h, parse.y: Adjust.
16025 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16027 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16028 -Wno-strict-prototypes.
16030 * g++spec.c: Adjust type of second argument to
16031 lang_specific_driver, and update code as necessary.
16033 * cp-tree.h: Don't prototype min_precision here.
16034 (my_friendly_assert): Cast expression to void.
16035 * semantics.c (do_poplevel): Initialize scope_stmts.
16037 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16039 * cp-tree.h (DECL_NEEDED_P): Tweak.
16041 2000-07-28 Jason Merrill <jason@redhat.com>
16043 * lang-specs.h: Use %i in rule for .ii files.
16045 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16047 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16049 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16051 Allow indirect primary bases.
16052 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16054 (CLASSTYPE_VFIELD_PARENT): Remove.
16055 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16056 (BINFO_PRIMARY_BINFO): Remove.
16057 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16058 (BINFO_VBASE_PRIMARY_P): Likewise.
16059 (BINFO_PRIMARY_BASE_OF): New macro.
16060 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16061 (get_primary_binfo): New function.
16062 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16063 * class.c (vcall_offset_data_s): Rename to ...
16064 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16065 and add ctor_vtbl_p.
16066 (get_derived_offset): Use get_primary_binfo.
16067 (dfs_mark_primary_bases): Adjust handling of virtual primary
16069 (mark_primary_bases): Likewise.
16070 (set_primary_base): Take a binfo, not an integer, as a
16071 representation of the primary base.
16072 (indirect_primary_base_p): Remove.
16073 (determine_primary_base): Adjust for indirect primary bases.
16074 (dfs_find_final_overrider): Fix typo in coment.
16075 (update_vtable_entry_for_fn): Use get_primary_binfo.
16076 (layout_nonempty_base_or_field): Tweak.
16077 (build_base_fields): Adjust for new primary base semantics.
16078 (dfs_propagate_binfo_offsets): Remove.
16079 (propagate_binfo_offsets): Rewrite.
16080 (dfs_set_offset_for_shared_vbases): Remove.
16081 (layout_virtual_bases): Don't use it.
16082 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16084 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16085 CLASSTYPE_VFIELD_PARENT.
16086 (dfs_get_primary_binfo): New function.
16087 (get_primary_binfo): Likewise.
16088 (dump_class_hierarchy_r): Tweak printing of primary bases.
16089 (build_vtbl_initializer): Fix typo in comments. Use
16091 (build_vcall_and_vbase_vtbl_entries): Likewise.
16092 (build_vbaes_offset_vtbl_entries): Likewise.
16093 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16094 BV_VCALL_INDEX to handle indirect primary bases.
16095 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16096 (build_rtti_vtbl_entries): Likewise.
16097 * search.c (get_shared_vbase_if_not_primary): Tweak.
16098 (find_vbase_instance): Likewise.
16099 (binfo_for_vtable): Simplify.
16100 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16101 (make_binfo): Make it have 11 entries.
16103 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16105 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16106 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16107 ascertaining primaryness.
16108 (G): Remove template_args.
16109 (decl_is_template_id): New function.
16110 (write_encoding): Use decl_is_template_id.
16111 (write_name): Likewise. Handle type_decls. Get main variant of
16113 (write_nested_name): Likewise.
16114 (write_prefix): Likewise.
16115 (write_template_prefix): Likewise.
16116 (write_special_name_constructor): Remove defunct production from
16118 (write_bare_function_type): Remove comment about absent parameter.
16119 (write_template_template_arg): Add missing grammar production to
16122 2000-07-27 Jason Merrill <jason@redhat.com>
16124 * decl.c (duplicate_decls): If common_type produces a non-typedef
16125 type for a typedef, just use the old type.
16127 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16129 * cp-tree.h (function_depth): Declare.
16130 (verify_stmt_tree): Likewise.
16131 (find_tree): Likewise.
16132 * decl.c (function_depth): Give it external linkage.
16133 * optimize.c (optimize_function): Increment and decrement it.
16134 * tree.c (verify_stmt_tree_r): New function.
16135 (verify_stmt_tree): Likewise.
16136 (find_tree_r): Likewise.
16137 (find_tree): Likewise.
16139 2000-07-27 Jason Merrill <jason@redhat.com>
16141 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16143 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16145 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16147 * decl.c (start_cleanup_fn): Mark the function as `inline'.
16148 * decl2.c (get_guard): Call cp_finish_decl, not
16149 rest_of_decl_compilation, for local guards.
16150 * lex.c (do_identifier): Remove unused variable.
16152 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
16154 * parse.y: Add missing ';'.
16156 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16158 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16161 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16163 Kill strict_prototype. Backwards compatibility only for
16164 non NO_IMPLICIT_EXTERN_C systems.
16165 * cp-tree.h (flag_strict_prototype): Remove.
16166 (strict_prototype): Remove.
16167 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16168 * decl.c (maybe_push_to_top_level): Adjust.
16169 (pop_from_top_level): Adjust.
16170 (decls_match): Only allow sloppy parm matching for ancient
16172 (init_decl_processing): Adjust.
16173 (grokdeclarator): Adjust.
16174 * decl2.c (flag_strict_prototype): Remove.
16175 (strict_prototype): Remove.
16176 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16177 (lang_f_options): Remove "strict-prototype".
16178 (unsupported-options): Add "strict-prototype".
16179 * lex.c (do_identifier): Adjust.
16180 (do_scoped_id): Adjust.
16181 * parse.y (empty_parms): Adjust.
16182 * class.c (push_lang_context): Adjust.
16183 (pop_lang_context): Adjust.
16184 * typeck.c (comp_target_parms): Adjust.
16186 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16188 * decl.c (poplevel): Deal with anonymous variables at for scope.
16189 (maybe_inject_for_scope_var): Likewise.
16191 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
16193 * decl.c: Remove all signal handling code, now done in toplev.c.
16195 2000-07-23 Mark Mitchell <mark@codesourcery.com>
16197 * decl.c (make_rtl_for_nonlocal_decl): Rework.
16199 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16202 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
16204 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16205 Define my_friendly_assert and my_friendly_abort as macros
16206 which may call friendly_abort. Prototype friendly abort, not
16207 my_friendly_abort or my_friendly_assert.
16208 * decl.c (signal_catch): Report the signal caught in the error
16209 message. Call fatal directly.
16210 * typeck2.c (ack, my_friendly_assert): Delete.
16211 (my_friendly_abort): Rename to friendly_abort. Expect file,
16212 line, and function parameters. Report the abort code, then
16213 call fancy_abort. Do not mask an abort if errors have
16216 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
16218 * typeck.c (comp_target_parms): Remove obsolete parameter.
16219 (comp_target_types): Adjust.
16221 2000-07-17 Jason Merrill <jason@redhat.com>
16223 * typeck.c (mark_addressable): Never set TREE_USED.
16224 * call.c (build_call): Don't abort on calls to library functions
16225 that have been declared normally.
16227 * typeck.c (build_binary_op): Fix grammar in warning.
16229 * exception.cc (__eh_free): Fix prototype.
16231 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16233 * decl.c (pushdecl): Handle seeing an OVERLOAD in
16234 IDENTIFIER_NAMESPACE_VALUE.
16236 2000-07-16 Mark Mitchell <mark@codesourcery.com>
16238 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16239 * method.c (use_thunk): Correct handling of vcall offsets.
16241 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
16243 * .cvsignore: parse.h and parse.c have no cp- prefix.
16245 2000-07-13 Mark Mitchell <mark@codesourcery.com>
16247 * .cvsignore: New file.
16249 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
16251 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
16253 2000-07-12 Mark Mitchell <mark@codesourcery.com>
16255 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16257 * parse.h: Likewise.
16259 2000-07-11 Mark Mitchell <mark@codesourcery.com>
16261 * class.c (layout_class_type): Add pointers to virtual bases after
16262 base classes under the old ABI.
16264 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
16266 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16267 (finish_continue_stmt): Likewise.
16268 (begin_for_stmt): Remove call to note_level_for_for.
16269 (finish_goto_stmt): Change call from build_min_nt
16271 (finish_expr_stmt): Likewise.
16272 (begin_if_stmt): Likewise.
16273 (begin_while_stmt): Likewise.
16274 (finish_while_stmt): Likewise.
16275 (finish_return_stmt): Likewise.
16276 (begin_for_stmt): Likewise.
16277 (finish_for_stmt): Likewise.
16278 (finish_break_stmt): Likewise.
16279 (begin_switch_stmt): Likewise.
16280 (finish_case_label): Likewise.
16281 (genrtl_try_block): Likewise.
16282 (begin_try_block): Likewise.
16283 (begin_handler): Likewise.
16284 (begin_compound_stmt): Likewise.
16285 (finish_asm_stmt): Likewise.
16286 (finish_label_stmt): Likewise.
16287 (add_decl_stmt): Likewise.
16288 (finish_subobject): Likewise.
16289 (finish_decl_cleanup): Likewise.
16290 (finish_named_return_value): Likewise.
16291 (setup_vtbl_ptr): Likewise.
16292 (add_scope_stmt): Likewise.
16293 * decl.c (finish_constructor_body): Likewise.
16294 (finish_destructor_body): Likewise.
16295 * optimize.c (copy_body_r): Likewise.
16296 (initialize_inlined_parameters): Likewise.
16297 (declare_return_variable): Likewise.
16298 (expand_call_inline): Likewise.
16300 2000-07-10 Jakub Jelinek <jakub@redhat.com>
16302 * semantics.c (expand_body): Sync interface information
16303 at the end of function body expansion.
16305 2000-07-09 Jason Merrill <jason@redhat.com>
16307 * init.c (build_new_1): Bail early if the call to new fails.
16309 * decl.c (compute_array_index_type): Check specifically for
16310 an INTEGER_CST, not just TREE_CONSTANT.
16312 * decl.c (duplicate_decls): Don't call duplicate_decls on
16313 the DECL_TEMPLATE_RESULT.
16314 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16317 * error.c (dump_template_bindings): Don't crash if we had an
16318 invalid argument list.
16320 * typeck.c (c_expand_start_case): Do narrowing here.
16321 * semantics.c (finish_switch_cond): Not here.
16323 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
16325 * parse.y (asm_clobbers): Do string concatenation.
16327 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16329 * decl.c (pushtag): Don't put local classes in template functions
16330 on the local_classes list.
16332 2000-07-04 Scott Snyder <snyder@fnal.gov>
16334 * decl2.c (get_guard): Add missing return for old ABI local
16337 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16339 * cp-tree.h (char_type_p): New function.
16340 * decl.c (init_decl_processing): Don't initialize
16341 signed_wchar_type_node or unsigned_wchar_type_node.
16342 (complete_array_type): Handle brace-enclosed string-constants.
16343 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16344 * tree.c (char_type_p): New function.
16345 * typeck2.c (digest_init): Use char_type_p.
16347 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
16349 * pt.c (tsubst): Don't layout type, if it's error_mark.
16351 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
16353 * pt.c (instantiate_pending_templates): Reset template level.
16355 2000-07-05 Jason Merrill <jason@redhat.com>
16357 * call.c (joust): Don't complain about `operator char *()' beating
16358 `operator const char *() const'.
16360 2000-07-04 scott snyder <snyder@fnal.gov>
16361 Jason Merrill <jason@redhat.com>
16363 * repo.c (repo_get_id): Handle the case where a class with virtual
16364 bases has a null TYPE_BINFO_VTABLE.
16366 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
16367 Jason Merrill <jason@redhat.com>
16369 * parse.y (member_init): Just pass in the type.
16370 * init.c (expand_member_init): Handle getting a type.
16372 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16373 Jason Merrill <jason@redhat.com>
16375 * decl.c (finish_function): Warn if a function has no return
16377 Suggested by Andrew Koenig.
16378 * typeck.c (check_return_expr): Do set current_function_returns_value
16379 if we got an error_mark_node.
16381 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16383 * decl2.c (push_decl_namespace): Push the original namespace.
16385 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16387 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16388 * semantics.c (begin_class_definition): Clear it.
16390 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
16392 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16393 (genrtl_expr_stmt): Likewise.
16394 (genrtl_decl_stmt): Likewise.
16395 (genrtl_if_stmt): Likewise.
16396 (genrtl_while_stmt): Likewise.
16397 (genrtl_do_stmt): Likewise.
16398 (genrtl_return_stmt): Likewise.
16399 (genrtl_for_stmt): Likewise.
16400 (genrtl_break_stmt): Likewise.
16401 (genrtl_continue_stmt): Likewise.
16402 (genrtl_scope_stmt): Likewise.
16403 (genrtl_switch_stmt): Likewise.
16404 (genrtl_case_label): Likewise.
16405 (genrtl_begin_compound_stmt): Likewise.
16406 (genrtl_finish_compound_stmt): Likewise.
16407 (genrtl_compound_stmt): Likewise.
16408 (genrtl_asm_stmt): Likewise.
16410 * init.c (begin_init_stmts): Remove call to
16411 genrtl_begin_compound_stmt.
16412 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16414 * semantics.c (lang_expand_stmt): Changed call to
16415 genrtl_compound_stmt to ignore return value.
16417 2000-07-02 Mark Mitchell <mark@codesourcery.com>
16419 * mangle.c (canonicalize_for_substitution): Return the canonical
16422 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16424 * typeck.c (commonparms): Remove obstack manipulations.
16426 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
16428 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16430 * Makefile.in (OBJS): Added ../c-semantics.o.
16431 (OBJDEPS): Likewise.
16433 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16435 (struct stmt_tree): Added comment.
16436 (current_function_name_declared): Removed.
16437 (stmts_are_full_exprs_p): Likewise.
16438 (genrtl_do_pushlevel): Likewise.
16439 (genrtl_clear_out_block): Likewise.
16440 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16441 (DECL_ANON_UNION_ELEMS): Likewise.
16442 (emit_local_var): Likewise.
16443 (make_rtl_for_local_static): Likewise.
16444 (do_case): Likewise.
16445 (expand_stmt): Likewise.
16446 (genrtl_decl_cleanup): Likewise.
16447 (c_expand_asm_operands): Likewise.
16448 (c_expand_return): Likewise.
16449 (c_expand_start_case): Likewise.
16451 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16452 (emit_local_var): Likewise.
16453 (initialize_local_var): Change reference to
16454 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16455 Change reference to stmts_are_full_exprs_p to
16456 current_stmt_tree->stmts_are_full_exprs_p.
16457 (push_cp_function_context): Likewise.
16459 * expect.c (expand_throw): Change reference to
16460 stmts_are_full_exprs_p.
16462 * init.c (build_aggr_init): Change reference to
16463 stmts_are_full_exprs_p.
16464 (build_vec_init): Likewise.
16466 * optimize.c (maybe_clone_body): Change reference to
16467 current_function_name_declared to
16468 cp_function_chain->name_declared.
16470 * pt.c (instantiate_decl): Change reference to
16471 current_function_name_declared to
16472 cp_function_chain->name_declared.
16474 * semantics.c (expand_cond): Moved declaration to c-common.h.
16475 (genrtl_do_pushlevel): Moved to c-semantics.c.
16476 (genrtl_clear_out_block): Likewise.
16477 (genrtl_goto_stmt): Likewise.
16478 (genrtl_expr_stmt): Likewise.
16479 (genrtl_decl_stmt): Likewise.
16480 (gerntl_if_stmt): Likewise.
16481 (genrtl_while_stmt): Likewise.
16482 (genrtl_do_stmt): Likewise.
16483 (genrtl_return_stmt): Likewise.
16484 (genrtl_for_stmt): Likewise.
16485 (genrtl_break_stmt): Likewise.
16486 (genrtl_continue_stmt): Likewise.
16487 (genrtl_scope_stmt): Likewise.
16488 (genrtl_switch_stmt): Likewise.
16489 (genrtl_case_label): Likewise.
16490 (genrtl_begin_compound_stmt): Likewise.
16491 (genrtl_finish_compound_stmt): Likewise.
16492 (genrtl_compound_stmt): Likewise.
16493 (genrtl_asm_stmt): Likewise.
16494 (genrtl_decl_cleanup): Likewise.
16495 (expand_cond): Likewise.
16496 (expand_stmt): Renamed to ...
16497 (lang_expand_stmt): ... this.
16498 (lang_expand_expr_stmt): Initialize.
16499 (set_current_function_name_declared): Likewise.
16500 (stmts_are_full_exprs_p): Likewise.
16501 (current_function_name_declared): Likewise.
16502 (anon_aggr_type_p): Likewise.
16503 (do_poplevel): Change reference to
16504 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16505 Change reference to stmts_are_full_exprs_p to
16506 current_stmt_tree->stmts_are_full_exprs_p.
16507 (add_tree): Likewise.
16508 (finish_expr_stmt): Likewise.
16509 (prep_stmt): Likewise.
16510 (lang_expand_stmt): Likewise.
16511 (begin_compound_stmt): Change reference to
16512 current_function_name_declared to
16513 cp_function_chain->name_declared and call to
16514 current_function_name_declared().
16515 (setup_vtbl_ptr): Likewise.
16516 (genrtl_do_poplevel): Removed.
16518 2000-06-30 Jason Merrill <jason@redhat.com>
16520 * init.c (init_init_processing): Go back to aligning like
16521 double_type_node for old ABI.
16522 (get_cookie_size): Make cookie larger if we get a type that needs
16524 (build_vec_delete): Call it.
16526 * typeck.c (qualify_type_recursive): New fn.
16527 (composite_pointer_type): Use it.
16528 (build_binary_op): Use composite_pointer_type.
16530 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
16531 Jason Merrill <jason@redhat.com>
16533 * typeck.c (check_return_expr): Don't complain about returning
16534 NULL from operator new if -fcheck-new.
16535 * cp-tree.h: Declare flag_check_new here.
16536 * init.c: Not here.
16538 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16540 * mangle.c (find_substitution): Use same_type_p.
16541 (write_encoding): Don't check for substitutions.
16543 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16545 * parse.y (expr_no_comma_rangle): New non-terminal.
16546 (template_parm): Use it for default parameter case.
16547 (template_arg): Use it.
16548 (expr_no_commas): Remove commented out undefined extensions.
16549 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16550 * parse.h, parse.c: Rebuilt.
16552 2000-06-30 Mark Mitchell <mark@codesourcery.com>
16554 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16555 (finish_asm_stmt): Do it here, instead.
16557 * cp-tree.h (ridpointers): Don't declare.
16558 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16559 (record_builtin_java_type): Likewise.
16560 (init_decl_processing): Likewise.
16561 * lex.c: Move inclusion of lex.h.
16562 (ridpointers): Don't define.
16563 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
16565 * lex.h (enum rid): Rename to ...
16566 (enum cp_rid): ... this.
16567 (ridpointers): Don't declare.
16568 * parse.y: Move inclusion of lex.h.
16569 * parse.c: Regenerated.
16570 * spew.c: Move inclusion of lex.h.
16572 * cp-tree.h (struct language_function): Remove temp_name_counter.
16573 (temp_name_counter): Remove.
16574 (get_temp_name): Change prototype.
16575 (get_guard): New function.
16576 (get_guard_cond): Likewise.
16577 (set_guard): Likewise.
16578 * cvt.c (build_up_reference): Adjust call to get_temp_name.
16579 * decl.c (expand_static_init): Use get_guard and friends to
16580 implement guard variables.
16581 * decl2.c (get_temp_name): Assume that the variables created are
16583 (get_sentry): Rename to ...
16584 (get_guard): ... this. Implement new ABI guard variables.
16585 (get_guard_bits): New function.
16586 (get_guard_cond): Likewise.
16587 (set_guard): Likewise.
16588 (start_static_initialization_or_destruction): Use them.
16589 (do_static_initialization): Replace sentry with guard throughout.
16590 (do_static_destruction): Likewise.
16591 * init.c (create_temporary_var): Add comment.
16593 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16595 * mangle.c (find_substitution): Use same_type_p.
16596 (write_encoding): Don't check for substitutions.
16598 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16600 * parse.y (expr_no_comma_rangle): New non-terminal.
16601 (template_parm): Use it for default parameter case.
16602 (template_arg): Use it.
16603 (expr_no_commas): Remove commented out undefined extensions.
16604 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16605 * parse.h, parse.c: Rebuilt.
16607 2000-06-29 Mark Mitchell <mark@codesourcery.com>
16609 * cp-tree.h (flag_const_strings): Remove.
16610 (warn_parentheses): Likewise.
16611 (warn_format): Likewise.
16612 (common_type): Likewise.
16613 (default_conversion): Likewise.
16614 (build_binary_op): Likewise.
16615 (cp_build_binary_op): New macro.
16616 * call.c (build_new_op): Use cp_build_binary_op instead of
16618 * class.c (build_vtable_entry_ref): Likewise.
16619 * decl.c (expand_static_init): Likewise.
16620 (compute_array_index_type): Likewise.
16621 (build_enumerator): Likewise.
16622 * decl2.c (delete_sanity): Likewise.
16623 (start_static_initialization_or_destruction): Likewise.
16624 * error.c (dump_type_suffix): Likewise.
16625 * init.c (resolve_offset_ref): Likewise.
16626 (build_new): Likewise.
16627 (build_new_1): Likewise.
16628 (build_vec_delete_1): Likewise.
16629 (build_vec_init): Likewise.
16630 (build_delete): Likewise.
16631 * rtti.c (synthesize_tinfo_fn): Likewise.
16632 (synthesize_tinfo_var): Likewise.
16633 * search.c (expand_upcast_fixups): Likewise.
16634 (fixup_all_virtual_upcast_offsets): Likewise.
16635 * typeck.c (build_array_ref): Likewise.
16636 (get_member_function_from_ptrfunc): Likewise.
16637 (build_binary_op): Add parameter.
16638 (pointer_int_sum): Use cp_build_binary_op.
16639 (pointer_diff): Likewise.
16640 (build_modify_expr): Likewise.
16641 (get_delta_difference): Likewise.
16642 (build_ptrmemfunc): Likewise.
16644 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
16646 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16647 * decl.c (create_implicit_typedef): Adjust.
16648 * decl2.c (build_artificial_parm): Adjust.
16649 * method.c (implicitly_declare_fn): Adjust.
16650 * pt.c (push_inline_template_parms_recursive): Adjust.
16651 (process_template_parm): Adjust.
16652 (overloaded_template_name): Adjust.
16653 * semantics.c (finish_template_template_parm): Adjust.
16655 2000-06-28 Mark Mitchell <mark@codesourcery.com>
16657 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16658 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16659 where to emit thunks.
16660 (build_vtt): Adjust call to build_vtt_inits.
16661 (build_vtt_inits): Add parameter to indicate whether or not
16662 sub-VTTs for virtual bases should be included. Adjust handling of
16663 construction vtables.
16664 (get_matching_base): New function.
16665 (dfs_build_vtt_inits): Rename to ...
16666 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16667 construction vtables.
16668 (dfs_fixup_binfo_vtbls): Likewise.
16669 (build_ctor_vtbl_groups): Build construction vtables for virtual
16671 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16672 to build construction vtbls.
16673 (dfs_accumulate_vtbl_inits): Adjust handling of
16674 construction vtables.
16676 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16679 2000-06-27 Mark Mitchell <mark@codesourcery.com>
16681 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16683 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16685 * search.c (hides): Remove.
16686 (is_subobject_of_p): Add most_derived parameter. Use
16688 (lookup_field_queue_p): Adjust.
16689 (lookup_field_r): Adjust.
16691 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16693 * decl2.c (handle_class_head): Bash typedefs to the type's main
16696 2000-06-25 Mark Mitchell <mark@codesourcery.com>
16698 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16699 (begin_global_stmt_expr): ... this.
16700 (genrtl_finish_stmt_expr): Rename to ...
16701 (finish_global_stmt_expr): ... this.
16702 * init.c (begin_init_stmts): Adjust calls.
16703 (finish_init_stmts): Likewise.
16704 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16705 (begin_global_stmt_expr): ... this.
16706 (genrtl_finish_stmt_expr): Rename to ...
16707 (finish_global_stmt_expr): ... this.
16709 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16711 * search.c (lookup_member): Fix typo in comment.
16713 2000-06-24 Jason Merrill <jason@redhat.com>
16715 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16716 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16718 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16720 * parse.y (complex_direct_notype_declarator): Support global_scope.
16721 * Makefile.in: Adjust conflict count.
16723 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16725 * parse.y (template_arg): Convert TEMPLATE_DECL
16726 that is a template template parameter to
16727 TEMPLATE_TEMPLATE_PARM here.
16729 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16730 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16731 (copy_template_template_parm): Adjust prototype.
16732 * decl.c (grokdeclarator): Remove dead code.
16733 * pt.c (process_template_parm): Tidy.
16734 (lookup_template_class): Construct nodes in
16735 copy_template_template_parm.
16736 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16737 lookup_template_class. Use TYPE_TI_TEMPLATE.
16738 * tree.c (copy_template_template_parm): Add NEWARGS
16740 (mapcar): Adjust call to copy_template_template_parm.
16741 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16742 * method.c (build_template_template_parm_names): Change error
16743 code to avoid compilation warning.
16745 * gxxint.texi: Document template template parameter
16748 2000-06-21 Alex Samuel <samuel@codesourcery.com>
16750 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16751 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16752 (cp-demangle.o): New rule.
16753 (dyn-string.o): Likewise.
16754 * inc/cxxabi.h (__cxa_demangle): New declaration.
16756 2000-06-22 Mark Mitchell <mark@codesourcery.com>
16758 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16759 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16760 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
16761 a tree, not an int.
16762 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16763 (make_thunk): Change prototype.
16764 (emit_thunk): Rename to use_thunk.
16765 (mangle_thunk): Change prototype.
16766 * class.c (get_derived_offset): Simplify.
16767 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16768 BV_GENERATE_THUNK_WITH_VTABLE_P.
16769 (build_primary_vtable): Simplify.
16770 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16771 (dfs_find_base): Remove.
16772 (update_vtable_entry_for_fn): Correct bug in finding the base
16773 where a virtual function was first declared. Figure out whether
16774 or not to emit a vcall-thunk with the vtables in which it appears.
16775 Correct logic for deciding whether to use an ordinary thunk, or a
16777 (finish_struct_1): Remove unnecssary code.
16778 (build_vtbl_initializer): Use ssize_int for the running counter of
16780 (build_vtbl_initializer): Only use vcall thunks where necessary.
16781 Mark thunks as needing to be emitted with their vtables, or not.
16782 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16783 indices. Use size_binop.
16784 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16785 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
16787 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16788 (build_vtable_entry): Mark thunks as needing to be emitted with
16789 their vtables, or not.
16790 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16791 * decl2.c (mark_vtable_entries): Use use_thunk instead of
16793 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
16795 * error.c (dump_expr): Use BV_FN.
16796 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16798 * method.c (make_thunk): Likewise.
16799 (emit_thunk): Rename to use_thunk. Allow callers to decide
16800 whether or not to actually emit the thunk. Adjust for changes in
16801 representation of vcall offsets.
16802 * search.c (dfs_get_pure_virtuals): Use BV_FN.
16803 * semantics.c (emit_associated_thunks): New function.
16804 (expand_body): Use it.
16805 * ir.texi: Adjust decriptions of thunks.
16807 2000-06-22 Jason Merrill <jason@redhat.com>
16809 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16810 (tsubst_friend_function): Copy it here.
16812 * decl.c (grok_op_properties): Fix typo.
16814 * decl2.c (delete_sanity): Clarify warning, avoid failure on
16817 * pt.c (check_explicit_specialization): Clarify error.
16819 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16820 an old OVERLOAD when we're declaring a non-function.
16821 (pushdecl, destroy_local_var): Check for error_mark_node.
16822 (warn_extern_redeclared_static): Also bail early if
16823 we're a CONST_DECL.
16824 (push_overloaded_decl): Ignore an old error_mark_node.
16826 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
16828 * call.c (build_x_va_arg): Check if in a template decl.
16829 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16831 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16833 * class.c (push_lang_context): TYPE_NAME gets you to the Java
16835 * decl.c (check_goto): Computed gotos assumed OK.
16837 2000-06-20 Jason Merrill <jason@redhat.com>
16839 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16840 for which we don't need to look for instantiations.
16842 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
16844 * parse.y (program): Always call finish_translation_unit.
16845 * parse.c, parse.h: Rebuilt.
16847 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
16849 * method.c: Don't include hard-reg-set.h.
16851 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16853 * rtti.c (get_base_offset): Cope when vbase field is in a base.
16855 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16857 * call.c (build_conditional_expr): Use VOID_TYPE_P.
16858 * cvt.c (cp_convert_to_pointer): Likewise.
16859 (convert_to_void): Likewise.
16860 * error.c (dump_expr): Likewise.
16861 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16862 * init.c (build_delete): Likewise.
16863 * method.c (emit_thunk): Likewise.
16864 * optmize.c (declare_return_variable): Likewise.
16865 * rtti.c (get_tinfo_decl_dynamic): Likewise.
16866 (get_typeid): Likewise.
16867 (build_dynamic_cast_1): Likewise.
16868 * typeck.c (composite_pointer_type): Likewise.
16869 (common_type): Likewise.
16870 (build_indirect_ref): Likewise.
16871 (build_binary_op): Likewise.
16872 (build_x_compound_expr): Likewise.
16873 (check_return_expr): Likewise.
16874 * typeck2.c (add_exception_specifier): Likewise.
16876 * mangle.c (write_method_parms): Use direct comparison for end
16879 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
16881 * cp-tree.h (genrtl_try_block): Declare function.
16882 (genrtl_handler): Likewise.
16883 (genrtl_catch_block): Likewise.
16884 (genrtl_ctor_stmt): Likewise.
16885 (genrtl_subobject): Likewise.
16886 (genrtl_decl_cleanup): Likewise.
16887 (genrtl_do_poplevel): Likewise.
16888 (genrtl_do_pushlevel): Likewise.
16889 (genrtl_clear_out_block): Likewise.
16890 (genrtl_goto_stmt): Likewise.
16891 (genrtl_expr_stmt): Likewise.
16892 (genrtl_decl_stmt): Likewise.
16893 (genrtl_if_stmt): Likewise.
16894 (genrtl_while_stmt): Likewise.
16895 (genrtl_do_stmt): Likewise.
16896 (genrtl_return_stmt): Likewise.
16897 (genrtl_for_stmt): Likewise.
16898 (genrtl_break_stmt): Likewise.
16899 (genrtl_continue_stmt): Likewise.
16900 (genrtl_scope_stmt): Likewise.
16901 (genrtl_switch_stmt): Likewise.
16902 (genrtl_case_label): Likewise.
16903 (genrtl_begin_compound_stmt): Likewise.
16904 (genrtl_finish_compound_stmt): Likewise.
16905 (genrtl_compound_stmt): Likewise.
16906 (genrtl_asm_stmt): Likewise.
16907 (genrtl_named_return_value): Likewise.
16908 (genrtl_begin_stmt_expr): Likewise.
16909 (genrtl_finish_stmt_expr): Likewise.
16910 (finish_for_stmt): Removed first argument.
16911 (finish_switch_stmt): Likewise.
16913 * semantics.c (genrtl_try_block): Define function.
16914 (genrtl_handler): Likewise.
16915 (genrtl_catch_block): Likewise.
16916 (genrtl_ctor_stmt): Likewise.
16917 (genrtl_subobject): Likewise.
16918 (genrtl_decl_cleanup): Likewise.
16919 (genrtl_do_poplevel): Likewise.
16920 (genrtl_do_pushlevel): Likewise.
16921 (genrtl_clear_out_block): Likewise.
16922 (genrtl_goto_stmt): Likewise.
16923 (genrtl_expr_stmt): Likewise.
16924 (genrtl_decl_stmt): Likewise.
16925 (genrtl_if_stmt): Likewise.
16926 (genrtl_while_stmt): Likewise.
16927 (genrtl_do_stmt): Likewise.
16928 (genrtl_return_stmt): Likewise.
16929 (genrtl_for_stmt): Likewise.
16930 (genrtl_break_stmt): Likewise.
16931 (genrtl_continue_stmt): Likewise.
16932 (genrtl_scope_stmt): Likewise.
16933 (genrtl_switch_stmt): Likewise.
16934 (genrtl_case_label): Likewise.
16935 (genrtl_begin_compound_stmt): Likewise.
16936 (genrtl_finish_compound_stmt): Likewise.
16937 (genrtl_compound_stmt): Likewise.
16938 (genrtl_asm_stmt): Likewise.
16939 (genrtl_named_return_value): Likewise.
16940 (genrtl_begin_stmt_expr): Likewise.
16941 (genrtl_finish_stmt_expr): Likewise.
16942 (finish_for_stmt): Removed first argument and generate rtl
16944 (finish_switch_stmt): Likewise.
16945 (do_poplevel): Removed generate rtl specific code.
16946 (do_pushlevel): Likewise.
16947 (add_tree): Likewise.
16948 (finish_goto_stmt): Likewise.
16949 (finish_expr_stmt): Likewise.
16950 (begin_if_stmt): Likewise.
16951 (finish_if_stmt_cond): Likewise.
16952 (finish_then_clause): Likewise.
16953 (begin_else_clause): Likewise.
16954 (finish_else_clause): Likewise.
16955 (finish_if_stmt): Likewise.
16956 (clear_out_block): Likewise.
16957 (begin_while_stmt): Likewise.
16958 (finish_while_stmt_cond): Likewise.
16959 (finish_while_stmt): Likewise.
16960 (begin_do_stmt): Likewise.
16961 (finish_do_body): Likewise.
16962 (finish_do_stmt): Likewise.
16963 (finish_return_stmt): Likewise.
16964 (begin_for_stmt): Likewise.
16965 (finish_for_init_stmt): Likewise.
16966 (finish_for_cond): Likewise.
16967 (finish_for_expr): Likewise.
16968 (finish_break_stmt): Likewise.
16969 (finish_continue_stmt): Likewise.
16970 (begin_switch_stmt): Likewise.
16971 (finish_switch_cond): Likewise.
16972 (finish_case_label): Likewise.
16973 (begin_try_block): Likewise.
16974 (begin_function_try_block): Likewise.
16975 (finish_try_block): Likewise.
16976 (finish_cleanup_try_block): Likewise.
16977 (finish_cleanup): Likewise.
16978 (finish_function_try_block): Likewise.
16979 (finish_handler_sequence): Likewise.
16980 (finish_function_handler_sequence): Likewise.
16981 (begin_handler): Likewise.
16982 (finish_handler_parms): Likewise.
16983 (begin_catch_block): Likewise.
16984 (finish_handler): Likewise.
16985 (begin_compound_stmt): Likewise.
16986 (finish_compound_stmt): Likewise.
16987 (finish_asm_stmt): Likewise.
16988 (finish_label_stmt): Likewise.
16989 (finish_label_decl): Likewise.
16990 (finish_subobject): Likewise.
16991 (finish_decl_cleanup): Likewise.
16992 (finish_named_return_value): Likewise.
16993 (begin_stmt_expr): Likewise.
16994 (finish_stmt_expr): Likewise.
16996 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16997 to call genrtl_expr_stmt when appropriate.
16999 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17000 begin_compound_expr to call genrtl_begin_stmt_expr and
17001 genrtl_begin_compound_expr when appropriate.
17002 (finish_init_stmts): Changed calls to finish_compound_expr and
17003 finish_stmt_expr to call genrtl_finish_compound_expr and
17004 genrtl_finish_stmt_expr when appropriate.
17005 (expand_default_init): Changed call to finish_expr_stmt to call
17006 genrtl_expr_stmt when appropriate.
17007 (build_vec_init): Likewise.
17009 * parse.y (simple_stmt): Removed first argument from call to
17010 finish_for_stmt. Removed first argument from call to
17011 finish_switch_stmt.
17013 * parse.c: Regenerated.
17015 * pt.c (tsubst_expr): Removed first argument from call to
17016 finish_for_stmt. Removed first argument from call to
17017 finish_switch_stmt.
17019 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17021 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17022 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17024 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17025 (cplus_tree_code_length[]): Likewise.
17026 (cplus_tree_code_name[]): Likewise.
17027 (init_parse): Added call to add_c_tree_codes. Changed
17028 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17030 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17032 * cp-tree.h (finish_mem_initializers): Declare.
17033 (count_trees): Likewise.
17034 * parse.y (base_init): Use finish_mem_initializers.
17035 * semantics.c (finish_mem_initializers): New function.
17037 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17038 the number of trees.
17040 (count_trees): Don't use it.
17042 2000-06-15 Jason Merrill <jason@redhat.com>
17044 * tree.c (count_trees): New debugging function.
17046 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17047 * init.c (build_member_call): Pull out the name of a DECL.
17049 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17050 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17051 * optimize.c (optimize_function): Not here.
17052 * pt.c (instantiate_decl): Push to TV_PARSE.
17054 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17056 * cp-tree.h (struct language_function): Remove x_base_init_list
17057 and x_member_init_list.
17058 (current_base_init_list): Remove.
17059 (current_member_init_list): Likewise.
17060 (setup_vtbl_ptr): Change prototype.
17061 (emit_base_init): Likewise.
17062 (expand_member_init): Likewise.
17063 (reinit_parse_for_function): Remove.
17064 * decl.c (save_function_data): Don't clear x_base_init_list and
17065 x_member_init_list.
17066 (mark_language_function): Don't mark them.
17067 * init.c (perform_member_init): Tweak comment.
17068 (sort_member_init): Take the list of initializers as an argument.
17069 (sort_base_init): Likewise.
17070 (emit_base_init): Likewise.
17071 (expand_member_init): Return the initializer. Don't use global
17073 * lex.c (reinit_parse_for_function): Remove.
17074 * method.c (build_template_parm_names): Correct substitution.
17075 (do_build_copy_constructor): Don't use current_member_init_list
17076 and current_base_init_list.
17077 (synthesize_method): Likewise.
17078 * parse.y (base_init): Split mem-initializers into
17079 base-initializers and field-initializers.
17080 (member_init_list): Build up the list here.
17081 (member_init): Return the initializer.
17082 (fn.depfn): Don't use reinit_parse_for_function.
17083 * parse.c: Regenerated.
17084 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17086 (tsubst_expr): Don't use current_member_init_list
17087 and current_base_init_list.
17088 (tsubst_expr_values): Rename to ...
17089 (tsubst_initializer_list): ... this. Use convert_from_reference.
17090 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17091 and current_base_init_list.
17092 (begin_function_definition): Don't call reinit_parse_for_function.
17094 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17096 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17099 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17101 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17103 * cp-tree.h (IF_COND): Move to c-common.h.
17104 (THEN_CLAUSE): Likewise.
17105 (ELSE_CLAUSE): Likewise.
17106 (WHILE_COND): Likewise.
17107 (WHILE_BODY): Likewise.
17108 (DO_COND): Likewise.
17109 (DO_BODY): Likewise.
17110 (RETURN_EXPR): Likewise.
17111 (EXPR_STMT_EXPR): Likewise.
17112 (FOR_INIT_STMT): Likewise.
17113 (FOR_COND): Likewise.
17114 (FOR_EXPR): Likewise.
17115 (FOR_BODY): Likewise.
17116 (SWITCH_COND): Likewise.
17117 (SWITCH_BODY): Likewise.
17118 (CASE_LOW): Likewise.
17119 (CASE_HIGH): Likewise.
17120 (GOTO_DESTINATION): Likewise.
17121 (COMPOUND_BODY): Likewise.
17122 (ASM_CV_QUAL): Likewise.
17123 (ASM_STRING): Likewise.
17124 (ASM_OUTPUTS): Likewise.
17125 (ASM_INPUTS): Likewise.
17126 (ASM_CLOBBERS): Likewise.
17127 (DECL_STMT_DECL): Likewise.
17128 (STMT_EXPR_STMT): Likewise.
17129 (LABEL_STMT_LABEL): Likewise.
17130 (SCOPE_BEGIN_P): Likewise.
17131 (SCOPE_END_P): Likewise.
17132 (SCOPE_STMT_BLOCK): Likewise.
17133 (SCOPE_NULLIFIED_P): Likewise.
17134 (SCOPE_NO_CLEANUPS_P): Likewise.
17135 (SCOPE_PARTIAL_P): Likewise.
17136 (ASM_VOLATILE_P): Likewise.
17137 (STMT_LINENO): Likewise.
17138 (STMT_LINENO_FOR_FN_P): Likewise.
17140 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17141 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17142 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17143 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17144 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17146 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17148 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17149 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17151 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17152 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17153 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17155 2000-06-14 Mark Mitchell <mark@codesourcery.com>
17157 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17158 * class.c (dfs_find_final_overrider): Set it appropriately.
17159 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17160 avoid unneeded secondary vptrs.
17162 2000-06-13 Jakub Jelinek <jakub@redhat.com>
17164 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17165 (check_bitfield_decl, check_field_decl): Likewise.
17166 (build_vtbl_or_vbase_field, build_base_field): Likewise.
17167 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17168 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17169 (xfer_tag, finish_enum): Likewise.
17170 * decl2.c (finish_builtin_type): Likewise.
17171 * init.c (init_init_processing): Likewise.
17172 * pt.c (instantiate_class_template): Likewise.
17173 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17174 * cp-tree.h (struct lang_type): Add user_align member.
17175 (CLASSTYPE_USER_ALIGN): Define.
17177 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17179 * Make-lang.in (c++.install-common): Install g++-cross in
17180 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17181 $(target_alias)-g++ and $(target_alias)-c++.
17183 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17185 * class.c (vcall_offset_data_s): Add last_init and fns.
17186 (overrides): Rename to same_signature_p.
17187 (dfs_find_final_overrider): Adjust accordingly.
17188 (mark_overriders): Likewise.
17189 (warn_hidden): Likewise.
17190 (build_vtbl_initializer): Reorganize machinery for building things
17191 at negative offsets.
17192 (build_vcall_and_vbase_vtbl_entries): Likewise.
17193 (build_vbase_offset_vtbl_entries): Likewise.
17194 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17195 offset entries. Do not create two entries for functions with the
17197 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17198 (build_rtti_vtbl_entries): Reorganize machinery for building things
17199 at negative offsets.
17201 * optimize.c (expand_call_inline): Don't recurse into the code
17202 used to initialize the parameters more than once.
17204 2000-06-11 Mark Mitchell <mark@codesourcery.com>
17206 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17207 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17208 (find_substitution): Only use the `Sa' substitution for
17209 std::allocator, not instantiations of it.
17210 (write_template_prefix): Move comment. Only use a TREE_LIST to
17211 represent substitutions for a member template.
17212 (write_array_type): Mangle array dimensions correctly.
17213 * optimize.c (maybe_clone_body): Copy more information from the
17215 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17216 on the regenerated declaration.
17218 2000-06-11 Chip Salzenberg <chip@valinux.com>
17219 Mark Mitchell <mark@codesourcery.com>
17221 * class.c (build_vtable): Clarify comment.
17222 (build_ctor_vtbl_group): Pass the most derived type to
17225 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17227 * decl2.c (compare_options): Don't needlessly cast away const-ness.
17229 2000-06-10 Mark Mitchell <mark@codesourcery.com>
17231 * decl.c (add_binding): Handle duplicate declarations of external
17234 2000-06-09 Chip Salzenberg <chip@valinux.com>
17235 Mark Mitchell <mark@codesourcery.com>
17237 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17239 (write_signed_number): New macro.
17240 (write_unsigned_number): Likewise.
17241 (write_source_name): Use them.
17242 (write_number): Handle signed and unsigned values.
17243 (write_integer_cst): Use tree_int_cst_sgn, and use
17244 write_unsigned_number or write_signed_number as appropriate.
17245 (write_discriminator): Use write_unsigned_number or
17246 write_signed_number as appropriate.
17247 (write_template_arg_literal): Likewise.
17248 (write_array_type): Use tree_low_cst.
17249 (write_template_parm): Use write_unsigned_number or
17250 write_signed_number as appropriate.
17251 (write_substitution): Adjust call to write_number.
17252 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17253 (write_expression): Handle non-type template arguments of
17254 reference type correctly.
17255 (mangle_thunk): Use write_signed_number.
17257 2000-06-09 Chip Salzenberg <chip@valinux.com>
17259 * mangle.c (find_substition): Don't mangle objects with typename
17260 substitutions (e.g. "cin" as "Si").
17262 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
17264 * call.c (add_candidate): Use ggc_alloc_cleared.
17265 * decl.c (lookup_label): Likewise.
17266 * lex.c (retrofit_lang_decl): Likewise.
17268 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
17270 * semantics.c (expand_body): Push to TV_EXPAND.
17271 * optimize.c (optimize_function): Push to TV_INTEGRATION.
17272 * decl.c (start_function): Always call announce_function.
17274 * tinfo2.cc: Just declare abort.
17276 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
17278 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17279 whenever @ is a symbolic name.
17281 2000-06-08 Jakub Jelinek <jakub@redhat.com>
17283 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17285 2000-06-07 Mark Mitchell <mark@codesourcery.com>
17287 * decl.c (pushdecl): Look up functions by DECL_NAME, not
17288 DECL_ASSEMBLER_NAME.
17290 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17292 * decl2.c (c_language): Define.
17294 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
17296 * lex.c (lang_init_options): Tweak.
17298 * decl2.c: Remove #inclusion of diagnostic.h
17299 (lang_decode_option): Move diagnostic formatting options to
17302 * lang-options.h: Remove documentation for diagnostic options.
17304 * Makefile.in (lex.o): Depends upon diagnostic.h
17306 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17308 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17309 the same DECL_RESULT, it's not a redefinition.
17310 * pt.c (tsubst_decl): Remove code to handle illegal
17313 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
17315 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17317 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
17319 * search.c (maybe_suppress_debug_info): Don't check
17320 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17322 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17325 Remember instantiation context in deferred instantiations.
17326 * cp-tree.h (struct tinst_level): Remove.
17327 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17328 * pt.c (current_tinst_level): Now a tree.
17329 (print_template_context, push_tinst_level, pop_tinst_level,
17330 tinst_for_decl): Adjust.
17331 (reopen_tinst_level): New fn.
17332 (init_pt): Register current_tinst_level as a root.
17333 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17334 of the pending templates list.
17335 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
17336 * lex.c (extract_interface_info): Adjust.
17337 * decl2.c (warn_if_unknown_interface): Adjust.
17339 2000-06-05 Mark Mitchell <mark@codesourcery.com>
17341 * class.c (indirect_primary_base_p): New function.
17342 (determine_primary_base): Use it.
17344 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
17346 Update new-abi dynamic cast algorithm.
17347 * tinfo.cc (__class_type_info::__dyncast_result): Add
17348 whole_details. Adjust constructor.
17349 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17350 Avoid unnecessary searching.
17351 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17353 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17355 * decl.c (init_decl_processing): Don't call record_component_aliases.
17356 * tree.c (build_cplus_array_type_1): Likewise.
17358 2000-06-04 Mark Mitchell <mark@codesourcery.com>
17360 * ir.texi: Correct typo.
17361 * mangle.c (write_expression): Handle non-type template arguments
17362 with reference type.
17363 * method.c (build_overload_value): Likewise.
17364 * pt.c (convert_nontype_argument): Explicitly represent conversion
17365 to a reference with an ADDR_EXPR.
17366 (unify): Always unify arguments in left-to-right order.
17368 2000-06-03 Alex Samuel <samuel@codesourcery.com>
17369 Mark Mitchell <mark@codesourcery.com>
17371 * Make-lang.in (CXX_SRCS): Add mangle.c.
17372 * Makefile.in (CXX_OBJS): Add mangle.o.
17373 (mangle.o): New rule.
17375 * class.c (local_classes): New variable.
17376 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17377 (get_vtt_name): Use mangle_vtt_name for new ABI.
17378 (init_class_processing): Initialize local_classes.
17379 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17380 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17381 (std_identifier): New macro.
17382 (DECL_VOLATILE_MEMFUNC_P): New macro.
17383 (DECL_NAMESPACE_STD_P): Likewise.
17384 (local_classes): Declare.
17385 (get_mostly_instantiated_function_type): Declare.
17386 (init_mangle): Declare.
17387 (mangle_decl): Likewise.
17388 (mangle_type_string): Likewise.
17389 (mangle_type): Likewise.
17390 (mangle_typeinfo_for_type): Likewise.
17391 (mangle_typeinfo_string_for_type): Likewise.
17392 (mangle_vtbl_for_type): Likewise.
17393 (mangle_vtt_for_type): Likewise.
17394 (mangle_ctor_vtbl_for_type): Likewise.
17395 (mangle_thunk): Likewise.
17396 (mangle_conv_op_name_for_type): Likewise.
17397 (mangle_guard_variable): Likewise.
17398 * decl.c (pushtag): Keep track of local classes.
17399 (initialize_predefined_identifiers): Initialize std_identifier.
17400 (init_decl_processing): Use std_identifier.
17401 (start_decl): Don't treat instantiations as specializations.
17402 (grokdeclarator): Likewise.
17403 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
17404 name for fully-instantiated templates.
17405 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17406 destructors with the new ABI.
17407 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17408 (grokfield): Use mangle_type for new ABI.
17409 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17410 (get_sentry): Use mangle_guard_variable for new ABI.
17411 (start_static_initialization_or_destruction): Likewise.
17412 * expr.c (extract_aggr_init): Remove.
17413 (extract_scalar_init): Likewise.
17414 (extract_init): Remove #if 0'd code.
17415 * mangle.c: New function.
17416 * method.c (build_mangled_name): Assert not flag_new_abi.
17417 (build_static_name): Likewise.
17418 (build_decl_overload_real): Likewise.
17419 (build_typename_overload): Likewise.
17420 (build_overload_with_type): Likewise.
17421 (build_overload_name): Likewise.
17422 (get_ctor_vtbl_name): Likewise.
17423 (start_squangling): Likewise.
17424 (get_id_2): Likewise.
17425 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17426 (init_method): Call init_mangle for new ABI.
17427 (make_thunk): Call mangle_thunk for new ABI.
17428 * operators.def: Correct new ABI manglings for the `%' operator.
17430 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17431 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17432 (lookup_template_class): Call mangle_decl for new ABI.
17433 (get_mostly_instantiated_function_type): New function.
17434 (set_mangled_name_for_template_decl): Use it.
17435 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17436 the new ABI. Use mangle_conv_op_name_for_type for instantiated
17437 conversion op names.
17438 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17439 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17440 (tinfo_base_init): Likewise. Mangle typeinfo string name with
17441 mangle_typeinfo_string_for_type.
17443 2000-06-03 Mark Mitchell <mark@codesourcery.com>
17445 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17446 (INNERMOST_TEMPLATE_ARGS): New macro.
17447 (innermost_args): Remove.
17448 (get_innermost_template_args): New function.
17449 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17450 * error.c (dump_function_decl): Be caution when using
17451 most_general_template.
17452 * method.c (build_template_parm_names): Use
17453 INNERMOST_TEMPLATE_ARGS.
17454 * pt.c (add_to_template_args): Tidy comment
17455 (get_innermost_template_args): New function.
17456 (check_explicit_specialization): Clear DECL_INITIAL for a new
17458 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17460 (push_template_decl): Always register specializations of the most
17462 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17463 (coerce_template_parms): Likewise.
17464 (lookup_template_class): Likewise.
17465 (innermost_args): Remove.
17466 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17467 (tsubst_decl): Handle tricky specializations. Use
17468 get_innermost_template_args.
17469 (instantiate_template): Simplify handling of partial
17471 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17472 (most_general_template): Reimplement, in a more straightforward
17474 (regenerate_decl_from_template): Tweak formatting. Use
17475 TMPL_ARGS_DEPTH for clarity.
17476 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17478 * dump.c (dequeue_and_dump): Dump information about thunks.
17480 2000-06-01 Richard Henderson <rth@cygnus.com>
17482 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17484 2000-06-01 Richard Henderson <rth@cygnus.com>
17486 * decl2.c (unsupported_options): Fix typo, make const.
17487 (lang_decode_option): Fix bsearch argument order.
17489 2000-06-01 Mark Mitchell <mark@codesourcery.com>
17491 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17494 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17496 * cp-tree.h (c_get_alias_set): Deleted.
17497 * Makefile.in (decl.o): Include ../expr.h.
17498 * decl.c (expr.h): Include.
17499 (init_decl_processing): Call record_component_aliases for arrays.
17500 (grokdeclarator): Likewise.
17501 Set TREE_ADDRESSABLE for fields that aren't bitfields.
17502 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17504 2000-05-31 Mark Mitchell <mark@codesourcery.com>
17506 Remove guiding declaration support.
17507 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17508 (flag_guiding_decls): Remove.
17509 * call.c (build_user_type_conversion_1): Remove support for
17511 (build_new_function_call): Likewise.
17512 (build_new_op): Likewise.
17513 (build_new_method_call): Likewise.
17514 * decl.c (start_function): Likewise.
17515 * friend.c (is_friend): Likewise.
17516 (do_friend): Likewise.
17517 * decl2.c ((flag_dump_translation_unit): Make it const.
17518 (flag_guiding_decls): Remove.
17519 (unsupported_options): New variable
17520 (compare_options): New function.
17521 (lang_decode_option): Use them.
17523 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17525 * method.c (mangle_expression): Adjust test for legal expression
17528 * pt.c (instantiate_decl): Save and restore the local
17529 specializations list.
17531 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
17533 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17535 2000-05-30 Mark Mitchell <mark@codesourcery.com>
17537 * call.c (add_template_candidate_real): Handle member template
17538 constructors for classes with virtual bases.
17539 (build_user_type_conversion_1): Use in_charge_arg_for_name.
17540 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17542 * ir.texi: Update thunk documentation.
17544 * call.c (joust): Fix handling of overloaded builtin operators.
17546 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
17548 * cp-tree.h (DECL_ANTICIPATED): New macro.
17549 Document new use of DECL_LANG_FLAG_7.
17550 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17551 in the user namespace.
17552 * lex.c (do_identifier): If the identifier's declaration has
17553 DECL_ANTICIPATED on, it has not yet been declared. But do not
17554 replace it with an ordinary implicit declaration.
17556 * tinfo2.cc: Include stdlib.h.
17558 2000-05-29 Mark Mitchell <mark@codesourcery.com>
17560 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17561 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17564 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
17566 * decl2.c (lang_decode_option): Use skip_leading_substring instead
17569 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
17571 * operators.def (<?): Duplicated, should have been...
17574 2000-05-27 Alex Samuel <samuel@codesourcery.com>
17575 Mark Mitchell <mark@codesourcery.com>
17577 * cp-tree.h (ansi_opname): Make it a macro.
17578 (ansi_assopname): Likewise.
17579 (struct lang_decl_flags): Add assignment_operator_p.
17580 (struct lang_decl): Add operator_code.
17581 (DECL_VTT_PARM): Adjust.
17582 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17583 overloaded operator.
17584 (SET_OVERLOADED_OPERATOR_CODE): New macro.
17585 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17586 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17587 (opname_tab): Remove.
17588 (assignop_tab): Likewise.
17589 (operator_name_info_t): New type.
17590 (operator_name_info): New variable.
17591 (assignment_operator_name_info): Likewise.
17592 (build_cp_library_fn): Remove declaration.
17593 (push_cp_library_fn): Likewise.
17594 (operator_name_string): Likewise.
17595 (build_decl_overload): Likewise.
17596 * call.c (print_z_candidates): Simplify.
17597 (build_object_call): Adjust usage of ansi_opname. Use
17598 DECL_OVERLOADED_OPERATOR_P.
17599 (op_error): Adjust operator name lookup.
17600 (build_conditional_expr): Adjust usage of ansi_opname.
17601 (build_new_op): Likewise.
17602 (build_op_delete_call): Likewise.
17603 (build_over_call): Likewise.
17604 (joust): Use DECL_OVERLOADED_OPERATOR_P.
17605 * decl.c (duplicate_decls): Copy operator_code.
17606 (init_decl_processing): Adjust parameters to push_cp_library_fn.
17607 (builtin_function): Adjust parameters to build_library_fn_1.
17608 (build_library_fn_1): Accept an overloaded operator code.
17609 (build_library_fn): Pass ERROR_MARK.
17610 (build_cp_library_fn): Accept an overloaded operator code.
17611 (push_cp_library_fn): Likewise.
17612 (grokfndecl): Tweak.
17613 (grokdeclarator): Simplify code to compute names of overloaded
17614 operators. Adjust use of ansi_opname.
17615 (ambi_op_p): Work on tree_codes, not identifiers.
17616 (unary_op_p): Likewise.
17617 (grok_op_properties): Likewise.
17618 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17619 (lang_mark_tree): Don't try to mark the operator_code.
17620 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17621 * error.c (dump_decl): Remove special handling for operator
17623 (dump_function_name): Likewise.
17624 (dump_expr): Adjust name lookup of operators.
17625 (op_to_string): Simplify.
17626 (assop_to_string): Likewise.
17627 * init.c (build_new_1): Adjust use of ansi_opname.
17628 * lex.c (opname_tab): Remove.
17629 (assignop_tab): Likewise.
17630 (ansi_opname): Likewise.
17631 (ansi_assopname): Likewise.
17632 (operator_name_string): Likewise.
17633 (reinit_lang_specific): Likewise.
17634 (operator_name_info): New variable.
17635 (assignment_operator_name_info): Likewise.
17636 (init_operators): New function.
17637 (init_parse): Use it.
17638 (do_identifier): Adjust use of ansi_opname.
17639 * method.c (mangle_expression): Don't use ansi_opname for
17641 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17642 (build_decl_overload): Remove.
17643 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17644 (do_build_assign_ref): Adjust use of ansi_opname.
17645 (synthesize_method): Likewise.
17646 (implicitly_declare_fn): Likewise.
17647 * operators.def: New file.
17648 * parse.y (operator): Adjust use of ansi_opname.
17649 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17650 (set_mangled_name_for_template_decl): Don't play games with
17652 (special_function_p): Adjust use of ansi_opname.
17653 * typeck.c (check_return_expr): Likewise.
17654 * Make-lang.in (cc1plus): Depend on operators.def.
17655 * Makefile.in (lex.o): Likewise.
17656 (decl.o): Likewise.
17658 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
17660 * Make-lang.in (cplib2.ready): Eradicate.
17662 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17664 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17665 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17666 (built_min, cp_tree_equal): Likewise.
17668 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17670 * class.c (layout_nonempty_base_or_field): Replace
17671 `record_layout_info' with `record_layout_info_s'.
17673 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
17676 * cp-tree.h (struct language_function): x_named_labels is now
17677 a struct named_label_list*.
17678 * decl.c (struct named_label_use_list): Renamed from...
17679 (struct named_label_list): ...this. New struct.
17680 (push_binding_level): Don't set eh_region.
17681 (note_level_for_eh): New fn.
17682 (pop_label): Take label and old value directly.
17683 (pop_labels): Adjust for new named_labels format.
17684 (lookup_label): Likewise.
17685 (poplevel): Note characteristics of a binding level containing a
17686 named label. Mess with named label lists earlier.
17687 (mark_named_label_lists): New fn.
17688 (mark_lang_function): Call it.
17689 (use_label): New fn, split out from...
17690 (make_label_decl): ...here. Don't call it.
17691 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17692 check_previous_gotos): New fns, split out from...
17693 (define_label): ...here.
17694 (check_switch_goto): New fn.
17695 (define_case_label): Call it.
17696 (check_goto): New fn.
17697 * semantics.c (finish_goto_stmt): Call it and use_label.
17698 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17699 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17701 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17703 * class.c (build_vtable_entry_ref): Correct usage of
17704 get_vtbl_decl_for_binfo.
17706 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17707 * method.c (implicitly_declare_fn): Not here.
17709 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
17711 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17712 (CPTI_PTMD_DESC_TYPE): ... here.
17713 (ptmd_desc_type_node): Rename to ...
17714 (ptm_desc_type_node): ... here.
17715 * decl.c: Likewise.
17716 * rtti.c (ptmd_initializer): Rename to ...
17717 (ptm_initializer): ... here.
17718 (sythesize_tinfo_var): Adjust. Deal with pointer to member
17720 (create_tinfo_types): Adjust.
17722 2000-05-25 Mark Mitchell <mark@codesourcery.com>
17724 Finish implementation of VTTs.
17725 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17726 CPTI_VTT_PARM_IDENTIFIER.
17727 (vtt_parm_identifier): New macro.
17728 (vtt_parm_type): Likewise.
17729 (BINFO_SUBVTT_INDEX): Likewise.
17730 (BINFO_VPTR_INDEX): Likewise.
17731 (struct lang_decl): Add vtt_parm.
17732 (DECL_VTT_PARM): New macro.
17733 (DECL_USE_VTT_PARM): Likewise.
17734 (DECL_NEEDS_VTT_PARM_P): Likewise.
17735 (get_vtt_name): Declare.
17736 (build_artificial_parm): Likewise.
17737 (fixup_all_virtual_upcast_offsets): Likewise.
17738 (expand_indirect_vtbls_init): Remove.
17739 * call.c (build_new_method_call): Pass the vtt to subobject
17740 constructors and destructors.
17741 * class.c (get_vtt_name): Give it external linkage.
17742 (build_clone): Handle the magic VTT parameters for clones.
17743 (clone_function_decl): Fix typo in comment.
17744 (build_vtt): Keep track of the indices in the VTTs where various
17745 entities are stored.
17746 (build_vtt_inits): Likewise.
17747 (dfs_build_vtt_inits): Likewise.
17748 (build_ctor_vtbl_group): Tweak type of construction vtables.
17749 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17750 primary bases, when building construction vtables.
17751 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17752 (initialize_predefined_identifiers): Add vtt_parm_identifier.
17753 (init_decl_processing): Initialize vtt_parm_type.
17754 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17755 (lang_mark_tree): Make vtt_parm.
17756 * decl2.c (build_artificial_parm): New function.
17757 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
17758 (grokclassfn): Use build_artificial_parm.
17759 * init.c (initialize_vtbl_ptrs): Call
17760 fixup_all_virtual_upcast_offsets directly.
17761 (perform_member_init): Use the complete subobject destructor for
17763 (build_vtbl_address): New function.
17764 (expand_virtual_init): Handle VTTs.
17765 * optimize (maybe_clone_body): Likewise.
17766 * search.c (fixup_all_virtual_upcast_offsets): Give it external
17768 (expand_indirect_vtbls_init): Remove.
17769 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17770 * tree.c (make_binfo): Make them bigger.
17772 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17774 * inc/cxxabi.h (__pbase_type_info): Define, based on
17775 __pointer_type_info.
17776 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17777 (__pointer_to_member_type_info): Likewise.
17778 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17779 (__pointer_to_member_type_info::__is_pointer_p): Remove.
17780 (__pointer_type_info::__do_catch): Rename to ...
17781 (__pbase_type_info::__do_catch): ... here. Adjust.
17782 (__pbase_type_info::__pointer_catch): Implement.
17783 (__pointer_type_info::__pointer_catch): Adjust.
17784 (__pointer_to_member_type_info::__pointer_catch): Adjust.
17786 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17788 * tinfo.h (__user_type_info::contained_virtual_p): New
17790 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17792 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17793 diamond shaped hierarchy. Add early out for mixed diamond and
17794 duplicate shaped hierarchy.
17796 2000-05-24 Mark Mitchell <mark@codesourcery.com>
17798 * cp-tree.h (build_delete): Change prototype.
17799 (build_vec_delete): Likewise.
17800 * call.c (build_scoped_method_call): Use special_function_kind
17801 values to indicate the kind of destruction to be done.
17802 (build_method_call): Likewise.
17803 * decl.c (finish_destructor_body): Likewise.
17804 (maybe_build_cleanup_1): Likewise. Rename to ...
17805 (maybe_build_cleanup): ... this.
17806 * decl2.c (delete_sanity): Use special_function_kind
17807 values to indicate the kind of destruction to be done.
17808 (build_cleanup): Likewise.
17809 * init.c (perform_member_init): Likewise.
17810 (build_vec_delete_1): Likewise.
17811 (build_dtor_call): Simplify.
17812 (build_delete): Use special_function_kind
17813 values to indicate the kind of destruction to be done.
17814 (build_vbase_delete): Likewise.
17815 (build_vec_delete): Likewise.
17817 * init.c (sort_member_init): Fix typo in error message generation
17820 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
17822 * semantics.c (begin_class_definition): make the packed
17823 attribute be sensitive to the "-fpack-struct" command line flag
17825 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
17827 Update new-abi upcast algorithm.
17828 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17829 prototype and meaning of return value.
17830 (__si_class_type_info::__do_upcast): Likewise.
17831 (__vmi_class_type_info::__do_upcast): Likewise.
17832 * tinfo.cc (__class_type_info::__upcast_result): Replace
17833 whole2dst with part2dst. Adjust ctor.
17834 (__class_type_info::__do_upcast): Adjust call of worker function.
17835 (__class_type_info::__do_upcast): Adjust.
17836 (__si_class_type_info::__do_upcast): Adjust. Use parent's
17838 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17839 virtual base in diamond hierarchy bug.
17841 2000-05-23 Mark Mitchell <mark@codesourcery.com>
17843 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17844 and bitfield to tinfo_fn_p.
17845 (DECL_TINFO_FN_P): Adjust.
17846 (SET_DECL_TINFO_FN_P): Likewise.
17847 (DECL_MUTABLE_P): Likewise.
17848 (DECL_C_BIT_FIELD): Likewise.
17849 (SET_DECL_C_BIT_FIELD): Likewise.
17850 (CLEAR_DECL_C_BIT_FIELD): Likewise.
17851 (DECL_UNINLINABLE): Likewise.
17852 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17853 (handle_using_decl): Remove assertion.
17854 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17855 to build FIELD_DECLs.
17856 (build_base_field): Likewise.
17857 (layout_class_type): Likewise.
17858 * decl.c (init_decl_processing): Likewise.
17859 (build_ptrmemfunc_type): Likewise.
17860 (grokdeclarator): Likewise.
17861 * decl2.c (grok_x_components): Likewise.
17862 * except.c (call_eh_info): Likewise.
17863 * init.c (init_init_processing): Likewise.
17864 * rtti.c (expand_class_desc): Likewise.
17865 (create_pseudo_type_info): Likewise.
17866 (get_vmi_pseudo_type_info): Likewise.
17867 (create_tinfo_types): Likewise.
17868 * ptree.c (print_lang_decl): Adjust.
17869 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17870 before checking DECL_MUTABLE_P.
17872 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17873 parameters for template functions.
17874 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17875 destructors as well as constructors.
17877 2000-05-22 Mark Mitchell <mark@codesourcery.com>
17879 * class.c (build_ctor_vtbl_group): Set inits.
17880 * optimize.c (maybe_clone_body): Set DECL_INLINE and
17881 DECL_THIS_INLINE appropriately for clones.
17883 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17884 (DECL_CONV_FN_P): Simplify.
17885 (DECL_OPERATOR): Remove.
17886 (language_to_string): Declare.
17887 * decl.c (duplicate_decls): Fix typo in comment.
17888 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17889 (grok_op_properties): Use DECL_CONV_FN_P instead of
17890 IDENTIFIER_TYPENAME_P.
17891 * dump.c (dequeue_and_dump): Dump the language linkage of
17893 * error.c (language_to_string): Give it external linkage.
17894 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17895 (implicitly_declare_fn): Set DECL_LANGUAGE.
17896 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17897 IDENTIFIER_TYPENAME_P.
17898 (tsubst_decl): Likewise.
17899 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17900 * semantics.c (finish_member_declaration): Don't mark members of
17901 classes declared in an extern "C" region as extern "C".
17903 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17905 * decl2.c (qualified_lookup_using_namespace): Look through
17908 * decl.c (push_using_decl): Return the old decl on namespace level.
17910 2000-05-21 Mark Mitchell <mark@codesourcery.com>
17912 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17913 (VTT_NAME_PREFIX): New macro.
17914 (CTOR_VTBL_NAME_PREFIX): Likewise.
17915 (get_ctor_vtbl_name): New function.
17916 * class.c (get_vtable_name): Simplify.
17917 (get_vtt_name): New function.
17918 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17919 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17920 when a virtual base becomes primary.
17921 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
17923 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17924 additional parameters.
17925 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17926 (initialize_array): New function.
17927 (build_vtt): Likewise.
17928 (build_vtt_inits): Likewise.
17929 (dfs_build_vtt_inits): Likewise.
17930 (dfs_fixup_binfo_vtbls): Likewise.
17931 (build_ctor_vtbl_group): Likewise.
17932 (initialize_vtable): Use initialize_array.
17933 (accumulate_vtbl_inits): Reimplement to handle construction
17935 (dfs_accumulate_vtbl_inits): Likewise.
17936 (bulid_vtbl_initializer): Adjust parameter name.
17937 * method.c (build_typename_overload): Remove #if 0'd code.
17938 (get_ctor_vtbl_name): New function.
17939 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17940 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17942 * cp-tree.h (struct lang_type): Remove search_slot.
17943 (CLASSTYPE_SEARCH_SLOT): Remove.
17944 (emit_base_init): Change prototype.
17945 (initialize_vtbl_ptrs): Likewise.
17946 (expand_indirect_vtbls_init): Likewise.
17947 (clear_search_slots): Remove.
17948 * decl.c (lang_mark_tree): Don't mark search_slot.
17949 * init.c (initialize_vtbl_ptrs): Simplify.
17950 (emit_base_init): Likewise.
17951 * search.c (struct vbase_info): Document decl_ptr.
17952 (convert_pointer_to_single_level): Remove.
17953 (dfs_find_vbases): Remove.
17954 (dfs_init_base_pointers): Simplify.
17955 (dfs_clear_vbase_slots): Remove.
17956 (dfs_vtable_path_unmark): New function.
17957 (init_vbase_pointers): Simplify.
17958 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17959 (expand_indirect_vtbls_init): Simplify. Don't call
17960 mark_all_temps_used.
17961 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17962 initialize_vtbl_ptrs.
17964 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
17966 * except.c: Add static prototypes.
17968 2000-05-20 H.J. Lu <hjl@gnu.org>
17970 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17972 2000-05-19 Mark Mitchell <mark@codesourcery.com>
17974 Don't create a separate copy of virtual bases for the
17975 CLASSTYPE_VBASECLASSES list.
17976 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17977 (BINFO_FOR_VBASE): Remove.
17978 (CANONICAL_BINFO): Adjust.
17979 (binfo_for_vbase): New function.
17980 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17981 instead of BINFO_FOR_VBASE.
17982 (build_vbase_pointer): Likewise.
17983 (build_secondary_vtable): Likewise.
17984 (dfs_mark_primary_bases): Likewise.
17985 (mark_primary_bases): Likewise.
17986 (layout_nonempty_base_or_field): Likewise.
17987 (dfs_set_offset_for_shared_vbases): Likewise.
17988 (dfs_set_offset_for_unshared_vbases): Likewise.
17989 (layout_virtual_bases): Likewise. Adjust for changes to the
17990 CLASSTYPE_VBASECLASSES list.
17991 (dump_class_hierarchy_r): Use binfo_for_vbase
17992 instead of BINFO_FOR_VBASE.
17993 (dump_class_hierarchy): Likewise.
17994 (finish_vtbls): Likewise.
17995 (build_vtbl_initializer): Adjust for changes to the
17996 CLASSTYPE_VBASECLASSES list.
17997 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17998 * decl.c (finish_destructor_body): Adjust for changes to the
17999 CLASSTYPE_VBASECLASSES list.
18000 * init.c (sort_base_init): Use binfo_for_vbase.
18001 (construct_virtual_bases): Adjust for changes to the
18002 CLASSTYPE_VBASECLASSES list.
18003 (expand_member_init): Use binfo_for_vbase.
18004 (build_vbase_delete): Adjust for changes to the
18005 CLASSTYPE_VBASECLASSES list.
18006 * method.c (do_build_copy_constructor): Likewise.
18007 * rtti.c (get_base_offset): Use binfo_for_vbase.
18008 (expand_class_desc): Remove #if 0'd code.
18009 * search.c (struct vbase_info): Remove vbase_types.
18010 (get_base_distance): Use binfo_for_vbase.
18011 (lookup_field_queue_p): Use CANONICAL_BINFO.
18012 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18013 (get_pure_virtuals): Adjust for changes to the
18014 CLASSTYPE_VBASECLASSES list.
18015 (dfs_find_vbases): Use binfo_for_vbase.
18016 (dfs_init_vbase_pointers): Likewise.
18017 (init_vbase_pointers): Don't initialize vi.vbase_types.
18018 (virtual_context): Use binfo_for_vbase.
18019 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18020 CLASSTYPE_VBASECLASSES list.
18021 (expand_indirect_vtbls_init): Simplify.
18022 (dfs_get_vbase_types): Don't replicate virtual bases.
18023 (find_vbase_instance): Use binfo_for_vbase.
18024 (binfo_for_vbase): New function.
18025 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18027 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18029 * decl2.c (finish_anon_union): Generalize error messages to handle
18030 anonymous structures.
18031 * init.c (perform_member_init): Remove `name' parameter.
18032 (build_field_list): New function.
18033 (sort_member_init): Handle anonymous union initialization order
18034 correctly. Check for multiple initializations of the same union.
18035 (emit_base_init): Don't look up fields by name here.
18036 (expand_member_init): Record the result of name lookup for future
18038 * typeck.c (build_component_ref): Fix formatting.
18040 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18042 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18043 * typeck.c (build_x_compound_expr): Replace warn_unused with
18046 * decl2.c (lang_decode_option): Update -Wall unused flags by
18047 calling set_Wunused.
18049 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18051 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18052 * init.c (dfs_vtable_path_unmark): Remove.
18053 * search.c (marked_new_vtable_p): Likewise.
18054 (unmarked_new_vtable_p): Likewise.
18055 (dfs_search_slot_nonempty_p): Likewise.
18056 (dfs_mark): Likewise.
18057 (dfs_vtable_path_unmark): Likewise.
18058 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18059 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18060 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18061 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18062 (init_vbase_pointers): Simplify.
18063 (expand_indirect_vtbls_init): Likewise.
18065 * class.c (copy_virtuals): New function.
18066 (build_primary_table): Use it.
18067 (build_secondary_vtable): Likewise.
18068 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18069 indicate that no vcall offset is required.
18070 (add_virtual_function): Likewise.
18071 (modify_all_vtables): Likewise.
18072 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18073 (dfs_accumulate_vtbl_inits): Likewise.
18074 (build_vtbl_initializer): Make changes to handle construction
18076 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18077 (build_rtti_vtbl_entries): Likewise.
18078 (build_vtable_entries): Handle a NULL vcall_index.
18080 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18082 * decl2.c (lang_decode_option): Fix thinko.
18084 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18086 * except.c (check_handlers): New fn.
18087 * cp-tree.h: Declare it.
18088 * semantics.c (finish_handler_sequence): Call it.
18089 (finish_function_handler_sequence): Likewise.
18090 (finish_handler_parms): Set TREE_TYPE on the handler.
18091 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18092 * search.c (get_base_distance_recursive): If protect>1, ignore
18094 (get_base_distance): Don't reduce watch_access.
18096 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18098 * lex.c: #include diagnostic.h.
18099 (lang_init_options): Set default prefixing rules.
18101 * lang-options.h: Add -fdiagnostics-show-location=.
18103 * decl2.c: #include diagnostic.h.
18104 (lang_decode_option): Handle -fdiagnostics-show-location=.
18106 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18108 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18109 * vec.cc: Revert my 2000-05-07 change.
18111 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18113 * class.c (check_field_decls): Complain about non-static data
18114 members with same name as class in class with constructor.
18116 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18118 * decl.c (grokdeclarator): Allow non-static data members with
18119 same name as class.
18121 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18123 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18124 and pending_inline.filename. Update prototypes.
18125 * decl.c (define_label): Constify filename parameter.
18126 * decl2.c (warn_if_unknown_interface): Constify local char *.
18127 * input.c Constify input_source.filename. Don't declare
18128 input_filename or lineno. Constify filename parameter to feed_input.
18129 * lex.c (init_parse): Constify parameter and return value.
18130 (cp_pragma_interface, cp_pragma_implementation): Constify
18132 (reinit_parse_for_method, reinit_parse_for_block,
18133 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18134 Constify local char *.
18135 * pt.c: Don't declare lineno or input_filename.
18136 (print_template_context, tsubst_friend_function, tsubst_decl,
18137 tsubst, instantiate_decl): Constify local char *.
18138 * semantics.c (expand_body): Constify local char *.
18139 * tree.c (build_srcloc): Constify filename parameter.
18140 * typeck.c (c_expand_asm_operands): Constify filename
18143 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
18145 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18146 offsetof expansion.
18148 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
18150 * inc/cxxabi.h: Fix typos in comment.
18151 (__base_class_info::__offset): Use a static_cast.
18153 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
18155 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18156 of std::size_t and std::ptrdiff_t respectively.
18157 * tinfo.cc: Likewise.
18158 * vec.cc: Likewise.
18160 2000-05-06 Richard Henderson <rth@cygnus.com>
18162 * typeck.c (build_c_cast): Don't warn integer->pointer size
18163 mismatch for constants.
18165 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
18167 * rtti.c (ptmd_initializer): Set non-public, if class is
18170 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18171 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18172 __cxa_vec_delete): Likewise.
18173 * tinfo.cc (__dynamic_cast): Likewise.
18174 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18175 __cxa_vec_delete): Likewise.
18177 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18179 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18180 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18181 (lang_decl_flags): Add vcall_offset.
18182 (THUNK_VCALL_OFFSET): Use it.
18183 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18184 * method.c (make_thunk): Create the lang_decl here, not in
18186 (emit_thunk): Make generic thunks into ordinary functions once
18187 they have been fed to expand_body.
18188 * semantics.c (expand_body): Set current_function_is_thunk here.
18190 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18192 * class.c (update_vtable_entry_for_fn): Prototype.
18194 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18197 * search.c (dfs_build_inheritance_graph_order): Prototype.
18199 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18201 * cp-tree.h (special_function_kind): Add various kinds of
18203 (special_function_p): New function.
18204 * class.c (overrides): Don't let one kind of destructor override
18206 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18207 whether or not to instantiate a template.
18208 * tree.c (special_function_p): Define.
18210 2000-05-03 Mark Mitchell <mark@codesourcery.com>
18212 * cp-tree.def (THUNK_DECL): Remove.
18213 * cp-tree.h (DECL_THUNK_P): New macro.
18214 (DECL_NON_THUNK_FUNCTION_P): Likewise.
18215 (DECL_EXTERN_C_FUNCTION_P): Likewise.
18216 (SET_DECL_THUNK_P): Likewise.
18217 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18218 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18219 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18220 * decl.c (decls_match): Use DECL_EXTERN_C_P.
18221 (duplicate_decls): Likewise.
18222 (pushdecl): Likewise. Adjust thunk handling.
18223 (grokfndecl): Use DECL_EXTERN_C_P.
18224 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18225 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18226 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18227 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18228 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
18229 DECL_NO_STATIC_CHAIN.
18230 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
18231 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18232 * search.c (covariant_return_p): Remove THUNK_DECL handling.
18235 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18237 * tree.c (walk_tree): Set lineno.
18239 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18241 * exception.cc: Update license notice.
18242 * new.cc: Likewise.
18243 * new1.cc: Likewise.
18244 * new2.cc: Likewise.
18245 * tinfo.cc: Likewise.
18246 * tinfo2.cc: Likewise.
18247 * vec.cc: Likewise.
18248 * inc/cxxabi.h: Likewise.
18249 * inc/exception: Likewise.
18250 * inc/new: Likewise.
18251 * inc/new.h: Likewise.
18252 * inc/typeinfo: Likewise.
18254 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18256 * tree.c (build_target_expr_with_type): If we already have a
18257 TARGET_EXPR, just return it.
18259 * optimize.c (initialize_inlined_parameters): Don't generate an
18260 EXPR_STMT if we can just use DECL_INITIAL.
18261 * decl.c (emit_local_var): Only make the initialization a
18262 full-expression if stmts_are_full_exprs_p.
18264 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18266 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18268 * call.c (standard_conversion): Use it.
18269 (direct_reference_binding): Likewise.
18270 (build_over_call): Likewise.
18271 (is_properly_derived_from): Likewise.
18272 (compare_ics): Likewise.
18273 * class.c (resolves_to_fixed_type_p): Likewise.
18274 * optimize.c (declare_return_variable): Likewise.
18275 * pt.c (is_specialization_of): Likewise.
18277 * typeck.c (comp_target_parms): Likeiwse.
18278 (build_static_cast): Likewise.
18279 (build_reinterpret_cast): Likewise.
18280 (build_const_cast): Likewise.
18281 (comp_ptr_ttypes_real): Likewise.
18282 (comp_ptr_ttypes_const): Likewise.
18283 * typeck2.c (process_init_constructor): Likewise.
18285 2000-04-30 Scott Snyder <snyder@fnal.gov>
18287 * decl.c (finish_destructor_body): Use the base destructor when
18288 destroying virtual bases.
18290 2000-04-30 Mark Mitchell <mark@codesourcery.com>
18292 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18294 * optimize.c (struct inline_data): Add target_exprs field.
18295 (declare_return_variable): When a function returns an aggregate,
18296 use the variable declared in the TARGET_EXPR as the remapped
18298 (expand_call_inline): Update the pending target_exprs stack.
18299 (optimize_function): Initialize the stack.
18301 * decl2.c (finish_file): Fix typo in comment.
18303 * method.c (emit_thunk): Don't try to return a `void' value.
18305 * optimize.c (initialize_inlined_parameters): If the parameter is
18306 addressable, we need to make a new VAR_DECL, even if the
18307 initializer is constant.
18309 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
18311 * decl.c (grok_op_properties): Add an extra check of argtypes.
18313 2000-04-27 Mark Mitchell <mark@codesourcery.com>
18315 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18317 (initialize_inlined_parameters): Try to avoid creating new
18320 2000-04-27 Alex Samuel <samuel@codesourcery.com>
18322 * lex.c (my_get_run_time): Remove.
18323 (init_filename_times): Use get_run_time instead of my_get_run_time.
18324 (check_newline): Likewise.
18325 (dump_time_statistics): Likewise.
18326 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18327 of computing elapsed time explicitly.
18329 2000-04-26 Mark Mitchell <mark@codesourcery.com>
18331 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18332 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18333 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18334 before calling decl_constant_value.
18335 * class.c (check_bitfield_decl): Likewise.
18336 * cvt.c (ocp_convert): Likewise.
18337 (convert): Likewise.
18338 * decl.c (compute_array_index_type): Likewise.
18339 (build_enumerator): Likewise.
18340 * decl2.c (check_cp_case_value): Likewise.
18341 * pt.c (convert_nontype_argument): Likewise.
18342 (tsubst): Likewise.
18343 * typeck.c (decay_conversion): Likewise.
18344 (build_compound_expr): Likewise.
18345 (build_reinterpret_cast): Likewise.
18346 (build_c_cast): Likewise.
18347 (convert_for_assignment): Likewise.
18349 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
18351 * decl.c (finish_function): Don't play games with DECL_INLINE.
18353 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
18355 * ir.texi: Correct typo.
18357 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18359 * decl.c (grokdeclarator): Reject VLAs as members.
18361 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
18363 * call.c (standard_conversion): Accept conversion between
18366 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18368 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
18370 * decl2.c (finish_file): Remove double setup for accounting
18373 2000-04-24 Robert Lipe <robertlipe@usa.net>
18375 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18377 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
18379 * new.cc (set_new_handler): Needs to be in std::.
18381 2000-04-23 Mark Mitchell <mark@codesourcery.com>
18383 * cp-tree.h (lang_decl): Remove pretty_function_p.
18384 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18385 language-specific node.
18386 * decl.c (cp_make_fname_decl): Use build_decl, not
18387 build_lang_decl, to build the variables.
18388 (grokvardecl): Don't call build_lang_decl for local variables in
18390 (grokdeclarator): Don't call build_lang_decl for local type
18391 declarations in templates.
18392 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18393 zero'd memory, rather than calling memset.
18394 * pt.c: Include hashtab.h.
18395 (local_specializations): New variable.
18396 (retrieve_local_specialization): Use it.
18397 (register_local_specialization): Likewise.
18398 (tsubst_decl): Don't assume local variables have
18399 DECL_LANG_SPECIFIC.
18400 (instantiate_decl): Set up local_specializations.
18401 * Makefile.in (HTAB_H): New variable.
18403 2000-04-23 Richard Henderson <rth@cygnus.com>
18405 * typeck.c (c_expand_asm_operands): Restore the original
18406 contents of the output list.
18408 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
18410 * ir.texi: Document complex number representation.
18412 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
18414 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18415 (target_incomplete_p): New function.
18416 (tinfo_base_init): Create comdat NTBS name variable.
18417 (ptr_initializer): Add non_public parameter. Calculate it.
18418 (ptmd_initializer): Likewise.
18419 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18420 (create_real_tinfo_var): Add non_public parameter. Use it.
18421 Push proxy into global namespace.
18422 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18424 * inc/typeinfo (type_info::before, type_info::operator==):
18425 Compare __name addresses.
18427 * tinfo2.cc: Remove new-abi builtins comment.
18429 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
18431 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18433 * call.c (joust): Exit early if we get the same function, too.
18435 * decl2.c (key_method): Return NULL_TREE for template classes.
18436 (import_export_class): Don't need to check for template classes.
18438 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
18440 * lex.c: Remove references to cccp.c.
18442 2000-04-18 Mark Mitchell <mark@codesourcery.com>
18444 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18445 volatile_memfunc. Add destructor_attr. Adjust dummy.
18446 (DECL_DESTRUCTOR_P): Use destructor_attr.
18447 (DECL_CONST_MEMFUNC_P): Reimplement.
18448 (DECL_VOLATILE_MEMFUNC_P): Remove.
18449 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18450 (overrides): Use DECL_DESTRUCTOR_P.
18451 (check_for_override): Likewise.
18452 * decl.c (start_function): Likewise.
18453 * decl2.c (grokfclassfn): Likewise.
18454 (check_classfn): Likewise.
18455 (grok_function_init): Likewise.
18457 2000-04-17 Mark Mitchell <mark@codesourcery.com>
18459 * decl2.c (grokfield): Issue error on illegal data member
18462 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
18464 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18466 2000-04-16 Mark Mitchell <mark@codesourcery.com>
18468 * class.c (build_vtable_entry): Don't build thunks for type-info
18471 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
18473 * decl.c (decls_match): Allow a redeclaration of a builtin to
18474 specify args while the builtin did not.
18476 2000-04-15 Mark Mitchell <mark@codesourcery.com>
18478 * cp-tree.def (THUNK_DECL): Add to documentation.
18479 * cp-tree.h (flag_huge_objects): Declare.
18480 * class.c (modify_vtable_entry): Tidy.
18481 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18482 Calculate delta appropriately for the new ABI.
18483 (dfs_modify_vtables): Use it.
18484 (modify_all_vtables): Fix thinko in code to add overriding copies
18485 of functions to primary vtables.
18486 (build_clone): Fix typo in comment.
18487 (clone_function_decl): Correct order of destructors in vtable.
18488 (build_vbase_offset_vtbl_entries): Adjust comment.
18489 (dfs_vcall_offset_queue_p): Remove.
18490 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18491 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18492 (build_vtable_entry): Correct check for pure virtual functions.
18493 Don't declare flag_huge_objects.
18494 * decl.c (flag_huge_objects): Remove declaration.
18495 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18496 Use int_size_in_bytes.
18497 (emit_thunk): Handle vcall offset thunks.
18499 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18501 * decl2.c (parse_time, varconst_time): Delete declarations.
18502 (finish_file): Delete LINENO declaration.
18503 START_TIME and THIS_TIME now long.
18505 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
18507 * class.c (build_base_field): Reformat comment.
18509 * inc/cxxabi.h (stddef.h): Comment inclusion.
18510 (__base_class_info::__offset): Comment shift.
18512 2000-04-12 Mark Mitchell <mark@codesourcery.com>
18514 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18515 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18516 (cp_push_exception_identifier): New macro.
18517 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18518 (DECL_BASE_DESTRUCTOR_P): Likewise.
18519 (DECL_DELETING_DESTRUCTOR_P): Likewise.
18520 (get_vtbl_decl_for_binfo): Fix formatting.
18521 (in_charge_arg_for_name): New macro.
18522 (maybe_build_cleanup_and_delete): Remove declaration.
18523 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18524 (in_charge_arg_for_name): New function.
18525 (build_new_method_call): Use it. Handle cloned destructors.
18526 (build_clone): Don't make the base constructor virtual.
18527 Automatically defer generated functions.
18528 (clone_function_decl): Handle destructors, too.
18529 (clone_constructors_and_destructors): Likewise.
18530 (create_vtable_ptr): Don't create a vtable entry for a cloned
18532 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18533 (initialize_predefined_identifiers): Update appropriately.
18534 (finish_destructor_body): Simplify.
18535 (maybe_build_cleanup_and_delete): Remove.
18536 * except.c (expand_throw): Handle new-ABI destructors.
18537 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18538 (build_dtor_call): New function.
18539 (build_delete): Use it. Simplify.
18540 * optimize.c (maybe_clone_body): Handle destructors.
18541 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18543 * exception.cc (cleanup_fn): New typedef.
18544 (CALL_CLEANUP): New macro.
18545 (cp_eh_info): Use them.
18546 (__cp_push_exception): Likewise.
18547 (__cp_pop_exception): Likewise.
18549 2000-04-11 Mark Mitchell <mark@codesourcery.com>
18551 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18552 (complete_dtor_identifier): New macro.
18553 (CLASSTYPE_FIRST_CONVERSION): Remove.
18554 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18555 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18556 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18557 (CLASSTYPE_CONSTRUCTORS): Likewise.
18558 (CLASSTYPE_DESTRUCTORS): Likewise.
18559 (lang_decl): Add cloned_function.
18560 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18561 (DECL_BASE_CONSTRUCTOR_P): Likewise.
18562 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18563 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18564 (DECL_CLONED_FUNCTION_P): Likewise.
18565 (DECL_CLONED_FUNCTION): Likewise.
18566 (clone_function_decl): Declare.
18567 (maybe_clone_body): Likewise.
18568 * call.c (build_user_type_conversion_1): Call complete object
18569 constructors in the new ABI.
18570 (build_new_method_call): Don't add in-charge parameters under the
18572 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18573 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18574 CLASSTYPE_DESTRUCTOR_SLOT.
18575 (build_clone): New function.
18576 (clone_function_decl): Likewise.
18577 (clone_constructors_and_destructors): Likewise.
18578 (check_bases_and_members): Use it.
18579 * decl.c (iniitialize_predefined_identifiers): Initialize
18580 complete_dtor_identifier.
18581 (finish_function): Don't add extra code to a clone.
18582 (lang_mark_tree): Mark cloned_function.
18583 * decl2.c (mark_used): Don't bother trying to instantiate things
18585 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18586 * method.c (set_mangled_name_for_decl): Don't treat clones as
18588 (synthesize_method): Sythesize cloned functions, not the clones.
18589 * optimize.c (inline_data): Update comment on ret_label.
18590 (remap_block): Don't assume DECL_INITIAL exists.
18591 (copy_body_r): Allow ret_label to be NULL.
18592 (maybe_clone_body): Define.
18593 * pt.c (tsubst_decl): Handle clones.
18594 (instantiate_clone): New function.
18595 (instantiate_template): Use it.
18596 (set_mangled_name_for_template_decl): Don't treat clones as
18598 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18599 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18600 * semantics.c (expand_body): Clone function bodies as necessary.
18602 * optimize.c (remap_decl): Avoid sharing structure for arrays
18603 whose size is only known at run-time.
18604 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18606 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18607 to has_in_charge_parm_p.
18608 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18609 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18610 (DECL_COPY_CONSTRUCTOR_P): New macro.
18611 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18612 (build_user_type_conversion_1): Likewise.
18613 (convert_like_real): Likewise.
18614 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
18615 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18616 (copy_args_p): Likewise.
18617 (grok_ctor_properties): Likewise.
18618 (start_function): Likewise.
18619 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
18620 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18621 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18622 * method.c (do_build_copy_constructor): Use
18623 DECL_HAS_IN_CHARGE_PARM_P.
18624 (synthesize_method): Likewise.
18625 * pt.c (instantiate_template): Remove goto.
18626 * tree.c (build_cplus_method_type): Remove mention of obstacks in
18629 * cp-tre.h (finish_function): Change prototype.
18630 * decl.c (end_cleanup_fn): Adjust caller.
18631 (finish_function): Take only one parameter.
18632 * decl2.c (finish_objects): Adjust caller.
18633 (finish_static_storage_duration_function): Likewise.
18634 * method.c (emit_thunk): Likewise.
18635 * parse.y: Likewise.
18636 * parse.c: Regenerated.
18637 * pt.c (instantiate_decl): Likewise.
18638 * rtti.c (synthesize_tinfo_fn): Likewise.
18639 * semantics.c (expand_body): Likewise.
18641 * cp-tree.h (copy_decl): New function.
18642 * class.c (finish_struct_1): Use it.
18643 * lex.c (copy_decl): Define it.
18644 * pt.c (tsubst_decl): Likewise.
18645 * tree.c (copy_template_template_parm): Likewise.
18647 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18648 has_nonpublic_assign_ref.
18649 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18650 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18651 * class.c (finish_struct_methods): Don't set
18652 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18653 (interface_only): Don't declare.
18654 (interface_unknown): Likewise.
18656 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18658 * tree.h (HAVE_TEMPLATES): Remove definition.
18659 * lang-options.h (-fthis-is-variable): Remove documentation.
18661 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
18663 * class.c (instantiate_type): Handle object-relative template-id.
18665 * semantics.c (finish_expr_stmt): Call convert_to_void here.
18666 * decl.c (cplus_expand_expr_stmt): Not here.
18668 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18669 Initialize exprtype earlier.
18671 * parse.y (fn.def1): Check for defining types in return types.
18673 * decl.c (check_tag_decl): Notice extra fundamental types.
18674 Diagnose empty decls in classes, too.
18676 * decl.c (grokdeclarator): Don't override an anonymous name if no
18677 declarator was given.
18679 * cvt.c (convert_to_void): Call resolve_offset_ref.
18681 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18683 * decl2.c (decl_namespace): Handle getting a type.
18685 * typeck.c (build_c_cast): Re-enable warning for cast between
18686 pointer and integer of different size.
18688 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
18690 * inc/cxxabi.h (__pointer_type_info): Add restrict and
18692 (__pointer_type_info::__pointer_catch): New virtual function.
18693 (__pointer_to_member_type_info): Derive from
18694 __pointer_type_info. Adjust.
18695 (__pointer_to_member_type_info::__do_catch): Remove.
18696 (__pointer_to_member_type_info::__is_pointer_p): Declare.
18697 (__pointer_to_member_type_info::__pointer_catch): Declare.
18698 * rtti.c (qualifier_flags): Add restrict flag.
18699 (ptmd_initializer): Reorder members.
18700 (create_tinfo_types): Expand comments. Reorder
18701 ptmd_desc_type_node members.
18702 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18704 (__pointer_type_info::__do_catch): Move specific code into
18705 __pointer_catch. Call it.
18706 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18707 specific catch checking. Fix void conversion check.
18708 (__pointer_to_member_type_info::__do_catch): Remove.
18709 (__pointer_to_member_type_info::__pointer_catch): Implement.
18711 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18713 * lex.c (init_parse): Remove traces of classof and headof.
18714 * decl2.c (flag_operator_names): Default to 1.
18715 (lang_decode_option): Do not set it for -ansi.
18717 2000-04-09 Mark Mitchell <mark@codesourcery.com>
18719 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18720 (DECL_MAIN_VARIANT): Remove.
18721 * decl.c (duplicate_decls): Don't set it.
18722 (start_function): Likewise.
18723 (lang_mark_tree): Don't mark it.
18724 * decl2.c (defer_fn): Don't use it.
18725 * lex.c (retrofit_lang_decl): Don't set it.
18726 * pt.c (tsubst_decl): Likewise.
18727 * ptree.c (print_lang_decl): Don't print it.
18728 * typeck.c (mark_addressable): Don't use it.
18730 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18732 * vec.cc: Include <new> and <exception>.
18733 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18734 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18736 (__cxa_vec_delete): Catch dtor exceptions.
18738 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18740 Prepend __ to implementation defined names.
18741 * inc/typeinfo (type_info): Rename _name to __name.
18742 (type_info::type_info): Rename parameter.
18743 (type_info::operator==, type_info::operator!=,
18744 type_info::before): Likewise.
18745 (type_info::is_pointer_p, type_info::is_function_p,
18746 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18749 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18750 (__pointer_type_info::__pointer_type_info): Likewise.
18751 (__pointer_type_info::is_pointer_p,
18752 __pointer_type_info::do_catch): Prepend __. Rename parameters.
18753 (__array_type_info::__array_type_info): Rename parameters.
18754 (__function_type_info::__function_type_info): Likewise.
18755 (__function_type_info::is_function_p): Prepend __.
18756 (__enum_type_info::__enum_type_info): Rename parameters.
18757 (__pointer_to_member_type_info::__pointer_to_member_type_info):
18759 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18761 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18762 (__class_type_info::__class_type_info): Rename parameters.
18763 (__class_type_info::sub_kind): Prepend __. Adjust member names.
18764 (__class_type_info::upcast_result,
18765 __class_type_info::dyncast_result): Prepend __. Move definition
18767 (__class_type_info::do_upcast, __class_type_info::do_catch,
18768 __class_type_info::find_public_src,
18769 __class_type_info::do_dyncast,
18770 __class_type_info::do_find_public_src): Prepend __. Rename
18772 (__si_class_type_info::__si_class_type_info): Rename parameters.
18773 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18774 __si_class_type_info::do_find_public_src): Prepent __. Rename
18776 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18777 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18778 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18780 (__dynamic_cast): Rename parameters.
18781 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18782 type_info::do_catch, type_info::do_upcast): Prepend __.
18783 (contained_p, public_p, virtual_p, contained_public_p,
18784 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18785 (__class_type_info::do_catch,
18786 __class_type_info::do_upcast): Prepend __. Adjust.
18787 (__class_type_info::__upcast_result,
18788 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18790 (__class_type_info::find_public_src): Prepend __. Adjust.
18791 (__class_type_info::do_find_public_src,
18792 __si_class_type_info::do_find_public_src,
18793 __vmi_class_type_info::do_find_public_src): Likewise.
18794 (__class_type_info::do_dyncast,
18795 __si_class_type_info::do_dyncast,
18796 __vmi_class_type_info::do_dyncast): Likewise.
18797 (__class_type_info::do_upcast,
18798 __si_class_type_info::do_upcast,
18799 __vmi_class_type_info::do_upcast): Likewise.
18800 (__dynamic_cast): Adjust.
18801 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18802 (__function_type_info::is_function_p): Likewise.
18803 (__pointer_type_info::do_catch): Likewise. Adjust.
18804 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18805 (__throw_type_match_rtti_2): Adjust.
18806 (__is_pointer): Adjust.
18808 2000-04-08 Mark Mitchell <mark@codesourcery.com>
18810 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18811 (complete_ctor_identifier): New macro.
18812 (special_function_kind): Add sfk_copy_constructor and
18813 sfk_assignment_operator.
18814 (LOOKUP_HAS_IN_CHARGE): Remove.
18815 (cons_up_default_function): Rename to ...
18816 (implicitly_declare_fn): ... this.
18817 * call.c (build_new_method_call): Add in-charge parameters for
18819 * class.c (add_implicitly_declared_members): Change parameter name
18820 from cant_have_assignment to cant_have_const_assignment.
18821 Replace calls to cons_up_default_function to implicitly_declare_fn.
18822 * cvt.c (ocp_convert): Use complete_ctor_identifier.
18823 * decl.c (initialize_predefined_identifiers): Initialize it.
18824 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18825 complex expression.
18826 * init.c (expand_default_init): Don't calculate the in-charge
18828 (build_new_1): Likewise.
18829 * lex.c (cons_up_default_function): Move to method.c.
18830 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18831 (implicitly_declare_fn): New function.
18832 * typeck.c (build_static_cast): Use complete_ctor_identifier.
18833 (build_modify_expr): Likewise.
18834 * typeck2.c (build_functional_cast): Likewise.
18836 Under the new ABI, constructors don't return `this'.
18837 * cp-tree.h (warn_reorder): Declare.
18838 (special_function_kind): New enum.
18839 (global_base_init_list): Remove declaration.
18840 (emit_base_init): Don't return a value.
18841 (check_base_init): Don't declare.
18842 (is_aggr_typedef): Likewise.
18843 * decl.c (check_special_function_return_type): New function.
18844 (return_types): Remove.
18845 (grokdeclarator): Use check_special_function_return_type.
18846 (start_function): Don't initialize ctor_label under the new ABI.
18847 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18848 * init.c (begin_init_stmts): Move to top of file.
18849 (finish_init_stmts): Likewise.
18850 (warn_reorder): Don't declare.
18851 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
18853 (check_base_init): Remove.
18854 (is_aggr_typedef): Likewise.
18855 (build_new_1): Don't use the return value of a constructor.
18856 * semantics.c (setup_vtbl_ptr): Don't use the return value
18858 * typeck.c (check_return_expr): Don't magically convert return
18859 statements into `return this' in constructors under the new ABI.
18861 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18862 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18863 (base_ctor_identifier): New macro.
18864 (base_dtor_identifier): Likewise.
18865 (deleting_dtor_identifier): Likewise.
18866 * decl.c: Don't include obstack.h.
18867 (obstack_chunk_alloc): Don't define.
18868 (obstack_chunk_free): Likewise.
18869 (struct predefined_identifier): New type.
18870 (initialize_predefined_identifiers): New function.
18871 (init_decl_processing): Use it.
18872 (debug_temp_inits): Remove.
18873 (start_method): Don't call preserve_data.
18874 (hack_incomplete_structures): Update comment.
18875 * init.c (init_init_processing): Don't initialize
18877 (build_offset_rf): Remove dead code.
18878 (build_delete): Use CLASSTYPE_N_BASECLASSES.
18879 * search.c (init_search_processing): Don't initialize
18882 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18884 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18885 some sign_compare warnings.
18887 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18889 Rename abi::__vmi_class_type_info members.
18890 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18891 base_list, detail_masks members to vmi_flags, vmi_base_count,
18892 vmi_bases and vmi_flags_masks respectively.
18893 (__vmi_class_type_info::vmi_flags_masks): Rename
18894 details_unknown_mask to flags_unknown_mask.
18895 * tinfo.cc (__class_type_info::do_upcast): Adjust.
18896 (__vmi_class_type_info::do_find_public_src): Adjust.
18897 (__vmi_class_type_info::do_dyncast): Adjust.
18898 (__vmi_class_type_info::do_upcast): Adjust.
18900 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18902 * tinfo.cc (convert_to_base): New function.
18903 (get_vbase_offset): Remove. Move into convert_to_base.
18904 (__vmi_class_type_info::do_find_public_src): Adjust.
18905 (__vmi_class_type_info::do_dyncast): Adjust.
18906 (__vmi_class_type_info::do_upcast): Adjust.
18908 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
18910 * tinfo.cc (operator=): Use __builtin_strcmp.
18911 * tinfo2.cc (before): Likewise.
18913 2000-04-06 Mark Mitchell <mark@codesourcery.com>
18915 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18916 (DECL_SAVED_INLINE): Rename to ...
18917 (DECL_DEFERRED_FN): ... this.
18918 (in_function_p): Remove declaration.
18919 (mark_inline_for_output): Rename to ...
18920 (defer_fn): ... this.
18921 * decl.c (finish_function): Adjust call to mark_inline_for_output.
18922 (in_function_p): Remove definition.
18923 * decl2.c (saved_inlines): Rename to ...
18924 (deferred_fns): ... this.
18925 (saved_inlines_used): Rename to ...
18926 (deferred_fns_used): ... this.
18927 (mark_inline_for_output): Rename to ...
18928 (defer_fn): ... this.
18929 (finish_file): Adjust accordingly.
18930 (init_decl2): Likewise.
18931 * lex.c (cons_up_default_function): Likewise.
18932 * pt.c (mark_decl_instantiated): Likewise.
18933 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18935 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18936 * semantics.c (expand_body): Defer more functions.
18938 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18940 * vec.cc: New file.
18941 * Make-lang.in (CXX_LIB2FUNCS): Add it.
18943 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18944 __cxa_vec_delete): Declare.
18946 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18948 * rtti.c (dfs_class_hint_mark): New static function.
18949 (dfs_class_hint_unmark): New static function.
18950 (class_hint_flags): Use them.
18952 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
18954 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18956 2000-04-05 Mark Mitchell <mark@codesourcery.com>
18958 * cp-tree.h (instantiate_decl): Change prototype.
18959 * decl2.c (mark_used): Adjust call.
18960 * optimize.c (inlinable_function_p): Adjust handling of templates.
18961 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18962 (do_type_instantiation): Likewise.
18963 (instantiate_decl): Defer more templates.
18964 (instantiate_pending_templates): Adjust logic to handle inline
18967 * Makefile.in (GGC_H): New variable. Use it throughout in place
18970 * call.c: Don't include obstack.h. Include ggc.h.
18971 (obstack_chunk_alloc): Don't define.
18972 (obstack_chunk_free): Likewise.
18973 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18974 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18975 (pop_switch): Free it.
18977 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18979 * dump.c (dequeue_and_dump): Don't try to print the bit_position
18980 if we don't have a DECL_FIELD_OFFSET.
18982 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
18984 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18985 special_function_p.
18987 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18989 * cfns.gperf (hash, libc_name_p): Prototype.
18991 * rtti.c (build_dynamic_cast_1): Constification.
18993 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18995 * semantics.c (deferred_type_access_control): Prototype.
18997 2000-04-04 Mark Mitchell <mark@codesourcery.com>
18999 Correct many new ABI issues regarding vbase and vcall offset
19001 * cp-tree.h (BINFO_VTABLE): Document.
19002 (struct lang_type): Tweak formatting.
19003 (BINFO_PRIMARY_BINFO): Add to documentation.
19004 (CLASSTYPE_VSIZE): Fix typo in comment.
19005 (CLASSTYPE_VBASECLASSES): Update documentation.
19006 (BINFO_VBASE_MARKED): Remove.
19007 (SET_BINFO_VBASE_MARKED): Likewise.
19008 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19009 (BINFO_FIELDS_MARKED): Remove.
19010 (SET_BINFO_FIELDS_MARKED): Likewise.
19011 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19012 (enum access_kind): New enumeration.
19013 (num_extra_vtbl_entries): Remove declaration.
19014 (size_extra_vtbl_entries): Likewise.
19015 (get_vtbl_decl_for_binfo): New function.
19016 (dfs_vbase_unmark): Remove declaration.
19017 (mark_primary_bases): Likewise.
19018 * class.c (SAME_FN): Remove.
19019 (struct vcall_offset_data_s): Move definition.
19020 (build_vbase_pointer): Use `build', not `build_binary_op', to
19021 access the vbase pointer under the new ABI.
19022 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19023 (build_primary_vtable): Likewise.
19024 (dfs_mark_primary_bases): Move here from search.c.
19025 (mark_primary_bases): Likewise.
19026 (determine_primary_bases): Under the new ABI, don't make a base
19027 class a primary base just because we don't yet have any virtual
19029 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19030 (num_vfun_entries): Remove.
19031 (dfs_count_virtuals): Likewise.
19032 (num_extra_vtbl_entries): Likewise.
19033 (size_extra_vtbl_entries): Likewise.
19034 (layout_virtual_bases): Iterate in inheritance graph order under
19036 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19037 indicate that a vfield is present.
19038 (init_class_processing): Initialize access_public_node, etc., from
19040 (get_vtbl_decl_for_binfo): New function.
19041 (dump_class_hierarchy_r): Likewise.
19042 (dump_class_hierarchy): Use it.
19043 (finish_vtbls): Build the vtbls in inheritance graph order.
19044 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19045 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19046 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19048 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19049 where the vptr points, even for primary vtables.
19050 (build_vtbl_initializer): Adjust handling of vbase and vcall
19052 (build_vcall_and_vbase_vtable_entries): New function.
19053 (dfs_build_vbase_offset_vtbl_entries): Remove.
19054 (build_vbase_offset_vtbl_entries): Reimplement.
19055 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19056 were already handled in a primary base class vtable.
19057 (build_vcall_offset_vtbl_entries): Adjust.
19058 (build_rtti_vtbl_entries): Adjust.
19059 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19060 * init.c (expand_virtual_init): Simplify.
19061 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19062 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19063 * search.c (BINFO_ACCESS): New macro.
19064 (SET_BINFO_ACCESS): Likewise.
19065 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19066 (access_in_type): Likewise.
19067 (dfs_accessible_p): Likewise.
19068 (protected_accessible_p): Likewise.
19069 (lookup_fnfields_1): Adjust documentation.
19070 (dfs_mark_primary_bases): Move to class.c
19071 (mark_primary_bases): Likewise.
19072 (dfs_vbase_unmark): Remove.
19073 (virtual_context): Use BINFO_FOR_VBASE.
19074 (dfs_get_vbase_types): Simplify.
19075 (dfs_build_inheritance_graph_order): New function.
19076 (get_vbase_types): Use it.
19077 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19079 * tinfo.cc (get_vbase_offset): New function.
19080 (__vmi_class_type_info::do_find_public_src): Use it.
19081 (__vmi_class_type_info::do_dyncast): Likewise.
19082 (__vmi_class_type_info::do_upcast): Likewise.
19084 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19086 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19088 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19090 * rtti.c (class_hint_flags): Rename flags.
19091 (class_initializer): Remove flags.
19092 (synthesize_tinfo_var): Combine offset and flags. Add flags
19093 for __vmi_class_type_info.
19094 (create_tinfo_types): Remove flags from __class_type_info and
19095 __si_class_type_info. Merge flags and offset from
19096 base_class_type_info.
19097 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19098 (__base_class_info::is_virtual_p): Adjust.
19099 (__base_class_info::is_public_p): Adjust.
19100 (__base_class_info::offset): New accessor.
19101 (__class_type_info::details): Remove member.
19102 (__class_type_info::__class_type_info): Lose details.
19103 (__class_type_info::detail_masks): Remove.
19104 (__si_class_type_info::__si_class_type_info): Lose details.
19105 (__vmi_class_type_info::details): New member.
19106 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19107 (__vmi_class_type_info::detail_masks): New member.
19108 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19109 with unknown_details_mask.
19110 (__vmi_class_type_info::do_find_public_src): Adjust
19111 (__vmi_class_type_info::do_dyncast): Adjust.
19112 (__vmi_class_type_info::do_upcast): Set result details, if
19114 (__dynamic_cast): Temporarily #if out optimization.
19116 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19118 * rtti.c (get_tinfo_decl): Mark used.
19119 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19120 mark as dealt with, if we output it.
19122 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19124 * class.c: Reorganize to put virtual function table initialization
19125 machinery at the end of the file.
19127 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19129 * class.c (finish_struct): Use bitsize_zero_node.
19130 * pt.c (instantiate_class_template): Likewise.
19132 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19134 Put RTTI entries at negative offsets in new ABI.
19135 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19136 vbase offset at index -3, not -1.
19137 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19138 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19139 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19140 (build_rtti_vtbl_entries): New function.
19141 (set_rtti_entry): Remove.
19142 (build_primary_vtable): Don't use it.
19143 (build_secondary_vtable): Likewise.
19144 (start_vtable): Remove.
19145 (first_vfun_index): New function.
19146 (set_vindex): Likewise.
19147 (add_virtual_function): Don't call start_vtable. Do call
19149 (set_primary_base): Rename parameter.
19150 (determine_primary_base): Likewise.
19151 (num_vfun_entries): Don't use skip_rtti_stuff.
19152 (num_extra_vtbl_entries): Include RTTI information.
19153 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19154 (skip_rtti_stuff): Remove.
19155 (dfs_modify_vtables): Don't use it.
19156 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
19157 (layout_nonempty_base_or_field): Update size handling.
19158 (create_vtable_ptr): Tweak.
19159 (layout_class_type): Adjust parameter names.
19160 (finish_struct_1): Simplify.
19161 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19162 (skip_rtti_stuff): Remove.
19163 (first_vfun_index): New function.
19164 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19165 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19166 (marked_vtable_pathp): Declare.
19167 (unmarked_vtable_pathp): Likewise.
19168 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19170 * rtti.c (build_headof): Look for RTTI at negative offsets.
19171 (get_tinfo_decl_dynamic): Likewise.
19172 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19174 (create_pseudo_type_info): Do it here instead. Adjust so that
19175 vptr points at first virtual function.
19176 * search.c (marked_vtable_pathp): Make it global.
19177 (unmarked_vtable_pathp): Likewise.
19178 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19179 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19180 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19181 (get_pure_virtuals): Likewise.
19182 (expand_upcast_fixups): Likewise.
19183 * tree.c (debug_binfo): Likewise.
19184 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19187 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19189 * class.c (check_field_decl): Fix typo.
19190 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19191 (check_methods): Likewise.
19192 (check_field_decls): Likewise.
19193 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19194 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19195 Use DECL_RESULT_FLD, not DECL_RESULT.
19196 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19197 * lex.c (identifier_type): Likewise.
19198 * pt.c (determine_specialization, lookup_template_class): Likewise.
19199 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19200 (resolve_overloaded_unification, more_specialized): Likewise.
19201 * semantics.c (finish_member_declaration): Likewise.
19202 * typeck.c (build_x_function_call): Likewise.
19204 2000-03-26 Mark Mitchell <mark@codesourcery.com>
19206 * class.c (layout_empty_base): Handle empty bases with non-byte
19208 (build_base_field): Likewise.
19209 (layout_virtual_bases): Likewise.
19211 * class.c (finish_struct_1): Fix typo in this change:
19213 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19215 2000-03-25 Mark Mitchell <mark@codesourcery.com>
19217 * decl.c (grokdeclarator): Count partial specializations when
19218 keeping track of how many template classes have been seen.
19220 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19222 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19224 * class.c (build_vbase_pointer_fields): layout_field now place_field.
19225 (get_vfield_offset): Use byte_position.
19226 (set_rtti_entry): Set OFFSET to ssizetype zero.
19227 (get_binfo_offset_as_int): Deleted.
19228 (dfs_record_base_offsets): Use tree_low_cst.
19229 (dfs_search_base_offsets): Likewise.
19230 (layout_nonempty_base_or_field): Reflect changes in RLI format
19231 and call byte_position.
19232 (layout_empty_base): Convert offset to ssizetype.
19233 (build_base_field): use rli_size_unit_so_far.
19234 (dfs_propagate_binfo_offsets): Do computation in proper type.
19235 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19236 (layout_class_type): Reflect changes in RLI names and fields.
19237 (finish_struct_1): Set DECL_FIELD_OFFSET.
19238 * dump.c (dequeue_and_dump): Call bit_position.
19239 * expr.c (cplus_expand_constant): Use byte_position.
19240 * rtti.c (expand_class_desc): Use bitsize_one_node.
19241 * typeck.c (build_component_addr): Use byte_position and don't
19242 special case for zero offset.
19244 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
19246 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19248 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19250 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19253 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19255 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19257 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19258 make_typename_type, check_initializer, cp_finish_decl,
19259 xref_tag): Likewise.
19260 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19261 decl_namespace, arg_assoc_template_arg, arg_assoc,
19262 validate_nonmember_using_decl, do_class_using_decl): Likewise.
19263 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19264 args_to_string): Likewise.
19265 * friend.c (is_friend): Likewise.
19266 * lex.c (note_got_semicolon, note_list_got_semicolon,
19267 is_global): Likewise.
19268 * method.c (build_overload_nested_name, build_overload_value,
19269 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19270 * parse.y (typename_sub, typename_sub1): Likewise.
19271 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19272 process_partial_specialization, convert_template_argument,
19273 template_args_equal, add_pending_template, lookup_template_class,
19274 for_each_template_parm_r, maybe_fold_nontype_arg,
19275 tsubst, instantiate_template, type_unification_real, unify,
19276 instantiate_pending_templates, set_mangled_name_for_template_decl):
19278 * repo.c (repo_get_id, repo_template_used): Likewise.
19279 * search.c (lookup_field_1): Likewise.
19280 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19281 * xref.c (classname): Likewise.
19283 2000-03-22 Mark Mitchell <mark@codesourcery.com>
19285 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19286 (CANONICAL_BINFO): New macro.
19287 (BINFO_NEW_VTABLE_MARKED): Use it.
19288 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19289 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19290 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19292 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19293 (build_secondary_vtable): Likewise.
19294 (dfs_finish_vtbls): Likewise.
19295 (dfs_accumulate_vtbl_inits): Likewise.
19296 (accumulate_vtbl_inits): New function.
19297 (finish_vtbls): Make sure that virtual bases come after
19298 non-virtual bases in the vtable group.
19299 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19300 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19301 * search.c (struct vbase_info): Move definition.
19302 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19303 (unmarked_new_vtable_p): Likewise.
19304 (dfs_mark_vtable_path): Remove.
19305 (dfs_mark_new_vtable): Remove.
19306 (dfs_unmark_new_vtable): Likewise.
19307 (dfs_clear_search_slot): Likewise.
19308 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19309 (dfs_clear_vbase_slots): Likewise.
19310 (init_vbase_pointers): LIkewise.
19312 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
19314 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19315 SIZETYPE to a non-SIZETYPE.
19317 2000-03-21 Mark Mitchell <mark@codesourcery.com>
19319 * class.c (layout_virtual_bases): Adjust names in conditionally
19322 * class.c (record_base_offsets): New function.
19323 (layout_conflict_p): Likewise.
19324 (layout_nonempty_base_or_field): Use it.
19325 (layout_empty_base): New function.
19326 (build_base_field): Use it.
19327 (build_base_fields): Update comment.
19328 (layout_virtual_bases): Fold in a little code form
19329 layout_basetypes. Use layout_empty_base.
19330 (layout_basetypes): Remove.
19331 (end_of_class): New function.
19332 (layout_class_type): Use it. Adjust.
19334 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19335 (fntype_p): Remove.
19336 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19338 (dfs_skip_nonprimary_vbases_markedp): Likewise.
19339 * typeck.c (fntype_p): Remove.
19341 * cp-tree.h (TI_SPEC_INFO): Remove.
19342 (CLASSTYPE_TI_SPEC_INFO): Likewise.
19343 * pt.c (process_partial_specialization): Likewise.
19345 * class.c (build_base_field): Fix thinko in computation of binfo
19348 * tree.c (mark_local_for_remap_p): Mark variables declared in
19349 TARGET_EXPRs as well.
19351 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19353 * typeck.c (require_complete_type, complete_type,
19354 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19355 build_array_ref, convert_arguments, pointer_diff,
19356 build_x_unary_op, build_unary_op, build_c_cast,
19357 build_modify_expr): Use COMPLETE_TYPE_P etc.
19358 * call.c (is_complete, convert_like_real,
19359 build_new_method_call): Likewise.
19360 * class.c (build_vbase_pointer_fields, check_bases,
19361 build_base_field, finish_struct_1, pushclass): Likewise.
19362 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19363 * decl.c (maybe_process_template_type_declaration, pushtag,
19364 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19365 layout_var_decl, check_initializer, cp_finish_decl,
19366 grokdeclarator, require_complete_types_for_parms,
19367 grok_op_properties, xref_tag, xref_basetypes,
19368 check_function_type): Likewise.
19369 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19370 * friend.c (do_friend): Likewise.
19371 * init.c (build_offset_ref): Likewise.
19372 * parse.y (structsp): Likewise.
19373 * pt.c (maybe_process_partial_specialization,
19374 tsubst_friend_function, instantiate_class_template, tsubst,
19375 do_type_instantiation, instantiate_pending_templates): Likewise.
19376 * repo.c (repo_get_id): Likewise.
19377 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19378 synthesize_tinfo_var, emit_support_tinfos): Likewise.
19379 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19380 * semantics.c (begin_class_definition): Likewise.
19381 * tree.c (build_cplus_method_type): Likewise.
19382 * typeck2.c (digest_init, build_functional_cast,
19383 add_exception_specifier): Likewise.
19384 * parse.h, parse.c: Regenerated.
19386 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19388 * inc/cxxabi.h: New header file. Define new-abi entry points.
19389 (__pointer_type_info::target): Rename member to ...
19390 (__pointer_type_info::type): ... here.
19391 (__base_class_info::type): Rename member to ...
19392 (__base_class_info::base): ... here.
19393 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19394 * cp-tree.h (CPTI_ABI): New global tree enumeration.
19395 (abi_node): New global tree node.
19396 * decl.c (abi_node): Document.
19397 (init_decl_processing): Initialize abi_node.
19398 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19399 (get_vmi_pseudo_type_info): Likewise.
19400 (create_tinfo_types): Likewise.
19401 (emit_support_tinfos): Likewise.
19402 * tinfo.h (cxxabi.h): Include for new-abi.
19403 Move rtti class definitions to new header file.
19404 * tinfo.cc (abi): Use the namespace.
19405 (std): Move new abi rtti classes from here ...
19406 (__cxxabiv1): ... to here.
19407 * tinfo2.cc (cxxabi.h): Include for new-abi.
19408 Move rtti class definitions to new header file.
19409 (std): Move new abi rtti classes from here ...
19410 (__cxxabiv1): ... to here.
19411 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19414 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19415 Jason Merrill <jason@casey.cygnus.com>
19417 * method.c (build_overload_int): Use host_integerp.
19419 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19421 * init.c (build_offset_ref): Handle the case of a templated member
19424 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19426 * except.c (expand_exception_blocks): Clear catch_clauses_last.
19428 2000-03-18 Mark Mitchell <mark@codesourcery.com>
19430 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19431 * class.c (check_bitfield_decl): Turn illegal bitfields into
19433 (dfs_propagate_binfo_offsets): Adjust for new size_binop
19435 (dfs_offset_for_unshared_vbases): Likewise.
19436 * cvt.c (cp_convert_to_pointer): Convert NULL to a
19437 pointer-to-member correctly under the new ABI.
19438 * expr.c (cplus_expand_constant): Don't use cp_convert when
19439 turning an offset into a pointer-to-member.
19440 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19441 when dereferencing them under the new ABI.
19442 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19443 of pointers-to-members under the new ABI.
19445 * class.c (check_bitfield_decl): Remove restriction on really long
19447 (layout_class_type): Implement new ABI handling of bitfields
19448 longer than their types.
19450 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19452 * parse.y (extdefs): Call ggc_collect.
19453 * parse.c: Regenerated.
19455 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
19457 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19458 (note_name_declared_in_class): Use OVL_CURRENT to get at a
19459 potential overload.
19461 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19463 * class.c (build_vbase_path): Use integer_zerop.
19464 (build_vtable_entry): Use tree_low_cst.
19465 (get_vfield_offset): Use bit_position.
19466 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19468 (check_bitfield_decl): Set DECL_SIZE using convert.
19469 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19470 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19472 (finish_struct_1): Use bit_position.
19473 (dump_class_hierarchy): Use tree_low_cst.
19474 * cp-tree.h (min_precision): Add declaration.
19475 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19476 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19477 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19478 * expr.c (cplus_expand_constant): Use bit_position.
19479 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19480 * rtti.c (get_base_offset): Use bit_position.
19481 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19482 host_integerp, and tree_low_cst.
19483 (pointer_int_sum): Use integer_zerop.
19484 (build_component_addr): Use bit_position.
19486 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
19488 * typeck.c (require_complete_type): Don't assume size_zero_node.
19489 (complete_type_or_else): Likewise.
19491 2000-03-16 Steven Grady <grady@digitaldeck.com>
19492 Jason Merrill <jason@casey.cygnus.com>
19494 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19496 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
19498 * decl2.c (grokfield): Bail out if type is error_mark_node.
19500 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19502 * tinfo2.cc (__ptr_to_member_data): Rename to ...
19503 (__pointer_to_member_data): ... here. Adjust.
19504 * rtti.c (create_tinfo_types): Adjust.
19506 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19508 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19509 * decl.c (ref_desc_type_node): Undocument.
19510 * rtti.c (ptr_ref_initializer): Rename to ...
19511 (ptr_initializer): ... here. Adjust comments.
19512 (ptmd_initializer): Fix comment thinko.
19513 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19514 (create_tinfo_types): Remove ref_desc_type_node init.
19515 * tinfo2.cc (__reference_type_info): Remove.
19517 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19519 * decl.c (cp_finish_decl): Remove obsolete comment.
19521 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19523 2000-03-14 Mark Mitchell <mark@codesourcery.com>
19525 * cp-tree.h: Tweak documentation.
19526 * class.c (build_vbase_pointer_fields): Layout the fields, too.
19527 (avoid_overlap): Remove.
19528 (get_binfo_offset_as_int): New function.
19529 (dfs_serach_base_offsets): Likewise.
19530 (layout_nonempty_base_or_field): Likewise.
19531 (build_base_field): Layout fields here. Avoid placing two objects
19532 of the same type at the same address, under the new ABI.
19533 (build_base_fields): Adjust accordingly.
19534 (create_vtable_ptr): Return the new field, but don't attach it to
19536 (remove_base_field): Remove.
19537 (remove_base_fields): Remove.
19538 (layout_basetypes): Adjust accordingly.
19539 (layout_class_type): Call layout_field for each field, rather than
19540 just making a wholesale call to layout_type.
19542 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
19544 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19546 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
19548 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19550 * except.c (dtor_nothrow): New fn.
19551 (do_pop_exception): Use it. Take type parm.
19552 (push_eh_cleanup): Take type parm.
19553 (expand_start_catch_block): Pass it.
19554 (build_eh_type_type_ref): Accept null type.
19556 2000-03-12 Mark Mitchell <mark@codesourcery.com>
19558 * cp-tree.h (revert_static_member_fn): Change prototype.
19559 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19560 (grok_op_properties): Likewise.
19561 (start_function): Likewise.
19562 (revert_static_member_fn): Simplify.
19563 * pt.c (check_explicit_specialization): Adjust call to
19564 revert_static_member_fn.
19566 2000-03-11 Mark Mitchell <mark@codesourcery.com>
19568 * cp-tree.h (scope_kind): New type.
19569 (tmpl_spec_kind): Likewise.
19570 (declare_pseudo_global_level): Remove.
19571 (pseudo_global_level_p): Rename to template_parm_scope_p.
19572 (pushlevel): Remove declaration.
19573 (begin_scope): New function.
19574 (finish_scope): Likewise.
19575 (current_tmpl_spec_kind): Likewise.
19576 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19577 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
19578 Add template_spec_p.
19579 (toplevel_bindings_p): Adjust.
19580 (declare_pseudo_global_level): Remove.
19581 (pseudo_global_level_p): Rename to template_parm_scope_p.
19582 (current_tmpl_spec_kind): New function.
19583 (begin_scope): Likewise.
19584 (finish_scope): Likewise.
19585 (maybe_push_to_top_level): Adjust.
19586 (maybe_process_template_type_declaration): Likewise.
19587 (pushtag): Likewise.
19588 (pushdecl_nonclass_level): Likewise.
19589 (lookup_tag): Likewise.
19590 (grokfndecl): Handle member template specializations. Share
19591 constructor and non-constructor code.
19592 * decl2.c (check_classfn): Handle member template specializations.
19593 * pt.c (begin_template_parm_list): Use begin_scope.
19594 (begin_specialization): Likewise.
19595 (end_specialization): Likewise.
19596 (check_explicit_specialization): Use current_tmpl_spec_kind.
19597 Handle member template specializations.
19598 (end_template_decl): Use finish_scope. Remove call to
19600 (push_template_decl_real): Remove bogus error message.
19601 (tsubst_decl): Fix typo in code contained in comment.
19602 (instantiate_template): Handle member template specializations.
19603 (most_general_template): Likewise.
19605 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
19607 * lex.c (whitespace_cr): Compress consecutive calls to warning().
19608 (do_identifier): Ditto for error().
19610 * pt.c (convert_nontype_argument): Ditto for cp_error().
19611 (convert_template_argument): Ditto for cp_pedwarn().
19613 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
19615 * exception.cc (__check_null_eh_spec): New fn.
19616 * except.c (expand_end_eh_spec): Call it if the spec is throw().
19618 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19620 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19621 * except.c (expand_end_eh_spec): Add the return type.
19622 * rtti.c (throw_bad_cast): Add the parmtypes.
19623 (throw_bad_typeid): Likewise.
19625 * semantics.c (expand_stmt): Only leave out rtl for unused
19626 artificials, and set DECL_IGNORED_P on them as well.
19627 * decl.c (wrapup_globals_for_namespace): Likewise.
19629 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
19631 * decl.c (maybe_commonize_var): Skip all artificial decls.
19632 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19634 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19636 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19637 * cp-tree.h: Declare flag_enforce_eh_specs.
19638 * decl.c (store_parm_decls, finish_function): Check it.
19640 C library functions don't throw.
19641 * Makefile.in (cfns.h): New target.
19642 (except.o): Depend on it.
19643 * Make-lang.in (cc1plus): Depend on cfns.gperf.
19644 * cfns.gperf: New file.
19645 * cfns.h: Generated.
19646 * except.c: Include it.
19647 (nothrow_libfn_p): New fn.
19648 * decl.c (grokfndecl): Use it.
19649 * cp-tree.h: Declare it.
19651 * decl.c (push_overloaded_decl_1, auto_function,
19652 define_function): Lose.
19653 (build_library_fn_1): New static fn.
19654 (builtin_function): Use it.
19655 (get_atexit_node): Use build_library_fn_ptr.
19656 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19657 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19658 push_void_library_fn, push_throw_library_fn): New fns.
19659 * cp-tree.h: Declare them.
19660 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19661 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19662 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19663 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19664 * rtti.c (build_runtime_decl): Lose.
19665 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19666 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19667 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19669 * call.c (build_call): Remove result_type parm.
19670 Call mark_used on unused artificial fns.
19671 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19673 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
19675 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19677 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19678 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19679 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19680 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19681 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19682 expand_generic_desc): Likewise.
19684 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19686 * exception.cc (__cp_pop_exception): Cleanup the original object.
19688 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19690 * decl.c (grok_op_properties): Merge conversion to void warning
19691 with other silly op warnings.
19693 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
19695 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19696 array CONSTRUCTOR elements. Don't use expr_tree_cons.
19698 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19700 * decl.c (cp_make_fname_decl): New function.
19701 (wrapup_globals_for_namespace): Don't emit unused static vars.
19702 (init_decl_processing): Remove comment about use of
19703 array_domain_type. Set make_fname_decl.
19704 (cp_finish_decl): Remove __FUNCTION__ nadgering.
19705 * semantics.c (begin_compound_stmt): Remove
19706 current_function_name_declared flagging.
19707 (expand_stmt): Don't emit unused local statics.
19708 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19711 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19713 * typeck.c (convert_for_assignment): Don't look at array
19715 * call.c (convert_like_real): Likewise.
19717 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
19719 Add initial support for '\uNNNN' specifier.
19720 * lex.c (read_ucs): New fn.
19721 (readescape, skip_white_space): Call it.
19722 (is_extended_char, is_extended_char_1): New fns.
19723 (utf8_extend_token): New fn, #if 0'd out.
19724 (real_yylex): Treat extended chars like letters.
19726 * search.c (note_debug_info_needed): Walk the bases even if we
19727 weren't deferring the type itself.
19729 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19731 * decl2.c (finish_objects): Constify a char*.
19733 * method.c (emit_thunk): Likewise.
19735 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
19737 * typeck.c (dubious_conversion_warnings): Look through
19740 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19742 * class.c (dfs_modify_vtables): I is now unsigned.
19743 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19744 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19745 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19746 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19747 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19748 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19749 Call integer_all_onesp.
19750 * typeck2.c (process_init_constructor): Use compare_tree_int.
19752 * lang-specs.h (as): Don't call if -syntax-only.
19754 2000-03-06 Mark Mitchell <mark@codesourcery.com>
19756 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19757 RTL_EXPR_HAS_NO_SCOPE after all.
19759 2000-03-05 Mark Mitchell <mark@codesourcery.com>
19761 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19762 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
19763 RTL_EXPR_HAS_NO_SCOPE.
19765 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19768 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19770 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
19772 * call.c (convert_like): Macrofy.
19773 (convert_like_with_context): New macro.
19774 (convert_like_real): Renamed from convert_like. Add calling
19775 context parameters, for diagnostics. Add recursive flag. Call
19776 dubious_conversion_warnings for outer conversion.
19777 (build_user_type_conversion): Use convert_like_with_context.
19778 (build_over_call): Likewise. Don't warn about dubious
19779 conversions here. Adjust convert_default_arg calls.
19780 (convert_default_arg): Add context parameters for diagnostics.
19781 Pass through to convert_like_with_context.
19782 * cp-tree.h (convert_default_arg): Add context parameters.
19783 (dubious_conversion_warnings): Prototype new function.
19784 * typeck.c (convert_arguments): Adjust convert_default_arg call.
19785 (dubious_conversion_warnings): New function, broken
19786 out of convert_for_assignment.
19787 (convert_for_assignment): Adjust.
19789 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
19791 * decl2.c (key_method): Break out from...
19792 (import_export_vtable, import_export_class): ...here.
19794 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19795 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19797 * search.c (note_debug_info_needed, dfs_debug_mark,
19798 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
19799 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19801 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
19803 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19806 2000-03-02 Mark Mitchell <mark@codesourcery.com>
19808 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19809 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19810 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19811 (lang_type): Split gets_new into has_new and has_array_new.
19812 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19813 (TYPE_GETS_NEW): Split into ...
19814 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19815 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19816 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19817 (build_op_new_call): Don't declare.
19818 (build_new_1): Likewise.
19819 * call.c (build_op_new_call): Remove.
19820 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19821 instead of TYPE_NEEDS_DESTRUCTOR.
19822 (finish_struct_bits): Likewise.
19823 (add_implicitly_declared_members): Likewise.
19824 (check_field_decl): Likewise.
19825 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19826 correctly under the new ABI.
19827 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19828 instead of TYPE_NEEDS_DESTRUCTOR.
19829 (initialize_local_var): Likewise.
19830 (destroy_local_var): Likewise.
19831 (cp_finish_decl): Likewise.
19832 (register_dtor_fn): Likewise.
19833 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19834 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
19835 TYPE_VEC_DELETE_TAKES_SIZE here.
19836 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19837 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19838 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19839 (finish_destructor_body): Likewise.
19840 (maybe_build_cleanup_1): Likewise.
19841 * decl2.c (do_static_destruction): Likewise.
19842 * init.c (build_new_1): Make it static.
19843 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19844 (expand_cleanup_for_base): Likewise.
19845 (get_cookie_size): New function.
19846 (build_new_1): Handle array-new cookies correctly under the new
19848 (build_vec_delete_1): Likewise.
19849 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19850 (build_delete): Likewise.
19851 (build_vec_delete): Handle array-new cookies correctly under the new
19853 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19854 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19855 TYPE_HAS_ARRAY_NEW_OPERATOR.
19856 * ptree.c (print_lang_type): Check them.
19857 * search.c (context_for_name_lookup): Fix typo in comment.
19858 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19859 * tree.c (break_out_cleanups): Likewise.
19860 (build_cplus_array_test_1): Likewise.
19861 (cp_build_qualified_type_real): Likewise.
19862 * typeck.c (complete_type): Likewise.
19864 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19865 the command-line, not the end.
19867 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
19869 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19871 2000-03-02 Tom Tromey <tromey@cygnus.com>
19873 * cp-tree.h (build_java_class_ref): Declare.
19874 * init.c (build_java_class_ref): No longer static.
19875 * except.c (expand_throw): Generate a Java-style `throw' if the
19876 thrown object is a "Java" object.
19877 (initialize_handler_parm): Generate a Java-style lookup of
19878 exception info if the caught object is a "Java" object.
19879 (catch_language, catch_language_init): New globals.
19880 (decl_is_java_type): New function.
19881 (expand_start_catch_block): Don't call push_eh_info() or
19882 push_eh_cleanup() when handling a Java-style "catch". Pass Java
19883 class reference to build_catch_block.
19885 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19887 * typeck.c (comptypes): Treat sizetype like its language equivalent.
19889 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
19891 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19892 to merge reference/pointer code and fix incorrect warnings.
19894 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
19896 * search.c (protected_accessible_p): Use context_for_name_lookup.
19898 * init.c (construct_virtual_bases): Fix thinko.
19899 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19901 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
19903 * decl.c (current_function_decl): Move to toplev.c.
19905 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
19907 * pt.c (fn_type_unification): Unify return type, whenever
19909 (get_bindings_real): Only pass return type when necessary.
19910 Remove explicit return type check.
19911 * class.c (resolve_address_of_overloaded_function): Pass desired
19912 return type to fn_type_unification.
19914 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19916 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19918 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19920 * rtti.c (expand_class_desc): Likewise.
19921 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19922 (THUNK_VCALL_OFFSET): Likewise.
19923 (THUNK_DELTA): Reflect changes in ../tree.h.
19925 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
19927 * search.c (protected_accessible_p): Also allow the access if
19928 the member is public in DERIVED. Lose TYPE parm.
19929 (friend_accessible_p): Lose TYPE parm.
19930 (accessible_p): Adjust.
19932 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19934 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19935 on things that are not sizes; ssize_binop deleted.
19936 Call size_diffop when appropriate.
19937 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19938 (build_primary_vtable, build_secondary_vtable): Likewise.
19939 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19940 Variable I is HOST_WIDE_INT.
19941 (get_vfield_offset): Pass proper types to size_binop.
19942 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19943 (finish_struct_1): Likewise.
19944 (skip_rtti_stuff): Arg N is now pointer to signed.
19945 (layout_class_type): Use size_zero_node.
19946 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19947 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19948 * decl.c (complete_arry_type): Pass proper types to size_binop.
19949 (xref_basetypes): BINFO_OFFSET is sizetype.
19950 * error.c (dump_expr): Don't use size_binop non-sizes.
19951 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19952 * init.c (construct_virtual_bases): Fix type error.
19953 (build_vec_delete_1): Pass proper type to size_binop and don't
19955 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19956 * rtti.c (get_base_offset): Pass proper type to size_binop.
19957 * search.c (dfs_find_vbases): Fix type error.
19958 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19959 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19960 * tree.c (debug_binfo): Variable N is signed.
19961 Use HOST_WIDE_INT_PRINT_DEC.
19962 * typeck.c (comptypes): sizetype is same as equivalent integer type.
19963 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19964 size_one_node and size_zero_node.
19965 (c_alignof): Use size_one_node.
19966 (build_component_addr): Pass proper types to size_binop.
19967 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19969 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
19971 Implement class scope using-declarations for functions.
19972 * class.c (handle_using_decl): Call add_method for used functions.
19973 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19974 (add_method): Used functions are hidden by local functions.
19975 (check_bases_and_members): Handle using-decls before finalizing
19976 CLASSTYPE_METHOD_VEC.
19977 * call.c (add_function_candidate): Add ctype parm; if nonzero,
19978 override the type of 'this' accordingly.
19979 (add_template_candidate, add_template_candidate_real): Add ctype parm.
19980 (convert_class_to_reference, build_user_type_conversion_1,
19981 build_new_function_call, build_object_call, build_new_op,
19982 build_new_method_call): Pass ctype parm.
19984 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19986 * call.c (convert_class_to_reference, build_user_type_conversion_1,
19987 build_new_function_call, build_object_call, build_new_op,
19988 build_new_method_call, build_op_delete_call): Don't get basetype_path
19990 * typeck.c (build_component_ref): Likewise.
19991 * init.c (build_offset_ref): Likewise.
19992 (resolve_offset_ref): Don't call enforce_access.
19993 Call build_scoped_ref.
19994 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
19995 would cause an error or if -pedantic.
19996 * class.c (alter_access): Lose binfo parm.
19998 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20000 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20003 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20005 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20006 pseudo_type_info creation into the std namespace
20008 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20010 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20011 (import_export_class): Remove declaration.
20012 * decl2.c (import_export_class): Make it static.
20013 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20014 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20015 EXPR_WITH_FILE_LOCATION.
20016 * lex.c (check_newline): Tweak filename/lineno setting.
20017 * semantics.c (begin_while_stmt): Fix typo in comment.
20019 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20021 * lang-options.h (-fmessage-length=): Add missing option.
20023 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20025 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20027 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20029 2000-02-25 Jim Wilson <wilson@cygnus.com>
20031 * optimize.c (expand_call_inline): Emit the return label before
20032 evaluating the return value.
20034 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20036 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20037 than duplicating functionality here.
20038 * optimize.c: Include input.h.
20039 (expand_call_inline): Use push_srcloc and pop_srcloc.
20040 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20041 * parse.c: Regenerated.
20042 * Makefile.in (lex.o): Depend on input.h.
20043 (optimize.o): Likewise.
20045 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20047 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20048 function type, rather than ICE.
20050 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20052 * decl.c (grokdeclarator): Call decl_type_access_control.
20053 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20056 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20058 * decl.c (decls_match): Remove obsolete static member nadgering.
20060 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20062 * decl.c (grokdeclarator): Change ANSI to ISO.
20063 * lex.c (consume_string, readescape, do_identifier): Likewise.
20064 (parse_float, real_yylex): Likewise.
20065 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20066 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20067 new_type_id, maybe_label_decls, simple_stmt,
20068 for.init.statement): Likewise.
20069 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20070 * semantics.c (finish_named_return_value): Likewise.
20071 * parse.c: Regenerate.
20073 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20075 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20076 (CPTI_CLASS_STAR_TYPE): Remove.
20077 (vtable_index_type): Likewise.
20078 (class_star_type_node): Remove.
20079 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20080 (build_binary_op_nodefault): Remove.
20081 * call.c (build_new_op): Use build_binary_op instead of
20082 build_binary_op_nodefault.
20083 * decl.c (init_decl_processing): Remove class_star_type_node
20084 initialization. Make delta_type_node ptrdiff_type_node under the
20085 new ABI. Initialize vtable_index_type.
20086 (build_ptrmemfunc_type): Build different structures for the new
20088 (build_enumerator): Use build_binary_op instead of
20089 build_binary_op_nodefault.
20090 * method.c (build_overload_value): Mangle pointers-to-members
20091 appropriately under the new ABI.
20092 * typeck.c (build_array_ref): Use build_binary_op instead of
20093 build_binary_op_nodefault.
20094 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20095 (build_binary_op_nodefault): Rename to ...
20096 (build_binary_op): ... this. Remove old version. Adjust for
20097 pointer-to-member comparisons under the new ABI.
20098 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20099 (build_ptrmemfunc): Adjust for the new ABI.
20100 (expand_ptrmemfunc_cst): Likewise.
20101 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20102 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20104 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20106 * call.c (build_object_call): Compress consecutive calls to
20108 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20109 (build_op_delete_call): Adjust message formatting.
20111 * class.c (check_bases): Compress consecutive calls to
20113 (finish_struct_anon): Say 'ISO C++'.
20115 * decl.c (start_decl): Same here.
20116 (grok_reference_init): Likewise.
20117 (grokfndecl): Correct message formatting.
20118 (grokfndecl): Improve diagnostic.
20119 (check_static_variable_definition): Likewise. Say 'ISO C++'
20120 (compute_array_index_type): Say 'ISO C++'
20121 (create_array_type_for_decl): Compress consecutive calls to
20123 (grokdeclarator): Say 'ISO C++'
20124 (grok_op_properties): Likewise.
20126 * decl2.c (delete_sanity): Clairify diagnostic.
20127 (check_member_template): Same here.
20128 (grok_function_init): Use consistent terminology.
20130 * expr.c (do_case): Say 'ISO C++'
20132 * friend.c (do_friend): Compress consecutive calls to warning.
20134 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20136 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20137 * class.c (build_secondary_vtable): Reorganize. Don't create a
20138 new vtable under the new ABI.
20139 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20140 computing the size.
20141 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20142 the initializing elements.
20143 (initialize_vtable): New function.
20144 (dfs_finish_vtbls): Use it.
20145 (dfs_accumulate_vtbl_inits): New function.
20146 (finish_vtbls): Merge primary and secondary vtables under the new
20148 (finish_struct_1): Remove redundant call to layout_vtable_decl.
20149 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20152 * class.c (build_vtable): New function, split out from ...
20153 (get_vtable_decl): ... here, and ...
20154 (build_secondary_vtable): ... here.
20156 * pt.c (tsubst_decl): Fix formatting.
20158 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20160 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20161 (avoid_overlap, build_base_field): Likewise.
20162 (build_base_field, build_base_fields, is_empty_class):
20163 Test DECL_SIZE with integer_zero.
20164 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20165 * cp-tree.h (struct lang_type): New field size_unit.
20166 (CLASSTYPE_SIZE_UNIT): New macro.
20167 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20168 (cp_finish_decl): Delete -Wlarger-than processing.
20169 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20170 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20171 * tree.c (make_binfo): binfo vector is one entry longer.
20172 (walk_tree): Walk DECL_SIZE_UNIT.
20174 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20176 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20178 (build_vtable_entry): Don't assume all vtable entries are
20180 (build_vtbl_initializer): Adjust accordingly.
20181 (get_vtable_decl): Fix formatting.
20183 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20185 * semantics.c (deferred_type_access_control): Walk the entire
20187 (save_type_access_control): Rename from
20188 initial_deferred_type_access_control. Just remember the value.
20189 (decl_type_access_control): New fn.
20190 (begin_function_definition): Use deferred_type_access_control, after
20191 we've started the function. Set type_lookups to error_mark_node.
20192 * parse.y (frob_specs, fn.def1): Adjust.
20193 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20194 (parse_end_decl, parse_bitfield0, parse_method): New fns.
20195 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20196 (after_type_component_declarator0): Likewise.
20197 (after_type_component_declarator): Likewise.
20198 (notype_component_declarator): Likewise.
20199 * cp-tree.h: Adjust.
20201 * decl.c (redeclaration_error_message): Allow redeclaration of
20202 namespace-scope decls.
20204 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
20206 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20208 2000-02-17 Mark Mitchell <mark@codesourcery.com>
20210 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20211 * decl2.c (grokclassfn): Likewise.
20213 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20215 * decl2.c (lang_decode_option): Don't set default message length
20217 * lex.c (lang_init_options): Set it here.
20219 2000-02-16 Mark Mitchell <mark@codesourcery.com>
20221 Make DECL_CONTEXT mean the class in which a member function was
20222 declared, even for a virtual function.
20223 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20224 (DECL_FRIEND_CONTEXT): New macro.
20225 (DECL_REAL_CONTEXT): Remove.
20226 (SET_DECL_FRIEND_CONTEXT): Likewise.
20227 (DECL_VIRTUAL_CONTEXT): Adjust.
20228 (DECL_CLASS_SCOPE_P): Use TYPE_P.
20229 (add_friends): Remove.
20230 (hack_decl_function_context): Likewise.
20231 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20233 (build_over_call): Fix indentation. Use DECL_CONTEXT
20234 instead of DECL_CLASS_CONTEXT.
20235 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20236 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20237 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20238 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20239 (build_base_field): Likewise.
20240 (finish_struct_1): Likewise.
20241 (build_self_reference): Likewise.
20242 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20244 (pushtag): Use decl_function_context, not
20245 hack_decl_function_context.
20246 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20247 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20248 (pushdecl): Remove bogus code.
20249 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20250 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20251 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20252 Use decl_function_context, nothack_decl_function_context.
20253 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20254 (grokdeclarator): Likewise. Use decl_function_context, not
20255 hack_decl_function_context.
20256 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
20257 (start_function): Use DECL_FRIEND_CONTEXT, not
20258 DECL_CLASS_CONTEXT. Use decl_function_context, not
20259 hack_decl_function_context.
20260 (finish_function): Use decl_function_context, not
20261 hack_decl_function_context.
20262 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20263 DECL_CLASS_CONTEXT.
20264 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20265 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20266 (grokfield): Likewise.
20267 (finish_builtin_type): Likewise.
20268 (finish_vtable_vardec): Use decl_function_context, not
20269 hack_decl_function_context.
20270 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20271 (start_static_initialization_or_destruction): Likewise.
20272 (finish_static_initialization_or_destruction): Likewise.
20273 (mark_used): Adjust logic for deciding when to synthesize methods.
20274 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20276 * error.c (dump_function_decl): Use DECL_CONTEXT, not
20277 DECL_CLASS_CONTEXT.
20278 * friend.c (is_friend): Likewise.
20279 (add_friends): Remove.
20280 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20281 * lex.c (begin_definition_of_inclass_inline): Use
20282 decl_function_context, not hack_decl_function_context.
20283 (process_next_inline): Likewise.
20284 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20285 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20286 DECL_CLASSS_CONTEXT.
20287 (hack_identifier): Likewise.
20288 (synthesize_method): Use decl_function_context, not
20289 hack_decl_function_context.
20290 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20292 (is_member_template): Use decl_function_context, not
20293 hack_decl_function_context. Use DECL_CONTEXT, not
20294 DECL_CLASS_CONTEXT.
20295 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20296 DECL_CLASS_CONTEXT.
20297 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20299 (push_template_decl_real): Likewise.
20300 (instantiate_class_template): Don't call add_friends.
20301 (tsubst_default_argument): Use DECL_CONTEXT, not
20303 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20304 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20305 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20306 DECL_CLASS_CONTEXT.
20307 * repo.c (repo_inline_used): Likewise.
20308 * search.c (current_scope): Adjust for new _CONTEXT macros.
20309 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20311 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20312 (lookup_fnfields_here):Likewise.
20313 (check_final_overrider): Likewise.
20314 (init_vbase_pointers): Likewise.
20315 (virtual_context): Likewise.
20316 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20317 (expand_body): Use decl_function_context, not
20318 hack_decl_function_context.
20319 * tree.c (hack_decl_function_context): Remove.
20320 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20321 DECL_CLASS_CONTEXT.
20322 * typeck2.c (error_not_base_type): Likewise.
20324 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
20326 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20328 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20330 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20332 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
20334 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20336 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
20338 * decl2.c (lang_decode_option): Enable automatic line wrapping.
20340 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
20342 * parse.y (frob_specs): Split out...
20343 (parse_decl): From here.
20344 (fn.def2): Call initial_deferred_type_access_control.
20345 (after_type_component_declarator0): Call frob_specs.
20346 (notype_component_declarator0): Likewise.
20347 * search.c (friend_accessible_p): Nested classes are friends of their
20350 2000-02-10 Mark Mitchell <mark@codesourcery.com>
20352 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20353 used to create an implicit temporary.
20355 * class.c (dfs_modify_vtables): Tweak calculation of functions to
20358 2000-02-08 Nathan Sidwell <nathan@acm.org>
20360 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20361 strip array element qualifiers too.
20363 2000-02-07 Mark Mitchell <mark@codesourcery.com>
20365 * decl.c (store_parm_decls): Don't build cleanups for parameters
20366 while processing_template_decl.
20368 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
20370 * cp-tree.h (struct saved_scope): Add incomplete field.
20371 (namespace_scope_incomplete): New macro.
20372 * decl.c (pushdecl): Use it.
20373 (hack_incomplete_structures): Use it. See through artificial
20375 (mark_saved_scope): Mark it.
20377 Implement access control for nested types.
20378 * search.c (type_access_control): New fn.
20379 (accessible_p): Now we do perform access control for types.
20380 * semantics.c (deferred_type_access_control): New fn.
20381 (initial_deferred_type_access_control): New fn.
20382 (begin_function_definition): Call it. Add lookups parm.
20383 * decl.c (struct binding_level): Add this_class field.
20384 (pushlevel_class): Set it.
20385 (mark_binding_level): Mark it.
20386 (lookup_name_real): Use it. Call type_access_control.
20387 (mark_saved_scope): Mark lookups field.
20388 * cp-tree.h (flagged_type_tree): Add lookups field.
20389 (struct saved_scope): Add lookups field.
20390 (type_lookups): New macro.
20391 * parse.y (declmods): Now <ftype>.
20392 (parse_decl): Add lookups parm. Call
20393 initial_deferred_type_access_control.
20394 (lang_extdef): Clear type_lookups.
20395 (typed_declspecs, declmods, typespec): Set lookups field.
20396 (initdcl): Call deferred_type_access_control.
20397 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20398 component_decl_1, named_parm): Adjust.
20399 * friend.c (is_friend): Nested classes are friends of their
20402 * class.c (currently_open_derived_class): New fn.
20403 * method.c (hack_identifier): Use it.
20405 * lex.c (do_identifier): Remove obsolete code.
20407 * parse.y (typed_typespecs): Propagate new_type_flag properly.
20409 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
20411 * tinfo.h: Remove apostrophes from C++ comment (xgettext
20412 thinks this file is plain C).
20414 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20416 * Makefile.in (call.o): Depend on $(EXPR_H).
20418 * call.c: Include "expr.h".
20420 * class.c (dump_class_hierarchy): Add prototype.
20422 * search.c (dfs_get_pure_virtuals): Likewise.
20424 2000-02-1 Ulrich Drepper <drepper@redhat.com>
20426 * parse.y (simple_stmt): Allow :: token in asm parameter list.
20427 * parse.c: Rebuilt.
20429 2000-01-31 Jim Wilson <wilson@cygnus.com>
20431 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20432 Store it in DECL_FCONTEXT.
20433 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20435 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
20437 * tinfo.h (old abi): #include "tconfig.h".
20438 * tinfo.cc (convert_to_base): Move into old abi section.
20440 2000-01-31 Mark Mitchell <mark@codesourcery.com>
20442 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20443 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20444 (BINFO_PRIMARY_BINFO): New macro.
20445 (BF_DELTA): Rename to ...
20446 (BV_DELTA): ... this.
20447 (BF_VCALL_INDEX): Rename to ...
20448 (BV_VCALL_INDEX): ... this.
20449 (BF_FN): Rename to ...
20451 * class.c (build_vbase_path): Adjust for changes to reverse_path.
20452 (set_rtti_entry): Rename BF_ macros to BV_ variants.
20453 (modify_vtable_entry): Simplify.
20454 (add_virtual_function): Rename BF_ macros to BV_ variants.
20455 (build_vtable_initializer): Likewise.
20456 (get_class_offset_1): Remove.
20457 (dfs_get_class_offset): Likewise.
20458 (get_class_offset): Likewise.
20459 (dfs_find_final_overrider): New function.
20460 (find_final_overrider): Likewise.
20461 (modify_one_vtable): Remove.
20462 (dfs_find_base): New function.
20463 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
20464 find_final_overrider.
20465 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
20467 (dfs_fixup_vtable_deltas): Remove.
20468 (override_one_vtable): Remove.
20469 (merge_overrides): Likewise.
20470 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20471 unreal chilren of virtual bases.
20472 (finish_struct_1): Don't use merge_overrides. Don't use
20473 dfs_fixup_vtable_deltas.
20474 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20477 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20478 Jason Merrill <jason@yorick.cygnus.com>
20480 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20482 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
20484 * exception.cc (__throw_bad_typeid): Add missing std::.
20486 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20488 * cp-tree.h (make_thunk): PROTO -> PARAMS.
20490 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
20492 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20494 Runtime support for new-abi rtti.
20495 * inc/typeinfo (type_info::operator!=): Define in class.
20496 (type_info::before, type_info::name, type_info::operator==,
20497 type_info::operator!=): Define new ABI implementations.
20498 (type_info::is_pointer_p, type_info::is_function_p): Declare
20499 new virtual functions.
20500 (type_info::do_catch, type_info::do_upcast): Likewise.
20502 * tinfo.h (__base_class_info): Define new class.
20503 (__class_type_info): Likewise.
20504 (__si_class_type_info): Likewise.
20505 (__vmi_class_type_info): Likewise.
20506 (__dynamic_cast): Prototype.
20508 * tinfo.cc: Conditionalize old and new rtti mechanisms.
20509 (type_info::is_pointer_p): Define new function.
20510 (type_info::is_function_p): Likewise.
20511 (type_info::do_catch): Likewise.
20512 (type_info::do_upcast): Likewise.
20513 (vtable_prefix): New structure for vtable access.
20514 (adjust_pointer): Define new template function.
20515 (contained_p, public_p, virtual_p, contained_public_p,
20516 contained_nonpublic_p, contained_nonvirtual_p): Define new
20518 (nonvirtual_base_type): New local variable.
20519 (__class_type_info::~__class_type_info): Define.
20520 (__si_class_type_info::~__si_class_type_info): Likewise.
20521 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20522 (__class_type_info::do_catch): Define new function.
20523 (__class_type_info::do_upcast): Likewise.
20524 (__class_type_info::find_public_src): Likewise.
20525 (__class_type_info::do_find_public_src): Likewise.
20526 (__si_class_type_info::do_find_public_src): Likewise.
20527 (__vmi_class_type_info::do_find_public_src): Likewise.
20528 (__class_type_info::do_dyncast): Likewise.
20529 (__si_class_type_info::do_dyncast): Likewise.
20530 (__vmi_class_type_info::do_dyncast): Likewise.
20531 (__class_type_info::do_upcast): Likewise.
20532 (__si_class_type_info::do_upcast): Likewise.
20533 (__vmi_class_type_info::do_upcast): Likewise.
20534 (__dynamic_cast): Likewise.
20536 * tinfo2.cc (__fundamental_type_info): Define new class.
20537 (__pointer_type_info): Likewise.
20538 (__reference_type_info): Likewise.
20539 (__array_type_info): Likewise.
20540 (__function_type_info): Likewise.
20541 (__enum_type_info): Likewise.
20542 (__ptr_to_member_type_info): Likewise.
20543 (__fundamental_type_info::~__fundamental_type_info): Define.
20544 (__pointer_type_info::~__pointer_type_info): Likewise.
20545 (__reference_type_info::~__reference_type_info): Likewise.
20546 (__array_type_info::~__array_type_info): Likewise.
20547 (__function_type_info::~__function_type_info): Likewise.
20548 (__enum_type_info::~__enum_type_info): Likewise.
20549 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20550 (__pointer_type_info::do_catch): Define new function.
20551 (__ptr_to_member_type_info::do_catch): Define new function.
20553 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20554 (__is_pointer): Likewise.
20556 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20558 2000-01-30 Mark Mitchell <mark@codesourcery.com>
20560 * cp/class.c (build_vtable): Rename to build_primary_vtable.
20561 (prepare_fresh_vtable): Rename to build_secondary_vtable.
20562 (make_new_vtable): New function.
20563 (modify_vtable_entry): Handle generation of new vtables correctly.
20564 (modify_one_vtable): Remove unused parameter.
20565 (dfs_fixup_vtable_deltas): Likewise.
20566 (override_one_vtable): Use build_secondary_vtable.
20567 (finish_struct_1): Use build_primary_vtable and
20568 build_secondary_vtable.
20570 2000-01-28 Ulrich Drepper <drepper@redhat.com>
20572 * cp/decl.c: Adjust variable names, comments, help strings.
20574 2000-01-29 Nathan Sidwell <nathan@acm.org>
20576 * new2.cc (operator delete[]): Use operator delete, don't assume
20579 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
20581 * class.c (build_vtbl_initializer): Add argument to
20582 build_vtable_entry call.
20584 2000-01-27 Mark Mitchell <mark@codesourcery.com>
20586 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20587 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20588 (BF_DELTA): New macro.
20589 (BF_VCALL_INDEX): Likewise.
20591 (THUNK_VCALL_OFFSET): Likewise.
20592 (make_thunk): Change prototype.
20593 * class.c (build_vtable_entry): Integrate
20594 build_vtable_entry_for_fn. Handle vcall indices.
20595 (build_vtable_entry_for_fn): Remove.
20596 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
20597 BF_VCALL_INDEX, BF_FN.
20598 (modify_vtable_entry): Integrate common code from
20599 modify_one_vtable and dfs_fixup_vtable_deltas.
20600 (add_virtual_function): Set BF_VCALL_INDEX.
20601 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
20603 (modify_one_vtable): Simplify.
20604 (dfs_fixup_vtable_deltas): Likewise.
20605 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20606 * method.c (make_thunk): Handle vcall indices.
20608 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
20610 Compiler side new abi rtti (not enabled).
20611 * cp-tree.h (new_abi_rtti_p): New macro.
20612 (emit_support_tinfos): Prototype new function.
20613 (tinfo_decl_p): Likewise.
20614 (emit_tinfo_decl): Likwise.
20615 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20617 (doing_runtime): New local static.
20618 (init_rtti_processing): Add new-abi initializer.
20619 (get_tinfo_decl): Add new-abi logic.
20620 (tinfo_from_decl): Likewise.
20621 (build_dynamic_cast_1): Likewise.
20622 (qualifier_flags): New static function.
20623 (tinfo_base_init): Likewise.
20624 (generic_initializer): Likewise.
20625 (ptr_ref_initializer): Likewise.
20626 (ptmd_initializer): Likewise.
20627 (class_hint_flags): Likewise.
20628 (class_initializer): Likewise.
20629 (synthesize_tinfo_var): Likewise.
20630 (create_real_tinfo_var): Likewise.
20631 (create_pseudo_type_info): Likewise.
20632 (get_vmi_pseudo_type_info): Likewise.
20633 (create_tinfo_types): Likewise.
20634 (emit_support_tinfos): New global function.
20635 (tinfo_decl_p): New global predicate.
20636 (emit_tinfo_decl): New global function.
20637 * class.c (set_rtti_entry): Generalize for old and new rtti.
20638 (build_vtbl_initializer): Likewise.
20639 * decl2.c (finish_file): Likewise.
20641 2000-01-27 Jim Wilson <wilson@cygnus.com>
20643 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20644 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20646 2000-01-27 Mike Stump <mrs@wrs.com>
20648 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20651 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
20653 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20655 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
20657 * optimize.c (calls_setjmp_r): Supply new argument
20658 to special_function_p.
20660 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20662 * call.c: PROTO -> PARAMS.
20663 * class.c: Likewise.
20664 * cp-tree.h: Likewise.
20666 * decl.c: Likewise.
20667 * decl.h: Likewise.
20668 * decl2.c: Likewise.
20669 * dump.c: Likewise.
20670 * errfn.c: Likewise.
20671 * error.c: Likewise.
20672 * except.c: Likewise.
20673 * expr.c: Likewise.
20674 * init.c: Likewise.
20675 * input.c: Likewise.
20678 * method.c: Likewise.
20679 * optimize.c: Likewise.
20680 * parse.y: Likewise.
20682 * repo.c: Likewise.
20683 * rtti.c: Likewise.
20684 * search.c: Likewise.
20685 * semantics.c: Likewise.
20686 * spew.c: Likewise.
20687 * tree.c: Likewise.
20688 * typeck.c: Likewise.
20689 * typeck2.c: Likewise.
20690 * xref.c: Likewise.
20692 2000-01-25 Richard Henderson <rth@cygnus.com>
20694 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20696 2000-01-25 Mark Mitchell <mark@codesourcery.com>
20698 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20699 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20700 (struct vcall_offset_data_s): New type.
20701 (dfs_vcall_offset_queue_p): New function.
20702 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20703 (build_vcall_offset_vtbl_entries): Likewise.
20704 (layout_vtable_decl): Likewise.
20705 (num_vfun_entries): Likewise.
20706 (num_extra_vtbl_entries): Add the entries for vcall offsets.
20707 (build_vtbl_initializer): Likewise.
20708 (dfs_finish_vtabls): Use layout_vtable_decl.
20709 (modify_one_vtables): Always duplicate vtables under the new ABI.
20710 (finish_struct_1): Use layout_vtable_decl.
20712 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20714 * decl.c (member_function_or_else): Change third arg from a format
20715 specifier to an `enum overload_flags'. Callers changed.
20717 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
20719 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20720 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20721 build_const_cast, get_delta_difference, check_return_expr): Avoid
20722 ANSI string concatenation usage.
20724 2000-01-24 Mark Mitchell <mark@codesourcery.com>
20726 * class.c (layout_class_type): Put the fields required to make a
20727 class non-empty at the end, not the beginning, of the TYPE_FIELDs
20730 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
20732 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20735 * decl2.c (mark_used): Do instantiate inlines that have been
20736 explicitly instantiated.
20738 2000-01-24 Richard Henderson <rth@cygnus.com>
20740 * call.c (build_over_call): Use expand_tree_builtin.
20741 * typeck.c (build_function_call_real): Likewise.
20742 (build_binary_op_nodefault): Handle unordered compares.
20744 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20746 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20747 cp_tree_index values.
20748 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20749 New global node #defines for them.
20750 * rtti.c (call_void_fn): Replace with ...
20751 (build_runtime_decl): ... new static function.
20752 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20753 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20754 (build_dynamic_cast_1): Always produce correctly typed result.
20755 Explicitly produce type_info addresses. Use dynamic_cast_node.
20756 * exception.cc (__throw_bad_cast): Return `void *'.
20757 (__throw_bad_typeid): Return `const type_info &'.
20759 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20761 * cp-tree.h (get_vtable_decl): Prototype new function.
20762 * class.c (get_vtable_decl): New function. Broken out from ...
20763 (build_vtable): ... here. Use it.
20764 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20765 by get_vtable_decl.
20767 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20769 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20770 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20771 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20772 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20773 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20774 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20775 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20776 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20777 (CPTI_TINFO_VAR_ID): New enumeration.
20778 (__tp_desc_type_node, __access_mode_type_node,
20779 __bltn_desc_type_node, __user_desc_type_node,
20780 __class_desc_type_node, __ptr_desc_type_node,
20781 __attr_desc_type_node, __func_desc_type_node,
20782 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20783 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20784 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20785 enum_desc_type_node, class_desc_type_node,
20786 si_class_desc_type_node, vmi_class_desc_type_node,
20787 ptmd_desc_type_node, base_desc_type_node): New #defines.
20788 (tinfo_fn_id, tinfo_fn_type): Rename to ...
20789 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20790 (tinfo_var_id): New enumeration.
20791 (DECL_TINFO_FN_P): Augment comment.
20792 * decl.c (cp_global_trees): Adjust documentation.
20793 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20794 tinfo_decl_type and tinfo_var_id.
20795 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20796 (build_typeid): Remove unused variable.
20797 (get_tinfo_var): Use tinfo_var_id.
20798 (tinfo_name): New static function.
20799 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20800 (tinfo_from_decl): Likewise.
20801 (get_base_offset): New static function, broken out of
20803 (expand_si_desc): Use tinfo_name.
20804 (expand_class_desc): Likewise. Lose local static variable.
20805 Use base_desc_type_node. Use get_base_offset.
20806 (expand_ptr_desc): Use tinfo_name.
20807 (expand_attr_desc): Likewise.
20808 (expand_generic_desc): Likewise.
20810 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20811 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20813 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20815 * cp-tree.h (__eprintf): Remove declaration.
20816 * tree.c (__eprintf): Remove definition.
20818 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
20819 Mark Mitchell <mark@codesourcery.com>
20821 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20822 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20824 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
20826 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20828 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20830 * cp-tree.h (register_dtor_fn): New function.
20831 * decl.c (destroy_local_static): Rename to ...
20832 (register_dtor_fn): ... this. Give it external linkage.
20833 (expand_static_init): Use it.
20834 * decl2.c (do_static_initialization): Likewise, if using
20836 (do_static_destruction): Check that __cxa_atexit is not in use.
20837 (finish_file): Don't call do_static_destruction if using
20840 * typeck.c (convert_arguments): Restore two-message error
20843 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
20845 Remap dynamic cast hint values to be consistent across ABIs.
20846 * search.c (dynamic_cast_base_recurse): Remap generated value.
20847 (get_dynamic_cast_base_type): Adjust documentation.
20848 * tinfo.h (__user_type_info::dyncast): Likewise.
20849 (__user_type_info::find_public_subobj): Remap BOFF meaning.
20850 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20851 (__class_type_info::do_dyncast): Likewise.
20852 (__class_type_info::do_find_public_subobj): Likewise.
20853 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20855 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20857 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20859 * typeck2.c (incomplete_type_error): Restore previous
20860 cp_error and cp_error_at call sequence.
20862 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
20864 * class.c (dump_class_hierarchy): Make format agree with argument;
20865 cast pointer to unsigned long and print with %lx.
20867 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20869 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20871 * typeck.c (composite_pointer_type, common_type,
20872 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20873 build_function_call_real, convert_arguments,
20874 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20875 build_unary_op, mark_addressable, build_compound_expr,
20876 build_static_cast, build_reinterpret_cast, build_const_cast,
20877 build_c_cast, build_modify_expr, get_delta_difference,
20878 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20879 'ISO C++'. Fusion consecutive calls to diagnostic message routines
20881 * typeck2.c (readonly_error, abstract_virtuals_error,
20882 process_init_constructor, check_for_new_type): Likewise.
20884 2000-01-19 Mark Mitchell <mark@codesourcery.com>
20886 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20889 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
20891 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20892 (build_x_typeid): Likewise.
20893 (get_tinfo_fn): Likewise.
20894 (get_tinfo_fn_unused): Rename to ...
20895 (get_tinfo_decl): ... here.
20896 * rtti.c (build_headof): Replace logic error with assertion.
20897 (get_tinfo_fn_dynamic): Rename to ...
20898 (get_tinfo_decl_dynamic): ... here. Make static. Use
20899 complete_type_or_else.
20900 (build_x_typeid): Move into ...
20901 (build_typeid): ... here. Adjust call to
20902 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20903 throw_bad_typeid expression.
20904 (get_tinfo_fn_unused): Rename to ...
20905 (get_tinfo_decl): ... here. Adjust comment.
20906 (get_tinfo_fn): Delete.
20907 (tinfo_from_decl): New static function.
20908 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20909 (get_typeid): Use complete_type_or_else.
20910 (build_dynamic_cast_1): Adjust calls to
20911 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20912 * parse.y (primary): Adjust call to build_typeid.
20913 * except.c (build_eh_type_type_ref): Adjust call to
20914 get_tinfo_decl. Mark as used.
20915 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20916 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20917 * parse.c: Regenerated.
20919 2000-01-17 Mark Mitchell <mark@codesourcery.com>
20921 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
20922 calling convention.
20923 (resolves_to_fixed_type_p): Document calling convention.
20924 * rtti.c (build_x_typeid): Initialize NONNULL.
20926 * cp-tree.h (build_shared_int_cst): New function.
20927 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20928 * class.c (modify_vtable_entry): Likewise.
20929 (add_virtual_function): Split out code to generated shared
20930 INTEGER_CSTs to build_share_int_cst.
20931 (modify_all_vtables): Handle all the overridden functions here.
20932 Add overridden functions from non-primary virtual bases to the
20934 (finish_struct_1): Adjust call to modify_all_vtables. Add
20935 overridden functions from non-primary bases to the vtable.
20936 * tree.c (build_shared_int_cst): New function.
20938 * cp-tree.h (scratchalloc): Remove.
20939 (build_scratch_list): Likewise.
20940 * call.c (convert_class_to_reference): Replace build_scratch_list
20941 and build_expr_list with build_tree_list.
20942 (add_candidate): Replace scratchalloc with expralloc. Note memory
20944 (build_user_type_conversion_1): Replace build_scratch_list
20945 and build_expr_list with build_tree_list.
20946 (build_new_op): Likewise.
20947 (build_op_delete_call): Likewise.
20948 (convert_like): Likewise.
20949 * cvt.c (ocp_convert): Likewise.
20950 * decl.c (start_decl): Likewise.
20951 (start_function): Likewise.
20952 (finish_destructor_body): Likewise.
20953 (maybe_build_cleanup_1): Likewise.
20954 * decl2.c (reparse_decl_as_expr): Likewise.
20955 * init.c (perform_member_init): Likewise.
20956 (expand_cleanup_for_base): Likewise.
20957 (build_builtin_delete_call): Likewise.
20958 (build_new_1): Likewise.
20959 (build_delete): Likewise.
20960 * method.c (do_build_assign_ref): Likewise.
20961 * parse.y (already_scoped_stmt): Likewise.
20962 (nontrivial_exprlist): Likewise.
20963 (net_initializer): Likewise.
20964 (initlist): Likewise.
20965 * parse.c: Regenerated.
20966 * rtti.c (build_x_typeid): Likewise.
20967 (build_dynamic_cast_1): Likewise.
20968 * typeck.c (build_x_compound_expr): Likewise.
20969 (build_static_cast): Likewise.
20970 (build_modify_expr): Likewise.
20972 * cp-tree.h (DECL_VINDEX): Add documentation.
20973 * class.c (build_vtable_entry): Likewise.
20974 (start_vtable): Add comment.
20975 (add_virtual_function): Replace pending_hard_virtuals with
20976 overridden_virtuals and pending_virtuals with new_virtuals.
20977 Replace redundant assignments with assertions.
20978 (check_for_override): Add comment.
20979 (check_bases_and_members): Replace pending_hard_virtuals with
20980 overridden_virtuals and pending_virtuals with new_virtuals.
20981 (create_vtbl_ptr): Likewise.
20982 (layout_class_type): Likewise.
20983 (finish_struct_1): Likewise. Add comments.
20985 2000-01-16 Mark Mitchell <mark@codesourcery.com>
20987 * class.c (finish_struct_1): Replace redundant code with
20990 * cp-tree.h (flag_new_abi): Move.
20991 (flag_use_cxa_atexit): Likewise.
20992 (flag_honor_std): Likewise.
20993 (flag_rtti): Likewise.
20994 (vbase_offsets_in_vtable_p): Define.
20995 (vptrs_present_everywhere_p): Likewise.
20996 (TYPE_CONTAINS_VPTR_P): Likewise.
20997 (dfs_walk_real): Declare.
20998 * class.c (build_vbase_pointer_fields): Check
20999 vbase_offsets_in_vtable_p.
21000 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21002 (build_vbase_offset_vtbl_entries): Simplify.
21003 (build_vbase_offset_vtbl_entries): Adjust.
21004 (build_vbase_pointer): Add ability to look up vbase offsets in
21006 (start_vtable): New function.
21007 (add_virtual_function): Use it.
21008 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21009 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21010 (build_vtbl_initializer): Take the type of the complete object as
21011 input. Use it to correctly calculate vbase offsets.
21012 (dfs_finish_vtbls): Pass the complete type to
21013 build_vtbl_initializer.
21014 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21015 (create_vtable_ptr): Create a vtable even if there are no
21016 new virtual functions, under the new ABI.
21017 (finish_struct_1): Likewise.
21018 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21019 * decl.c (exapnd_static_init): Remove call to
21020 preserve_initializer.
21021 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21023 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21024 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21025 (construct_virtual_bases): Don't initialize virtual base pointers
21027 (build_aggr_init): Clean up comment.
21028 (expand_aggr_init_1): Likewise.
21029 * rtti.c (expand_class_desc): Store the virtual function table
21030 index where the vbase offset lives in the offset field.
21031 * search.c (dfs_walk_real): Make it global.
21032 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21033 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21035 * tinfo.h (USItype): Make it signed under the new ABI.
21036 * tinfo.cc (convert_to_base): New function. Encapsulate base
21037 conversion logic here.
21038 (__class_type_info::do_upcast): Use it.
21039 (__class_type_info::do_dyncast): Likewise.
21040 (__class_type_info::do_find_public_subobj): Likewise.
21042 * init.c (construct_virtual_bases): Don't look up the addresses of
21043 virtual bases at run-time.
21045 * class.c (build_vbase_pointer): Relocate.
21046 (build_vbase_pointer_fields): Likewise.
21047 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21048 (build_vbase_offset_vtbl_entries): Likewise.
21050 * decl.c (init_decl_processing): Complain if -fnew-abi
21051 -fno-vtable-thunks is used.
21053 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21056 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21058 * cp-tree.h (num_extra_vtbl_entries): New function.
21059 (size_extra_vtbl_entries): Likewise.
21060 (dfs_vtable_path_unmark): Likewise.
21061 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21062 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21063 * class.c (num_extra_vtbl_entries): New function.
21064 (size_extra_vtbl_entries): Likewise.
21065 (dfs_build_vbase_offset_vtbl_entries): New function.
21066 (build_vbase_offset_vtbl_entries): Likewise.
21067 (build_vtbl_initializer): Use it.
21068 (finish_struct_1): Adjust vtable sizes (using
21069 num_extra_vtbl_entries).
21070 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21071 THUNK_DECL is non-NULL before expanding it.
21072 * init.c (expand_virtual_init): Adjust the vtable pointer by
21073 size_extra_vtbl_entries before storing it.
21074 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21075 Handle TREE_LIST parameters here, not in the dfs_* functions.
21076 (dfs_unmarked_real_bases_queue_p): Adjust.
21077 (dfs_marked_real_bases_queue_p): Likewise.
21078 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21079 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21080 (dfs_vtable_path_unmark): Likewise.
21082 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21084 * optimize.c (copy_body_r): Clear the operand three of a
21085 TARGET_EXPR when copying it.
21087 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21089 * method.c (build_decl_overload_real): Check whether we are in ::
21090 before returning __builtin_new/delete.
21092 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21094 * pt.c (tsubst_friend_function): Improve comment.
21095 (instantiate_decl): Avoid crashing when a "nested" function is
21096 instantiated from the top level.
21098 * dump.c (dqeueue_and_dump): Dump
21099 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21101 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21103 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21105 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21107 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21108 ENABLE_NEW_GXX_ABI defined.
21109 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21110 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21111 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21113 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21115 * decl.c (start_cleanup_fn): Call pushdecl.
21117 * call.c (convert_class_to_reference): Fix typos.
21118 (build_conditional_expr): Handle errors gracefully.
21119 * class.c (push_nested_class): Likewise.
21120 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21121 (DECL_THIS_EXTERN): Use it.
21122 (DECL_THIS_STATIC): Likewise.
21123 * cvt.c (convert_to_void): Handle errors gracefully.
21124 (build_expr_type_conversion): Likewise.
21125 * decl.c (maybe_push_decl): Likewise.
21126 (start_decl_1): Likewise.
21127 (require_complete_types_for_parms): Likewise.
21128 * parse.y (structsp): Likewise.
21129 (base_class): Likewise.
21130 * parse.c: Regenerated.
21131 * pt.c (finish_member_template_decl): Likewise.
21132 * typeck.c (decay_conversion): Likewise.
21134 * cp-tree.h (dfs_skip_vbases): New function.
21135 (find_vbase_instance): Likewise.
21136 * class.c (determine_primary_base): Allow a nearly empty base to
21137 serve as a primary base class under the new ABI.
21138 (get_class_offset_1): Rename to ...
21139 (dfs_get_class_offset): ... this. Simplify. Don't issue error
21141 (get_class_offset): Use it. Issue error messages here.
21142 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21143 find the right copies of virtual bases.
21144 (fixup_vtable_deltas1): Rename to ...
21145 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
21146 bases as primary bases.
21147 (fixup_vtable_deltas): Remove.
21148 (override_one_vtable): Handle virtual bases as primary bases.
21149 (merge_overrides): Likewise.
21150 (finish_struct_1): Likewise.
21151 (dump_class_hierarchy): Dump primary-ness of bases as well.
21152 * search.c (mark_primary_bases): Use a pre-order traversal to
21153 handle primary virtual bases.
21154 (dfs_skip_vbases): New fiunction.
21155 (expand_upcast_fixups): Adjust to handle primary virtual bases.
21156 (fixup_virtual_upcast_offsets): Likewise.
21157 (fixup_all_virtual_upcast_offsets): Likewise.
21158 (dfs_find_vbase_instances): New function.
21159 (find_vbase_instance): Likewise.
21161 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
21163 * lex.c (DIR_SEPARATOR): Delete macro.
21165 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
21167 * decl2.c (lang_decode_option): Handle automatic line wrapping
21170 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21172 * friend.c (do_friend): Don't resolve scopes when processing
21173 template declarations, even if the qualifying scope doesn't
21174 involve template parameters.
21176 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21178 * class.c (dfs_modify_vtables_queue_p): Remove.
21179 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21180 and dfs_marked_real_bases_queue_p instead of
21181 dfs_modify_vtables_queue_p.
21183 * class.c (build_vbase_path): Simplify.
21184 (dfs_propagate_binfo_offsets): New function.
21185 (propagate_binfo_offsets): Use it.
21186 (remove_base_field): Simplify.
21187 (dfs_set_offset_for_vbases): Remove.
21188 (dfs_set_offset_for_shared_vbases): New function.
21189 (dfs_set_offset_for_unshared_vbases): Likewise.
21190 (layout_virtual_bases): Use them.
21191 (layout_basetypes): Don't call propagate_binfo_offsets.
21192 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21195 * class.c (build_base_field): New function, split out from ...
21196 (build_base_fields): ... here. Use it. Allocate primary bases
21197 first, under the new ABI.
21198 (get_vtable_entry): Remove.
21199 (remove_base_field): New function, split out from ...
21200 (remove_base_fields): ... here. Adjust since primary bases come
21201 first under the new ABI.
21203 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21204 (initialize_vtbl_ptrs): New function.
21205 (expand_indirect_vtbls_init): Change prototype.
21206 (convert_pointer_to_vbase): Declare.
21207 * init.c (expand_direct_vtbls_init): Remove.
21208 (dfs_initialize_vtbl_ptrs): New function.
21209 (initialize_vtbl_ptrs): Likewise.
21210 (emit_base_init): Use initialize_vtbl_ptrs.
21211 * search.c (convert_pointer_to_vbase): Make it global.
21212 (expand_indirect_vtbls_init): Remove vtable initialization code.
21213 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21215 * class.c (dfs_finish_vtbls): New function.
21216 (finish_vtbls): Use it.
21217 (dump_class_hierarchy): New function.
21219 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21220 (BINFO_VBASE_PRIMARY_P): New macro.
21221 (BINFO_VIRTUALS): Add to documentation.
21222 (SET_BINFO_PRIMARY_MARKED_P): Remove.
21223 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21224 (dfs_mark_primary_bases_queue_p): Likewise.
21225 (dfs_unmarked_real_bases_queue_p): New function.
21226 (dfs_marked_real_bases_queue_p): Likewise.
21227 * search.c (dfs_mark_primary_bases): Adjust.
21228 (mark_primary_bases): Likewise.
21229 (get_shared_vbase_if_not_primary): New function.
21230 (dfs_unmarked_real_bases_queue_p): Likewise.
21231 (dfs_marked_real_bases_queue_p): Likewise.
21232 (dfs_get_pure_virtuals): Simplify.
21233 (get_pure_virtuals): Likewise.
21235 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21237 * lex.c: Include tm_p.h.
21239 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
21241 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21243 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
21245 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21246 * pt.c (instantiate_decl): Defer comdat templates that might not be
21249 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21250 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21251 (finish_file): Likewise.
21253 * decl2.c (import_export_class): Undo 12/14 change.
21255 * error.c (dump_decl): operator new, not operatornew.
21257 * class.c (field_decl_cmp): A nontype is "greater" than a type.
21258 * search.c (lookup_field_1): Look for the last field with the
21261 2000-01-05 Nathan Sidwell <nathan@acm.org>
21263 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21266 2000-01-05 Nathan Sidwell <nathan@acm.org>
21268 * typeck.c (build_static_cast): Don't strip target qualifiers
21269 when casting from a class.
21271 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21273 * class.c (warn_hidden): Initialize variable `fndecl'.
21275 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
21277 * decl.c (flag_isoc9x): New variable to be able to use code in
21278 c-common.c. For now always zero.
21280 2000-01-03 Mark Mitchell <mark@codesourcery.com>
21282 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21283 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21284 or unshare_base_binfos for virtual bases here.
21285 * search.c (dfs_get_vbase_types): Do it here.
21286 (get_vbase_types): Adjust.
21288 2000-01-02 Mark Mitchell <mark@codesourcery.com>
21290 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21291 (BINFO_PRIMARY_MARKED_P): Use flag 5.
21292 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21293 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21294 (unmark_primary_bases): Remove declaration.
21295 (unmarkedp): Declare.
21296 (dfs_vbase_unmark): Likewise.
21297 * class.c (determine_primary_base): Return immediately if there
21298 are no base classes. Call mark_primary_bases here.
21299 (modify_all_direct_vtables): Remove.
21300 (modify_all_indirect_vtables): Remove.
21301 (dfs_modify_vtables_queue_p): New function.
21302 (dfs_modify_vtables): New function.
21303 (modify_all_vtables): Use them.
21304 (build_base_fields): Build FIELD_DECLs for primary virtual base
21306 (create_vtable_ptr): Don't call determine_primary_base here.
21307 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21308 (dfs_set_offset_for_vbases): ... this.
21309 (layout_virtual_bases): Use it.
21310 (layout_class_type): Call determine_primary_base here.
21311 * search.c (unmarkedp): Make it global.
21312 (shared_marked_p): Simplify.
21313 (shared_unmarked_p): Likewise.
21314 (dfs_primary_bases_queue_p): Remove.
21315 (dfs_unmark_primary_bases): Likewise.
21316 (unmark_primary_bases): Likewise.
21317 (mark_primary_bases): Simplify.
21318 (get_pure_virtuals): Don't call mark_primary_bases here.
21319 (dfs_vbase_unmark): New function.
21320 (get_vbase_types): Simplify.
21322 * class.c (struct base_info): Remove.
21323 (determine_primary_base): Take has_virtual_p rather than a
21324 base_info as input. Don't calculate max_has_virtual.
21325 (finish_struct_bits): Remove max_has_virtual argument.
21326 (create_vtable_ptr): Remove max_has_virtual_p argument.
21327 (layout_virtual_bases): Remove max argument.
21328 (layout_basetypes): Likewise.
21329 (layout_class_type): Remove max_has_virtual_p argument.
21330 (finish_struct_1): Remove max_has_virtual.
21332 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21333 (layout_basetypes): Remove.
21334 * class.c (propagate_binfo_offsets): Moved here from tree.c.
21335 Update to handle primary virtual bases.
21336 (remove_base_fields): New function, split out from
21338 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21339 (layout_virtual_bases): New function, split out from
21340 layout_basetypes. Update to handle primary virtual bases.
21341 (layout_basetypes): Moved here from tree.c. Use
21342 remove_base_fields and layout_virtual_bases.
21343 * search.c (dfs_mark_primary_bases_queue_p): New function.
21344 (mark_primary_bases): Use it.
21345 * tree.c (CEIL): Remove.
21346 (propagate_binfo_offsets): Remove.
21347 (layout_basetypes): Remove.
21349 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21351 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21352 (BINFO_PRIMARY_MARKED_P): New macro.
21353 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21354 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21355 (mark_primary_bases): New function.
21356 (unmark_primary_bases): Likewise.
21357 * search.c (get_abstract_virtuals_1): Remove.
21358 (dfs_mark_primary_bases): New function.
21359 (mark_primary_bases): Likewise.
21360 (dfs_unmark_primary_bases): Likewise.
21361 (unmark_primary_bases): Likewise.
21362 (dfs_get_pure_virtuals): Likewise.
21364 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21366 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21367 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21368 (modify_one_vtable): Adjust.
21369 (fixup_vtable_deltas1): Likewise.
21370 (override_one_vtable): Likewise.
21371 * search.c (get_abstract_virtuals_1): Likewise.
21372 (get_pure_virtuals): Likewise.
21373 (expand_upcast_fixups): Likewise.
21374 * tree.c (debug_binfo): Likewise.
21376 * class.c (build_vtable): Don't return a value. Don't rebuild
21377 vtables for bases that have already been handled.
21378 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21379 already been handled.
21380 (modify_one_vtable): Adjust accordingly.
21381 (fixup_vtable_deltas1): Likewise.
21382 (finish_struct_1): Likewise.
21384 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21386 * call.c (build_new_method_call): Also check destructors.