1 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
4 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
5 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
6 is_type_p to lookup_qualified_name.
8 * semantics.c (finish_call_expr): Refactor some code.
11 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
12 (build_min_non_dep): Declare.
13 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
14 (build_min_non_dep): New.
15 * cvt.c (convert_to_void): Don't explicitly copy
16 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
17 * call.c (build_new_method_call): Use build_min_non_dep.
18 * decl2.c (grok_array_decl): Likewise.
19 (build_offset_ref_call_from_tree): Likewise.
20 * typeck.c (finish_class_member_access_expr,
21 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
22 build_x_conditional_expr, build_x_compound_expr): Likewise.
23 (build_static_cast, build_reinterpret_cast,
24 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
25 * typeck2.c (build_x_arrow): Use build_min_non_dep.
26 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
28 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
29 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
30 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
32 2003-09-04 Richard Henderson <rth@redhat.com>
34 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
35 change in cgraph_mark_needed_node arguments.
37 2003-09-02 Geoffrey Keating <geoffk@apple.com>
40 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
41 * tree.c (cp_cannot_inline_tree_fn): Likewise.
43 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
45 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
46 (expr_sizeof): Replace with ...
47 (cxx_sizeof_or_alignof_expr): ... here.
48 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
49 * parser.c (cp_parser_unary_expression): Commonize alignof and
51 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
53 * semantics.c (finish_sizeof, finish_alignof): Remove.
54 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
55 becomes bool. Set TREE_READONLY.
56 (expr_sizeof): Replace with ...
57 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
59 2003-09-04 Mark Mitchell <mark@codesourcery.com>
61 Remove cast-as-lvalue extension.
62 * call.c (build_conditional_expr): Correct formatting.
63 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
64 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
65 * cp-tree.h (non_cast_lvalue_p): Remove.
66 (real_non_cast_lvalue_p): Remove.
67 (non_cast_lvalue_or_else): Remove.
68 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
69 (real_lvalue_p): Adjust call to lvalue_p_1.
70 (non_cast_lvalue_p): Remove.
71 (non_cast_lvalue_or_else): Remove.
72 (lvalue_p): Adjust call to lvalue_p_1.
73 (lvalue_or_else): Simplify.
74 * typeck.c (build_unary_op): Use lvalue_or_else, not
75 non_cast_lvalue_or_else.
76 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
78 2003-09-03 DJ Delorie <dj@redhat.com>
80 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
82 2003-09-03 Mark Mitchell <mark@codesourcery.com>
85 * class.c (include_empty_classes): Correct logic for ABI version 1.
87 2003-09-03 Richard Henderson <rth@redhat.com>
89 * optimize.c (optimize_function): Push/pop ggc context around
90 the call to optimize_inline_calls.
92 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
95 * parser.c (cp_parser_decl_specifier_seq): Add check for a
96 duplicate friend decl-specifier.
98 2003-09-02 Mark Mitchell <mark@codesourcery.com>
101 * pt.c (convert_nontype_argument): Correct representation of
102 REFERENCE_TYPE expressions.
105 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
106 (finish_call_expr): Change prototype.
107 * parser.c (cp_parser_postfix_expression): Adjust call to
109 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
110 * semantics.c (finish_call_expr): Add koenig_p parameter.
112 2003-09-01 Mark Mitchell <mark@codesourcery.com>
115 * cp-tree.h (initialize_reference): Change prototype.
116 * call.c (initialize_reference): Add cleanup parameter.
117 * decl.c (grok_reference_init): Likewise.
118 (check_initializer): Likewise.
119 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
120 (duplicate_decls): When replacing an anticipated builtin, do not
122 * typeck.c (convert_for_initialization): Correct call to
123 initialize_reference.
126 * pt.c (dependent_type_p_r): Pass only the innermost template
127 arguments to any_dependent_template_arguments_p.
129 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
131 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
132 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
133 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
134 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
135 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
137 2003-08-29 Mark Mitchell <mark@codesourcery.com>
140 * pt.c (build_non_dependent_expr): Do not build a
141 NON_DEPENDENT_EXPR for a STRING_CST.
144 * search.c (add_conversions): Avoid adding two conversion
145 operators for the same type.
147 2003-08-29 Mark Mitchell <mark@codesourcery.com>
150 * pt.c (tsubst_copy_and_build): Correct handling of
151 address-of-label extension.
152 * semantics.c (finish_goto_stmt): The address of a label must go
153 through the lvalue-to-rvalue conversion.
155 2003-08-29 Richard Henderson <rth@redhat.com>
156 Jason Merrill <jason@redhat.com>
158 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
159 (LANG_HOOKS_RTL_EXPAND_STMT): New.
160 * cp-tree.h (cxx_expand_function_start): Declare.
161 * decl.c (start_function): Use allocate_struct_function.
162 Move stmts_are_full_exprs_p assertion from expand_body.
163 Do not free_after_parsing or free_after_compilation.
164 (cxx_push_function_context): Move code to set struct function
165 data from genrtl_start_function.
166 * optimize.c (optimize_function): Don't inc/dec function_depth.
167 * semantics.c (expand_body): Use tree_rest_of_compilation.
168 (cxx_expand_function_start): Rename from genrtl_start_function,
169 omit bits done by tree_rest_of_compilation.
170 (genrtl_finish_function): Remove.
171 (clear_decl_rtl): Move to ../tree-optimize.c.
173 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
176 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
178 * cxx-pretty-print.h: Declare.
179 * error.c (dump_template_parameter): Use it.
180 (dump_type): Likewise.
182 2003-08-28 Mark Mitchell <mark@codesourcery.com>
184 * init.c (decl_constant_value): Deal with COND_EXPR specially.
185 * call.c (build_conditional_expr): Revert previous patch.
188 * call.c (build_conditional_expr): Use decl_constant_value to
189 simplify the arguments.
191 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
193 * parser.c (struct cp_token): Use enum bitfields.
194 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
195 512B allocation unit.
196 (cp_parser_token_tree_map_node): Use enum bitfields.
198 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
201 * decl.c (push_class_level_binding): Correct old_decl value from
202 my 2003-07-29 reorganization.
204 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
205 (build_new_method_call): Add goto finish.
206 * semantics.c (simplify_aggr_init_exprs_r): Don't set
207 TREE_SIDE_EFFECTS on a call.
209 2003-08-25 Richard Henderson <rth@redhat.com>
211 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
213 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
215 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
216 (cxx_pretty_printer): Adjust base type.
217 (pp_cxx_function_specifier): Declare.
218 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
219 (pp_cxx_left_paren): Likewise.
220 (pp_cxx_right_paren): Likewise.
221 (pp_cxx_dot): Likewise.
222 (pp_cxx_arrow): Likewise.
223 (pp_cxx_semicolon): Likewise.
224 (pp_cxx_identifier): Likewise.
225 (pp_cxx_cv_qualifier_seq): Likewise.
226 (pp_cxx_storage_class_specifier): Likewise.
227 (pp_cxx_expression_list): Likewise.
228 (pp_cxx_space_for_pointer_operator): Likewise.
229 (pp_cxx_init_declarator): Likewise.
230 (pp_cxx_call_argument_list): Likewise.
231 (pp_cxx_nonconsecutive_character): Tidy.
232 (pp_cxx_conversion_function_id): New function.
233 (pp_cxx_template_id): Likewise.
234 (pp_cxx_template_keyword_if_needed): Likewise.
235 (pp_cxx_nested_name_specifier): Likewise.
236 (pp_cxx_unqualified_id): Tidy
237 (pp_cxx_qualified_id): Handle more nodes.
238 (pp_cxx_primary_expression): Tidy.
239 (pp_cxx_postfix_expression): Likewise.
240 (pp_cxx_new_expression): Tidy.
241 (pp_cxx_delete_expression): Likewise.
242 (pp_cxx_cast_expression): New function.
243 (pp_cxx_pm_expression): Tidy.
244 (pp_cxx_conditional_expression): Likewise.
245 (pp_cxx_assignment_operator): New function.
246 (pp_cxx_assignment_expression): Tidy.
247 (pp_cxx_expression): New function.
248 (pp_cxx_function_specifier): Likewise.
249 (pp_cxx_decl_specifier_seq): Likewise.
250 (pp_cxx_simple_type_specifier): Tidy.
251 (pp_cxx_type_specifier_seq): Likewise.
252 (pp_cxx_ptr_operator): New function.
253 (pp_cxx_implicit_parameter_type): Likewise.
254 (pp_cxx_parameter_declaration): Tidy.
255 (pp_cxx_parameter_declaration_clause): New function.
256 (pp_cxx_exception_specification): Likewise.
257 (pp_cxx_direct_declarator): Tidy.
258 (pp_cxx_declarator): Likewise.
259 (pp_cxx_ctor_initializer): New function.
260 (pp_cxx_function_definition): Likewise.
261 (pp_cxx_abstract_declarator): Tidy.
262 (pp_cxx_direct_abstract_declarator): Likewise.
263 (pp_cxx_type_id): Likewise.
264 (pp_cxx_exception_declaration): New function.
265 (pp_cxx_statement): Likewise.
266 (pp_cxx_simple_declaration): Likewise.
267 (pp_cxx_template_parameter_list): Likewise.
268 (pp_cxx_template_parameter): Likewise.
269 (pp_cxx_template_declaration): Likewise.
270 (pp_cxx_explicit_specialization): Likewise.
271 (pp_cxx_explicit_instantiation): Likewise.
272 (pp_cxx_declaration): Tidy.
273 (pp_cxx_pretty_printer_init): Initialize more fields.
275 2003-08-25 Mark Mitchell <mark@codesourcery.com>
278 * cp-tree.h (build_cplus_method_type): Remove.
279 * call.c (standard_conversion): Use build_method_type_directly
280 instead of build_cplus_method_type.
281 * class.c (build_clone): Likewise.
282 (adjust_clone_args): Likewise.
283 * decl.c (build_ptrmem_type): Likewise.
284 (grokdeclarator): Likewise.
285 (check_function_type): Likewise.
286 * decl2.c (grok_method_quals): Likewise.
287 (maybe_retrofit_in_chrg): Likewise.
288 * pt.c (copy_default_args_to_explicit_spec): Likewise.
289 (tsubst_function_type): Likewise.
291 * tree.c (build_cplus_method_type): Remove.
292 * typeck.c (merge_types): Use build_method_type_directly.
294 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
297 * search.c (dfs_access_in_type): Fix typo in comment.
298 (dfs_accessible_queue_p): Likewise.
299 (dfs_accessible_p): Only terminate when a friend is found.
300 (accessible_p): Return immediately if access_in_type allows
303 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
305 PR c++/641, c++/11876
306 * friend.c (add_friend): Add complain parameter.
307 (make_friend_class): Likewise.
308 (do_friend): Adjust add_friend call.
309 * decl.c (grokdeclarator): Adjust make_friend_class call.
310 * parser.c (cp_parser_member_declaration): Likewise.
311 (cp_parser_template_declaration_after_exp): Likewise.
312 * pt.c (instantiate_class_template): Adjust make_friend_class
314 * cp-tree.h (make_friend_class): Adjust declaration.
315 (add_friend): Likewise.
317 2003-08-21 Jason Merrill <jason@redhat.com>
320 * call.c (build_conditional_expr): Ignore cv-qual differences for
323 2003-08-21 Mark Mitchell <mark@codesourcery.com>
326 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
327 (cp_parser_primary_expression): Adjust call to
328 cp_parser_id_expression.
329 (cp_parser_unqualified_id): Complain about the use of
330 typedef-names in a destructor declarator.
331 (cp_parser_postfix_expression): Adjust call to
332 cp_parser_id_expression.
333 (cp_parser_type_parameter): Likewise.
334 (cp_parser_template_argument): Likewise.
335 (cp_parser_declarator_id): Likewise.
338 * call.c (standard_conversion): Use same_type_p, not pointer
339 equality, to compare types.
342 * parser.c (cp_parser_using_declaration): Check for invalid uses
343 of template-ids here...
344 * decl2.c (do_class_using_decl): ... rather than here.
346 2003-08-20 Mark Mitchell <mark@codesourcery.com>
349 * pt.c (more_specialized): Bump processing_template_decl.
351 2003-08-21 Jason Merrill <jason@redhat.com>
354 * decl.c (grokdeclarator): Recognize a flexible array based on the
355 type, not the form of the declarator.
357 2003-08-20 Jason Merrill <jason@redhat.com>
359 * semantics.c (simplify_aggr_init_expr): Split out from
360 simplify_aggr_init_exprs_r. Convert slot address to match
362 * cp-tree.h: Declare it.
363 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
364 DECL_NAME of a user variable.
366 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
369 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
371 * semantics.c (finish_expr_stmt): Always convert to void.
372 * typeck.c (build_x_compound_exp): Always convert to void.
374 2003-08-19 Mark Mitchell <mark@codesourcery.com>
377 * cp-tree.h (grok_op_properties): Change prototype.
378 * decl.c (grok_op_properties): Add complain parameter.
379 (grokfndecl): Pass it.
380 * pt.c (tsubst_decl): Adjust accordingly.
383 * decl.c (start_method): Return immediately if push_template_decl
384 does not like the declaration.
385 * pt.c (push_template_decl_real): Disallow member template
389 * cp-tree.h (add_binding): Add prototype.
390 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
391 (maybe_warn_about_overly_private_class): Use
392 CLASSTYPE_DESTRUCTORS.
393 (pushclass): Adjust call to set_identifier_type_value.
394 * decl.c (add_binding): Give it external linkage.
395 (push_local_binding): Adjust call to add_binding.
396 (push_class_binding): Likewise.
397 (set_identifier_type_value_with_scope): Change prototype. Use
398 add_binding for global bindings.
399 (set_identifier_type_value): Adjust accordingly.
401 (pushdecl): Use set_identifier_type_value, not
402 set_identifier_type_value_with_scope.
403 (pushdecl_namespace_level): Adjust calls to
404 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
405 (pushdecl_class_level): Likewise.
406 (lookup_tag): Use select_decl.
407 (select_decl): Improve comment.
408 (record_builtin_type): Do not call pushdecl.
409 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
410 (cp_finish_decl): Adjust call to set_identifier_type_value.
411 (check_elaborated_type_specifier): Improve checks for invalid uses
413 (xref_tag): Adjust call to check_elaborated_type_specifier.
414 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
415 * name-lookup.c (set_namespace_binding): Use add_binding.
416 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
417 rather than an IDENTIFIER_NODE, to represent built-in types, if
418 requested by the caller.
419 (cp_parser_postfix_expression): Adjust call.
420 (cp_parser_type_specifier): Likewise.
421 (cp_parser_elaborated_type_specifier): Adjust call to
422 check_elaborated_type_specifier.
423 * typeck2.c (build_functional_cast): Do not perform name lookups.
426 * decl.c (expand_static_init): Remove unncessary code.
428 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
430 PR c++/10538, PR c/5582
431 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
433 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
436 * init.c (build_offset_ref): Perform access checking for
437 pointer to member correctly.
439 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
441 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
443 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
446 * cp-tree.h (finish_stmt_expr): Add bool parameter.
447 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
448 adjust the stmt_expr here.
449 (build_vec_init): Use finish_stmt_expr_expr, convert result to
451 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
453 * pt.c (tsubst_copy): Likewise.
454 * semantics.c (finish_stmt_expr): Add parameter.
456 * pt.c (instantiate_class_template): Push to class's scope before
459 Sun Aug 17 10:05:38 CEST 2003 Jan Hubicka <jh@suse.cz>
462 * semantics.c (finish_id_expression): Mark all functions as used.
464 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
467 * cvt.c (convert_to_void): Indicate which side of conditional has
468 no effects, and rhs of comma operator. Test for no sideeffect
469 expressions here and always build a convert expr.
470 * init.c (expand_default_init): Convert the init to void.
471 * typeck.c (build_x_compound_expr): Do not check for side effects
473 (build_compound_expr): Do not convert lhs when building a
476 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
478 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
479 * decl2.c (build_offset_ref_call_from_tree): Use
480 build_non_dependent_expr.
481 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
482 * pt.c (build_non_dependent_expr): Set operand.
484 2003-08-14 Jan Hubicka <jh@suse.cz>
486 * decl2.c (mark_member_pointers): Rename to...
487 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
488 (lower_function): Update call.
489 * except.c (eh_type_info): Break out from ...
490 (build_eh_type): ... here; tinfo is already used.
491 (finish_eh_spec_block): Mark tinfos as used.
492 * semantics.c (finish_handler_params): Mark tinfo as used.
493 * cp-tree.h (eh_type_info): Declare.
495 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
497 * pt.c (instantiate_class_template): Set location before
500 * decl.c (make_typename_type): Use my_friendly_assert.
501 * pt.c (tsubst_aggr_type): Rearrange context substitution.
503 Thu Aug 14 12:19:25 CEST 2003 Jan Hubicka <jh@suse.cz>
505 * method.c (use_thunk): Expand body directly.
507 2003-08-12 Mark Mitchell <mark@codesourcery.com>
510 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
511 determine whether or not to promote types.
512 (convert_for_arg_passing): Likewise.
513 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
515 * pt.c (tsubst_decl): Do not expect it to be set.
519 * cp-tree.h (check_elaborated_type_specifier): Declare.
520 (handle_class_head): Remove.
521 (note_got_semicolon): Likewise.
522 (note_list_got_semicolon): Likewise.
523 (finish_class_definition): Likewise.
524 * decl.c (check_elaborated_type_specifier): Make it public.
526 (handle_class_head): Remove.
527 * parser.c (cp_parser_elaborated_type_specifier): Use
528 check_elaborated_type_specifier.
529 (cp_parser_class_specifier): Do not call finish_class_definition.
530 (cp_parser_class_head): Or handle_class_head. Check for
531 over-qualified names.
532 * semantics.c (finish_class_definition): Remove.
534 * parser.c (cp_parser_check_for_definition_in_return_type): New
536 (cp_parser_simple_declaration): Adjust call to
537 cp_parser_init_declarator.
538 (cp_parser_decl_specifier_seq): Change type of
539 declares_class_or_enum parameter.
540 (cp_parser_explicit_instantiation): Adjust accordingly.
541 (cp_parser_type_specifier): Change type of
542 declares_class_or_enum parameter.
543 (cp_parser_init_declarator): Add declares_class_or_enum
545 (cp_parser_parameter_declaration): Adjust call to
546 cp_parser_decl_specifier_seq.
547 (cp_parser_function_definition): Likewise.
548 (cp_parser_member_declaration): Likewise.
549 (cp_parser_single_declaration): Likewise.
551 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
552 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
553 (TYPE_OVERLOADS_CALL_EXPR): Remove.
554 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
555 (TYPE_OVERLOADS_ARROW): Likewise.
556 (CLASSTYPE_GOT_SEMICOLON): Likewise.
557 * class.c (check_bases): Do not set them.
558 (finish_struct_1): Likewise.
559 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
560 (build_ptrmemfunc_type): Likewise.
561 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
562 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
563 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
564 * lex.c (note_got_semicolon): Remove.
565 (note_list_got_semicolon): Likewise.
566 * parser.c (cp_parser_simple_declaration): Do not call
567 note_list_got_semicolon.
568 * pt.c (list_eq): Remove.
569 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
570 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
571 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
572 * ptree.c (cxx_print_type): Do not print them.
573 * semantics.c (finish_member_class_template): Do not call
574 note_list_got_semicolon.
576 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
578 * call.c (standard_conversion): Opaque pointers interconvert.
580 * testsuite/g++.dg/other/opaque-3.C: New.
582 2003-08-11 Mark Mitchell <mark@codesourcery.com>
584 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
587 2003-08-10 Mark Mitchell <mark@codesourcery.com>
590 * cp-tree.h (get_vbase): Remove.
591 (get_vbase_types): Remove.
592 * init.c (expand_member_init): Correct logic for looking up base
595 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
597 * error.c (dump_expr): Tidy.
598 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
599 (pp_cxx_begin_template_argument_list): Likewise.
600 (pp_cxx_end_template_argument_list): Likewise.
601 (is_destructor_name): Likewise.
602 (pp_cxx_unqualified_id): Likewise.
603 (pp_cxx_qualified_id): Likewise.
604 (pp_cxx_id_expression): Likewise.
605 (pp_cxx_new_expression): Likewise.
606 (pp_cxx_delete_expression): Likewise.
607 (pp_cxx_pm_expression): Likewise.
608 (pp_cxx_type_specifier): Rework.
609 (pp_cxx_type_id): Likewise.
610 (pp_cxx_primary_expression): Likewise.
611 (pp_cxx_postfix_expression): Likewise.
612 (pp_cxx_unary_expression): Likewise.
613 (pp_cxx_multiplicative_expression): Likewise.
614 (pp_cxx_conditional_expression): Likewise.
615 (pp_cxx_assignment_expression): Likewise.
616 (pp_cxx_pretty_printer_init): Tidy.
618 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
620 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
621 NODE is always a TREE_VEC of non-zero size.
622 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
623 * decl2.c (arg_assoc): Template args will be a vec.
624 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
625 dump_template_argument_list.
626 (dump_template_parms): Args will be a vec.
627 * parser.c (cp_parser_template_argument_list): Produce a
629 * pt.c (coerce_template_parms): Args are always vectors.
630 (mangle_class_name_for_template): Likewise.
631 (lookup_template_function): Likewise.
632 (lookup_template_class): Likewise.
633 (tsubst_template_args): Likewise.
634 (tsubst_baselink): Use tsubst_template_args.
635 (tsubst_qualified_id): Likewise.
636 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
637 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
638 (any_dependent_template_args_p): Args are always vectors.
639 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
642 * call.c (convert_like_real): Add rvalue binding error message.
643 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
647 * pt.c (dependent_type_p_r): A dependent template-id is a class
648 type with dependent template arguments, or a bound template
650 (type_dependent_expression_p): A template function decl cannot
651 have a dependent context.
653 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
656 * parser.c (cp_parser_class_name): Return immediately when scope
659 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
661 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
663 * cp/call.c (standard_conversion): Support opaque types.
665 (strip_top_quals): Use cp_build_qualified_type instead of
668 * cp/typeck.c (convert_for_assignment): Support opaque types.
670 * testsuite/g++.dg/other/opaque-1.C: New.
672 * testsuite/g++.dg/other/opaque-2.C: New.
674 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
676 * decl.c (grokparms): Use cp_build_qualified_type instead
679 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
681 * cxx-pretty-print.h: New file.
682 * cxx-pretty-print.c: Likewise.
683 * error.c (scratch_pretty_printer): Change type.
685 (dump_aggr_type): Likewise.
686 (dump_global_iord): Likewise.
687 (dump_expr): Likewise.
689 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
690 (cxx_initialize_diagnostics): New function.
691 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
692 (CXX_PRETTY_PRINT_H): New variable.
693 (cp/cxx-pretty-print.o): New rule.
694 (cp/cp-lang.o): Update dependence.
695 (cp/error.o): Likewise.
697 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
699 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
700 (DECL_DECLARED_INLINE_P): Remove.
701 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
702 if decl is a FUNCTION_DECL. This never made sense, but now it is
703 required to avoid a tree check failure.
704 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
705 * optimize.c (maybe_clone_body): Likewise.
707 2003-08-04 Roger Sayle <roger@eyesopen.com>
709 * decl.c (cxx_insert_default_attributes): Delete.
710 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
711 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
713 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
716 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
720 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
723 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
726 * cp-tree.def (USING_DECL): Document its type.
727 * class.c (pushclass): If we're entering a template, push any
728 dependent using decls it has.
729 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
731 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
732 (tsubst): Remove USING_DECL checks.
733 (type_dependent_expression_p): Remove USING_DECL case.
734 * semantics.c (finish_member_declaration): A USING_DECL's type
735 indicates whether it is dependent.
737 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
739 * cp-tree.h (pushclass): Remove unneeded parameter.
740 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
741 (push_nested_class): Adjust pushclass call.
742 * pt.c (instantiate_class_template): Likewise.
743 * semantics.c (begin_class_definition): Likewise.
745 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
747 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
749 2003-08-01 Mark Mitchell <mark@codesourcery.com>
752 * decl.c (decls_match): Don't ignore the types of template
756 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
758 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
760 PR c++/8442, c++/8806
761 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
763 (check_elaborated_type_specifier): Add allow_template_p
764 parameter. Check tag mismatch and class template.
765 (xref_tag): Add template_header_p parameter. Add assertion
766 that name is an IDENTIFIER_NODE. Remove implicit typename
767 warning. Simplify lookup process if globalize is true.
768 (cxx_init_decl_processing): Adjust call to xref_tag.
769 (xref_tag_from_type): Likewise.
770 * decl2.c (handle_class_head): Likewise.
771 * parser.c (cp_parser_elaborated_type_specifier,
772 cp_parser_class_head): Likewise.
773 * rtti.c (init_rtti_processing, build_dynamic_cast1,
774 tinfo_base_init, emit_support_tinfos): Likewise.
775 * class.c (is_base_of_enclosing_class): Remove.
776 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
777 template template argument.
778 * cp-tree.h (xref_tag): Adjust declaration.
779 (is_base_of_enclosing_class): Remove.
780 * NEWS: Document template template argument change.
782 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
784 * parser.c (cp_parser_init_declarator,
785 cp_paser_member_declaration): Reformat.
786 * pt.c (lookup_template_class, type_unification_real, unify,
787 type_dependent_expression_p): Reformat.
790 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
792 (finish_stmt_expr_expr): Declare.
793 * parser.c (cp_parser_primary_expression): Tell
794 cp_parser_compount_statement that it is a statement expression.
795 (cp_parser_statement, cp_parser_labeled_statement,
796 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
797 in_statement_expr_p parameter.
798 (cp_parser_expression_statement): Likewise. Call
799 finish_stmt_expr_expr for final expression of a statement
801 (cp_parser_for_init_statement,
802 cp_parser_implicitly_scoped_statement,
803 cp_parser_already_scoped_statement, cp_parser_function_definition,
804 cp_parser_try_block, cp_parser_handled): Adjust.
805 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
806 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
807 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
808 * semantics.c (finish_expr_stmt): Do not deal with statement
810 (begin_stmt_expr): Clear last_expr_type.
811 (finish_stmt_expr_expr): New.
812 (finish_stmt_expr): Process the value expression.
814 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
815 compound expr inside the target's initializer.
818 * parser.c (cp_parser_primary_expression): Do not set
819 non-constant-p merely because it is a dependent scope.
822 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
823 * semantics.c (finish_expr_stmt): Do not convert to void in a
826 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
828 * pt.c (coerce_template_parms): Refactor.
829 (fn_type_unification): Increment processing_template_decl when
830 tsubsting an incomplete set of explicit args.
833 * pt.c (instantiate_class_template): Increment
834 processing_template_decl around the tsubst of a template member
836 (tsubst_qualified_id): Assert we do not have a dependent scope.
838 * pt.c (coerce_template_template_parms, lookup_template_class,
839 can_complete_type_without_circularity, instantiate_class_template,
840 tsubst_decl, unify): Reformat.
842 Thu Jul 31 01:07:41 CEST 2003 Jan Hubicka <jh@suse.cz>
844 * decl2.c (maybe_make_one_only): Use mark_referenced.
845 * method.c (use_thunk): Likewsie.
847 Wed Jul 30 19:12:48 CEST 2003 Jan Hubicka <jh@suse.cz>
849 * class.c (build_vtable_entry_ref): Kill.
850 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
851 (build_vfn_ref): Do not call build_vtable_entry_ref.
852 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
853 * cp-tree.h (prepare_assemble_variable): Kill.
854 * cp-decl.c (prepare_assemble_variable): Kill.
856 2003-07-29 Geoffrey Keating <geoffk@apple.com>
858 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
859 of setting valid_pch by hand.
861 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
863 * decl.c (finish_enum): Initialize underlying_type.
865 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
868 * decl.c (add_binding): Add bval local variable.
869 (push_class_level_binding): Likewise. Allow a USING_DECL to be
871 * decl2.c (do_class_using_decl): The type of a using decl is
873 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
874 function call lookup code.
875 * pt.c (tsubst): A USING_DECL will have unknown type.
876 (tsubst_copy_and_build): Allow a using decl.
877 (type_dependent_expression_p): A USING_DECL will make it
879 * semantics.c (finish_member_declaration): Push a dependent using
882 2003-07-28 Mark Mitchell <mark@codesourcery.com>
885 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
886 * semantics.c (finish_id_expression): Call mark_used for all
889 2003-07-28 Mark Mitchell <mark@codesourcery.com>
892 * call.c (standard_conversion): Allow all integral->enumeral
893 conversions, after marking them as bad.
894 * decl.c (finish_enum): Make sure that all enumerators are
895 properly converted to the underlying type.
896 (build_enumerator): Set DECL_CONTEXT for namespace-scope
898 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
901 * Make-lang.in (typeck.o): Depend on convert.h.
904 * call.c: Include convert.h.
905 (convert_arg_to_ellipsis): Use convert_to_real.
906 * class.c: Include convert.h.
907 (build_base_path): Use convert_to_integer.
908 * rtti.c: Include convert.h.
909 (build_headof): Use convert_to_integer.
910 * typeck.c: Include convert.h.
911 (decay_conversion): Use convert_to_integer.
912 (build_unary_op): Use build_nop.
913 (get_delta_difference): Use convert_to_integer.
914 (build_ptrmemfunc): Avoid unncessary conversions.
916 Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz>
918 * decl2.c (mark_member_pointers): Verify that member pointer points to
921 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
923 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
924 (finish_compound_stmt): Remove no scope arg.
925 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
926 end_compound_stmt calls.
927 (expand_static_init, begin_destructor_body, begin_function_body,
928 finish_function_body): Likewise.
929 * decl2.c (start_objects, finish_objects,
930 start_static_storage_duration_function,
931 finish_static_storage_duration_function): Likewise.
932 * init.c (begin_init_stmts, finish_init_stmts,
933 construct_virtual_base, build_vec_init): Likewise.
934 * method.c (do_build_assign_ref, synthesize_method): Likewise.
935 * parser.c (cp_parser_compound_statement,
936 cp_parser_implicitly_scoped_statement,
937 cp_parser_already_scoped_statement): Likewise.
938 * pt.c (tsubst_expr): Likewise.
939 * semantics.c (begin_compound_stmt): No scope arg is a bool.
940 (finish_compound_stmt): Remove no scope arg.
942 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
945 2003-07-27 Mark Mitchell <mark@codesourcery.com>
947 * call.c (standard_conversion): Tweak handling of
948 pointer-to-member types.
949 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
950 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
951 pointer-to-data member types.
953 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
955 * parser.c (cp_parser_type_parameter): Reformat.
956 (cp_parser_parameter_declaration): Deprecate default args where
959 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
963 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
964 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
965 * init.c (begin_init_stmts): Make static. Return is_global
966 value. Always call begin_stmt_expr.
967 (finish_init_stmts): Make static. Add is_global parm. Always
968 building a stmt tree.
969 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
970 (build_vec_init): Likewise. Always building a stmt tree.
971 (expand_default_init): Always building a stmt tree.
972 (get_temp_regvar): Likewise.
973 * semantics.c (begin_global_stmt_expr,
974 finish_global_stmt_expr): Remove.
976 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
978 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
979 (build_x_compound_expr_from_list): Declare.
980 * typeck.c (build_x_compound_expr_from_list): New.
981 (build_x_compound_expr): Adjust.
982 (build_compound_expr): Remove unreachable code. Take two
984 * decl.c (grok_reference_init): Use
985 build_x_compound_expr_from_list.
986 (expand_static_init): Adjust build_compound_expr call.
987 (cxx_maybe_build_cleanup): Likewise.
988 * init.c (perform_member_init): Use
989 build_x_compound_expr_from_list.
990 (build_new_1): Likewise.
991 (build_vec_delete): Adjust build_compound_expr calls.
992 (build_vbase_delete): Likewise.
993 * typeck2.c (store_init_value): Use
994 build_x_compound_expr_from_list.
995 (build_functional_cast): Likewise.
997 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
999 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1000 * decl.c (make_typename_type): Pass it.
1001 * pt.c (lookup_template_class): Use it.
1002 (resolve_typename_type): Pass it.
1003 * semantics.c (finish_template_type): Pass it.
1005 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1008 * cp-tree.h (qualified_name_lookup_error): Declare.
1009 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1011 (tsubst_expr) <DECL_STMT case>: Likewise.
1012 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1013 * semantics.c (qualified_name_lookup_error): New, broken out of ...
1014 (finish_id_expression): ... here. Use it.
1016 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
1018 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1020 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1023 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1024 (tsubst_template_arg): New.
1025 (tsubst_template_arg_vector): Rename to ...
1026 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1027 tsubst_template_arg.
1028 (coerce_template_parms): Use tsubst_template_arg for default
1030 (tsubst_template_parms): Likewise.
1031 (tsubst_aggr_type): Adjust.
1032 (tsubst_decl): Likewise.
1033 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1034 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1036 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1038 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1039 * error.c: Use the new pretty-printer framework.
1041 2003-07-24 Per Bothner <pbothner@apple.com>
1043 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1044 which causes errors messages to incorrectly mention included files.
1046 2003-07-24 Mark Mitchell <mark@codesourcery.com>
1048 * cp-tree.h (convert_to_base_statically): Declare.
1049 * call.c (build_special_member_call): Convert INSTANCE to the base
1051 * class.c (convert_to_base_statically): New method.
1052 * init.c (construct_virtual_base): Use it.
1053 * method.c (do_build_assign_ref): Fix typo in comment.
1055 2003-07-24 Jason Merrill <jason@redhat.com>
1057 * decl.c: Just set truthvalue_* to boolean_*.
1059 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
1061 * decl.c (reshape_init): Remove unreachable code.
1063 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1066 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1068 2003-07-23 Mark Mitchell <mark@codesourcery.com>
1071 * cp-tree.h (accessible_base_p): Declare.
1072 * call.c (build_over_call): Use it.
1073 * search.c (accessible_base_p): New function, split out from ...
1074 (lookup_base): ... here.
1077 * call.c (build_conditional_expr): Use perform_implicit_conversion
1078 and error_operand_p. Robustify.
1079 * typeck.c (build_unary_op): Use perform_implicit_conversion.
1081 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
1084 * parser.c (cp_parser_nested_name_specifier): Reset scope on
1086 (cp_parser_elaborated_type_specifier): Likewise.
1088 2003-07-22 Mark Mitchell <mark@codesourcery.com>
1090 Eliminate use of POINTER_TYPE for pointers-to-members.
1091 * call.c (standard_conversion): Rework pointer-to-member handling.
1093 (add_builtin_candidate): Likewise.
1094 (resolve_scoped_fn_name): Remove.
1095 (build_conditional_expr): Rework pointer-to-member handling.
1096 (compare_ics): Likewise.
1097 * class.c (check_field_decls): Use TYPE_PTR_P.
1098 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1100 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1101 (TYPE_PTRMEM_P): Add comment.
1102 (TYPE_PTR_P): Simplify.
1103 (TYPE_PTROB_P): Correct definition.
1104 (TYPE_PTR_TO_MEMBER_P): New macro.
1105 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1106 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1107 (resolved_scoped_fn_name): Remove declaration.
1108 (build_offset_ref): Change prototype.
1109 (resolve_offset_ref): Remove.
1110 (comp_target_types): Remove.
1111 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1113 (convert_to_reference): Use can_convert.
1114 (ocp_convert): Improve error handling. Rework pointer-to-member
1116 (perform_qualification_conversions): Rework pointer-to-member
1118 * decl.c (build_ptrmem_type): Handle functions too.
1119 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1120 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1121 (grokparms): Remove OFFSET_TYPE error message.
1122 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1123 * error.c (dump_type_prefix): Likewise.
1124 * expr.c (cplus_expand_constant): Use build_nop.
1125 * init.c (build_offset_ref): Add address_p parameter. Fold in
1126 necessary bits from resolve_offset_ref.
1127 (resolve_offset_ref): Remove.
1128 * parser.c (cp_parser_postfix_expression): Remove special case
1129 code for OFFSET_TYPE.
1130 * pt.c (convert_nontype_argument): Rework pointer-to-member
1132 (convert_template_argument): Likewise.
1134 (invalid_nontype_parm_type_p): Likewise.
1135 (dependent_type_p_r): Likewise.
1136 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1137 (target_incomplete_p_): Rework pointer-to-member
1139 (get_pseudo_ti_init): Likewise.
1140 (get_pseudo_ti_desc): Likewise.
1141 * semantics.c (finish_qualified_id_expr): Adjust call to
1142 build_offset_ref. Remove use of resolve_offset_ref.
1143 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1144 * typeck.c (target_type): Use TYPE_PTRMEM_P.
1145 (type_unknown_p): Remove obsolete code about the time before
1146 non-dependent expressions were handled correctly.
1147 (qualify_type_recursive): Remove.
1148 (composite_pointer_type_r): New function.
1149 (composite_pointer_type): Use it.
1150 (merge_types): Remove dead comments.
1151 (comp_cv_target_types): Remove.
1152 (comp_target_types): Likewise.
1153 (comp_target_parms): Likewise.
1154 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1155 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1156 (build_binary_op): Do not use of comp_target_types.
1157 (pointer_diff): Remove OFFSET_TYPE case.
1158 (build_unary_op): Adjust pointer-to-member handling.
1159 (unary_complex_lvalue): Likewise.
1160 (check_for_casting_away_constness): Add description parameter.
1161 (build_static_cast): Pass it.
1162 (build_reinterpret_cast): Use check_for_casting_away_constness.
1163 (build_const_cast): Adjust pointer-to-member handling.
1164 (build_c_cast): Likewise.
1165 (convert_for_assignment): Remove OFFSET_TYPE error message.
1166 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1167 (comp_ptr_ttypes_reinterpret): Remove.
1168 (casts_away_constness_r): Adjust pointer-to-member handling.
1169 (casts_away_constness): Liekwise.
1170 (strip_all_pointer_quals): Remove.
1171 * typeck2.c (digest_init): Adjust pointer-to-member handling.
1172 (build_m_component_ref): Likewise.
1174 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
1176 * lex.c (unqualified_fn_lookup_error): Mention that the error
1177 message needs to be kept in synch with the manual.
1179 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1182 * decl.c (grokdeclarator): An array member is only a flexible
1183 array member if the field itself is the array.
1185 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1188 * decl.c (xref_basetypes): Handle error_mark_node.
1190 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1192 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1193 * tree.c (lvalue_p_1): Set it.
1194 * class.c (check_field): Don't allow non-packed non-POD fields to
1196 * call.c (reference_binding): Need a temporary for all bitfield
1198 (convert_like_real): Check it is ok to make a temporary here.
1200 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
1202 * cp-tree.h (hack_identifier): Remove.
1203 * method.c (hack_identifier): Remove.
1204 * semantics.c (finish_id_expression): Expand hack_identifier
1207 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1209 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1210 semantics.c typeck.c: Remove unnecessary casts.
1212 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1214 * cp-tree.h (hack_identifier): Remove.
1215 * method.c (hack_identifier): Remove.
1216 * semantics.c (finish_id_expression): Expand hack_identifier
1219 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1221 * cp-tree.h (finish_non_static_data_member): Add object param.
1222 * method.c (hack_identifier): Adjust.
1223 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1224 again for a FIELD_DECL.
1225 * semantics.c (finish_non_static_data_member): Add object
1226 parameter. Always save the DECL in the COMPONENT_REF.
1227 * call.c (resolve_scoped_fn_name): Adjust.
1229 2003-07-17 Zack Weinberg <zack@codesourcery.com>
1231 * pt.c (get_bindings): Make definition consistent with
1232 forward declaration.
1234 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1237 * friend.c (add_friend): Check access for member functions
1240 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1243 * typeck.c (build_class_member_access_expr): Improve diagnostic.
1245 2003-07-16 Mark Mitchell <mark@codesourcery.com>
1248 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1250 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1251 * decl.c (duplicate_decls): Merge
1252 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1253 * parser.c (cp_parser_postfix_expression): Adjust call to
1254 cp_parser_initializer_list and
1255 cp_parser_parenthesized_expression_list.
1256 (cp_parser_parenthesized_expression_list): Add non_constant_p.
1257 (cp_parser_new_placement): Adjust call to
1258 cp_parser_parenthesized_expression_list.
1259 (cp_parser_direct_new_declarator): Likewise.
1260 (cp_parser_conditional_expression): Remove.
1261 (cp_parser_constant_expression): Parse an assignment-expression,
1262 not a conditional-expression.
1263 (cp_parser_simple_declaration): Resolve expression/declaration
1264 ambiguity more quickly.
1265 (cp_parser_mem_initializer): Adjust call to
1266 cp_parser_parenthesized_expression_list.
1267 (cp_parser_init_declarator): Keep track of whether or not the
1268 initializer is a constant-expression.
1269 (cp_parser_initializer): Add non_constant_p parameter.
1270 (cp_parser_initializer_clause): Likewise.
1271 (cp_parser_initializer_list): Likewise.
1272 (cp_parser_attribute_list): Adjust call to
1273 cp_parser_parenthesized_expression_list.
1274 (cp_parser_functional_cast): Likewise.
1275 * pt.c (tsubst_decl): Copy
1276 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1277 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1278 * semantics.c (finish_id_expression): Use
1279 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1281 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
1283 * lang-options.h: Remove.
1285 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
1288 * class.c (field_decl_cmp): Remove.
1289 (resort_field_decl_cmp): Remove.
1290 (resort_sorted_fields): Remove.
1291 (add_fields_to_vec): Rename to ...
1292 (add_fields_to_record_type): this.
1293 (finish_struct_1): Change to be using
1294 sorted_fields_type's fields.
1295 * cp-tree.h (lang_decl): In lang_decl_u3
1296 change sorted_fields to be a pointer to
1298 (resort_sorted_fields): Remove prototype.
1299 * search.c (lookup_field_1): Change to be using
1300 sorted_fields_type's fields.
1302 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1305 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1306 is a member of other class.
1307 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1308 is a specialization of function template.
1310 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1313 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1316 2003-07-15 Mark Mitchell <mark@codesourcery.com>
1318 * cp-tree.def (LOOKUP_EXPR): Remove.
1319 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1320 (LOOKUP_EXPR_GLOBAL): Remove.
1321 (get_bindings): Remove.
1322 (is_aggr_type_2): Remove.
1323 * call.c (resolved_scoped_fn_name): Remove support for
1325 * decl.c (grokfndecl): Likewise.
1326 (grokdeclarator): Likewise.
1327 * error.c (dump_decl): Likewise.
1328 (dump_expr): Likewise.
1329 * friend.c (do_friend): Likewise.
1330 * init.c (build_offset_ref): Likewise.
1331 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
1333 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1334 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1336 * pt.c (get_bindings): Give it internal linkage.
1337 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1338 (lookup_template_function): Likewise.
1339 (for_each_tempalte_parm_r): Likewise.
1340 (tsubst_decl): Likewise.
1341 (tsubst_qualified_id): Handle template template parameters.
1342 (tsubst_copy): Remove support for LOOKUP_EXPR.
1343 (tsubst_copy_and_build): Likewise.
1344 (most_general_template): Likewise.
1345 (value_dependent_expression_p): Likewise.
1346 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1348 * semantics.c (perform_koenig_lookup): Do not create
1350 (finish_fname): Likewise.
1351 (finish_id_expression): Likewise.
1352 * tree.c (is_aggr_type_2): Remove.
1354 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1357 * typeck.c (check_return_expr): Fix thinko in diagnostic.
1359 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1362 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1365 2003-07-14 Mark Mitchell <mark@codesourcery.com>
1368 * pt.c (dependent_scope_ref_p): New function.
1369 (value_dependent_expression_p): Use it.
1370 (type_dependent_expression_p): Likewise.
1372 * pt.c (tsubst_friend_function): Use reregister_specialization.
1375 * cp-tree.h (lookup_qualified_name): Adjust prototype.
1376 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
1377 call to is_aggr_type.
1378 * parser.c (cp_parser_lookup_name): Adjust call to
1379 lookup_qualified_name.
1380 * pt.c (tsubst_qualified_id): Likewise.
1381 (tsubst_copy_and_build): Likewise.
1382 * semantics.c (finish_qualified_id_expr): Deal with erroneous
1385 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1388 * call.c (op_error): Properly format REALPART_EXPR and
1390 * error.c (dump_expr): Likewise.
1392 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1394 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1396 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1399 * call.c (initialize_reference): Improve diagnostic.
1401 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1404 * pt.c (more_specialized_class): Add full_args parameter.
1405 (most_specialized_class): Adjust calls to more_specialized_class.
1406 * cp-tree.h (more_specialized_class): Adjust declaration.
1408 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
1410 * lex.c (enum tree_node_kind): Delete.
1412 2003-07-13 Mark Mitchell <mark@codesourcery.com>
1415 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1416 (SET_DECL_SELF_REFERENCE_P): Likewise.
1417 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1418 * pt.c (tsubst_decl): Copy it.
1419 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1421 * pt.c (reregister_specialization): Fix thinko in previous change.
1423 * cp-tree.h (cp_id_kind): New type.
1424 (unqualified_name_lookup_error): Change prototype.
1425 (unqualified_fn_lookup_error): New function.
1426 (do_identifier): Remove.
1427 (do_scoped_id): Likewise.
1428 (tsubst_copy_and_build): Change prototype.
1429 (reregister_specialization): New function.
1430 (perform_koenig_lookup): Likewise.
1431 (finish_id_expression): Likewise.
1432 * call.c (build_method_call): Adjust call to
1433 unqualified_name_lookup_error.
1434 * decl.c (duplicate_decls): Use reregister_specialization.
1435 * lex.c (is_global): Remove.
1436 (unqualified_name_lookup_error): Return a value.
1437 (do_identifier): Remove.
1438 (do_scoped_id): Likewise.
1439 (identifier_typedecl_value): Remove.
1440 (unqualified_fn_lookup_error): New function.
1441 * parser.c (cp_parser_id_kind): Remove.
1442 (cp_parser_non_constant_id_expression): Remove.
1443 (cp_parser_primary_expression): Use finish_id_expression.
1444 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1446 (cp_parser_postfix_expression): Use perform_koenig_lookup.
1447 (cp_parser_template_argument): Use cp_id_kind.
1448 (cp_parser_fold_non_dependent_expr): Adjust call to
1449 tsubst_copy_and_build.
1450 * pt.c (unregister_specialization): Rename to ...
1451 (reregister_specialization): This.
1452 (tsubst_friend_function): Use it.
1453 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1454 (tsubst_qualified_id): Likewise.
1455 (tsubst_expr): Likewise.
1456 (tsubst_copy_and_build): Add function_p parameter. Use
1457 finish_id_expression. Introduce RECUR macro.
1458 (tsubst_non_call_postfix_expression): New function.
1459 (regenerate_decl_from_template): Use reregister_specialization.
1460 * semantics.c (perform_koenig_lookup): New function.
1461 (finish_id_expression): Likewise.
1463 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1465 * pt.c (push_access_scope_real): Remove.
1466 (push_access_scope): Move code from push_access_scope_real.
1467 (pop_access_scope): Don't check for TEMPLATE_DECL.
1468 (instantiate_template): Defer access checking during template
1470 (regenerate_decl_from_template): Tidy.
1472 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
1475 * operators.def: Add definitions for __imag__, __real__.
1477 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
1480 * parser.c (cp_parser_expression_list): Rename to ...
1481 (cp_parser_parenthesized_expression_list): ... here. Add attribute
1482 parameter, parse the surounding parentheses.
1483 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1484 parameters. Return int.
1485 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1486 (cp_parser_postfix_expression): Adjust function call parsing.
1487 (cp_parser_new_placement): Adjust.
1488 (cp_parser_new_initializer): Likewise.
1489 (cp_parser_cast_expression): Likewise.
1490 (cp_parser_selection_statement): Likewise.
1491 (cp_parser_mem_initializer): Likewise.
1492 (cp_parser_asm_definition): Likewise.
1493 (cp_parser_init_declarator): Likewise.
1494 (cp_parser_declarator): Make
1495 cdtor_or_conv_p an int ptr.
1496 (cp_parser_direct_declarator): Likewise. Check for a parameter
1497 list on cdtors & conv functions.
1498 (cp_parser_initializer): Adjust.
1499 (cp_parser_member_declaration): Adjust.
1500 (cp_parser_attribute_list): Move code into
1501 cp_parser_parens_expression_list.
1502 (cp_parser_functional_cast): Adjust.
1503 * pt.c (type_dependent_expression_p): Erroneous expressions are
1506 2003-07-11 Geoffrey Keating <geoffk@apple.com>
1508 * decl.c (cp_finish_decl): Handle 'used' attribute.
1510 * cp-lang.c (c_reset_state): New dummy routine.
1511 * cp-tree.h (finish_file): Move prototype to c-common.h.
1512 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1514 2003-07-11 Mark Mitchell <mark@codesourcery.com>
1517 * pt.c (tsubst_qualified_id): Implement suggested resolution for
1519 (type_dependent_expression_p): Likewise.
1521 2003-07-10 Mark Mitchell <mark@codesourcery.com>
1523 * typeck.c (build_binary_op): Do not warn about signed
1524 vs. unsigned comparisons in the bodies of templates.
1527 * parser.c (cp_parser_postfix_expression): Check dependency of
1530 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1533 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1537 * error.c (decl_to_string): Do not print default argument
1540 * cp-tree.h (break_out_calls): Remove declaration.
1541 * tree.c (break_out_calls): Remove.
1542 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1544 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
1547 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1548 * decl2.c (constructor_name_p): Avoid repeated constructor_name
1550 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1552 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1554 * typeck.c (build_x_unary_op): Take note of the fact that
1555 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1558 * parser.c (cp_parser_primary_expression): Preserve the form of
1559 qualified expressions in templates, even if they are not
1561 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1562 (tsubst_qualified_id): Likewise.
1563 * search.c (accessible_p): Treat everything in the body of a
1564 template as accessible.
1566 2003-07-08 Mark Mitchell <mark@codesourcery.com>
1568 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1569 * cp-tree.h (build_call_from_tree): Remove.
1570 (build_member_call): Likewise.
1571 (dependent_template_arg_p): Remove.
1572 (any_dependent_template_arguments_p): New function.
1573 (dependent_template_id_p): Likewise.
1574 (any_type_dependent_arguments_p): Likewise.
1575 (build_non_dependent_expr): Likewise.
1576 (build_non_dependent_args): Likewise.
1577 (build_x_compound_expr): Adjust prototype.
1578 * call.c (build_new_method_call): Handle non-dependent expressions
1580 * decl2.c (grok_array_decl): Likewise.
1581 (build_offset_ref_call_from_tree): Likewise.
1582 (build_call_from_tree): Remove.
1583 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1584 (dump_expr): Likewise.
1585 * init.c (build_member_call): Remove.
1586 * mangle.c (write_expression): Update handling for template-ids.
1587 * parser.c (cp_parser_primary_expression): Use
1588 any_dependent_template_arguments_p. Update constant-expression
1590 (cp_parser_postfix_expression): Use
1591 any_type_dependent_arguments_p. Simplify call processing.
1592 (cp_parser_unary_expression): Simplify.
1593 (cp_parser_expression): Adjust for changes to
1594 build_x_compound_expr.
1595 (cp_parser_template_argument): Implement standard-conforming
1596 parsing of non-type template arguments.
1597 (cp_parser_direct_declarator): Use
1598 cp_parser_fold_non_dependent_expr.
1599 (cp_parser_fold_non_dependent_expr): New function.
1600 (cp_parser_next_token_ends_template_argument_p): Likewise.
1601 * pt.c (convert_template_argument): Do not call
1602 maybe_fold_nontype_arg.
1603 (tsubst_baselink): Likewise.
1604 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
1605 processing work correctly for non-dependent expressions. Adjust
1606 handling of COMPOUND_EXPR. Simplify call processing.
1607 (value_dependent_expression_p): Deal with functional casts and
1608 sizeof/alignof correctly.
1609 (type_dependent_expression_p): Handle overloaded functions.
1610 (any_type_dependent_arguments_p): New function.
1611 (any_dependent_template_arguments_p): Likewise.
1612 (dependent_template_p): Treat SCOPE_REFs as dependent.
1613 (dependent_template_id_p): Simplify.
1614 (build_non_dependent_expr): New function.
1615 (build_non_dependent_args): Likewise.
1616 * semantics.c (finish_stmt_expr): Don't make dependent
1617 statement-expresions have void type.
1618 (finish_call_expr): Handle non-dependent expressions
1620 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1621 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1622 type size_t, even in templates.
1623 (expr_sizeof): Likewise.
1624 (finish_class_member_access_expr): Handle non-dependent expressions
1626 (build_x_indirect_ref): Likewise.
1627 (build_x_binary_op): Likewise.
1628 (build_x_unary_op): Likewise.
1629 (build_x_conditional_expr): Likewise.
1630 (build_x_compound_expr): Likewise.
1631 * typeck2.c (build_x_arrow): Likewise.
1633 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
1635 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1636 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1637 (start_function): Use DECL_ESTIMATED_INSNS.
1638 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1640 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1643 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1646 * pt.c (instantiate_class_template): Don't call xref_tag to
1647 inject name when the friend class is a specialization.
1649 2003-07-07 Mark Mitchell <mark@codesourcery.com>
1651 * cp-tree.h (build_scoped_method_call): Remove.
1652 (lookup_qualified_name): Remove parameter.
1653 (tsubst_copy_and_build): Declare.
1654 (finish_qualified_object_call_expr): Remove.
1655 (check_accessibility_of_qualified_id): New function.
1656 (finish_qualified_id_expr): Likewise.
1657 (non_reference): Likewise.
1658 (build_expr_from-tree): Remove.
1659 * call.c (non_reference): Remove.
1660 (build_scoped_method_call): Likewise.
1661 (build_method_call): Use error_operand_p. Assert that we are not
1662 processing a template.
1663 (standard_conversion): Use non_reference.
1664 * class.c (build_vtbl_entry_ref): Likewise.
1665 (build_vtbl_ref_1): Likewise.
1666 * cvt.c (build_expr_type_conversion): Use non_reference.
1667 * decl.c (lookup_qualified_name): Remove flags parameter.
1668 (grok_op_properties): Use non_reference.
1669 * decl2.c (grok_array_decl): Likewise.
1670 (build_expr_from_tree): Remove.
1671 (build_offset_ref_call_from_tree): Update comment.
1672 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1673 * except.c (prepare_eh_types): Use non_reference.
1674 (can_convert_eh): Likewise.
1675 * init.c (build_dtor_call): Avoid using build_method_call.
1676 * mangle.c (write_template_param): Remove misleading comment.
1677 * method.c (locate_copy): Use non_reference.
1678 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1679 (cp_parser_primary_expression): Do not create SCOPE_REFs is
1680 non-dependent contexts.
1681 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1682 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1683 build_expr_from_tree.
1684 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1685 Use check_accessibility_of_qualified_id.
1686 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1687 build_expr_from_tree.
1688 (tsubst_baselink): New function.
1689 (tsubst_qualified_id): Likewise.
1690 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
1691 (tsubst_expr): Adjust call to lookup_qualified_name.
1692 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
1693 handling of CALL_EXPRs.
1694 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1695 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1696 * search.c (check_final_overrider): Likewise.
1697 * semantics.c (check_accessibility_of_qualified_id): New function.
1698 (finish_qualified_object_call_expr): Remove.
1699 * typeck.c (target_type): Use non_reference.
1700 (cxx_sizeof_or_alignof_type): Likewise.
1701 (dubious_conversion_warnings): Likewise.
1702 (convert_for_initialization): Likewise.
1703 (non_reference): New function.
1705 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1707 * decl.c (print_binding_level, print_other_binding_stack,
1708 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1710 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1712 2003-07-07 Andreas Jaeger <aj@suse.de>
1714 * friend.c: Convert to ISO C90 prototypes.
1716 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1718 * cfns.h: Regenerate.
1720 * typeck.c: Convert remaining prototypes to ISO C90.
1721 * search.c: Likewise.
1723 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1724 * semantics.c (expand_or_defer_fn): Likewise
1725 * mangle.c (discriminator_for_string_literal): Likewise.
1726 * g++spec.c (lang_specific_driver): Likewise.
1728 * search.c (lookup_base_r): Remove unused variable.
1730 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1732 * semantics.c: (genrtl_try_block) Adjust emit_line_note
1735 2003-07-07 Andreas Jaeger <aj@suse.de>
1737 * search.c (lookup_base_r): Remove unused variable.
1739 2003-07-06 Michael Chastain <mec@shout.net>
1742 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1743 assigning to input_filename directly.
1745 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
1747 * call.c: Fix comment formatting.
1748 * class.c: Likewise.
1749 * cp-tree.h: Likewise.
1751 * decl2.c: Likewise.
1752 * error.c: Likewise.
1753 * method.c: Likewise.
1754 * name-lookup.c: Likewise.
1755 * parser.c: Likewise.
1758 * search.c: Likewise.
1759 * typeck.c: Likewise.
1761 2003-07-06 Mark Mitchell <mark@codesourcery.com>
1764 * search.c (lookup_base_r): Remove is_non_public and
1765 within_current_scope parameters. Remove other dead code.
1766 (lookup_base): Adjust call to lookup_base_r.
1767 (adjust_result_of_qualified_name_lookup): Improve comment.
1768 * semantics.c (finish_call_expr): Use maybe_dummy_object.
1770 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1772 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1773 LANG_HOOKS_MISSING_ARGUMENT): Override.
1775 2003-07-05 Mark Mitchell <mark@codesourcery.com>
1778 * typeck.c (build_static_cast): Check for reference conversions
1781 2003-07-04 Mark Mitchell <mark@codesourcery.com>
1783 * cp-tree.h (perform_integral_promotions): Declare.
1784 * call.c (build_addr_func): Use decay_conversion.
1785 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
1786 (convert_for_arg_passing): Use perform_integral_promotions.
1787 * cvt.c (build_expr_type_conversion): Use decay_conversion.
1788 (type_promotes_to): Do not return a cv-qualified type.
1789 * decl.c (grok_reference_init): Fix formatting.
1790 (get_atexit_node): Use decay_conversion.
1791 (build_enumerator): Use perform_integral_promotions.
1792 * init.c (build_vec_init): Use decay_conversion.
1793 * semantics.c (finish_expr_stmt): Likewise.
1794 (finish_switch_cond): Use perform_integral_promotions.
1795 * typeck.c (default_conversion): Likewise.
1796 (perform_integral_promotions): New function.
1797 (build_indirect_ref): Use decay_conversion.
1798 (build_array_ref): Use perform_integral_promotions.
1799 (convert_arguments): Use decay_conversion.
1800 (build_unary_op): Use perform_integral_promotions.
1801 (build_c_cast): Use decay_conversion.
1802 (build_modify_expr): Likewise.
1803 (convert_for_initialization): Likewise.
1804 * typeck2.c (build_x_arrow): Likewise.
1806 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
1808 * call.c: Fix comment typos.
1809 * class.c: Likewise.
1810 * cp-tree.h: Likewise.
1812 * decl2.c: Likewise.
1815 * mangle.c: Likewise.
1816 * parser.c: Likewise.
1818 * search.c: Likewise.
1819 * semantics.c: Likewise.
1821 * typeck.c: Likewise.
1823 2003-07-04 Zack Weinberg <zack@codesourcery.com>
1825 * parser.c (cp_lexer_read_token): No need to handle string
1826 constant concatenation.
1828 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1830 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1831 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1832 ATTRIBUTE_GCC_CXXDIAG.
1834 2003-07-03 Mark Mitchell <mark@codesourcery.com>
1836 * call.c (build_addr_func): Handle bound pointers-to-members.
1837 (build_method_call): Do not call resolve_offset_ref.
1838 (implicit_conversion): Likewise.
1839 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1841 (resolve_args): Do not call resolve_offset_ref.
1842 (build_conditional_expr): Likewise.
1843 (build_new_method_call): Likewise.
1844 * cp-tree.def (OFFSET_REF): Update documentation.
1845 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1846 pointers to members to pointers.
1847 (ocp_convert): Do not call resolve_offset_ref.
1848 (convert_to_void): Likewise.
1849 (build_expr_type_conversion): Likewise.
1850 * decl2.c (delete_sanity): Likewise.
1851 * init.c (resolve_offset_ref): Simplify greatly.
1852 (build_vec_delete): Do not call resolve_offset_ref.
1853 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1855 (cp_parser_unary_expression): Use
1856 cp_parser_simple_cast_expression.
1857 (cp_parser_delete_expression): Likewise.
1858 (cp_parser_cast_expression): Likewise.
1859 (cp_parser_pm_expression): Use cp_parser_binary_op.
1860 (cp_parser_simple_cast_expression): New function.
1861 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1862 * semantics.c (finish_increment_expr): Likewise.
1863 (finish_typeof): Likewise.
1864 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1865 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1866 (decay_conversion): Do not call resolve_offset_ref.
1867 (finish_class_member_access_expr): Likewise.
1868 (convert_arguments): Likewise.
1869 (build_x_binary_op): Handle DOTSTAR_EXPR.
1870 (condition_conversion): Do not call resolve_offset_ref.
1871 (unary_complex_lvalue): Likewise.
1872 (build_static_cast): Likewise.
1873 (build_reinterpret_cast): Likewise.
1874 (build_const_cast): Likewise.
1875 (build_c_cast): Likewise.
1876 (build_modify_expr): Likewise.
1877 (convert_for_assignment): Likewise.
1878 (convert_for_initialization): Likewise.
1879 * typeck2.c (build_x_arrow): Likewise.
1880 (build_m_component_ref): Simplify.
1882 * call.c (build_scoped_method_call): Use convert_to_void.
1883 (build_method_call): Likewise.
1884 * class.c (check_field_decls): Remove dead code.
1885 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1886 * decl2.c (grok_array_decl): Remove dead code.
1887 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1888 as pointer-to-member representation.
1889 * init.c (build_offset_ref): Tidy.
1890 (build_vec_delete_1): Use convert_to_void.
1891 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1892 as pointer-to-member representation.
1894 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
1897 * decl.c (grokdeclarator): Return friend decls, not
1899 * decl2.c (grokfield): Alter friend decl check.
1900 * parser.c (struct cp_parser): Document default_arg chain on
1901 unparsed_functions_queue.
1902 (cp_parser_save_default_args): New.
1903 (cp_parser_init_declarator, cp_parser_function_definition,
1904 cp_parser_member_declaration): Call it.
1905 (cp_parser_class_specifier): Remove unused variable. Alter
1906 processing of unparsed_functions_queue.
1908 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1910 * class.c (add_method, check_field_decl): Fix format specifier.
1911 * decl.c (duplicate_decls, pushdecl, check_goto,
1912 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1913 start_enum): Likewise.
1914 * decl2.c (ambiguous_decl): Likewise.
1915 * pt.c (redeclare_class_template): Likewise.
1917 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
1920 * pt.c (type_unification_real): Don't unify exprs of error type.
1921 * tree.c (error_type): Don't die on error_type.
1924 * decl2.c (arg_assoc_class): Don't die on NULL type.
1925 * typeck.c (type_unknown_p): Don't die on untyped expressions.
1927 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1930 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1933 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1935 * error.c (locate_error): %P takes an `int', not a `tree'.
1937 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1939 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1940 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1941 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1944 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1945 (expand_or_defer_fn): Declare.
1946 (lower_function): Declare.
1947 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1948 * decl2.c: Include cgraph.h and varpool.h
1949 (maybe_emit_vtables): Make explicit instantations as needed.
1950 (mark_member_pointers, lower_function): New functions.
1951 (finish_file): Do unit-at-a-time.
1952 * method.c (synthesize_method): Use expand_or_defer_fn.
1953 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1954 * parser.c (cp_parser_function_definition_after_decl): Use
1956 * pt.c (instantiate_decl): Likewise.
1957 * semantics.c: Include cgraph.h
1958 (expand_or_defer_fn): Break out from ...
1959 (expand_body): ... here; deal with unit-at-a-time.
1960 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1961 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1963 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1965 * call.c (resolve_scoped_fn_name): Return error_mark_node for
1968 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1971 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1974 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
1977 * error.c (dump_decl): Handle BIT_NOT_EXPR as
1978 pseudo destructor calls.
1980 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1982 * cp-tree.h (define_label): Replace filename and lineno
1983 arguments with a location_t.
1984 * decl.c (pop_label): Adjust define_label call.
1985 (define_label): Replace filename and lineno arguments with a
1987 * semantics.c (finish_label): Adjust define_label call.
1989 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1992 * decl2.c (grokfield): Do not build NOP_EXPRs around the
1995 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
1997 * Make-lang.in: Update.
1998 * cp-lang.c (c_language): Define.
1999 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2000 * cp-tree.h (cxx_init_options): Remove.
2001 * lex.c: Don't include diagnostic.h.
2002 (cxx_init_options): Remove.
2004 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2007 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2008 tree generated within a template. Use dump_expr to dump an
2011 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2013 * mangle.c (write_expression): Exit gracefully when trying to
2016 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2019 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2020 (value- or type-) dependent expression as DECL_INITIAL is a
2021 valid constant-expression (at parser time).
2023 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2026 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2027 USING_DECL, instead of print_tree_identifier.
2029 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2031 * cp-tree.h (language_to_string): Adjust declaration.
2032 * dump.c (cp_dump_tree): Adjust usage.
2033 * error.c (dump_char): Use output_formatted_scalar. Tidy.
2034 (parm_to_string): Lose unused parameter. Tidy.
2035 (expr_to_string): Likewise.
2036 (code_to_string): Likewise.
2037 (language_to_string): Likewise.
2038 (op_to_string): Likewise.
2039 (assop_to_string): Likewise.
2040 (digit_buffer): Remove.
2041 (dump_type): Format builtin vector type as __vector__.
2043 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2045 * error.c (print_integer): Remove.
2046 (dump_type_suffix): Adjust.
2047 (dump_expr): Likewise.
2049 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2051 * error.c (print_instantiation_partial_context): Take a
2053 (print_instantiation_full_context): Adjust.
2054 (print_instantiation_context): Adjust.
2056 * cp-tree.h (cp_line_of, cp_file_of): Remove.
2057 * error.c (cp_line_of, cp_file_of): Merge into ...
2058 (location_of): ... here. Make static, return a location_t.
2059 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2061 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2064 * call.c (joust): Move warn_conversion check outwards.
2066 2003-06-27 Zack Weinberg <zack@codesourcery.com>
2068 * decl.c (build_typename_type)
2069 * mangle.c (write_template_template_arg)
2070 * parser.c (cp_parser_scope_through_which_access_occurs)
2071 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2072 * repo.c (get_base_filename)
2073 * semantics.c (maybe_convert_cond):
2074 Mark the definition static, matching the forward declaration.
2076 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2079 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2081 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2084 * decl.c (finish_enum): Implement DR377.
2086 * decl.c (cp_finish_decl): Don't make variables with reference
2087 type readonly while they are being initialized.
2089 2003-06-26 Mark Mitchell <mark@codesourcery.com>
2092 * typeck.c (build_static_cast): Avoid returning expressions with
2095 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
2097 * call.c (build_op_delete_call): Use strip_array_call. Correct
2098 error message to say 'delete' or 'delete[]'.
2100 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
2103 * pt.c (check_explicit_specialization): When looking up a
2104 template function from an identifier outside class-scope, bind
2105 it to CP_DECL_CONTEXT.
2107 2003-06-25 Mark Mitchell <mark@codesourcery.com>
2110 * search.c (lookup_base_r): Rely on accessible_p, rather than
2111 trying to emulate that logic here.
2114 * call.c (convert_like): Pass issue_conversion_warnings.
2115 (convert_like_with_context): Likewise.
2116 (convert_like_real): Add issue_conversion_warnings parameter.
2117 (perform_direct_initialization_if_possible): New function.
2118 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2119 * typeck.c (check_for_casting_away_constness): New function.
2120 (build_static_cast): Rewrite.
2122 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
2124 * call.c (enforce_access): Assert we get a binfo.
2125 (build_op_delete_call): Pass a binfo to
2126 perform_or_defer_access_check.
2127 * class.c (alter_access): Likewise.
2128 * decl.c (make_typename_type): Likewise.
2129 (make_unbound_class_template): Likewise.
2130 * lex.c (do_identifier): Likewise.
2131 * method.c (hack_identifier): Likewise.
2132 * parser.c (cp_parser_lookup_name): Likewise.
2133 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2135 * semantics.c (finish_non_static_data_member): Likewise.
2136 (perform_or_defer_access_check): Expect a binfo.
2137 * typeck.c (comptypes): Expect types.
2139 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2140 * friend.c (make_friend_class): Likewise.
2141 * pt.c (check_default_tmpl_args): Likewise.
2142 (lookup_template_class): Likewise.
2144 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
2146 * method.c (thunk_labelno): Move outside ifdef block to make garbage
2149 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
2151 * class.c (build_vtable): Make vtables.
2152 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2153 * decl2.c (output_vtable_inherit): Rename to ...
2154 (prepare_assemble_variable): ... this one; change interface.
2155 (maybe_emit_vtables): Do not call output_vtable_inherit.
2156 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2157 * cp-tree.h (prepare_assemble_variable): New.
2159 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
2161 * method.c: add prototype for make_alias_for_thunk.
2162 (thunk_labelno, make_alias_for_thunk): only define
2163 if ASM_OUTPUT_DEF is defined.
2165 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2167 * method.c (thunk_labelno): New variable.
2168 (make_alias_for_thunk): New function.
2169 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
2170 into the same section as the function it is calling.
2171 Include gt-cp-method.h.
2172 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2173 (cp/method.o): Depend on gt-cp-method.h.
2174 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2176 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
2178 * decl.c (register_dtor_fn): Mark cleanup as used.
2179 * decl2.c (mark_vtable_entries): Skip nops.
2180 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2181 (build_dynamic_cast_1): Likewise.
2182 (tinfo_base_init): Likewise.
2183 (emit_tinfo_decl): Likewise.
2185 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2187 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2190 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2193 * call.c (joust): Warn about choosing conversion sequence only if
2196 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2199 * call.c (op_error): Tidy.
2200 * error.c (dump_expr): Properly format 'T()' when T is an
2203 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2206 * decl.c (grok_op_properties): Warn possible confusing conversion
2207 only if -Wconversion.
2209 2003-06-20 Mark Mitchell <mark@codesourcery.com>
2212 * parser.c (cp_parser_class_head): See through dependent names
2213 when parsing a class-head.
2216 * pt.c (try_class_unification): Correct handling of member class
2219 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
2221 * semantics.c (genrtl_finish_function): Adjust
2222 expand_function_end call.
2224 2003-06-19 Mark Mitchell <mark@codesourcery.com>
2227 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2229 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2232 * cp-tree.h (pushdecl_class_level): Change prototype.
2233 (push_class_level_binding): Likewise.
2234 * decl.c (add_binding): Reject duplicate static data members.
2235 (pushdecl_class_level): Return a value indicating whether or not
2236 the binding was valid.
2237 (push_class_level_binding): Likewise.
2238 * semantics.c (finish_member_declaration): Don't keep invalid
2242 * call.c (initialize_reference): Do not use cp_finish_decl to emit
2243 temporary variables.
2244 * cp-tree.h (static_aggregates): Declare.
2245 (pushdecl_top_level_and_finish): Likewise.
2246 * decl.c (pushdecl_top_level_1): New function.
2247 (pushdecl_top_level): Use it.
2248 (pushdecl_top_level_and_finish): New function.
2249 (initialize_local_var): Remove redundant code.
2250 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
2252 * decl.h (static_aggregates): Remove.
2253 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2254 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2255 (tinfo_base_init): Likewise.
2257 2003-06-19 Matt Austern <austern@apple.com>
2260 * init.c (build_zero_init): Assert that number of array elements
2261 is an integer constant.
2262 (build_default_init) Don't use build_zero_init for arrays with
2263 variable number of elements.
2265 2003-06-19 Andreas Jaeger <aj@suse.de>
2267 * cp-tree.h: Remove duplicated declarations.
2269 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
2271 * pt.c: Convert to ISO C.
2272 * semantics.c: Convert to ISO C.
2274 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2276 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2277 at_least_as_qualified_p, more_qualified_p): Return bool.
2278 * typeck.c: ANSIFY function definitions.
2279 (comp_array_types): Take redeclaration bool parameter.
2280 (comptypes): Rearrange STRICT handling.
2281 (at_least_as_qualified_p, more_qualified_p,
2282 comp_cv_qualification): Cache cv quals.
2283 (compparms): Rearrange loop.
2285 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2287 * cp-tree.h (COMPARE_RELAXED): Rename to ...
2288 (COMPARE_DERIVED): ... here. Adjust comment.
2289 (resolve_typename_type_in_current_instantiation): Remove.
2290 (cp_tree_equal, comptypes): Return a bool.
2291 * cvt.c (convert_to_reference): Adjust comptypes call.
2292 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2293 (resolve_typename_type_in_current_instantiation): Remove.
2294 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2295 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2296 calls. Refactor code.
2297 * typeck.c (comp_array_types): Return bool. Lose callback.
2298 parameter. Adjust cp_tree_equal calls.
2299 (comptypes): Return bool. Adjust strict handling. Remove relaxed
2300 enumeration and java type handling. Deal with typename types here.
2301 Adjust recursive and cp_tree_equals calls. Adjust base and derived
2303 (comp_target_types): Remove unreachable code. Adjust
2304 same_or_base_type_p calls.
2305 (ptr_reasonably_similar): Adjust base and derived check.
2307 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2309 (check_return_expr): Adjust error messages.
2310 * cp-tree.def (SCOPE_REF): Correct comment.
2312 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2314 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2317 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
2319 * optimize.c (dump_function): Form complete flag name by
2320 prefixing 'fdump-' to string returned by dump_flag_name().
2322 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2324 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2327 2003-06-17 Jason Merrill <jason@redhat.com>
2330 * decl.c (grokfndecl): Don't mark a function inline for
2331 -finline-functions if it isn't defined.
2333 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2336 * class.c (handle_using_decl): Robustify.
2339 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2340 * mangle.c (struct globals): Remove internal_mangling_p.
2341 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2342 (write_template_parm): Don't write out the level number.
2343 (conv_type_names): New variable.
2344 (hash_type): New function.
2345 (compare_type): Likewise.
2346 (mangle_conv_op_name_for_type): Don't try to mangle conversion
2348 * search.c (lookup_conversion_operator): New function.
2349 (lookup_fnfields_1): Use it.
2351 2003-06-17 Andreas Jaeger <aj@suse.de>
2353 * except.c: Remove duplicate declaration of push_eh_cleanup.
2355 * call.c: Remove extra declaration of inhibit_warnings.
2357 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2359 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
2360 * mangle.c: Convert to ISO C.
2362 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2364 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2367 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2369 * tree.c: Convert to ISO C.
2371 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
2373 * cp-tree.h: Follow spelling conventions.
2374 * mangle.c: Likewise.
2375 * method.c: Likewise.
2376 * parser.c: Likewise.
2378 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
2380 * decl.c (start_function): Adjust init_function_start call.
2381 * method.c (use_thunk): Likewise.
2382 * semantics.c (genrtl_start_function): Likewise.
2384 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2386 * Make-lang.in: Remove c-options.o.
2388 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
2390 * lex.c: Convert to ISO C.
2392 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
2393 * init.c: removes use of PARAMS macro. Use ISO style function
2394 declarations. (Not copyright-significant change.)
2396 * rtti.c: Remove PARAMS.
2398 * typeck2.c: Convert to ISO C.
2400 2003-06-12 Mark Mitchell <mark@codesourcery.com>
2403 * typeck.c (build_c_cast): Check that the destination type is
2406 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2409 * cp-tree.h (finish_declarator): Remove.
2410 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2411 erroneous declarations.
2412 * semantics.c (finish_declarator): Remove.
2414 2003-06-11 Roger Sayle <roger@eyesopen.com>
2416 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2417 global static constructor/destructor if it will be empty, i.e.
2418 either doesn't call any ctors/dtors or only calls pure or const
2421 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2423 * mangle.c (tm_p.h): Include it.
2424 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2427 * tree.c (cp_cannot_inline_fn): Check for "inline" before
2430 2003-06-10 Jason Merrill <jason@redhat.com>
2433 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2435 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
2437 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2438 (start_cleanup_cnt): New.
2440 2003-06-10 Mark Mitchell <mark@codesourcery.com>
2443 * cp-tree.h (template_for_substitution): Declare.
2444 * decl2.c (mark_used): Use it when figuring out whether or not a
2446 * pt.c (template_for_substitution): Give it external linkage.
2447 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2450 2003-06-09 Zack Weinberg <zack@codesourcery.com>
2453 * mangle.c (write_real_cst): New function. Implement
2454 ABI-compliant mangling of floating-point literals when
2455 -fabi-version>=2; provide backward compatibility with 3.3 when
2456 -fabi-version=1 (with warning). Clarify commentary.
2457 (write_template_arg_literal): Use write_real_cst.
2459 2003-06-07 Andreas Jaeger <aj@suse.de>
2461 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2463 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
2465 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2466 (LANG_HOOKS_HANDLE_OPTION): Override.
2467 * cp-tree.h (cxx_init_options): Update.
2468 * lex.c (cxx_init_options): Update.
2470 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
2472 * Make-lang.in: Add support for stageprofile and stagefeedback
2474 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
2476 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2478 2003-06-04 Andreas Jaeger <aj@suse.de>
2480 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2482 2003-06-03 Jason Merrill <jason@redhat.com>
2484 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2486 * cp/decl.c (reshape_init): Handle vectors.
2488 * testsuite/g++.dg/init/array10.C: New.
2490 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2493 * pt.c (check_explicit_specialization): Check for 'static'
2496 2003-05-31 Diego Novillo <dnovillo@redhat.com>
2498 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2499 the operand of a CONSTRUCTOR node.
2501 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2503 * decl.c (cp_binding_level::this_entity): Rename from this_class.
2504 (cxx_scope_descriptor): New function.
2505 (cxx_scope_debug): Likewise.
2506 (push_binding_level): Use it.
2507 (pop_binding_level): Likewise.
2508 (suspend_binding_level): Likewise.
2509 (resume_binding_level): Likewise.
2510 (pushlevel_class): Adjust use of this_class.
2511 (pushtag): Likewise.
2512 (lookup_name_real): Likewise.
2513 (global_scope_name): New variable.
2514 (initialize_predefined_identifiers): Initialize it.
2515 (push_namespace): Use it.
2516 (make_cxx_scope): New function.
2517 (pushlevel): Use it.
2518 (pushlevel_class): Likewise.
2519 (push_binding_level): Simplify. Loose the last two arguments.
2520 (make_binding_level): Remove.
2521 (initial_push__namespace_scope): New function.
2522 (push_namespace): Use it. Simplify.
2523 (cxx_init_decl_processing): Likewise.
2524 (declare_namespace_level): Remove.
2526 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2529 * pt.c (instantiate_decl): Don't use full template arguments if
2530 we are dealing with specializations.
2532 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2534 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2535 (binding_depth): Unconditionally define.
2536 (is_class_level): Likewise.
2537 (indent): Likewise. Take an indenting parameter.
2538 (push_binding_level): Remove conditional definittion.
2539 (pop_binding_level): Likewise.
2540 (suspend_binding_level): Likewise.
2541 (resume_binding_level): Likewise.
2542 (pushlevel): Likewise.
2543 (pushlevel_class): Likewise.
2544 (poplevel_class): Likewise.
2545 (pop_everything): Likewise.
2547 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2549 * name-lookup.h (global_scope_p): New macro.
2550 * decl.c (pop_binding_level): Use it. Don't refer directly to
2551 global_binding_level.
2552 (suspend_binding_level): Likewise.
2553 (global_bindings_p): Likewise.
2554 (print_other_binding_stack): Likewise.
2555 (print_binding_stack): Likewise.
2556 (maybe_push_to_top_level): Likewise.
2557 (pushdecl_namespace_level): Likewise.
2558 (cxx_init_decl_processing): Likewise.
2559 (start_decl): Likewise.
2560 (cp_finish_decl): Likewise.
2561 (start_function): Likewise.
2562 (global_binding_level): Remove.
2564 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2566 * parser.c (cp_parser_explicit_instantiation): Restore old
2567 access before template instantiation.
2569 2003-05-23 Geoffrey Keating <geoffk@apple.com>
2571 * lang-specs.h: Use -o to specify preprocessor's output file.
2572 Make -no-integrated-cpp work when building PCH files.
2574 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2577 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2578 check for implicitly created typedef to an enum.
2580 2003-05-21 Jason Merrill <jason@redhat.com>
2582 * init.c (build_vec_delete): Copy the address into a temporary
2583 variable before calling build_vec_delete_1.
2584 * decl2.c (delete_sanity): Don't call stabilize_reference.
2586 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
2588 * pt.c (register_specialization): Update the decl's location,
2590 (check_explicit_specialization): Likewise.
2592 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2594 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2596 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
2599 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2600 if the old decl had instantiated DECL_RTL.
2601 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2603 2003-05-19 Matt Austern <austern@apple.com>
2605 * lang-options.h: Document -Wno-invalid-offsetof
2606 * typeck.c (build_class_member_access_expr): Don't complain about
2607 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2609 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2611 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2612 (binding_entry_make): Make entry->chain NULL after getting an entry.
2613 fix the spelling of chain in a comment.
2614 (binding_table_free): speed up by having temporary variable.
2615 (binding_table_new): set table->chain to be NULL after allocating
2617 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2618 binding->previous to NULL after getting an binding for speed.
2620 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
2622 * cp-tree.h (struct lang_type_class): Replace data member tags
2623 with hash-table nested_udts.
2624 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2625 * class.c (unreverse_member_declarations): Don't touch
2627 (pushclass): Use cxx_remember_type_decls.
2628 * decl.c (struct cp_binding_level): Replace data member tags with
2629 hash-table type_decls.
2630 (pop_binding_level): Handle level->type_decls.
2631 (kept_level_p): Adjust.
2632 (poplevel): Remove unused local variable.
2633 (bt_print_entry): New function.
2634 (print_binding_level): Use it.
2635 (push_namespace): Build current_binding_level->type_decls.
2636 (maybe_process_template_type_declaration): Adjust.
2637 (pushtag): Likewise.
2638 (clear_anon_tags): Use binding_table_remove_anonymous_types.
2640 (cxx_remember_type_decls): Rename from storetags. Adjust.
2641 (lookup_tag): Use binding_table_find_anon_type. Tidy.
2642 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2643 (cxx_init_decl_processing): Build global_binding_level->type_decls.
2644 (store_parm_decls): Remove pointless code.
2645 * name-lookup.c (free_binding_entry): New variable.
2646 (ENTRY_INDEX): New macro.
2647 (struct binding_table_s): New datatype.
2648 (binding_entry_make): New function.
2649 (binding_entry_free): Likewise.
2650 (binding_table_construct): Likewise.
2651 (binding_table_free): Likewise.
2652 (binding_table_new): Likewise.
2653 (binding_table_expand): Likewise.
2654 (binding_table_insert): Likewise.
2655 (binding_table_find): Likewise.
2656 (binding_table_find_anon_type): Likewise.
2657 (binding_table_reverse_maybe_remap): Likewise.
2658 (binding_table_remove_anonymous_types): Likewise.
2659 (binding_table_foreach): Likewise.
2660 * name-lookup.h (binding_table): New type.
2661 (binding_entry): Likewise.
2662 (bt_foreach_proc): Likewise.
2663 (struct binding_entry_s): New datatype.
2664 (SCOPE_DEFAULT_HT_SIZE): New macro.
2665 (CLASS_SCOPE_HT_SIZE): Likewise.
2666 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2667 (NAMESPACE_STD_HT_SIZE): Likewise.
2668 (GLOBAL_SCOPE_HT_SIZE): Likewise.
2669 (binding_table_new): Declare.
2670 (binding_table_free): Likewise.
2671 (binding_table_insert): Likewise.
2672 (binding_table_find_anon_type): Likewise.
2673 (binding_table_reverse_maybe_remap): Likewise.
2674 (binding_table_remove_anonymous_types): Likewise.
2675 (binding_table_foreach): Likewise.
2676 (binding_table_find): Likewise.
2677 (cxx_remember_type_decls): Likewise.
2678 * pt.c (bt_instantiate_type_proc): New function.
2679 (do_type_instantiation): Use it.
2680 * search.c (lookup_field_r): Use binding_table_find.
2682 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2684 * semantics.c (perform_deferred_access_checks): Don't discard
2687 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2689 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2690 libiberty VA_ macros, always use stdarg.
2691 * rtti.c (create_pseudo_type_info): Likewise.
2692 * tree.c (build_min_nt, build_min): Likewise.
2694 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2696 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2697 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2698 collapse multiple function calls into one.
2699 * tree.c (debug_binfo): Likewise.
2701 2003-05-15 Jason Merrill <jason@redhat.com>
2704 * call.c (conditional_conversion): Don't consider implicit
2705 conversions if T2 is a base of T1.
2706 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2707 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2709 * parser.c (cp_parser_primary_expression): Convert a static data
2710 member from reference.
2712 2003-05-15 Mark Mitchell <mark@codesourcery.com>
2714 * call.c (build_op_delete_call): Avoid creating unnecessary types.
2715 * class.c (instantiate_type): Remove tests for tf_no_attributes.
2716 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2717 (COMPARE_NO_ATTRIBUTES): Remove.
2718 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2721 * semantics.c (finish_typeof): Refine type-dependency check.
2723 2003-05-13 Jason Merrill <jason@redhat.com>
2725 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2726 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2728 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2730 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2732 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2734 PR c++/10230, c++/10481
2735 * semantics.c (finish_non_static_data_member): Handle when the
2736 non-static member is not from a base of the current class type.
2738 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2741 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2742 template and has dependent context.
2744 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2746 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2748 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2751 * cp-tree.h (saved_scope): Remove check_access field.
2752 (tsubst_flags_t): Remove tf_parsing.
2753 * decl.c (maybe_push_to_top_level): Don't initialize
2754 scope_chain->check_access.
2755 (make_typename_type, make_unbound_class_template): Don't use
2757 (register_dtor_fn): Use push/pop_deferring_access_checks
2758 instead of scope_chain->check_access.
2759 * method.c (use_thunk): Likewise.
2760 * parser.c (cp_parser_explicit_instantiation
2761 (cp_parser_constructor_declarator_p): Don't call
2762 push/pop_deferring_access_checks here.
2763 (cp_parser_template_argument, cp_parser_class_name): Don't use
2765 (yyparse): Check flag_access_control.
2766 * pt.c (instantiate_class_template): Call
2767 push/pop_deferring_access_checks.
2768 * semantics.c (push_deferring_access_checks): Propagate
2770 (perform_or_defer_access_check): Make sure basetype_path is
2771 a type before comparison.
2772 * call.c (build_op_delete_call, build_over_call): Use
2773 perform_or_defer_access_check.
2774 * class.c (alter_access): Likewise.
2775 * init.c (build_offset_ref): Likewise.
2776 * lex.c (do_identifier): Likewise.
2777 * method.c (hack_identifier): Likewise.
2778 * search.c (lookup_member): Likewise.
2779 * semantics.c (finish_non_static_data_member): Likewise.
2780 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2781 instead of flag_access_control.
2783 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2786 * parser.c (cp_parser_class_name): Remove check_access parameter.
2787 All caller adjusted. Update declaration.
2788 (cp_parser_lookup_name): Likewise.
2789 * semantics.c (push_deferring_access_checks): Change parameter type
2790 to enum deferring_kind. All caller adjusted.
2791 (resume_deferring_access_checks): Adjust to use new enum.
2792 (stop_deferring_access_checks): Likewise.
2793 (perform_or_defer_access_check): Likewise.
2794 * cp-tree.h (deferring_kind): New enum.
2795 (deferred_access): Adjust field type.
2796 (push_deferring_access_checks): Update declaration.
2798 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2800 PR c++/10555, c++/10576
2801 * pt.c (lookup_template_class): Handle class template with
2802 multiple levels of parameters when one of the levels contain
2805 2003-05-08 Jason Merrill <jason@redhat.com>
2807 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2808 expression. Undo some of the recent reorg.
2810 2003-05-07 Richard Henderson <rth@redhat.com>
2813 * cfns.gperf: Comment out POSIX thread cancellation points,
2814 plus abort and raise.
2815 * cfns.h: Regenerate.
2817 2003-05-07 Jason Merrill <jason@redhat.com>
2819 * call.c (build_conditional_expr): Don't assume that the folded
2820 expression has result_type.
2822 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2824 * typeck.c (build_unary_op): Deal with const qualifier in
2825 invalid pointer-to-member earlier.
2827 2003-05-05 Jason Merrill <jason@redhat.com>
2830 * call.c (conditional_conversion): Build an RVALUE_CONV if
2831 we're just changing the cv-quals.
2832 (build_conditional_expr): Don't call convert to change
2835 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2838 * typeck.c (build_unary_op): Don't output const qualifier when
2839 output invalid pointer-to-member diagnostics.
2841 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2843 * decl.c: Fix typos.
2845 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2848 * decl.c (start_function): Use same_type_p to check return type
2851 2003-05-03 Zack Weinberg <zack@codesourcery.com>
2854 * cp/typeck.c (build_x_compound_expr): No need to check
2855 extra_warnings as well as warn_unused_value.
2857 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2859 PR c++/9364, c++/10553, c++/10586
2860 * decl.c (make_typename_type): Don't crash on illegal code.
2862 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
2864 * class.c (finish_struct): Use location_t and input_location
2866 * decl.c (make_label_decl): Likewise.
2867 (use_label): Likewise.
2868 * decl2.c (warn_if_unknown_interface): Likewise.
2869 (start_static_initialization_or_destruction): Likewise.
2870 (generate_ctor_or_dtor_function): Likewise.
2871 (finish_file): Likewise.
2872 * error.c (print_instantiation_full_context): Likewise.
2873 * init.c (create_temporary_var): Likewise.
2874 * method.c (synthesize_method): Likewise.
2875 * parser.c (cp_token): Likewise.
2876 (cp_lexer_set_source_position_from_token): Likewise.
2877 (cp_lexer_get_preprocessor_token): Likewise.
2878 (cp_parser_statement): Likewise.
2879 * pt.c (tsubst_friend_function): Likewise.
2880 (instantiate_class_template): Likewise.
2881 (tsubst_decl): Likewise.
2883 (instantiate_decl): Likewise.
2884 * semantics.c (begin_class_definition): Likewise.
2885 (expand_body): Likewise.
2887 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
2889 * class.c (finish_struct): Rename lineno to input_line.
2890 * decl.c (push_binding_level, pop_binding_level,
2891 suspend_binding_level, resume_binding_level, make_label_decl,
2892 use_label, start_function): Likewise.
2893 * decl2.c (warn_if_unknown_interface,
2894 start_static_initialization_or_destruction,
2895 generate_ctor_or_dtor_function, finish_file): Likewise.
2896 * error.c (cp_line_of, print_instantiation_full_context,
2897 print_instantiation_context): Likewise.
2898 * except.c (check_handlers_1, check_handlers): Likewise.
2899 * init.c (create_temporary_var): Likewise.
2900 * method.c (use_thunk, synthesize_method): Likewise.
2901 * parser.c (cp_lexer_set_source_position_from_token,
2902 cp_lexer_get_preprocessor_token): Likewise.
2903 * pt.c (push_tinst_level, pop_tinst_level,
2904 tsubst_friend_function, instantiate_class_template, tsubst_decl,
2905 tsubst, tsubst_expr, instantiate_decl): Likewise.
2906 * semantics.c (genrtl_try_block, finish_label_stmt,
2907 begin_class_definition, expand_body,
2908 genrtl_finish_function): Likewise.
2909 * tree.c (build_min_nt, build_min): Likewise.
2911 2003-05-01 Mark Mitchell <mark@codesourcery.com>
2913 * decl2.c (comdat_linkage): Don't externalize explicit
2916 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2919 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2922 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
2924 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
2925 (struct lang_identifier): ... to here.
2926 (LANG_ID_FIELD): Remove.
2927 (SET_LANG_ID): Remove.
2928 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2929 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2930 (IDENTIFIER_IMPLICIT_DECL): Likewise.
2931 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2932 (IDENTIFIER_ERROR_LOCUS): Likewise.
2933 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2935 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2938 * pt.c (convert_template_argument): Correct diagnostic.
2940 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2942 PR c++/9432, c++/9528
2943 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2945 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
2947 * decl.c (check_previous_goto_1): Adjust prototype.
2948 (check_previous_goto): Adjust use.
2949 (check_switch_goto): Likewise.
2950 (use_label): Adjust.
2951 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2952 (struct named_label_use_list): Use location_t datatype.
2954 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2957 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2958 that have not yet been written out.
2960 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2963 * class.c (layout_class_type): Mark overlong bitfields as having
2964 the maximum size permitted by their type, after layout.
2967 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2969 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2971 * call.c (build_operator_new_call): Fix typo.
2972 * lang-options.h: Likewise.
2974 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2977 * cp-tree.h (lookup_field_1): Declare it.
2978 * search.c (lookup_field_1): Make it public.
2979 * decl.c (reshape_init): Handle designated initializers.
2981 * decl.c (maybe_commonize_var): Further tweak support for systems
2982 without weak symbols.
2984 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2986 * decl.c (maybe_commonize_var): Fix thinko in last patch.
2988 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2991 * method.c (use_thunk): Decrement immediate_size_expand.
2994 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2995 (DECL_MAYBE_TEMPLATE): Remove.
2996 * class.c (fixed_type_or_null): Avoid infinite recursion.
2998 * decl.c (maybe_commonize_var): Make the code match the comments.
2999 * pt.c (instantiate_decl): Move call to import_export_decl.
3001 2003-04-26 Mark Mitchell <mark@codesourcery.com>
3003 * decl2.c (finish_file): Fix merge botch.
3005 2003-04-25 Mark Mitchell <mark@codesourcery.com>
3007 * decl2.c (finish_file): Don't call import_export_decl for
3008 functions that are not defined.
3009 (handle_class_head): Robustify.
3010 * pt.c (instantiate_decl): Do not call cp_finish_decl for
3011 variables that are not defined.
3013 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
3015 * call.c (print_z_candidates): Fix off by one error.
3017 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
3020 * call.c (joust): Don't warn about conversion ops that are exact
3021 or cv-conversions. Rearrange to avoid multiple type comparisons.
3023 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3026 * call.c (build_cxx_call): Robustify.
3028 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
3030 * Make-lang.in (lex.o): Remove mbchar.h.
3031 * lex.c (MULTIBYTE_CHARS): Lose.
3032 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3035 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3038 * cp-tree.h (duplicate_tag_error): Remove.
3039 * class.c (duplicate_tag_error): Remove.
3040 * semantics.c (begin_class_definition): Return immediately for a
3041 duplicate class definition.
3044 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3046 2003-04-22 Mark Mitchell <mark@codesourcery.com>
3049 * search.c (lookup_fnfields_1): Handle empty slots in the method
3053 * decl.c (check_elaborated_type_specifier): New function, split
3055 (xref_tag): ... here. Use the new function in more places.
3057 * rtti.c (throw_bad_typeid): Use build_cxx_call.
3059 2003-04-21 Mark Mitchell <mark@codesourcery.com>
3061 * call.c (build_over_call): Use build_cxx_call.
3062 (build_cxx_call): New method, split out of build_over_call.
3063 * cp-tree.h (language_function): Add can_throw.
3064 (build_cxx_call): Declare it.
3065 * decl.c (finish_function): If a function does not contain any
3066 calls to functions that can throw an exception, indicate that
3068 * decl2.c (mark_used): Do not defer the instantiation of
3069 functions, if the current function does not throw.
3070 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3071 * pt.c (instantiate_decl): Make sure import_export_decl is called
3072 before emitting things.
3073 * rtti.c (throw_bad_cast): Use build_cxx_call.
3074 (build_dynamic_cast_1): Likewise.
3075 * typeck.c (build_function_call): Likewise.
3077 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
3080 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3081 expressions. Reverts my 2002-08-08 patch.
3083 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3086 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3088 * cp/decl2.c (start_static_storage_duration_function): Take count
3089 arg, don't check if it wraps round.
3090 (generate_ctor_or_dtor_function): Add locus arg, use it.
3091 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3093 (finish_file): Set line numbers to past EOF for synthesized
3096 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3099 * search.c (lookup_field_1): Final scan goes backwards for
3100 types, forwards for non-types.
3102 2003-04-17 Roger Sayle <roger@eyesopen.com>
3105 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3106 "nothrow" function attributes.
3108 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3111 * pt.c (type_dependent_expression_p): Handle array new.
3113 2003-04-15 Mark Mitchell <mark@codesourcery.com>
3116 * parser.c (cp_parser_primary_expression): Reorganize logic for
3117 dealing with name lookup failures.
3119 2003-04-15 Jason Merrill <jason@redhat.com>
3121 * decl2.c (mark_used): Don't instantiate anything if
3124 2003-04-14 Ziemowit Laski <zlaski@apple.com>
3126 * tree.c (build_cplus_array_type_1): Do not call
3127 uses_template_parms() on a NULL index_type.
3129 2003-04-13 Roger Sayle <roger@eyesopen.com>
3131 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3133 2003-04-12 Mark Mitchell <mark@codesourcery.com>
3136 * init.c (build_new_1): Reorganize.
3138 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3140 * class.c (initialize_array)
3141 * decl.c (reshape_init)
3142 * decl2.c (build_expr_from_tree)
3143 * init.c (build_zero_init)
3144 * pt.c (tsubst_copy, tsubst_copy_and_build)
3145 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3146 (ptm_initializer, class_initializer, get_pseudo_ti_init)
3147 * semantics.c (finish_compound_literal)
3148 * typeck.c (build_ptrmemfunc1)
3149 * typeck2.c (store_init_value, process_init_constructor)
3150 (build_functional_cast): Use build_constructor.
3152 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3154 * call.c (print_z_candidates): Use gcc_gettext_width, not
3155 strlen, to determine how much padding to use.
3157 2003-04-10 Zack Weinberg <zack@codesourcery.com>
3159 * decl.c: Update all calls to shadow_warning.
3161 2003-04-10 Mark Mitchell <mark@codesourcery.com>
3163 * class.c (layout_class_type): Correct handling for overlong
3164 bit-fields whose width is the same as an integer type.
3166 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3168 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3169 * cp-lang.c (cp_tree_size): New function.
3170 (LANG_HOOKS_TREE_SIZE): Override.
3172 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3173 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3174 (union lang_tree_node): Remove common and srcloc members.
3175 (build_srcloc_here): Don't prototype.
3176 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3177 * pt.c (pending_templates): Correct comment.
3178 * tree.c (build_srcloc, build_srcloc_here): Kill.
3180 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3182 * call.c: Include intl.h.
3183 (print_z_candidate): Always use inform; get rid of errfn
3184 argument. Reorganize so that all the strings get picked up
3185 by xgettext. Note obligation of caller to pass first argument
3187 (print_z_candidates): Update to match. Indent second and
3188 successive candidates by strlen() of translated message.
3189 (joust): Restructure ambiguous-conversion pedwarn so that
3190 translators see a complete sentence. Update calls to
3193 * Make-lang.in (cp/call.o): Update dependencies.
3195 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3197 * decl.c (set_current_binding_level): Delete, revert last change.
3198 (current_binding_level): Modify to allow it as as lvalue.
3200 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3202 * name-lookup.c (find_binding): Pass appropriate pointer type to
3203 POP_TIMEVAR_AND_RETURN.
3205 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3207 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3208 * cp-tree.h: Don't insist on having GNUC.
3210 2003-04-03 Jason Merrill <jason@redhat.com>
3212 * cvt.c (ocp_convert): Only abort if we try to convert an object
3213 of TREE_ADDRESSABLE type.
3215 * class.c (build_vtable): Set DECL_ALIGN here.
3216 (get_vtable_decl): Not here.
3217 (layout_vtable_decl): Or here.
3218 (create_vtable_ptr): Or here.
3219 (layout_class_type): Or here.
3220 (check_bitfield_decl): Don't mess with field alignment.
3222 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3224 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3225 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3226 * rtti.c (dfs_class_hint_mark): Likewise.
3228 * decl.c (push_local_name, push_class_level_binding,
3229 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3230 functions returning void.
3231 * decl2.c (add_using_namespace): Likewise.
3233 * decl.c (print_binding_level, print_other_binding_stack,
3234 print_binding_stack): Cast argument of %p specifier to void*.
3235 * ptree.c (cxx_print_decl): Likewise.
3237 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3238 VAR_FUNCTION_OR_PARM_DECL_CHECK,
3239 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3240 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3241 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3243 * decl.c (set_current_binding_level): New macro. Use throughout
3244 when setting the current binding level.
3246 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3248 * method.c (mangling_flags): Likewise.
3250 * cp-tree.h (lang_type_header): Add __extension__ and use
3251 CHAR_BITFIELD for members.
3253 2003-04-02 Geoffrey Keating <geoffk@apple.com>
3256 * mangle.c: Include gt-cp-mangle.h.
3257 (subst_identifiers): Mark with GTY.
3258 * config-lang.in (gtfiles): Add cp/mangle.c.
3259 * Make-lang.in: (gt-cp-mangle.h): New rule.
3260 (cp/mangle.o): Depends on gt-cp-mangle.h.
3262 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
3264 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3265 after \$(srcdir)/cp/name-lookup.h.
3266 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3267 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
3268 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3269 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3271 2003-03-31 Jason Merrill <jason@redhat.com>
3274 * class.c (check_field_decl): Don't set DECL_ALIGN.
3276 2003-03-30 Mark Mitchell <mark@codesourcery.com>
3279 * decl.c (grokdeclarator): Tidy, slightly.
3280 * search.c (lookup_field_1): Add want_type parameter.
3281 (lookup_field_r): Adjust call to lookup_field_1.
3283 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3285 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3287 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3289 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
3291 (cxx_scope_find_binding_for_name): Likewise.
3292 * decl.c (find_binding: Move to name-lookup.c.
3293 (binding_for_name): Likewise.
3294 (cxx_scope_find_binding_for_name): Likewise.
3295 (BINDING_LEVEL): Remove.
3296 (push_binding): Tidy.
3297 (push_class_binding): Likewise.
3298 (pop_binding): Likewise.
3299 (poplevel): Likewise.
3300 (poplevel_class): Likewise.
3301 (set_identifier_type_value_with_scope): Likewise.
3302 (push_overloaded_decl): Likewise.
3303 (lookup_tag): Likewise.
3304 (unqualified_namespace_lookup): Likewise.
3305 (lookup_name_current_level): Likewise.
3306 (maybe_inject_for_scope_var): Likewise.
3307 (namespace_binding): Move to name-lookup.c.
3308 (set_namespace_binding): Likewise.
3309 * decl2.c (lookup_using_namespace): Tidy.
3310 (qualified_lookup_using_namespace): Likewise.
3311 (do_toplevel_using_decl): Likewise.
3312 * name-lookup.c: Include "timevar.h"
3313 * name-lookup.h (cxx_scope): Declare.
3314 (struct cxx_binding): Lose member "has_level". Adjust "scope"
3316 (BINDING_SCOPE): Adjust definition.
3317 (BINDING_HAS_LEVEL_P): Remove.
3319 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3321 * name-lookup.c: New file.
3322 * name-lookup.h: Likewise..
3323 * decl.c (push_binding): Adjust use cxx_binding_make.
3324 (free_bindings): Move to name-lookup.c
3325 (pop_binding): Use cxx_binding_free.
3326 (binding_for_name): Tidy.
3327 * cp-tree.h: Include "name-lookup.h"
3328 (cxx_binding_make): Move to name-lookup.h
3329 (cxx_binding_clear): Likewise.
3330 (struct cxx_binding): Likewise.
3331 (LOCAL_BINDING_P): Likewise.
3332 (INHERITED_VALUE_BINDING_P): Likewise.
3333 (BINDING_SCOPE): Likewise.
3334 (BINDING_HAS_LEVEL_P): Likewise.
3335 (BINDING_VALUE): Likewise.
3336 (BINDING_TYPE): Likewise.
3337 * config-lang.in (gtfiles): Add cp/name-lookup.h
3338 * Make-lang.in (cp/name-lookup.o): New rule.
3339 (CXX_OBJS): Add cp/name-lookup.o
3340 (CXX_TREE_H): Add cp/name-lookup.h
3342 2003-03-28 Jason Merrill <jason@redhat.com>
3345 * cvt.c (force_rvalue): New fn.
3346 * call.c (build_conditional_expr): Use it.
3347 * cp-tree.h: Declare it.
3349 2003-03-28 Mike Stump <mrs@apple.com>
3351 * error.c (dump_expr): Add 0x to printed hex numbers to make
3352 output match source code better.
3354 2003-03-28 Mark Mitchell <mark@codesourcery.com>
3357 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3360 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3361 non-existant ssdf_decls array.
3362 (finish_file): Call generator_ctor_or_dtor_function when there are
3363 static constructors or destructors and no other static
3366 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
3369 * decl2.c (finish_file): Don't warn about explicitly instantiated
3372 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3375 * pt.c (lookup_template_class): Only check instantiated args if
3376 they do not contain template parameters.
3378 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3381 * parser.c (cp_parser_function_definition): Set
3382 DECL_INITIALIZED_IN_CLASS for members.
3383 * pt.c (instantiate_decl): Only reduce the template args for
3384 friends that are not defined in class.
3386 2003-03-25 Jason Merrill <jason@redhat.com>
3388 * call.c (print_z_candidate): Change name of first arg to msgid.
3389 (joust): Add comment for translators.
3391 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3393 PR c++/9898, PR c++/383, DR 322
3394 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3395 through reference types on both PARM and ARG.
3397 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3400 * error.c (dump_expr) <BASELINK>: Use dump_expr.
3401 * pt.c (maybe_fold_nontype_args): New function.
3402 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3403 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3404 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3405 maybe_fold_nontype_args.
3407 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3410 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3412 2003-03-23 Mark Mitchell <mark@codesourcery.com>
3415 * typeck.c (cxx_mark_addressable): Adjust call to
3416 gen_mem_addressof or put_var_into_stack.
3418 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
3420 PR c++/9978, c++/9708
3421 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3422 * call.c (add_template_candidate_real): Adjust
3423 instantiate_template call.
3424 * class.c (resolve_address_of_overloaded_function): Likewise.
3425 * decl.c (build_enumerator): Set TREE_CONSTANT.
3426 * pt.c (check_instantiated_args): New.
3427 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3429 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3430 (reduce_template_parm_level): Likewise.
3431 (process_template_parm): Likewise.
3432 (check_explicit_specialization): Adjust instantiate_template call.
3433 (convert_template_argument): Don't check non-type argument here.
3434 (lookup_template_class): Check them here.
3435 (tsubst_friend_function): Adjust instantiate_template call.
3436 (instantiate_template): Add tsubst_flags parameter, use it. Check
3439 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3441 * decl.c: Update calls to shadow_warning.
3443 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
3446 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3447 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3449 2003-03-20 Mark Mitchell <mark@codesourcery.com>
3451 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3453 * cp/pt.c (instantiate_class_template): Fix formatting.
3455 2003-03-14 Matt Austern <austern@apple.com>
3457 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3458 (unemitted_tinfo_decl_p): Remove.
3459 (emit_tinfo_decl): Change declaration to remove unused parameter.
3460 * decl2.c (finish_file): Change tinfo emission to loop through
3461 unemitted_tinfo_decls array instead of looping through all decls.
3462 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3463 unused second parameter.
3464 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3465 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3466 (emit_tinfo_decl): remove unused second parameter, add assertion
3467 that decl hasn't already been emitted.
3469 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3471 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3472 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3475 2003-03-19 Jason Merrill <jason@redhat.com>
3477 PR c++/8316, c++/9315, c++/10136
3478 * call.c (print_z_candidate): Split out from...
3479 (print_z_candidiates): ...here.
3482 2003-03-17 Roger Sayle <roger@eyesopen.com>
3485 * decl.c (duplicate_decls): Use the new type when prototyping
3486 anticipated decls, even when the types match. This defines the
3487 exception list for the built-in function.
3489 2003-03-17 Jason Merrill <jason@redhat.com>
3492 * typeck.c (build_class_member_access_expr): Compare
3495 2003-03-17 Mark Mitchell <mark@codesourcery.com>
3498 * parser.c (cp_parser_declarator_id): Clear parser->scope.
3500 2003-03-16 Jason Merrill <jason@redhat.com>
3503 * decl.c (finish_function): Only allow the NRVO to use variables
3504 declared at function scope.
3506 2003-03-17 Andreas Jaeger <aj@suse.de>
3508 * Make-lang.in (cp/TAGS): Remove.
3510 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
3513 * cp-tree.h (struct language_function): Add in_base_initializer.
3514 (in_base_initializer): define it.
3515 (expand_member_init): Remove INIT param.
3516 * init.c (expand_member_init): Remove INIT param, return the member.
3517 (emit_mem_initializers): Set in_base_initializer.
3518 * class.c (build_base_path): Check in_base_initializer.
3519 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3520 * pt.c (tsubst_initializer_list): Likewise.
3522 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
3524 * decl.c (binding_for_name): Fix initialization thinko.
3526 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3528 Compile-time improvement: 2/n.
3529 * cp-tree.h (struct cxx_binding): New datatype;
3530 (struct lang_identifier): Use it.
3531 (LOCAL_BINDING_P): Adjust definition.
3532 (INHERITED_VALUE_BINDING_P): Likewise.
3533 (BINDING_SCOPE): Likewise.
3534 (BINDING_HAS_LEVEL_P): Likewise.
3535 (BINDING_VALUE): Likewise.
3536 (BINDING_TYPE): Likewise.
3537 (IDENTIFIER_VALUE): Likewise.
3538 (struct tree_binding): Remove.
3539 (TS_CP_BINDING): Likewise.
3540 ((union lang_tree_node): Remove field "binding".
3541 (cxx_binding_clear): New macro.
3542 (binding_for_name): Adjust return type.
3543 (qualified_lookup_using_namespace): Adjust prototype.
3544 (lookup_using_namespace): Adjust prototype.
3545 (cxx_scope_find_binding_for_name): Declare.
3546 * cp-tree.def: Remove CPLUS_BINDING definition.
3547 * decl.c (push_binding): Adjust local variable type.
3548 (add_binding): Likewise.
3549 (push_class_binding): Likewise.
3550 (pop_binding): Likewise.
3551 (poplevel): Likewise.
3552 (poplevel_class): Likewise.
3553 (free_bindings): Adjust type.
3554 (find_binding): Adjust return type, add a third parameter. Remove
3555 non-useful assertion now that we use static typing.
3556 (cxx_scope_find_binding_for_name): New function.
3557 (binding_for_name): Use it. Adjust local variable type. Simplify.
3558 (namespace_binding): Simplify.
3559 (set_namespace_binding): Likewise.
3560 (set_identifier_type_value_with_scope): Adjust local variable type.
3561 (lookup_tag): Don't type-abuse of local variable 'old'.
3562 (lookup_namespace_name): Likewise. Allocate binding on stack.
3563 (select_decl): Adjust prototype.
3564 (unqualified_namespace_lookup): Allocate binding on stack.
3565 Don't type-abuse of local variable 'val'.
3566 (lookup_name_real): Likewise.
3567 (maybe_inject_for_scope_var): Adjust local variable type.
3568 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3569 (namespace_binding): Adjust logic, simplify.
3570 (BINDING_LEVEL): Adjust definition.
3571 (push_class_level_binding): Adjust local variable type.
3572 (struct cxx_saved_binding): Adjust field 'binding' type.
3573 * decl2.c (ambiguous_decl): Adjust prototype.
3574 (lookup_using_namespace): Adjust local variable type.
3575 (qualified_lookup_using_namespace): Catch type error and correct
3576 ensueing logic error.
3577 (do_nonmember_using_decl): Adjust local variable type. Allocate
3578 temporary cxx_binding on stack.
3579 (do_toplevel_using_decl): Adjust local variable type.
3580 * ptree.c (cxx_print_cxx_binding): New function.
3581 (cxx_print_identifier): Use it.
3582 (cxx_print_xnode): Delete CPLUS_BINDING case label.
3584 2003-03-15 Roger Sayle <roger@eyesopen.com>
3586 * tree.c (count_functions): Fix whitespace.
3588 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
3590 * Make-lang.in: Update.
3592 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3595 * pt.c (maybe_process_partial_specialization): Handle
3596 member class template when enclosing class template is
3597 explicit specialized.
3598 (most_general_template): Stop looking when DECL is already
3601 2003-03-13 Jason Merrill <jason@redhat.com>
3604 * search.c (lookup_conversions): Call complete_type here.
3605 * call.c (implicit_conversion): Not here.
3607 2003-03-13 Mark Mitchell <mark@codesourcery.com>
3609 * decl2.c (do_nonmember_using_decl): Correct handling of
3610 simultaneous type/non-type bindings.
3612 * call.c (initialize_reference): Remove bogus assertion.
3613 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3615 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
3618 * expr.c (cxx_expand_expr): Return const0_rtx for throw
3621 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3624 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3625 to merge old and new declarations.
3627 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3630 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3631 (cp/g++.1): Build it from scratch in the build tree.
3632 (c++.install-man): Depend on it. Install it from the build tree.
3633 (c++.mostlyclean): Clean it.
3635 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3638 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3639 to merge old and new declarations.
3642 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3644 2003-03-11 Jason Merrill <jason@redhat.com>
3647 * search.c (lookup_member): Fix handling of functions in a class
3650 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3653 * call.c (convert_class_to_reference): Adjust usage of
3655 (any_viable): Remove.
3656 (splice_viable): Combine with any_viable.
3657 (print_z_candidates): Avoid printing duplicates.
3658 (build_user_type_conversion_1): Adjust usage of splice_viable.
3659 (build_new_function_call): Likewise.
3660 (build_operator_new_call): Likewise.
3661 (build_object_call): Likewise.
3662 (build_conditional_expr): Likewise.
3663 (build_new_op): Likewise.
3664 (build_new_method_call): Likewise.
3665 (joust): Remove spurious comment.
3666 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3667 * decl2.c (arg_assoc_class): Simplify.
3668 * friend.c (add_friend): Likewise.
3670 2003-03-11 Jason Merrill <jason@redhat.com>
3673 * decl2.c (check_classfn): A member template only matches a
3676 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
3678 * Make-lang.in (CXX_C_OBJS): Update.
3679 * lang-specs.h: Don't define __GNUG__ here.
3681 2003-03-10 Mark Mitchell <mark@codesourcery.com>
3683 * call.c (perform_overload_resolution): New function.
3684 (build_new_function_call): Use it.
3685 (build_operator_new_call): Likewise.
3686 (add_candidates): Add explicit_targs and template_only parameters.
3687 (build_new_op): Adjust accordingly.
3688 * cp-tree.h (build_operator_new_call): New function.
3689 (build_function_call_real): Remove.
3690 (build_function_call_maybe): Likewise.
3691 * init.c (build_new_1): Use build_operator_new_call.
3692 * typeck.c (build_function_call_real): Rename to ...
3693 (build_function_call): ... this.
3695 2003-03-10 Devang Patel <dpatel@apple.com>
3698 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3700 2003-03-10 Jason Merrill <jason@redhat.com>
3703 * decl.c (push_using_directive): Push before recursing.
3705 PR c++/9868, c++/9524
3706 * call.c (resolve_scoped_fn_name): Handle the case of a function
3709 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3710 argument in the pointer-to-member case.
3712 2003-03-09 Mark Mitchell <mark@codesourcery.com>
3715 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3716 pointers to member functions.
3719 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3720 in pointer-to-member-function types.
3722 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3724 * expr.c (cplus_expand_constant): Use C90 prototype style.
3725 (cxx_expand_expr): Likewise.
3727 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3730 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3733 2003-03-08 Geoffrey Keating <geoffk@apple.com>
3735 * lang-specs.h (c++-header): Change .pch to .gch.
3737 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3739 * cp-tree.h (cxx_init): Update prototype.
3740 * lex.c (cxx_init): Similarly.
3742 2003-03-08 Mark Mitchell <mark@codesourcery.com>
3745 * cp-tree.h (begin_mem_initializers): Remove.
3746 * parser.c (cp_parser_mem_initializer_list): Inline it here.
3747 Do not call finish_mem_initializers if not in a constructor.
3748 (cp_parser_class_head): Fix typo in error message.
3749 * semantics.c (begin_mem_initializers): Remove.
3750 * testsuite/g++.dg/parser/constructor1.C: New test.
3753 * call.c (add_function_candidate): Skip builtin fuctions that have
3754 not yet been declared.
3757 * init.c (build_new_1): Correct logic for determining whether or
3758 not to use an array cookie.
3761 * parser.c (cp_parser_postfix_expression): Call
3762 finish_non_static_data_member, even when processing_template_decl.
3765 * cp-tree.h (is_ancestor): New function.
3766 (handle_class_head): Change prototype.
3767 * decl2.c (is_namespace_ancestor): Rename to ...
3768 (namespace_anecestor): ... this.
3769 (set_decl_namespace): Adjust accordingly.
3770 (handle_class_head): Remove unncessary parameters.
3771 * parser.c (cp_parser_class_head): Check that
3772 nested-name-specifiers are used appropriately.
3774 2003-03-07 Mark Mitchell <mark@codesourcery.com>
3776 * call.c (reference_binding): Remove REF_IS_VAR parameter.
3777 (implicit_conversion): Adjust call to reference_binding.
3778 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3779 (initialize_reference): Adjust handling for references bound to
3781 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3783 (real_non_cast_lvalue_p): New method.
3784 * cvt.c (build_up_reference): Adjust use of
3785 make_temporary_var_for_ref_to_temp.
3786 * tree.c (real_non_cast_lvalue_p): New method.
3788 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3790 * except.c (init_exception_processing): Use C90 prototype style.
3791 (cp_protect_cleanup_actions): Likewise.
3792 (prepare_eh_type): Likewise.
3793 (build_eh_type_type): Likewise.
3794 (build_exc_ptr): Likewise.
3795 (do_begin_catch): Likewise.
3796 (dtor_nothrow): Likewise.
3797 (do_end_catch): Likewise.
3798 (push_eh_cleanup): Likewise.
3799 (decl_is_java_type): Likewise.
3800 (choose_personality_routine): Likewise.
3801 (initialize_handler_parm): Likewise.
3802 (expand_start_catch_block): Likewise.
3803 (expand_end_catch_block): Likewise.
3804 (begin_eh_spec_block): Likewise.
3805 (finish_eh_spec_block): Likewise.
3806 (do_allocate_exception): Likewise.
3807 (do_free_exception): Likewise.
3808 (wrap_cleanups_r): Likewise.
3809 (stabilize_throw_expr): Likewise.
3810 (build_throw): Likewise.
3811 (complete_ptr_ref_or_void_ptr_p): Likewise.
3812 (is_admissible_throw_operand): Likewise.
3813 (nothrow_libfn_p): Likewise.
3814 (can_convert_eh): Likewise.
3815 (check_handlers_1): Likewise.
3816 (check_handlers): Likewise.
3818 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3820 * call.c (merge_conversion_sequences): New function.
3821 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3822 (convert_class_to_reference): Correct handling of second
3823 standard conversion sequence in a user-defined conversion
3825 (build_user_type_conversion_1): Use merge_conversion_sequences.
3826 * cp-tree.def: Add comments for CONV nodes.
3827 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3829 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3831 * error.c (init_error): Use C90 prototype style.
3832 (dump_scope): Likewise.
3833 (dump_qualifiers): Likewise.
3834 (dump_template_argument): Likewise.
3835 (dump_template_argument_list): Likewise.
3836 (dump_template_parameter): Likewise.
3837 (dump_template_bindings): Likewise.
3838 (dump_type): Likewise.
3839 (dump_typename): Likewise.
3840 (class_key_or_enum): Likewise.
3841 (dump_aggr_type): Likewise.
3842 (dump_type_prefix): Likewise.
3843 (dump_type_suffix): Likewise.
3844 (dump_global_iord): Likewise.
3845 (dump_simple_decl): Likewise.
3846 (dump_decl): Likewise.
3847 (dump_template_decl): Likewise.
3848 (dump_function_decl): Likewise.
3849 (dump_parameters): Likewise.
3850 (dump_exception_spec): Likewise.
3851 (dump_function_name): Likewise.
3852 (dump_template_parms): Likewise.
3853 (dump_char): Likewise.
3854 (dump_expr_list): Likewise.
3855 (dump_expr): Likewise.
3856 (dump_binary_op): Likewise.
3857 (dump_unary_op): Likewise.
3858 (type_as_string): Likewise.
3859 (expr_as_string): Likewise.
3860 (decl_as_string): Likewise.
3861 (context_as_string): Likewise.
3862 (lang_decl_name): Likewise.
3863 (cp_file_of): Likewise.
3864 (cp_line_of): Likewise.
3865 (decl_to_string): Likewise.
3866 (expr_to_string): Likewise.
3867 (fndecl_to_string): Likewise.
3868 (code_to_string): Likewise.
3869 (language_to_string): Likewise.
3870 (parm_to_string): Likewise.
3871 (op_to_string): Likewise.
3872 (type_to_string): Likewise.
3873 (assop_to_string): Likewise.
3874 (args_to_string): Likewise.
3875 (cv_to_string): Likewise.
3876 (cxx_print_error_function): Likewise.
3877 (cp_diagnostic_starter): Likewise.
3878 (cp_diagnostic_finalizer): Likewise.
3879 (cp_print_error_function): Likewise.
3880 (function_category): Likewise.
3881 (print_instantiation_full_context): Likewise.
3882 (print_instantiation_partial_context): Likewise.
3883 (maybe_print_instantiation_context): Likewise.
3884 (print_instantiation_context): Likewise.
3885 (cp_printer): Likewise.
3886 (print_integer): Likewise.
3887 (print_non_consecutive_character): Likewise.
3888 (locate_error): Likewise.
3890 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3893 * call.c (reference_binding): Add ref_is_var parameter.
3894 (implicit_conversion): Adjust call to reference_binding.
3895 (initialize_reference): Likewise.
3898 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3902 * class.c (get_basefndecls): Use lookup_fnfields_1.
3904 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3907 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3909 (cp_parser_single_declaration): Likewise.
3911 2003-03-05 Jason Merrill <jason@redhat.com>
3914 * call.c (build_conditional_expr): Use convert rather than an
3917 2003-03-02 Matt Austern <austern@apple.com>
3919 * decl.c (cp_binding_level): Add static_decls varray member.
3920 (add_decl_to_level): Add static/inline namespace scope
3921 declarations to static_decls array.
3922 (wrapup_global_for_namespace): Pass static_decls only, instead of
3923 all decls, to wrapup_global_declarations/check_global_declarations.
3924 (push_namespace): Initialize static_decls for ordinary namespaces.
3925 (cxx_init_decl_processing): Initialize static_decls for global
3928 2003-03-05 Mark Mitchell <mark@codesourcery.com>
3930 * class.c (end_of_class): Correct thinko.
3932 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
3934 * config-lang.in: Replace ${libstdcxx_version} by its value.
3936 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3938 * cp-tree.h (cxx_saved_binding): Declare.
3939 (struct saved_scope): Adjust type of field 'old_binding'.
3940 * decl.c (cxx_saved_binding_make): New macro.
3941 (struct cxx_saved_binding): Define.
3942 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
3944 (maybe_push_to_top_level): Adjust local variable type.
3945 (pop_from_top_level): Likewise.
3947 2003-03-04 Tom Tromey <tromey@redhat.com>
3949 * Make-lang.in (c++.tags): New target.
3951 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
3953 * Make-lang.in: Update.
3955 2003-03-03 Jason Merrill <jason@redhat.com>
3957 * decl.c (finish_enum): Do set the type in a template. Simplify.
3958 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3960 2003-03-03 Mark Mitchell <mark@codesourcery.com>
3963 * call.c (convert_class_to_reference): Correct conversion
3965 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3966 (implicit_conversion): Adjust call to reference_binding.
3967 (add_candidate): Change type of candidates parameter.
3968 (add_function_candidate): Likewise.
3969 (add_conv_candidate): Likewise.
3970 (build_builtin_candidate): Likewise.
3971 (add_builtin_candidate): Likewise.
3972 (add_builtin_candidates): Likewise.
3973 (add_template_candidate_real): Likewise.
3974 (add_template_candidate): Likewise.
3975 (add_template_conv_candidate): Likewise.
3976 (build_user_type_conversion_1): Adjust accordingly.
3977 (build_object_call): Likewise.
3978 (build_conditional_expr): Likewise.
3979 (add_candidates): Likewise.
3980 (build_new_op): Likewise.
3981 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
3982 (build_new_method_call): Adjust calls to add_function_candidate.
3983 (make_temporary_var_for_ref_to_temp): New function.
3984 (initialize_reference): Add decl parameter.
3985 * class.c (build_rtti_vtbl_entries): Use build_address and
3987 * cp-tree.h (initialize_reference): Change prototype.
3988 (make_temporary_var_for_ref_to_temp): New function.
3989 (build_type_conversion): Change prototype.
3990 (build_address): New function.
3991 (build_nop): Likewise.
3992 * cvt.c (cp_convert_to_pointer): Adjust call to
3993 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
3995 (convert_to_pointer_force): Use build_nop.
3996 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3997 (convert_to_reference): Adjust call to build_type_conversion.
3998 (ocp_convert): Likewise.
3999 (build_type_conversion): Remove for_sure parameter.
4000 * decl.c (grok_reference_init): Use initialize_reference.
4001 * typeck.c (build_address): New function.
4002 (build_nop): Likewise.
4003 (build_unary_op): Use them.
4004 (build_ptrmemfunc): Tidy slightly.
4005 (convert_for_initialization): Adjust call to
4006 initialize_reference.
4007 * typeck2.c (store_init_value): Remove #if 0'd code.
4009 2003-03-03 Jason Merrill <jason@redhat.com>
4011 * decl.c (start_function): Clear DECL_NUM_STMTS.
4013 * class.c (get_vtable_decl): Use vtbl_type_node.
4014 (build_primary_vtable): Check for it.
4016 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
4018 * decl.c (check_initializer): Check for vector_opaque_p.
4020 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
4022 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4023 invoke an external cpp during compilation.
4025 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4027 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4029 (start_decl): Likewise.
4030 (start_function): Likewise.
4032 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
4034 * Make-lang.in (CXX_C_OBJS): Update.
4036 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4039 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4042 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
4044 * parser.c (cp_parser_init_declarator): Revert opaque
4045 vector_opaque_p change.
4046 Do not include target.h.
4048 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4051 * cp-tree.h (build_zero_init): Add parameter.
4052 * decl.c (cp_finish_decl): Adjust call.
4053 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
4055 (build_default_init): Add nelts parameter. Adjust calls to
4057 (build_new_1): Adjust call to build_default_init.
4058 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4060 2003-02-26 Devang Patel <dpatel@apple.com>
4062 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4063 required. Postpone enum setting for template decls.
4064 (build_enumerator): Delay copying value node until finish_enum
4065 (). Remove #if 0'ed code.
4066 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4067 (tsubst_copy): Add check for enum type.
4069 2003-02-25 Mark Mitchell <mark@codesourcery.com>
4072 * decl2.c (prune_vars_needing_no_initialization): Do not throw
4073 away initializations for DECL_EXTERNAL VAR_DECLs.
4074 (finish_file): Adjust accordingly.
4075 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4077 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4079 * decl.c (add_binding): Time TV_NAME_LOOKUP.
4080 (push_class_binding): Likewise.
4081 (set_namespace_binding): Likewise.
4083 2003-02-24 Mark Mitchell <mark@codesourcery.com>
4086 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4087 specializations back to the main template.
4088 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4089 * pt.c (resolve_typename_type): Likewise.
4091 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
4094 * pt.c (tsubst_copy_and_build): For a templated function inside a
4095 scope, process template arguments.
4097 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4100 * typeck2.c (abstract_virtuals_error): Don't check when
4101 TYPE is still template parameter dependent.
4103 2003-02-23 Mark Mitchell <mark@codesourcery.com>
4106 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4107 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4108 * pt.c (instantiate_class_template): Don't try to instantiate
4110 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4112 2003-02-21 Mark Mitchell <mark@codesourcery.com>
4115 * decl.c (grokdeclarator): Do not allow parameters with variably
4118 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
4120 * search.c (grow_bfs_bases): Remove. Fold into ...
4121 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4124 2003-02-20 Mark Mitchell <mark@codesourcery.com>
4127 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4128 when the G++ 3.2 ABI prevents correct compilation.
4130 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
4132 Change base class access representation. Share virtual base
4134 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4136 * cp/class.c (build_base_path): Likewise.
4137 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4138 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4139 (make_new_vtable): Adjust.
4140 (force_canonical_binfo_r): Delete.
4141 (force_canonical_binfo): Delete.
4142 (mark_primary_virtual_base): Delete.
4143 (dfs_unshared_virtual_bases): Delete.
4144 (mark_primary_bases): Adjust.
4145 (maybe_warn_about_overly_private_class): Adjust.
4146 (dfs_base_derived_from): Delete.
4147 (base_derived_from): Follow the inheritance chain.
4148 (struct find_final_overrider_data): Add vpath member.
4149 (dfs_find_final_overrider): Adjust.
4150 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4151 (find_final_overrider): Adjust.
4152 (update_vtable_entry_for_fn): Adjust.
4153 (modify_all_vtables): Adjust.
4154 (walk_subobject_offsets): Adjust.
4155 (layout_nonempty_base_or_field): Adjust.
4156 (layout_empty_base): Remove last parameter. Adjust.
4157 (build_base_field): Adjust.
4158 (build_base_fields): Adjust.
4159 (propagate_binfo_offsets): Remove last parameter. Adjust.
4160 (dfs_set_offset_for_unshared_vbases): Delete.
4161 (layout_virtual_bases): Adjust.
4162 (finish_struct_1): Adjust.
4163 (init_class_processing): Don't init access nodes.
4164 (dfs_get_primary_binfo): Delete.
4165 (get_primary_binfo): Adjust.
4166 (dump_class_hierarchy_r): Remove most derived arg, add IGO
4168 (dump_class_hierarchy): Adjust.
4169 (finish_vtbls): Adjust.
4170 (get_original_base): Delete.
4171 (build_vtt_inits): Adjust.
4172 (dfs_build_secondary_vptr_vtt_inits): Adjust.
4173 (dfs_ctor_vtable_bases_queue_p): Adjust.
4174 (build_ctor_vtbl_group): Adjust.
4175 (dfs_accumulate_vtbl_inits): Adjust.
4176 (build_vtbl_initializer): Adjust.
4177 (build_vbase_offset_vtbl_entries): Adjust.
4178 (add_vcall_offset_vtbl_entries_1): Adjust.
4179 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4180 (access_*_node): Remove.
4181 (CANONICAL_BINFO): Delete.
4182 (BINFO_UNSHARED_MARKED): Remove.
4183 (BINFO_MARKED): Set LANG_FLAG_0 directly.
4184 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4185 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4186 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4188 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4189 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4190 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4192 (BINFO_DEPENDENT_BASE_P): New.
4193 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4195 (markedp, unmarkedp): Adjust.
4196 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4197 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4198 find_vbase_instance, binfo_for_vbase): Delete.
4199 (copied_binfo, original_binfo): Declare.
4200 (finish_base_specifier): Add virtual_p arg.
4201 (unshare_base_binfos): Delete.
4202 (copy_base_binfos): Declare.
4203 (reverse_path): Delete.
4204 * cp/decl.c (xref_basetypes): Access and virtuality passed
4205 differently. Don't copy direct base binfos here. Call
4207 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4208 (initialize_vtbl_ptrs): Adjust.
4209 (expand_member_init): Adjust.
4210 * cp/parser.c (cp_parser_base_specifier): Adjust.
4211 * cp/pt.c (instantiate_class_template): Adjust.
4212 (get_template_base_recursive): Adjust.
4213 * cp/rtti.c (get_pseudo_ti_init): Adjust.
4214 (get_pseudo_ti_desc): Adjust.
4215 * cp/tree.c (unshare_base_binfos): Rename to ...
4216 (copy_base_binfos): ... here, reimplement.
4217 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4218 (reverse_path): Remove.
4219 * cp/typeck.c (get_delta_difference): Adjust error messages.
4220 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4221 * cp/search.c (lookup_base_r): Adjust.
4222 (dynamic_cast_base_recurse): Adjust.
4223 (canonical_binfo): Remove.
4224 (dfs_canonical_queue): Remove.
4225 (dfs_assert_unmarked_p): Remove.
4226 (assert_canonical_unmarked): Remove.
4227 (shared_marked_p, shared_unmarked_p): Remove.
4228 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4229 (dfs_access_in_type): Adjust.
4230 (access_in_type): Adjust.
4231 (dfs_accessible_queue_p): Adjust.
4232 (dfs_accessible_p): Adjust.
4233 (is_subobject_of_p_1, is_subobject_of_p): Remove.
4234 (struct lookup_field_info): Remove from_dep_base_p field.
4235 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4236 (lookup_field_r): Remove dependent base code.
4237 (lookup_member): Likewise.
4238 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4239 (dfs_unmarked_real_bases_queue_p): Remove.
4240 (dfs_marked_real_bases_queue_p): Remove.
4241 (dfs_skip_vbases): Remove.
4242 (dfs_get_pure_virtuals): Adjust.
4243 (markedp, unmarkedp): Adjust.
4244 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4245 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4246 (dfs_unmark): Adjust.
4247 (dfs_get_vbase_types):Remove.
4248 (dfs_build_inheritance_graph_order): Remove.
4249 (get_vbase_types): Remove
4250 (dfs_find_vbase_instance): Remove.
4251 (find_vbase_instance): Remove.
4252 (dfs_debug_unmarkedp): Adjust.
4253 (dependent_base_p): Remove.
4254 (dfs_push_type_decls): Adjust.
4255 (dfs_push_decls): Adjust.
4256 (dfs_no_overlap_yet): Adjust.
4257 (copied_binfo): New function.
4258 (original_binfo): New function.
4259 (binfo_for_vbase): Remove.
4261 2003-02-18 Zack Weinberg <zack@codesourcery.com>
4263 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4264 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4267 2003-02-18 Mark Mitchell <mark@codesourcery.com>
4270 * class.c (layout_class_type): In the 3.2 ABI, take into account
4271 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4273 2003-02-18 Matt Austern <austern@apple.com>
4275 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4277 * cp/decl.c (wrapup_globals_for_namespace): Remove special
4278 handling of global namespace.
4280 2003-02-18 Geoffrey Keating <geoffk@apple.com>
4282 * cp-tree.h (rid_to_yy): Delete.
4283 (C_RID_YYCODE): Delete.
4284 (finish_file): Delete redundant declaration.
4286 2003-02-18 Jason Merrill <jason@redhat.com>
4289 * decl.c (reshape_init): Don't mess with initializer labels.
4292 * parser.c (cp_parser_postfix_expression): Set idk properly for
4293 object->scope::member.
4295 2003-02-18 Ben Elliston <bje@redhat.com>
4298 * decl.c (duplicate_decls): Fix typo in comment.
4300 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
4303 * class.c (build_base_field): Mark fields for base classes with
4306 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4309 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4310 CONSTRUCTOR_ELTS only once.
4312 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4315 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4316 (dump_type_suffix): Likewise.
4318 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
4320 * search.c: ANSIfy function declarations and definitions.
4321 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4322 * call.c (build_method_call, resolve_scoped_fn_name,
4323 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4325 * class.c (handle_using_decl): Likewise.
4326 * decl.c (make_typename_type, make_unmound_class_template,
4327 start_decl, compute_array_index_type): Likewise.
4328 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4329 * init.c (expand_member_init, build_member_call): Likewise.
4330 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4331 resolve_typename_type): Likewise.
4332 * typeck.c (lookup_destructor, finish_class_member_access_exprm
4333 build_prememfunc_access_expr): Likewise.
4335 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4337 * decl2.c: Include "timevar.h".
4338 (namespace_ancestor): Time name lookup.
4339 (add_using_namespace): Likewise.
4340 (lookup_using_namespace): Likewise.
4341 (qualified_lookup_using_namespace): Likewise.
4342 (decl_namespace): Likewise.
4343 (lookup_arg_dependent): Likewise.
4344 * lex.c (do_identifier): Likewise.
4345 (do_scoped_id): Likewise.
4346 * pt.c (lookup_template_class): Likewise.
4348 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
4350 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4352 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4354 * decl.c: Include "timevar.h".
4355 (poplevel): Time name lookup.
4356 (find_binding): Likewise.
4357 (push_namespace): Likewise.
4358 (pop_nested_namespace): Likewise.
4359 (store_bindings): Likewise.
4360 (maybe_push_to_top_level): Likewise.
4361 (pop_from_top_level): Likewise.
4362 (push_local_name): Likewise.
4363 (pushtag): Likewise.
4364 (pushdecl): Likewise.
4365 (pushdecl_with_scope): Likewise.
4366 (pushdecl_namespace_level): Likewise.
4367 (pushdecl_top_level): Likewise.
4368 (pushdecl_class_level): Likewise.
4369 (push_class_level_binding): Likewise.
4370 (push_using_decl): Likewise.
4371 (push_using_directive): Likewise.
4372 (push_overloaded_decl): Likewise.
4373 (lookup_label): Likewise.
4374 (define_label): Likewise.
4375 (lookup_tag): Likewise.
4376 (lookup_tag_reverse): Likewise.
4377 (lookup_namespace_name): Likewise.
4378 (select_decl): Likewise.
4379 (unqualified_namespace_lookup): Likewise.
4380 (lookup_name_real): Likewise.
4381 (lookup_name_current_level): Likewise.
4382 (lookup_type_current_level): Likewise.
4383 (maybe_inject_for_scope_var): Likewise.
4384 (xref_tag): Likewise.
4386 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4388 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
4390 * decl.c (build_enumerator): Remove unneeded test.
4392 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
4394 * cp-tree.h (struct lang_type_header): Make all fields unsigned
4397 2003-02-03 Mark Mitchell <mark@codesourcery.com>
4400 * call.c (z_candidate): Add args.
4401 (convert_class_to_reference): Set it.
4402 (implicit_conversion): Tidy.
4403 (add_candidate): Add args parameter.
4404 (add_function_candidate): Adjust call to add_candidate.
4405 (add_conv_candidate): Likewise.
4406 (build_builtin_candidate): Likewise.
4407 (build_user_type_conversion_1): Eliminate wasteful tree_cons
4409 (build_new_function_call): Likewise.
4410 (build_object_call): Likewise.
4411 (add_candidates): New function.
4412 (build_new_op): Use it.
4413 (covert_like_real): Adjust call to build_over_call.
4414 (build_over_call): Remove args parameter.
4415 * operators.def: Add <?= and >?=.
4417 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
4419 * typeck.c (build_indirect_ref): Don't check flag_volatile.
4421 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4424 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4426 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
4428 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4429 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4430 (BINFO_LANG_ELTS): New #define.
4431 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4433 2003-01-30 Geoffrey Keating <geoffk@apple.com>
4435 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4437 2003-01-30 Mark Mitchell <mark@codesourcery.com>
4439 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4441 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4442 rather than TYPE_LANG_FLAG_0.
4443 (TYPE_BUILT_IN): Remove.
4444 (TYPE_DEPENDENT_P): New macro.
4445 (TYPE_DEPENDENT_P_VALID): Likewise.
4446 (lang_type_class): Add fields_readonly.
4447 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4448 * pt.c (dependent_type_p_r): New function, split out from ...
4449 (dependent_type_p): ... here. Memoize results.
4450 * search.c (dependent_base_p): Use dependent_type_p, not
4451 uses_template_parms.
4452 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4455 2003-01-29 Mark Mitchell <mark@codesourcery.com>
4457 * call.c (build_field_call): Use build_new_op, not build_opfncall.
4458 (prep_operand): New function.
4459 (build_new_op): Use it. Remove dead code.
4460 * class.c (pushclass): Change "modify" parameter type from int to
4462 (currently_open_class): Use same_type_p, not pointer equality.
4463 (push_nested_class): Adjust calls to pushclass, remove modify
4465 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4466 (pushclass): Change prototype.
4467 (push_nested_class): Likewise.
4468 (grokoptypename): Remove.
4469 (build_opfncall): Remove.
4470 (value_dependent_expression_p): Declare.
4471 (resolve_typename_type): Likewise.
4472 (resolve_typename_type_in_current_instantiation): Likewise.
4473 (enter_scope_of): Remove.
4475 (tsubst_expr): Likewise.
4476 (tsubst_copy): Likewise.
4477 (tsubst_copy_and_build): Likewise.
4478 * decl.c (warn_about_implicit_typename_lookup): Remove.
4479 (finish_case_label): Return error_mark_node for erroneous labels.
4480 (start_decl): Adjust calls to push_nested_class.
4481 (grokfndecl): Call push_scope/pop_scope around call to
4483 (grokdeclarator): Do not call tsubst.
4484 (start_function): Adjust calls to push_nested_class.
4485 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4486 (check_classfn): Use push_scope/pop_scope around type comparisions.
4487 (grokoptypename): Remove.
4488 (push_sscope): Adjust call to push_nested_class.
4489 * error.c (dump_type): Show cv-qualification of typename types.
4490 * init.c (build_member_call): Use build_new_op, not
4492 * method.c (build_opfncall): Remove.
4493 * parser.c (cp_parser): Add allow_non_constant_expression_p and
4494 non_constant_expression_p.
4495 (cp_parser_constant_expression): Adjust prototype.
4496 (cp_parser_resolve_typename_type): Remove.
4497 (cp_parser_non_constant_expression): New function.
4498 (cp_parser_non_constant_id_expression): Likewise.
4499 (cp_parser_new): Set allow_non_constant_expression_p and
4500 non_constant_expression_p.
4501 (cp_parser_primary_expression): Reject `this' and `va_arg' in
4502 constant-expressions. Note that dependent names aren't really
4504 (cp_parser_postfix_expression): Reject conversions to non-integral
4505 types in constant-expressions. Neither are increments or
4507 (cp_parser_unary_expression): Reject increments and decrements in
4508 constant-expressions.
4509 (cp_parser_direct_new_declarator): Adjust call to
4510 cp_parser_constant_expression.
4511 (cp_parser_cast_expression): Reject conversions to non-integral
4512 types in constant-expressions.
4513 (cp_parser_assignment_expression): Rejects assignments in
4514 constant-expressions.
4515 (cp_parser_expression): Reject commas in constant-expressions.
4516 (cp_parser_labeled_statement): Adjust call to
4517 cp_parser_constant_expression.
4518 (cp_parser_direct_declarator): Simplify array bounds, even in
4519 templates, when they are non-dependent. Use
4520 resolve_typename_type, not cp_parser_resolve_typename_type.
4521 (cp_parser_class_head): Use resolve_typename_type, not
4522 cp_parser_resolve_typename_type.
4523 (cp_parser_member_declaration): Adjust call to
4524 cp_parser_constant_expression.
4525 (cp_parser_constant_initializer): Likewise.
4526 (cp_parser_constructor_declarator): Use resolve_typename_type, not
4527 cp_parser_resolve_typename_type.
4528 (cp_parser_late_parsing_default_args): Adjust call to
4530 * pt.c (tsubst): Give it internal linkage.
4531 (tsubst_expr): Likewise.
4532 (tsubst_copy): Likewise.
4533 (tsubst_copy_and_build): Likewise.
4534 (push_access_scope_real): Likewise.
4535 (tsubst_friend_class): Likewise.
4536 (instantiate_class_template): Adjust call to pushclass.
4537 (value_dependent_expression_p): Give it external linkage.
4539 (resolve_typename_type): New function.
4540 * semantics.c (finish_call_expr): Use build_new_op, not
4542 (begin_constructor_declarator): Remove.
4543 (begin_class_definition): Adjust call to pushclass.
4544 (enter_scope_of): Remove.
4545 * typeck.c (comptypes): Resolve typename types as appropriate.
4546 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4547 (build_x_compound_expr): Likewise.
4548 (build_modify_expr): Likewise.
4549 (build_x_modify_expr): Likewise.
4550 * typeck2.c (build_x_arrow): Likewise.
4552 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
4554 * pt.c (last_pending_template) Declare GTY().
4556 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4559 * parser.c (cp_parser_elaborated_type_specifier): Convert
4560 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4561 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4563 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
4566 * pt.c (unify): Don't unify '*T' with 'U C::*'.
4569 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4570 inside a declarator.
4572 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
4574 * class.c (update_vtable_entry_for_fn): Add index parameter.
4575 Generate vcall thunk for covariant overriding from a virtual
4577 (dfs_modify_vtables): Adjust.
4579 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
4582 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4584 (cp_parser_base_specifier): Look for and consume a
4585 TEMPLATE keyword. Replace switch with array index.
4588 * semantics.c (finish_non_static_data_member): Remember the
4589 field's type even in a template.
4592 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4596 * parser.c (cp_parser_cast_expression): Be more tentative.
4598 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4600 * cp-tree.h (flagged_type_tree_s): Remove.
4601 (check_for_new_type): Likewise.
4602 * typeck2.c (check_for_new_type): Likewise.
4604 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
4606 * dump.c: ANSIfy function declarations and definitions.
4608 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
4610 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4613 * init.c (build_new): Set the type of the new-expression, even
4614 when processing_templte_decl.
4617 * parser.c (cp_parser_primary_expression): Improve error message
4618 for templates used in an expression context.
4621 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4622 parse when encountering "typedef".
4624 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
4626 * class.c, parser.c: ANSIfy function definitions and declarations.
4628 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4631 * error.c (dump_decl): For an OVERLOAD, just print the name of the
4632 function; it doesn't make sense to try to print its type.
4633 * semantics.c (finish_typeof): Issue errors about invalid uses.
4636 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4638 (cp_parser_expression_statement): Use it.
4639 (cp_parser_explicit_instantiation): Likewise.
4640 * pt.c (do_decl_instantiation): Improve error handling logic.
4642 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4645 * parser.c (cp_parser_using_declaration): Issue error messages
4646 about name resolution failures here.
4649 * class.c (currently_open_derived_class): Use dependent_type_p.
4650 * cp-tree.h (dependent_type_p): New function.
4651 (dependent_template_arg_p): Likewise.
4652 (dependent_template_p): Likewise.
4653 (type_dependent_expression_p): Likewise.
4654 * parser.c (cp_parser_dependent_type_p): Remove.
4655 (cp_parser_value_dependent_type_p): Likewise.
4656 (cp_parser_type_dependent_expression_p): Likewise.
4657 (cp_parser_dependent_template_arg_p): Likewise.
4658 (cp_parser_dependent_template_id_p): Likewise.
4659 (cp_parser_dependent_template_p): Likewise.
4660 (cp_parser_diagnose_invalid_type_name): Replace
4661 cp_parser_dependent_type_p with dependent_type_p, etc.
4662 (cp_parser_primary_expresion): Likewise.
4663 (cp_parser_nested_name_specifier_opt): Likewise.
4664 (cp_parser_postfix_expression): Likewise.
4665 (cp_parser_unary_expression): Likewise.
4666 (cp_parser_template_name): Likewise.
4667 (cp_parser_class_name): Likewise.
4668 (cp_parser_lookup_name): Likewise.
4669 * pt.c (dependent_type_p): New function.
4670 (value_dependent_expression_p): Likewise.
4671 (type_dependent_expression_p): Likewise.
4672 (dependent_template_arg_p): Likewise.
4673 (dependent_template_id_p): Likewise.
4674 (dependent_template_p): Likewise.
4678 * parser.c (cp_parser_simple_declaration): Return quickly when
4679 encountering errors.
4681 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4683 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4685 2003-01-17 Jason Merrill <jason@redhat.com>
4687 PR c++/9167, c++/9358
4688 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4690 2003-01-17 Jason Merrill <jason@redhat.com>
4693 * call.c (build_conditional_expr): Always do lvalue-rvalue
4696 2003-01-17 Mark Mitchell <mark@codesourcery.com>
4699 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4700 * cp-tree.h (BASELINK_BINFO): Adjust.
4701 (BASELINK_FUNCTIONS): Likewise.
4702 (BASELINK_ACCESS_BINFO): Likewise.
4703 (tree_baselink): New structure.
4704 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4705 (lang_tree_node): Add baselink.
4706 * decl.c (cp_tree_node_structure): Add BASELINK case.
4707 * search.c (build_baselink): Adjust.
4708 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
4709 test from TREE_LIST case.
4712 * parser.c (cp_parser_constructor_declarator_p): Do not assume
4713 that a constructor cannot be declared outside of its own class.
4715 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4716 be resolved, neither can the qualified name.
4718 * rtti.c (get_pseudo_ti_desc): Fix thinko.
4720 2003-01-16 Jason Merrill <jason@redhat.com>
4723 * init.c (build_vec_init): Re-add maxindex parm.
4724 (perform_member_init, build_aggr_init): Pass it.
4725 (build_new_1): Pass it. Use an incomplete array type for full_type.
4726 * typeck.c (build_modify_expr): Pass it.
4727 * cp-tree.h: Adjust.
4729 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
4731 * cp-tree.h (tsubst_copy_and_build): New declaration.
4732 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4733 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
4734 (tsubst_copy_and_build): New function.
4736 2003-01-16 Mark Mitchell <mark@codesourcery.com>
4738 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4739 (PARTIAL_INSTANTIATION_P): Remove.
4740 (IMPLICIT_TYPENAME_P): Likewise.
4741 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4742 (build_typename_type): Remove declaration.
4743 (parmlist_is_exprlist): Likewise.
4744 * decl.c (build_typename_type): Make it static, remove third
4746 (push_class_binding): Don't do implicit typename stuff.
4747 (make_typename_type): Likewise.
4748 (lookup_name_real): Likewise.
4749 (grokdeclarator): Don't try to convert declarations into
4750 initializations. Don't do implicit typename stuff.
4751 (parmlist_is_exprlist): Remove.
4752 (xref_basetypes): Simplify.
4753 * decl2.c (grokfield): Don't try to convert declarations into
4755 (build_anon_union_vars): Do this while processing templates, too.
4756 (finish_anon_union): Likewise.
4757 * error.c (dump_type): Remove implicit typename handling.
4758 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4759 (cp_parser_primary_expression): Correct handling of names not
4760 found by unqualified name lookup in templates.
4761 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4762 of types when possible.
4763 (cp_parser_simple_declaration): Complain intelligently about some
4764 invalid declarations.
4765 (cp_parser_member_declaration): Likewise.
4766 (cp_parser_constructor_declarator_p): Don't check when we're in a
4768 * pt.c (instantiate_class_template): Remove
4769 PARTIAL_INSTANTIATION_P gunk.
4770 * search.c (lookup_field_r): Don't build implicit typenames.
4771 (marked_pushdecls_p): Don't enter dependent base types.
4772 (unmarked_pushdecls_p): Likewise.
4773 * semantics.c (begin_class_definition): Remove implicit typename
4776 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
4779 * parser.c (cp_parser_direct_declarator): If accepting either
4780 abstract or named, the name must be an unqualified-id.
4782 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4784 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4786 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4788 * decl2.c (check_classfn): Fix uninitialized warning.
4789 (build_anon_union_vars): Likewise.
4790 * pt.c (tsubst_copy): Likewise.
4792 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
4794 Further conform g++'s __vmi_class_type_info to the C++ ABI
4796 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4798 (class_hint_flags): Likewise.
4800 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4802 * config-lang.in: Add semantics.c to gtfiles.
4803 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4804 (saved_scope): Likewise.
4805 (type_lookups): Remove.
4806 (deferred_access): New structure.
4807 (type_access_control): Remove.
4808 (save_type_access_control): Likewise.
4809 (reset_type_access_control): Likewise.
4810 (decl_type_access_control): Likewise.
4811 (push_deferring_access_checks): Declare.
4812 (resume_deferring_access_checks): Likewise.
4813 (stop_deferring_access_checks): Likewise.
4814 (pop_deferring_access_checks): Likewise.
4815 (get_deferred_access_checks): Likewise.
4816 (pop_to_parent_deferring_access_checks): Likewise.
4817 (perform_deferred_access_checks): Likewise.
4818 (perform_or_defer_access_check): Likewise.
4819 * decl.c (make_typename_type): Use perform_or_defer_access_check.
4820 (make_unbound_class_template): Likewise.
4821 (grokdeclarator): Don't call decl_type_access_control.
4822 * parser.c (cp_parser_context): Remove deferred_access_checks
4823 and deferring_access_checks_p fields.
4824 (cp_parser_context_new): Adjust.
4825 (cp_parser): Remove access_checks_lists.
4826 (cp_parser_defer_access_check): Remove.
4827 (cp_parser_start_deferring_access_checks): Remove.
4828 (cp_parser_stop_deferring_access_checks): Remove.
4829 (cp_parser_perform_deferred_access_checks): Remove.
4830 (cp_parser_nested_name_specifier_opt): Use new deferred access
4832 (cp_parser_simple_declaration): Likewise.
4833 (cp_parser_template_id): Likewise.
4834 (cp_parser_function_definition): Likewise.
4835 (cp_parser_class_specifier): Likewise.
4836 (cp_parser_lookup_name): Likewise.
4837 (cp_parser_single_declaration): Likewise.
4838 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4839 (cp_parser_parse_tentatively): Likewise.
4840 (cp_parser_parse_definitely): Likewise.
4841 (yyparse): Likewise.
4842 (cp_parser_init_declarator): Remove access_checks parameter.
4843 Use new deferred access functions.
4844 (cp_parser_function_definition_from_specifiers_and_declarator):
4846 (cp_parser_class_head): Remove deferring_access_checks_p and
4847 saved_access_checks parameters. Use new deferred access functions.
4848 (cp_parser_member_specification_opt): Don't call
4849 reset_type_access_control.
4850 * search.c (type_access_control): Remove.
4851 * semantics.c: Include "gt-cp-semantics.h".
4852 (deferred_type_access_control): Remove.
4853 (deferred_access_stack): New variable.
4854 (deferred_access_free_list): Likewise.
4855 (push_deferring_access_checks): New function.
4856 (resume_deferring_access_checks): Likewise.
4857 (stop_deferring_access_checks): Likewise.
4858 (pop_deferring_access_checks): Likewise.
4859 (get_deferred_access_checks): Likewise.
4860 (pop_to_parent_deferring_access_checks): Likewise.
4861 (perform_deferred_access_checks): New function, adapted from
4862 cp_parser_perform_deferred_access_checks.
4863 (perform_or_defer_access_check): New function, adapted from
4864 cp_parser_defer_access_check.
4865 (current_type_lookups): Remove.
4866 (deferred_type_access_control): Likewise.
4867 (decl_type_access_control): Likewise.
4868 (save_type_access_control): Likewise.
4869 (reset_type_access_control): Likewise.
4870 (begin_function_definition): Adjust.
4871 (begin_class_definiton): Likewise.
4873 2003-01-13 Jason Merrill <jason@redhat.com>
4876 * class.c (build_base_path): Take the address before calling save_expr.
4878 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4879 all the ambiguous conversions are bad.
4881 * class.c (maybe_warn_about_overly_private_class): Don't stop
4882 searching when we find a nonprivate method.
4884 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4886 2003-01-12 Mark Mitchell <mark@codesourcery.com>
4888 * cp-tree.h (get_arglist_len_in_bytes): Remove.
4891 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4892 typeame types more robustly.
4894 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
4896 * parser.c: Fix comment typos.
4898 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4901 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4902 an object_type which is not a class type.
4904 2003-01-10 Geoffrey Keating <geoffk@apple.com>
4906 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4907 (cp_parser_late_parsing_default_args): Likewise.
4909 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
4911 * cfns.gperf: ANSIfy function declarations.
4912 * cfns.h: Regenerate.
4913 * cp-tree.h: ANSIfy function declarations.
4915 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4917 * cp-tree.h (reparse_absdcl_as_expr): Remove.
4918 (reparse_absdcl_as_casts): Likewise.
4919 (reparse_decl_as_expr): Likewise.
4920 (finish_decl_parsing): Likewise.
4921 * decl2.c (reparse_absdcl_as_expr): Remove.
4922 (reparse_absdcl_as_casts): Likewise.
4923 (repase_decl_as_expr): Likewise.
4924 (finish_decl_parsing): Likewise.
4929 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4931 (cp_parser_nested_name_specifier_opt): Correct the
4932 check_dependency_p false.
4933 (cp_parser_postfix_expression): Fix formatting.
4934 (cp_parser_decl_specifier_seq): Avoid looking for constructor
4935 declarators when possible.
4936 (cp_parser_template_id): Avoid performing name-lookup when
4938 (cp_parser_class_head): Do not count specializations when counting
4939 levels of templates.
4940 (cp_parser_constructor_declarator_p): Return immediately if
4941 there's no chance that the tokens form a constructor declarator.
4942 * rtti.c (throw_bad_typeid): Add comment. Do not return an
4943 expression with reference type.
4944 (get_tinfo_decl_dynamic): Do not return an expression with
4946 (build_typeid): Add comment. Do not return an expression with
4948 * typeck.c (build_class_member_access_expr): Improve handling of
4949 conditionals and comma-expressions as objects.
4951 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4953 * cfns.gperf: ANSIfy function declarations.
4954 * cfns.h: Regenerate.
4955 * cp-tree.h: ANSIfy function declarations.
4956 * parser.c: ANSIfy function declarations & definitions.
4958 * decl.c (bad_specifiers): Fix parameter order error I introduced.
4960 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4962 Merge from pch-branch:
4964 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4966 Merge to tag pch-merge-20030102:
4968 * semantics.c (finish_translation_unit): Don't call finish_file.
4969 * parser.c: Don't include ggc.h.
4970 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4971 read first token here. Don't allow PCH files after the first
4973 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4974 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4975 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4976 (cp_parser_late_parsing_for_member): Don't duplicate call to
4977 cp_lexer_set_source_position_from_token.
4978 (cp_parser_late_parsing_default_args): Likewise.
4979 (yyparse): Call finish_file after clearing the_parser.
4981 2002-12-11 Geoffrey Keating <geoffk@apple.com>
4983 * Make-lang.in: Remove $(GGC_H) from all dependencies.
4984 (CXX_TREE_H): Add $(GGC_H).
4985 * class.c: Don't include ggc.h.
4986 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4987 (method_name_cmp): Likewise.
4988 (resort_data): New variable.
4989 (resort_field_decl_cmp): New.
4990 (resort_method_name_cmp): New.
4991 (resort_sorted_fields): New.
4992 (resort_type_method_vec): New.
4993 (finish_struct_methods): Delete cast.
4994 (finish_struct_1): Delete cast.
4995 * cp-tree.h: Include ggc.h.
4996 (struct lang_type_class): Add reorder attribute to field `methods'.
4997 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4998 (resort_sorted_fields): New prototype.
4999 (resort_type_method_vec): New prototype.
5000 * call.c: Don't include ggc.h.
5002 * decl2.c: Likewise.
5005 * method.c: Likewise.
5006 * optimize.c: Likewise.
5007 * parse.y: Likewise.
5010 * search.c: Likewise.
5011 * semantics.c: Likewise.
5015 * lang-specs.h: Remove comment.
5017 2002-12-03 Geoffrey Keating <geoffk@apple.com>
5019 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5020 (operator_name_info): Mark to be saved for PCH, specify size.
5021 (assignment_operator_name_info): Likewise.
5023 2002-11-19 Geoffrey Keating <geoffk@apple.com>
5025 * decl.c (anon_cnt): Mark to be saved for PCH.
5027 2002-10-25 Geoffrey Keating <geoffk@apple.com>
5029 * lex.c (init_reswords): Delete now-untrue comment.
5030 Allocate ridpointers using GGC.
5032 2002-10-04 Geoffrey Keating <geoffk@apple.com>
5034 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5036 * g++spec.c (lang_specific_driver): Don't include standard
5037 libraries in `added'.
5039 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
5041 * decl2.c (finish_file): Call c_common_write_pch.
5042 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5044 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
5046 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5047 files when using g++.
5048 * lang-specs.h: Handle compiling C++ header files.
5050 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5052 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5054 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5056 * pt.c (push_access_scope_real): Call push_to_top_level for
5057 function in namespace scope.
5058 (pop_access_scope): Call pop_from_top_level for function in
5061 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5063 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5065 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
5067 * Make-lang.in (c++.install-common, c++.install-man,
5068 c++.uninstall): Prepend $(DESTDIR) to destination paths in
5069 all (un)installation commands.
5070 (c++.install-common): Rewrite $(LN) commands to support
5071 DESTDIR with "ln" as well as with "ln -s".
5073 2003-01-08 Jason Merrill <jason@redhat.com>
5075 * parser.c (cp_parser_primary_expression): See through explicitly
5076 scoped ALIAS_DECLs, too.
5078 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
5080 * decl.c: Remove some #if 0 code.
5082 * decl.c: ANSIfy function declarations.
5084 2003-01-07 Mark Mitchell <mark@codesourcery.com>
5086 * parser.c (cp_parser_asm_definition): Correct handling of omitted
5089 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5092 * decl.c (make_typename_type): Check access only when tf_error.
5093 (make_unbound_class_template): Likewise.
5094 * pt.c (saved_access_scope): New variable.
5095 (push_access_scope_real): New function.
5096 (push_access_scope): Likewise.
5097 (pop_access_scope): Likewise.
5098 (tsubst_default_argument): Use them.
5099 (instantiate_template): Likewise.
5100 (regenerate_decl_from_template): Likewise.
5101 (instantiate_decl): Likewise.
5102 (get_mostly_instantiated_function_type): Likewise.
5104 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
5106 * tree.c: Delete bogus #if 0 code.
5108 2003-01-07 Andreas Schwab <schwab@suse.de>
5110 * class.c (layout_class_type): Don't use
5111 PCC_BITFIELD_TYPE_MATTERS if not defined.
5113 2003-01-06 Mark Mitchell <mark@codesourcery.com>
5116 * decl2.c (build_cleanup): Mark the object as used.
5118 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5119 (hash_local_specialization): New function.
5120 (register_local_specialization): Revert 2003-01-05 change.
5121 (instantiate_decl): Use hash_local_specialization when creating
5122 the local_specializations table.
5124 * decl2.c (mark_used): Do not synthesize thunks.
5126 * class.c (layout_class_type): Correct handling of unnamed
5127 bitfields wider than their types.
5130 * parser.c (cp_parser): Remove default_arg_types. Update
5131 documentation for unparsed_functions_queues.
5132 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5134 (cp_parser_new): Don't set parser->default_arg_types.
5135 (cp_parser_function_definition): Adjust usage of
5136 unparsed_funtions_queues.
5137 (cp_parser_class_specifier): Don't mess with
5138 parser->default_arg_types. Handle default argument processing in
5139 a separate phase from function body processing.
5140 (cp_parser_template_declaration_after_export): Adjust usage of
5141 unparsed_functions_queues.
5142 (cp_parser_late_parsing_for_member): Do not handle default
5145 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
5148 * parser.c (cp_parser_declarator_kind): New enum.
5149 (cp_parser_declarator): Adjust.
5150 (cp_parser_direct_declarator): Adjust. Allow for either named or
5151 abstract declarator. Prefer abstract, if possible. Allow
5152 parenthesized function name.
5153 (cp_parser_condition): Adjust cp_parser_declarator call.
5154 (cp_parser_explicit_instantiation): Likewise.
5155 (cp_parser_init_declarator): Likewise.
5156 (cp_parser_type_id): Likewise.
5157 (cp_parser_function_definition): Likewise.
5158 (cp_parser_member_declaration): Likewise.
5159 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5160 the tentative parsing.
5161 (cp_parser_exception_declaration): Likewise.
5163 2003-01-05 Mark Mitchell <mark@codesourcery.com>
5165 * parser.c (cp_parser_template_parameter): Adjust call to
5166 cp_parser_parameter_declaration.
5167 (cp_parser_parameter_declaration_list): Likewise.
5168 (cp_parser_parameter_declaration): Replace
5169 greater_than_is_operator_p with template_parm_p parameter. Do not
5170 cache tokens for template default arguments.
5172 * pt.c (retrieve_local_specialization): Use htab_find, not
5173 htab_find_with_hash.
5174 (register_local_specialization): Use htab_find_slot, not
5175 htab_find_slot_with_hash.
5176 (instantiate_decl): Pass a hash function to htab_create.
5178 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5180 * parser.c (cp_parser_binary_expression,
5181 cp_parser_multiplicative_expression,
5182 cp_parser_additive_expression, cp_parser_shift_expression,
5183 cp_parser_relational_expression, cp_parser_equality_expression,
5184 cp_parser_and_expression, cp_parser_exclusive_or_expression,
5185 cp_parser_inclusive_or_expression,
5186 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5187 cp_parser_binary_expression): Const-ify.
5189 2003-01-04 Mark Mitchell <mark@codesourcery.com>
5191 * method.c (use_thunk): Disable access control while building the
5194 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
5196 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5199 2003-01-03 Matt Austern <austern@apple.com>
5201 * cp-tree.h (struct lang_type_class): add field for key method
5202 (cp_global_trees): rename dynamic_classes to keyed_classes
5203 (key_method): add definition
5204 * class.c (finish_struct_1): compute class's key method, and add
5205 the class to keyed_classes list if there is no key method.
5206 * decl.c (finish_function): add class to keyed_classes list if we
5207 see a definition of the class's key method.
5208 * pt.c (instantiate_class_template): add template specialization
5209 of a dynamic class to keyed_classes list.
5210 * decl2.c (key_method): remove
5211 (finish_file): iterate only through keyed_classes list when
5212 deciding whether to emit vtables, remove class from its list after
5215 2003-01-02 Jason Merrill <jason@redhat.com>
5217 * call.c (build_conditional_expr): Stabilize lvalues properly.
5218 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5219 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5220 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5222 * call.c (convert_like_real): Call decl_constant_value for an
5223 IDENTITY_CONV even if there are no more conversions.
5225 * cvt.c (build_up_reference): Don't push unnamed temps.
5227 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5229 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5230 for a backend struct.
5232 * except.c (wrap_cleanups_r, build_throw): Make
5233 MUST_NOT_THROW_EXPRs void.
5234 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5236 * init.c (build_vec_delete_1): Pre-evaluate the base address.
5238 * init.c (get_temp_regvar): Simplify logic.
5240 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5241 our replacement is a decl.
5243 * decl.c (cp_make_fname_decl): Push the decls inside the
5246 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
5249 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5252 2003-01-03 Graham Stott <graham.stott@btinternet.com>
5254 * parser.c (struct cp_parser): Add access_checks_lists field
5255 (cp_parser_simple_declaration): Use.
5256 (cp_parser_init_declarator): Likewise.
5258 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5260 * parser.c (cp_parser_declaration): Accept the __extension__
5261 keyword before the declaration.
5264 * parser.c (cp_parser_parameter_declaration): Allow attributes to
5265 appear after the declarator.
5267 * call.c (build_new_method_call): Fix typo in message format
5270 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5272 * parser.c (cp_lexer_next_token_is): Declare it inline.
5273 (cp_lexer_set_source_position_from_token): Likewise.
5274 (cp_lexer_debugging_p): Likewise.
5275 (cp_parser_parsing_tentatively): Likewise.
5276 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5277 to the cp_lexer_peek_token.
5279 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5282 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
5284 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5285 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5286 cp/repo.c: Fix copyright years.
5288 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
5290 * lex.c: Remove superfluous include of cpplib.h.
5291 (CONSTRAINT): Define without conditions.
5292 (init_cp_pragma): Use c_register_pragma.
5294 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5296 * .cvsignore: Remove.
5298 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
5300 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5301 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5302 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5303 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5304 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5306 * lex.h: parse.y is dead, so don't mention it. Also replace the
5307 copyright header with the default GNU copyright header.
5309 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5311 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5312 (lookup_name_namespace_only): Likewise.
5313 (begin_only_namespace_names): Likewise.
5314 (end_only_namespace_names): Likewise.
5315 * decl.c (only_namespace_names): Remove.
5316 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5317 (lookup_name_real): Do not check only_namespace_names.
5318 (lookup_name_namespace_only): Remove.
5319 (begin_only_namespace_names): Likewise.
5320 (end_only_namespace_names): Likewise.
5321 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5322 nested-name-specifiers more gracefully.
5323 (cp_parser_class_or_namespace_name): Avoid looking up namespace
5324 names when they cannot possibly appear.
5325 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5326 (cp_parser_elaborated_type_specifier): Likewise.
5327 (cp_parser_namespace_name): Only look for namespace names.
5328 (cp_parser_lookup_name): Add is_namespace parameter.
5329 (cp_parser_lookup_name_simple): Adjust call to
5330 cp_parser_lookup_name.
5332 * parser.c (cp_parser_dependent_type_p): Fix thinko.
5334 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5336 * .cvsignore: Update.
5338 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
5340 * class.c (modify_vtable_entry): Remove unused variable.
5341 (get_vcall_index): Always expect a non-thunk.
5342 (update_vtable_entry_for_fn): Combine covariant adjustments, when
5343 overriding a thunk. Pass get_vcall_index a non-thunk.
5345 * decl2.c (finish_file): Mark undefined inlines as extern.
5347 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5349 * cp-tree.def (RETURN_INIT): Remove.
5350 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5351 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5352 (note_level_for_for): Remove.
5353 (note_level_for_try): Likewise.
5354 (note_level_for_catch): Likewise.
5355 (finish_named_return_value): Likewise.
5356 (do_pushlevel): Change prototype.
5357 (pending_lang_change): Remove.
5358 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5360 (note_level_for_for): Remove.
5361 (note_level_for_try): Likewise.
5362 (note_level_for_catch): Likewise.
5363 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5364 * parser.c (cp_parser_context_free_list): Make it "deletable".
5365 (cp_parser_template_argument): Remove misleading comment.
5366 * pt.c (tsubst_expr): Remove RETURN_INIT code.
5367 * semantics.c (genrtl_named_return_value): Remove.
5368 (do_pushlevel): Take a scope kind as an argument.
5369 (begin_if_stmt): Adjust.
5370 (begin_while_stmt): Likewise.
5371 (begin_for_stmt): Likewise.
5372 (finish_for_init_stmt): Likewise.
5373 (begin_switch_stmt): Likewise.
5374 (begin_handler): Likewise.
5375 (begin_compound_stmt): Likewise.
5376 (finish_named_return_value): Remove.
5377 (cp_expand_stmt): Remove RETURN_INIT case.
5378 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5380 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5383 * parser.c (cp_parser_direct_declarator): Handle erroneous
5384 parenthesized declarators correctly.
5386 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5388 * cp-tree.h (pending_lang_change): Declare.
5390 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5392 * parser.c (cp_parser_context_free_list): New variable.
5393 (cp_parser_context_new): Use it.
5394 (cp_parser_error): Check return code from
5395 cp_parser_simulate_error.
5396 (cp_parser_simulate_error): Return a value.
5397 (cp_parser_id_expression): Optimize common case.
5398 (cp_parser_class_name): Likewise.
5399 (cp_parser_class_specifier): Adjust call to
5400 cp_parser_late_parsing_default_args.
5401 (cp_parser_lookup_name): Optimize common case.
5402 (cp_parser_late_parsing_for_member): Adjust call to
5403 cp_parser_late_parsing_default_args.
5404 (cp_parser_late_parsing_default_args): Add scope parameter.
5405 (cp_parser_require): Avoid creating the error message unless it's
5407 (cp_parser_parse_definitely): Place free'd contexts on the free
5410 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5412 2002-12-30 David Edelsohn <edelsohn@gnu.org>
5414 * parser.c (cp_parser_parameter_declaration_clause): Treat system
5415 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5417 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5419 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5422 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5426 * Make-lang.in (gt-cp-spew.h): Remove.
5427 * cp-tree.h (do_pending_lang_change): Remove.
5428 (do_identifier): Change prototype.
5429 (finish_id_expr): Remove.
5430 * decl.c (lookup_name_real): Remove yylex variable.
5431 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5432 * lex.c (init_cpp_parse): Remove.
5433 (reduce_cmp): Likewise.
5434 (token_cmp): Likewise.
5436 (lastiddecl): Likewise.
5437 (token_count): Likewise.
5438 (reduce_count): Likewise.
5440 (print_parse_statistics): Likewise.
5441 (do_pending_lang_change): Likewise.
5442 (do_identifier): Remove parsing parameter.
5443 * lex.h (lastiddecl): Remove.
5444 (looking_for_typename): Remove.
5445 (looking_for_template): Likewise.
5446 (pending_lang_change): Likewise.
5448 * semantics.c (finish_id_expr): Remove.
5450 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5453 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5455 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
5456 end, not the C front end.
5458 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
5460 * cp-tree.h (THUNK_TARGET): New macro.
5461 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5462 (finish_thunk): Remove offset parms.
5463 * class.c (find_final_overrider): Look through thunks.
5464 (get_vcall_index): Use THUNK_TARGET.
5465 (update_vtable_entry_for_fn): Look through thunks. Set covariant
5466 fixed offset here. Adjust finish_thunk call.
5467 (build_vtbl_initializer): Adjust finish_thunk calls.
5468 * mangle.c (mangle_call_offset): Remove superfluous if.
5469 (mangle_thunk): Adjust.
5470 * method.c (make_thunk): Adjust.
5471 (finish_thunk): Adjust.
5472 (thunk_adjust): Remove assert.
5473 (use_thunk): Use THUNK_TARGET
5474 * dump1.c (cp_dump_tree): Adjust thunk dumping.
5477 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5478 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5480 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5482 Remove traditional C constructs 4/n.
5483 * decl2.c (grok_method_quals, warn_if_unknown_interface,
5484 grok_x_components, cp_build_parm_decl, build_artificial_parm,
5485 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5486 delete_sanity, check_member_template, check_java_method,
5487 check_classfn, finish_static_data_member_decl, grokfield,
5488 grokbitfield, grokoptypename, grok_function_init,
5489 cplus_decl_attributes, constructor_name, defer_fn,
5490 build_anon_union_vars, finish_anon_union, coerce_new_type,
5491 coerce_delete_type, comdat_linkage, maybe_make_one_only,
5492 key_method, import_export_vtable, import_export_class,
5493 output_vtable_inherit, import_export_decl, import_export_tinfo,
5494 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5495 set_guard, start_objects, finish_objects,
5496 start_static_storage_duration_function,
5497 finish_static_storage_duration_function, get_priority_info,
5498 start_static_initialization_or_destruction,
5499 finish_static_initialization_or_destruction,
5500 do_static_initialization, do_static_destruction,
5501 prune_vars_needing_no_initialization, write_out_vars,
5502 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5503 add_using_namespace, merge_functions, ambiguous_decl,
5504 lookup_using_namespace, lookup_using_namespace,
5505 qualified_lookup_using_namespace, set_decl_namespace,
5506 decl_namespace, current_decl_namespace, push_decl_namespace,
5507 pop_decl_namespace, push_scope, pop_scope, add_function,
5508 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5509 lookup_arg_dependent, do_namespace_alias,
5510 validate_nonmember_using_decl, do_nonmember_using_decl,
5511 do_toplevel_using_decl, do_local_using_decl,
5512 do_class_using_decl, do_using_directive, check_default_args,
5513 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
5514 * parser.c (cp_parser_class_head): Use booleanss.
5515 * decl.c (walk_globals, walk_vtables): Likewise.
5516 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5517 walk_globals): Change return type from 'int' to 'bool'.
5518 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5519 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5520 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5521 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5522 qualifier_flags, tinfo_base_init, generic_initializer,
5523 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5524 dfs_class_hint_unmark, class_hint_flags, class_initializer,
5525 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5526 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5527 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5528 * repo.c (repo_compile_flags, repo_template_declared,
5529 repo_template_defined, repo_class_defined, repo_get_id,
5530 repo_template_used, repo_vtable_used, repo_inline_used,
5531 repo_tinfo_used, repo_template_instantiated, extract_string,
5532 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5533 finish_repo): Likewise.
5534 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5535 cxx_print_xnode): Likewise..
5536 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5537 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5538 * cxxfilt.c (demangle_it, print_demangler_list, usage,
5539 standard_symbol_characters, hp_symbol_characters, main, fatal):
5541 (strip_underscore): Change type from 'int' to 'bool'.
5542 (main): Use boolean constants.
5544 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5546 Remove traditional C constructs 3/n.
5547 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5548 build_up_reference, warn_ref_binding, convert_to_reference,
5549 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5550 convert_to_void, convert, convert_force, build_type_conversion,
5551 build_expr_type_conversion, type_promotes_to,
5552 perform_qualification_conversions): Use C90 prototyping style.
5553 * decl2.c (grok_array_decl): Use boolean constant.
5554 (delete_sanity): Likewise.
5555 * typeck.c (build_unary_op): Likewise.
5556 * semantics.c (finish_switch_cond): Likewise.
5557 * parser.c (cp_parser_direct_new_declarator): Likewise.
5558 * init.c (build_new): Likewise.
5560 2002-12-27 Mark Mitchell <mark@codesourcery.com>
5562 * Make-lang.in (po-generated): Remove parse.c.
5563 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
5564 ($(srcdir)/cp/parse.h): Remove target.
5565 ($(srcdir)/cp/parse.c): Likewise.
5566 (gt-cp-parse.h): Likewise.
5567 (gt-cp-parser.h): New target.
5568 (c++.distclean): Do not remove parse.output.
5569 (c++.maintainer-clean): Do not remove parse.c or parse.h.
5570 (cp/spew.o): Remove target.
5571 (cp/lex.o): Adjust dependencies.
5572 (cp/pt.o): Likewise.
5573 (cp/parse.o): Likewise.
5574 (cp/TAGS): Do not mention parse.c.
5575 (cp/parser.o): New target.
5576 * NEWS: Mention the new parser.
5577 * call.c (build_scoped_method_call): Simplify.
5578 (build_method_call): Likewise.
5579 (build_new_function_call): Adjust calls to add_function_candidate
5580 and add_template_candidate.
5581 (build_new_op): Improve handling of erroroneous operands.
5582 (convert_default_arg): Remove circular argument processing.
5583 (name_as_c_string): New function.
5584 (build_new_method_call): Use it.
5585 (perform_implicit_conversion): Use error_operand_p.
5586 * class.c (finish_struct_anon): Use constructor_name_p.
5587 (check_field_decls): Likewise.
5588 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5589 (resolve_address_of_overloaded_function): Likewise.
5590 (instantiate_type): Tweak pointer-to-member handling.
5591 (get_primary_binfo): Remove incorrect assertion.
5592 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5593 * cp-tree.h (DEFARG_TOKENS): New macro.
5594 (default_arg): New structure.
5595 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5596 (lang_tree_node): Add default_arg.
5597 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5598 (type_info_ref_type): New macro.
5599 (saved_scope): Make processing_explicit_instantiation a boolean.
5600 (check_access): New field.
5601 (unparsed_text): Remove.
5602 (language_function): Remove unparsed_inlines.
5603 (error_operand_p): New macro.
5604 (lang_decl): Adjust pending_inline_info.
5605 (DEFARG_POINTER): Remove.
5606 (tag_types): Add typenames.
5607 (lookup_ualified_name): Declare.
5608 (lookup_name_real): Likewise.
5609 (shadow_tag): Adjust prototype.
5610 (get_scope_of_declarator): Declare it.
5611 (process_next_inline): Remove it.
5612 (check_for_missing_semicolon): Likewise.
5613 (maybe_get_template_decl_from_type_decl): Declare it.
5614 (finish_label_stmt): Adjust prototype.
5615 (finish_non_static_data_meber): Declare it.
5616 (finish_pseudo_destructor_call_expr): Rename to ...
5617 (finish_pseudo_destructor_expr): ... this.
5618 (finish_compound_literal): Declare it.
5619 (begin_inline_definitions): Remove it.
5620 (init_spew): Remove.
5621 (peekyylex): Likewise.
5622 (arbitrate_lookup): Likewise.
5623 (frob_opname): Likewise.
5624 (maybe_snarf_defarg): Likewise.
5625 (add_defarg_fn): Likewise.
5626 (do_pending_defargs): Likewise.
5627 (done_pending_defargs): Likewise.
5628 (unprocessed_defarg_fn): Likewise.
5629 (replace_defarg): Likewise.
5630 (end_input): Likewise.
5631 (get_overloaded_fn): Likewise.
5632 * cvt.c (convert_to_reference): Improve error handling.
5633 * decl.c (lookup_name_real): Do not declare it static.
5634 (maybe_push_to_top_level): Set check_access.
5635 (identifier_type_value): Adjust call to lookup_name_real.
5636 (lookup_qualified_name): New method.
5637 (lookup_name_real): Remove special-case parsing code.
5638 (lookup_name-nonclass): Adjust call to lookup_name_real.
5639 (lookup_name_namespace_only): Likewise.
5640 (lookup_name): Likewise.
5641 (check_tag_decl): Return the type declared.
5642 (shadow_tag): Likewise.
5643 (register_dtor_fn): Tweak check_access.
5644 (grokfndecl): Use constructor_name_p.
5645 (get_scope_of_declarator): New function.
5646 (grokdeclarator): Obscure tweaks for slightly different declarator
5648 (start_method): Return error_mark_node to indicate failure.
5649 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5650 * decl2.c (constructor_name_full): Simplify.
5651 (constructor_name): Use it.
5652 (build_expr_from_tree): Adjust for changes to do new parser.
5653 (push_scope): Improve robustness.
5654 (validate_nonmember_using_decl): Process declarations, not names.
5655 (do_class_using_decl): Likewise.
5656 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5658 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5659 * expr.c (cxx_expand_expr): Handle BASELINKs.
5660 * init.c (member_init_ok_or_else): Issue more errors.
5661 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5662 * lex.c: Do not include parse.h.
5663 (yypring): Do not declare.
5665 (make_reference_declarator): Remove error-generating code.
5666 (rid_to_yy): Remove.
5667 (cxx_init): Do not call init_spew.
5669 (check_for_missing_semicolon): Remove.
5670 * lex.h (got_scope): Remove.
5671 (got_object): Remove.
5672 * method.c (hack_identifier): Use finish_non_static_data_member.
5673 (implicitly_declare_fn): Adjust use of constructor_name.
5674 * parser.c: New file.
5675 * pt.c (parse.h): Do not include it.
5676 (maybe_get_template_decl_from_template): Do not declare it.
5677 (finish_member_template_decl): Tweak.
5678 (begin_explicit_instantiation): Adjust for
5679 processing_explicit_instantiation being boolean.
5680 (end_explicit_instantiation): Likewise.
5681 (maybe_process_partial_specialization): Tighten specialization
5683 (retrieve_local_specialization): Adjust ue of hash table.
5684 (eq_local_specializations): New function.
5685 (register_local_specialization): Likewise.
5686 (push_template_decl_real): Remove unnecessary test.
5687 (maybe_get_template_decl_from_type_decl): Don't make it static.
5688 (for_each_template_parm_r): Handle TYPEOF_TYPE.
5689 (tsubst_copy): Use retrieive_local_specialization to handle
5690 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
5691 Handle COMPONENT_REFs with pseudo-destructor-expressions.
5692 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5693 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5694 (unify): Tweak handling of CONST_DECLs.
5695 (regenerate_decl_from_template): Use push_nested_class.
5696 (template_for_substitution): New funciton.
5697 (instantiate_decl): Use it. Register parameters as local
5699 * rtti.c (init_rtti_processing): Set type_info_ref_type.
5700 (build_typeid): Use it.
5701 (get_typeid): Likeise.
5702 * search.c (accessible_p): Use check_access, not
5703 flag_access_control.
5704 (adjust_result_of_qualified_name_lookup): Pay attention to the
5706 * semantics.c (finish_asm_stmt): Adjust error handling.
5707 (finish_label_stmt): Return the statement.
5708 (finish_non_static_data_member): New function.
5709 (finish_class_expr): Handle BASELINKs.
5710 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5711 (finish_object_call_expr): Simplify handling during templates.
5712 (finish_pseudo_destructor_call_expr): Rename to ...
5713 (finish_pseudo_dtor_expr): ... this.
5714 (finish_compound_literal): New function.
5715 (begin_inline_definitions): Remove.
5716 (finish_sizeof): Remove special template handling.
5717 * spew.c: Do not include parse.h.
5718 * tree.c (get_overloaded_fn): Remove.
5719 * typeck.c (build_class_member_access_expr): Handle
5720 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
5721 (lookup_destructor): New function.
5722 (finish_class_member_access_expr): Use it.
5723 (convert_arguments): Simplify.
5724 (build_unary_op): Handle BASELINKs.
5726 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
5729 * decl2.c (mark_used): Defer inline functions.
5730 (finish_file): Merge deferred_fns loops. Check all used
5731 inline functions have a definition.
5732 * method.c (make_thunk): Thunks are not inline.
5734 PR c++/5116, c++/764
5735 * call.c (build_new_op): Make sure template class operands are
5738 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
5741 * cp-tree.h (resolve_scoped_fn_name): Prototype.
5742 * call.c (resolve_scoped_fn_name): New function. Deal with
5743 more template expansion. Broken out of ...
5744 * parse.y (parse_finish_call_expr): ... here. Call it.
5745 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5746 resolve_scoped_fn_name and build_call_from_tree.
5749 * decl.c (duplicate_decls): Templates may be disambiguated by
5753 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5754 conversion operators on failure.
5756 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5758 Remove traditional C constructs 2/n.
5759 * call.c (tourney, build_field_call, equal_functions, joust,
5760 compare_ics, build_over_call, build_java_interface_fn_ref,
5761 convert_like_real, op_error, build_object_call, resolve_args,
5762 build_vfield_ref, check_dtor_name, build_scoped_method_call,
5763 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5764 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5765 standard_conversion, reference_related_p,
5766 reference_compatible_p, convert_class_to_reference,
5767 direct_reference_binding, reference_binding,
5768 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5769 add_template_conv_candidate, any_viable, any_strictly_viable,
5770 build_this, splice_viable, print_z_candidates,
5771 build_user_type_conversion, build_new_function_call,
5772 conditional_conversion, build_conditional_expr, build_new_op,
5773 build_op_delete_call, enforce_access, call_builtin_trap,
5774 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5775 convert_default_arg, type_passed_as, convert_for_arg_passing,
5776 in_charge_arg_for_name, is_properly_derived_from,
5777 maybe_handle_implicit_object, maybe_handle_ref_bind,
5778 source_type, add_warning, can_convert, can_convert_arg,
5779 perform_implicit_conversion, can_convert_arg_bad,
5780 initialize_reference, add_conv_candidate,
5781 add_template_candidate_real, add_template_candidate): Ansify.
5783 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
5786 * cp-tree.h (grokoptypename): Add SCOPE parameter.
5787 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5788 if in a template scope.
5789 * parse.y (unoperator): Return the scope.
5790 (operator_name): Adjust grokoptypename call.
5792 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5794 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5795 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
5796 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5798 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5800 * ChangeLog: Fix a typo.
5801 * class.c: Fix comment typos.
5802 * cp-tree.h: Likewise.
5804 2002-12-18 Jason Merrill <jason@redhat.com>
5806 Handle anonymous unions at the tree level.
5807 C++ ABI change: Mangle anonymous unions using the name of their
5808 first named field (by depth-first search). Should not cause
5809 binary compatibility problems, though, as the compiler previously
5810 didn't emit anything for affected unions.
5811 * cp-tree.def (ALIAS_DECL): New tree code.
5812 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
5813 first field, not the largest.
5814 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
5815 push the decl, and write it out at namespace scope.
5816 * decl.c (lookup_name_real): See through an ALIAS_DECL.
5817 (pushdecl): Add namespace bindings for ALIAS_DECLs.
5818 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5819 of a decl which doesn't have one.
5820 * typeck.c (build_class_member_access_expr): Don't recurse if
5821 we already have the type we want.
5823 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5826 * friend.c (make_friend_class): Allow partial specialization
5827 when declaration is not a template friend.
5829 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5832 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5833 TREE_PROTECTED to created decl nodes.
5835 2002-12-18 Mark Mitchell <mark@codesourcery.com>
5837 * class.c (build_base_field): Do not set DECL_PACKED on the
5840 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
5842 * cp-tree.h (struct tree_srcloc): Use location_t.
5843 (SOURCE_LOCUS): New.
5844 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5846 2002-12-17 Jason Merrill <jason@redhat.com>
5848 * decl.c (finish_function): Also complain about no return in
5850 * semantics.c (finish_return_stmt): Also call check_return_expr in
5852 * typeck.c (check_return_expr): In a template, just remember that we
5855 2002-12-16 Jason Merrill <jason@redhat.com>
5857 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5860 * semantics.c (do_pushlevel): Call pushlevel after adding the
5862 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5863 * parse.y (function_body): Go back to using compstmt.
5864 * decl.c (pushdecl): Skip another level to get to the parms level.
5866 * call.c (build_new_method_call): Use is_dummy_object to determine
5867 whether or not to evaluate the object parameter to a static member
5870 2002-12-14 Jason Merrill <jason@redhat.com>
5872 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5873 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5874 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5875 don't bother with an AGGR_INIT_EXPR.
5876 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5877 just generate a new decl normally. Take return slot parm.
5878 * cp-tree.h: Adjust prototype.
5880 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5883 * cvt.c (convert_to_pointer_force): Don't try comparing against
5886 2002-12-13 Geoffrey Keating <geoffk@apple.com>
5888 * cp-tree.h: Have the multiple-include guards around
5891 2002-12-10 David Edelsohn <edelsohn@gnu.org>
5893 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5895 (snarf_method): Same.
5896 (snarf_defarg): Same.
5898 2002-12-10 Mark Mitchell <mark@codesourcery.com>
5901 * pt.c (tsubst_copy): Handle destructor names more correctly.
5903 2002-12-10 Matt Austern <austern@apple.com>
5905 * cp-tree.h: get rid of needs_virtual_reinit bit.
5907 2002-12-09 Mark Mitchell <mark@codesourcery.com>
5909 * NEWS: Document removal of in-class initialization extension for
5910 static data members of non-arithmetic, non-enumeration type.
5911 * decl.c (check_static_variable_definition): Do not allow that
5913 * decl2.c (grokfield): Do not call digest_init when processing
5916 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5918 * error.c (dump_expr): Fix format specifier warning.
5920 2002-12-04 Geoffrey Keating <geoffk@apple.com>
5922 * class.c (finish_struct_1): Correct comment.
5923 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5925 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5928 * error.c (dump_expr): Don't ever try to dump a non-existent
5931 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
5933 Implement covariant returns.
5934 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5935 (struct lang_decl_flags): Add this_thunk_p flag.
5936 Rename vcall_offset to virtual_offset.
5937 (struct lang_decl): Rename delta to fixed_offset.
5938 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5939 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5940 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5941 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5942 (make_thunk): Add this_adjusting arg.
5943 (finish_thunk): Declare.
5944 (mangle_thunk): Add this_adjusting arg.
5945 * class.c (get_vcall_index): Use base function for lookup.
5946 (update_vtable_entry_for_fn): Generate covariant thunk.
5947 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5948 (build_vtbl_initializer): Use base function for lookup.
5949 Finish covariant thunk here. Adjust thunk generation.
5950 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5951 Adjust thunk dumping.
5952 * mangle.c (mangle_call_offset): New function.
5953 (mangle_thunk): Adjust for covariant thunks.
5954 * method.c (make_thunk): Adjust. Do not set name here.
5955 (finish_thunk): New function. Set name here.
5956 (use_thunk): Generate covariant thunks too.
5957 (thunk_adjust): New function.
5958 * search.c (covariant_return_p): Remove. Fold into ...
5959 (check_final_overrider): ... here. Simplify.
5960 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5962 2002-12-03 Jason Merrill <jason@redhat.com>
5965 * call.c (build_over_call): Check specifically for TARGET_EXPR
5968 PR c++/8461, c++/8625
5969 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5970 (cp_convert_parm_for_inlining): Remove.
5971 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5973 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5974 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5976 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5977 an ambiguous conversion.
5979 2002-12-03 Mark Mitchell <mark@codesourcery.com>
5982 * decl.c (reshape_init): Handle erroneous initializers.
5984 2002-12-02 Mark Mitchell <mark@codesourcery.com>
5987 * spew.c (remove_last_token): Make sure that last_chunk is set
5991 * error.c (dump_expr): Handle character constants with
5994 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5997 * decl.c (grokdeclarator): Require class-key for all friend class.
5998 Output the correct type and context in the error message.
6000 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6003 * pt.c (unify): Use variably_modified_type_p to test validity of
6004 template argument types.
6007 * cp-tree.h (lang_type_class): Add typeinfo_var.
6008 (CLASSTYPE_TYPEINFO_VAR): New macro.
6009 * rtti.c (get_tinfo_decl): Use it.
6012 * init.c (expand_member_init): Always get the main variant of a
6015 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6019 * decl.c (cxx_init_decl_processing): Use size_type_node, not
6021 * decl2.c (coerce_new_type): Likewise.
6022 * except.c (do_allocate_exception): Likewise.
6024 2002-11-30 Zack Weinberg <zack@codesourcery.com>
6026 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6027 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6028 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6029 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6030 typeck2.c: Include coretypes.h and tm.h.
6031 * Make-lang.in: Update dependencies.
6033 2002-11-30 Mark Mitchell <mark@codesourcery.com>
6036 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6037 (check_initializer): Validate the type of the initialized
6038 variable, even if the initializer is absent.
6039 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6042 * typeck.c (convert_for_assignment): Do not use
6043 decl_constant_value on the operand.
6046 * pt.c (instantiate_decl): Handle template friends defined outside
6047 of the class correctly.
6049 2002-11-29 Joe Buck <jbuck@synopsys.com>
6051 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6054 2002-11-29 Mark Mitchell <mark@codesourcery.com>
6056 * class.c (walk_subobject_offsets): Recur on binfos as well as on
6058 (layout_nonempty_base_or_field): Pass it a binfo when processing a
6060 (layout_empty_base): Likewise.
6061 (build_base_field): Likewise.
6063 2002-11-27 Mark Mitchell <mark@codesourcery.com>
6065 * class.c (build_base_field): Make sure we get the canonical base
6066 when descending through primary bases.
6068 2002-11-26 Geoffrey Keating <geoffk@apple.com>
6070 * decl.c (check_initializer): Don't error on initialisation of
6071 a scalar with a brace-enclosed expression.
6073 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
6075 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6076 (template_parms_equal): Remove prototype.
6077 * typeck.c (buuld_indirect_ref): Reformat.
6079 2002-11-25 Jason Merrill <jason@redhat.com>
6081 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6084 2002-11-25 Mark Mitchell <mark@codesourcery.com>
6086 * tree.c (cp_build_qualified_type_real): Correct handling of
6088 * class.c (walk_subobject_offsets): Fix thinko.
6089 (build_base_field): Record offsets of empty bases in primary
6091 (layout_class_type): Record offsets of empty bases in fields.
6093 * search.c (is_subobject_of_p_1): Fix thinko.
6094 (lookup_field_queue_p): Likewise.
6096 2002-11-24 Mark Mitchell <mark@codesourcery.com>
6098 * class.c (layout_class_type): Reuse tail padding when laying out
6101 2002-11-22 Mark Mitchell <mark@codesourcery.com>
6103 * rtti.c (qualifier_flags): Fix thinko.
6105 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6107 Remove traditional C constructs 1/n.
6108 * cp-tree.h (init_method, set_mangled_name_for_decl,
6109 build_opfncall, hack_identifier, make_thunk, use_thunk,
6110 synthesize_method, implicitly_declare_fn,
6111 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6112 maybe_clone_body): Remove use of PARAMS.
6114 * method.c (do_build_assign_ref, do_build_copy_constructor,
6115 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6117 (synthesize_method): Use 'bool' type and constants instead of
6119 (locate_copy): Likewise.
6120 (implicitly_declare_fn): Likewise.
6122 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6123 Remove old-style declaration.
6124 (maybe_clone_body): Use 'bool' type and constants.
6126 2002-11-21 Glen Nakamura <glen@imodulo.com>
6129 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6130 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6131 of the branches of a COND_EXPR.
6133 2002-11-19 Mark Mitchell <mark@codesourcery.com>
6135 * pt.c (for_each_template_parm): Free allocated memory.
6136 * search.c (is_subobject_of_p_1): New function.
6137 (is_subobject_of_p): Avoid walking virtual bases multiple times.
6139 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6141 * g++spec.c (lang_specific_spec_functions): New.
6143 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
6145 * ChangeLog: Follow spelling conventions.
6146 * class.c: Likewise.
6147 * decl2.c: Likewise.
6149 2002-11-14 Zack Weinberg <zack@codesourcery.com>
6151 * search.c (dfs_push_decls): Do not try to reorder elements
6152 3..n of method_vec if method_vec has only two elements.
6153 Reverse order of two tests to avoid accessing unallocated
6156 2002-11-14 Mark Mitchell <mark@codesourcery.com>
6158 * class.c (dfs_find_final_overrider): Adjust so that the most
6159 derived object is a binfo, rather than a class type.
6160 (find_final_overrider): Likewise.
6161 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6162 (add_vcall_offset): Likewise.
6164 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6167 * pt.c (instantiate_template): Push class scope for member
6169 (get_mostly_instantiated_function_type): Likewise. Don't call
6170 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
6171 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6172 * mangle.c (write_encoding, write_unqualified_name): Adjust.
6174 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6176 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6177 vcall offfsets. Split out ...
6178 (add_vcall_offset): ... new function.
6181 * pt.c (for_each_template_parm): Add htab parameter.
6182 (process_partial_specialization): Adjust call.
6183 (push_template_decl_real): Likewise.
6184 (pair_fn_data): Add visited.
6185 (for_each_template_parm_r): Avoid walking duplicates more than
6187 (uses_template_parms): Adjust call to for_each_template_parm.
6189 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6191 * class.c (add_implicitly_declared_members): Put implicitly
6192 declared functions at the end of TYPE_METHODs when -fabi-version
6195 2002-11-05 Geoffrey Keating <geoffk@apple.com>
6197 * decl2.c (finish_file): Correct spelling.
6199 2002-11-03 Mark Mitchell <mark@codesourcery.com>
6201 * call.c (build_special_member_call): Do not try to lookup VTTs by
6203 * class.c (vtbl_init_data): Add generate_vcall_entries.
6204 (get_vtable_decl): Do not look up virtual tables by name.
6205 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6206 (set_primary_base): Do not set CLASSTYPE_RTTI.
6207 (determine_primary_base): Likewise.
6208 (get_matching_virtual): Remove.
6209 (get_vcall_index): New function.
6210 (update_vtable_entry_for_fn): Do not try to use virtual thunks
6211 when they are not required. Assign vcall indices at this point.
6212 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6213 Do update dynamic_classes.
6214 (build_vtt): Do not add VTTs to the symbol table.
6215 (build_ctor_vtbl_group): Likewise.
6216 (build_vtbl_initializer): Simplify handling of vcall indices.
6217 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6218 for the most derived class.
6219 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6221 * cp-tree.h (dynamic_classes): New macro.
6222 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
6223 (CLASSTYPE_RTTI): Remove.
6224 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6225 (CLASSTYPE_VCALL_INDICES): New macro.
6226 (CLASSTYPE_VTABLES): Likewise.
6227 (BV_USE_VCALL_INDEX_P): Remove.
6228 (build_vtable_path): Remove.
6229 * decl2.c (finish_vtable_vardecl): Remove.
6230 (key_method): Remove #if 0'd code.
6231 (finish_vtable_vardecl): Rename to ...
6232 (maybe_emit_vtables): ... this.
6233 (finish_file): Use it.
6234 * search.c (look_for_overrides_here): Update comment.
6236 2002-11-01 Zack Weinberg <zack@codesourcery.com>
6239 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6241 2002-10-30 Jason Merrill <jason@redhat.com>
6244 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6245 * call.c (convert_for_arg_passing): Set it.
6246 * except.c (stabilize_throw_expr): Recurse for such an arg.
6248 2002-10-31 Mark Mitchell <mark@codesourcery.com>
6250 * cp-tree.h (lang_decl_flags): Remove init_priority.
6251 (lang_decl): Add delta.
6252 (GLOBAL_INIT_PRIORITY): Remove.
6253 (THUNK_DELTA): Revise definition.
6254 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6255 * dump.c (cp_dump_tree): Don't dump it.
6257 2002-10-30 Mark Mitchell <mark@codesourcery.com>
6260 * typeck2.c (process_init_constructor): Call complete_array_type.
6263 * decl.c (make_typename_type): Issue errors about invalid results.
6265 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6267 Core issue 287, PR c++/7639
6268 * cp-tree.h (lang_type_class): Add decl_list field.
6269 (CLASSTYPE_DECL_LIST): New macro.
6270 (maybe_add_class_template_decl_list): Add declaration.
6271 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6272 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6273 (maybe_add_class_template_decl_list): New function.
6274 (add_implicitly_declared_members): Use it.
6275 * decl.c (maybe_process_template_type_declaration): Likewise.
6276 (pushtag): Likewise.
6277 * friend.c (add_friend): Likewise.
6278 (make_friend_class): Likewise.
6279 * semantics.c (finish_member_declaration): Likewise.
6280 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6281 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6282 to process members and friends in the order of declaration.
6284 2002-10-29 Mark Mitchell <mark@codesourcery.com>
6287 * decl.c (finish_destructor_body): Create the label to jump to
6288 when returning from a destructor here.
6289 (finish_function_body): Rather than here.
6291 2002-10-25 Zack Weinberg <zack@codesourcery.com>
6294 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6295 SCOPE_REF is not null before dereferencing it.
6297 2002-10-25 Mark Mitchell <mark@codesourcery.com>
6299 * call.c (build_over_call): Use DECL_CONTEXT, not
6300 DECL_VIRTUAL_CONTEXT.
6301 * class.c (modify_vtable_entry): Don't mess with
6302 DECL_VIRTUAL_CONTEXT.
6303 (set_vindex): Remove.
6304 (set_primary_base): Remove vfuns_p parameter.
6305 (determine_primary_base): Likewise.
6306 (modify_all_vtables): Likewise.
6307 (layout_class_type): Likewise. Adjust calls to other functions
6309 (finish_struct_1): Adjust calls to modified functions. Set
6311 * cp-tree.h (lang_type_class): Remove vsize.
6312 (CLASSTYPE_VSIZE): Remove.
6313 (lang_decl): Remove thunks.
6314 (DECL_THUNKS): Adjust.
6315 (DECL_VIRTUAL_CONTEXT): Remove.
6316 (duplicate_decls): Don't copy it.
6317 * pt.c (build_template_decl): Don't set it.
6318 (tsubst_decl): Likewise.
6319 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6321 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6322 (build_vtable_entry): Remove.
6323 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6324 (lang_decl): Add thunks.
6325 (DECL_THUNKS): New macro.
6326 * decl.c (duplicate_decls): Copy it.
6327 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6328 * semantics.c (emit_associated_thunks): Simplify.
6330 2002-10-24 David Edelsohn <edelsohn@gnu.org>
6333 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6334 lang_type structure exists before accessing field.
6335 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6336 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6337 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6338 * class.c (check_field_decls): Use new macros.
6339 * typeck2.c (process_init_constructor): Remove redundant check for
6340 existence of lang_type structure.
6342 2002-10-24 Mark Mitchell <mark@codesourcery.com>
6344 * class.c (end_of_base): New method.
6345 (end_of_class): Use it. Check indirect virtual bases.
6347 * class.c (check_field_decls): Fix typo.
6349 2002-10-23 Mark Mitchell <mark@codesourcery.com>
6352 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6356 * spew.c (next_token): Do not return an endless stream of
6357 END_OF_SAVED_INPUT tokens.
6358 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6359 the cached token stream.
6360 (snarf_defarg): Likewise.
6362 2002-10-23 Zack Weinberg <zack@codesourcery.com>
6364 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6365 variably_modified_type_p.
6366 * cp-tree.h: Remove prototype of variably_modified_type_p.
6367 * tree.c (variably_modified_type_p): Remove; now implemented
6368 in language-independent code.
6370 2002-10-22 Mark Mitchell <mark@codesourcery.com>
6373 * spew.c (snarf_parenthesized_expression): New function.
6374 (snarf_block): Use it.
6376 2002-10-22 Richard Henderson <rth@redhat.com>
6378 * method.c (use_thunk): Always compute vcall_value; assert that
6379 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
6380 for vcall thunks as well.
6382 2002-10-21 Mark Mitchell <mark@codesourcery.com>
6384 * class.c (empty_base_at_nonzero_offset_p): New function.
6385 (layout_nonempty_base_or_field): Do not check for conflicts when
6386 laying out a virtual base using the GCC 3.2 ABI.
6387 (build_base_field): Correct checking for presence of empty classes
6388 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6390 * class.c (include_empty_classes): Use normalize_rli.
6391 (layout_class_type): Likewise.
6393 * decl.c (reshape_init): Tweak handling of character arrays.
6396 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6397 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6398 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6399 (check_field_decls): Likewise.
6400 (layout_class_type): Likewise.
6401 (finish_struct_1): Initialize it.
6402 (walk_subobject_offsets): Use it to prune searches.
6404 2002-10-20 Mark Mitchell <mark@codesourcery.com>
6406 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6407 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6408 TARGET_ASM_OUTPUT_MI_THUNK in comments.
6410 2002-10-18 Zack Weinberg <zack@codesourcery.com>
6412 * decl.c (start_decl): Point users of the old initialized-
6413 typedef extension at __typeof__.
6415 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6417 * Make-lang.in (method.o): Depend on TARGET_H.
6418 * method.c (target.h): Include it.
6419 (use_thunk): Use target hooks. Use vcall thunks, if available.
6421 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6423 * class.c (base_derived_from): Make sure return value is a bool.
6425 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6427 * class.c (find_final_overrider_data_s): Remove overriding_fn and
6429 (dfs_base_derived_from): New function.
6430 (base_derived_from): Likewise.
6431 (dfs_find_final_overrider): Use base_derived_from.
6432 (find_final_overrider): Adjust.
6434 2002-10-18 Jason Merrill <jason@redhat.com>
6437 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6438 with condition decls in a template.
6440 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
6442 * class.c (add_method): Compare template parms too.
6444 2002-10-17 Mark Mitchell <mark@codesourcery.com>
6447 * class.c (handle_using_decl): Allow the declaration used to be
6448 from an ambiguous base.
6450 * pt.c (convert_template_argument): Revert this change:
6451 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6452 * pt.c (convert_template_argument): Do not fold non-type
6453 template rguments when inside a template.
6455 * init.c (expand_default_init): Handle brace-enclosed initializers
6458 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6460 * mangle.c (write_expression): Correct handling of enumeration
6462 (write_template_arg): Likewise.
6463 * pt.c (convert_template_argument): Do not fold non-type template
6464 arguments when inside a template.
6467 * cvt.c (convert_to_reference): Allow references as the incoming
6470 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6473 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6474 build_qualified_type.
6476 2002-10-15 Richard Henderson <rth@redhat.com>
6478 * error.c (dump_expr): Use real_to_decimal directly, and with
6481 2002-10-15 Mark Mitchell <mark@codesourcery.com>
6483 * decl.c (reshape_init): Fix typo.
6485 * cp-tree.h (operator_name_info_t): Add arity.
6486 * lex.c (init_operators): Initialize it.
6487 * mangle.c (write_conversion_operator_name): New function.
6488 (write_unqualified_name): Use it.
6489 (write_template_args): Accept template arguments as a TREE_LIST.
6490 (write_expression): Adjust handling of qualified names to match
6493 2002-10-15 Jason Merrill <jason@redhat.com>
6495 * call.c (call_builtin_trap): New fn.
6496 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
6497 (build_call): Don't set current_function_returns_abnormally outside
6500 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6502 * class.c (check_field_decls): Remove empty_p parameter. Instead,
6503 clear CLASSTYPE_EMPTY_P.
6504 (build_base_field): Likewise.
6505 (build_base_fields): Likewise.
6506 (check_bases_and_members): Likewise.
6507 (create_vtbl_ptr): Likewise.
6508 (layout_class_type): Likewise. Ensure that empty classes have
6509 size zero when used as base classes in the 3.2 ABI.
6510 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6511 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
6513 (is_empty_class): Correct definition when using post-3.2 ABI.
6514 * cp-tree.h (lang_type_class): Add empty_p.
6515 (CLASSTYPE_EMPTY_P): New macro.
6517 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
6519 * init.c (build_delete): Do not apply save_expr for arrays.
6520 (build_vec_delete): Likewise.
6522 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6524 * decl.c (layout_var_decl): Call layout_decl even for variables
6525 whose type is an array with unspecified bounds.
6528 * lex.c (do_identifier): Add another option for the parsing
6530 * parse.y (do_id): Use it.
6532 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
6534 PRs C++/6803, C++/7721 and C++/7803
6535 * decl.c (grokdeclarator): Gracefully handle template-name as
6538 2002-10-11 Jason Molenda <jmolenda@apple.com>
6540 * init.c (build_field_list): Provide uses_unions_p with a default
6543 2002-10-11 Mark Mitchell <mark@codesourcery.com>
6546 * cp-tree.h (variably_modified_type_p): New function.
6547 (grokdeclarator) Tighten check for variably modified types as
6549 * pt.c (convert_template_argument): Do not allow variably modified
6550 types as template arguments.
6551 * tree.c (variably_modified_type_p): New function.
6553 * NEWS: Document removal of "new X = ..." extension.
6554 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6555 brace-enclosed initializers.
6556 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6557 (initialize_local_var): Remove declaration.
6558 (expand_static_init): Likewise.
6559 * decl.c (next_initializable_field): New function.
6560 (reshape_init): Likewise.
6561 (check_initializer): Use them. Build dynamic initializer for
6562 aggregates here too.
6563 (initialize_local_var): Simplify, and incorporate cleanup
6564 insertion code as well.
6565 (destroy_local_var): Remove.
6566 (cp_finish_decl): Tidy.
6567 (expand_static_init): Fold checks for whether or not a variable
6568 needs initialization into this function. Simplify.
6569 * decl2.c (do_static_initialization): Simplify.
6570 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6571 be done for us automatically.
6572 (expand_default_init): Handle brace-enclosed initializers
6574 (expand_aggr_init_1): Remove RTL-generation code.
6575 (build_vec_init): Remove "new X = ..." support.
6576 * parse.y (new_initializer): Likewise.
6577 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6578 brace-enclosed initializer.
6579 (create_pseudo_type_info): Likewise.
6580 * typeck2.c (store_init_value): Don't try to handle digest_init
6581 being called more than once.
6582 (digest_init): Tidy handling of brace-enclosed initializers.
6584 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6586 * decl.c (typename_hash): Use htab_hash_pointer.
6588 2002-10-10 Jim Wilson <wilson@redhat.com>
6590 * decl.c (duplicate_decls): Don't call decl_attributes.
6592 2002-10-09 Zack Weinberg <zack@codesourcery.com>
6595 * decl.c (start_decl): Unconditionally issue error for
6596 'typedef foo = bar'.
6597 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6598 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6600 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6602 * decl2.c (prune_vtable_vardecl): Delete unused function.
6604 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6607 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6608 procesing template functions.
6609 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6610 type. Call layout_decl.
6611 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6613 2002-10-07 Richard Henderson <rth@redhat.com>
6615 * decl2.c, pt.c: Revert c++/7754 fix.
6617 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6620 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6622 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6625 * pt.c (for_each_template_parm_r): Handle BASELINKs.
6628 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6629 procesing template functions.
6630 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6631 type. Call layout_decl.
6632 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6634 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6637 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6638 template parameters.
6639 (globals): Add entity and need_abi_warning.
6640 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6641 CLASSTYPE_TEMPLATE_INFO.
6642 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6644 (write_prefix): Handle typename types correctly.
6645 (write_template_prefix): Handle template template parameters
6647 (start_mangling): Add entity parameter.
6648 (finish_mangling): Warn about names whose mangling will change.
6649 (mangle_decl_string): Adjust.
6650 (mangle_type_string): Likewise.
6651 (mangle_special_for_type): Likewise.
6652 (mangle_ctor_vtbl_for_type): Likewise.
6653 (mangle_thunk): Likewise.
6654 (mangle_guard_variable): Likewise.
6655 (mangle_ref_init_variable): Likewise.
6657 2002-10-02 Mark Mitchell <mark@codesourcery.com>
6660 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6661 * cp-tree.h (emit_base_init): Rename to ....
6662 (emit_mem_initializers): ... this.
6663 (expand_member_init): Change prototype.
6664 * init.c (perform_member_init): Compute explicit, rather than
6665 requiring it as a parameter.
6666 (sort_member_init): Rename to ...
6667 (sort_mem_initializers): ... this. Process bases and data members
6669 (sort_base_init): Remove.
6670 (emit_base_init): Rename to ...
6671 (emit_mem_initializers): ... this.
6672 (expand_aggr_vbase_init_1): Remove.
6673 (construct_virtual_bases): Rename to ...
6674 (construct_virtual_base): ... this.
6675 (expand_member_init): Rework handling of base initializers.
6676 * method.c (do_build_copy_constructor): Use
6677 finish_mem_initializers.
6678 * parse.y (member_init): Adjust calls to expand_member_init.
6679 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6680 (tsubst_initializer_list): Use expand_member_init.
6681 * semantics.c (finish_mem_intiailizers): Simplify.
6683 2002-10-02 Matt Austern <austern@apple.com>
6684 * decl.c (walk_vtables_r): Fixed typo that caused result to
6685 never get a nonzero value.
6687 2002-10-02 Roger Sayle <roger@eyesopen.com>
6689 PR optimization/6627
6690 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6691 from here, and move it to tree.h.
6692 * decl.c (cxx_init_decl_processing): If storing the vbit
6693 in function pointers, ensure that force_align_functions_log
6696 2002-10-02 Matt Austern <austern@apple.com>
6698 * class.c (check_field_decls): Changed warning about const member
6699 variables so that it doesn't get issued for a class aggregate.
6701 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6703 * decl.c (cp_finish_decl): Make sure array types are laid out,
6704 even if the array bounds are unknown.
6706 2002-10-01 Steve Ellcey <sje@cup.hp.com>
6708 * class.c (build_vtbl_initializer): Change build_c_cast
6711 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6713 * decl.c (cp_finish_decl): Make sure array types are laid out,
6714 even if the array bounds are unknown.
6716 * decl.c (cp_finish_decl): Correct check for dynamic
6717 initialization of thread-local storage.
6719 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
6721 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6724 2002-09-30 Steve Ellcey <sje@cup.hp.com>
6726 * class.c (build_vtbl_initializer): Add cast.
6727 (add_vcall_offset_vtbl_entries_1):
6728 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6730 2002-09-30 Mark Mitchell <mark@codesourcery.com>
6732 * class.c (walk_subobject_offsets): Correct the calculation of
6733 offsets for virtual bases. Correct the counting of array
6735 (layout_nonempty_base_or_field): Simplify. Correct the
6736 calculation of offsets to be propagated through the binfo
6738 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6739 Add the FIELD_DECL to TYPE_FIELDS.
6740 (build_base_fields): Adjust accordingly.
6741 (layout_virtual_bases): Use build_base_field.
6742 (end_of_class): Return a tree, not an integer.
6743 (warn_about_ambiguous_direct_bases): Rename to ...
6744 (warn_about_ambiguous_bases): ... this.
6745 (include_empty_classes): New function.
6746 (layout_class_type): Create an alternative version of the type to
6747 be used when as a base class type. Do not call
6748 finish_record_layout until we are done laying out the class.
6749 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
6751 (CLASSTYPE_SIZE): Reimplement.
6752 (CLASSTYPE_SIZE_UNIT): Likewise.
6753 (CLASSTYPE_ALIGN): Likweise.
6754 (CLASSTYPE_USER_ALIGN): Likewise.
6755 (CLASSTYPE_AS_BASE): New macro.
6756 (DECL_INITIALIZED_P): Likewise.
6757 (extract_init): Remove prototype.
6758 (build_forced_zero_init): Rename to ...
6759 (build_zero_init): ... this.
6760 (force_store_init_value): Remove.
6761 * decl.c (obscure_complex_init): Remove.
6762 (duplicate_decls): Copy DECL_INITIALIZED_P.
6763 (check_initializer): Do not leave junk in DECL_INITIAL.
6764 (cp_finish_decl): Handle zero-initialization of entities with
6765 static storage duration.
6766 * expr.c (extract_init): Remove.
6767 * init.c (build_forced_zero_init): Remove.
6768 (build_zero_init): New function.
6769 (build_default_init): Use it.
6770 (build_field_list): Skip FIELD_DECLs for base subobjects.
6771 (push_base_cleanups): Likewise.
6772 * method.c (do_build_assign_ref): Likewise.
6773 (synthesize_exception_spec): Likewise.
6774 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6775 (regenerate_decl_from_template): To not set DECL_INITIAL for a
6776 static data member whose initialization took place in its class.
6777 (instantiate_decl): Do not pass an initializer to cp_finish_decl
6779 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6780 (dfs_unuse_fields): Likewise.
6781 * tree.c (pod_type_p): Handle error_mark_node.
6782 (zero_init_p): Likewise.
6783 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6785 * typeck2.c (store_init_value): Remove #if 0'd code.
6786 (force_store_init_value): Remove.
6787 (process_init_constructor): Use build_zero_init.
6789 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
6792 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6794 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
6796 * cp-tree.h: Fix comment typos.
6800 2002-09-25 Mark Mitchell <mark@codesourcery.com>
6802 * cp/class.c (contains_empty_class_p): New method.
6803 (walk_subobject_offsets): Correct computation of field offset.
6804 (layout_empty_base): Correct placement of emtpy base classes.
6805 (layout_class_type): Warn about ABI changes.
6807 2002-09-23 Mark Mitchell <mark@codesourcery.com>
6809 * cp/class.c (layout_virtual_bases): Do not round the size of the
6810 type to a multiple of the alignment before laying out virtual bases.
6811 (layout_class_type): Correct handling of bit-fields that are wider
6812 than their type inside unions. Round the size of the type to a
6813 even number of bytes when computing the size without virtual
6815 * cp/cp-tree.h (abi_version_at_least): New macro.
6817 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
6819 * ChangeLog: Follow spelling conventions.
6820 * ChangeLog.2: Likewise.
6822 * class.c: Likewise.
6823 * cp-tree.h: Likewise.
6826 * decl2.c: Likewise.
6827 * except.c: Likewise.
6828 * friend.c: Likewise.
6829 * g++spec.c: Likewise.
6832 * mangle.c: Likewise.
6833 * method.c: Likewise.
6834 * operators.def: Likewise.
6835 * optimize.c: Likewise.
6838 * search.c: Likewise.
6839 * semantics.c: Likewise.
6842 * typeck.c: Likewise.
6844 2002-09-18 Devang Patel <dpatel@apple.com>
6846 * cp/cp-tree.h: New prototype for walk_vtabls().
6847 * cp/decl.c (walk_vtables_r): New function.
6848 (struct cp_binding_level): Add new members, namespaces,
6849 names_size and vtables.
6850 (add_decl_to_level): Add decl in namespaces or vtables
6851 chain, if conditions match.
6852 (walk_vtables): New function.
6853 (walk_namespaces_r): Travers separate namespace chain
6854 for namespace decls.
6855 (wrapup_globals_for_namespace): Use names_size instead
6857 * cp/decl2.c (finish_file): Use walk_vtables() instead of
6858 walk_globals() to walk vtable decls.
6860 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
6862 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6863 ICE with invalid pointers & references.
6865 2002-09-17 Zack Weinberg <zack@codesourcery.com>
6867 * Make-lang.in: Remove all references to the demangler.
6868 * cxxfilt.c: Moved to binutils.
6870 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6873 * pt.c (tsubst_decl): Remove assert.
6875 Remove DR 295 implementation.
6876 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6877 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6878 about ignoring volatile qualifiers.
6880 * search.c (lookup_member): Correct documentation.
6882 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6884 * cp-tree.h (union lang_tree_node): Add chain_next option.
6886 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6888 * parse.y (parse_finish_call_expr): Check lookup_member result.
6891 * semantic.c (finish_asm_stmt): Fix operand/output_operands
6893 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6895 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
6898 * call.c (build_over_call): Convert this pointer for fns found by
6901 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6903 * ChangeLog: Follow spelling conventions.
6904 * ChangeLog.1: Likewise.
6906 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
6909 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6911 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
6913 * error.c: Fix comment formatting.
6914 * except.c: Likewise.
6916 * friend.c: Likewise.
6917 * g++spec.c: Likewise.
6920 * mangle.c: Likewise.
6921 * method.c: Likewise.
6922 * optimize.c: Likewise.
6925 * search.c: Likewise.
6926 * semantics.c: Likewise.
6929 * typeck.c: Likewise.
6930 * typeck2.c: Likewise.
6932 2002-09-13 Matt Austern <austern@apple.com>
6935 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6936 * cp/call.c: Change call-by-const-reference mechanism to use
6937 non_cast_lvalue_p when deciding whether the create a temporary.
6938 We need a temporary when passing, e.g. (long) x by const ref.
6940 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
6942 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6944 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
6946 * decl.c: Fix comment formatting.
6947 * decl2.c: Likewise.
6949 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
6951 * call.c: Fix comment formatting.
6952 * class.c: Likewise.
6953 * cp-lang.c: Likewise.
6954 * cp-tree.h: Likewise.
6957 2002-09-11 Zack Weinberg <zack@codesourcery.com>
6959 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6960 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6961 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6962 minor adjustments (use version_string, eliminate yet another
6963 duplicate of xmalloc)
6965 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6967 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6969 2002-09-05 Jason Merrill <jason@redhat.com>
6971 * typeck2.c (add_exception_specifier): Only pedwarn for an
6973 (require_complete_eh_spec_types): New fn.
6974 (cxx_incomplete_type_diagnostic): Also support pedwarning.
6975 * typeck.c (complete_type_or_diagnostic): Likewise.
6976 * call.c (build_call): Call require_complete_eh_spec_types.
6977 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6978 on an incomplete type.
6980 2002-09-04 Jakub Jelinek <jakub@redhat.com>
6982 * decl.c (start_cleanup_fn): Clear interface_only before
6983 start_function, restore it afterwards.
6985 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
6987 * cp-tree.h (finish_builtin_type): Remove.
6988 * decl2.c (finish_builtin_type): Move to common code.
6989 * decl.c (build_ptrmemfunc_type): Adjust.
6990 * rtti.c (create_pseudo_type_info): Adjust.
6991 (create_tinfo_types): Adjust.
6993 2002-08-31 Jason Merrill <jason@redhat.com>
6995 * cp-lang.c (cp_expr_size): Allow initialization from a
6998 2002-08-30 Richard Henderson <rth@redhat.com>
7001 * tree.c: Include target.h.
7002 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7004 * Makefile.in (tree.o): Update.
7006 2002-08-27 Mark Mitchell <mark@codesourcery.com>
7008 * class.c (layout_virtual_bases): Warn about bugs in G++ that
7009 result in incorrect object layouts.
7010 (layout_class_type): Likewise.
7012 2002-08-24 Matt Austern <austern@apple.com>
7014 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7016 (real_lvalue_p): Update caller.
7018 (non_cast_lvalue_or_else): New.
7019 * tree.h: Declare it.
7020 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7022 2002-08-22 Mark Mitchell <mark@codesourcery.com>
7024 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7025 and COND_EXPR specially; fix error message output.
7027 2002-08-22 Jason Merrill <jason@redhat.com>
7029 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7030 * semantics.c (nullify_returns_r): Likewise.
7032 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
7035 * typeck.c (finish_class_member_access_expr): Diagnose cases where
7036 name lookup finds nothing.
7038 2002-08-15 Jason Merrill <jason@redhat.com>
7040 * semantics.c (finish_then_clause): Remove redundant assignment.
7041 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7042 extra binding level outside the if/switch statement.
7043 (finish_while_cond, finish_for_cond): Rewrite complex condition
7046 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
7048 * parse.y (sizeof, alignof, typeof): New non-terminals to
7049 increment skip_evaluation. Replace terminals with them and
7050 decrement skip_evaluation at the end of rules using them.
7051 * decl2.c (mark_used): Don't assemble_external if
7052 skipping evaluation.
7054 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
7057 * parse.y (parse_finish_call_expr): Handle incomplete
7058 type used to name a scope.
7060 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
7063 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7064 regression caused by my 2002-08-08 patch.
7066 2002-08-13 Mark Mitchell <mark@codesourcery.com>
7068 * decl.c (pushdecl_class_level): Honor requests to bind names to
7071 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7073 * decl2.c (build_call_from_tree): Fix uninitialized variable.
7074 * parse.y (parse_finish_call_expr): Likewise.
7075 * repo.c (old_args, old_dir, old_main): Const-ify.
7077 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
7079 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7080 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7081 * optimize.c (maybe_clone_body): Likewise.
7082 * pt.c (tsubst_enum): Likewise.
7083 (lookup_template_class): Likewise.
7084 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7086 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
7088 * lang-specs.h: Remove -ansi.
7090 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
7092 * tree.c (maybe_dummy_object): Replace // with /* */
7094 2002-08-09 Mark Mitchell <mark@codesourcery.com>
7096 * call.c (standard_conversion): Use build_ptrmem_type.
7097 * cp-tree.h (build_ptrmem_type): New function.
7098 (adjust_result_of_qualified_name_lookup): Likewise.
7099 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7100 static data members.
7101 (build_ptrmem_type): New function.
7102 (grokdeclarator): Do not use build_offset_type when encountering a
7104 * parse.y (parse_finish_call_expr): Use
7105 adjust_result_of_qualified_name_lookup.
7106 * search.c (adjust_result_of_qualified_name_lookup): New function.
7107 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7108 accessing OFFSET_TYPEs directly.
7110 2002-08-08 Mike Stump <mrs@apple.com>
7112 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7113 (type_decays_to): Likewise.
7114 * class.c (find_final_overrider): Likewise.
7115 (maybe_note_name_used_in_class): Likewise.
7116 * decl.c (current_tmpl_spec_kind): Likewise.
7117 (add_binding): Likewise.
7118 (push_class_binding): Likewise.
7119 (duplicate_decls): Likewise.
7120 (layout_var_decl): Likewise.
7121 (grokfndecl): Likewise.
7122 (grokdeclarator): Likewise.
7123 (check_default_argument): Likewise.
7124 * decl2.c (handle_class_head): Likewise.
7125 * error.c (dump_template_decl): Likewise.
7126 * init.c (build_offset_ref): Likewise.
7127 * pt.c (check_specialization_scope): Likewise.
7128 (determine_specialization): Likewise.
7129 (check_explicit_specialization): Likewise.
7130 (maybe_check_template_type): Likewise.
7131 (process_partial_specialization): Likewise.
7132 (check_default_tmpl_args): Likewise.
7133 (push_template_decl_real): Likewise.
7134 (convert_template_argument): Likewise.
7135 (try_class_unification): Likewise.
7136 (get_bindings_real): Likewise.
7137 (do_decl_instantiation): Likewise.
7138 * semantics.c (begin_function_definition): Likewise.
7139 (finish_member_declaration): Likewise.
7140 (check_multiple_declarators): Likewise.
7141 * typeck.c (comp_array_types): Likewise.
7142 (comptypes): Likewise.
7143 (expr_sizeof): Likewise.
7144 (build_binary_op): Likewise.
7145 (dubious_conversion_warnings): Likewise.
7146 (check_return_expr): Likewise.
7148 2002-08-08 Mark Mitchell <mark@codesourcery.com>
7150 * typeck.c (build_class_member_access_expr): Do not return
7151 error_mark_node when no error has occurred.
7153 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7155 * typeck.c (build_component_addr): Remove.
7156 (build_unary_op): Just check it's not a bitfield, and then build
7159 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7161 * class.c (convert_to_base): Correct check for error_mark_node.
7162 (create_vtable_ptr): Remove unused VFUNS_P parm.
7164 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7166 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7168 2002-08-07 Mark Mitchell <mark@codesourcery.com>
7170 Rework build_component_ref.
7171 * call.c (build_vfield_ref): Do not go through build_component_ref.
7172 (build_field_call): Use build_class_member_access_expr.
7173 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7174 (build_object_call): Likewise.
7175 * class.c (convert_to_base): New function.
7176 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7177 (instantiate_type): Handle BASELINKs.
7178 * cp-tree.def (BASELINK): New tree code.
7179 * cp-tree.h (BASELINK_P): Reimplement.
7180 (SET_BASELINK_P): Remove.
7181 (BASELINK_BINFO): Reimplement.
7182 (BASELINK_FUNCTIONS): Likewise.
7183 (BASELINK_ACCESS_BINFO): Likewise.
7184 (BASELINK_OPTYPE): Likewise.
7185 (convert_to_base): New function.
7187 (build_object_ref): Remove.
7188 (build_component_ref_1): Likewise.
7189 (build_component_ref): Likewise.
7190 (build_x_component_ref): Likewise.
7191 (build_class_member_access_expr): New function.
7192 (finish_class_member_access_expr): Likewise.
7193 (build_ptrmemfunc_access_expr): Likewise.
7194 * decl.c (grokdeclarator): Handle BASELINKs.
7195 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7196 finish_class_member_access_expr.
7197 (arg_assoc): Handle BASELINKs.
7198 (do_class_using_decl): Likewise.
7199 * error.c (dump_decl): Likewise.
7200 (dump_expr): Use build_ptrmemfunc_access_expr.
7201 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7203 (build_throw): Use BASELINK_FUNCTIONS.
7204 * init.c (perform_member_init): Use
7205 build_class_member_access_expr.
7206 (build_offset_ref): Handle BASELINKs. Use
7207 build_class_member_access_expr.
7208 * method.c (hack_identifier): Likewise.
7209 * parse.y (do_id): Use BASELINK, not TREE_LIST.
7210 (primary): Remove uses of build_object_ref.
7211 * pt.c (lookup_template_function): Handle BASELINKs.
7212 (resolve_overloaded_unification): Likewise.
7213 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7214 (lookup_field): Use BASELINK, not TREE_LIST.
7215 (lookup_fnfiels): Likewise.
7216 (setup_class_bindings): Likewise.
7217 * semantics.c (finish_object_call_expr): Do not use
7218 build_method_call when we already know what function is being
7220 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7221 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7223 (name_p): New function.
7224 * typeck.c (build_object_ref): Remove.
7225 (build_component_ref_1): Likewise.
7226 (build_x_component_ref): Likewise.
7227 (build_class_member_access_expr): New function.
7228 (finish_class_member_access_expr): Likewise.
7229 (build_ptrmemfunc_access_expr): Likewise.
7230 (get_member_function_from_ptrfunc): Use
7231 build_ptrmemfunc_access_expr.
7232 (build_binary_op): Likewise.
7233 (build_unary_op): Likewise.
7234 (build_ptrmemfunc): Likewise.
7235 (pfn_from_ptrmemfunc): Likewise.
7236 * typeck2.c (build_m_component_ref): Adjust comment.
7238 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
7240 * Make-lang.in (CXX_C_OBJS): Update.
7241 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7242 * cp-tree.h (cxx_decode_option): Remove.
7243 * decl2.c (compare_options, lang_f_options, unsupported_options,
7244 cxx_decode_option): Remove.
7246 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
7248 * typeck.c (build_x_unary_op): Handle pointer-to-member.
7250 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
7252 * class.c: Don't include obstack.h.
7254 * decl2.c: Delete bogus comment.
7255 * error.c: Don't include obstack.h.
7256 * except.c: Likewise.
7257 (dump_type): Correct comment.
7258 * method.c: Don't include obstack.h.
7261 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
7264 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7265 expressions to pointer-to-data-member of pointer-to-member-functions.
7267 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
7269 * cvt.c (ocp_convert): Delete obsolete code.
7270 * parse.y (permanent_obstack): Delete declaration.
7271 * pt.c (permanent_obstack): Delete declaration.
7272 * repo.c (permanent_obstack): Delete declaration.
7273 (open_repo_file): Use xmalloc instead of permanent_obstack.
7274 (init_repo): Use xstrdup instead of permanent_obstack.
7276 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
7278 * cp-tree.h (VF_DERIVED_VALUE): Remove.
7279 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7281 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
7284 C++ ABI change - vfunc ordering.
7285 * class.c (add_virtual_function): Remove.
7286 (dfs_modify_all_vtables): Take list of all declared
7287 virtuals. Assign all that are not in primary base.
7288 (check_for_override): Adjust comments.
7289 (create_vtable_ptr): Take single list of virtuals. Build chain
7290 of declared virtuals here.
7291 (layout_class_type): Take single list of virtuals. Adjust.
7292 (finish_struct_1): Keep virtuals on single list. Adjust.
7294 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7296 * init.c (build_member_call): Use build_new_method_call, not
7299 2002-08-02 Krister Walfridsson <cato@df.lth.se>
7301 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7303 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7305 * call.c (build_method_call): Issue a more helpful error message
7306 about ambiguous method names.
7308 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
7310 * tree.c (build_shared_int_cst): Make cache file scope, and
7313 2002-08-02 Jason Merrill <jason@redhat.com>
7315 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7316 (cp_expr_size): New fn.
7317 * call.c (build_over_call): Lose empty class hackery.
7318 (convert_arg_to_ellipsis): Promote non-POD warning to error.
7319 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7321 * semantics.c (expand_body): Do tree optimization in the function
7324 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
7326 * cp-tree.h: Move all warning and flag declarations to c-common.h.
7327 * decl.c: Move all warning and flag variables to c-common.c.
7328 * decl2.c: Move all warning and flag variables to c-common.c.
7329 * lex.c (flag_digraphs): Remove.
7330 (warn_traditional): Now in c-common.c.
7332 2002-07-31 Mark Mitchell <mark@codesourcery.com>
7334 * call.c (build_field_call): Do not look up the field by name.
7335 (build_method_call): Simplify.
7336 (struct z_candidate): Add access_path and conversion_path. Remove
7338 (convert_class_to_reference): Adjust use of
7339 add_function_candidate.
7340 (add_candidate): Add conversion_path argument.
7341 (add_function_candidate): Use it.
7342 (add_conv_dndidate): Likewise.
7343 (build_builtin_candidate): Likewise.
7344 (add_template_candidate_real): Add conversion_path argument.
7345 (add_template_conv_candidate): Likewise.
7346 (add_template_candidate): Likewise.
7347 (build_user_type_conversion_1): Use it.
7348 (build_new_function_call): Remove name lookup code. Adjust use of
7349 add_template_candidate and add_function_candidate.
7350 (build_new_op): Likewise.
7351 (convert_like_real): Use build_special_member_call.
7352 (build_over_call): Use cand->conversion_path.
7353 (build_special_member_call): New method.
7354 (build_new_method_call): Remove name lookup code.
7355 * cp-tree.def (OFFSET_REF): Update documentation.
7356 (TEMPLATE_ID_EXPR): Likewise.
7357 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7358 (BASELINK_OPTYPE): Likewise.
7359 (build_new_method_call): Adjust prototype.
7360 (build_special_member_call): New method.
7361 (build_baselink): New method.
7362 (build_offset_ref_call_from_tree): Likewise.
7363 (build_call_from_tree): Likewise.
7364 (finish_qualified_call_expr): Remove.
7365 (finish_call_expr): Adjust prototype.
7366 (build_x_function_call): Remove.
7367 * cvt.c (ocp_convert): Use build_special_member_call.
7368 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7369 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7371 (build_offset_ref_call_from_tree): New function.
7372 (build_call_from_tree): Likewise.
7373 * init.c (expand_cleanup): Use build_special_member_call.
7374 (expand_default_init): Likewise.
7375 (build_member_call): Use finish_call_expr.
7376 (build_new_1): Use build_special_member_call.
7377 (push_base_cleanups): Likewise.
7378 * method.c (do_build_assign_ref): Likewise.
7379 * parse.y (template_id): Do not pass a COMPONENT_REF to
7380 lookup_template_function.
7381 (primary): Use parse_finish_call_epxr, not finish_call_expr.
7382 (parse_finish_call_expr): New function.
7383 * pt.c (lookup_template_function): Add assertions.
7384 * search.c (lookup_base): Allow T to be a binfo.
7385 (build_baselink): New function.
7386 (lookup_member): Use it.
7387 * semantics.c (finish_call_expr): Do not do name lookup.
7388 (finish_object_call_expr): Remove #if 0'd code.
7389 (finish_qualified_call_expr): Remove.
7390 * typeck.c (build_x_function_call): Remove.
7391 (build_static_case): Use build_special_member_call.
7392 * typeck2.c (build_functional_cast): Likewise.
7394 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7396 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7398 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
7400 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7402 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
7404 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7407 2002-07-29 Alan Modra <amodra@bigpond.net.au>
7409 * cp-tree.h: Comment typo fix.
7411 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
7413 * spew.c (space_for_token): Allocate zeroed memory for a new token
7416 2002-07-27 Roger Sayle <roger@eyesopen.com>
7418 * decl.c (builtin_function_1): No need to explicitly mark
7419 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7421 2002-07-27 Roger Sayle <roger@eyesopen.com>
7423 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7425 2002-07-26 Jason Merrill <jason@redhat.com>
7427 * call.c (build_over_call): Likewise.
7428 (cp_convert_parm_for_inlining): New fn.
7429 (convert_for_arg_passing): New fn.
7430 (convert_default_arg, build_over_call): Use it.
7431 (type_passed_as): New fn.
7432 * pt.c (tsubst_decl): Use it.
7433 * decl2.c (cp_build_parm_decl): New fn.
7434 (build_artificial_parm): Use it.
7435 (start_static_storage_duration_function): Likewise.
7436 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7437 (grokparms): Don't mess with DECL_ARG_TYPE.
7438 * typeck.c (convert_arguments): Use convert_for_arg_passing.
7439 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7441 * cp-tree.h: Declare new fns.
7443 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
7445 * cp-tree.h (flag_operator_names): Remove.
7446 * decl2.c (flag_operator_names): Remove.
7447 (lang_f_options): Remove operator-names.
7448 * lex.c (D_OPNAME): Remove.
7449 (reswords): Remove operator names.
7450 (rid_to_yy): Remove operator names.
7451 (init_reswords): No need to handle D_OPNAME.
7452 * spew.c (read_process_identifier): There are no operator
7455 2002-07-26 Jason Merrill <jason@redhat.com>
7457 * dump.c (cp_dump_tree): Call c_dump_tree.
7458 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7460 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7462 * error.c (print_whitespace): Remove.
7463 * g++spec.c (LIBUNWIND): Move.
7464 * mangle.c (mangled_position, write_signed_number): Remove.
7466 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7468 * decl2.c (cxx_decode_option): Similarly.
7470 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
7472 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7473 (cxx_sizeof_or_alignof_type): Take a third argument.
7474 (cxx_sizeof): Adjust definition.
7475 (cxx_alignof): Likewise.
7476 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7477 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7479 (c_sizeof_nowarn): Remove definition.
7480 (build_unary_op): Use cxx_sizeof_nowarn.
7482 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
7484 * tree.c (cp_build_qualified_type_real): When copying
7485 pointer-to-method types, unshare the record that holds
7486 the cached pointer-to-member-function type.
7488 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7490 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7492 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
7495 * typeck.c (cxx_sizeof_or_alignof_type): New function.
7496 (c_sizeof): Remove definition.
7497 (expr_sizeof): Use cxx_sizeof.
7498 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7499 * decl.c (finish_destructor_body): Use cxx_sizeof.
7500 * semantics.c (finish_alignof): Likewise.
7501 (finish_alignof): Use cxx_alignof.
7502 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7503 (cxx_sizeof_or_alignof_type): Declare.
7504 (my_friendly_assert): Move to ../c-common.h.
7506 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7508 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7510 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7512 PR c++/7347, c++/7348
7513 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7514 * decl.c (make_typename_type): Use it.
7515 (make_unbound_class_template): Likewise.
7516 (lookup_name_real): Don't call type_access_control if scope is
7517 template parameter dependent.
7518 * parse.y (template_arg): Call make_unbound_class_template with
7520 (nest_name_specifier): Call make_typename_type with tf_parsing set.
7521 (typename_sub0): Likewise.
7522 (typename_sub1): Likewise.
7523 (instantiate_decl): Push class scope.
7524 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7525 for both static variable and member function template.
7526 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7528 * search.c (type_access_control): Do type access for TEMPLATE_DECL
7531 2002-07-20 Roger Sayle <roger@eyesopen.com>
7533 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7534 test by using positive_option. Make whitespace consistent.
7536 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
7538 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7539 members with 'locus'. Adjust use throughout.
7540 (struct feed): Likewise.
7541 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7543 (snarf_defarg): Use error(), not error_with_file_and_line().
7545 2002-07-19 Chris Demetriou <cgd@broadcom.com>
7547 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7548 cpp_options is included.
7550 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7552 PR c++/2862, c++/2863
7553 * pt.c (determine_specialization): Compare the length of
7554 TYPE_ARG_TYPES. Tidy.
7556 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7559 * decl.c (duplicate_decls): Don't propagate inlining parameters from
7560 olddecl to newdecl when newdecl is a specialization of the
7561 instantiation olddecl.
7563 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7565 PR c++/4802, c++/5387
7566 * decl.c (make_typename_type): Use enforce_access.
7568 2002-07-17 Scott Snyder <snyder@fnal.gov>
7571 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7573 2002-07-12 Mark Mitchell <mark@codesourcery.com>
7575 * class.c (add_method): Correct handling of conversion operators.
7577 2002-07-11 Mark Mitchell <mark@codesourcery.com>
7580 * class.c (add_method): Simplify.
7582 2002-07-11 Jason Merrill <jason@redhat.com>
7585 * tree.c (cp_copy_res_decl_for_inlining): Also copy
7588 2002-07-10 Graham Stott <graham.stott@btinternet.com>
7590 * pt.c (template_parm_this_level_p, push_template_decl_real):
7591 Pass depth as int pointer.
7593 2002-07-11 Tim Josling <tej@melbpc.org.au>
7595 Remove front end hard coding from gengtype.c.
7597 * config-lang.in (gtfiles): Add files needed for this front end.
7599 2002-07-10 Mark Mitchell <mark@codesourcery.com>
7601 * cp-tree.h (unqualified_name_lookup_error): Declare it.
7602 (begin_function_definition): Adjust prototype.
7603 * lex.c (unqualified_name_lookup_error): New function, split out
7605 (do_identifier): ... here.
7606 * parse.y (parse_begin_function_definition): New function.
7608 * semantics.c (begin_function_definition): Accept decl-specifiers
7609 and attributes as separate parameters.
7611 2002-07-10 Jason Merrill <jason@redhat.com>
7614 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7615 modifying the old one.
7617 2002-07-09 Mark Mitchell <mark@codesourcery.com>
7619 * cp-tree.h (constructor_name_p): Declare it.
7620 (check_template_template_default_arg): Likewise.
7621 * class.c (handle_using_decl): Use constructor_name_p.
7622 * decl.c (grokdeclarator): Likewise.
7623 * decl2.c (constructor_name_p): Define it.
7624 * init.c (build_member_call): Use constructor_name_p.
7625 * parse.y (template_parm): Use check_template_template_default_arg.
7626 * pt.c (check_explicit_specialization): Use constructor_name_p.
7627 * semantics.c (check_template_template_default_arg): New function.
7629 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7631 * pt.c (can_complete_type_without_circularity): Add static to
7632 function definition.
7634 2002-07-08 Mark Mitchell <mark@codesourcery.com>
7636 * cp-tree.h (have_extern_spec): Declare it
7637 * decl.c (have_extern_spec): Define it.
7638 (start_decl): Eliminate use of used_extern_spec.
7639 (start_function): Likewise.
7640 * parse.y (have_extern_spec): Remove declaration.
7641 (used_extern_spec): Likewise.
7642 (frob_specs): Eliminate use of used_extern_spec.
7643 (.hush_warning): Likewise.
7645 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7647 * Make-lang.in (cp/parse.o): Depend on decl.h.
7648 * cp-tree.h (do_decl_instantiation): Change prototype.
7649 * parse.y: Include decl.h.
7650 (parse_decl_instantiation): New function.
7651 (explicit_instantiation): Use it.
7652 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7655 2002-07-07 Roger Sayle <roger@eyesopen.com>
7657 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7658 constructor and destructor tests when passed a TEMPLATE_DECL.
7660 2002-07-05 Jason Merrill <jason@redhat.com>
7662 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7665 PR optimization/7145
7666 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7668 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
7670 Repair damage on weak-impared targets caused by my previous patch.
7671 * cp-tree.h (import_export_tinfo): Add parameter.
7672 * decl2.c (import_export_tinfo): Add parameter, post adjust
7674 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7675 import_export_tinfo.
7677 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7680 * init.c (build_aggr_init): Remove qualifiers of init before calling
7682 (build_vec_init): Flatten multi-dimensional array during cleanup.
7683 (build_vec_delete_1): Abort if the type of each element is array.
7685 2002-07-03 Graham Stott <graham.stott@btinternet.com>
7687 * pt.c (instantiate_class_template): Fix typo.
7689 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7691 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7692 by CVS conflict in my last patch.
7694 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7697 * pt.c (can_complete_type_without_circularity): New function.
7698 (instantiate_class_template): Use it.
7699 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7700 message due to incomplete fields.
7702 2002-07-01 Mark Mitchell <mark@codesourcery.com>
7705 * mangle.c (write_expression): Add mangling for sizeof when
7707 * operators.def: Remove stale comment.
7709 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
7711 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7712 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7713 (tinfo_decl_type): Replace with ...
7714 (type_info_ptr_type): ... this.
7715 (import_export_tinfo): Declare.
7716 (tinfo_decl_p): Rename to ...
7717 (unemitted_tinfo_decl_p): ... this.
7718 * decl2.c (import_export_decl): Break out tinfo handling into ...
7719 (import_export_tinfo): ... here. New function.
7720 (finish_file): Adjust.
7721 * rtti.c (TINFO_REAL_NAME): New macro.
7722 (init_rtti_processing): Create the tinfo types.
7723 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7724 (get_tinfo_decl): Adjust.
7725 (get_tinfo_ptr): New function.
7726 (get_type_id): Use it.
7727 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7728 (ptr_initializer): Use get_tinfo_ptr.
7729 (ptm_initializer): Likewise.
7730 (synthesize_tinfo_var): Break into ...
7731 (get_pseudo_ti_init): ... this. Just create the initializer.
7732 (get_pseudo_ti_desc): .. and this.
7733 (create_real_tinfo_var): Remove.
7734 (create_pseudo_type_info): Don't create the vtable decl here.
7735 (get_vmi_pseudo_type_info): Remove.
7736 (create_tinfo_types): Adjust.
7737 (tinfo_decl_p): Rename to ...
7738 (unemitted_tinfo_decl_p): ... here. Adjust.
7739 (emit_tinfo_decl): Adjust. Create the initializer.
7741 2002-06-27 Mark Mitchell <mark@codesourcery.com>
7744 * pt.c (tsubst_friend_class): Substitute into the context of the
7745 friend before using it.
7747 2002-06-26 Mark Mitchell <mark@codesourcery.com>
7749 * cp-tree.h (xref_tag): Change prototype.
7750 (handle_class_head): Likewise.
7751 (build_x_component_ref): Likewise.
7752 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7753 (xref_tag): Take attributes as a separate parameter.
7754 (xref_tag_from_type): Adjust call to xref_tag.
7755 * decl2.c (build_expr_from_tree): Adjust call to
7756 build_x_component_ref.
7757 (handle_class_head): Take attributes as a separate parameter.
7758 * parse.y (parse_xref_tag): New function.
7759 (parse_handle_class_head): Likewise.
7760 (primary): Use parse_xref_tag.
7761 (class_head_decl): Use parse_handle_class_head.
7762 (class_head_defn): Likewise.
7763 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7764 (build_dynamic_cast_1): Likewise.
7765 (create_pseudo_type_info): Likewise.
7766 (emit_support_tinfos): Likewise.
7767 * typeck.c (build_object_ref): Adjust call to
7768 build_x_component_ref.
7769 (build_x_component_ref): Remove protect parameter.
7771 2002-06-25 Mark Mitchell <mark@codesourcery.com>
7773 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7774 * class.c (handle_using_decl): Likewise.
7775 (instantiate_type): Likewise.
7776 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7777 (xref_basetypes): Change prototype.
7778 (begin_mem_initializers): New function.
7779 (get_overloaded_fn): Likewise.
7780 * decl.c (xref_basetypes): Simplify.
7781 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7782 * init.c (build_offset_ref): Likewise.
7783 * parse.y (base_init): Use begin_mem_initializers().
7784 (structsp): Adjust call to xref_basetypes.
7785 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7786 (instantiate_class_template): Adjust call to xref_basetypes.
7787 * semantics.c (begin_mem_initializers): New function.
7788 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7789 (really_overlaoded_fn): Likewise.
7790 (get_overloaded_fn): New function.'
7791 (get_first_fn): USe BASELINK_FUNCTIONS.
7793 2002-06-24 Mark Mitchell <mark@codesourcery.com>
7795 * cp-tree.h (SCALAR_TYPE_P): New macro.
7796 (check_for_out_of_scope_variable): New function.
7797 (at_class_scope_p): Likewise.
7798 (finish_fname): Likewise.
7799 * class.c (finish_struct): Use at_function_scope_p.
7800 * decl.c (check_for_out_of_scope_variable): New function, split
7801 out from do_identifier.
7802 (finish_enum): Use at_function_scope_p.
7803 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7804 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
7805 (primary): Use at_function_scope_p.
7806 * search.c (at_class_scope_p): New function.
7807 * semantics.c (finish_fname): Likewise.
7808 (check_multiple_declarators): Use at_function_scope_p.
7810 2002-06-23 Mark Mitchell <mark@codesourcery.com>
7812 * parse.y (parse_scoped_id): New function.
7814 * cp-tree.h (do_scoped_id): Adjust declaration.
7815 * lex.c (do_scoped_id): Remove call to yylex.
7816 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7817 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7818 expanding it inline.
7820 2002-06-23 Matt Thomas <matt@3am-software.com>
7822 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7825 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7827 * mangle.c (integer_type_codes): Const-ify.
7829 2002-06-20 Richard Henderson <rth@redhat.com>
7832 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7833 Call put_var_into_stack.
7835 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7837 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7838 array size calculation.
7840 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7843 * pt.c (tsubst_expr): Handle FILE_STMT.
7845 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7848 * pt.c (lookup_template_class): Don't build complete argument of
7849 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7852 2002-06-19 Akim Demaille <akim@epita.fr>
7854 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7856 * spew.c, lex.c: Adjust.
7857 * parse.y (explicit_instantiation): Add empty action to override
7858 the default $$ = $1 where it introduces a type clash.
7860 2002-06-14 Jason Merrill <jason@redhat.com>
7862 * semantics.c (begin_for_stmt): Push the 'for' scope before
7863 adding the FOR_STMT.
7866 * class.c (build_base_field): Set DECL_PACKED.
7867 (layout_class_type): Don't use tail padding of PODs.
7868 * mangle.c (write_unqualified_name): Fix template conversion op
7871 2002-06-16 Richard Henderson <rth@redhat.com>
7874 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7875 after template instantiation.
7877 2002-06-16 Richard Henderson <rth@redhat.com>
7879 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7881 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
7883 * cp-tree.h (compiler_error): Remove declaration.
7884 * lex.c (compiler_error): Remove definition.
7886 2002-06-14 Steve Ellcey <sje@cup.hp.com>
7888 * g++spec.c (LIBUNWIND): New.
7889 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7891 2002-06-13 Jessica Han <jessica@cup.hp.com>
7893 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7894 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7895 (build_vbase_offset_vtbl_entries): Likewise.
7896 * rtti.c (build_headof): Likewise.
7897 (get_tinfo_decl_dynamic): Likewise.
7898 (create_pseudo_type_info): Likewise.
7900 2002-06-12 Stan Shebs <shebs@apple.com>
7902 * mpw-config.in: Remove file, no longer used.
7903 * mpw-make.sed: Ditto.
7905 2002-06-07 Zack Weinberg <zack@codesourcery.com>
7907 * decl2.c: Update call to cpp_handle_option.
7909 2002-06-07 H.J. Lu (hjl@gnu.org)
7911 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7913 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7915 * error.c (cp_error_at): Fix typo.
7917 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
7919 * error.c (cp_diagnostic_starter): Adjust call.
7920 (maybe_print_instantiation_context): Change prototype to take a
7921 'diagnostic_info *'.
7922 (print_instantiation_full_context): Likewise.
7923 (print_instantiation_partial_context): Likewise.
7924 (cp_diagnostic_starter): Likewise.
7925 (cp_diagnostic_finalizer): Likewise.
7926 (cp_print_error_function): Likewise.
7927 (cp_printer): Take a secondary parameter as a 'text_info *'.
7928 Remove output_state savings. Adjust calls.
7930 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7932 * pt.c (inline_parm_levels): Mark for GC.
7934 * mangle.c (start_mangling): Allocate G.substitutions here...
7935 (init_mangle): ... rather than here.
7936 (finish_mangling): Clear the varray pointer when done with it.
7937 * spew.c (yylexstring): Don't use VARRAY_FREE.
7938 * search.c (bfs_walk): Don't use VARRAY_FREE.
7939 * decl2.c (pending_statics): Use gengtype to mark.
7940 (deferred_fns): Likewise.
7941 (ssdf_decls): Likewise.
7942 (init_decl2): Delete.
7943 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7944 (cxx_init_decl_processing): Don't call init_decl2.
7945 (cxx_pop_function_context): Don't use VARRAY_FREE.
7946 * cp-tree.h (struct saved_scope): No need for special marking
7948 (struct language_function): Likewise.
7949 (local_classes): Use gengtype to mark.
7950 (init_decl2): Delete prototype.
7951 * class.c (init_class_processing): Don't use
7952 ggc_add_tree_varray_root.
7953 (build_vtbl_initializer): Don't use VARRAY_FREE.
7955 * decl.c (typename_compare): Don't use same_type_p.
7957 * decl.c: Include hashtab.h instead of hash.h.
7958 (typename_hash): Update to use htab_h.
7959 (typename_compare): Likewise.
7960 (typename_htab): Use gengtype to mark.
7961 (build_typename_type): Update to use htab_h.
7962 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7964 * Make-lang.in (gt-cp-tree.h): New rule.
7965 (cp/tree.o): Depend on gt-cp-tree.h.
7966 * config-lang.in (gtfiles): Add cp/tree.c.
7967 * tree.c: Include gt-cp-tree.h.
7968 (list_hash_table): Use gengtype to mark.
7969 (init_tree): Use gengtype to mark trees.
7971 * Make-lang.in (cp/decl.o): Add debug.h dependency.
7972 * call.c (struct z_candidate): Use gengtype.
7973 (USER_CONV_CAND): Use WRAPPER_ZC.
7974 (convert_class_to_reference): Use build_zc_wrapper.
7975 (build_type_conversion_1): Likewise.
7976 (build_over_call): Use WRAPPER_ZC.
7977 (add_warning): Use build_zc_wrapper.
7978 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7979 * cp-tree.h (struct lang_identifier): Use gengtype.
7980 (struct template_parm_index_s): Likewise.
7981 (struct ptrmem_cst): Likewise.
7982 (struct tree_binding): Likewise.
7983 (struct tree_overload): Likewise.
7984 (struct tree_srcloc): Likewise.
7985 (struct tree_wrapper): Likewise. Also modify to have a pointer
7986 to struct z_candidate rather than void.
7987 (enum cp_tree_node_structure_enum): New.
7988 (union lang_tree_node): New.
7989 (cxx_mark_tree): Delete prototype.
7990 (cp_tree_node_structure): New prototype.
7991 (build_ptr_wrapper): Delete prototype.
7992 (build_int_wrapper): Delete prototype.
7993 (build_zc_wrapper): New prototype.
7994 * decl.c: Include debug.h
7995 (cxx_mark_tree): Delete.
7996 (cp_tree_node_structure): New.
7997 * tree.c (build_ptr_wrapper): Delete.
7998 (build_int_wrapper): Delete.
7999 (build_zc_wrapper): New.
8001 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8002 Correct typo. Patch from k_fukui@highway.ne.jp.
8004 * semantics.c (current_stmt_tree): Update for change to
8005 struct language_function.
8006 (finish_mem_initializers): Likewise.
8007 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8008 * cp-tree.h (struct language_function): Rename from
8009 cp_language_function. Change all uses.
8010 (cp_function_chain): Don't need to cast.
8012 * class.c (duplicate_tag_error): Reset discriminator.
8013 (check_bases_and_members): Update for data structure changes.
8014 * cp-tree.h (struct lang_id2): Use gengtype.
8015 (flagged_type_tree): Likewise.
8016 (SET_LANG_ID): Use GGC on struct lang_id2.
8017 (struct cp_language_function): Use gengtype. Remove field
8018 'x_vcalls_possible_p'.
8019 (current_vcalls_possible_p): Delete.
8020 (struct lang_type_header): New.
8021 (struct lang_type_class): Rename from struct lang_type. Include
8022 struct lang_type_header.
8023 (struct lang_type_ptrmem): New.
8024 (struct lang_type): New.
8025 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
8026 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
8027 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8028 (struct lang_decl_flags): Use gengtype. Add discriminators.
8029 (struct lang_decl): Use gengtype. Add and use discriminators.
8030 Update the macros that reference moved fields.
8031 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
8032 (SET_DECL_THUNK_P): Set discriminator too.
8033 (clear_inline_text_obstack): Delete prototype.
8034 (finish_inline_definitions): Delete prototype.
8035 (mark_pending_inlines): Delete prototype.
8036 (lang_check_failed): New prototype.
8037 * decl.c (struct named_label_use_list): Use gengtype.
8038 (struct named_label_list): Likewise.
8039 (mark_binding_level): Delete.
8040 (mark_named_label_lists): Delete.
8041 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8042 (cxx_init_decl_processing): Use generated marker routine.
8043 (begin_destructor_body): Delete dead set to
8044 current_vcalls_possible_p.
8045 (mark_lang_function): Delete.
8046 (mark_cp_function_context): Delete.
8047 (lang_mark_tree): Use generated marker routines.
8048 * decl2.c (start_objects): Set discriminator when setting
8049 GLOBAL_INIT_PRIORITY.
8050 * lex.c (retrofit_lang_decl): Set discriminators.
8051 (copy_lang_type): Update for changes to lang_type structure.
8052 (cp_make_lang_type): Set discriminator.
8053 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
8054 * search.c: Include ggc.h.
8055 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8056 (finish_inline_definitions): Delete.
8057 * spew.c (struct token): Use gengtype.
8058 (struct token_chunk): New.
8059 (struct unparsed_text): Use gengtype. Store tokens in chunks.
8060 (struct feed): Use gengtype.
8061 (feed_obstack): Delete.
8062 (feed): Mark as GC root.
8063 (pending_inlines): Mark as GC root.
8064 (pending_inlines_tail): Likewise.
8065 (processing_these_inlines): Likewise.
8066 (token_obstack): Make static.
8067 (first_token): Likewise.
8068 (init_spew): Don't initialize deleted things; use gengtype for roots.
8069 (clear_inline_text_obstack): Delete.
8070 (feed_input): Use GC for struct feed. Update for changes to
8071 struct unparsed_text.
8072 (mark_pending_inlines): Delete.
8073 (next_token): Rename from add_token. Change all callers. Update
8074 for changes to struct unparsed_text.
8075 (space_for_token): New.
8076 (remove_last_token): New.
8077 (alloc_unparsed_text): New.
8078 (snarf_block): Take an unparsed_text. Update for changes to struct
8080 (snarf_method): Update for changes to struct unparsed_text.
8081 (snarf_defarg): Update for changes to struct unparsed_text.
8082 * tree.c (lang_check_failed): New.
8084 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8085 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8086 (cp/spew.o): Add dependency on gt-<filename>.h.
8087 (cp/decl2.o): Add dependency on gt-<filename>.h.
8088 (cp/call.o): Add dependency on gt-<filename>.h.
8089 (cp/pt.o): Add dependency on gt-<filename>.h.
8090 (cp/repo.o): Add dependency on gt-<filename>.h.
8091 (cp/parse.o): Add dependency on gt-<filename>.h.
8092 * call.c: Use gengtype for roots.
8093 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8094 decl2.c parse.y pt.c repo.c spew.c.
8095 * cp-tree.h: Use gengtype for roots.
8096 (struct saved_scope): Use GGC, gengtype.
8097 (cp_parse_init): Delete prototype.
8098 (init_pt): Delete prototype.
8099 * decl.c: Use gengtype for roots.
8100 (mark_saved_scope): Delete.
8101 (cxx_init_decl_processing): Don't call deleted initilisation
8103 (signed_size_zero_node): Delete, unused.
8104 * decl.h: Use gengtype for roots.
8105 * decl2.c: Use gengtype for roots.
8106 * lex.h: Use gengtype for roots.
8107 * parse.y: Use gengtype for roots.
8108 (cp_parse_init): Delete.
8109 * pt.c: Use gengtype for roots.
8111 * repo.c: Use gengtype for roots.
8112 * spew.c: Use gengtype for roots.
8114 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
8115 (cp/decl.o): Add dependency on gtype-cp.h.
8116 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8117 Include gtype-cp.h. Allow for filename changes.
8119 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8120 (cp/decl.o): Add cp/gt-decl.h dependency.
8121 * config-lang.in (gtfiles): New.
8122 * tree.h: Rename struct binding_level to struct cp_binding_level.
8123 * decl.c: Rename struct binding_level to struct cp_binding_level.
8124 Include cp/gt-decl.h.
8125 (struct cp_binding_level): Use gengtype.
8126 (make_binding_level): Use GGC on struct cp_binding_level.
8127 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8128 (cxx_init_decl_processing): Mark free_binding_level as
8131 * decl.c (mark_cp_function_context): Update calling sequence.
8133 * decl.c (start_function): Don't free 'struct
8134 cp_language_function'.
8135 (pop_cp_function_context): Likewise.
8136 (save_function_data): Allocate it using GC.
8137 * semantics.c (genrtl_start_function): Don't free 'struct
8138 cp_language_function'.
8140 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
8142 * lang-specs.h: Use cpp_debug_options.
8144 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8146 * mangle.c, tree.c: Include real.h.
8147 * Make-lang.in: Update dependency lists.
8149 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
8151 * lex.c: Don't include c-lex.h.
8152 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8154 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
8156 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8158 2002-05-22 Richard Henderson <rth@redhat.com>
8160 * decl.c (obscure_complex_init): Check for VAR_DECL
8161 before using DECL_THREAD_LOCAL.
8163 2002-05-22 Richard Henderson <rth@redhat.com>
8165 * decl.c (check_tag_decl): Handle RID_THREAD.
8166 (obscure_complex_init): Reject run-time init of tls.
8167 (grokvardecl, grokdeclarator): Handle RID_THREAD.
8168 * lex.c (reswords): Add __thread.
8169 (rid_to_yy): Map RID_THREAD to SCSPEC.
8171 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
8173 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8174 * cp-tree.h (cxx_post_options): Kill.
8175 * cp-lex.c (cxx_post_options): Kill.
8177 2002-05-21 Richard Henderson <rth@redhat.com>
8179 * lex.c (rid_to_yy): Add RID_THREAD.
8181 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
8183 * init.c (build_vec_init): Test for trivial copy-assignment when
8184 copy-assigning arrays.
8186 2002-05-20 Andreas Jaeger <aj@suse.de>
8188 * init.c (build_default_init): Remove unused variable.
8190 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
8192 * call.c (any_strictly_viable): New.
8193 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8195 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8197 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8199 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8202 * pt.c (do_decl_instantiation): Don't complain explicit
8203 instantiation after explicit specialization.
8204 (do_type_instantiation): Likewise.
8206 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
8208 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8210 (complete_type_or_else): ... this. Redefined as macro.
8211 (cxx_incomplete_type_diagnostic): Declare.
8212 (cxx_incomplete_type_error): Define as macro.
8213 * init.c (build_delete): Warn about incomplete types other than
8214 void, and use the built-in operator delete for them.
8215 * typeck.c (complete_type_or_diagnostic): Renamed from
8216 complete_type_or_else. Added warn_only argument, passed to...
8217 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
8218 warnings or errors depending on new warn_only argument. Renamed
8220 (cxx_incomplete_type_error): ... this. New implementation in
8221 terms of cxx_incomplete_type_diagnostic.
8223 2002-05-18 Jason Merrill <jason@redhat.com>
8226 * decl2.c (import_export_decl): If we clear
8227 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8229 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8232 * pt.c (verify_class_unification): Don't check if PARM is template
8233 parameter dependent. Simplify.
8234 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8235 parameter dependent expression.
8237 2002-05-14 Jason Merrill <jason@redhat.com>
8239 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8241 (synthesize_tinfo_var): Take the public decl.
8242 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
8243 (emit_tinfo_decl): Adjust. Call import_export_decl.
8244 * decl2.c (import_export_decl): Simplify tinfo decl handling.
8246 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
8248 * cp-tree.h (struct lang_type): Added non_zero_init.
8249 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8250 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8251 * class.c (check_field_decls): Test non_zero_init.
8252 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8253 zero-to-NULL conversions.
8254 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8255 type that needs zero-initialization without zeros.
8256 (check_initializer_decl): Compute zero-initializer for types
8257 that require a non-trivial one.
8258 * init.c (build_forced_zero_init): New function.
8259 (build_default_init): Use it.
8260 * tree.c (zero_init_p): New function.
8261 * typeck2.c (force_store_init_value): New function.
8262 (process_init_constructor): Create non-trivial zero-initializers
8263 for array members and class fields.
8265 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
8267 * lang-specs.h: Remove redundant -lang-c++.
8269 2002-05-13 Jason Merrill <jason@redhat.com>
8271 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8272 (fixed_type_or_null): See through reference vars.
8273 (build_base_path): Vtable contents are constant.
8274 * typeck.c (get_member_function_from_ptrfunc): Likewise.
8276 2002-05-12 Jason Merrill <jason@redhat.com>
8278 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8281 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
8283 * cp-tree.h (flag_ansi): Remove.
8284 * decl2.c (flag_ansi): Remove.
8285 (cxx_decode_option): Set flag_iso and flag_undef.
8287 2002-05-09 Jason Merrill <jason@redhat.com>
8289 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8290 Use subtraction rather than a bitmask to get the index.
8291 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8293 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8295 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
8297 * Make-lang.in (decl2.o): Update.
8298 * cp-tree.h (warn_multichar): Remove.
8299 * decl2.c: Include c-common.h.
8300 (warn_multichar): Remove.
8302 2002-05-03 Jason Merrill <jason@redhat.com>
8304 * tree.c (build_cplus_array_type): Only const and volatile get
8307 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8309 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8311 ABI change, returning simple classes from functions.
8312 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8313 TYPE_HAS_TRIVIAL_INIT_REF is false or
8314 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8316 2002-04-30 Jason Merrill <jason@redhat.com>
8319 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8320 anonymous class with a typedef if there are attributes.
8322 2002-04-29 Paul Eggert <eggert@twinsun.com>
8324 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8326 2002-04-29 Jakub Jelinek <jakub@redhat.com>
8329 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8332 2002-04-29 Mark Mitchell <mark@codesourcery.com>
8335 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8336 enter that scope before name lookup.
8339 * method.c (do_build_copy_constructor): Avoid building
8340 cv-qualified reference types.
8342 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
8345 * decl.c (grok_op_properties): Assignment ops don't have to return
8346 by value. operator% should.
8348 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8351 * decl.c (duplicate_decls): Call merge_weak.
8353 2002-04-26 Richard Henderson <rth@redhat.com>
8355 * parse.y (malloced_yyss, malloced_yyvs): New.
8356 (yyoverflow): Re-add. Set them.
8357 (free_parser_stacks): New.
8359 2002-04-26 Mark Mitchell <mark@codesourcery.com>
8362 * method.c (do_build_assign_ref): Pass a derivation to
8363 build_method_call when calling base class assignment operators.
8365 2002-04-26 Richard Henderson <rth@redhat.com>
8367 * parse.y (yyoverflow): Revert.
8369 2002-04-26 Richard Henderson <rth@redhat.com>
8372 * parse.y (string): Remove. Update all uses to use STRING
8373 instead, and not call combine_strings.
8374 * rtti.c (tinfo_name): Use fix_string_type.
8375 * semantics.c (finish_asm_stmt): Don't call combine_strings.
8376 * spew.c (yylexstring): New.
8377 (read_token): Use it.
8379 2002-04-25 Richard Henderson <rth@redhat.com>
8382 * parse.y (yyoverflow): New.
8384 2002-04-25 Jason Merrill <jason@redhat.com>
8387 * search.c (check_final_overrider): No longer static.
8388 * class.c (update_vtable_entry_for_fn): Call it.
8389 * cp-tree.h: Adjust.
8391 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8393 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8394 * cp-tree.h (cxx_set_yydebug): Die.
8395 * lex.c (YYDEBUG): Get from c-lex.h.
8396 (cxx_set_yydebug): Remove.
8397 * parse.y: Include c-lex.h.
8398 (YYDEBUG): Get from c-lex.h.
8400 2002-04-24 Mark Mitchell <mark@codesourcery.com>
8403 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8406 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
8408 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8409 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8411 * cp-tree.h (cp_attribute_table): Rename.
8412 * decl.c (lang_attribute_table): Remove declaration.
8413 (cxx_init_decl_processing): Don't set it.
8414 * tree.c (cp_attribute_table): Rename.
8416 2002-04-24 Jason Merrill <jason@redhat.com>
8419 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8420 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8421 The pedwarn for array assignment is now unconditional.
8422 * tree.c (build_cplus_array_type_1): Still process simple array types
8423 normally in templates.
8426 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8429 2002-04-23 Jakub Jelinek <jakub@redhat.com>
8431 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8432 node with attributes.
8434 2002-2-23 David O'Brien <obrien@FreeBSD.org>
8436 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8437 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8439 2002-04-23 Mark Mitchell <mark@codesourcery.com>
8442 * pt.c (tsubst_friend_class): Handle templates with explicit
8446 * typeck.c (merge_types): Remember the cv-qualification of pointer
8447 types when merging them.
8449 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
8451 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8452 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8453 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8454 cxx_mark_function_context): New.
8455 * decl.c (push_cp_function_context, pop_cp_function_context,
8456 mark_cp_function_context): Rename for consistency.
8457 (cxx_init_decl_processing): Don't set old hooks.
8459 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
8461 * call.c (convert_type_from_ellipsis): Rename, update.
8462 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8463 * cp-tree.h (convert_type_from_ellipsis): Rename.
8464 * decl.c (cxx_init_decl_processing): Don't set hook.
8466 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8468 * call.c (build_new_method_call): Update.
8469 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8470 * cp-tree.h (cxx_incomplete_type_error): New.
8471 * decl.c (grokdeclarator, grokparms): Update.
8472 * decl2.c (check_classfn): Update.
8473 * pt.c (tsubst): Update.
8474 * typeck.c (complete_type_or_else, expr_sizeof,
8475 decay_conversion): Update.
8476 * typeck2.c (incomplete_type_error): Rename.
8477 (add_exception_specifier): Update.
8479 2002-04-18 Jason Merrill <jason@redhat.com>
8482 * search.c (setup_class_bindings): A class template qualifies as a
8485 2002-04-17 Jakub Jelinek <jakub@redhat.com>
8488 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8491 2002-04-16 Mark Mitchell <mark@codesourcery.com>
8493 * init.c (begin_init_stmts): Remove commented out code.
8494 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8495 * semantics.c (begin_gobal_stmt_expr): Adjust call to
8496 expand_start_stmt_expr.
8498 2002-04-15 Mark Mitchell <mark@codesourcery.com>
8500 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8501 dso_handle itself, to __cxa_atexit.
8503 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8505 * error.c (cxx_print_error_function): Adjust call to macros.
8507 2002-04-14 Jakub Jelinek <jakub@redhat.com>
8509 * class.c (layout_virtual_bases): Do all dsize computation on trees.
8511 2002-04-14 Jason Merrill <jason@redhat.com>
8513 * typeck.c (get_member_function_from_ptrfunc): Don't do
8514 gratuitious division and multiplication on
8515 ptrmemfunc_vbit_in_delta targets.
8517 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8520 * semantics.c (finish_expr_stmt): Remember the type of the
8521 expression before any conversions are performed.
8523 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8526 * call.c (add_template_candidate_real): Do not treat member
8527 templates as copy constructors.
8529 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8531 * decl.c (duplicate_decls): Do not copy the RTL for a variable
8532 declaration if the old variable had an incomplete type and the new
8534 (complete_vars): Do not call layout_decl for completed variables.
8536 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
8538 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8539 with an explicit one.
8540 (follow_tag_typedef): New.
8541 (lookup_tag): Use it to extract the tag of an explicit typedef.
8542 (xref_tag): Likewise.
8544 2002-04-11 Andrew Haley <aph@redhat.com>
8546 * typeck.c (type_after_usual_arithmetic_conversions):
8547 If two types have the same variant, return immediately.
8548 When two floating-point operands are the same precision:
8549 convert to float if one of the operands is float;
8550 if neither operand is one of the standard types, return the type
8551 of the first operand.
8553 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
8556 * decl.c (make_typename_type): Remove implicit typenameness.
8558 2002-04-09 Jason Merrill <jason@redhat.com>
8560 PR optimization/6189
8561 * semantics.c (genrtl_start_function): Don't free
8562 DECL_SAVED_FUNCTION_DATA for inline functions.
8564 * init.c (build_member_call): For now, don't convert to
8565 intermediate base if it would cause an error.
8567 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
8569 * parse.y (namespace_qualifier, maybe_identifier,
8570 begin_explicit_instantiation, end_explicit_instantiation,
8571 apparent_template_type, .finish_template_type,
8572 do_id, maybe_init, defarg_again, component_decl_1):
8573 Add ending ';', in accordance with POSIX.
8575 2002-04-06 Mark Mitchell <mark@codesourcery.com>
8578 * class.c (layout_class_type): Remember incomplete static
8580 (finish_struct_1): Call complete_vars, not
8581 hack_incomplete_structures.
8582 * cp-tree.h (hack_incomplete_structures): Rename to ...
8583 (complete_vars): ... this.
8584 (struct saved_scope): Remove incomplete.
8585 (namespace_scope_incomplete): Remove.
8586 * decl.c (struct binding_level): Remove incomplete.
8587 (incomplete_vars): New variable.
8588 (mark_binding_level): Don't mark incomplete.
8589 (print_binding_level): Don't print it.
8590 (mark_saved_scope): Don't mark incomplete.
8591 (pushdecl): Use maybe_register_incopmlete_var.
8592 (cxx_init_decl_processing): Register incomplete_vars for GC.
8593 (start_decl_1): Clarify error message.
8594 (hack_incomplete_vars): Remove.
8595 (maybe_register_incomplete_var): New function.
8596 (complete_vars): Likewise.
8598 2002-04-06 Jason Merrill <jason@redhat.com>
8601 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8602 set before checking it.
8605 * init.c (build_member_call): Use build_scoped_ref.
8606 (resolve_offset_ref): Likewise.
8607 * call.c (build_scoped_method_call): Likewise.
8608 * tree.c (maybe_dummy_object): Kludge around current_class_type being
8610 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8611 * cp-tree.h: Adjust.
8613 * init.c (push_base_cleanups): Just use build_scoped_method_call.
8616 * method.c (implicitly_declare_fn): Pass unqualified type to
8617 synthesize_exception_spec.
8619 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8621 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8622 * cvt.c: Update comment.
8623 * init.c (expand_cleanup_for_base): Update.
8624 * semantics.c (finish_parenthesized_expr): Update.
8625 * typeck.c (cp_truthvalue_conversion): Update.
8627 2002-04-04 Jason Merrill <jason@redhat.com>
8629 * semantics.c (finish_eh_cleanup): New fn.
8630 * cp-tree.h: Add prototype.
8631 * init.c (perform_member_init, expand_cleanup_for_base): Use
8633 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8634 * cp-tree.h: Remove references.
8635 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8636 * dump.c (cp_dump_tree): Likewise.
8637 * pt.c (tsubst_expr): Likewise.
8638 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8639 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8640 * tree.c (cp_statement_code_p): Likewise.
8642 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8645 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8649 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8651 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8653 2002-04-03 Richard Henderson <rth@redhat.com>
8655 * cp-lang.c (cxx_warn_unused_global_decl): New.
8656 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8658 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
8660 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8661 * tree.c (init_tree): Don't set hook.
8663 2002-04-03 Roger Sayle <roger@eyesopen.com>
8666 * decl.c (duplicate_decls): Don't mess with assembler names when
8667 redeclaring builtin functions as static.
8669 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8671 * call.c (build_addr_func): Update.
8672 * class.c (resolve_address_of_overloaded_function): Update.
8673 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8674 * cp-tree.h (cxx_mark_addressable): New.
8675 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8676 * decl2.c (build_cleanup): Update.
8677 * except.c (build_throw): Update.
8678 * init.c (resolve_offset_ref): Update.
8679 * pt.c (convert_nontype_argument): Update.
8680 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8681 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8682 unary_complex_lvalue): Update.
8683 (mark_addressable): Rename.
8685 2002-04-01 Roger Sayle <roger@eyesopen.com>
8688 * decl.c (duplicate_decls): Overwrite the RTL when (and only
8689 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
8690 but follow the SET_DECL_RTL idiom used elsewhere in the function.
8692 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8694 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8695 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8696 * decl.c (grokdeclarator): Update.
8697 * mangle.c (write_integer_cst): Update.
8698 * typeck.c (build_binary_op): Update.
8700 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8702 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8703 * lex.c (cxx_init): Don't set hook.
8705 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8707 * Make-lang.in (error.o): Update.
8708 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8709 * cp-tree.h (struct diagnostic_context): Predeclare.
8710 (cxx_print_error_function): New.
8711 * error.c: Include langhooks-def.h.
8712 (lang_print_error_function): Rename. Update.
8713 (init_error): Don't set hook.
8715 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8717 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8719 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8720 * decl.c (finish_enum): Similarly.
8721 * error.c (dump_type): Similarly.
8722 * lex.c (cxx_init): Similarly.
8723 * mangle.c (write_builtin_type): Similarly.
8724 * typeck.c (comptypes): Similarly.
8726 2002-03-28 Roger Sayle <roger@eyesopen.com>
8729 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8730 in the g++ front-end.
8731 (duplicate_decl): Allow redefinition of anticipated built-ins.
8732 Fix inlining problem by over-writing the old DECL_RTL.
8733 (lookup_namespace_name): Fail to find an identifier in the
8734 specified namespace if its still anticipated.
8735 (builtin_function_1): New function split out from builtin_function
8736 to create a builtin in the current namespace with given context.
8737 (builtin_function): Call builtin_function_1 to define the
8738 appropriate builtins in both the std and global namespaces.
8739 (select_decl): Don't test for anticipated decls here.
8740 (unqualified_namespace_lookup): Instead ignore them whilst
8741 searching through scopes and namespaces.
8742 * decl2.c (do_nonmember_using_decl): If a using declaration
8743 specifies an anticipated built-in function, mark it as no longer
8744 anticipated in that scope.
8745 (ambiguous_decl): Avoid resolving to an anticipated decl.
8746 * lex.c (do_scoped_id): Fail to find an identifier in the global
8747 namespace if its still anticipated.
8749 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8751 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8752 * cp-tree.h (cp_make_lang_type): Rename.
8753 * lex.c (cp_make_lang_type): Rename.
8754 (make_aggr_type): Update.
8755 * tree.c (init_tree): Don't set make_lang_type_fn.
8757 2002-03-29 Jakub Jelinek <jakub@redhat.com>
8760 * class.c (finish_struct_1): Update static field's DECL_MODE even
8761 if its type is a variant of t.
8763 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8765 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8766 * cp-tree.h (cxx_insert_default_attributes): New.
8767 * decl.c (insert_default_attributes): Rename.
8769 2002-03-27 Mark Mitchell <mark@codesourcery.com>
8772 * call.c (build_op_delete_call): Allow for the fact the placement
8773 may be a COMPOUND_EXPR.
8775 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8777 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8778 * cp-tree.h (init_cplus_expand): Remove.
8779 (cxx_expand_expr): New.
8780 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8782 (init_cplus_expand): Remove.
8783 * lex.c (cxx_init): Don't call init_cplus_expand.
8785 2002-03-26 Mark Mitchell <mark@codesourcery.com>
8788 * init.c (build_new_1): Allow for the fact the result of
8789 build_function_call may be a COMPOUND_EXPR.
8791 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
8794 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8795 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8796 (dfs_skip_nonprimary_vbases_markedp): Remove.
8797 * search.c (get_shared_vbase_if_not_primary): Remove.
8798 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8799 (dfs_skip_nonprimary_vbases_markedp): Remove.
8800 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8801 (dfs_marked_real_bases_queue_p): Likewise.
8803 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8805 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8806 * cp-tree.h (cxx_mark_tree): New.
8807 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8809 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8811 * cp-tree.h (cxx_maybe_build_cleanup): New.
8812 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8813 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8814 * tree.c (build_target_expr): Update.
8815 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8817 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
8819 * decl2.c (cxx_decode_option): Handle -E.
8820 * lang-specs.h (default_compilers): Preprocess with cc1plus.
8821 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8823 2002-03-23 Jakub Jelinek <jakub@redhat.com>
8826 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8828 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8830 * error.c (dump_type): Be careful about implicit typenames.
8832 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8835 * semantics.c (finish_base_specifier): Handle erronous base
8838 2002-03-22 Zack Weinberg <zack@codesourcery.com>
8840 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8843 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
8845 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8846 an index into the vtable_entry array regardless of
8847 TARGET_PTRMEMFUNC_VBIT_LOCATION.
8849 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
8851 * tree.c (cp_cannot_inline_tree_fn): Same.
8853 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8855 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8856 insert_block, getdecls, global_bindings_p): New.
8858 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
8861 * mangle.c (struct globals) Add internal_mangling_p member.
8862 (write_template_param): Do internal mangling, if needed.
8863 (mangle_conv_op_name_for_type): Request internal mangling.
8865 2002-03-20 Jason Merrill <jason@redhat.com>
8868 * init.c (build_delete): Check access for a member op delete here.
8869 * decl2.c (delete_sanity): Not here.
8871 2002-03-19 Jason Merrill <jason@redhat.com>
8874 * class.c (get_vfield_name): Use the constructor_name.
8876 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8878 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8879 * cp-tree.h (lang_printable_name): Rename.
8880 * error.c (lang_decl_name): Use new hook.
8881 * lex.c (cxx_init): Remove old hook.
8882 * pt.c (tsubst_decl): Use new hook.
8883 * tree.c (lang_printable_name): Rename.
8885 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
8888 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8889 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8890 only after recording the declaration.
8892 2002-03-18 Jason Merrill <jason@redhat.com>
8895 * init.c (resolve_offset_ref): Hand off to build_component_ref.
8897 PR c++/4222, c++/5995
8898 * call.c (build_over_call): Fix empty class logic.
8901 * cp-tree.h (struct saved_scope): Add last_parms field.
8902 * decl.c (maybe_push_to_top_level): Save last_function_parms.
8903 (pop_from_top_level): Restore it.
8906 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
8910 * pt.c (tsubst_friend_function): Use decl_namespace_context.
8912 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8913 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8914 type with a nontrivial destructor.
8916 2002-03-17 Jason Merrill <jason@redhat.com>
8919 * class.c (build_base_path): Virtual base layout is fixed in
8922 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8924 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8925 * parse.y (yyparse): Remove macro.
8927 2002-03-17 Jason Merrill <jason@redhat.com>
8930 * init.c (build_new_1): Pass the right pointer to op delete.
8932 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
8935 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8936 conversion operators go.
8937 (struct lang_decl_flags): Add template_conv_p and unused
8939 (DECL_TEMPLATE_CONV_FN_P): New macro.
8940 * call.c (build_user_type_conversion_1): Don't check second type
8941 conversion of overload set first.
8942 * class.c (add_method): Make sure templated conversion operators
8943 all end up on slot 2.
8944 * lex.c (do_identifier): A conversion operator token might be
8945 satisfied by a templated conversion operator.
8946 * pt.c (check_explicit_specialization): Use
8947 CLASSTYPE_FIRST_CONVERSION_SLOT.
8948 (template_parm_this_level_p): New function.
8949 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8950 * search.c (lookup_fnfields_1): Template conversions will be on
8952 * typeck.c (build_component_ref): Preserve the type of an
8953 conversion operator name on the overload type.
8954 (build_x_function_call): Retrieve the conversion operator name.
8956 2002-03-15 Richard Henderson <rth@redhat.com>
8958 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8960 2002-03-15 Mark Mitchell <mark@codesourcery.com>
8962 * cp-tree.h (CLEANUP_DECL): Remove.
8963 (CLEANUP_EXPR): Likewise.
8964 * decl.c (destroy_local_var): Simplify.
8965 (maybe_build_cleanup): Tidy.
8966 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8967 * semantics.c (cp_expand_stmt): Likewise.
8968 * cp/tree.c (cp_statement_code_p): Likewise.
8970 2002-03-15 Jason Merrill <jason@redhat.com>
8973 * decl.c (duplicate_decls): Use merge_types instead of common_type.
8974 * typeck.c (common_type): Just hand off to
8975 type_after_usual_arithmetic_conversions and
8976 composite_pointer_type.
8977 (merge_types): New fn.
8978 (commonparms): Use it instead of common_type.
8979 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8980 (composite_pointer_type): Also handle attributes.
8981 * cp-tree.h: Declare merge_types.
8983 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8985 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8987 2002-03-14 Richard Henderson <rth@redhat.com>
8989 * decl.c: Include c-pragma.h.
8990 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8991 * Make-lang.in: Update dependencies.
8993 2002-03-14 Jakub Jelinek <jakub@redhat.com>
8996 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8997 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8999 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9001 * mangle.c (write_builtin_type): Handle 128-bit integers even if
9002 they are not a standard integer type.
9004 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9006 * cp-tree.h (init_init_processing): Remove declaration.
9007 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9008 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9010 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9012 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9014 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9016 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9017 cplus_tree_code_name): Delete.
9018 (cxx_init): Don't call add_c_tree_codes, instead set
9019 lang_unsafe_for_reeval. Don't try to copy into the various
9022 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
9025 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9026 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9029 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9031 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
9032 DR209 is now not a defect.
9033 * cp-tree.h (skip_type_access_control): Remove.
9034 * decl.c (grokdeclarator): Do type access control for friend
9036 * semantics.c (decl_type_access_control): Don't reset
9037 current_type_lookups.
9038 (save_type_access_control): Always save the lookups.
9039 (skip_type_access_control): Remove.
9040 (finish_class_definition): Don't change type_lookups.
9042 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9044 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
9046 * typeck.c (build_static_cast): Compare non-qualified types
9047 with pointer to member conversions.
9049 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
9050 Daniel Berlin <dan@dberlin.org>
9052 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9053 (cxx_get_alias_set): Use it.
9055 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9057 * cp-tree.h (stabilize_expr): Prototype.
9059 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
9061 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9062 conditional return void.
9064 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
9066 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9067 * cp-tree.h (cxx_unsave): New.
9068 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9069 (init_tree): Update.
9071 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9073 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9074 explicit sizeof/sizeof.
9075 * decl2.c (cxx_decode_option): Likewise.
9076 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9078 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
9081 * decl.c (lookup_tag): Only reject enum/class mismatch, not
9082 class/union mismatch.
9083 * parse.y (check_class_key): New function.
9084 (structsp): Call it.
9086 2002-03-01 Michael Matz <matz@suse.de>
9088 * typeck.c (cp_pointer_int_sum): Complete inner type which is
9089 used later by size_in_bytes().
9091 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
9093 * cp-tree.h: Require __GNUC__ to be #defined.
9094 (build_init): Add missing prototype.
9096 2002-03-01 Jason Merrill <jason@redhat.com>
9098 * except.c: Don't include decl.h or obstack.h. Do include
9100 (build_throw): Destroy temporaries from the thrown
9101 expression before calling __cxa_throw. Construct a thrown
9102 temporary directly into the exception object.
9103 (stabilize_throw_expr): New function.
9104 (wrap_cleanups_r): New function.
9105 * tree.c (stabilize_expr): New function.
9106 * init.c (build_init): New function.
9107 * Make-lang.in (cp/except.o): Adjust .h deps.
9109 2002-02-28 Jason Merrill <jason@redhat.com>
9111 * search.c (lookup_base_r): Don't clear is_non_public just because
9112 we found a friendly scope.
9114 * decl.c (finish_function): Only warn about missing return
9115 statement with -Wreturn-type.
9117 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9119 * class.c (build_clone): Update.
9120 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9121 * cp-tree.h (cxx_dup_lang_specific_decl): New.
9122 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9123 (copy_decl): Update.
9124 * method.c (make_thunk): Update.
9126 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9128 * decl2.c: Delete traditional-mode-related code copied from
9129 the C front end but not used, or used only to permit the
9132 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
9135 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9138 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9141 * semantics.c (finish_switch_cond): Don't call get_unwidened
9144 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
9147 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9149 (make_typename_type): Use tsubst_flags_t.
9150 * decl.c (make_typename_type): Adjust. Return non-artificial
9151 TYPE_DECLs, if required.
9152 (grokdeclarator): Simplify CVR qualification handling. Allow bad
9153 qualifiers on typedef types.
9154 * decl2.c (handle_class_head): Adjust make_typename_type call.
9155 * parse.y (nested_name_specifier): Likewise.
9156 (typename_sub0): Likewise.
9157 (typename_sub1): Likewise.
9158 * pt.c (convert_template_argument): Adjust make_typename_type
9160 (tsubst): Adjust cp_build_qualified_type_real calls.
9161 (check_cv_quals_for_unify): Cope with allowing bad qualifications
9162 on template type parms.
9163 (instantiate_decl): Recheck substitutions to give warnings on bad
9165 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9167 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
9169 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9171 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9172 unless DECL_ALWAYS_INLINE.
9174 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9176 * typeck.c (cp_pointer_int_sum): Renamed from
9177 pointer_int_sum, call pointer_int_sum.
9179 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9181 * decl.c (duplicate_decls): Return 0 if issued error about
9184 2002-02-19 Jason Merrill <jason@redhat.com>
9186 ABI change: Mangle `void (A::*)() const' as
9187 M1AKFvvE, not MK1AFvvE.
9188 * mangle.c (write_function_type): Write cv-quals for member
9190 (write_pointer_to_member_type): Not here.
9192 2002-02-18 Jason Merrill <jason@redhat.com>
9194 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9195 (do_decl_instantiation): Likewise.
9197 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
9200 * decl.c (duplicate_decls): Make warning unconditional
9201 if duplicate default argument declarations are present.
9203 2002-02-17 Jakub Jelinek <jakub@redhat.com>
9205 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9208 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
9210 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9211 remove incorrect comment. Move #if 0'd code to common path. Use
9212 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9214 2002-02-13 Jason Merrill <jason@redhat.com>
9216 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9217 (finish_function): Don't warn if current_function_returns_null.
9219 * typeck2.c (digest_init): Do handle values of vector type.
9221 * typeck2.c (digest_init, process_init_constructor): Treat vectors
9224 2002-02-11 Jason Merrill <jason@redhat.com>
9226 * parse.y (reserved_declspecs): Don't handle attributes.
9227 (reserved_typespecquals): Handle them here.
9228 * Make-lang.in (parse.c): Adjust expected conflicts.
9230 2002-02-08 Jakub Jelinek <jakub@redhat.com>
9232 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9233 instead of compstmt.
9234 (compstmt_or_stmtexpr): Renamed from compstmt.
9235 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9237 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9239 Rename instantiate_type_flags to tsubst_flags_t & expand use.
9240 * cp-tree.h (instantiate_type_flags): Rename to ...
9241 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9242 add tf_warning flag.
9243 (instantiate_type): Adjust prototype.
9244 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9245 do_type_instantiation, cp_build_qualified_type_real): Likewise.
9246 cp_build_qualified_type: Adjust.
9247 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9249 * call.c (standard_conversion): Rename itf_* to tf_*.
9250 (reference_binding): Likewise.
9251 (convert_like_real): Likewise.
9252 * cvt.c (cp_convert_to_pointer): Likewise.
9253 (convert_to_reference): Likewise.
9254 * decl.c (lookup_namespace_name): Use tf_* flags.
9255 (make_typename_type): Likewise.
9256 (grokdeclarator): Likewise.
9257 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9258 (coerce_template_template_parms, convert_template_argument,
9259 coerce_template_parms, maybe_get_template_decl_from_type_decl,
9260 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9261 instantiate_class_template, tsubst_template_arg_vector,
9262 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9263 tsubst_decl, tsubst_arg_types, tsubst_function_type,
9264 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9265 instantiate_template, fn_type_unification,
9266 resolve_overloaded_unification, verify_class_unification,
9267 unify, get_bindings_real, do_type_instantiation,
9268 regenerate_decl_from_template, instantiate_decl,
9269 tsubst_initializer_list, tsubst_enum,
9270 get_mostly_instantiated_function_type,
9271 invalid_nontype_parm_type_p): Likewise.
9272 * tree.c (cp_build_qualified_type_real): Likewise.
9273 * typeck.c (build_binary_op): Rename itf_* to tf_*.
9274 (build_ptrmemfunc): Likewise.
9275 (convert_for_assignment): Likewise.
9277 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9280 * decl.c (grokdeclarator): Allow friend declarations from
9282 * decl2.c (handle_class_head): Don't push into template parm contexts.
9283 * pt.c (push_template_decl_real): Template parm contexts are never
9286 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
9288 * class.c: Include target.h.
9289 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9290 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9292 * Make-lang.in: Adjust deps.
9294 2002-02-05 Jason Merrill <jason@redhat.com>
9296 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9298 2002-02-04 Jakub Jelinek <jakub@redhat.com>
9300 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9301 (finish_switch_cond): Set SWITCH_TYPE.
9303 2002-02-04 Richard Henderson <rth@redhat.com>
9305 * method.c (use_thunk): Always initialize the block tree. Reindent.
9306 * semantics.c (expand_body): Emit thunks after function, not before.
9308 2002-02-04 Jason Merrill <jason@redhat.com>
9310 * decl.c (start_function): Call cplus_decl_attributes immediately
9311 after grokdeclarator.
9313 * decl.c (start_function): Combine DECL_RESULT handling code.
9315 2002-02-03 Jason Merrill <jason@redhat.com>
9318 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9319 (cp/xref.o): Remove dependencies.
9320 * class.c (finish_struct_1, check_methods): Don't call xref fns.
9321 (finish_struct_1): Likewise.
9322 * friend.c (make_friend_class): Likewise.
9323 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9324 * spew.c (read_process_identifier): Likewise.
9326 2002-02-01 Jason Merrill <jason@redhat.com>
9329 * decl.c (finish_function): Warn about a non-void function with
9330 no return statement and no abnormal exit.
9331 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9332 (current_function_returns_abnormally): New macro.
9333 * call.c (build_call): Set it.
9335 * typeck.c (build_component_ref): Always complain about offsetof
9336 constructs on non-PODs. Only make it an error for members of
9339 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9340 (dump_function_decl): Always dump parms.
9342 * decl2.c (finish_static_data_member_decl): Complain about a local
9343 class with a static data member.
9346 * search.c (lookup_field_1): Don't xref a static data member
9347 just because we looked it up.
9349 2002-01-31 Jason Merrill <jason@redhat.com>
9351 * Make-lang.in (parse.c): Handle .output file.
9354 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9356 * semantics.c (finish_class_definition): Adjust.
9358 Allow attributes in parms and casts.
9359 * parse.y (named_parm): Don't strip attrs.
9360 (declmods): Remove 'attributes' production.
9361 (nonempty_cv_qualifiers): Accept attributes.
9362 (ATTRIBUTE): Give precedence.
9363 * decl.c (groktypename): Handle attributes.
9364 (grokparms): Likewise.
9366 2002-01-29 Jakub Jelinek <jakub@redhat.com>
9368 * decl2.c (cxx_decode_option): Pass 0 as last argument to
9370 * lang-specs.h: Use cpp_unique_options instead of cpp_options
9371 when used together with cc1_options.
9373 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
9376 * typeck2.c (digest_init): Make sure non-array core type is
9378 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9379 constructor, rather than build a new one.
9380 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9381 PURPOSE of constructor elts.
9383 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9385 * Make-lang.in (parse.c): Adjust expected number of
9386 shift-reduce conflicts.
9387 (decl.o): Depend on diagnostic.h.
9388 * decl.c: Include diagnostic.h.
9389 (grokdeclarator): Check for null pointer.
9390 (finish_function): Don't abort when
9391 current_binding_level->parm_flag != 1, if errors have
9392 occurred; throw away the statement tree and extra binding
9393 levels, and continue.
9394 * lex.c (note_list_got_semicolon): Check for null pointer.
9395 * method.c (hack_identifier): Just return error_mark_node if
9396 value is error_mark_node.
9397 * parse.y (primary: TYPEID(type_id)): No need to use
9398 TYPE_MAIN_VARIANT here.
9399 (handler_seq): Accept an empty list of catch clauses and
9400 generate a fake handler block to avoid later crashes.
9401 (ansi_raise_identifier): Accept the error token too.
9402 * semantics.c (begin_class_definition,
9403 finish_class_definition): Check for error_mark_node.
9405 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9407 * typeck2.c (friendly_abort): Delete definition.
9408 * cp-tree.h (friendly_abort): Don't prototype.
9409 (my_friendly_assert): Use fancy_abort.
9411 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9413 * cp-tree.h (my_friendly_abort): Remove.
9415 2002-01-23 Jakub Jelinek <jakub@redhat.com>
9417 * spew.c (pending_inlines, pending_inlines_tail,
9418 processing_these_inlines): Make static.
9419 (mark_pending_inlines): Remove static.
9420 (begin_parsing_inclass_inline): If in function, save pi
9421 for GC to cp_function_chain->unparsed_inlines instead.
9422 (process_next_inline): Likewise.
9423 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9424 (mark_pending_inlines): Add prototype.
9425 * decl.c (spew_debug): Remove unused extern.
9426 (mark_lang_function): Call mark_pending_inlines.
9428 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9430 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9431 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9432 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9433 Change my_fancy_abort() to abort().
9435 2002-01-23 Jason Merrill <jason@redhat.com>
9438 * class.c (fixed_type_or_null): Fix thinko.
9441 * init.c (resolve_offset_ref): Use build_indirect_ref.
9443 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9445 2002-01-22 Jason Merrill <jason@redhat.com>
9447 * parse.y (function_body): Suppress the block for the outermost
9449 * decl.c (pushdecl): Don't try to skip it.
9450 (begin_function_body): Keep the block we create, not the next one.
9451 * init.c (emit_base_init): Don't mess with keep_next_level.
9453 * class.c (build_base_path): Tweak formatting.
9455 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
9457 Fix regression introduced with patch for c++/775
9458 * parse.y (class_head_defn): Check for template specializations
9459 with a different class-key.
9461 2002-01-17 Jason Merrill <jason@redhat.com>
9463 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9464 (begin_function_body): Call them and keep_next_level.
9465 * init.c (emit_base_init): Call keep_next_level.
9466 * semantics.c (setup_vtbl_ptr): Lose.
9467 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9468 (vtbls_set_up_p): Lose.
9469 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9470 * method.c (do_build_copy_constructor): Likewise.
9471 (synthesize_method): Call finish_mem_initializers.
9472 * parse.y (nodecls): Likewise.
9474 * error.c (dump_type_suffix): Print the exception specs before
9476 (dump_function_decl): Here, too.
9478 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9480 2002-01-10 Ira Ruben <ira@apple.com>
9483 * decl.c (start_method): Handle attrlist.
9485 2002-01-10 Jakub Jelinek <jakub@redhat.com>
9487 * decl2.c (max_tinst_depth): Increase default limit to 500.
9489 2002-01-10 Graham Stott <grahams@redhat.com>
9491 * spew.c (YYCHAR): Uppercase macro parameter and add
9494 (NAME): Uppercase macro parameter.
9496 2002-01-09 Graham Stott <grahams@redhat.com>
9498 * decl.h (grokdeclarator): Wrap long line.
9500 * semantics.c (FINISH_COND): Uppercase macro paramaters and
9503 2002-01-08 Graham Stott <grahams@redhat.com>
9505 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9506 (PALLOC): Uppercase macro parameter and whitespace.
9507 (SALLOC): Uppercase macro parameter.
9508 (SFREE): Uppercase macros parameter, add parenthese and
9510 (STREQL): Uppercase macro parameter and whitespace.
9517 * call.c (convert_like): Add parenthesis and wrap.
9518 (convert_like_with_context): Likewise.
9519 (ICS_RANK): Whitespace.
9520 (NEED_TEMPORARY_P): Remove parenthesis.
9522 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9524 (VTT_MARKED_BINFO_P): Likewise.
9526 * decl.c (BINDING_LEVEL): Add parenthesis.
9527 (DEF_OPERATOR): Likewise.
9529 * mangle.c (MANGLE_TRACE): Add parenthesis.
9530 (MANGLE_TRACE_TREE): Likewise.
9531 (write_signed_number): Likewise.
9532 (write_unsigned_number): Likewise.
9534 * pt.c (ccat): Uppercase macro parameter.
9537 * search.c (SET_BINFO_ACCESS): Add parenthesis.
9539 2002-01-07 Jason Merrill <jason@redhat.com>
9541 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9545 * method.c (make_thunk): If !flag_weak, give the thunk the
9547 (use_thunk): Here, too.
9549 2002-01-07 Graham Stott <grahams@redhat.com>
9551 * error.c: Update copyright date.
9552 (print_scope_operator): Add parenthesis.
9553 (print_left_paren): Likewise.
9554 (print_right_paren): Likewise.
9555 (print_left_bracket): Likewise.
9556 (print_right_bracket): Likewise.
9557 (print_template_argument_list_start): Likewise.
9558 (print_template_argument_list_end): Likewise.
9559 (print_non_consecutive_character): Likewise.
9560 (print_tree_identifier): Likewise.
9561 (print_identifier): Likewise.
9562 (NEXT_CODE): Uppercase macro parameter.
9563 (ident_fndecl): Delete unused.
9564 (GLOBAL_THING): Likewise.
9566 2002-01-06 Graham Stott <grahams@redhat.com>
9568 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9569 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9570 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9571 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9572 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9573 (C_IS_RESERVED_WORD): Uppercase macro parameter.
9574 (C_RID_YYCODE) Likewise.
9575 (ptrmem_cst): Use rtx.
9576 (LOCAL_BINDING_P): Add whitespace.
9577 (INHERITED_VALUE_BINDING_P): Likewise.
9578 (BINDING_SCOPE): Wrap long line.
9579 (BINDING_HAS_LEVEL_P): Remove parenthesis.
9580 (BINDING_VALUE): Wrap long line.
9581 (BINDING_TYPE): Whitespace.
9582 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9583 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9584 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9585 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9586 (same_type_p): Uppercase macro parameters.
9587 (same_type_ignoring_top_level_qualifiers_p): Likewise.
9588 (OVL_FUNCTION): Wrap long line.
9589 (OVL_CHAIN): Whitespace.
9590 (OVL_CURRENT): Add parenthesis and whitespace.
9591 (OVL_NEXT): Whitespace.
9592 (OVL_USED): Likewise.
9593 (IDENTIFIER_TYPE_VALUE): Likewise.
9594 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9595 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9596 (LANG_ID_FIELD): Whitespace.
9597 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9598 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9599 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9600 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9601 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9602 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9603 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9604 (IDENTIFIER_VIRTUAL_P): Likewise.
9605 (IDENTIFIER_OPNAME_P): Likewise.
9606 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9607 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9608 (C_SET_EXP_ORIGINAL_CODE): Likewise.
9609 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9610 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9611 (IS_AGGR_TYPE): Uppercase macro parameter.
9612 (CLASS_TYPE_P): Likewise.
9613 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9614 (IS_AGGR_TYPE_2): Whitespace.
9615 (TAGGED_TYPE_P): Uppercase macro parameter.
9616 (TYPE_BUILT_IN): Whitespace.
9617 (TYPE_FOR_JAVA): Likewise.
9618 (FUNCTION_ARG_CHAIN): Remove parenthesis.
9619 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9620 (FUNCTION_FIRST_USER_PARAM): Likewise.
9621 (PROMOTES_TO_AGGR_TYPE): Whitespace.
9622 (DERIVED_FROM_P): Add parenthesis and wrap.
9623 (UNIQUELY_DERIVED_FROM_P): Likewise.
9624 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9625 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9626 (CLASSTYPE_USE_TEMPLATE): Whitespace.
9627 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9628 (TYPE_GETS_DELETE): Add parenthesis.
9629 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9630 (TYPE_HAS_ASSIGN_REF): Likewise,
9631 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9632 (TYPE_HAS_INIT_REF): Likewise.
9633 (TYPE_HAS_CONST_INIT_REF): Likewise.
9634 (TYPE_BEING_DEFINED): Likewise.
9635 (TYPE_LANG_SPECIFIC): Likewise.
9636 (CLASSTYPE_RTTI): Likewise.
9637 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9638 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9639 (TYPE_OVERLOADS_ARROW): Likewise.
9640 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9641 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9642 (CLASSTYPE_METHOD_VEC): Likewise.
9643 (CLASSTYPE_MARKED_N): Likewise.
9644 (CLASSTYPE_MARKED): Likewise.
9645 (CLASSTYPE_MARKED2): Likewise.
9646 (CLASSTYPE_MARKED3): Likewise.
9647 (CLASSTYPE_MARKED4): Likewise.
9648 (CLASSTYPE_MARKED5): Likewise.
9649 (CLASSTYPE_MARKED6): Likewise.
9650 (SET_CLASSTYPE_MARKED): Whitespace.
9651 (CLEAR_CLASSTYPE_MARKED): Likewise.
9652 (SET_CLASSTYPE_MARKED2): Likewise.
9653 (CLEAR_CLASSTYPE_MARKED2): Likewise.
9654 (SET_CLASSTYPE_MARKED3): Likewise.
9655 (CLEAR_CLASSTYPE_MARKED3): Likewise.
9656 (SET_CLASSTYPE_MARKED4): Likewise.
9657 (CLEAR_CLASSTYPE_MARKED4): Likewise.
9658 (SET_CLASSTYPE_MARKED5): Likewise.
9659 (CLEAR_CLASSTYPE_MARKED5): Likewise.
9660 (SET_CLASSTYPE_MARKED6): Likewise.
9661 (CLEAR_CLASSTYPE_MARKED6): Likewise.
9662 (CLASSTYPE_TAGS): Likewise.
9663 (CLASSTYPE_VSIZE): Likewise.
9664 (CLASSTYPE_VBASECLASSES): Likewise.
9665 (CANONICAL_BINFO): Add parenthesis.
9666 (CLASSTYPE_SIZE(NODE): Likewise.
9667 (CLASSTYPE_SIZE_UNIT): Likewise.
9668 (CLASSTYPE_ALIGN(NODE): Likewise.
9669 (CLASSTYPE_USER_ALIGN): Likewise.
9670 (TYPE_JAVA_INTERFACE): Likewise.
9671 (CLASSTYPE_PURE_VIRTUALS): Likewise.
9672 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9673 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9674 (CLASSTYPE_HAS_MUTABLE): Likewise.
9675 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9676 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9677 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9678 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9679 (CLASSTYPE_INTERFACE_ONLY): Likewise.
9680 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9681 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9682 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9683 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9684 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9685 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9686 (BINFO_UNSHARED_MARKED): Whitespace.
9687 (BINFO_MARKED): Whitespace and wrap.
9688 (SET_BINFO_MARKED): Likewise.
9689 (CLEAR_BINFO_MARKED): Likewise.
9690 (BINFO_VTABLE_PATH_MARKED): Likewise.
9691 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9692 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9693 (BINFO_SUBVTT_INDEX): Remove parenthesis.
9694 (BINFO_VPTR_INDEX): Likewise.
9695 (BINFO_PRIMARY_BASE_OF): Likewise,
9696 (CLASSTYPE_VFIELDS): Whitespace.
9697 (VF_DERIVED_VALUE): Wrap long line.
9698 (NAMESPACE_LEVEL): Whitespace.
9699 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9700 (DEFARG_POINTER): Whitespace.
9701 (DECL_NEEDED_P): Remove parenthesis.
9702 (DECL_LANGUAGE): Whitespace.
9703 (SET_DECL_LANGUAGE): Add parenthesis.
9704 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9705 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9706 (DECL_IN_AGGR_P): Whitespace.
9707 (DECL_FRIEND_P): Likewise.
9708 (DECL_BEFRIENDING_CLASSES): Likewise.
9709 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9710 (DECL_NONCONVERTING_P): Whitespace.
9711 (DECL_PURE_VIRTUAL_P): Likewise.
9712 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9713 (DECL_PENDING_INLINE_INFO): Whitespace.
9714 (DECL_SORTED_FIELDS): Likewise.
9715 (DECL_DEFERRED_FN): Likewise.
9716 (DECL_TEMPLATE_INFO): Likewise.
9717 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9718 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9719 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9720 (TMPL_ARGS_LEVEL): Likewise.
9721 (SET_TMPL_ARGS_LEVEL): Likewise.
9722 (INNERMOST_TEMPLATE_PARMS): Whitespace.
9723 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9724 (INTEGRAL_CODE_P(CODE): Add parenthesis.
9725 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9726 (TYPE_HAS_CONSTRUCTOR): Whitespace.
9727 (TREE_HAS_CONSTRUCTOR): Likewise.
9728 (TYPE_HAS_DESTRUCTOR): Likewise.
9729 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9730 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9731 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9732 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9733 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9734 (TYPE_PTRMEMFUNC_P): Likewise.
9735 (TYPE_PTRMEMFUNC_FLAG): Likewise.
9736 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9737 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9738 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9739 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9740 (DECL_ACCESS): Whitespace.
9741 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9742 (DECL_GLOBAL_DTOR_P): Likewise.
9743 (GLOBAL_INIT_PRIORITY): Likewise.
9744 (DECL_TEMPLATE_PARMS): Likewise.
9745 (DECL_TEMPLATE_RESULT): Likewise.
9746 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9747 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9748 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9749 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9750 (PRIMARY_TEMPLATE_P): Add parenthesis.
9751 (DECL_USE_TEMPLATE): Whitespace.
9752 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9753 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9754 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9755 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9756 (CALL_DECLARATOR_PARMS): Remove parenthesis.
9757 (CALL_DECLARATOR_QUALS): Likewise.
9758 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9759 (TEMP_NAME_P): Wrap.
9760 (VFIELD_NAME_P): Likewise.
9761 (B_SET): Uppercase macro parameters and add parenthesis.
9764 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9765 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9766 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9767 (same_or_base_type_p): Likewise.
9768 (cp_deprecated): Likewise.
9770 2002-01-05 Richard Henderson <rth@redhat.com>
9772 * semantics.c (expand_body): Revert last change.
9774 2002-01-04 Jason Merrill <jason@redhat.com>
9777 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9780 * class.c (build_vtbl_initializer): Check for a lost primary
9781 before calculating the vtable entry to throw away.
9783 2002-01-02 Jason Merrill <jason@redhat.com>
9785 * semantics.c (expand_body): Call outlining_inline_function when
9786 emitting an inline function out of line.
9788 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9790 PR c++/5116, c++/764 reversion
9791 * call.c (build_new_op): Revert the instantiations. They are
9794 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9797 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9799 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9802 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9803 (tsubst, case POINTER_TYPE): Handle pmfs here.
9804 (tsubst, case OFFSET_TYPE): Check it is not an offset to
9805 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9807 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9810 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9811 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9812 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9814 (tsubst_template_parms): Break up loop statements.
9815 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9816 parm PARM_DECLs don't get promoted.
9818 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9821 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9822 (build_x_function_call): Cope with a COMPONENT_REF containing a
9825 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9828 * pt.c (convert_template_argument): Be more careful determining
9829 when RECORD_TYPE templates are or are not templates.
9831 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9834 * cp-tree.h (handle_class_head): Adjust prototype.
9835 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9836 parameters. Use for all class heads.
9837 * parse.y (named_class_head_sans_basetype, named_class_head,
9838 named_complex_class_head_sans_basetype,
9839 named_class_head_sans_basetype_defn,
9840 unnamed_class_head): Remove.
9841 (class_head, class_head_apparent_template): Recognize class heads
9842 (class_head_decl, class_head_defn): New reductions. Process class
9844 (structsp): Adjust class definition and class declaration
9846 (maybe_base_class_list): Give diagnostic on empty list.
9848 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9851 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9852 single non-static member.
9853 (unary_complex_lvalue): If it cannot be a pointer to member, don't
9854 make it so. Check it is not pointer to reference.
9856 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9859 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9860 are processing a template decl.
9862 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9864 PR c++/5116, c++/764
9865 * call.c (build_new_op): Make sure template class operands are
9866 instantiated. Simplify arglist construction.
9868 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9870 * call.c (build_user_type_conversion_1): Use my_friendly_assert
9871 rather than if ... abort.
9872 * cvt.c (convert_to_reference): Likewise.
9873 * semantics.c (setup_vtbl_ptr): Likewise.
9874 * pt.c (lookup_template_class): Comment typo.
9876 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9879 * pt.c (push_template_decl_real): Make sure DECL has
9882 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9885 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9886 for non-reference fields.
9887 * typeck.c (require_complete_type): Use resolve_offset_ref).
9889 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
9892 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9894 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
9897 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9898 up. Don't stabilize_references when initializing a reference.
9900 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9902 * decl2.c (lang_f_options): Const-ify.
9904 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9906 * config-lang.in (diff_excludes): Remove.
9908 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
9911 * typeck.c (build_function_call_real): Use original function
9912 expression for errors.
9914 2001-12-18 Jason Merrill <jason@redhat.com>
9917 * class.c (add_method): Do compare 'this' quals when trying to match a
9918 used function. Don't defer to another used function.
9920 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9922 * pt.c (instantiate_clone): Remove, fold into ...
9923 (instantiate_template): ... here. Simplify by removing mutual
9925 * typeck2.c (build_m_component_ref): Don't cv qualify the function
9926 pointed to by a pointer to function.
9927 * class.c (delete_duplicate_fields_1): Typo.
9929 2001-12-18 Jason Merrill <jason@redhat.com>
9931 C++ ABI change: destroy value arguments in caller.
9932 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9933 create an extra binding level for the parameters.
9934 * decl.c (store_parm_decls): Don't do parameter cleanups.
9936 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9938 * call.c (build_new_method_call): Use '%#V'.
9939 * error.c (cv_to_string): Use V parameter to determine padding.
9941 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9943 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9944 spellings in messages.
9946 2001-12-17 Zack Weinberg <zack@codesourcery.com>
9948 * cp-tree.h: Delete #defines for cp_error, cp_warning,
9949 cp_pedwarn, and cp_compiler_error.
9950 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9951 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9952 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9953 typeck2.c: Change calls to the above macros to use their
9954 language-independent equivalents: error, warning, pedwarn, and
9955 internal_error respectively.
9957 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
9959 * decl2.c (finish_file): Remove back_end_hook.
9961 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9963 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9964 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9965 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9967 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
9969 * lang-options.h: Use American spelling in messages.
9971 2001-12-13 Jason Merrill <jason@redhat.com>
9973 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9975 Use cleanups to run base and member destructors.
9976 * init.c (push_base_cleanups): New function, split out from...
9977 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
9978 * decl.c (finish_destructor_body): Move vbase destruction code to
9980 (begin_function_body, finish_function_body): New fns.
9981 (finish_function): Move [cd]tor handling and call_poplevel to
9982 finish_function_body.
9983 (pushdecl): Skip the new level.
9984 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9985 (setup_vtbl_ptr): Call push_base_cleanups.
9986 * method.c (synthesize_method): Call {begin,end}_function_body.
9987 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9988 * cp-tree.h: Declare new fns.
9989 * parse.y (function_body, .begin_function_body): New nonterminals.
9990 (fndef, pending_inline, function_try_block): Use function_body.
9991 (ctor_initializer_opt, function_try_block): No longer has a value.
9992 (base_init): Remove .set_base_init token.
9993 (.set_base_init, compstmt_or_error): Remove.
9994 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9996 * optimize.c (maybe_clone_body): Fix parameter updating.
9998 2001-12-12 Jason Merrill <jason@redhat.com>
10000 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10001 * semantics.c (genrtl_start_function): Don't pass
10002 parms_have_cleanups or push an extra binding level.
10003 (genrtl_finish_function): Lose cleanup_label cruft.
10005 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10006 (ctor_label): Remove.
10007 * semantics.c (finish_return_stmt): Lose ctor_label support.
10008 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10009 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10012 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10013 check for [cd]tors.
10014 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10016 * decl.c (finish_function): Check VMS_TARGET, not VMS.
10018 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10019 (end_cleanup_fn): And poplevel.
10021 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10022 if we're in a template.
10024 2001-12-12 Jakub Jelinek <jakub@redhat.com>
10026 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10027 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10028 THIS_NAME_P): Delete.
10029 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10030 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10031 with internal naming scheme.
10032 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10034 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
10036 * decl.c (grokdeclarator): Deprecated implicit typename use.
10038 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
10041 * parse.y (frob_specs): Indicate it is a language linkage which
10042 contained the extern.
10043 * decl.c (grokdeclarator): Allow extern language linkage with
10046 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
10049 * decl.c (add_binding): Don't reject duplicate typedefs involving
10050 template parameters.
10052 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
10054 * parse.y, semantics.c: Similarly.
10056 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
10059 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10060 (copy_args_p): Rename to ...
10061 (copy_fn_p): ... here.
10062 (grok_special_member_properties): New function.
10063 (grok_op_properties): Lose VIRTUALP parameter.
10064 (copy_assignment_arg_p): Remove.
10065 * call.c (build_over_call): Use copy_fn_p.
10066 * decl.c (grokfndecl): Reformat. Adjust call to
10067 grok_op_properties.
10068 (copy_args_p): Rename to ...
10069 (copy_fn_p): ... here. Reject template functions. Check for pass
10071 (grok_special_member_properties): Remember special functions.
10072 (grok_ctor_properties): Don't remember them here, just check.
10073 (grok_op_properties): Likewise.
10074 (start_method): Call grok_special_member_properties.
10075 * decl2.c (grokfield): Likewise.
10076 (copy_assignment_arg_p): Remove.
10077 (grok_function_init): Don't remember abstract assignment here.
10078 * pt.c (instantiate_class_template): Call
10079 grok_special_member_properties.
10080 (tsubst_decl): Adjust grok_op_properties call.
10082 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
10084 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10085 RID_TYPES_COMPATIBLE_P.
10087 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10089 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10090 call to build_aggr_init.
10091 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10093 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
10095 * parse.y: Replace uses of the string non-terminal with STRING.
10096 Don't perform string concatentaion here.
10097 (string): Remove non-terminal.
10098 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10100 2001-12-05 Jason Merrill <jason@redhat.com>
10102 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10103 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10104 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10105 * pt.c (push_tinst_level): No longer static.
10106 * cp-tree.h: Declare them.
10108 * init.c (resolve_offset_ref): Don't check access for the base
10109 conversion to access a FIELD_DECL.
10111 * cp-tree.h (TYPE_REFFN_P): New macro.
10112 * decl.c (bad_specifiers): Check it, too.
10114 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10115 on the __*_type_info type if we haven't seen a definition.
10117 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
10119 * decl.c: Include c-common.h.
10120 (shadow_warning): Move to c-common.c.
10122 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10124 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10126 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10128 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10130 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10133 * init.c (sort_base_init): Allow binfos to be directly specified.
10134 * method.c (do_build_copy_constructor): Explicitly convert to the
10136 (do_build_assign_ref): Likewise.
10138 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
10140 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10141 declaration and initialization.
10143 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10145 * typeck2.c: Remove leading capital from diagnostic messages, as
10146 per GNU coding standards.
10148 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
10151 * decl.c (xref_basetypes): Handle attributes between
10154 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
10157 * parse.y (named_complex_class_head_sans_basetype): Add new
10159 * Make-lang.in (parse.c): Adjust expected conflict count.
10161 2001-12-03 Jason Merrill <jason@redhat.com>
10163 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10164 immediate binfos for our virtual bases.
10166 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
10168 * call.c (build_java_interface_fn_ref): Similarly.
10169 * except.c (is_admissible_throw_operand): Similarly.
10170 * init.c (build_java_class_ref): Similarly.
10171 * xref.c (open_xref_file): Similarly.
10173 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10175 * class.c (finish_struct): Remove trailing periods from messages.
10176 * decl.c (check_tag_decl): Similarly.
10177 * lex.c (cxx_set_yydebug): Similarly.
10178 * typeck2.c (friendly_abort): Similarly.
10180 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10183 * cp-tree.h (ovl_member): Remove.
10184 * decl2.c (merge_functions): Handle extern "C" functions
10186 * tree.c (ovl_member): Remove.
10188 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10191 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10192 FUNCTION_DECL, as input.
10193 (mark_overriders): Remove.
10194 (warn_hidden): Rework for the new ABI.
10196 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10199 * call.c (convert_like_real): Do not build additional temporaries
10200 for rvalues of class type.
10202 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
10204 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10205 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10206 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10207 (DERIVED_FROM_P): Likewise.
10208 (enum base_access): Renumber, add ba_quiet bit mask.
10209 (get_binfo): Remove.
10210 (get_base_distance): Remove.
10211 (binfo_value): Remove.
10212 (ACCESSIBLY_DERIVED_FROM_P): Remove.
10213 * call.c (standard_conversion): Use lookup_base.
10214 * class.c (strictly_overrides): Likewise.
10215 (layout_virtual_bases): Likewise.
10216 (warn_about_ambiguous_direct_bases): Likewise.
10217 (is_base_of_enclosing_class): Likewise.
10218 (add_vcall_offset_vtbl_entries_1): Likewise.
10219 * cvt.c (build_up_reference): Adjust comment.
10220 * init.c (build_member_call): Reformat.
10221 * search.c (get_binfo): Remove.
10222 (get_base_distance_recursive): Remove.
10223 (get_base_distance): Remove.
10224 (lookup_base_r): Tweak.
10225 (lookup_base): Add ba_quiet control. Complete the types here.
10226 (covariant_return_p): Use lookup_base.
10227 * tree.c (binfo_value): Remove.
10228 (maybe_dummy_object): Use lookup_base.
10229 * typeck.c (build_static_cast): Use lookup_base.
10230 (get_delta_difference): Likewise.
10231 * typeck2.c (binfo_or_else): Use lookup_base.
10232 (build_scoped_ref): Add back error_mark_check.
10233 (build_m_component_ref): Use lookup_base.
10235 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10237 * Make-lang.in (c++.generated-manpages): New dummy target.
10239 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10241 * Make-lang.in (cp-lang.o): Depends on c-common.h.
10242 * cp-lang.c (c-common.h): Include.
10243 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10244 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10245 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10247 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
10249 * decl2.c (c_language): Move to c-common.c.
10250 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10252 (cxx_init): Update.
10254 2001-11-26 Jason Merrill <jason@redhat.com>
10256 * call.c (joust): Remove COND_EXPR hack.
10258 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
10260 * search.c (lookup_base_r): Declare bk in variable declaration
10263 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
10266 * class.c (build_vbase_pointer): Remove.
10267 (build_vbase_path): Remove.
10268 (build_base_path): New function.
10269 * cp-tree.h (base_access, base_kind): New enumerations.
10270 (build_base_path): Declare.
10271 (convert_pointer_to_real): Remove.
10272 (convert_pointer_to): Remove.
10273 (lookup_base): Declare.
10274 (convert_pointer_to_vbase): Remove.
10275 * call.c (build_scoped_method_call): Use lookup_base &
10276 build_base_path instead of convert_pointer_to_real,
10277 get_base_distance & get_binfo.
10278 (build_over_call): Likewise.
10279 * cvt.c (cp_convert_to_pointer): Likewise.
10280 (convert_to_pointer_force): Likewise.
10281 (build_up_reference): Likewise.
10282 (convert_pointer_to_real): Remove.
10283 (convert_pointer_to): Remove.
10284 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10285 instead of convert_pointer_to_vbase & build_vbase_path.
10286 (emit_base_init): Use build_base_path instead of
10287 convert_pointer_to_real.
10288 (expand_virtual_init): Lose unrequired conversions.
10289 (resolve_offset_ref): Use lookup_base and build_base_path
10290 instead of convert_pointer_to.
10291 * rtti.c (build_dynamic_cast_1): Use lookup_base &
10292 build_base_path instead of get_base_distance & build_vbase_path.
10293 * search.c (get_vbase_1): Remove.
10294 (get_vbase): Remove.
10295 (convert_pointer_to_vbase): Remove.
10296 (lookup_base_r): New function.
10297 (lookup_base): New function.
10298 * typeck.c (require_complete_type): Use lookup_base &
10299 build_base_path instead of convert_pointer_to.
10300 (build_component_ref): Likewise.
10301 (build_x_function_call): Likewise.
10302 (get_member_function_from_ptrfunc): Likewise.
10303 (build_component_addr): Likewise.
10304 * typeck2.c (build_scoped_ref): Likewise.
10306 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10308 * cp-tree.h (CP_TYPE_QUALS): Removed.
10309 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10310 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10311 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10312 * dump.c (cp_dump_tree): Use void* dump_info argument to match
10313 lang-hooks prototype.
10314 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10315 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10316 CP_TYPE_QUALS changed to cp_type_quals.
10317 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10318 (CXX_C_OBJS): Remove c-dump.o.
10320 2001-11-21 Mark Mitchell <mark@codesourcery.com>
10323 * pt.c (lookup_template_class): Ensure that all specializations
10324 are registered on the list corresponding to the most general
10327 2001-11-20 Mark Mitchell <mark@codesourcery.com>
10329 * call.c (non_reference): Add documentation.
10330 (convert_class_to_reference): Do not strip reference types
10331 from conversion operators.
10332 (maybe_handle_ref_bind): Simplify.
10333 (compare_ics): Correct handling of references.
10335 2001-11-19 John Wilkinson <johnw@research.att.com>
10337 * dump.c (dump_op): New function.
10338 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
10339 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10340 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10342 2001-11-19 Mark Mitchell <mark@codesourcery.com>
10345 * semantics.c (finish_sizeof): Make sure that expression created
10346 while processing a template do not have a type.
10347 (finish_alignof): Likewise.
10348 * typeck.c (c_sizeof): Likewise.
10349 (expr_sizeof): Likewise.
10351 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10353 * lex.c (cxx_finish): Call c_common_finish.
10354 (finish_parse): Remove.
10356 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10358 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10359 when displaying error message about missing array bounds.
10361 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10363 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10365 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10367 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
10369 * cp-tree.h (print_class_statistics): Restore.
10371 2001-11-15 Jason Merrill <jason@redhat.com>
10373 * method.c (use_thunk): Don't emit debugging information for thunks.
10375 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10376 * decl.c (make_typename_type): Handle getting a class template.
10377 * search.c (lookup_field_r): A class template is good enough for
10380 * call.c (convert_like_real): Only use cp_convert for the bad part.
10381 (standard_conversion): Also allow bad int->enum.
10382 * typeck.c (ptr_reasonably_similar): Also allow functions to
10383 interconvert. Pointers to same-size integers are reasonably
10386 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10389 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
10392 * init.c (sort_base_init): Remove unreachable code.
10393 (expand_member_init): Adjust comment to reflect reality. Simplify
10394 and remove unreachable code.
10396 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10398 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10399 (cxx_init): Update prototype.
10400 * decl.c (init_decl_processing): Rename. Move null node init
10401 to its creation time.
10402 * lex.c (cxx_init_options): Update.
10403 (cxx_init): Combine with old init_parse; also call
10404 cxx_init_decl_processing.
10406 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
10408 * decl.c (check_initializer): Try to complete the type of an
10409 array element before checking whether it's complete. Don't
10410 complain about arrays with complete element types but an
10412 (cp_finish_decl): Build the hierarchical constructor before
10413 calling maybe_deduce_size_from_array_init.
10415 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
10417 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10419 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
10422 * parse.y (already_scoped_stmt): Remove.
10423 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10425 2001-11-12 H.J. Lu <hjl@gnu.org>
10427 * cvt.c (ocp_convert): Don't warn the address of a weak
10428 function is always `true'.
10430 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10432 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10433 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10434 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10435 * cp-tree.h (print_class_statistics): Remove.
10436 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10437 cxx_print_identifier, cxx_set_yydebug): New.
10438 * lex.c (set_yydebug): Rename c_set_yydebug.
10439 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10440 lang_print_xnode): Rename.
10441 * tree.c (print_lang_statistics): Rename.
10443 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10445 * class.c (dump_array): Fix format specifier warning.
10447 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10449 * cp-lang.c (LANG_HOOKS_NAME): Override.
10450 (struct lang_hooks): Constify.
10451 * lex.c (cxx_init_options): Update.
10452 (lang_identify): Remove.
10453 * parse.y (language_string): Remove.
10455 2001-11-08 Andreas Franck <afranck@gmx.de>
10457 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10458 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10459 suggested by autoconf.
10460 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10461 (c++.install-common): Use the transformed target alias names.
10463 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10465 * Make-lang.in: Update.
10466 * cp-lang.c: Include langhooks-def.h.
10468 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10470 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10472 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10474 * lex.c (copy_lang_type): Add static prototype.
10476 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10478 * pt.c (unify): Handle SCOPE_REF.
10480 2001-11-01 Jakub Jelinek <jakub@redhat.com>
10482 * tree.c (cp_copy_res_decl_for_inlining): Adjust
10483 DECL_ABSTRACT_ORIGIN for the return variable.
10485 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10487 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10489 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
10491 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10492 semantics.c, spew.c: Fix spelling errors.
10494 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10496 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10498 2001-10-25 Zack Weinberg <zack@codesourcery.com>
10500 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10503 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10505 * cp-lang.c (cxx_get_alias_set): New function.
10506 Point LANG_HOOKS_GET_ALIAS_SET to it.
10508 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10510 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10511 * cp-tree.h (make_unbound_class_template): Prototype new function.
10512 * decl.c (make_unbound_class_template): New function.
10513 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10514 * error.c (dump_type): Likewise.
10515 * mangle.c (write_type): Likewise.
10516 * parse.y (template_parm): Likewise.
10517 (template_argument): Use make_unbound_class_template.
10518 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10519 (tsubst): Likewise.
10520 (tsubst_copy): Likewise.
10522 * tree.c (walk_tree): Likewise.
10523 * typeck.c (comptypes): Likewise.
10525 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10527 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10528 extra calls into fewer ones.
10530 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
10532 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10533 Warn when merging inline with attribute noinline.
10534 (start_decl, start_function): Warn if inline and attribute
10535 noinline appear in the same declaration.
10537 2001-10-16 H.J. Lu <hjl@gnu.org>
10539 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10540 for tree checking disabled.
10542 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
10544 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10545 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10547 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10549 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10550 (unify): Only handle MINUS_EXPR specially if the above flag is set
10551 and the subtracted constant is 1. Clear the flag on recursive calls.
10552 Set it when unifying the maximum value in an INTEGER_TYPE's range.
10554 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10556 * decl.c (bad_specifiers): Don't allow exception specifications
10559 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
10561 * cp/lex.c (init_cp_pragma): Similarly.
10563 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10565 * pt.c (lookup_template_class): Build complete template arguments
10566 for BOUND_TEMPLATE_TEMPLATE_PARM.
10568 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10570 * cp-tree.h (TYPE_BINFO): Update comment.
10571 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10572 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10573 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10574 (copy_type): Prototype new function.
10575 * lex.c (copy_lang_decl): Gather tree node statistics.
10576 (copy_lang_type): New function.
10577 (copy_type): Likewise.
10578 (cp_make_lang_type): Create lang_type for
10579 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
10580 and BOUND_TEMPLATE_TEMPLATE_PARM.
10581 * pt.c (tsubst): Use copy_type instead of copy_node.
10582 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10584 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10586 * pt.c (determine_specialization): Ignore functions without
10587 DECL_TEMPLATE_INFO.
10589 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
10592 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10594 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
10596 * typeck2.c (store_init_value): Don't re-digest a bracketed
10599 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10602 2001-10-11 Richard Henderson <rth@redhat.com>
10604 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10605 of an asm statement.
10606 (build_vtbl_ref_1): Split out from build_vtbl_ref.
10607 (build_vfn_ref): Use it to handle vtable descriptors before
10608 calling build_vtable_entry_ref.
10609 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10611 2001-10-10 Richard Henderson <rth@redhat.com>
10613 * parse.y (asm_operand): Allow named operands.
10614 * semantics.c (finish_asm_stmt): Tweek for changed location
10615 of the operand constraint.
10617 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
10619 * call.c (standard_conversion): Add bad conversion between
10620 integers and pointers.
10621 (convert_like_real): Don't use convert_for_initialization for bad
10622 conversions; complain here and use cp_convert.
10623 (build_over_call): Don't handle bad conversions specially.
10624 (perform_implicit_conversion): Allow bad conversions.
10625 (can_convert_arg_bad): New fn.
10626 * cp-tree.h: Declare it.
10627 * typeck.c (convert_for_assignment): Use it.
10628 (ptr_reasonably_similar): Any target type is similar to void.
10630 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
10632 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10633 (cp/cp-lang.o): New rule.
10634 * cp-tree.h: Declare hooks.
10635 * tree.c: Make hooks non-static.
10636 (init_tree): Don't initialize hooks here.
10637 * lex.c: Likewise. Move definition of lang_hooks to...
10638 * cp-lang.c: ... new file.
10640 2001-10-08 Richard Henderson <rth@redhat.com>
10642 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10643 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10645 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10647 * class.c (build_vtable_entry_ref): Const-ify.
10648 * decl.c (predefined_identifier,
10649 initialize_predefined_identifiers): Likewise.
10650 * init.c (build_new_1): Likewise.
10651 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10654 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
10656 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10657 (INSNS_PER_STMT): Likewise.
10658 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10659 (copy_body, initialize_inlined_parameters): Likewise.
10660 (declare_return_variable, inlinable_function_p): Likewise.
10661 (expand_call_inline, expand_calls_inline): Likewise.
10662 (optimize_inline_calls, clone_body): Likewise.
10663 * tree.c (walk_tree): Moved to ../tree-inline.c.
10664 (walk_tree_without_duplicates): Likewise.
10665 (copy_tree_r, remap_save_expr): Likewise.
10667 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
10669 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10670 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10671 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10672 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10673 (flag_inline_trees): Moved declaration to ../tree-inline.h.
10674 (walk_tree): Moved declaration to ../tree-inline.h.
10675 (walk_tree_without_duplicates, copy_tree_r): Likewise.
10676 (remap_save_expr): Likewise.
10677 * decl.c: Include tree-inline.h.
10678 (lang_mark_tree): Don't mark inlined_fns.
10679 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10680 * optimize.c: Include tree-inline.h.
10681 (optimize_inline_calls): Move declaration to ../tree.h, as
10683 (remap_decl): Use language-independent constructs and hooks.
10684 (remap_block, copy_body_r, declare_return_variable): Likewise.
10685 (inlinable_function_p): Likewise. Don't test for
10686 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10687 no longer language-specific.
10688 (optimize_inline_calls): Likewise. Make it non-static. Moved
10689 call of dump_function to...
10690 (optimize_function): Here...
10691 (clone_body): New function, extracted from...
10692 (maybe_clone_body): ... here. Build decl_map locally and pass
10693 it on to clone_body.
10694 * pt.c, semantics.c: Include tree-inline.h.
10695 * tree.c: Likewise.
10696 (cp_walk_subtrees): New language-specific hook for tree inlining.
10697 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10698 cp_is_overload_p, cp_auto_var_in_fn_p,
10699 cp_copy_res_decl_for_inlining): Likewise.
10700 (walk_tree): Move language-specific constructs into...
10701 (cp_walk_subtrees): this new function.
10702 (copy_tree_r): Use language-independent constructs and hooks.
10703 (init_tree): Initialize tree inlining hooks.
10704 (remap_save_expr): Adjust prototype so that the declaration
10705 does not require the definition of splay_tree.
10707 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
10709 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10710 to build the declaration instead of the declaration itself.
10712 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
10714 * decl2.c (cxx_decode_option): Add 'else'.
10716 * spew.c (end_input): No longer static.
10717 * cp-tree.h: Declare it.
10718 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10720 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10722 * call.c (build_over_call), typeck.c (build_function_call_real):
10723 Pass type attributes to check_function_format rather than name or
10724 assembler name. Don't require there to be a name or assembler
10725 name to check formats.
10727 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10729 * decl.c (init_decl_processing): Don't call
10730 init_function_format_info. Initialize lang_attribute_table
10732 (builtin_function): Call decl_attributes.
10733 (insert_default_attributes): New.
10735 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
10737 * decl.c (grokdeclarator): Copy array typedef handling from C
10740 * decl.c (grokdeclarator): Copy too-large array handling from C
10743 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
10745 * config-lang.in (target_libs): Added target-gperf, so that we
10746 don't try to build it if C++ is disabled.
10748 2001-09-23 Zack Weinberg <zack@codesourcery.com>
10750 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10751 (cp/errfn.o): Delete rule.
10752 (cp/error.o): Depend on flags.h.
10753 * errfn.c: Delete file.
10754 * cp-tree.h: Declare warn_deprecated. Remove definitions of
10755 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10756 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10757 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10758 internal_error respectively. Make cp_deprecated into a macro.
10759 Don't define cp_printer typedef or declare cp_printers.
10760 * error.c: Include flags.h.
10761 Delete: struct tree_formatting_info, print_function_argument_list,
10762 print_declaration, print_expression, print_function_declaration,
10763 print_function_parameter, print_type_id, print_cv_qualifier_seq,
10764 print_type_specifier_seq, print_simple_type_specifier,
10765 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10766 print_parameter_declaration_clause, print_exception_specification,
10767 print_nested_name_specifier, and definition of cp_printers.
10768 (locate_error): New function.
10769 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10770 rewritten in terms of locate_error and diagnostic.c.
10771 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10772 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
10773 (init_error): Adjust to match.
10775 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10777 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10779 2001-09-21 Richard Henderson <rth@redhat.com>
10781 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10782 (build_vtbl_initializer): Likewise.
10783 (build_vfn_ref): New.
10784 * cp-tree.h: Declare it.
10785 * call.c (build_over_call): Use it.
10786 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10787 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10789 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
10791 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10793 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
10795 Table-driven attributes.
10796 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10797 * decl2.c (cplus_decl_attributes): Only take one attributes
10799 * cp-tree.c (cplus_decl_attributes): Update prototype.
10800 * class.c (finish_struct), decl.c (start_decl, start_function),
10801 decl2.c (grokfield), friend.c (do_friend), parse.y
10802 (parse_bitfield): Update calls to cplus_decl_attributes.
10803 * decl.c (grokdeclarator): Take a pointer to a single ordinary
10805 * decl.h (grokdeclarator): Update prototype.
10806 * decl2.c (grokfield): Take a single ordinary attribute list.
10807 * friend.c (do_friend): Likewise.
10808 * decl.c (shadow_tag, groktypename, start_decl,
10809 start_handler_parms, grokdeclarator, grokparms, start_function,
10810 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10811 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10812 (process_template_parm, do_decl_instantiation): Pass single
10813 ordinary attribute lists around.
10814 * decl.c (grokdeclarator): Correct handling of nested attributes.
10816 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
10817 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10820 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10821 (cp_attribute_table): Declare.
10822 * decl.c (valid_lang_attribute): Don't define.
10823 (lang_attribute_table): Define.
10824 (init_decl_processing): Initialize lang_attribute_table instead of
10825 valid_lang_attribute.
10826 * tree.c (cp_valid_lang_attribute): Remove.
10827 (handle_java_interface_attribute, handle_com_interface_attribute,
10828 handle_init_priority_attribute): New functions.
10829 (cp_attribute_table): New array.
10830 * decl2.c (import_export_class): Don't use
10831 targetm.valid_type_attribute.
10833 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10835 * Make-lang.in (cp/error.o): Depend on real.h
10836 * error.c: #include "real.h"
10838 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10840 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10841 xmalloc/strcpy/strcat.
10843 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10845 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10847 * pt.c (tsubst_decl): Likewise.
10849 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10851 * decl2.c (lang_f_options): Const-ification.
10852 * lex.c (cplus_tree_code_name): Likewise.
10853 * spew.c (yyerror): Likewise.
10855 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10858 * class.c (force_canonical_binfo_r): Check & move an indirect
10859 primary base first.
10860 (force_canonical_binfo): Check that it's not already
10862 (mark_primary_virtual_base): Remove BINFO parameter.
10863 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10865 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10867 Remove TYPE_NONCOPIED_PARTS.
10868 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10869 CLASSTYPE_PURE_VIRTUALS.
10870 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10871 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10872 (layout_class_type): Don't call fixup_inline_methods here ...
10873 (finish_struct_1): ... call it here.
10875 2001-09-04 Mark Mitchell <mark@codesourcery.com>
10877 * decl.c (duplicate_decls): Remove code deadling with
10879 * decl2.c (finish_file): Likewise.
10880 * pt.c (instantiate_decl): Likewise.
10881 * semantics.c (expand_body): Don't defer local functions if
10882 they wouldn't be deferred for some other reason. Don't
10883 generate RTL for functions that will not be emitted.
10884 (genrtl_start_function): Remove code deadling with
10886 (genrtl_finish_function): Likewise.
10888 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
10891 * call.c (build_over_call): Do not optimize any empty base
10894 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10896 * error.c (dump_template_decl): Output template parameters
10897 together with their specifiers.
10898 Output `class' prefix for template template parameter.
10899 (dump_decl): Fix formatting.
10901 2001-08-30 Kurt Garloff <garloff@suse.de>
10903 * optimize.c (inlinable_function_p): Allow only smaller single
10904 functions. Halve inline limit after reaching recursive limit.
10906 2001-08-30 Joern Rennecke <amylaar@redhat.com>
10907 Jason Merrill <jason_merrill@redhat.com>
10909 * class.c (build_vtable_entry_ref): Subtract in char*, not
10912 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
10914 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10915 (build_cplus_array_type): Use cp_build_qualified_type, not
10916 TYPE_MAIN_VARIANT, to get an unqualified version.
10918 * decl2.c (grok_alignof): Lose.
10919 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10920 * typeck.c (c_alignof): Lose.
10921 * semantics.c (finish_sizeof, finish_alignof): New.
10922 * parse.y: Use them.
10923 * cp-tree.h: Declare them.
10925 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
10927 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10928 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10929 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10931 2001-08-19 Jakub Jelinek <jakub@redhat.com>
10933 * typeck2.c (add_exception_specifier): Only require complete type if
10934 not in processing template declaration.
10936 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10938 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10939 GNU_xref_start_scope and GNU_xref_end_scope.
10941 * tree.c (TYPE_HASH): Moved to ../tree.h.
10943 2001-08-16 Mark Mitchell <mark@codesourcery.com>
10945 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10948 2001-08-14 Richard Henderson <rth@redhat.com>
10950 * class.c, cp-tree.h (build_vfn_ref): Remove.
10951 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10953 2001-08-13 Mark Mitchell <mark@codesourcery.com>
10955 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10956 empty class assignment as having side-effects to avoid
10959 2001-08-13 Zack Weinberg <zackw@panix.com>
10961 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10962 * except.c: Include libfuncs.h.
10964 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10966 * decl.c (grokdeclarator): Clarify diagnostic message.
10968 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10970 * decl2.c (do_nonmember_using_decl): Replace using directive
10971 with using declaration in the error message.
10973 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10975 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10976 criterion to avoid rebuilding expression tree instead of
10977 processing_template_decl.
10979 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10981 Support named return value optimization for inlines, too.
10982 * decl.c (finish_function): Nullify returns here.
10983 * semantics.c (genrtl_start_function): Not here.
10984 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10985 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
10986 Also nullify the CLEANUP_STMT for the nrv.
10987 * cp-tree.h: Declare it.
10988 * optimize.c (declare_return_variable): Replace the nrv with the
10990 * typeck.c (check_return_expr): Be more flexible on alignment check.
10991 Ignore cv-quals when checking for a matching type.
10993 2001-08-09 Richard Henderson <rth@redhat.com>
10995 * decl2.c (finish_objects): Use target hooks instead of
10996 assemble_constructor and assemble_destructor.
10998 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11000 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11002 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
11005 Stop using TYPE_NONCOPIED_PARTS.
11006 * call.c (build_over_call): Be careful when copy constructing
11007 or assigning to an empty class.
11008 * class.c (check_bases_and_members): It has a
11009 COMPLEX_ASSIGN_REF if it has a vptr.
11010 (layout_class_type): Don't add empty class padding to
11011 TYPE_NONCOPIED_PARTS.
11012 (finish_struct_1): Don't add the VFIELD either.
11013 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11016 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11018 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11020 2001-08-06 Richard Henderson <rth@redhat.com>
11022 * decl2.c (finish_objects): Pass a symbol_ref and priority to
11023 assemble_{constructor,destructor}. Remove priority handling.
11025 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11027 Don't allow template-id in using-declaration.
11028 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11029 (do_class_using_decl): Likewise.
11031 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11033 * cp/spew.c (read_token): No need to pop buffers.
11035 2001-08-02 Stan Shebs <shebs@apple.com>
11037 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11038 (fnaddr_from_vtable_entry): Remove decl.
11039 * method.c (use_thunk): Update comment.
11041 2001-08-01 Andrew Cagney <ac131313@redhat.com>
11043 * repo.c (get_base_filename): Change return value to const char
11046 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
11050 * cp-tree.h (flag_honor_std): Remove.
11051 (CPTI_FAKE_STD): Remove.
11052 (std_node): Remove comment about it being NULL.
11053 (fake_std_node): Remove.
11054 * decl.c (in_fake_std): Remove.
11055 (walk_namespaces_r): Remove fake_std_node check.
11056 (push_namespace): Remove in_fake_std code.
11057 (pop_namespace): Likewise.
11058 (lookup_name_real): Remove fake_std_node check.
11059 (init_decl_processing): Always create std_node. Always add
11060 std:: things there.
11061 (builtin_function): Always put non '_' fns in std.
11062 * decl2.c (flag_honor_std): Remove.
11063 (lang_f_options): Remove honor-std.
11064 (unsupported_options): Add honor-std.
11065 (set_decl_namespace): Remove fake_std_node check.
11066 (validate_nonmember_using_decl): Likewise.
11067 (do_using_directive): Likewise.
11068 (handle_class_head): Likewise.
11069 * dump.c (cp_dump_tree): Likewise.
11070 * except.c (init_exception_processing): Adjust.
11071 * init.c (build_member_call): Remove fake_std_node check.
11072 (build_offset_ref): Likewise.
11073 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11074 * rtti.c (init_rtti_processing): Adjust.
11076 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11078 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11079 operand while calling cp_tree_equal.
11081 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11083 The 3.0 ABI no longer has vbase pointer fields.
11084 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11085 FORMAT_VBASE_NAME): Remove.
11086 * method.c (do_build_copy_constructor): Adjust.
11087 (do_build_assign_ref): Adjust.
11088 * search.c (lookup_field_r): Adjust.
11089 * typeck.c (build_component_ref): Adjust.
11091 The 3.0 ABI always has a vtable pointer at the start of every
11093 * rtti.c (build_headof_sub): Remove.
11094 (build_headof): Adjust.
11095 (get_tinfo_decl_dynamic): No need to check flag_rtti
11097 (create_real_tinfo_var): Explain why we need a hidden name.
11099 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11102 * class.c (update_vtable_entry_for_fn): The fixed adjustment
11103 of a virtual thunk should be from declaring base.
11105 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11107 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11108 the shared virtual base, so preserving inheritance graph order.
11110 2001-07-30 Andreas Jaeger <aj@suse.de>
11112 * decl2.c: Remove unused var global_temp_name_counter.
11114 2001-07-28 Richard Henderson <rth@redhat.com>
11116 * method.c (pending_inlines): Remove.
11118 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11120 * class.c (mark_primary_virtual_base): Don't adjust base
11122 (dfs_unshared_virtual_bases): Adjust them here.
11123 (mark_primary_bases): Explain why we adjust at the end.
11125 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11127 * class.c (finish_struct_1): When copying the primary base's
11128 VFIELD, make sure we find it is at offset zero.
11130 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11132 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11133 tsubst_expr for default template arguments.
11135 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11138 * spew.c (yylex): Only copy the token's lineno, if it is
11141 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11144 * call.c (resolve_args): Simplify, call
11145 convert_from_reference.
11146 (build_new_op): Resolve and convert from reference ARG1
11147 earlier. Adjust ARG2 & ARG3 resolve and conversion.
11149 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11151 * decl.c (last_function_parm_tags): Remove.
11152 (current_function_parm_tags): Remove.
11153 (init_decl_processing): Adjust.
11154 (start_function): Adjust.
11155 (store_parm_decls): Adjust.
11158 * decl.c (grokdeclarator): Detect when a function typedef is
11159 declaring a function, and create last_function_parms correctly.
11161 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
11163 * call.c (joust): Only prefer a non-builtin candidate to a builtin
11164 one if they have the same signature.
11166 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
11167 it rather than toplevel_bindings_p. Give it a mangled name if static.
11168 (convert_to_reference): Adjust.
11169 * decl2.c (get_temp_name): Lose.
11170 * mangle.c (mangle_ref_init_variable): New fn.
11171 (mangle_guard_variable): Strip the ref-init header.
11172 * cp-tree.h: Adjust.
11173 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11175 (grok_reference_init): Always use DECL_INITIAL.
11177 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11180 * call.c (build_conditional_expr): Recheck args after
11182 * cp-tree.h (build_conditional_expr): Move to correct file.
11183 * typeck.c (decay_conversion): Diagnose any unknown types
11185 (build_binary_op): Don't do initial decay or default
11186 conversions on overloaded functions.
11187 (build_static_cast): Don't do a decay conversion here.
11189 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11192 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11193 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11195 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11197 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11198 (create_vtbl_ptr): ... here.
11200 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11202 * class.c (build_vbase_offset_vbtl_entries): Look for
11203 non-primary base of which we are a sub vtable.
11205 2001-07-24 Phil Edwards <pme@sources.redhat.com>
11207 * semantics.c (finish_this_expr): Remove unused code.
11209 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
11211 Simplify rtti, now we've only one ABI.
11212 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11214 (tinfo_decl_id, tinfo_var_id): Remove.
11215 (get_typeid_1): Remove.
11217 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11218 (typeid_ok_p): New function.
11219 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11220 (get_tinfo_decl): Remove old abi documentation.
11221 (tinfo_from_decl): Remove.
11222 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11223 (get_typeid_1): Remove.
11224 (get_base_offset): Remove.
11225 (synthesize_tinfo_var): Absorb get_base_offset.
11226 (create_real_tinfo_var): Don't use tinfo_decl_id.
11228 2001-07-23 Graham Stott <grahams@redhat.com>
11230 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11231 variable has_two_argument_delete_p.
11233 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
11235 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11236 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11237 (CPTI_INDEX_IDENTIFIER): Remove.
11238 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11239 (delta2_identifier): Remove.
11240 (index_identifier): Remove.
11241 (pfn_or_delta2_identifier): Remove.
11242 (flag_vtable_thunks): Remove.
11243 (VTABLE_DELTA2_NAME): Remove.
11244 (VTABLE_INDEX_NAME): Remove.
11245 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11246 (vfunc_ptr_type_node): Adjust.
11247 (VTABLE_NAME_PREFIX): Adjust.
11248 (build_vfn_ref): Lose first parameter.
11249 (fixup_all_virtual_upcast_offsets): Remove.
11250 * decl.c (initialize_predefined_identifiers): Remove
11251 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11252 (init_decl_processing): Remove no-vtable-thunk code.
11253 * decl2.c (flag_vtable_thunks): Remove.
11254 (mark_vtable_entries): Remove no-vtable-thunk code.
11255 * error.c (dump_decl): Remove no-vtable-thunk code.
11256 (dump_expr): Adjust ptr to member function code.
11257 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11259 * rtti.c (build_headof): Remove no-vtable-thunk code.
11260 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11261 * search.c (get_base_distance): Remove expand_upcast_fixups case.
11262 (virtual_context) Remove.
11263 (expand_upcast_fixups): Remove.
11264 (fixup_virtual_upcast_offsets): Remove.
11265 (fixup_all_virtual_upcast_offsets): Remove.
11266 * typeck.c (get_member_function_from_ptrfunc): Remove
11267 no-vtable-thunk code.
11268 * call.c (build_over_call): Adjust call to build_vfn_ref.
11269 * class.c (build_vfn_ref): Lose first parameter. Remove
11270 no-vtable-thunk code.
11271 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11272 (build_vtable_entry): Remove no-vtable-thunk code.
11274 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
11276 Remove old-abi remnants. Remove comments about old abi
11277 behavior. Remove references to 'new-abi' in comments.
11278 * cp-tree.h: Adjust comments.
11279 (vbase_offsets_in_vtable_p): Delete.
11280 (vcall_offsets_in_vtable_p): Delete.
11281 (vptrs_present_everywhere_p): Delete.
11282 (all_overridden_vfuns_in_vtables_p): Delete.
11283 (merge_primary_and_secondary_vtables_p): Delete.
11284 (TYPE_CONTAINS_VPTR_P): Adjust.
11285 (VTT_NAME_PREFIX): Remove.
11286 (CTOR_VTBL_NAME_PREFIX): Remove.
11287 (init_vbase_pointers): Remove.
11288 * class.c: Adjust coments.
11289 (build_vbase_pointer_fields): Delete.
11290 (build_vbase_pointer): Remove old-abi code.
11291 (build_secondary_vtable): Likewise.
11292 (modify_all_vtables): Likewise.
11293 (create_vtable_ptr): Likewise.
11294 (layout_class_type): Likewise.
11295 (finish_struct_1): Likewise.
11296 (finish_vtbls): Likewise.
11297 (dfs_finish_vtbls): Delete.
11298 (build_vbase_offset_vtbl_entries): Remove old-abi code.
11299 * cvt.c: Adjust comments.
11300 * decl.c: Adjust comments.
11301 * decl2.c: Adjust comments.
11302 * init.c: Adjust comments.
11303 (construct_virtual_bases): Remove old-abi code.
11304 * lang-specs.h: Remove -fno-new-abi.
11305 * mangle.c: Adjust comments.
11306 * rtti.c: Adjust comments.
11307 (get_base_offset): Remove old-abi-code.
11308 * search.c: Adjust comments.
11309 (dfs_init_vbase_pointers): Remove.
11310 (dfs_vtable_path_unmark): Remove.
11311 (init_vbase_pointers): Remove.
11312 * semantics.c: Adjust comments.
11313 (emit_associated_thunks): Remove old-abi code.
11314 * typeck.c: Adjust comments.
11316 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
11318 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11321 2001-07-19 Mark Mitchell <mark@codesourcery.com>
11323 * class.c (finish_struct_anon): Forbid nested classes.
11325 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11327 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11328 * optimize.c: Include debug.h.
11329 (maybe_clone_body): Use debug hook.
11330 * semantics.c: Include debug.h.
11331 (expand_body): Use debug hook.
11333 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11335 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11337 2001-07-18 Mark Mitchell <mark@codesourcery.com>
11339 * class.c (type_requires_array_cookie): New function.
11340 (check_methods): Don't try to figure out whether the type needs a
11342 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11343 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11344 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11345 * pt.c (instantiate_class_template): Don't set
11346 TYPE_VEC_DELETE_TAKES_SIZE.
11347 * NEWS: Document ABI changes from GCC 3.0.
11349 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
11350 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11352 * NEWS (Changes in GCC 3.0): Fix typo.
11354 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
11356 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11357 which attributes are to be attached, and a flags argument. Update
11358 call to decl_attributes.
11359 (grokfield): Update call to decl_attributes.
11360 * class.c (finish_struct): Update call to cplus_decl_attributes.
11361 * cp-tree.h (cplus_decl_attributes): Update prototype.
11362 * decl.c (start_decl, grokdeclarator, start_function): Update
11363 calls to decl_attributes and cplus_decl_attributes.
11364 * friend.c (do_friend): Update call to cplus_decl_attributes.
11365 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11367 2001-07-12 Mark Mitchell <mark@codesourcery.com>
11369 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11370 for `register' variables with an asm-specification.
11372 2001-07-11 Mark Mitchell <mark@codesourcery.com>
11374 * semantics.c (finish_asm_stmt): Mark the output operands
11375 to an asm addressable, if necessary.
11377 2001-07-11 Ben Elliston <bje@redhat.com>
11379 * Revert this change -- there is a subtle bug.
11382 * decl.c (finish_enum): New "attributes" argument; pass it to
11383 cplus_decl_attributes. Use a narrower type if the enum is packed.
11384 * cp-tree.h (finish_enum): Adjust prototype.
11385 * parse.y (enum_head): New non-terminal.
11386 (structsp): Use it. Enums now may be preceded or followed by
11387 optional attributes -- pass their chained tree to finish_enum().
11388 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11390 2001-07-10 Mark Mitchell <mark@codesourcery.com>
11392 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11395 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
11397 * semantics.c (cp_expand_stmt): Fix for null
11398 current_function_return_value.
11400 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
11402 * call.c (build_op_delete_call): Initialize fn.
11403 (convert_like_real): Delete conditional.
11404 (joust): Initialize *w and *l.
11405 * class.c: Add prototype for binfo_ctor_vtable.
11406 (get_primary_binfo): Initialize result.
11407 * init.c (build_java_class_ref): Initialize name.
11409 2001-07-09 Erik Rozendaal <dlr@acm.org>
11411 * typeck.c (unary_complex_lvalue): Do not duplicate the
11412 argument to modify, pre-, or post-increment when used as an
11413 lvalue and when the argument has side-effects.
11415 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11417 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11418 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
11419 cplus_decl_attributes even if attrs is NULL.
11420 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11422 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11424 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11425 calls to decl_attributes.
11427 2001-07-06 Ira Ruben <ira@apple.com>
11429 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11430 be DECL_TEMPLATE_RESULT.
11432 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11434 * cp-tree.h (copy_template_template_parm): Rename to ...
11435 (bind_template_template_parm): ... here.
11436 * tree.c (copy_template_template_parm): Rename to ...
11437 (bind_template_template_parm): ... here. Remove the case when
11438 NEWARGS is NULL_TREE.
11439 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11440 BOUND_TEMPLATE_TEMPLATE_PARM.
11441 * pt.c (lookup_template_class): Adjust.
11443 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
11445 * cvt.c (convert_lvalue): New fn.
11446 * cp-tree.h: Declare it.
11447 * method.c (do_build_assign_ref): Use it.
11448 (do_build_copy_constructor): Convert parm to base types
11449 before calling base constructors.
11451 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11452 DECL_USER_ALIGN. Check flag_elide_constructors instead of
11454 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11456 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
11458 * optimize.c (optimize_inline_calls): New function, broken out
11460 (optimize_function): ... here. Call it. Don't inline if it is
11462 (dump_function): Print name of dump flag causing this dump.
11463 * semantics.c (expand_body): Move thunk inline check to
11466 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
11468 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11469 (comptypes): Use target.comp_type_attributes.
11471 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
11473 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11475 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11477 * error.c (lang_print_error_function): Add a `diagnostic_context *'
11480 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11482 * decl2.c (import_export_class): Update.
11484 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11486 * error.c (init_error): Adjust settings.
11488 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11490 * error.c (init_error): Adjust settings.
11492 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
11494 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11495 return pointers to data members by reference rather than by value.
11497 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
11499 Implement the Named Return Value optimization.
11500 * cp-tree.h (struct cp_language_function): Add x_return_value.
11501 (current_function_return_value): Now a macro.
11502 * decl.c: Don't define it.
11503 (define_label, finish_case_label): Don't clear it.
11504 (init_decl_processing): Don't register it with GC.
11505 * semantics.c (genrtl_finish_function): Don't check it for
11506 no_return_label. Copy the RTL from the return value to
11507 current_function_return_value and walk, calling...
11508 (nullify_returns_r): ...this new fn.
11509 * typeck.c (check_return_expr): Set current_function_return_value.
11511 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
11513 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11514 sharing a ctor vtable with. Merge code for cases 1 and 2.
11515 (binfo_ctor_vtable): New fn.
11516 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11518 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
11520 * class.c (dfs_find_final_overrider): Fix logic.
11522 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11523 virtual thunk instead of non-virtual.
11524 (get_matching_virtual): Uncomment.
11526 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11527 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
11530 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
11532 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11533 we've not emerged from the hierarchy of RTTI_BINFO on reaching
11534 a non-virtual base.
11536 2001-06-13 Mark Mitchell <mark@codesourcery.com>
11538 * NEWS: Update release number.
11540 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11542 PR c++/3130, c++/3131, c++/3132
11543 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11544 * class.c (force_canonical_binfo_r): Move
11545 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11546 virtual bases unless they're primary and what they're primary
11547 too has been moved.
11548 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11549 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11550 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11552 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11553 (layout_nonempty_base_or_field): Add most derived type
11555 (layout_empty_base): Likewise.
11556 (build_base_field): Likewise.
11557 (build_base_fields): Likewise.
11558 (propagate_binfo_offsets): Add most derived type
11559 parameter. Skip non canonical virtual bases too.
11560 (dfs_set_offset_for_unshared_vbases): Don't skip primary
11561 bases. Do skip canonical bases.
11562 (layout_virtual_bases): Adjust.
11563 (layout_class_type): Adjust.
11564 (dfs_get_primary_binfo): Build list of virtual primary base
11566 (get_primary_binfo): Check that the shared virtual primary
11567 base candidate was found first.
11568 (accumulate_vtbl_inits): Don't do anything for non-vptr
11569 containing binfos. For case 1 primary virtual bases, keep
11570 checking that we've not emerged from the hierarchy of RTTI_BINFO.
11572 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11575 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11576 hierarchy looking for primary bases for a ctor
11577 vtable. Recursively call oneself, if we meet our primary via
11578 this route and haven't met it yet via inheritance graph order.
11580 2001-06-11 Mark Mitchell <mark@codesourcery.com>
11582 * lang-options.h: Emit documentation for -fno-honor-std, not
11585 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
11587 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11588 Don't clobber delta.
11589 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11591 2001-06-10 Mark Mitchell <mark@codesourcery.com>
11592 Gabriel Dos Reis <gdr@codesourcery.com>
11594 * Make-lang.in (cp/call.o): Depend on diagnostic.h
11595 (cp/typeck.o): Depend on diagnostic.h
11596 (cp/typeck2.o): Depend on diagnostic.h
11597 (cp/repo.o): Depend on dignostic.h
11598 * typeck.c: #include diagnostic.h
11599 (convert_for_initialization): Remove extern declaration for
11600 warningcount and errorcount.
11602 * call.c: #include diagnostic.h
11603 (convert_like_real): Remove extern declaration for warnincount and
11606 * repo.c: #include diagnostic.h
11607 * typeck2.c: #include diagnostic.h
11609 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11611 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11612 in previous change.
11614 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11617 * friend.c (do_friend): Use push_decl_namespace for classes at
11620 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11621 Jason Merrill <jason_merrill@redhat.com>
11624 * class.c (build_secondary_vtable): Use assert, rather than an error
11626 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11627 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11628 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11629 Don't set BINFO_VTABLE for a primary virtual base.
11631 2001-06-07 Mark Mitchell <mark@codesourcery.com>
11633 * decl.c (duplicate_decls): Update source position information
11634 when a template function is defined.
11636 2001-06-07 Phil Edwards <pme@sources.redhat.com>
11638 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
11640 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
11643 * decl.c (pushtag): Don't push into a complete type's scope.
11645 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
11647 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11648 (struct lang_decl_flags): Lose generate_with_vtable_p.
11649 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11650 * class.c (copy_virtuals): Adjust.
11651 * decl2.c (mark_vtable_entries): Adjust.
11652 * method.c (make_thunk, build_vtable_entry): Adjust.
11653 * class.c (update_vtable_entry_for_fn): Only look as far as the
11654 first defining class.
11655 (build_vtbl_initializer): Put nothing in the slot for a function only
11656 defined in a lost primary virtual base.
11657 (add_vcall_offset_vtbl_entries_1): Use the same code for
11658 the lost primary case and the normal case.
11659 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11660 (get_vfield_offset, get_derived_offset): Lose.
11661 (dfs_find_final_overrider): Use look_for_overrides_here.
11662 (get_matching_virtual): New fn.
11663 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11664 not BV_VCALL_INDEX.
11665 * search.c (look_for_overrides_here): Split out from...
11666 (look_for_overrides_r): Here.
11668 * class.c (find_final_overrider): Return error_mark_node on error.
11670 * decl2.c (key_method): #if 0 accidental change.
11672 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
11674 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11675 (build_over_call): Likewise.
11676 * decl.c (grokparms): Likewise.
11677 * pt.c (tsubst_decl): Likewise.
11678 * typeck.c (convert_arguments): Likewise.
11680 2001-06-05 Mark Mitchell <mark@codesourcery.com>
11682 * semantics.c (begin_class_definition): Robustify.
11684 * pt.c (instantiate_decl): Tell the repository code about the
11685 clones, not the cloned functions.
11686 * repo.c (repo_template_used): Explicitly instantiate the cloned
11687 function, not the clones.
11689 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11691 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11692 ICS_BAD_FLAG on created conversion.
11693 (compare_ics): Break out rank.
11695 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11697 * decl.c (xref_tag): Remove extraneous %s on dependent name
11700 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11702 * class.c (layout_vtable_decl): Fix off by one error on
11704 (build_vtt): Likewise.
11705 (build_ctor_vtbl_group): Likewise.
11707 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11709 * class.c (maybe_indent_hierarchy): New function.
11710 (dump_class_hierarchy_r): Add flags. Dump extra binfo
11711 information, if enabled. Use maybe_indent_hierarchy. Adjust
11713 (dump_class_hierarchy): Adjust prototype. Adjust output format.
11714 (dump_array, dump_vtable, dump_vtt): New functions.
11715 (finish_struct_1): Adjust hierarchy dumping.
11716 (initialize_vtable): Call dump_vtable.
11717 (build_vtt): Call dump_vtt.
11718 (build_ctor_vtbl_group): Call dump_vtable.
11719 * decl2.c (flag_dump_class_layout): Remove.
11720 (cxx_decode_option): Remove dump translation unit
11721 and dump class hierarchy check. Call dump_switch_p.
11722 (finish_file): Adjust dumping.
11723 (dump.c): Only dump base classes if not TDF_SLIM.
11724 Only dump namespace members if not TDF_SLIM.
11725 * optimize.c (dump_function): New function.
11726 (optimize_function): Call dump_function.
11727 * semantics.c (expand_body): Use dump_enabled_p.
11729 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
11732 Part missed from first commit
11733 * decl2.c (finish_anon_union): Copy context.
11735 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
11738 * optimize.c (remap_decl): Remap anonymous aggregate members too.
11740 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
11743 * semantics.c (expand_body): Don't optimize thunks.
11745 2001-05-25 Sam TH <sam@uchicago.edu>
11747 * cp-tree.h lex.h: Fix header include guards.
11749 2001-05-25 Mark Mitchell <mark@codesourcery.com>
11751 * decl.c (init_decl_processing): Tweak.
11753 2001-05-24 Mark Mitchell <mark@codesourcery.com>
11755 * decl.c (duplicate_decls): Tidy.
11756 (init_decl_processing): Always set flag_no_builtin.
11758 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
11761 * decl2.c (do_local_using_decl): Push the decls, even in a
11764 2001-05-22 Mark Mitchell <mark@codesourcery.com>
11766 * optimize.c (initialize_inlined_parameters): Don't set
11767 TREE_READONLY for a VAR_DECL taking the place of an inlined
11770 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
11772 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11773 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11776 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
11778 * parse.y: Refer to compound literals as such, not as
11779 constructor-expressions.
11781 2001-05-21 Mark Mitchell <mark@codesourcery.com>
11783 * call.c (build_op_delete_call): Ignore exception-specifications
11784 when looking for matching delete operators.
11785 * init.c (build_new_1): Compute whether or not the allocation
11786 function used is a placement allocation function or not, and
11787 communicate this information to build_op_delete_call.
11789 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
11791 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
11792 (build_vtbl_ref): Adjust.
11793 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11794 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11796 (unsupported_options): Correspondingly.
11798 * decl2.c (maybe_make_one_only): Check flag_weak, not
11799 supports_one_only().
11801 * cp-tree.def (START_CATCH_STMT): Lose.
11802 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
11803 * tree.c (cp_statement_code_p): Don't case it.
11804 * semantics.c (cp_expand_stmt): Likewise.
11805 * cp-tree.h (START_CATCH_TYPE): Lose.
11806 (HANDLER_TYPE): New.
11807 * except.c (expand_start_catch_block): Don't start any blocks.
11809 (expand_end_catch_block): Don't end any blocks.
11810 * parse.y (handler): Don't pass anything from finish_handler_parms
11812 * pt.c (tsubst_expr): Likewise.
11813 * semantics.c (begin_handler): Call note_level_for_catch here.
11814 (finish_handler_parms): Don't return anything.
11815 (genrtl_catch_block, begin_catch_block): Lose.
11816 (genrtl_handler): Call expand_start_catch here.
11818 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
11820 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11821 (get_vtable_decl, build_vtt): Not here.
11823 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
11826 * optimize.c (update_cloned_parm): Copy addressability and other
11829 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11831 * pt.c (determine_specialization): Ignore artificial functions.
11833 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
11835 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11836 (C_RID_CODE): Remove.
11837 * lex.c (cxx_init_options): Call set_identifier_size. Update.
11838 (init_parse): Don't do it here.
11840 2001-05-18 Diego Novillo <dnovillo@redhat.com>
11842 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11843 function declaration to avoid stripping the symbol's attributes.
11845 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
11847 * decl.c (pushdecl): Adjust error string.
11848 (xref_tag): Adjust friend class injection warning. Remove the
11849 inherited name from the class shadowed scope.
11851 2001-05-17 Mark Mitchell <mark@codesourcery.com>
11853 * except.c (cp_protect_cleanup_actions): New function.
11854 (init_exception_processing): Don't set protect_cleanup_actions
11855 here. Do set lang_protect_cleanup_actions.
11857 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11859 * spew.c (read_token): Call yyerror on all unexpected tokens.
11861 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11863 * init.c (member_init_ok_or_else): Take a tree rather than
11865 (expand_member_init): Adjust.
11867 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
11869 * decl.c (duplicate_decls): Suppress warning about duplicate
11870 decls if the first decl is a friend.
11872 2001-05-12 Zack Weinberg <zackw@stanford.edu>
11874 * except.c (choose_personality_routine): Export. Add
11875 explanatory comment. Take an enum languages, not a boolean.
11876 (initialize_handler_parm): Adjust to match.
11877 * cp-tree.h: Prototype choose_personality_routine.
11878 * lex.c (handle_pragma_java_exceptions): New function.
11879 (init_cp_pragma): Register #pragma GCC java_exceptions.
11881 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11883 * method.c (build_mangled_C99_name): Remove unused prototype.
11885 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
11887 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11888 * typeck.c (get_member_function_from_ptrfunc,
11889 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11890 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11892 Reverted Geoff Keating's 2001-05-03's patch.
11894 2001-05-11 Ira Ruben <ira@apple.com>
11896 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11898 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
11900 * cp-tree.h (finish_label_expr, lookup_label): Delete.
11901 * parse.y: Update for '&&'; don't issue warning here.
11902 * semantics.c (finish_label_expr): Delete.
11904 2001-05-07 Mark Mitchell <mark@codesourcery.com>
11906 * splay-tree.h (splay_tree_max): New function.
11907 (splay_tree_min): Likewise.
11909 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
11911 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11912 (pfn_vflag_identifier): Define.
11913 Update comment about layout of pointer functions.
11914 (build_ptrmemfunc1): Update prototype.
11915 (expand_ptrmemfunc_cst): Update prototype.
11916 * decl.c (initialize_predefined_identifiers): Initialize
11917 pfn_vflag_identifier.
11918 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11919 an extra field to the type.
11920 * expr.c (cplus_expand_constant): Pass 'flag' between
11921 expand_ptrmemfunc_cst and build_ptrmemfunc1.
11922 * typeck.c (get_member_function_from_ptrfunc): When
11923 FUNCTION_BOUNDARY < 16, look at additional field to determine
11924 if a pointer-to-member is a real pointer or a vtable offset.
11925 (build_ptrmemfunc1): Add new parameter to contain extra field.
11926 (build_ptrmemfunc): Pass the extra field around.
11927 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11928 (pfn_from_ptrmemfunc): Ignore the extra field.
11930 2001-05-03 Mark Mitchell <mark@codesourcery.com>
11932 * cp-tree.h (flag_inline_trees): Update documentation.
11933 * decl.c (init_decl_processing): Adjust handling of
11934 flag_inline_functions and flag_inline_trees to support -O3.
11935 (grokfndecl): Set DECL_INLINE on all functions if that's what
11936 the user requested.
11937 (save_function_data): Clear DECL_INLINE in
11938 current_function_cannot_inline is non-NULL.
11939 * decl2.c (flag_inline_trees): Update documentation.
11941 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
11943 * dump.c (cp_dump_tree, USING_STMT case): New case.
11944 * tree.c (cp_statement_code_p): Add USING_STMT.
11945 * decl2.c (do_using_directive): Add the using directive statement.
11947 * tree.c (walk_tree): Reformat an if block.
11949 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11951 * decl.c (compute_array_index_type): Don't try to do anything with
11952 the indices when processing a template.
11954 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11956 * call.c: NULL_PTR -> NULL.
11957 * class.c: Likewise.
11959 * decl.c: Likewise.
11960 * decl2.c: Likewise.
11961 * except.c: Likewise.
11962 * init.c: Likewise.
11963 * rtti.c: Likewise.
11964 * search.c: Likewise.
11965 * tree.c: Likewise.
11966 * typeck.c: Likewise.
11967 * typeck2.c: Likewise.
11969 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11971 * decl2.c (do_using_directive): Revert previous patch.
11973 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11975 * cp-tree.def (USING_STMT): New statement node.
11976 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11977 * decl2.c (do_using_directive): Add USING_STMT to statement
11978 tree. Don't emit errors when processing template decl.
11979 * pt.c (tsubst_expr, USING_STMT case): New case.
11980 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11982 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11984 * call.c (build_new_op): Convert args from reference here.
11985 (build_conditional_expr): Don't convert here.
11987 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11989 * spew.c (last_token_id): New static variable.
11990 (read_token): Set it here.
11991 (yyerror): Use it here.
11993 2001-04-30 Richard Henderson <rth@redhat.com>
11995 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11996 * decl.c: Likewise.
11998 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12000 * gxxint.texi: Remove.
12001 * Make-lang.in: Remove all traces of gxxint.texi.
12003 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
12005 * decl2.c (start_static_initialization_or_destruction): Correct
12006 logic to handle the -fno-use-cxa-atexit case.
12008 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12010 * optimize.c (update_cloned_parm): New function.
12011 (maybe_clone_body): Use it. Update the `this' parameter too.
12013 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
12015 * decl2.c (unsupported_options): Add new-abi.
12016 * lang-options.h: Remove no longer supported options.
12018 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12020 * except.c (can_convert_eh): Don't check template parms,
12021 typename types etc.
12023 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12025 * optimize.c (maybe_clone_body): Copy parameter names and locations.
12027 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12029 * cp-tree.h (adjust_clone_args): Prototype new function.
12030 * class.c (adjust_clone_args): New function.
12031 * decl.c (start_function): Call it for in charge ctors.
12033 2001-04-26 Mark Mitchell <mark@codesourcery.com>
12035 * method.c (use_thunk): Make sure that thunks really are emitted
12038 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
12040 * mangle.c (write_chars): New macro.
12041 (hwint_to_ascii): New function
12042 (write_number): Use it.
12043 (write_integer_cst): Deal with really big numbers.
12045 2001-04-25 Mark Mitchell <mark@codesourcery.com>
12047 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12050 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
12052 * decl.c (grokdeclarator): Set context of namespace scope
12055 2001-04-24 Zack Weinberg <zackw@stanford.edu>
12057 * cp/optimize.c: Include hashtab.h.
12058 (struct inline_data): Add tree_pruner.
12059 (expand_call_inline, expand_calls_inline): Use it when calling
12061 (optimize_function): Initialize and free tree_pruner.
12063 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12065 Lazy __FUNCTION__ generation.
12066 * cp-tree.def (FUNCTION_NAME): Remove.
12067 * cp-tree.h (function_name_declared_p): Remove.
12068 (cp_fname_init): Prototype.
12069 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12070 don't call declare_function_name. Call start_fname_decls.
12071 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12072 clobber the line number.
12073 (cp_fname_init): New function.
12074 (start_function): Call start_fname_decls.
12075 (finish_function): Call finish_fname_decls.
12076 * lex.c (reswords): Add slots for __FUNCTION__ et al.
12077 (rid_to_yy): Add mappings for __FUNCTION__ et al.
12078 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12079 * parse.y (VAR_FUNC_NAME): New token.
12080 (primary): Add VAR_FUNC_NAME.
12081 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12083 (tsubst, FUNCTION_NAME case): Remove.
12084 (tsubst_copy, FUNCTION_NAME case): Remove.
12085 (tsubst_expr, DECL_STMT case): Be careful with a
12086 DECL_PRETTY_FUNCTION_P.
12087 (instantiate_decl): Remove function_name_declared_p.
12088 * semantics.c (begin_compound_statement): Don't call
12089 declare_function_name here.
12090 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12091 (finish_translation_unit): Call finish_fname_decls.
12092 (expand_body): Remove function_name_declared_p.
12093 * typeck2.c (digest_init): Allow any ERROR_MARK.
12095 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12097 * pt.c (tsubst_decl): Use VOID_TYPE_P.
12098 * semantics.c: Fix some typos.
12100 2001-04-23 Phil Edwards <pme@sources.redhat.com>
12102 * cp/decl2.c (flag_honor_std): Always initialize to 1.
12104 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12106 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12108 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
12110 * except.c (build_throw): Wrap the initialization of the exception
12111 object in a MUST_NOT_THROW_EXPR.
12112 (do_free_exception): #if 0.
12114 2001-04-20 Mark Mitchell <mark@codesourcery.com>
12116 * cp-tree.h (finish_enum): Change prototype.
12117 * decl.c (finish_enum): Reorganize.
12118 * parse.y (structsp): Adjust calls to finish_enum.
12120 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12122 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12125 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12127 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12128 (layout_empty_base): Return at end flag.
12129 (build_base_field): Likewise.
12130 (build_base_fields): Likewise.
12131 (layout_virtual_bases): Don't add 1 to eoc value.
12132 (end_of_class): Use full size for empty bases.
12133 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12134 empty bases. Don't add 1 to eoc value. Only add trailing padding
12135 if we're an empty class with no empty bases.
12136 (dump_class_hierarchy): Dump size and alignment.
12138 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12140 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12143 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12145 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12146 is found, look first if name does not match the structure name.
12148 2001-04-19 Mark Mitchell <mark@codesourcery.com>
12150 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12152 (SET_DECL_LANGUAGE): New macro.
12153 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12154 (pushdecl): Likewise.
12155 (build_library_fn_1): Likewise.
12156 (build_cp_library_fn): Likewise.
12157 (grokfndecl): Likewise.
12158 (grokvardecl): Mark `extern "C"' variables as having C linkage.
12159 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12160 * lex.c (retrofit_lang_decl): Likewise.
12161 * mangle.c (mangle_decl_string): Don't mangle the names of
12162 variables declared with C language linkage.
12163 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12165 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
12167 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12168 flag_access_control from uninitialized storage.
12170 2001-04-15 Mark Mitchell <mark@codesourcery.com>
12172 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12173 * mangle.c (write_pointer_to_member_type): Fix mangling of
12174 pointers to cv-qualified member function types.
12176 * init.c (build_delete): Create a SAVE_EXPR for the address if
12177 we're going to use it more than once.
12179 2001-04-13 Mark Mitchell <mark@codesourcery.com>
12181 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12182 (expand_ptremfunc_cst): Change prototype.
12183 (delta2_from_ptrmemfunc): Remove.
12184 * expr.c (cplus_expand_constant): Adjust call to
12185 expand_ptrmemfunc_cst.
12186 * typeck.c (build_ptrmemfunc1): Simplify.
12187 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12188 results in a constant.
12189 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12190 (delta2_from_ptrmemfunc): Remove.
12191 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12193 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
12195 * cp-tree.h (decl_namespace_list): New macro.
12196 (struct saved_scope): Add decl_ns_list.
12197 * decl.c (mark_saved_scope): Mark it.
12198 * decl2.c: Lose static decl_namespace_list.
12199 (init_decl2): Don't save it.
12201 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12203 * cp-tree.h (warn_return_type, yylex): Delete redundant
12206 * decl.c (current_class_depth, global_namespace): Likewise.
12208 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12210 * repo.c (flag_use_repository): Likewise.
12212 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12214 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12215 set_block, pushdecl, getdecls, gettags, init_decl_processing,
12216 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12217 lvalue_or_else, print_lang_statistics, comp_target_types,
12218 unsigned_type, signed_type, signed_or_unsigned_type,
12219 build_function_call, mark_addressable, incomplete_type_error):
12220 Delete redundant declarations.
12222 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
12224 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12225 (TYPE_ANONYMOUS_P): New macro.
12226 (TAGGED_TYPE_P): New macro.
12227 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12228 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12229 * tree.c (no_linkage_helper): Likewise.
12230 * semantics.c (begin_class_definition): Likewise.
12231 * pt.c (convert_template_argument): Likewise.
12232 * lex.c (check_for_missing_semicolon): Likewise.
12234 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12236 * class.c (dfs_unshared_virtual_bases): New function.
12237 (mark_primary_bases): Call it.
12238 (check_bases): Ignore virtual bases when determining
12241 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12243 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12245 2001-04-11 Mark Mitchell <mark@codesourcery.com>
12247 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12248 cloned function to the clone.
12250 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12252 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12254 * semantics.c: Include expr.h.
12256 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
12258 * method.c (implicitly_declare_fn): Commonize code for copy ctor
12259 and assignment op. Set TREE_USED for parameter.
12261 2001-04-10 Mark Mitchell <mark@codesourcery.com>
12263 * class.c (find_final_overrider_data): Add `candidates'.
12264 (dfs_find_final_overrider): Don't issue error messages
12266 (find_final_overrider): Issue error messages here.
12267 (build_base_field): Don't warn about amgibuous direct bases here.
12268 (warn_about_ambiguous_direct_bases): New function.
12269 (layout_class_type): Use it.
12271 2001-04-10 Richard Henderson <rth@redhat.com>
12273 * typeck.c (build_array_ref): Push the array reference inside
12274 COMPOUND_EXPR and COND_EXPR.
12276 2001-04-05 Mark Mitchell <mark@codesourcery.com>
12278 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12279 * decl.c (duplicate_decls): Adjust accordingly.
12280 (maybe_commonize_var): Likewise.
12281 (grokfndecl): Likewise.
12282 (start_function): Likewise.
12283 (start_method): Likewise.
12284 * decl2.c (key_method): Likewise.
12285 (import_export_decl): Likewise.
12286 * method.c (implicitly_declare_fn): Likewise.
12287 * optimize.c (maybe_clone_body): Likewise.
12289 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
12291 * lang-specs.h: Add __DEPRECATED.
12293 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
12295 * search.c (get_dynamic_cast_base_type): When building a new
12296 constant, set its type to ssizetype.
12298 2001-04-04 Jakub Jelinek <jakub@redhat.com>
12300 * optimize.c (expand_call_inline): Only add newly inlined statements
12301 into inlined_stmts.
12303 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12305 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12306 (OPERATOR_FORMAT): Likewise.
12307 (OPERATOR_TYPENAME_FORMAT): Likewise.
12308 * operators.def: Remove old name-mangling information.
12309 * decl.c (grok_op_properties): Adjust accordingly.
12310 * lex.c (init_operators): Likewise.
12311 * rtti.c (get_tinfo_decl): Issue error messages about types that
12312 have variable size.
12314 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12316 * decl2.c (import_export_decl): Don't call import_export_class
12317 when processing an inline member function.
12318 * semantics.c (expand_body): Call import_export_decl before
12319 emitting inline functions.
12321 2001-03-28 Richard Henderson <rth@redhat.com>
12323 IA-64 ABI Exception Handling:
12324 * cp-tree.def (EH_SPEC_BLOCK): New.
12325 (MUST_NOT_THROW_EXPR): New.
12326 * cp-tree.h: Update changed function declarations.
12327 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12328 (CPTI_CALL_UNEXPECTED): New.
12329 (struct cp_language_function): Rename x_eh_spec_try_block
12330 to x_eh_spec_block.
12331 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12332 * decl.c (current_binding_level): If no current function
12333 bindings, revert to scope_chain.
12334 (initialize_predefined_identifiers): Remove __cp_push_exception.
12335 (store_parm_decls): Use begin_eh_spec_block.
12336 (finish_function): Use finish_eh_spec_block.
12337 (mark_lang_function): Update for name changes.
12338 * decl2.c (finish_file): No mark_all_runtime_matches.
12339 * dump.c (cp_dump_tree): Handle new tree codes.
12340 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12341 * except.c (catch_language_init, catch_language): Remove.
12342 (init_exception_processing): Don't set language code.
12343 Initialize call_unexpected_node, protect_cleanup_actions,
12344 eh_personality_libfunc, lang_eh_runtime_type.
12345 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12346 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12347 (prepare_eh_type): Split out type canonicalizations ...
12348 (build_eh_type_type): ... from here.
12349 (build_eh_type_type_ref): Remove.
12350 (mark_all_runtime_matches): Remove.
12351 (build_exc_ptr): New.
12352 (do_begin_catch, do_end_catch): New.
12353 (do_pop_exception): Remove.
12354 (build_terminate_handler): Remove.
12355 (choose_personality_routine): Split out language choice from ...
12356 (initialize_handler_parm): ... here.
12357 Use MUST_NOT_THROW_EXPR.
12358 (expand_start_catch_block): Use do_begin_catch. Simplify Java
12359 exception object handling.
12360 (expand_start_eh_spec, expand_end_eh_spec): Remove.
12361 (expand_exception_blocks, alloc_eh_object): Remove.
12362 (begin_eh_spec_block, finish_eh_spec_block): New.
12363 (do_allocate_exception, do_free_exception): New.
12364 (expand_throw): Merge into ...
12365 (build_throw): ... here. Update for abi.
12366 * expr.c (cplus_expand_expr): No expand_internal_throw.
12367 Handle MUST_NOT_THROW_EXPR.
12368 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12369 * semantics.c (*) Update for except.h name changes.
12370 (genrtl_try_block): No protect_with_terminate.
12371 (genrtl_eh_spec_block): New.
12372 (genrtl_handler): Don't emit the goto here.
12373 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12374 (genrtl_finish_function): Don't expand_exception_blocks.
12375 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12377 2001-03-28 Richard Henderson <rth@redhat.com>
12379 * decl.c (struct named_label_list): Rename eh_region to
12380 in_try_scope, add in_catch_scope.
12381 (struct binding_level): Rename eh_region to is_try_scope,
12382 add is_catch_scope.
12383 (note_level_for_try): Rename from note_level_for_eh.
12384 (note_level_for_catch): New.
12385 (poplevel): Copy both is_try_scope and is_catch_scope to
12386 the named_label_list struct.
12387 (check_previous_goto_1): Don't check for catch block via
12388 DECL_ARTIFICIAL; use in_try_scope instead.
12389 (check_goto): Likewise.
12390 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12391 * except.c (expand_start_catch_block): Call note_level_for_catch.
12392 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12394 2001-03-27 Richard Henderson <rth@redhat.com>
12396 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12397 exceptions_via_longjmp.
12399 2001-03-27 Phil Edwards <pme@sources.redhat.com>
12401 * pt.c (check_default_tmpl_args): Make error messages clearer.
12403 2001-03-26 Phil Edwards <pme@sources.redhat.com>
12405 * error.c: Also undefine 'A' macro used for cp_printers definition.
12407 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12409 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12411 2001-03-26 Mike Yang <yang@research.att.com>
12412 Mark Mitchell <mark@codesourcery.com>
12414 * dump.c (dump_access): New function.
12415 (cp_dump_tree): Use it. Dump basetype information for class
12418 2001-03-26 Mark Mitchell <mark@codesourcery.com>
12420 * Makefile.in (optimize.o): Depend on params.h.
12421 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12422 (init_decl_processing): Set flag_no_inline when doing
12424 * optimize.c: Include params.h.
12425 (struct inline_data): Improve documentation of FNS. Add
12426 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12427 (INSNS_PER_STMT): New macro.
12428 (remap_block): Use CLONING_P.
12429 (inlinable_function_p): Don't inline big functions.
12430 (expand_call_inline): Keep track of how much inlining we've done.
12431 (optimize_function): Set FIRST_INLINED_FN.
12432 (maybe_clone_body): Set CLONING_P.
12433 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12435 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12436 rest_of_compilation. Clear DECL_RTL for local variables
12438 (clear_decl_rtl): New function.
12440 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
12443 * cp-tree.h (skip_type_access_control,
12444 reset_type_access_control): Prototype.
12445 * decl.c (grokdeclarator): Access of friends is not checked.
12446 * parse.y (component_decl_list): Reset type access control.
12447 * semantics.c (decl_type_access_control): Clear
12448 current_type_lookups.
12449 (save_type_access_control): Don't save if not deferring.
12450 (skip_type_access_control, reset_type_access_control): New
12452 (begin_class_definition): Do type access control for basetypes.
12453 Start deferred access control.
12454 (finish_class_definition): Resume immediate access control if
12455 this is a local class.
12457 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12459 * class.c (add_method): Use memcpy/memmove, not bcopy.
12461 * decl.c (duplicate_decls): Likewise.
12463 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12465 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12468 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12470 * decl.c (local_names): Define.
12471 (push_local_name): New.
12472 (grok_reference_init): Return init if initializing static reference
12473 variable with non-constant instead of emitting it.
12474 Move expand_static_init call to cp_finish_decl.
12475 (layout_var_decl): Call push_local_name.
12476 (maybe_commonize_var): Allow inlining functions even if they have
12477 static local variables, use comdat_linkage for them if flag_weak.
12478 (check_initializer): Call obscure_complex_init if
12479 grok_reference_init returned nonzero.
12480 (save_function_data): Clear x_local_names.
12481 (pop_cp_function_context): Free x_local_names.
12482 (mark_inlined_fns): Remove.
12483 (mark_lang_function): Mark x_local_names.
12484 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12485 Mark inlined_fns as tree, remove call to mark_inlined_fns.
12486 * class.c (alter_access): Ensure DECL_ACCESS is never set if
12487 DECL_DISCRIMINATOR_P.
12488 * cp-tree.h (cp_language_function): Add x_local_names.
12489 (lang_decl_flags): Add discriminator into u2.
12490 (lang_decl_inlined_fns): Remove.
12491 (lang_decl): inlined_fns is now a TREE_VEC.
12492 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12493 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12494 TREE_VEC, not a custom structure.
12495 (optimize_function): Likewise.
12496 * mangle.c (discriminator_for_local_entity): Discriminate among
12497 VAR_DECL local entities.
12498 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12501 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
12503 Add support for Java interface method calls.
12504 * cp-tree.h (struct lang_type): Add java_interface flag.
12505 (TYPE_JAVA_INTERFACE): New macro.
12506 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12507 by setting TYPE_JAVA_INTERFACE.
12508 * call.c (java_iface_lookup_fn): New static.
12509 (build_over_call): If calling a method declared in a
12510 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12511 expression which resolves the function address.
12512 (build_java_interface_fn_ref): New function.
12514 2001-03-22 Richard Henderson <rth@redhat.com>
12516 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12517 * except.c: Don't include it.
12519 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12520 based on an idea from Joe Buck <jbuck@synopsys.com>
12522 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12524 (data_def, component_decl): Add reductions to bad_decl.
12526 2001-03-22 Jakub Jelinek <jakub@redhat.com>
12528 * method.c (do_build_assign_ref): Don't use build_modify_expr for
12529 anonymous aggregates, since they don't have assignment operator
12531 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12532 assignment operators for anonymous structure fields.
12534 2001-03-21 Jason Merrill <jason@redhat.com>
12536 * pt.c (instantiate_decl): Abort if we see a member constant
12537 instantiation that doesn't already have its initializer.
12538 Downgrade explicit instantiation without definition to pedwarn.
12540 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12541 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12542 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12544 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12545 (pending_vtables): Remove.
12546 * decl2.c (pending_vtables): Remove.
12547 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12548 CLASSTYPE_VTABLE_NEEDS_WRITING.
12549 (import_export_class): Likewise.
12550 (init_decl2): Don't mark pending_vtables.
12551 * lex.c (handle_pragma_vtable): Just sorry.
12552 * pt.c (instantiate_class_template): Don't mess with
12553 CLASSTYPE_VTABLE_NEEDS_WRITING.
12554 (mark_class_instantiated): Likewise.
12555 * ptree.c (print_lang_type): Don't print it.
12556 * semantics.c (begin_class_definition): Don't set it.
12558 * pt.c (template_tail): Replace with last_pending_template.
12559 (maybe_templates, maybe_template_tail): Remove.
12560 (add_pending_template): Adjust.
12561 (instantiate_pending_templates): Adjust.
12563 * cp-tree.h (struct saved_scope): Remove lang_stack field.
12564 (current_lang_stack): Remove.
12565 * decl.c (maybe_push_to_top_level): Don't initialize it.
12566 (duplicate_decls): Use current_lang_depth.
12567 (xref_basetypes): Likewise.
12568 * class.c (current_lang_depth): New fn.
12569 (push_lang_context): Use more varray functionality.
12570 (pop_lang_context): Likewise.
12572 * error.c (GLOBAL_THING): Always use '__'.
12574 2001-03-21 Mark Mitchell <mark@codesourcery.com>
12576 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12578 * mangle.c (mangle_decl_string): Mangle the names of overloaded
12579 operators, even when they have `extern "C"' linkage.
12581 2001-03-19 Mark Mitchell <mark@codesourcery.com>
12583 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12584 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12585 where it's not necessary.
12586 (add_method): Remove optimization involving comparison of
12587 DECL_ASSEMBLER_NAME.
12588 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12589 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12590 where it's not necessary.
12591 (check_methods): Likewise.
12592 (build_clone): Likewise.
12593 (built_vtt): Likewise.
12594 * cp-tree.h (DECL_NEEDED_P): Likewise.
12595 * decl.c (pushtag): Likewise.
12596 (duplicate_decls): Likewise.
12597 (pushdecl): Likewise.
12598 (builtin_function): Likewise.
12599 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12600 (build_cp_library_fn): Likewise.
12601 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12602 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12603 where it's not necessary.
12604 (make_rtl_for_nonlocal_decl): Likewise.
12605 (cp_finish_decl): Likewise.
12606 (grokfndecl): Likewise.
12607 (grokvardecl): Likewise.
12608 (grokdeclarator): Likewise.
12609 (start_function): Likewise.
12610 (cp_missing_return_ok_p): Likewise.
12611 * decl2.c (grokclassfn): Likewise.
12612 (check_classfn): Likewise.
12613 (finish_static_data_member_decl): Likewise.
12614 (grokfield): Likewise.
12615 * error.c (GLOBAL_IORD_P): Remove.
12616 (dump_global_iord): Improve output.
12617 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12618 * except.c (nothrow_libfn_p): Summarily reject any function not in
12620 * init.c (build_java_class_ref): Don't explicitly set
12621 DECL_ASSEMBLER_NAME after calling mangle_decl.
12622 * mangle.c (mangle_decl_string): Handle extern "C" functions.
12623 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12624 * method.c (set_mangled_name_for_decl): Don't explicitly set
12625 DECL_ASSEMBLER_NAME after calling mangle_decl.
12626 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12627 IDENTIFIER_GLOBAL_VALUE for the thunk.
12628 * pt.c (set_mangled_name_for_template_decl): Remove.
12629 (check_explicit_specialization): Don't use it.
12630 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12631 (tsubst_friend_function): Likewise.
12632 (tsubst_decl): Likewise.
12633 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12634 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12635 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12636 where it's not necessary.
12637 (tinfo_base_init): Likewise.
12638 (create_real_tinfo_var): Likewise.
12639 * search.c (looup_field_1): Likewise.
12640 * semantics.c (finish_named_return_value): Likewise.
12641 * tree.c (init_tree): Set lang_set_decl_assembler_name.
12643 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
12645 Correct semantics restrictions checking in throw-expression.
12646 * except.c (is_admissible_throw_operand): New function.
12647 (build_throw): Use it.
12649 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12651 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12654 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12656 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12657 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12658 * decl.c (duplicate_decls): Likewise.
12659 (builtin_function): Likewise.
12660 (build_library_fn): Likewise.
12661 (build_cp_library_fn): Likewise.
12662 (check_initializer): Likewise.
12663 (cp_finish_decl): Likewise.
12664 * decl2.c (grokfield): Likewise.
12665 (grok_function_init): Remove #if 0'd code.
12666 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12667 * friend.c (do_friend): Likewise.
12668 * init.c (get_temp_regvar): Likewise.
12669 * method.c (make_thunk): Likewise.
12670 * pt.c (tsubst_friend_function): Likewise.
12671 (tsubst_decl): Likewise.
12672 (regenerate_decl_from_template): Likewise.
12673 * semantics.c (genrtl_named_return_value): Likewise.
12674 (expand_body): Likewise.
12675 (genrtl_finish_function): Likewise.
12676 * tree.c (cp_tree_equal): Likewise.
12678 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
12680 * call.c (convert_like_real): Add extra semantics to INNER
12681 parameter. Don't convert to temporary if a user conversion
12682 gives us an lvalue that we're about to bind to a reference.
12683 Set INNER to indicate pending reference binding on recursive
12686 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12688 * cp/lex.c: Delete duplicate pending_lang_change.
12690 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12692 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12694 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12695 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12697 2001-03-09 Zack Weinberg <zackw@stanford.edu>
12699 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12701 2001-03-08 Stan Shebs <shebs@apple.com>
12703 * cp-tree.h (set_identifier_local_value): Remove unused decl.
12705 2001-03-06 Zack Weinberg <zackw@stanford.edu>
12707 * spew.c: Remove references to CPP_OSTRING.
12709 2001-03-06 Andrew Haley <aph@redhat.com>
12711 * typeck.c (convert_arguments): Check that we have an fndecl.
12713 2001-03-05 Andrew Haley <aph@redhat.com>
12715 * typeck.c (convert_arguments): Don't do ellipsis conversion for
12716 __built_in_constant_p.
12718 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12720 * typeck.c (build_static_cast): Allow enum to enum conversions
12723 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12725 * class.c (check_field_decls): Pointers to member do not a
12726 non-pod struct make, as per DR 148.
12728 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12730 * call.c (joust): cp_pedwarn when using gnu extension concerning
12731 worst conversion sequences.
12733 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12735 * decl.c: Replace all uses of 'boolean' with 'bool'.
12737 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12739 * lang-specs.h: Add zero initializer for cpp_spec field to
12740 all array elements that need one. Don't put an #ifdef inside
12741 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12744 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12746 Implement using decls inside template functions.
12747 * decl2.c (validate_nonmember_using_decl): Don't special case
12748 fake_std_node in the global namespace. Don't reject early when
12749 processing a template.
12750 (do_local_using_decl): Add to statement tree. Don't do further
12751 processing when building a template.
12752 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12754 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12756 * decl2.c (do_nonmember_using_decl): Don't complain if we find
12757 same function. Do complain about ambiguating extern "C"
12760 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
12762 Remove floating point and complex type template constant parms.
12763 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12764 COMPLEX_TYPE extensions.
12765 (invalid_nontype_parm_type_p): Likewise.
12767 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
12769 * except.c (call_eh_info): Revert "match_function"'s type.
12771 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
12773 Fix ctor vtable vcall offsets.
12774 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12775 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12776 (get_matching_base): Remove.
12777 (get_original_base): New function.
12778 (build_vtbl_initializer): Initialize vid.rtti_binfo.
12779 Use a virtual thunk for a ctor vtable with an index
12780 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12781 primary base within a constructor vtable. Only set
12782 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12783 when primary base has been lost.
12784 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12786 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
12788 * call.c (joust): Ensure more_specialized()'s argument length
12789 parameter has correct value for constructors.
12791 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
12793 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12795 * decl.c (mark_inlined_fns): Prototype.
12797 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12799 * spew.c (yylex): Correct handling of friends.
12801 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12803 * mangle.c (write_encoding): Pass write_function_type the
12804 FUNCTION_DECL for the function being encoded.
12805 (write_function_type): Pass it along to write_bare_function_type.
12806 (write_bare_function_type): Pass it along to write_method_parms.
12807 (write_method_parms): Don't mangle the compiler-generated
12808 parameters to a constructor or destructor.
12810 2001-02-22 Andreas Jaeger <aj@suse.de>
12812 * optimize.c: Include toplev.h for
12813 note_deferral_of_defined_inline_function prototype.
12815 2001-02-22 Jakub Jelinek <jakub@redhat.com>
12817 * cp-tree.h (struct lang_decl_inlined_fns): New.
12818 (struct lang_decls): Add inlined_fns.
12819 (DECL_INLINED_FNS): New macro.
12820 * optimize.c (struct inline_data): Add inlined_fns.
12821 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12822 (inlinable_function_p): Likewise, fix typo in comment,
12823 function is not inlinable if it already inlined function currently
12825 (expand_call_inline): Add fn to inlined_fns if necessary.
12826 (optimize_function): Initialize inlined_fns.
12827 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12828 * decl.c (mark_inlined_fns): New function.
12829 (lang_mark_tree): Call it.
12831 2001-02-21 Jason Merrill <jason@redhat.com>
12833 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12834 (DECL_UNINLINABLE): Move to middle-end.
12836 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12837 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12838 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12839 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12840 parms and outer BLOCK. note_deferral_of_defined_inline_function.
12842 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12843 second parm of op=.
12845 2001-02-19 Mark Mitchell <mark@codesourcery.com>
12847 * decl2.c (set_decl_namespace): Allow explicit instantiations in
12850 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12852 * optimize.c (expand_call_inline): Don't walk subtrees of type
12855 2001-02-18 Mark Mitchell <mark@codesourcery.com>
12857 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12860 2001-02-18 Jason Merrill <jason@redhat.com>
12862 Do put the VTT parameter in DECL_ARGUMENTS.
12863 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12864 (current_vtt_parm): New macro.
12865 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12866 (DECL_HAS_VTT_PARM_P): New macro.
12867 (DECL_VTT_PARM): Remove.
12868 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12869 * decl.c (duplicate_decls): Only copy the operator code if
12871 (start_function): Set current_vtt_parm.
12872 (lang_mark_tree): Don't mark vtt_parm.
12873 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12874 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
12875 * class.c (build_clone): Maybe remove the VTT parm.
12876 * optimize.c (maybe_clone_body): Set up the VTT parm.
12877 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12878 * call.c (build_over_call): Just allow the VTT arg.
12879 * method.c (make_thunk): Don't set DECL_VTT_PARM.
12880 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12881 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12882 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12883 * error.c (dump_function_decl): Likewise.
12884 * call.c (build_user_type_conversion_1, convert_like_real): Abort
12885 if we try to call a constructor with in-charge or VTT parms.
12886 * method.c (skip_artificial_parms_for): New fn.
12887 * call.c (add_function_candidate, build_over_call): Call it.
12888 * call.c (build_new_method_call): Use current_vtt_parm.
12889 * init.c (expand_virtual_init): Likewise.
12890 * class.c (same_signature_p): No longer static.
12891 * cp-tree.h: Declare it.
12892 * search.c (look_for_overrides_r): Use it.
12894 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12896 * cp-tree.h (new_abi_rtti_p): Remove.
12897 (name_mangling_version): Likewise.
12898 (flag_do_squangling): Likewise.
12899 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12900 * decl.c (grokfndecl): Likewise.
12901 * decl2.c (name_mangling_version): Remove.
12902 (flag_do_squangling): Likewise.
12903 (lang_f_options): Remove `squangle'.
12904 (unsupported_options): Add `squangle'.
12905 (cxx_decode_option): Issue a warning about uses of
12906 -fname-mangling-version.
12907 (finish_file): Remove old ABI support.
12908 * pt.c (check_explicit_specialization): Likewise.
12909 (tsubst_decl): Likewise.
12910 * rtti.c (init_rtti_processing): Likewise.
12911 (build_headof): Likewise.
12912 (get_tinfo_decl_dynamic): Likewise.
12913 (tinfo_from_decl): Likewise.
12914 (build_dynamic_cast_1): Likewise.
12915 (synthesize_tinfo_var): Likewise.
12916 * init.c (build_new): Allow enumeration types for the array-bounds
12917 in a direct-new-declarator.
12919 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12921 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12922 TREE_PROTECTED from the template being specialized.
12924 2001-02-17 Jason Merrill <jason@redhat.com>
12926 * decl2.c (build_artificial_parm): Set TREE_READONLY.
12928 * decl.c (bad_specifiers): Allow throw specs on things with
12929 pointer-to-function or -member-function type.
12930 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12933 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12935 * call.c (check_dtor_name): Handle template names correctly.
12937 2001-02-16 Jason Merrill <jason@redhat.com>
12939 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12940 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12941 * optimize.c (maybe_clone_body): Don't substitute it.
12942 * call.c (build_new_method_call): Check in_chrg instead.
12943 * init.c (expand_virtual_init): Likewise.
12945 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
12947 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12948 class-type introduces at least a type-name.
12950 2001-02-16 Jakub Jelinek <jakub@redhat.com>
12952 * call.c (convert_like_real): Create a temporary for non-lvalue.
12954 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
12956 * cp-tree.h: Fix typos in comments.
12958 2001-02-16 Jason Merrill <jason@redhat.com>
12960 * optimize.c (remap_block): If we're compiling a clone, pass the
12961 new block to insert_block.
12963 2001-02-16 Mark Mitchell <mark@codesourcery.com>
12965 * semantics.c (finish_asm_stmt): Robustify.
12967 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12969 * pt.c (push_template_decl_real): Don't remangle the name of a
12972 2001-02-15 Jim Meyering <meyering@lucent.com>
12974 * Make-lang.in (c++.install-common): Depend on installdirs.
12975 (c++.install-info): Likewise.
12976 (c++.install-man): Likewise.
12978 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12980 * typeck2.c (build_m_component_ref): Robustify.
12982 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
12984 * friend.c (do_friend): Don't take the nested [template] class
12985 into account when deciding whether to warn about the friend
12986 function not referring to a template function.
12988 2001-02-14 Jakub Jelinek <jakub@redhat.com>
12990 * typeck.c (build_unary_op): Clarify error message.
12992 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
12994 * parse.y (component_constructor_declarator): allow optional
12995 parentheses around constructor class name.
12997 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12999 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13001 * init.c (emit_base_init): Remove incorrect comment about
13003 * method.c (make_thunk): Fix comment alignment.
13005 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13007 Kill remnants of this is variable.
13008 * cp-tree.h (flag_this_is_variable): Remove.
13009 * decl2.c (flag_this_is_variable): Remove.
13010 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13011 (build_vbase_path): The path is non-static, even in a cdtor.
13012 (resolves_to_fixed_type_p): Add additional return value.
13013 * search.c (init_vbase_pointers): Adjust.
13014 * tree.c (lvalue_p_1): Adjust.
13015 * typeck.c (mark_addressable): Adjust.
13017 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13019 * pt.c (unify): Don't check cv quals of array types.
13021 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13023 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13024 check whether we already have the type.
13026 2001-02-13 Mark Mitchell <mark@codesourcery.com>
13028 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13029 * call.c (build_op_delete_call): Simplify to remove duplicate
13031 * class.c (clone_function_decl): Don't build the deleting variant
13032 of a non-virtual destructor.
13033 * decl.c (finish_destructor_body): Don't call delete if this is a
13034 non-virtual destructor.
13035 * init.c (build_delete): Explicitly call `operator delete' when
13036 deleting an object with a non-virtual destructor.
13038 2001-02-13 Jason Merrill <jason@redhat.com>
13040 * lang-specs.h: Add more __EXCEPTIONS.
13042 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13044 * typeck2.c (process_init_constructor): Check
13045 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13047 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13049 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13050 Remove spurious information in comment. Allow further
13051 adjustments of REFERENCE_TYPE args.
13053 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13055 * errfn.c (cp_deprecated): Tweak diagnostic text.
13056 * parse.y (new_initializer): Deprecate initializer lists
13059 2001-02-12 Mark Mitchell <mark@codesourcery.com>
13061 Remove old ABI support.
13063 2001-02-11 Mark Mitchell <mark@codesourcery.com>
13065 * decl2.c (flag_vtable_thunks): Always set it to 1.
13066 (flag_new_abi): Likewise.
13067 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13069 * Makefile.in (g++spec.o): Fix typo.
13071 2001-02-09 Jason Merrill <jason@redhat.com>
13073 * lang-specs.h: Restore definition of __EXCEPTIONS.
13075 2001-02-08 Jason Merrill <jason@redhat.com>
13077 * search.c (shared_member_p): New function.
13078 (lookup_field_r): Use it.
13079 * cp-tree.h (SHARED_MEMBER_P): Remove.
13081 * method.c (process_overload_item): Handle template-dependent array
13083 * pt.c (type_unification_real): If we end up with undeduced nontype
13086 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13089 * typeck2.c (friendly_abort): Don't say anything if we have
13090 earlier errors or sorries.
13092 * decl.c (check_tag_decl): Notice attempts to redefine bool and
13093 wchar_t. Ignore if in_system_header.
13095 * decl.c (maybe_push_cleanup_level): New fn...
13096 (start_decl_1): ...split out from here.
13097 * cvt.c (build_up_reference): Use it.
13098 * cp-tree.h: Declare it.
13100 2001-02-07 Mark Mitchell <mark@codesourcery.com>
13102 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13105 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
13107 * pt.c (lookup_template_class): Make sure it's a primary
13108 template or template_template_parm when called from the parser.
13109 (instantiate_template_class): Add assertion.
13111 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
13113 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13114 from error_mark_node.
13116 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
13118 Fix specification and implementation bugs in V3 ABI
13119 construction vtables.
13120 * cp-tree.h (flag_dump_class_layout): New flag.
13121 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13122 (BINFO_LOST_PRIMARY_P): New flag.
13123 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13124 (BINFO_PRIMARY_MARKED_P): Rename to ...
13125 (BINFO_PRIMARY_P): ... here.
13126 (binfo_via_virtual): New prototype.
13127 * decl2.c (flag_dump_class_layout): New flag.
13128 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13129 use `=' as a file name separator.
13130 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13132 (build_vtbl_address): If this is a virtual primary base, then
13133 get the vtbl of what it is ultimately primary for.
13134 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13135 for BINFO_PRIMARY_P.
13136 (dfs_skip_nonprimary_vbases_markedp): Likewise.
13137 (get_shared_vbase_if_not_primary): Likewise.
13138 (dfs_get_pure_virtuals): Likewise.
13139 (expand_upcast_fixups): Likewise.
13140 (fixup_virtual_upcast_offsets): Likewise.
13141 (dfs_find_vbase_instance): Likewise.
13142 (find_vbase_instance): Likewise.
13143 (binfo_from_vbase): Adjust comment to reflect reality.
13144 (binfo_via_virtual): New function.
13145 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13146 for binfo walking during VTT construction.
13147 (dfs_mark_primary_bases): Remove.
13148 (force_canonical_binfo_r): New function.
13149 (force_canonical_binfo): New function.
13150 (mark_primary_virtual_base): New function.
13151 (mark_primary_bases): Walk in inheritance graph order, use
13152 mark_primary_virtual_base.
13153 (determine_primary_base): Use some more intermediate variables.
13154 (dfs_find_final_overrider): Don't check for overriding along a
13156 (dfs_modify_vtables): Walk into primary virtual bases too.
13157 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13158 (build_base_fields): Likewise.
13159 (dfs_set_offset_for_unshared_vbases): Likewise.
13160 (layout_virtual_bases): Likewise.
13161 (end_of_class): Likewise.
13162 (finish_struct_1): Call dump_class_hierarchy, if requested.
13163 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13164 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13165 (dump_class_hierarchy): Add file parameter. Append to file, if
13167 (finish_vtbls): Adjust accumulate_vtbl_inits call.
13168 Use canonical base for virtual bases.
13169 (build_vtt): Add more comments. Adjust build_vtt_inits call.
13170 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13171 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13172 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13174 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13175 from DATA. We want virtual primary bases and all bases via virtual.
13176 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13177 virtual base when not a construction vtable.
13178 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13179 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13180 Use canonical bases when processing virtual bases.
13181 (accumulate_vtbl_inits): We're interested in any base via a
13183 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13184 within a construction vtable, determine what is being overridden.
13185 (build_vtbl_initializer): Add more comments
13186 (add_vcall_offset_vtbl_entries_1): Adjust comment.
13187 (build_rtti_vtbl_entries): Check if the base has lost its
13190 2001-02-05 Mark Mitchell <mark@codesourcery.com>
13192 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13194 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13196 * decl.c (pushdecl): Call abort instead of fatal.
13197 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13198 * init.c (build_new_1): Likewise.
13199 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13200 * decl.c (build_typename_type): hash_table_init now returns void.
13201 decl.c (init_decl_processing): Make an error non-fatal.
13203 2001-02-04 Mark Mitchell <mark@codesourcery.com>
13205 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13207 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13208 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13209 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13210 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13211 * decl.c (maybe_commonize_var): Use the new name-mangling where
13213 * decl2.c (comdat_linkage): Enhance comments. Make all
13214 compiler-generated things static, if COMDAT is not available.
13215 (get_tinfo_decl): Do not make typeinfo objects that belong in the
13217 (tinfo_base_init): Use the correct mangled name for typeinfo
13218 strings, and push them into the global scope.
13219 (typeinfo_in_lib_p): New function.
13220 (synthesize_tinfo_var): Use it.
13221 (create_real_tinfo_var): Likewise.
13223 2001-02-03 Jakub Jelinek <jakub@redhat.com>
13225 * decl.c (push_class_binding): Use context_for_name_lookup instead
13226 of CP_DECL_CONTEXT.
13227 * search.c (context_for_name_lookup): Remove static. Check for NULL
13228 context in the loop.
13229 * cp-tree.h (context_for_name_lookup): Add prototype.
13231 2001-02-02 Jakub Jelinek <jakub@redhat.com>
13233 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13234 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13236 * call.c (convert_class_to_reference, build_user_type_conversion_1,
13237 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13239 2001-02-02 Mark Mitchell <mark@codesourcery.com>
13241 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13242 of macros used when compiling g++spec.c.
13243 * g++spec.c (lang_specific_driver): Link with the shared
13246 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
13248 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13249 make_reference_declarator, make_call_declarator), method.c
13250 (implicitly_declare_fn), parse.y (namespace_using_decl,
13251 notype_unqualified_id, expr_or_declarator, new_type_id,
13252 after_type_declarator, direct_after_type_declarator,
13253 notype_declarator, complex_notype_declarator,
13254 complex_direct_notype_declarator, qualified_id,
13255 notype_qualified_id, overqualified_id, direct_new_declarator,
13256 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13257 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13258 instead of build_parse_node.
13260 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13262 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13263 (minus_one_node): Moved to top level gcc directory. Renamed
13264 to integer_minus_one_node.
13266 * init.c (init_init_processing): Don't set minus_one_node.
13267 (build_vec_init): Use integer_minus_one_node.
13269 * rtti.c (get_tinfo_decl_dynamic): Likewise.
13271 2001-01-28 Jakub Jelinek <jakub@redhat.com>
13273 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13274 identical and they would be replaced with constant, remove
13275 MODIFY_EXPR from the tree.
13277 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13279 * Make-lang.in: Remove all dependencies on defaults.h.
13280 * call.c: Don't include defaults.h.
13281 * decl.c: Likewise.
13282 * decl2.c: Likewise.
13283 * except.c: Likewise.
13285 * rtti.c: Likewise.
13286 * tree.c: Likewise.
13287 * typeck.c: Likewise.
13289 2001-01-25 Jakub Jelinek <jakub@redhat.com>
13291 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13292 operators even in "C" linkage.
13293 * method.c (set_mangled_name_for_decl): Likewise.
13294 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13295 overloaded operators in "C" linkage.
13297 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13299 * pt.c (tsubst_decl): Remove IN_DECL parameter.
13300 (tsubst_arg_types): Check parameter is not void.
13301 (tsubst): Adjust tsubst_decl call.
13303 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13305 * call.c (add_builtin_candidate): Quote std properly, from
13308 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13310 * pt.c (check_explicit_specialization): Clone constructors and
13313 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13315 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13316 indicates anything special about template depth. Make sure we
13317 only count the user visible template classes.
13319 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13321 * call.c (build_conv): Typo in comment.
13322 (add_builtin_candidate): Add more explanation.
13323 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13324 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13325 when we have enumeral types.
13326 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13327 candidates for relops and eqops.
13328 (joust): Simplify control flow. Allow a non-template user
13329 function to hide a builtin.
13331 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
13333 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13334 (more_specialized): Add deduction parameter.
13335 * call.c (joust): Adjust more_specialized call.
13336 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13337 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13338 (get_bindings_order): Remove.
13339 (get_bindings_real): Add DEDUCE parameter.
13340 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13341 REFERENCE_TYPE jig for DEDUCE_ORDER.
13342 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13343 maybe_adjust_types_for_deduction.
13344 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13346 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13347 (check_cv_quals_for_unify): Use new unify qualifier flags.
13348 (unify): Clear new unify qualifier flags.
13349 (get_bindings_real): Add DEDUCE parameter.
13350 (get_bindings): Adjust call to get_bindings_real.
13351 (get_bindings_overload): Likewise.
13352 (most_specialized_instantiation): Adjust call to
13355 2001-01-19 Jason Merrill <jason@redhat.com>
13357 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13359 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13362 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
13364 * decl2.c (arg_assoc_class): Fix double iteration logic.
13366 2001-01-19 Jason Merrill <jason@redhat.com>
13368 * init.c (build_delete): Always call convert_force to strip cv-quals.
13370 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13371 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13372 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13374 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13376 * search.c (get_vbase_1): Count only virtual bases.
13378 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13380 * class.c (duplicate_tag_error): Robustify flag clearing.
13382 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13384 * cp-tree.h (lookup_template_class): Add complain parm.
13385 * decl.c (lookup_namespace_name): Adjust call to
13386 lookup_template_class.
13387 (make_typename_type): Likewise.
13388 * semantics.c (finish_template_type): Likewise.
13389 * pt.c (lookup_template_class): Add complain parm. Adjust.
13390 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13391 (tsubst): Likewise.
13393 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13395 * pt.c (copy_default_args_to_explicit_spec): Preserve
13396 object's CV quals. Reorganize.
13398 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13400 * typeck.c (build_modify_expr): Say `initialization' for
13402 * init.c (build_default_init): Convert to enumeral type, if
13405 2001-01-18 Jakub Jelinek <jakub@redhat.com>
13407 * parse.y (nomods_initdcl0): Properly set things up for
13410 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13412 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13413 (type_unification_real): Set it.
13416 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13418 * decl.c (finish_destructor_body): Convert to vbase pointer here.
13420 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13422 * semantics.c (begin_class_definition): Check we're not inside a
13423 template parm list.
13425 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13427 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13430 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13432 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13433 * call.c (build_over_call): Add comment.
13435 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13437 * cvt.c (ocp_convert): Handle vector type conversion
13438 * typeck2.c (digest_init): Handle vector type initializations
13440 2001-01-16 Phil Edwards <pme@sources.redhat.com>
13442 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
13445 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13447 * pt.c (check_nontype_parm): Rename to ...
13448 (invalid_nontype_parm_type_p): ... here.
13449 (process_template_parm): Adjust.
13450 (convert_template_argument): Adjust.
13452 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13454 * pt.c (check_nontype_parm): New function.
13455 (process_template_parm): Use it.
13456 (convert_template_argument): Use it.
13457 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13460 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
13462 * tree.c: Add defaults.h
13463 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13464 * Make-lang.in (cp/tree.o): Add defaults.h.
13466 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13468 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13470 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13472 * g++.1: Change to be ".so man1/gcc.1".
13474 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13476 * Make-lang.in (c++.info, c++.install-info): Build and install g++
13478 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13479 ($(srcdir)/cp/g++int.info): New target.
13480 * gxxint.texi: Add info directory entry. Use @@ in email address.
13481 * .cvsignore: Update.
13483 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13485 * typeck.c (build_c_cast): Do template processing earlier.
13486 Always pedwarn on array casts.
13488 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13490 * friend.c (make_friend_class): Make sure a templated class is
13491 actually a template.
13493 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13495 * decl2.c (get_guard): Set linkage from guarded decl.
13497 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13499 * call.c (convert_default_arg): Check for unprocessed
13501 * cp-tree.h (replace_defarg): Move to spew.c.
13502 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13503 spew.c, which is where they really are.
13504 (done_pending_defargs): Declare.
13505 (unprocessed_defarg_fn): Declare.
13506 * decl.c (replace_defarg): Move to spew.c
13507 * parse.y (structsp): Call done_pending_defargs.
13508 * spew.c (defarg_fns): Rearrange list structure.
13509 (defarg_fnsdone): New static variable.
13510 (defarg_depfns): New static variable.
13511 (init_spew): Adjust.
13512 (add_defarg_fn): Store the type in TREE_TYPE.
13513 (do_pending_defargs): Detect and deal with ordering constraints
13515 (done_pending_defargs): New function.
13516 (unprocessed_defarg_fn): New function.
13517 (replace_defarg): Moved from decl.c. Robustify. Don't save
13518 if circularity detected.
13520 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13522 * pt.c (unify): Check array has a domain, before checking
13523 whether it is variable sized.
13525 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13527 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13528 parameters with pointers to arrays of unknown bound.
13530 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13532 * parse.y (template_parm_header, template_spec_header): New
13533 reductions. Split out from ...
13534 (template_header): ... here. Use them.
13535 (template_template_parm): Use template_parm_header.
13536 * semantics.c (finish_template_template_parm): Add assert.
13538 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13540 * mangle.c (write_builtin_type): Fix thinko.
13542 * pt.c (copy_default_args_to_explicit_spec_1): New function.
13543 (copy_default_args_to_explicit_spec): Likewise.
13544 (check_explicit_specialization): Use it.
13546 * class.c (finish_struct_1): Remove last argument in call to
13547 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13548 * decl.c (builtin_function): Likewise.
13549 (build_cp_library_fn): Likewise.
13550 (check_initializer): Likewise.
13551 (make_rtl_for_nonlocal_decl): Likewise.
13552 (cp_finish_decl): Likewise.
13553 (start_function): Likewise.
13554 * decl2.c (finish_anon_union): Likewise.
13555 * friend.c (do_friend): Likewise.
13556 * init.c (build_java_class_ref): Likewise.
13557 * method.c (make_thunk): Likewise.
13558 * pt.c (tsubst_friend_function): Likewise.
13559 * semantics.c (expand_body): Likewise.
13561 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13563 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13564 looking at DECL_CLONED_FUNCTION for non-functions.
13566 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13568 * error.c (dump_template_parameter): Use parm to determine how
13569 to print default value.
13571 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13573 * class.c (duplicate_tag_error): Clear more flags.
13575 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13577 * call.c (build_new_method_call): Use binfo_for_vbase.
13579 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
13581 * cp-tree.h (flag_cond_mismatch): Don't declare.
13582 * decl2.c (flag_cond_mismatch): Don't define.
13583 (lang_f_options): Remove cond-mismatch.
13584 (unsupported_options): Add cond-mismatch.
13586 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
13588 * class.c (handle_using_decl): Reject using of constructor name
13589 of sourcing class. Allow injecting of a method with same name as
13590 nested class. Fixup error messages.
13592 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
13594 * decl2.c (lang_decode_option): Handle -Wformat=2.
13596 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13598 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13599 initialized_in_class.
13600 (DECL_DEFINED_IN_CLASS_P): Rename to ...
13601 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13602 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13603 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13604 * pt.c (check_default_tmpl_args): Adjust for
13605 DECL_INITIALIZED_IN_CLASS_P.
13606 (instantiate_class_template): Likewise.
13607 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13609 * class.c (finish_struct): Constify saved_filename.
13611 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13613 * class.c (duplicate_tag_error): Adjust diagnostic.
13614 (finish_struct): Locally set location to start of struct.
13615 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13617 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13619 * decl.c (struct binding_level): Adjust class_shadowed comments
13620 to reflect reality.
13621 (push_class_level_binding): Adjust comments to reflect reality.
13622 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13623 Don't set TREE_VALUE on the class_shadowed list.
13625 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13627 * decl2.c (acceptable_java_type): Allow references too.
13628 * init.c (build_java_class_ref): When using the new ABI, search
13629 `class$' and have it mangled with `mangle_decl.'
13630 * mangle.c (write_java_integer_type_codes): New function.
13631 (write_builtin_type): Detect and mangle Java integer and real
13634 2001-01-07 Mark Mitchell <mark@codesourcery.com>
13636 * decl2.c (grokfield): Don't accept `asm' specifiers for
13637 non-static data members.
13639 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13641 * expr.c (cplus_expand_expr): Don't reset `target'.
13643 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
13645 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13647 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13649 * parse.y (template_datadef): Check for error_mark_node.
13651 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13653 * cp-tree.def (DEFAULT_ARG): Make `x' class.
13655 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
13657 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13658 (record_builtin_type): Make non-static.
13659 (flag_short_double): Don't declare.
13660 (init_decl_processing): Remove the creation of many tree nodes now
13661 in c_common_nodes_and_builtins.
13662 (build_void_list_node): New function.
13663 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13664 * cp-tree.h (flag_short_wchar): Don't declare.
13666 2001-01-04 Mark Mitchell <mark@codesourcery.com>
13668 * call.c (build_conv): Don't use build1 for USER_CONV.
13669 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13671 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
13673 * lex.c (lang_init): Call c_common_lang_init.
13675 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13677 * search.c (lookup_fnfields_here): Remove.
13678 (look_for_overrides_r): Use lookup_fnfields_1.
13679 Ignore functions from using declarations.
13681 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13683 Implement exceptions specifiers for implicit member functions.
13684 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13685 * method.c (synthesize_exception_spec): New function.
13686 (locate_dtor, locate_ctor, locate_copy): New functions.
13687 (implicitly_declare_fn): Generate the exception spec too.
13688 * search.c (check_final_overrider): Check artificial functions
13690 * typeck2.c (merge_exception_specifiers): New function.
13692 2001-01-03 Jason Merrill <jason@redhat.com>
13694 * init.c (build_default_init): New fn.
13695 (perform_member_init): Split out from here.
13696 (build_new_1): Use it. Simplify initialization logic.
13697 (build_vec_init): Take an array, rather than a pointer and maxindex.
13698 Speed up simple initializations. Don't clean up if we're assigning.
13699 * cp-tree.h: Adjust.
13700 * decl2.c (do_static_initialization): Remove TREE_VEC case.
13701 * parse.y (new_initializer): Return void_zero_node for ().
13702 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13703 * typeck2.c (digest_init): Only complain about user-written
13706 2000-12-22 Mike Stump <mrs@wrs.com>
13708 * decl2.c: (max_tinst_depth): Increase to 50.
13710 2001-01-02 Mark Mitchell <mark@codesourcery.com>
13712 * class.c (invalidate_class_lookup_cache): Zero the
13713 previous_class_values.
13714 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13716 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13717 * decl.c (free_bindings): New variable.
13718 (push_binding): Don't create a new binding if we have one on the
13720 (pop_binding): Put old bindings on the free list.
13721 (init_decl_processing): Use size_int, not build_int_2.
13722 Register free_bindings as a GC root.
13723 (cp_make_fname_decl): Use size_int, not build_int_2.
13724 (push_inline_template_parms_recursive): Likewise.
13725 (end_template_parm_list): Likewise.
13726 (for_each_template_parm): Do not use walk_tree_without_duplicates.
13727 (tsubst_template_parms): Use size_int, not build_int_2.
13728 (tsubst): Likewise.
13729 * rtti.c (get_vmi_pseudo_type_info): Likewise.
13731 2001-01-02 Richard Henderson <rth@redhat.com>
13733 * parse.y (asm): Set ASM_INPUT_P.
13735 2001-01-02 Jason Merrill <jason@redhat.com>
13737 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13740 * typeck.c (cp_truthvalue_conversion): New fn.
13741 * cvt.c (ocp_convert): Use it.
13743 * cp-tree.h: Lose c-common.c decls.
13745 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13746 * cvt.c (convert_to_void): Use type_unknown_p.
13748 * typeck.c (strip_all_pointer_quals): Also strip quals from
13749 pointer-to-member types.
13751 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
13754 * call.c (build_new_method_call): Do evaluate the object parameter
13755 when accessing a static member.
13756 * typeck.c (build_component_ref): Likewise.
13758 2001-01-02 Andreas Jaeger <aj@suse.de>
13760 * decl.c (cp_missing_noreturn_ok_p): New.
13761 (init_decl_processing): Set lang_missing_noreturn_ok_p.
13763 2000-12-29 Jakub Jelinek <jakub@redhat.com>
13765 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13767 2000-12-29 Mark Mitchell <mark@codesourcery.com>
13769 * class.c (pushclass): Remove #if 0'd code.
13770 * cp-tree.h (overload_template_name): Remove.
13771 * decl.c (store_bindings): Simplify.
13772 (pop_from_top_level): Likewise.
13773 * pt.c (overload_template_name): Remove.
13774 (instantiate_decl): Don't call push_to_top_level if it's not
13777 2000-12-28 Mark Mitchell <mark@codesourcery.com>
13779 * pt.c (register_local_specialization): Don't return a value.
13780 (lookup_template_class): Use move-to-front heuristic when looking
13781 up template instantiations.
13782 (instantiate_decl): Only push_to_top_level when we're actually
13783 going to instantiate the template.
13785 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
13787 * search.c (binfo_for_vtable): Return least derived class, not
13788 most. Handle secondary vtables.
13790 2000-12-22 Jason Merrill <jason@redhat.com>
13792 * pt.c (more_specialized): Don't optimize len==0.
13793 (fn_type_unification): If we're adding the return type, increase len.
13795 * typeck.c (build_binary_op): Fix pmf comparison logic.
13797 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13798 DECL_STATIC_FUNCTION_P.
13800 * semantics.c (genrtl_finish_function): Don't try to jump to
13801 return_label unless it exists.
13803 In partial ordering for a call, ignore parms for which we don't have
13805 * call.c (joust): Pass len to more_specialized.
13806 (add_template_candidate_real): Strip 'this', pass len.
13807 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
13808 (get_bindings_order): New fn. Pass len down.
13809 (get_bindings_real): Strip 'this', pass len.
13810 (fn_type_unification): Likewise.
13811 (type_unification_real): Succeed after checking 'len' args.
13812 (most_specialized_instantiation): Lose explicit_args parm.
13813 * class.c (resolve_address_of_overloaded_function): Strip 'this',
13816 2000-12-21 Jason Merrill <jason@redhat.com>
13818 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13819 DECL_TEMPLATE_RESULT.
13821 * search.c (lookup_field_r): Call lookup_fnfields_1, not
13822 lookup_fnfields_here.
13824 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13826 * call.c (build_object_call): Also allow conversions that return
13827 reference to pointer to function.
13828 (add_conv_candidate): Handle totype being ref to ptr to fn.
13829 (build_field_call): Also allow members of type reference to function.
13830 Lose support for calling pointer to METHOD_TYPE fields.
13832 * error.c (dump_expr): Handle *_CAST_EXPR.
13834 * typeck2.c (build_scoped_ref): Always convert to the naming class.
13836 * tree.c (break_out_cleanups): Lose.
13837 * cp-tree.h: Remove prototype.
13838 * typeck.c (build_component_ref): Don't break_out_cleanups.
13839 (build_compound_expr): Likewise.
13840 * semantics.c (finish_expr_stmt): Likewise.
13842 2000-12-20 Richard Henderson <rth@redhat.com>
13844 * cp-tree.h: Update declarations.
13845 * decl.c (finish_case_label): Return the new stmt node.
13846 * semantics.c (finish_goto_stmt): Likewise.
13847 (finish_expr_stmt, finish_return_stmt): Likewise.
13848 (finish_break_stmt, finish_continue_stmt): Likewise.
13849 (finish_asm_stmt): Likewise.
13850 * parse.y (already_scoped_stmt): Set STMT_LINENO.
13851 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13852 (simple_if, simple_stmt): Return the new stmt node.
13853 (save_lineno): New.
13855 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
13857 * cp-tree.h: Don't declare warn_long_long.
13859 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13861 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13864 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13866 * pt.c (unify): Handle when both ARG and PARM are
13867 BOUND_TEMPLATE_TEMPLATE_PARM.
13869 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13871 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13872 DECL_TEMPLATE_PARM_P.
13874 2000-12-15 Jason Merrill <jason@redhat.com>
13876 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
13878 * init.c (build_new_1): Don't strip quals from type.
13880 * decl.c (pushdecl): Don't check for linkage on a non-decl.
13882 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13884 * call.c (build_new_function_call): Lose space before paren in
13886 (build_new_method_call): Likewise.
13888 * typeck2.c (build_m_component_ref): Propagate quals from datum.
13890 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13892 * pt.c (check_explicit_specialization): Propagate default
13893 function arguments to explicit specializations.
13895 2000-12-13 DJ Delorie <dj@redhat.com>
13897 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13900 2000-12-08 Jason Merrill <jason@redhat.com>
13902 * error.c (dump_function_name): Don't let the user see __comp_ctor.
13904 Clean up copy-initialization in overloading code.
13905 * call.c (build_user_type_conversion_1): Die if we are asked to
13906 convert to the same or a base type.
13907 (implicit_conversion): Avoid doing so. Lose reference binding code.
13908 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13909 direct-initialization. Also do direct-init part of copy-init.
13910 (build_user_type_conversion): Don't provide context to convert_like.
13911 * cvt.c (ocp_convert): build_user_type_conversion will now provide
13912 the constructor call for copy-init.
13914 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13915 instantiation of a member template.
13916 (do_decl_instantiation): Not here.
13918 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13920 * class.c (check_field_decls): Don't special case anonymous
13921 fields in error messages.
13922 (note_name_declared_in_class): Use %D on diagnostic.
13924 * tree.c (pod_type_p): Use strip_array_types.
13925 (cp_valid_lang_attribute): Likewise.
13926 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13927 multiple evaluations.
13928 (cp_has_mutable_p): Use strip_array_types.
13930 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13932 * cp-tree.h (sufficient_parms_p): Declare new function.
13933 * call.c (sufficient_parms_p): New function, broken out of ...
13934 (add_function_candidate): ... here. Use it.
13935 (add_conv_candidate): Use it.
13936 * decl.c (grok_ctor_properties): Use it.
13938 2000-12-07 Jakub Jelinek <jakub@redhat.com>
13940 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13942 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
13944 * decl2.c (lang_decode_option): Handle -Wformat-security.
13946 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13948 * pt.c (verify_class_unification): New function.
13949 (get_class_bindings): Use it.
13950 (try_class_unification): Tidy.
13951 (unify): Handle when argument of a template-id is not
13952 template parameter dependent.
13953 (template_args_equal): Handle when TREE_CODE's do not match.
13955 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
13957 * lang-specs.h (c++): When invoking the stand-alone preprocessor
13958 for -save-temps, pass all relevant -Defines to it, and then don't
13959 pass them to cc1plus.
13961 2000-12-05 Will Cohen <wcohen@redhat.com>
13963 * decl.c (finish_case_label): Cleared
13964 more_cleanups_ok in surrounding function scopes.
13965 (define_label): Likewise.
13967 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13969 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13970 (get_matching_virtual): Remove.
13971 (look_for_overrides): Declare new function.
13972 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13974 * class.c (check_for_override): Move base class iteration code
13975 to look_for_overrides.
13976 * search.c (next_baselink): Remove.
13977 (get_virtuals_named_this): Remove.
13978 (get_virtual_destructor): Remove.
13979 (tree_has_any_destructors_p): Remove.
13980 (struct gvnt_info): Remove.
13981 (check_final_overrider): Remove `virtual' from error messages.
13982 (get_matching_virtuals): Remove. Move functionality to ...
13983 (look_for_overrides): ... here, and ...
13984 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13987 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13989 * typeck.c (get_delta_difference): If via a virtual base,
13991 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13994 2000-12-04 Richard Henderson <rth@redhat.com>
13996 * error.c (dump_tree): Use output_add_string not OB_PUTS.
13998 2000-12-04 Jason Merrill <jason@redhat.com>
14000 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14001 (write_builtin_type): Pass intSI_type_node and the like through
14003 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14004 Pass intSI_type_node and the like through type_for_mode.
14005 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14006 * pt.c (tsubst, unify): Likewise.
14007 * tree.c (walk_tree): Likewise.
14008 * error.c (dump_type): Likewise.
14009 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14011 * Make-lang.in: Tweak top comment for emacs.
14012 (cp/TAGS): Restore.
14014 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14016 * class.c (clone_function_decl): Robustify.
14018 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
14020 * decl.c (store_bindings): Only search in the non modified
14021 old_bindings for duplicates.
14023 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
14025 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14026 TYPE_POLYMORPHIC_P.
14028 * typeck.c (build_static_cast): Remove unused variable.
14030 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14032 * pt.c: Fix typo in comment.
14034 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14036 * decl2.c (warn_format): Remove definition.
14037 (lang_decode_option): Handle -Wformat-nonliteral,
14038 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
14040 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14042 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14043 (init_decl_processing): Don't create string_type_node,
14044 const_string_type_node, wint_type_node, intmax_type_node,
14045 uintmax_type_node, default_function_type, ptrdiff_type_node and
14046 unsigned_ptrdiff_type_node. Adjust position of call to
14047 c_common_nodes_and_builtins.
14048 (identifier_global_value): New function.
14050 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
14052 * call.c (standard_conversion): Reject pointer to member
14053 conversions from ambiguous, inaccessible or virtual bases.
14054 * typeck.c (build_static_cast): Don't check pointers to members
14057 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14059 * method.c (do_build_copy_constructor): Preserve cv
14060 qualifications when accessing source object members.
14061 (do_build_assign_ref): Likewise. Remove separate diagnostics for
14064 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14066 * method.c (do_build_assign_ref): Construct appropriately
14067 CV-qualified base reference. Don't allow const casts in base
14070 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14072 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14073 incomplete return type.
14075 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14077 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14078 * semantics.c (finish_base_specifier): Accept a _TYPE not a
14081 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14083 * spew.c (yyerror): Cope if yylval.ttype is NULL.
14085 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14087 * decl.c (grokdeclarator): Diagnose undefined template contexts.
14089 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14091 * decl.c (grokdeclarator): Do type access control on friend
14094 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14096 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14097 bison parser ickiness.
14098 * pt.c (tsubst_friend_function): Enter namespace scope when
14099 tsubsting the function name.
14100 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14102 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14104 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14105 * cvt.c (cp_convert_to_pointer): Add force parameter.
14106 Allow conversions via virtual base if forced.
14107 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14108 (ocp_convert): Likewise.
14109 * search.c (binfo_from_vbase): Return the virtual base's binfo.
14110 * typeck.c (get_delta_difference): Adjust handling of virtual
14113 2000-11-26 Mark Mitchell <mark@codesourcery.com>
14115 * tree.c (struct list_hash): Remove.
14116 (list_hash_table): Make it be an htab.
14117 (struct list_proxy): New type.
14118 (list_hash_eq): New function.
14119 (list_hash_pieces): Renamed from ...
14120 (list_hash): ... this.
14121 (list_hash_lookup): Remove.
14122 (list_hash_add): Remove.
14123 (hash_tree_cons): Use the generic hashtable.
14124 (mark_list_hash): Remove.
14125 (init_tree): Create the hashtable.
14127 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
14129 * method.c (build_mangled_C9x_name): Rename to
14130 build_mangled_C99_name. Change C9X references in comments to
14133 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14135 * parse.y (unary_expr): Move VA_ARG from here ...
14136 (primary): ... to here.
14138 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14140 * semantics.c (finish_id_expr): If type is error_mark, return
14143 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
14145 * pt.c (lookup_template_class): Simplify loop exit constructs.
14146 Cope when there is no partial instantiation of a template
14149 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
14151 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14153 2000-11-22 Mark Mitchell <mark@codesourcery.com>
14155 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14158 * pt.c (do_decl_instantiate): Explicitly clone constructors and
14159 destructors that haven't already been cloned.
14161 2000-11-20 Richard Henderson <rth@redhat.com>
14163 * parse.y (yyparse_1): Rename the parser entry point.
14165 2000-11-20 Alex Samuel <samuel@codesourcery.com>
14167 * mangle.c (write_name): Use <unscoped-name> for names directly in
14169 (write_unscoped_name): Accept names directly in function scope.
14171 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
14173 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14174 * parse.y (extdef): Add EXPORT reduction.
14175 * spew.c (yylex): Don't skip export here.
14177 2000-11-19 Mark Mitchell <mark@codesourcery.com>
14179 * decl.c (init_decl_processing): Correct name of pure virtual
14180 function under the new ABI.
14181 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14182 (throw_bad_typeid): Likewise for bad typeid function.
14184 2000-11-18 Mark Mitchell <mark@codesourcery.com>
14186 * decl.c (grokparms): Don't even function types of `void' type,
14188 * mangle.c (write_type): Don't crash when confronted with the
14191 * decl.c (grokparms): Don't create parameters of `void' type.
14193 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
14195 * lex.c (mark_impl_file_chain): Delete.
14196 (init_parse): Remove call to ggc_add_string_root. No need to
14197 ggc_strdup a string constant. Do not add impl_file_chain to GC
14199 (handle_pragma_implementation): No need to ggc_strdup main_filename.
14201 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14203 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14205 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14207 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14208 * decl.c (grokdeclarator): Don't reject void parms here.
14209 (require_complete_types_for_parms): Simplify, use
14210 complete_type_or_else.
14211 (grokparms): Remove bitrot. Remove funcdef parm.
14212 Deal with ellipsis parm lists here.
14213 * semantics.c (finish_parmlist): Don't append void_list_node
14214 here. Set PARMLIST_ELLIPSIS_P.
14216 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14218 * typeck2.c (incomplete_type_error): Reorganize to avoid
14219 excessive diagnostics.
14221 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
14223 * lex.c (struct impl_files, internal_filename): Constify a char *.
14225 2000-11-16 Mark Mitchell <mark@codesourcery.com>
14227 * mangle.c (write_special_name_constructor): Don't generate
14228 assembler junk when confronted with an old-style constructor.
14229 (write_special_name_destructor): Likewise.
14230 (mangle_decl_string): Do it here instead.
14232 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
14234 * call.c (op_error): Make error messages clearer.
14236 2000-11-15 Mark Mitchell <mark@codesourcery.com>
14238 * decl.c (wrapup_globals_for_namespace): Don't mark things
14239 TREE_ASM_WRITTEN when they're not.
14241 2000-11-15 Jason Merrill <jason@redhat.com>
14243 * typeck2.c (friendly_abort): Uncount the error before handing
14244 off to fancy_abort.
14246 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
14248 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14250 2000-11-14 Mark Mitchell <mark@codesourcery.com>
14252 * class.c (build_vtbl_initializer): Fix typo in comment.
14253 * typeck.c (expr_sizeof): Don't crash on errors.
14255 2000-11-14 Jim Wilson <wilson@redhat.com>
14257 * lang-specs.h: Add %2 after %(cc1_options).
14259 2000-11-14 Richard Henderson <rth@redhat.com>
14261 * typeck.c (c_sizeof): Be strict about casting result value
14262 back to c_size_type_node.
14263 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14265 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
14267 * typeck.c (build_unary_op): Use boolean_increment from
14268 c-common.c, moving the relevant code there.
14270 2000-11-11 Jason Merrill <jason@redhat.com>
14272 * typeck.c (mark_addressable): Don't call put_var_into_stack.
14274 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14277 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14279 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14280 * lex.c (copy_lang_decl): Likewise.
14282 2000-11-09 Mark Mitchell <mark@codesourcery.com>
14284 * dump.c (cp_dump_tree): Don't dump function bodies here.
14286 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14287 (dump.o): Update dependency list.
14288 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14289 (flag_dump_translation_unit): Likewise.
14290 (CP_TYPE_QUALS): Adjust definition.
14291 (DECL_C_BIT_FIELD): Remove.
14292 (SET_DECL_C_BIT_FIELD): Likewise.
14293 (CLEAR_DECL_C_BIT_FIELD): Likewise.
14294 (add_maybe_template): Likewise.
14295 (strip_array_types): Likewise.
14296 (dump_node_to_file): Likewise.
14297 (cp_dump_tree): New function.
14298 * decl.c (init_decl_processing): Set lang_dump_tree.
14299 * decl2.c (flag_dump_translation_unit): Remove.
14300 * dump.c: Move most of it to ../c-dump.c.
14301 (cp_dump_tree): New function.
14302 * pt.c (add_maybe_template): Remove.
14303 * typeck.c (strip_array_types): Likewise.
14305 2000-11-07 Eric Christopher <echristo@redhat.com>
14307 * decl.c (init_decl_processing): Change definition of
14308 __wchar_t to wchar_t. Remove artificial declaration of
14310 * lex.c: Change instances of __wchar_t to wchar_t.
14312 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
14314 * lex.c (do_identifier): Don't lookup_name for operators.
14315 * parse.y (operator): Save looking_for_typename.
14316 (unoperator): Restore it.
14317 * spew.c (frob_opname): Use nth_token for lookahead.
14319 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
14321 * decl.c (grok_op_properties): Always use coerce_new_type and
14322 coerce_delete_type.
14323 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14324 exception specification. Tidy up.
14325 (coerce_delete_type): Preserve exception specification. Tidy up.
14327 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
14329 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14330 (push_binding_level), error.c (cp_tree_printer), pt.c
14331 (process_partial_specialization, tsubst_template_arg_vector),
14332 search.c (lookup_member): Use memset () instead of bzero ().
14334 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
14336 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14338 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
14340 * Make-lang.in (c++.distdir): Remove.
14342 2000-11-04 Mark Mitchell <mark@codesourcery.com>
14344 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14345 declarations from different namespaces to be combined.
14347 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
14349 * decl.c: Include tm_p.h.
14351 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
14353 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14355 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
14357 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14358 (build_overload_value), repo.c (open_repo_file), xref.c
14359 (open_xref_file): Use strchr () and strrchr () instead of index ()
14362 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
14364 * call.c (build_over_call): Call fold on the CALL_EXPR.
14366 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
14368 * error.c (dump_template_decl): Separate template hearders with
14371 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
14373 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
14374 TS_* flags with corresponding TFF_*. Adjust prototypes of
14375 functions (which used to take a tree_string_flags) to take an int.
14377 * cp-tree.h (enum tree_string_flags): Remove
14378 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14379 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14380 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14381 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14382 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14383 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14384 (type_as_string, decl_as_string, expr_as_string,
14385 context_as_string): Adjust prototype.
14387 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14388 instead of TS_PLAIN.
14390 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14391 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14394 2000-10-30 Mark Mitchell <mark@codesourcery.com>
14396 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14397 (linkage_kind): New enumeration.
14398 (decl_linkage): New function.
14399 * decl2.c (comdat_linkage): Extend comment.
14400 * error.c (dump_function_decl): Print the arguments used to
14401 instantiate a template, even when not printing the type of the
14403 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14404 not TREE_PUBLIC, to test for external linkage.
14405 * tree.c (decl_linkage): New function.
14407 2000-10-28 Mark Mitchell <mark@codesourcery.com>
14409 * pt.c (instantiate_decl): Always instantiate static data members
14410 initialized in-class.
14412 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
14414 * Make-lang.in: Move all build rules here from Makefile.in,
14415 adapt to new context. Wrap all rules that change the current
14416 directory in parentheses. Expunge all references to $(P).
14417 When one command depends on another and they're run all at
14418 once, use && to separate them, not ;. Add OUTPUT_OPTION to
14419 all object-file generation rules. Delete obsolete variables.
14421 * Makefile.in: Delete.
14422 * config-lang.in: Delete outputs= line.
14424 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
14426 * error.c (dump_function_decl): Print no space between
14427 `ptr-operator' the `type-specifier' of the return type.
14428 (dump_type_prefix): Make sure we put space at the appropriate
14431 2000-10-23 Jason Merrill <jason@redhat.com>
14433 * call.c (equal_functions): Also call decls_match for extern "C" fns.
14435 2000-10-22 Jason Merrill <jason@redhat.com>
14437 * call.c (build_conditional_expr): Use ocp_convert to force
14440 2000-10-22 Mark Mitchell <mark@codesourcery.com>
14442 * call.c (standard_conversion): Use RVALUE_CONVs for all
14443 expressions that satisfy lvalue_p, not just those that satisfy
14446 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14448 * typeck.c (c_sizeof): Return an expression of `size_t' type,
14449 not one with TYPE_IS_SIZETYPE set.
14450 (dubious_conversion_warnings): Remove special-case code.
14452 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
14454 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14455 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14456 (dump_type_prefix): Print vector-of-int as 'int vector'.
14457 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14458 * tree.c (walk_tree): Handle VECTOR_TYPE.
14460 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14462 2000-10-21 Jason Merrill <jason@redhat.com>
14464 * parse.y (operator): Set got_object from got_scope.
14465 Set looking_for_typename.
14466 * decl.c (lookup_name_real): Clear val after setting from_obj.
14467 Reorganize diagnostic.
14469 2000-10-20 Jason Merrill <jason@redhat.com>
14471 * tree.c (walk_tree): Don't walk into default args.
14473 * error.c (dump_expr): Use host_integerp.
14475 2000-10-20 David Edelsohn <edelsohn@gnu.org>
14477 * typeck2.c (abstract_virtuals_error): Use "because" instead of
14478 "since" in error message.
14480 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14482 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14484 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
14486 * decl.c (revert_static_member_fn): Fixed typo.
14488 2000-10-19 Mark Mitchell <mark@codesourcery.com>
14490 * class.c (subobject_offset_fn): New type.
14491 (dfs_record_base_offsets): Remove.
14492 (record_base_offsets): Likewise.
14493 (dfs_search_base_offsets): Likewise.
14494 (record_subobject_offset): New function.
14495 (check_subobject_offset): Likewise.
14496 (walk_subobject_offsets): Likewise.
14497 (record_subobject_offsets): Likewise.
14498 (layout_conflict_p): Reimplement.
14499 (layout_nonempty_base_or_field): Correct handling of type
14500 conflicts during layout.
14501 (layout_empty_base): Likewise.
14502 (build_base_field): Adjust to handle new representation of empty
14504 (build_base_fields): Likewise.
14505 (layout_virtual_bases): Likewise.
14506 (splay_tree_compare_integer_csts): New function.
14507 (layout_class_type): Use a splay_tree, rather than a varray, to
14508 represent the offsets of empty bases.
14510 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14511 * decl.c (select_decl): Don't return declarations that are
14514 2000-10-18 Mark Mitchell <mark@codesourcery.com>
14516 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14517 (fake_std_node): New macro.
14518 * decl.c (in_std): Rename to ...
14519 (in_fake_std): ... this.
14520 (flag_no_builtin): Remove.
14521 (flag_no_nonansi_builtin): Likewise.
14522 (walk_namespaces_r): Use fake_std_node.
14523 (push_namespace): Use std_identifier.
14524 (pop_namespace): Use in_fake_std.
14525 (lookup_name_real): Use fake_std_node.
14526 (init_decl_processing): When -fhonor-std, create the `std'
14527 namespace. Don't create a dummy fake_std_node in that case.
14528 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
14529 (builtin_function): Put builtins whose names don't begin
14530 with `_' in the std namespace.
14531 * decl2.c (flag_no_builtin): Remove.
14532 (flag_no_nonansi_builtin): Likewise.
14533 (set_decl_namespace): Use fake_std_node.
14534 (validate_nonmember_using_decl): Likewise.
14535 (do_using_directive): Likewise.
14536 (handle_class_head): Likewise.
14537 * dump.c (dequeue_and_dump): Likewise.
14538 * except.c (init_exception_processing): Use std_identifier.
14539 * init.c (build_member_call): Use fake_std_node.
14540 * rtti.c (init_rtti_processing): Use std_identifier.
14542 2000-10-17 Mark Mitchell <mark@codesourcery.com>
14544 * cp-tree.h (back_end_hook): Remove declaration.
14545 * decl2.c (back_end_hook): Remove definition.
14547 * dump.c (dequeue_and_dump): Dump TREE_USED.
14549 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
14551 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14553 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14555 * decl.c (WINT_TYPE): Define.
14556 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14557 c_size_type_node, signed_size_type_node and wint_type_node.
14559 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14561 * decl2.c (warn_missing_format_attribute): New variable.
14562 (lang_decode_option): Decode -Wmissing-format-attribute.
14564 2000-10-16 Mark Mitchell <mark@codesourcery.com>
14566 * typeck.c (qualify_type): Remove.
14567 (composite_pointer_type): Fix handling of conversions to `cv void*'.
14569 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14571 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14573 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14575 * Makefile.in (parse.c, parse.h): Create atomically.
14577 2000-10-12 Mark Mitchell <mark@codesourcery.com>
14579 * class.c (current_obstack): Remove.
14580 * decl.c (ggc_p): Remove.
14581 (start_decl): Don't use decl_tree_cons.
14582 (grokdeclarator): Don't use build_decl_list.
14583 (start_function): Don't use decl_tree_cons.
14584 (finish_function): Don't mess with obstacks.
14585 * decl2.c (grok_x_components): Don't use build_decl_list.
14586 * lex.c (make_call_declarator): Don't call decl_tree_cons.
14587 (implicitly_declare_fn): Don't call build_decl_list.
14588 * parse.y (frob_specs): Don't call build_decl_list or
14590 (expr_or_declarator_intern): Don't call decl_tree_cons.
14591 (primary): Don't call build_decl_list.
14592 (fcast_or_absdcl): Likewise.
14593 (typed_declspecs): Don't call decl_tree_cons.
14594 (reserved_declspecs): Don't call build_decl_list.
14595 (declmods): Likewise.
14596 (reserved_typespecquals): Likewise.
14598 (new_type_id): Likewise.
14599 (cv_qualifiers): Likewise.
14600 (after_type_declarator_intern): Likewise.
14601 (notype_declarator_intern): Likewise.
14602 (absdcl_intern): Likewise.
14603 (named_parm): Likewise.
14604 * pt.c (most_specialized_class): Likewise.
14605 * repo.c (temporary_obstack): Make it a structure, not a pointer.
14606 (init_repo): Initialize it.
14607 * search.c (current_obstack): Remove.
14608 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14610 2000-10-09 Richard Henderson <rth@cygnus.com>
14612 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14613 (c++ language support bits for libgcc): Remove.
14614 (c++.clean): Remove cplib2.txt cleanup.
14615 * config-lang.in (headers, lib2funcs): Remove.
14617 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14618 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14619 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14620 * inc/new.h, inc/typeinfo: Remove files.
14622 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
14624 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14626 (init_decl_processing): Initialize intmax_type_node and
14629 2000-10-06 Richard Henderson <rth@cygnus.com>
14631 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14632 (original_result_rtx): Remove.
14633 * decl.c (save_function_data): Don't clear x_result_rtx.
14634 (mark_lang_function): Don't mark it either.
14635 * expr.c (fixup_result_decl): Remove.
14636 * semantics.c (genrtl_named_return_value): Frob the return decl
14637 before calling emit_local_var.
14638 (genrtl_finish_function): Don't call fixup_result_decl.
14639 Always emit the jump to return_label.
14641 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
14643 * pt.c (lookup_template_class): Set current access for enum.
14644 (tsubst_enum): Set file & line for enum decl.
14646 * spew.c (yylex): Remove unused variable.
14648 2000-10-05 Richard Henderson <rth@cygnus.com>
14650 * semantics.c (genrtl_finish_function): Don't init or check
14651 can_reach_end; remove noreturn and return value checks.
14653 2000-10-05 Tom Tromey <tromey@cygnus.com>
14655 * init.c (build_java_class_ref): Use `build_static_name' with a
14656 suffix, not a prefix, to build the class object's name.
14658 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14660 * cp-tree.h (access_kind): Fix comment typo.
14661 * decl2.c (grokfield): Fix diagnostic typo.
14662 * semantics.c (finish_template_type): Fix comment typo.
14663 (finish_qualified_object_call_expr): Likewise.
14665 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14667 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14670 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14672 * spew.c (frob_id): New static function.
14673 (frob_opname): Use it.
14676 2000-10-01 Mark Mitchell <mark@codesourcery.com>
14678 * decl.c (lang_mark_false_label_stack): Remove.
14679 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14681 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
14683 * gxxint.texi: Use @email for formatting email addresses.
14685 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
14687 * error.c: Remove direct obstack manipulation. Replace with
14688 output_buffer-based formatting. Adjust calls to removed macros.
14689 (obstack_chunk_alloc, obstack_chunk_free): Remove.
14690 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14691 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14693 2000-09-24 Mark Mitchell <mark@codesourcery.com>
14695 * ir.texi: Move to ../c-tree.texi.
14697 2000-09-20 Jason Merrill <jason@redhat.com>
14699 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14701 2000-09-21 Andreas Jaeger <aj@suse.de>
14703 * errfn.c: Move declaration of cp_printer and cp_printers to ...
14704 * cp-tree.h: ... here.
14706 * error.c: Remove declaration of cp_printer.
14708 2000-09-20 Mark Mitchell <mark@codesourcery.com>
14710 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14712 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
14714 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14717 2000-09-18 Mark Mitchell <mark@codesourcery.com>
14719 * decl.c (start_function): Robustify.
14721 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14723 * cp-tree.h (check_function_format): Accept a `status' parameter.
14725 * call.c, typeck.c: Updates calls to `check_function_format'.
14727 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
14729 * decl2.c (handle_class_head): Always push some scope even
14732 2000-09-16 Mark Mitchell <mark@codesourcery.com>
14734 * cp-tree.h (struct cp_language_function): Remove
14735 x_scope_stmt_stack and name_declared.
14736 (current_scope_stmt_stack): Remove.
14737 (function_name_declared_p): New macro.
14738 (struct lang_decl_flags): Use c_lang_decl as a base class.
14740 (struct lang_decl): Replace saved_tree with context.
14741 (DECL_FRIEND_CONTEXT): Adjust accordingly.
14742 (SET_DECL_FRIEND_CONTEXT): Likewise.
14743 (DECL_VIRTUAL_CONTEXT): Likewise.
14744 (DECL_SAVED_TREE): Remove.
14745 (C_DECLARED_LABEL_FLAG): Likewise.
14746 (cplus_expand_expr_stmt): Don't declare.
14747 (add_decl_stmt): Likewise.
14748 (add_scope_stmt): Likewise.
14749 * decl.c (mark_stmt_tree): Remove.
14750 (case_compare): Likewise.
14751 (finish_case_label): Use c_add_case_label.
14752 (init_decl_processing): Set more language-specific hooks.
14753 (build_enumerator): Fix typo in comment.
14754 (cplus_expand_expr_stmt): Remove.
14755 (mark_lang_function): Use mark_c_language_function.
14756 (lang_mark_tree): Use c_mark_lang_decl.
14757 * decl2.c: Change order of inclusion.
14758 * except.c: Likewise.
14759 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
14760 back on c_expand_expr.
14761 * friend.c: Include expr.h.
14762 * init.c: Change order of inclusion.
14763 * Makefile.in: Update dependencies.
14764 * lex.h (free_lang_decl_chain): Remove.
14765 * optimize.c (maybe_clone_body): Use function_name_declared_p.
14766 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14768 (instantiate_decl): Use function_name_declared_p.
14769 * semantics.c (lang_expand_expr_stmt): Remove.
14770 (set_current_function_name_declared): Likewise.
14771 (current_function_name_declared): Likewise.
14772 (begin_compound_stmt): Use function_name_declared_p.
14773 (add_decl_stmt): Remove.
14774 (setup_vtbl_ptr): Use function_name_declared_p.
14775 (add_scope_stmt): Remove.
14776 (current_scope_stmt_stack): New function.
14777 (cp_expand_stmt): Don't handle SCOPE_STMTs.
14778 (expand_body): Use function_name_declared_p.
14779 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14780 * typeck.c: Change order of includes.
14781 (convert_sequence): Remove.
14783 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
14785 * lex.c (reswords): Add _Complex.
14787 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14789 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14791 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
14793 * init.c (begin_init_stmts): Don't use // comments.
14795 2000-09-12 Jason Merrill <jason@redhat.com>
14797 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14798 all non-extern arrays.
14800 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14801 typenames, too. Downgrade complaint to pedwarn.
14802 (xref_tag): Warn about surprising behavior of 'friend struct T'.
14803 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14804 'class This::Inherited'.
14806 2000-09-12 Mark Mitchell <mark@codesourcery.com>
14808 * decl.c (finish_case_label): Given the LABEL_DECL a
14811 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
14813 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14814 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14815 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14816 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14817 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14819 (sorry_for_unsupported_tree, print_scope_operator,
14820 print_left_paren, print_right_paren, print_left_bracket,
14821 print_right_bracket, print_whitespace): Likewise.
14822 (aggr_variety): Rename to class_key_or_enum.
14823 (print_type): Rename to print_type_id.
14824 (print_type_specifier_seq, print_simple_type_specifier,
14825 print_elaborated_type_specifier,
14826 print_rest_of_abstract_declarator,
14827 print_parameter_declaration_clause, print_exception_specification,
14828 print_nested_name_specifier, print_template_id,
14829 typedef_original_name, print_template_argument_list_start,
14830 print_template_argument_list_end): New functions.
14832 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
14834 * ir.texi: Add more documentation.
14836 2000-09-11 Mark Mitchell <mark@codesourcery.com>
14838 * cp-tree.h (struct saved_scope): Remove x_function_parms.
14839 (current_function_parms): Don't define.
14840 (struct cp_language_function): Remove parms_stored.
14841 (current_function_just_assigned_this): Don't define.
14842 (current_function_parms_stored): Likewise.
14843 (static_ctors): Declare.
14844 (static_dtors): Likewise.
14845 (SF_EXPAND): Don't define.
14846 (expand_start_early_try_stmts): Remove declaration.
14847 (store_parm_decls): Likewise.
14848 * decl.c (static_ctors): Don't declare.
14849 (static_dtors): Likewise.
14850 (struct binding_level): Remove this_block.
14851 (poplevel): Remove dead code.
14852 (set_block): Likewise.
14853 (mark_binding_level): Don't mark this_block.
14854 (mark_saved_scope): Don't mark x_function_parms.
14855 (init_decl_processing): Don't add current_function_parms as a GC
14857 (check_function_type): Change prototype.
14858 (start_function): Remove RTL-generation code.
14859 (expand_start_early_try_stmts): Remove.
14860 (store_parm_decls): Give it internal linkage. Remove
14861 RTL-generation code.
14862 (finish_function): Remove RTL-generation code.
14863 * decl2.c (static_ctors): Fix formatting.
14864 (static_dtors): Likewise.
14865 * method.c (use_thunk): Don't call store_parm_decls.
14866 (synthesize_method): Likewise.
14867 * optimize.c (maybe_clone_body): Likewise.
14868 * parse.y (fn.def2): Likewise.
14869 (.set_base_init): Likewise.
14870 (nodecls): Likewise.
14871 * pt.c (instantiate_decl): Likewise.
14872 * rtti.c (synthesize_tinfo_fn): Likewise.
14873 * semantics.c (genrtl_try_block): Simplify.
14874 (expand_body): Use genrtl_start_function and
14875 genrtl_finish_function.
14876 (genrtl_start_function): New function.
14877 (genrtl_finish_function): Likewise.
14879 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14881 * error.c (cp_tree_printer, case 'P'): Append break.
14883 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14885 * cp-tree.h (frob_opname): Declare.
14886 * parse.y (saved_scopes): New static variable.
14887 (cp_parse_init): Adjust.
14888 (do_id): If lastiddecl is NULL, do do_identifier.
14889 (operator): Save scope information.
14890 (unoperator): New reduction. Restore scope information.
14891 (operator_name): Append unoperator. Call frob_opname.
14892 * spew.c (frob_opname): Define.
14894 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
14896 * decl.c, rtti.c: Include defaults.h if not already included.
14897 Don't define the *_TYPE_SIZE macros.
14899 2000-09-09 Mark Mitchell <mark@codesourcery.com>
14901 * cp-tree.h (push_switch): Change prototype.
14902 (check_cp_case_value): Remove declaration.
14903 (decl_constant_value): Likewise.
14904 * decl.c (struct cp_switch): Add switch_stmt and cases.
14905 (case_compare): New function.
14906 (push_switch): Set switch_stmt. Initialize cases.
14907 (pop_switch): Clean up cases.
14908 (define_case_label): Rename to ...
14909 (finish_case_label): ... this. Do semantic analysis for case
14911 (start_function): Correct comment.
14912 * decl2.c (check_cp_case_value): Remove.
14913 * expr.c (do_case): Remove.
14914 * pt.c (tsubst_expr): Adjust call to finish_case_label.
14915 * semantics.c (genrtl_do_poplevel): Remove declaration.
14916 (RECHAIN_STMTS): Remove.
14917 (finish_break_stmt): Use build_break_stmt.
14918 (finish_continue_stmt): Use build_continue_stmt.
14919 (finish_switch_cond): Adjust condition here, rater than in
14920 c_expand_start_case.
14921 (finish_case_label): Remove.
14922 * typeck.c (c_expand_return): Remove.
14923 (c_expand_start_case): Likewise.
14925 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
14927 * ir.texi: Document type nodes.
14929 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14931 * cp-tree.h (init_cp_semantics): Declare.
14932 (genrtl_try_block): Don't declare.
14933 (genrtl_handler): Likewise.
14934 (genrtl_catch_block): Likewise.
14935 (genrtl_ctor_stmt): Likewise.
14936 (genrtl_subobject): Likewise.
14937 (genrtl_do_poplevel): Likewise.
14938 (genrtl_named_return_value): Likewise.
14939 * lex.c (init_parse): Call init_cp_semantics.
14940 * semantics.c (genrtl_try_block): Give it internal linkage.
14941 (genrtl_handler): Likewise.
14942 (genrtl_catch_block): Likewise.
14943 (genrtl_ctor_stmt): Likewise.
14944 (genrtl_subobject): Likewise.
14945 (genrtl_do_poplevel): Likewise.
14946 (genrtl_named_return_value): Likewise.
14947 (lang_expand_stmt): Rename to ...
14948 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
14949 (init_cp_semantics): Define.
14951 * decl.c (initialize_local_var): Remove RTL-generating code.
14952 * semantics.c (genrtl_try_block): Fix formatting.
14954 Move statement-tree facilities from C++ to C front-end.
14955 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14956 (void_zero_node): Remove.
14957 (stmt_tree): Likewise.
14958 (scope_chain): Adjust.
14959 (language_function): Rename to cp_language_function.
14960 (cp_function_chain): Adjust.
14961 (current_stmt_tree): Remove.
14962 (last_tree): Likewise.
14963 (last_expr_type): Likewise.
14964 (struct lang_decl): Adjust.
14965 (STMT_IS_FULL_EXPR_P): Remove.
14966 (add_tree): Remove.
14967 (begin_stmt_tree): Likewise.
14968 (finish_stmt_tree): Likewise.
14969 (walk_tree_fn): Likewise.
14970 (walk_stmt_tree): Likewise.
14971 * class.c (finish_struct): Replace use of add_tree with add_stmt.
14972 * decl.c (mark_stmt_tree): Adjust type.
14973 (init_decl_processing): Don't build void_zero_node.
14974 (initialize_local_var): Adjust usage of current_stmt_tree.
14975 (finish_enum): Use add_stmt, not add_tree.
14976 (save_function_data): Adjust use of language_function.
14977 (finish_constructor_body): Use add_stmt, not add_tree.
14978 (finish_destructor_body): Likewise.
14979 (push_cp_function_context): Adjust use of language_function.
14980 (pop_cp_function_context): Likewise.
14981 (mark_lang_function): Likewise.
14982 (mark_cp_function_context): Likewise.
14983 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14984 (build_vec_init): Likewise.
14985 * semantics.c (SET_LAST_STMT): Remove.
14986 (RECHAIN_STMTS): Don't use it.
14987 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14988 (current_stmt_tree): Define.
14989 (add_tree): Remove.
14990 (finish_goto_stmt): Use add_stmt, not add_tree.
14991 (finish_expr_stmt): Likewise.
14992 (begin_if_stmt): Likewise.
14993 (finish_then_clause): Likewise.
14994 (begin_while_stmt): Likewise.
14995 (begin_do_stmt): Likewise.
14996 (finish_return_stmt): Likewise.
14997 (begin_for_stmt): Likewise.
14998 (finish_break_stmt): Likewise.
14999 (finish_continue_stmt): Likewise.
15000 (begin_switch_stmt): Likewise.
15001 (finish_case_label): Likewise.
15002 (begin_try_block): Likewise.
15003 (begin_function_try_block): Likewise.
15004 (begin_handler): Likewise.
15005 (begin_catch_block): Likewise.
15006 (begin_compound_stmt): Likewise.
15007 (begin_asm_stmt): Likewise.
15008 (finish_asm_stmt): Likewise.
15009 (finish_label_stmt): Likewise.
15010 (add_decl_stmt): Likewise.
15011 (finish_subobject): Likewise.
15012 (finish_decl_cleanup): Likewise.
15013 (finish_named_return_value): Likewise.
15014 (setup_vtbl_ptr): Likewise.
15015 (add_scope_stmt): Likewise.
15016 (finish_stmt_expr): Likewise.
15017 (prune_unused_decls): Remove.
15018 (begin_stmt_tree): Likewise.
15019 (finish_stmt_tree): Likewise.
15020 (prep_stmt): Adjust use of current_stmt_tree.
15021 (lang_expand_stmt): Likewise.
15022 * tree.c (statement_code_p): Remove.
15023 (cp_statement_code_p): New function.
15024 (walk_stmt_tree): Remove.
15025 (init_tree): Set lang_statement_code_p.
15027 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
15029 Integrated preprocessor.
15031 * Make-lang.in, Makefile.in: Remove all references to input.c,
15032 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
15033 * gxx.gperf, hash.h, input.c: Delete.
15034 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15035 initialized properly.
15037 * class.c (fixup_pending_inline): Take a tree, not a
15038 struct pending_inline *. All callers changed.
15039 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15040 RID_PROTECTED entries in ridpointers[] array here.
15041 * decl.c (duplicate_decls): Do not refer to struct
15043 (record_builtin_type, init_decl_processing): Use RID_MAX not
15045 (grokdeclarator): Use C_IS_RESERVED_WORD.
15046 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15048 (grok_x_components): Do not inspect pending_inlines chain.
15050 * cp-tree.h (struct lang_identifier): Add rid_code entry.
15051 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15052 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15053 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15054 TIME_IDENTIFIER_FILEINFO): Kill.
15056 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
15057 single 32-bit word.
15058 * parse.y: Call do_pending_inlines unconditionally.
15059 reinit_parse_for_method is now snarf_method. fn.defpen is no
15060 longer necessary. Remove unnecessary <itype> annotation on
15061 SCOPE. Do not refer to end_of_file or struct pending_inline.
15062 * semantics.c (begin_inline_definitions): Call
15063 do_pending_inlines unconditionally.
15065 * lex.c: Remove all code now shared with C front end.
15066 Initialize cpplib properly if USE_CPPLIB. Put reserved words
15067 into the get_identifier table. Rewrite pragma handling to
15068 work with the registry. Move code to save tokens for later
15069 processing to spew.c.
15071 * spew.c: Rewrite everything in terms of token streams instead
15072 of text. Move routines here from lex.c / input.c as
15073 appropriate. GC-mark trees hanging off the pending inlines
15076 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15078 * NEWS: Mention that the named return value extension has been
15080 * cp-tree.h (original_result_rtx): Define.
15081 (TREE_REFERENCE_EXPR): Remove.
15082 (DECL_VPARENT): Likewise.
15083 (pushdecl_nonclass_level): Likewise.
15084 (store_return_init): Likewise.
15085 (reinit_lang_specific): Likewise.
15086 (genrtl_named_return_value): Change prototype.
15087 * decl.c (original_result_rtx): Remove.
15088 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15089 Do not generate RTL for local variables here.
15090 (store_return_init): Remove.
15091 * semantics.c (genrtl_named_return_value): Simplify. Fold in
15093 (finish_named_return_value): Adjust accordingly. Warn that this
15094 extension is deprecated.
15095 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15097 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15099 * pt.c (type_unification_real): Replace switch with if.
15100 (unify): Tsubst non-type parms before comparing.
15102 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15104 * error.c (dump_typename): New function, broken out of ...
15105 (dump_type): ... here. Use it.
15106 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15108 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15110 * init.c (build_offset_ref): Deal with namespace scoped
15113 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15115 * class.c (resolve_address_of_overloaded_function): Add
15116 explanation message.
15117 * decl.c (define_case_label): Reformat explanation.
15118 * decl2.c (finish_static_data_member_decl): Likewise.
15119 (grokfield): Likewise.
15120 * friend.c (do_friend): Likewise.
15122 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
15124 * tree.c (walk_tree): Expose tail recursion.
15125 (walk_stmt_tree): New function.
15126 * cp-tree.h: Prototype walk_stmt_tree.
15127 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15128 the BLOCKs directly. If a BLOCK has no variables after
15129 pruning, discard it.
15130 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
15131 restore the line number.
15133 2000-09-05 Mark Mitchell <mark@codesourcery.com>
15135 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15136 (pt.o): Remove dependency on HTAB_H.
15137 * cp-tree.h: Include hashtab.h.
15138 (walk_tree): Change prototype.
15139 (walk_tree_without_duplicates): New function.
15140 * decl.c (check_default_argument): Use it.
15141 * optimize.c (remap_decl): Adjust calls to walk_tree.
15142 (copy_body): Likewise.
15143 (expand_calls_inline): Likewise.
15144 (calls_setjmp_p): Use walk_tree_without_duplicates.
15145 * pt.c: Don't include hashtab.h.
15146 (for_each_template_parm): Use walk_tree_without_duplicates.
15147 * semantics.c (finish-stmt_tree): Likewise.
15148 (expand_body): Likewise.
15149 * tree.c (walk_tree): Add additional parameter.
15150 (walk_tree_without_duplicates): New function.
15151 (count_trees): Use it.
15152 (verify_stmt_tree): Adjust call to walk_tree.
15153 (find_tree): Use walk_tree_without_duplicates.
15154 (no_linkage_check): Likewise.
15155 (break_out_target_exprs): Adjust call to walk_tree.
15156 (cp_unsave): Likewise.
15158 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15160 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15161 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15162 * cp-tree.h (TYPE_BINFO): Adjust comment.
15163 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15164 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15165 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15166 (TYPE_TEMPLATE_INFO): Likewise.
15167 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15168 * class.c (push_nested_class): Likewise.
15169 * decl.c (lookup_name_real): Likewise.
15170 (grokdeclarator): Likewise.
15171 (grok_op_properties): Likewise.
15172 (xref_tag): Likewise.
15173 (xref_basetypes): Likewise.
15174 * decl2.c (constructor_name_full): Likewise.
15175 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15176 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15177 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15178 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15179 (dump_type_suffix): Likewise.
15180 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15182 (get_aggr_from_typedef): Likewise.
15183 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15184 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15185 (write_template_parm): Likewise.
15186 (write_template_template_parm): Check tree code instead of
15187 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15188 * method.c (build_overload_nested_name): Add
15189 BOUND_TEMPLATE_TEMPLATE_PARM.
15190 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15191 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15192 * pt.c (convert_template_argument): Check tree code instead of
15193 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15194 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15195 (for_each_template_parm): Adjust comment.
15196 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
15197 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15198 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
15199 template_args_equal to compare template template parameter cases.
15200 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15201 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15203 * tree.c (copy_template_template_parm): Decide whether to create
15204 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15205 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15206 (copy_tree_r): Likewise.
15207 * typeck.c (comptypes): Likewise. Check tree code instead of
15208 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15210 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
15212 * decl.c (finish_function): Move the code for handling functions
15213 marked with the constructor and destructor attributes inside the
15216 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15218 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15220 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15222 * pt.c (lookup_template_class): Remove abort.
15223 * tree.c (get_type_decl): Allow error_mark_node.
15225 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15227 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15230 2000-09-03 Mark Mitchell <mark@codesourcery.com>
15232 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15235 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15237 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15238 union tag mismatch error reporting.
15240 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15242 * call.c (build_scoped_method_call): Check it is not a namespace.
15244 2000-08-30 Jason Merrill <jason@redhat.com>
15246 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15248 * tree.c (bot_manip): Check TREE_CONSTANT rather than
15249 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
15250 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15252 * decl.c (start_function): Always call make_function_rtl.
15254 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15256 * semantics.c (prune_unused_decls): New function.
15257 (finish_stmt_tree): Call it via walk_tree.
15259 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15261 * class.c (build_secondary_vtable): Constify a char *.
15262 * decl.c (init_decl_processing): Initialize function_id_node,
15263 pretty_function_id_node, and func_id_node.
15264 * input.c (struct input_source): Constify 'str'.
15265 (feed_input): Constify first argument.
15266 * mangle.c (write_identifier): Constify argument.
15267 * pt.c (mangle_class_name_for_template): Constify argument.
15269 2000-08-29 Mark Mitchell <mark@codesourcery.com>
15271 * typeck.c (mark_addressable): Remove code that pokes around in
15274 2000-08-28 Jason Merrill <jason@redhat.com>
15276 * lex.c (file_name_nondirectory): Move to toplev.c.
15278 * cp-tree.h (LOCAL_CLASS_P): New macro.
15279 * class.c (finish_struct_1): Use it.
15281 2000-08-27 Alex Samuel <samuel@codesourcery.com>
15283 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15284 (write_encoding): Pass another argument to write_name.
15285 (write_name): Add ignore_local_scope parameter. Fix handling of
15287 (write_nested_name): Use write_unqualified_name.
15288 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
15289 (write_template_prefix): Use write_unqualified_name.
15290 (write_component): Remove.
15291 (write_local_name): Add parameter. Use direct local entity to
15292 discriminator calculation.
15293 (write_class_enum_type): Pass another argument to write_name.
15294 (write_template_template_arg): Likewise.
15295 (make_guard_variable): Likewise.
15297 2000-08-27 Jason Merrill <jason@redhat.com>
15299 * decl.c (pushdecl): Matching decls for local externs are found in
15300 the current level. Propagate linkage information from previous
15303 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
15305 * ir.texi (Expressions): Fix typo.
15307 2000-08-25 Greg McGary <greg@mcgary.org>
15309 * tree.c (init_tree): Use ARRAY_SIZE.
15311 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15313 * error.c (cp_tree_printer): Rework.
15315 2000-08-25 Mark Mitchell <mark@codesourcery.com>
15317 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15319 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15320 (cp-demangle.o): Remove target.
15321 (dyn-string.o): Likewise.
15323 * decl.c (grokfndecl): Require that `main' return an `int'.
15324 * mangle.c (write_encoding): Don't mangle return types for
15325 conversion functions.
15327 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15329 * error.c (tree_formatting_info): New data type.
15330 (tree_being_formatted): New macro.
15331 (tree_formatting_flags): Likewise.
15332 (put_whitespace): Likewise.
15333 (print_tree_identifier): Likewise.
15334 (print_identifier): Likewise.
15335 (cp_tree_printer, print_function_argument_list, print_declaration,
15336 print_expression, print_function_declaration,
15337 print_function_parameter, print_type, print_cv_qualifier): New
15339 (init_error): Initialize lang_printer.
15341 2000-08-24 Jason Merrill <jason@redhat.com>
15343 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15344 adjustment necessary.
15346 2000-08-24 Greg McGary <greg@mcgary.org>
15348 * cp-tree.h (MAIN_NAME_P): Remove macro.
15350 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
15352 * error.c (print_instantiation_context): Don't forget to flush the
15355 2000-08-23 Jason Merrill <jason@redhat.com>
15357 * typeck.c (build_ptrmemfunc): Save the input pmf.
15359 * method.c (process_modifiers): Use same_type_p.
15361 2000-08-23 Mark Mitchell <mark@codesourcery.com>
15363 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15364 * mangle.c (write_function_type): Change prototype.
15365 (write_encoding): Don't mangle return types for
15366 constructors or destructors.
15367 (write_type): Adjust call to write_function_type.
15368 * pt.c (instantiate_template): Instantiate alternate entry points
15369 when instantiating the main function.
15371 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15373 * error.c (cp_print_error_function): Don't use embedded '\n' in
15376 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15378 * decl.c (init_decl_processing): Remove bogus initialization.
15379 * error.c (lang_print_error_function): Restore here.
15380 (init_error): Initialize print_error_function.
15382 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15384 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15386 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
15388 * Makefile.in (error.o): Depends on diagnostic.h
15390 * cp-tree.h (problematic_instantiation_changed,
15391 record_last_problematic_instantiation, current_instantiation,
15392 print_instantiation_context): Declare.
15393 (maybe_print_template_context): Remove.
15395 * decl.c (init_decl_processing): Set print_error_function to NULL.
15396 (lang_print_error_function): Remove, since we're using a new
15399 * error.c: #include diagnostic.h
15400 (function_category): New function.
15401 (cp_diagnostic_starter): Likewise.
15402 (cp_diagnostic_finalizer): Likewise.
15403 (cp_print_error_function): Likewise.
15404 (maybe_print_instantiation_context): Likewise.
15405 (print_instantiation_full_context): Likewise.
15406 (print_instantiation_partial_context): Likewise.
15407 (print_instantiation_context): Define.
15408 (init_error): Initialize diagnostic pager and finalizer.
15410 * pt.c (problematic_instantiation_changed): Define.
15411 (record_last_problematic_instantiation): Likewise.
15412 (current_instantiation): Likewise.
15413 (maybe_print_template_context): Remove.
15414 (print_template_context): Likewise.
15415 (current_tinst_level): Make static to reflect Brendan Kehoe's
15416 change of 1995-04-13.
15417 (push_tinst_level): Call print_instantiation_context.
15419 2000-08-21 Nix <nix@esperi.demon.co.uk>
15421 * lang-specs.h: Do not process -o or run the assembler if
15424 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
15426 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15428 * decl2.c (lang_decode_option): Disable gettext attributes for
15431 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
15433 * lex.c (lang_init_options): Default diagnostic message maximum
15434 length to 80, when line-wrapping.
15436 2000-08-20 Mark Mitchell <mark@codesourcery.com>
15438 * class.c (build_vtbl_initializer): Clear the entire
15439 vtbl_init_data. Start keeping track of the functions for which we
15440 have created vcall offsets here.
15441 (dfs_build_vcall_offset_vtbl_entries): Remove.
15442 (build_vcall_offset_vtbl_entries): Reimplement.
15443 (add_vcall_offset_vtbl_entries_r): New function.
15444 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
15445 computing when vcall offsets are necessary.
15447 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15449 * decl.c (member_function_or_else): Use cp_error ... %T.
15450 (grokdeclarator): Likewise.
15451 (start_method): Likewise.
15452 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15454 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15456 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15459 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15461 * cp-tree.h (PTRMEM_OK_P): New macro.
15462 (itf_ptrmem_ok): New enumeration value.
15463 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15464 argument. Diagnose implicit pointer to member.
15465 (instantiate_type): Don't diagnose implicit pointer to member
15466 here. Pass itf_ptrmem_ok if ok. Adjust calls to
15467 resolve_address_of_overloaded_function.
15468 * init.c (build_offset_ref): Set PTRMEM_OK_P.
15469 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15470 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15471 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15472 (build_unary_op): Deal with single non-static member in
15475 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15477 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15479 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15481 * cp-tree.h (enum_name_string): Remove prototype.
15482 (report_case_error): Remove prototype.
15483 * cp/typeck2.c (enum_name_string): Remove.
15484 (report_case_error): Remove.
15485 * error.c (dump_expr): Deal with enum values directly.
15486 Correctly negate integer constant.
15488 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15490 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15491 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15492 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15493 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15494 (__cxa_vec_new): Use __cxa_vec_new2.
15495 (__cxa_vec_delete): Use __cxa_vec_delete2.
15497 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15499 * vec.cc (__cxa_vec_new): Set "C" linkage.
15500 (__cxa_vec_ctor): Likewise.
15501 (__cxa_vec_cctor): Likewise.
15502 (__cxa_vec_dtor): Likewise.
15503 (__cxa_vec_delete): Likewise.
15504 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15505 (__cxa_vec_ctor): Likewise.
15506 (__cxa_vec_cctor): Likewise.
15507 (__cxa_vec_dtor): Likewise.
15508 (__cxa_vec_delete): Likewise.
15510 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15512 * class.c (instantiate_type): Reinstate local variable
15513 deleted in previous change.
15515 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15518 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15520 * cp-tree.h (instantiate_type_flags): New enumeration.
15521 (instantiate_type): Change parameter.
15522 * class.c (instantiate_type): Adjust prototype. Adjust.
15523 * call.c (standard_conversion): Adjust instantiate_type call.
15524 (reference_binding): Likewise.
15525 (build_op_delete_call): Likewise.
15526 (convert_like_real): Likewise.
15527 * cvt.c (cp_convert_to_pointer): Likewise.
15528 (convert_to_reference): Likewise.
15529 * pt.c (convert_nontype_argument): Likewise.
15530 * typeck.c (build_binary_op): Likewise.
15531 (build_ptrmemfunc): Likewise.
15532 (convert_for_assignment): Likewise.
15534 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15536 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15537 (current_aggr): Define.
15538 * decl.c (grokdeclarator): Make sure a friend class is an
15539 elaborated type specifier.
15540 * parse.y (current_aggr): Remove static definition.
15541 (cp_parse_init): Adjust.
15542 (structsp): Clear and restore current_aggr.
15543 (component_decl_list): Clear current_aggr.
15545 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15546 aggregate tag on the typename's context.
15548 * pt.c (tsubst_friend_class): Return error_mark_node, if
15549 parms becomes NULL.
15550 (instantiate_class_template): Ignore error_mark_node friend types.
15552 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
15554 * cvt.c (warn_ref_binding): New static function, broken out of ...
15555 (convert_to_reference): ... here. Use it.
15557 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15559 * parse.y (template_arg): Add rule for template qualified with
15562 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15564 * decl2.c (add_function): Reorganize.
15565 (arg_assoc): Do not consider function template decls.
15567 2000-08-11 Jason Merrill <jason@redhat.com>
15569 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15572 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15574 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15575 (lookup_nested_tag): Likewise.
15577 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15580 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15582 * parse.y (named_complex_class_head_sans_basetype): Remove
15585 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15587 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15588 explicit TEMPLATE_ID_EXPR args.
15589 (build_expr_from_tree, case CALL_EXPR): Likewise.
15591 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15593 * decl.c (check_tag_decl): Diagnose typename's which don't
15596 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
15598 * init.c (build_aggr_init): Reject bogus array initializers
15601 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15603 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15605 * cp/tinfo.cc (__dynamic_cast): Likewise.
15606 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15608 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15610 * cvt.c (convert_to_pointer_force): Fix error message when
15611 attempting to cast from ambiguous base.
15613 2000-08-08 Jason Merrill <jason@redhat.com>
15615 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15616 (tsubst_template_arg_vector): Likewise.
15618 * decl2.c (build_anon_union_vars): Choose the largest field; don't
15619 assume that one will be as large as the union.
15621 2000-08-07 Kazu Hirata <kazu@hxi.com>
15623 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15624 * decl.c (pop_labels): Likewise.
15626 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
15628 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15630 (__pointer_to_member_type_info): Likewise.
15631 (__base_class_info): Likewise.
15632 (__class_type_info): Likewise.
15633 (__si_class_type_info): Likewise.
15634 (__vmi_class_type_info): Likewise.
15635 * tinfo.cc (__si_class_type_info::__do_find_public_src):
15636 Changed member names to match specifications.
15637 (__vmi_class_type_info::__do_find_public_src): Likewise.
15638 (__si_class_type_info::__do_dyncast): Likewise.
15639 (__vmi_class_type_info::__do_dyncast): Likewise.
15640 (__si_class_type_info::__do_upcast): Likewise.
15641 (__vmi_class_type_info::__do_upcast): Likewise.
15642 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15643 (__pbase_type_info::__pointer_catch): Likewise.
15644 (__pointer_type_info::__pointer_catch): Likewise.
15645 (__pointer_to_member_type_info::__pointer_catch): Likewise.
15647 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
15649 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15650 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15651 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15653 2000-08-04 Mark Mitchell <mark@codesourcery.com>
15655 * cp-tree.h (add_method): Change prototype.
15656 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
15657 Don't double the size of the method vector in the error case.
15658 (handle_using_decl): Adjust call to add_method.
15659 (add_implicitly_declared_members): Likewise.
15660 (clone_function_decl): Likewise.
15661 * decl2.c (check_classfn): Likewise.
15662 * semantics.c (finish_member_declaration): Likewise.
15664 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
15666 * decl.c (flag_isoc94): New variable.
15668 2000-08-02 Jason Merrill <jason@redhat.com>
15670 * pt.c (do_type_instantiation): Add complain parm; don't complain
15671 if called recursively.
15672 * cp-tree.h, parse.y: Adjust.
15674 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
15676 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15677 -Wno-strict-prototypes.
15679 * g++spec.c: Adjust type of second argument to
15680 lang_specific_driver, and update code as necessary.
15682 * cp-tree.h: Don't prototype min_precision here.
15683 (my_friendly_assert): Cast expression to void.
15684 * semantics.c (do_poplevel): Initialize scope_stmts.
15686 2000-08-02 Mark Mitchell <mark@codesourcery.com>
15688 * cp-tree.h (DECL_NEEDED_P): Tweak.
15690 2000-07-28 Jason Merrill <jason@redhat.com>
15692 * lang-specs.h: Use %i in rule for .ii files.
15694 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
15696 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15698 2000-07-30 Mark Mitchell <mark@codesourcery.com>
15700 Allow indirect primary bases.
15701 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
15703 (CLASSTYPE_VFIELD_PARENT): Remove.
15704 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15705 (BINFO_PRIMARY_BINFO): Remove.
15706 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15707 (BINFO_VBASE_PRIMARY_P): Likewise.
15708 (BINFO_PRIMARY_BASE_OF): New macro.
15709 (BINFO_INDIRECT_PRIMARY_P): Likewise.
15710 (get_primary_binfo): New function.
15711 * decl.c (lang_mark_tree): Make lang_type::primary_base.
15712 * class.c (vcall_offset_data_s): Rename to ...
15713 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
15714 and add ctor_vtbl_p.
15715 (get_derived_offset): Use get_primary_binfo.
15716 (dfs_mark_primary_bases): Adjust handling of virtual primary
15718 (mark_primary_bases): Likewise.
15719 (set_primary_base): Take a binfo, not an integer, as a
15720 representation of the primary base.
15721 (indirect_primary_base_p): Remove.
15722 (determine_primary_base): Adjust for indirect primary bases.
15723 (dfs_find_final_overrider): Fix typo in coment.
15724 (update_vtable_entry_for_fn): Use get_primary_binfo.
15725 (layout_nonempty_base_or_field): Tweak.
15726 (build_base_fields): Adjust for new primary base semantics.
15727 (dfs_propagate_binfo_offsets): Remove.
15728 (propagate_binfo_offsets): Rewrite.
15729 (dfs_set_offset_for_shared_vbases): Remove.
15730 (layout_virtual_bases): Don't use it.
15731 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15733 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15734 CLASSTYPE_VFIELD_PARENT.
15735 (dfs_get_primary_binfo): New function.
15736 (get_primary_binfo): Likewise.
15737 (dump_class_hierarchy_r): Tweak printing of primary bases.
15738 (build_vtbl_initializer): Fix typo in comments. Use
15740 (build_vcall_and_vbase_vtbl_entries): Likewise.
15741 (build_vbaes_offset_vtbl_entries): Likewise.
15742 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15743 BV_VCALL_INDEX to handle indirect primary bases.
15744 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15745 (build_rtti_vtbl_entries): Likewise.
15746 * search.c (get_shared_vbase_if_not_primary): Tweak.
15747 (find_vbase_instance): Likewise.
15748 (binfo_for_vtable): Simplify.
15749 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15750 (make_binfo): Make it have 11 entries.
15752 2000-07-30 Alex Samuel <samuel@codesourcery.com>
15754 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15755 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15756 ascertaining primaryness.
15757 (G): Remove template_args.
15758 (decl_is_template_id): New function.
15759 (write_encoding): Use decl_is_template_id.
15760 (write_name): Likewise. Handle type_decls. Get main variant of
15762 (write_nested_name): Likewise.
15763 (write_prefix): Likewise.
15764 (write_template_prefix): Likewise.
15765 (write_special_name_constructor): Remove defunct production from
15767 (write_bare_function_type): Remove comment about absent parameter.
15768 (write_template_template_arg): Add missing grammar production to
15771 2000-07-27 Jason Merrill <jason@redhat.com>
15773 * decl.c (duplicate_decls): If common_type produces a non-typedef
15774 type for a typedef, just use the old type.
15776 2000-07-27 Mark Mitchell <mark@codesourcery.com>
15778 * cp-tree.h (function_depth): Declare.
15779 (verify_stmt_tree): Likewise.
15780 (find_tree): Likewise.
15781 * decl.c (function_depth): Give it external linkage.
15782 * optimize.c (optimize_function): Increment and decrement it.
15783 * tree.c (verify_stmt_tree_r): New function.
15784 (verify_stmt_tree): Likewise.
15785 (find_tree_r): Likewise.
15786 (find_tree): Likewise.
15788 2000-07-27 Jason Merrill <jason@redhat.com>
15790 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15792 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15794 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15796 * decl.c (start_cleanup_fn): Mark the function as `inline'.
15797 * decl2.c (get_guard): Call cp_finish_decl, not
15798 rest_of_decl_compilation, for local guards.
15799 * lex.c (do_identifier): Remove unused variable.
15801 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
15803 * parse.y: Add missing ';'.
15805 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15807 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15810 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15812 Kill strict_prototype. Backwards compatibility only for
15813 non NO_IMPLICIT_EXTERN_C systems.
15814 * cp-tree.h (flag_strict_prototype): Remove.
15815 (strict_prototype): Remove.
15816 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15817 * decl.c (maybe_push_to_top_level): Adjust.
15818 (pop_from_top_level): Adjust.
15819 (decls_match): Only allow sloppy parm matching for ancient
15821 (init_decl_processing): Adjust.
15822 (grokdeclarator): Adjust.
15823 * decl2.c (flag_strict_prototype): Remove.
15824 (strict_prototype): Remove.
15825 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15826 (lang_f_options): Remove "strict-prototype".
15827 (unsupported-options): Add "strict-prototype".
15828 * lex.c (do_identifier): Adjust.
15829 (do_scoped_id): Adjust.
15830 * parse.y (empty_parms): Adjust.
15831 * class.c (push_lang_context): Adjust.
15832 (pop_lang_context): Adjust.
15833 * typeck.c (comp_target_parms): Adjust.
15835 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15837 * decl.c (poplevel): Deal with anonymous variables at for scope.
15838 (maybe_inject_for_scope_var): Likewise.
15840 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
15842 * decl.c: Remove all signal handling code, now done in toplev.c.
15844 2000-07-23 Mark Mitchell <mark@codesourcery.com>
15846 * decl.c (make_rtl_for_nonlocal_decl): Rework.
15848 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15851 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
15853 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15854 Define my_friendly_assert and my_friendly_abort as macros
15855 which may call friendly_abort. Prototype friendly abort, not
15856 my_friendly_abort or my_friendly_assert.
15857 * decl.c (signal_catch): Report the signal caught in the error
15858 message. Call fatal directly.
15859 * typeck2.c (ack, my_friendly_assert): Delete.
15860 (my_friendly_abort): Rename to friendly_abort. Expect file,
15861 line, and function parameters. Report the abort code, then
15862 call fancy_abort. Do not mask an abort if errors have
15865 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
15867 * typeck.c (comp_target_parms): Remove obsolete parameter.
15868 (comp_target_types): Adjust.
15870 2000-07-17 Jason Merrill <jason@redhat.com>
15872 * typeck.c (mark_addressable): Never set TREE_USED.
15873 * call.c (build_call): Don't abort on calls to library functions
15874 that have been declared normally.
15876 * typeck.c (build_binary_op): Fix grammar in warning.
15878 * exception.cc (__eh_free): Fix prototype.
15880 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15882 * decl.c (pushdecl): Handle seeing an OVERLOAD in
15883 IDENTIFIER_NAMESPACE_VALUE.
15885 2000-07-16 Mark Mitchell <mark@codesourcery.com>
15887 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15888 * method.c (use_thunk): Correct handling of vcall offsets.
15890 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
15892 * .cvsignore: parse.h and parse.c have no cp- prefix.
15894 2000-07-13 Mark Mitchell <mark@codesourcery.com>
15896 * .cvsignore: New file.
15898 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
15900 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
15902 2000-07-12 Mark Mitchell <mark@codesourcery.com>
15904 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15906 * parse.h: Likewise.
15908 2000-07-11 Mark Mitchell <mark@codesourcery.com>
15910 * class.c (layout_class_type): Add pointers to virtual bases after
15911 base classes under the old ABI.
15913 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
15915 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15916 (finish_continue_stmt): Likewise.
15917 (begin_for_stmt): Remove call to note_level_for_for.
15918 (finish_goto_stmt): Change call from build_min_nt
15920 (finish_expr_stmt): Likewise.
15921 (begin_if_stmt): Likewise.
15922 (begin_while_stmt): Likewise.
15923 (finish_while_stmt): Likewise.
15924 (finish_return_stmt): Likewise.
15925 (begin_for_stmt): Likewise.
15926 (finish_for_stmt): Likewise.
15927 (finish_break_stmt): Likewise.
15928 (begin_switch_stmt): Likewise.
15929 (finish_case_label): Likewise.
15930 (genrtl_try_block): Likewise.
15931 (begin_try_block): Likewise.
15932 (begin_handler): Likewise.
15933 (begin_compound_stmt): Likewise.
15934 (finish_asm_stmt): Likewise.
15935 (finish_label_stmt): Likewise.
15936 (add_decl_stmt): Likewise.
15937 (finish_subobject): Likewise.
15938 (finish_decl_cleanup): Likewise.
15939 (finish_named_return_value): Likewise.
15940 (setup_vtbl_ptr): Likewise.
15941 (add_scope_stmt): Likewise.
15942 * decl.c (finish_constructor_body): Likewise.
15943 (finish_destructor_body): Likewise.
15944 * optimize.c (copy_body_r): Likewise.
15945 (initialize_inlined_parameters): Likewise.
15946 (declare_return_variable): Likewise.
15947 (expand_call_inline): Likewise.
15949 2000-07-10 Jakub Jelinek <jakub@redhat.com>
15951 * semantics.c (expand_body): Sync interface information
15952 at the end of function body expansion.
15954 2000-07-09 Jason Merrill <jason@redhat.com>
15956 * init.c (build_new_1): Bail early if the call to new fails.
15958 * decl.c (compute_array_index_type): Check specifically for
15959 an INTEGER_CST, not just TREE_CONSTANT.
15961 * decl.c (duplicate_decls): Don't call duplicate_decls on
15962 the DECL_TEMPLATE_RESULT.
15963 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15966 * error.c (dump_template_bindings): Don't crash if we had an
15967 invalid argument list.
15969 * typeck.c (c_expand_start_case): Do narrowing here.
15970 * semantics.c (finish_switch_cond): Not here.
15972 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
15974 * parse.y (asm_clobbers): Do string concatenation.
15976 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15978 * decl.c (pushtag): Don't put local classes in template functions
15979 on the local_classes list.
15981 2000-07-04 Scott Snyder <snyder@fnal.gov>
15983 * decl2.c (get_guard): Add missing return for old ABI local
15986 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15988 * cp-tree.h (char_type_p): New function.
15989 * decl.c (init_decl_processing): Don't initialize
15990 signed_wchar_type_node or unsigned_wchar_type_node.
15991 (complete_array_type): Handle brace-enclosed string-constants.
15992 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15993 * tree.c (char_type_p): New function.
15994 * typeck2.c (digest_init): Use char_type_p.
15996 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15998 * pt.c (tsubst): Don't layout type, if it's error_mark.
16000 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
16002 * pt.c (instantiate_pending_templates): Reset template level.
16004 2000-07-05 Jason Merrill <jason@redhat.com>
16006 * call.c (joust): Don't complain about `operator char *()' beating
16007 `operator const char *() const'.
16009 2000-07-04 scott snyder <snyder@fnal.gov>
16010 Jason Merrill <jason@redhat.com>
16012 * repo.c (repo_get_id): Handle the case where a class with virtual
16013 bases has a null TYPE_BINFO_VTABLE.
16015 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
16016 Jason Merrill <jason@redhat.com>
16018 * parse.y (member_init): Just pass in the type.
16019 * init.c (expand_member_init): Handle getting a type.
16021 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16022 Jason Merrill <jason@redhat.com>
16024 * decl.c (finish_function): Warn if a function has no return
16026 Suggested by Andrew Koenig.
16027 * typeck.c (check_return_expr): Do set current_function_returns_value
16028 if we got an error_mark_node.
16030 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16032 * decl2.c (push_decl_namespace): Push the original namespace.
16034 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16036 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16037 * semantics.c (begin_class_definition): Clear it.
16039 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
16041 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16042 (genrtl_expr_stmt): Likewise.
16043 (genrtl_decl_stmt): Likewise.
16044 (genrtl_if_stmt): Likewise.
16045 (genrtl_while_stmt): Likewise.
16046 (genrtl_do_stmt): Likewise.
16047 (genrtl_return_stmt): Likewise.
16048 (genrtl_for_stmt): Likewise.
16049 (genrtl_break_stmt): Likewise.
16050 (genrtl_continue_stmt): Likewise.
16051 (genrtl_scope_stmt): Likewise.
16052 (genrtl_switch_stmt): Likewise.
16053 (genrtl_case_label): Likewise.
16054 (genrtl_begin_compound_stmt): Likewise.
16055 (genrtl_finish_compound_stmt): Likewise.
16056 (genrtl_compound_stmt): Likewise.
16057 (genrtl_asm_stmt): Likewise.
16059 * init.c (begin_init_stmts): Remove call to
16060 genrtl_begin_compound_stmt.
16061 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16063 * semantics.c (lang_expand_stmt): Changed call to
16064 genrtl_compound_stmt to ignore return value.
16066 2000-07-02 Mark Mitchell <mark@codesourcery.com>
16068 * mangle.c (canonicalize_for_substitution): Return the canonical
16071 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16073 * typeck.c (commonparms): Remove obstack manipulations.
16075 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
16077 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16079 * Makefile.in (OBJS): Added ../c-semantics.o.
16080 (OBJDEPS): Likewise.
16082 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16084 (struct stmt_tree): Added comment.
16085 (current_function_name_declared): Removed.
16086 (stmts_are_full_exprs_p): Likewise.
16087 (genrtl_do_pushlevel): Likewise.
16088 (genrtl_clear_out_block): Likewise.
16089 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16090 (DECL_ANON_UNION_ELEMS): Likewise.
16091 (emit_local_var): Likewise.
16092 (make_rtl_for_local_static): Likewise.
16093 (do_case): Likewise.
16094 (expand_stmt): Likewise.
16095 (genrtl_decl_cleanup): Likewise.
16096 (c_expand_asm_operands): Likewise.
16097 (c_expand_return): Likewise.
16098 (c_expand_start_case): Likewise.
16100 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16101 (emit_local_var): Likewise.
16102 (initialize_local_var): Change reference to
16103 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16104 Change reference to stmts_are_full_exprs_p to
16105 current_stmt_tree->stmts_are_full_exprs_p.
16106 (push_cp_function_context): Likewise.
16108 * expect.c (expand_throw): Change reference to
16109 stmts_are_full_exprs_p.
16111 * init.c (build_aggr_init): Change reference to
16112 stmts_are_full_exprs_p.
16113 (build_vec_init): Likewise.
16115 * optimize.c (maybe_clone_body): Change reference to
16116 current_function_name_declared to
16117 cp_function_chain->name_declared.
16119 * pt.c (instantiate_decl): Change reference to
16120 current_function_name_declared to
16121 cp_function_chain->name_declared.
16123 * semantics.c (expand_cond): Moved declaration to c-common.h.
16124 (genrtl_do_pushlevel): Moved to c-semantics.c.
16125 (genrtl_clear_out_block): Likewise.
16126 (genrtl_goto_stmt): Likewise.
16127 (genrtl_expr_stmt): Likewise.
16128 (genrtl_decl_stmt): Likewise.
16129 (gerntl_if_stmt): Likewise.
16130 (genrtl_while_stmt): Likewise.
16131 (genrtl_do_stmt): Likewise.
16132 (genrtl_return_stmt): Likewise.
16133 (genrtl_for_stmt): Likewise.
16134 (genrtl_break_stmt): Likewise.
16135 (genrtl_continue_stmt): Likewise.
16136 (genrtl_scope_stmt): Likewise.
16137 (genrtl_switch_stmt): Likewise.
16138 (genrtl_case_label): Likewise.
16139 (genrtl_begin_compound_stmt): Likewise.
16140 (genrtl_finish_compound_stmt): Likewise.
16141 (genrtl_compound_stmt): Likewise.
16142 (genrtl_asm_stmt): Likewise.
16143 (genrtl_decl_cleanup): Likewise.
16144 (expand_cond): Likewise.
16145 (expand_stmt): Renamed to ...
16146 (lang_expand_stmt): ... this.
16147 (lang_expand_expr_stmt): Initialize.
16148 (set_current_function_name_declared): Likewise.
16149 (stmts_are_full_exprs_p): Likewise.
16150 (current_function_name_declared): Likewise.
16151 (anon_aggr_type_p): Likewise.
16152 (do_poplevel): Change reference to
16153 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16154 Change reference to stmts_are_full_exprs_p to
16155 current_stmt_tree->stmts_are_full_exprs_p.
16156 (add_tree): Likewise.
16157 (finish_expr_stmt): Likewise.
16158 (prep_stmt): Likewise.
16159 (lang_expand_stmt): Likewise.
16160 (begin_compound_stmt): Change reference to
16161 current_function_name_declared to
16162 cp_function_chain->name_declared and call to
16163 current_function_name_declared().
16164 (setup_vtbl_ptr): Likewise.
16165 (genrtl_do_poplevel): Removed.
16167 2000-06-30 Jason Merrill <jason@redhat.com>
16169 * init.c (init_init_processing): Go back to aligning like
16170 double_type_node for old ABI.
16171 (get_cookie_size): Make cookie larger if we get a type that needs
16173 (build_vec_delete): Call it.
16175 * typeck.c (qualify_type_recursive): New fn.
16176 (composite_pointer_type): Use it.
16177 (build_binary_op): Use composite_pointer_type.
16179 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
16180 Jason Merrill <jason@redhat.com>
16182 * typeck.c (check_return_expr): Don't complain about returning
16183 NULL from operator new if -fcheck-new.
16184 * cp-tree.h: Declare flag_check_new here.
16185 * init.c: Not here.
16187 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16189 * mangle.c (find_substitution): Use same_type_p.
16190 (write_encoding): Don't check for substitutions.
16192 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16194 * parse.y (expr_no_comma_rangle): New non-terminal.
16195 (template_parm): Use it for default parameter case.
16196 (template_arg): Use it.
16197 (expr_no_commas): Remove commented out undefined extensions.
16198 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16199 * parse.h, parse.c: Rebuilt.
16201 2000-06-30 Mark Mitchell <mark@codesourcery.com>
16203 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16204 (finish_asm_stmt): Do it here, instead.
16206 * cp-tree.h (ridpointers): Don't declare.
16207 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16208 (record_builtin_java_type): Likewise.
16209 (init_decl_processing): Likewise.
16210 * lex.c: Move inclusion of lex.h.
16211 (ridpointers): Don't define.
16212 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
16214 * lex.h (enum rid): Rename to ...
16215 (enum cp_rid): ... this.
16216 (ridpointers): Don't declare.
16217 * parse.y: Move inclusion of lex.h.
16218 * parse.c: Regenerated.
16219 * spew.c: Move inclusion of lex.h.
16221 * cp-tree.h (struct language_function): Remove temp_name_counter.
16222 (temp_name_counter): Remove.
16223 (get_temp_name): Change prototype.
16224 (get_guard): New function.
16225 (get_guard_cond): Likewise.
16226 (set_guard): Likewise.
16227 * cvt.c (build_up_reference): Adjust call to get_temp_name.
16228 * decl.c (expand_static_init): Use get_guard and friends to
16229 implement guard variables.
16230 * decl2.c (get_temp_name): Assume that the variables created are
16232 (get_sentry): Rename to ...
16233 (get_guard): ... this. Implement new ABI guard variables.
16234 (get_guard_bits): New function.
16235 (get_guard_cond): Likewise.
16236 (set_guard): Likewise.
16237 (start_static_initialization_or_destruction): Use them.
16238 (do_static_initialization): Replace sentry with guard throughout.
16239 (do_static_destruction): Likewise.
16240 * init.c (create_temporary_var): Add comment.
16242 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16244 * mangle.c (find_substitution): Use same_type_p.
16245 (write_encoding): Don't check for substitutions.
16247 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16249 * parse.y (expr_no_comma_rangle): New non-terminal.
16250 (template_parm): Use it for default parameter case.
16251 (template_arg): Use it.
16252 (expr_no_commas): Remove commented out undefined extensions.
16253 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16254 * parse.h, parse.c: Rebuilt.
16256 2000-06-29 Mark Mitchell <mark@codesourcery.com>
16258 * cp-tree.h (flag_const_strings): Remove.
16259 (warn_parentheses): Likewise.
16260 (warn_format): Likewise.
16261 (common_type): Likewise.
16262 (default_conversion): Likewise.
16263 (build_binary_op): Likewise.
16264 (cp_build_binary_op): New macro.
16265 * call.c (build_new_op): Use cp_build_binary_op instead of
16267 * class.c (build_vtable_entry_ref): Likewise.
16268 * decl.c (expand_static_init): Likewise.
16269 (compute_array_index_type): Likewise.
16270 (build_enumerator): Likewise.
16271 * decl2.c (delete_sanity): Likewise.
16272 (start_static_initialization_or_destruction): Likewise.
16273 * error.c (dump_type_suffix): Likewise.
16274 * init.c (resolve_offset_ref): Likewise.
16275 (build_new): Likewise.
16276 (build_new_1): Likewise.
16277 (build_vec_delete_1): Likewise.
16278 (build_vec_init): Likewise.
16279 (build_delete): Likewise.
16280 * rtti.c (synthesize_tinfo_fn): Likewise.
16281 (synthesize_tinfo_var): Likewise.
16282 * search.c (expand_upcast_fixups): Likewise.
16283 (fixup_all_virtual_upcast_offsets): Likewise.
16284 * typeck.c (build_array_ref): Likewise.
16285 (get_member_function_from_ptrfunc): Likewise.
16286 (build_binary_op): Add parameter.
16287 (pointer_int_sum): Use cp_build_binary_op.
16288 (pointer_diff): Likewise.
16289 (build_modify_expr): Likewise.
16290 (get_delta_difference): Likewise.
16291 (build_ptrmemfunc): Likewise.
16293 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
16295 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16296 * decl.c (create_implicit_typedef): Adjust.
16297 * decl2.c (build_artificial_parm): Adjust.
16298 * method.c (implicitly_declare_fn): Adjust.
16299 * pt.c (push_inline_template_parms_recursive): Adjust.
16300 (process_template_parm): Adjust.
16301 (overloaded_template_name): Adjust.
16302 * semantics.c (finish_template_template_parm): Adjust.
16304 2000-06-28 Mark Mitchell <mark@codesourcery.com>
16306 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16307 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16308 where to emit thunks.
16309 (build_vtt): Adjust call to build_vtt_inits.
16310 (build_vtt_inits): Add parameter to indicate whether or not
16311 sub-VTTs for virtual bases should be included. Adjust handling of
16312 construction vtables.
16313 (get_matching_base): New function.
16314 (dfs_build_vtt_inits): Rename to ...
16315 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16316 construction vtables.
16317 (dfs_fixup_binfo_vtbls): Likewise.
16318 (build_ctor_vtbl_groups): Build construction vtables for virtual
16320 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16321 to build construction vtbls.
16322 (dfs_accumulate_vtbl_inits): Adjust handling of
16323 construction vtables.
16325 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16328 2000-06-27 Mark Mitchell <mark@codesourcery.com>
16330 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16332 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16334 * search.c (hides): Remove.
16335 (is_subobject_of_p): Add most_derived parameter. Use
16337 (lookup_field_queue_p): Adjust.
16338 (lookup_field_r): Adjust.
16340 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16342 * decl2.c (handle_class_head): Bash typedefs to the type's main
16345 2000-06-25 Mark Mitchell <mark@codesourcery.com>
16347 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16348 (begin_global_stmt_expr): ... this.
16349 (genrtl_finish_stmt_expr): Rename to ...
16350 (finish_global_stmt_expr): ... this.
16351 * init.c (begin_init_stmts): Adjust calls.
16352 (finish_init_stmts): Likewise.
16353 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16354 (begin_global_stmt_expr): ... this.
16355 (genrtl_finish_stmt_expr): Rename to ...
16356 (finish_global_stmt_expr): ... this.
16358 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16360 * search.c (lookup_member): Fix typo in comment.
16362 2000-06-24 Jason Merrill <jason@redhat.com>
16364 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16365 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16367 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16369 * parse.y (complex_direct_notype_declarator): Support global_scope.
16370 * Makefile.in: Adjust conflict count.
16372 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16374 * parse.y (template_arg): Convert TEMPLATE_DECL
16375 that is a template template parameter to
16376 TEMPLATE_TEMPLATE_PARM here.
16378 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16379 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16380 (copy_template_template_parm): Adjust prototype.
16381 * decl.c (grokdeclarator): Remove dead code.
16382 * pt.c (process_template_parm): Tidy.
16383 (lookup_template_class): Construct nodes in
16384 copy_template_template_parm.
16385 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16386 lookup_template_class. Use TYPE_TI_TEMPLATE.
16387 * tree.c (copy_template_template_parm): Add NEWARGS
16389 (mapcar): Adjust call to copy_template_template_parm.
16390 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16391 * method.c (build_template_template_parm_names): Change error
16392 code to avoid compilation warning.
16394 * gxxint.texi: Document template template parameter
16397 2000-06-21 Alex Samuel <samuel@codesourcery.com>
16399 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16400 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16401 (cp-demangle.o): New rule.
16402 (dyn-string.o): Likewise.
16403 * inc/cxxabi.h (__cxa_demangle): New declaration.
16405 2000-06-22 Mark Mitchell <mark@codesourcery.com>
16407 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16408 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16409 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
16410 a tree, not an int.
16411 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16412 (make_thunk): Change prototype.
16413 (emit_thunk): Rename to use_thunk.
16414 (mangle_thunk): Change prototype.
16415 * class.c (get_derived_offset): Simplify.
16416 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16417 BV_GENERATE_THUNK_WITH_VTABLE_P.
16418 (build_primary_vtable): Simplify.
16419 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16420 (dfs_find_base): Remove.
16421 (update_vtable_entry_for_fn): Correct bug in finding the base
16422 where a virtual function was first declared. Figure out whether
16423 or not to emit a vcall-thunk with the vtables in which it appears.
16424 Correct logic for deciding whether to use an ordinary thunk, or a
16426 (finish_struct_1): Remove unnecssary code.
16427 (build_vtbl_initializer): Use ssize_int for the running counter of
16429 (build_vtbl_initializer): Only use vcall thunks where necessary.
16430 Mark thunks as needing to be emitted with their vtables, or not.
16431 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16432 indices. Use size_binop.
16433 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16434 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
16436 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16437 (build_vtable_entry): Mark thunks as needing to be emitted with
16438 their vtables, or not.
16439 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16440 * decl2.c (mark_vtable_entries): Use use_thunk instead of
16442 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
16444 * error.c (dump_expr): Use BV_FN.
16445 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16447 * method.c (make_thunk): Likewise.
16448 (emit_thunk): Rename to use_thunk. Allow callers to decide
16449 whether or not to actually emit the thunk. Adjust for changes in
16450 representation of vcall offsets.
16451 * search.c (dfs_get_pure_virtuals): Use BV_FN.
16452 * semantics.c (emit_associated_thunks): New function.
16453 (expand_body): Use it.
16454 * ir.texi: Adjust decriptions of thunks.
16456 2000-06-22 Jason Merrill <jason@redhat.com>
16458 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16459 (tsubst_friend_function): Copy it here.
16461 * decl.c (grok_op_properties): Fix typo.
16463 * decl2.c (delete_sanity): Clarify warning, avoid failure on
16466 * pt.c (check_explicit_specialization): Clarify error.
16468 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16469 an old OVERLOAD when we're declaring a non-function.
16470 (pushdecl, destroy_local_var): Check for error_mark_node.
16471 (warn_extern_redeclared_static): Also bail early if
16472 we're a CONST_DECL.
16473 (push_overloaded_decl): Ignore an old error_mark_node.
16475 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
16477 * call.c (build_x_va_arg): Check if in a template decl.
16478 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16480 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16482 * class.c (push_lang_context): TYPE_NAME gets you to the Java
16484 * decl.c (check_goto): Computed gotos assumed OK.
16486 2000-06-20 Jason Merrill <jason@redhat.com>
16488 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16489 for which we don't need to look for instantiations.
16491 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
16493 * parse.y (program): Always call finish_translation_unit.
16494 * parse.c, parse.h: Rebuilt.
16496 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
16498 * method.c: Don't include hard-reg-set.h.
16500 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16502 * rtti.c (get_base_offset): Cope when vbase field is in a base.
16504 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16506 * call.c (build_conditional_expr): Use VOID_TYPE_P.
16507 * cvt.c (cp_convert_to_pointer): Likewise.
16508 (convert_to_void): Likewise.
16509 * error.c (dump_expr): Likewise.
16510 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16511 * init.c (build_delete): Likewise.
16512 * method.c (emit_thunk): Likewise.
16513 * optmize.c (declare_return_variable): Likewise.
16514 * rtti.c (get_tinfo_decl_dynamic): Likewise.
16515 (get_typeid): Likewise.
16516 (build_dynamic_cast_1): Likewise.
16517 * typeck.c (composite_pointer_type): Likewise.
16518 (common_type): Likewise.
16519 (build_indirect_ref): Likewise.
16520 (build_binary_op): Likewise.
16521 (build_x_compound_expr): Likewise.
16522 (check_return_expr): Likewise.
16523 * typeck2.c (add_exception_specifier): Likewise.
16525 * mangle.c (write_method_parms): Use direct comparison for end
16528 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
16530 * cp-tree.h (genrtl_try_block): Declare function.
16531 (genrtl_handler): Likewise.
16532 (genrtl_catch_block): Likewise.
16533 (genrtl_ctor_stmt): Likewise.
16534 (genrtl_subobject): Likewise.
16535 (genrtl_decl_cleanup): Likewise.
16536 (genrtl_do_poplevel): Likewise.
16537 (genrtl_do_pushlevel): Likewise.
16538 (genrtl_clear_out_block): Likewise.
16539 (genrtl_goto_stmt): Likewise.
16540 (genrtl_expr_stmt): Likewise.
16541 (genrtl_decl_stmt): Likewise.
16542 (genrtl_if_stmt): Likewise.
16543 (genrtl_while_stmt): Likewise.
16544 (genrtl_do_stmt): Likewise.
16545 (genrtl_return_stmt): Likewise.
16546 (genrtl_for_stmt): Likewise.
16547 (genrtl_break_stmt): Likewise.
16548 (genrtl_continue_stmt): Likewise.
16549 (genrtl_scope_stmt): Likewise.
16550 (genrtl_switch_stmt): Likewise.
16551 (genrtl_case_label): Likewise.
16552 (genrtl_begin_compound_stmt): Likewise.
16553 (genrtl_finish_compound_stmt): Likewise.
16554 (genrtl_compound_stmt): Likewise.
16555 (genrtl_asm_stmt): Likewise.
16556 (genrtl_named_return_value): Likewise.
16557 (genrtl_begin_stmt_expr): Likewise.
16558 (genrtl_finish_stmt_expr): Likewise.
16559 (finish_for_stmt): Removed first argument.
16560 (finish_switch_stmt): Likewise.
16562 * semantics.c (genrtl_try_block): Define function.
16563 (genrtl_handler): Likewise.
16564 (genrtl_catch_block): Likewise.
16565 (genrtl_ctor_stmt): Likewise.
16566 (genrtl_subobject): Likewise.
16567 (genrtl_decl_cleanup): Likewise.
16568 (genrtl_do_poplevel): Likewise.
16569 (genrtl_do_pushlevel): Likewise.
16570 (genrtl_clear_out_block): Likewise.
16571 (genrtl_goto_stmt): Likewise.
16572 (genrtl_expr_stmt): Likewise.
16573 (genrtl_decl_stmt): Likewise.
16574 (genrtl_if_stmt): Likewise.
16575 (genrtl_while_stmt): Likewise.
16576 (genrtl_do_stmt): Likewise.
16577 (genrtl_return_stmt): Likewise.
16578 (genrtl_for_stmt): Likewise.
16579 (genrtl_break_stmt): Likewise.
16580 (genrtl_continue_stmt): Likewise.
16581 (genrtl_scope_stmt): Likewise.
16582 (genrtl_switch_stmt): Likewise.
16583 (genrtl_case_label): Likewise.
16584 (genrtl_begin_compound_stmt): Likewise.
16585 (genrtl_finish_compound_stmt): Likewise.
16586 (genrtl_compound_stmt): Likewise.
16587 (genrtl_asm_stmt): Likewise.
16588 (genrtl_named_return_value): Likewise.
16589 (genrtl_begin_stmt_expr): Likewise.
16590 (genrtl_finish_stmt_expr): Likewise.
16591 (finish_for_stmt): Removed first argument and generate rtl
16593 (finish_switch_stmt): Likewise.
16594 (do_poplevel): Removed generate rtl specific code.
16595 (do_pushlevel): Likewise.
16596 (add_tree): Likewise.
16597 (finish_goto_stmt): Likewise.
16598 (finish_expr_stmt): Likewise.
16599 (begin_if_stmt): Likewise.
16600 (finish_if_stmt_cond): Likewise.
16601 (finish_then_clause): Likewise.
16602 (begin_else_clause): Likewise.
16603 (finish_else_clause): Likewise.
16604 (finish_if_stmt): Likewise.
16605 (clear_out_block): Likewise.
16606 (begin_while_stmt): Likewise.
16607 (finish_while_stmt_cond): Likewise.
16608 (finish_while_stmt): Likewise.
16609 (begin_do_stmt): Likewise.
16610 (finish_do_body): Likewise.
16611 (finish_do_stmt): Likewise.
16612 (finish_return_stmt): Likewise.
16613 (begin_for_stmt): Likewise.
16614 (finish_for_init_stmt): Likewise.
16615 (finish_for_cond): Likewise.
16616 (finish_for_expr): Likewise.
16617 (finish_break_stmt): Likewise.
16618 (finish_continue_stmt): Likewise.
16619 (begin_switch_stmt): Likewise.
16620 (finish_switch_cond): Likewise.
16621 (finish_case_label): Likewise.
16622 (begin_try_block): Likewise.
16623 (begin_function_try_block): Likewise.
16624 (finish_try_block): Likewise.
16625 (finish_cleanup_try_block): Likewise.
16626 (finish_cleanup): Likewise.
16627 (finish_function_try_block): Likewise.
16628 (finish_handler_sequence): Likewise.
16629 (finish_function_handler_sequence): Likewise.
16630 (begin_handler): Likewise.
16631 (finish_handler_parms): Likewise.
16632 (begin_catch_block): Likewise.
16633 (finish_handler): Likewise.
16634 (begin_compound_stmt): Likewise.
16635 (finish_compound_stmt): Likewise.
16636 (finish_asm_stmt): Likewise.
16637 (finish_label_stmt): Likewise.
16638 (finish_label_decl): Likewise.
16639 (finish_subobject): Likewise.
16640 (finish_decl_cleanup): Likewise.
16641 (finish_named_return_value): Likewise.
16642 (begin_stmt_expr): Likewise.
16643 (finish_stmt_expr): Likewise.
16645 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16646 to call genrtl_expr_stmt when appropriate.
16648 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16649 begin_compound_expr to call genrtl_begin_stmt_expr and
16650 genrtl_begin_compound_expr when appropriate.
16651 (finish_init_stmts): Changed calls to finish_compound_expr and
16652 finish_stmt_expr to call genrtl_finish_compound_expr and
16653 genrtl_finish_stmt_expr when appropriate.
16654 (expand_default_init): Changed call to finish_expr_stmt to call
16655 genrtl_expr_stmt when appropriate.
16656 (build_vec_init): Likewise.
16658 * parse.y (simple_stmt): Removed first argument from call to
16659 finish_for_stmt. Removed first argument from call to
16660 finish_switch_stmt.
16662 * parse.c: Regenerated.
16664 * pt.c (tsubst_expr): Removed first argument from call to
16665 finish_for_stmt. Removed first argument from call to
16666 finish_switch_stmt.
16668 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
16670 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16671 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16673 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16674 (cplus_tree_code_length[]): Likewise.
16675 (cplus_tree_code_name[]): Likewise.
16676 (init_parse): Added call to add_c_tree_codes. Changed
16677 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16679 2000-06-16 Mark Mitchell <mark@codesourcery.com>
16681 * cp-tree.h (finish_mem_initializers): Declare.
16682 (count_trees): Likewise.
16683 * parse.y (base_init): Use finish_mem_initializers.
16684 * semantics.c (finish_mem_initializers): New function.
16686 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
16687 the number of trees.
16689 (count_trees): Don't use it.
16691 2000-06-15 Jason Merrill <jason@redhat.com>
16693 * tree.c (count_trees): New debugging function.
16695 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16696 * init.c (build_member_call): Pull out the name of a DECL.
16698 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16699 * semantics.c (expand_body): Push to TV_INTEGRATION here.
16700 * optimize.c (optimize_function): Not here.
16701 * pt.c (instantiate_decl): Push to TV_PARSE.
16703 2000-06-15 Mark Mitchell <mark@codesourcery.com>
16705 * cp-tree.h (struct language_function): Remove x_base_init_list
16706 and x_member_init_list.
16707 (current_base_init_list): Remove.
16708 (current_member_init_list): Likewise.
16709 (setup_vtbl_ptr): Change prototype.
16710 (emit_base_init): Likewise.
16711 (expand_member_init): Likewise.
16712 (reinit_parse_for_function): Remove.
16713 * decl.c (save_function_data): Don't clear x_base_init_list and
16714 x_member_init_list.
16715 (mark_language_function): Don't mark them.
16716 * init.c (perform_member_init): Tweak comment.
16717 (sort_member_init): Take the list of initializers as an argument.
16718 (sort_base_init): Likewise.
16719 (emit_base_init): Likewise.
16720 (expand_member_init): Return the initializer. Don't use global
16722 * lex.c (reinit_parse_for_function): Remove.
16723 * method.c (build_template_parm_names): Correct substitution.
16724 (do_build_copy_constructor): Don't use current_member_init_list
16725 and current_base_init_list.
16726 (synthesize_method): Likewise.
16727 * parse.y (base_init): Split mem-initializers into
16728 base-initializers and field-initializers.
16729 (member_init_list): Build up the list here.
16730 (member_init): Return the initializer.
16731 (fn.depfn): Don't use reinit_parse_for_function.
16732 * parse.c: Regenerated.
16733 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16735 (tsubst_expr): Don't use current_member_init_list
16736 and current_base_init_list.
16737 (tsubst_expr_values): Rename to ...
16738 (tsubst_initializer_list): ... this. Use convert_from_reference.
16739 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16740 and current_base_init_list.
16741 (begin_function_definition): Don't call reinit_parse_for_function.
16743 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16745 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16748 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16750 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
16752 * cp-tree.h (IF_COND): Move to c-common.h.
16753 (THEN_CLAUSE): Likewise.
16754 (ELSE_CLAUSE): Likewise.
16755 (WHILE_COND): Likewise.
16756 (WHILE_BODY): Likewise.
16757 (DO_COND): Likewise.
16758 (DO_BODY): Likewise.
16759 (RETURN_EXPR): Likewise.
16760 (EXPR_STMT_EXPR): Likewise.
16761 (FOR_INIT_STMT): Likewise.
16762 (FOR_COND): Likewise.
16763 (FOR_EXPR): Likewise.
16764 (FOR_BODY): Likewise.
16765 (SWITCH_COND): Likewise.
16766 (SWITCH_BODY): Likewise.
16767 (CASE_LOW): Likewise.
16768 (CASE_HIGH): Likewise.
16769 (GOTO_DESTINATION): Likewise.
16770 (COMPOUND_BODY): Likewise.
16771 (ASM_CV_QUAL): Likewise.
16772 (ASM_STRING): Likewise.
16773 (ASM_OUTPUTS): Likewise.
16774 (ASM_INPUTS): Likewise.
16775 (ASM_CLOBBERS): Likewise.
16776 (DECL_STMT_DECL): Likewise.
16777 (STMT_EXPR_STMT): Likewise.
16778 (LABEL_STMT_LABEL): Likewise.
16779 (SCOPE_BEGIN_P): Likewise.
16780 (SCOPE_END_P): Likewise.
16781 (SCOPE_STMT_BLOCK): Likewise.
16782 (SCOPE_NULLIFIED_P): Likewise.
16783 (SCOPE_NO_CLEANUPS_P): Likewise.
16784 (SCOPE_PARTIAL_P): Likewise.
16785 (ASM_VOLATILE_P): Likewise.
16786 (STMT_LINENO): Likewise.
16787 (STMT_LINENO_FOR_FN_P): Likewise.
16789 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16790 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16791 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16792 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16793 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16795 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16797 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16798 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16800 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16801 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16802 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16804 2000-06-14 Mark Mitchell <mark@codesourcery.com>
16806 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16807 * class.c (dfs_find_final_overrider): Set it appropriately.
16808 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16809 avoid unneeded secondary vptrs.
16811 2000-06-13 Jakub Jelinek <jakub@redhat.com>
16813 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16814 (check_bitfield_decl, check_field_decl): Likewise.
16815 (build_vtbl_or_vbase_field, build_base_field): Likewise.
16816 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16817 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16818 (xfer_tag, finish_enum): Likewise.
16819 * decl2.c (finish_builtin_type): Likewise.
16820 * init.c (init_init_processing): Likewise.
16821 * pt.c (instantiate_class_template): Likewise.
16822 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16823 * cp-tree.h (struct lang_type): Add user_align member.
16824 (CLASSTYPE_USER_ALIGN): Define.
16826 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
16828 * Make-lang.in (c++.install-common): Install g++-cross in
16829 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16830 $(target_alias)-g++ and $(target_alias)-c++.
16832 2000-06-12 Mark Mitchell <mark@codesourcery.com>
16834 * class.c (vcall_offset_data_s): Add last_init and fns.
16835 (overrides): Rename to same_signature_p.
16836 (dfs_find_final_overrider): Adjust accordingly.
16837 (mark_overriders): Likewise.
16838 (warn_hidden): Likewise.
16839 (build_vtbl_initializer): Reorganize machinery for building things
16840 at negative offsets.
16841 (build_vcall_and_vbase_vtbl_entries): Likewise.
16842 (build_vbase_offset_vtbl_entries): Likewise.
16843 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16844 offset entries. Do not create two entries for functions with the
16846 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16847 (build_rtti_vtbl_entries): Reorganize machinery for building things
16848 at negative offsets.
16850 * optimize.c (expand_call_inline): Don't recurse into the code
16851 used to initialize the parameters more than once.
16853 2000-06-11 Mark Mitchell <mark@codesourcery.com>
16855 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16856 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16857 (find_substitution): Only use the `Sa' substitution for
16858 std::allocator, not instantiations of it.
16859 (write_template_prefix): Move comment. Only use a TREE_LIST to
16860 represent substitutions for a member template.
16861 (write_array_type): Mangle array dimensions correctly.
16862 * optimize.c (maybe_clone_body): Copy more information from the
16864 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16865 on the regenerated declaration.
16867 2000-06-11 Chip Salzenberg <chip@valinux.com>
16868 Mark Mitchell <mark@codesourcery.com>
16870 * class.c (build_vtable): Clarify comment.
16871 (build_ctor_vtbl_group): Pass the most derived type to
16874 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16876 * decl2.c (compare_options): Don't needlessly cast away const-ness.
16878 2000-06-10 Mark Mitchell <mark@codesourcery.com>
16880 * decl.c (add_binding): Handle duplicate declarations of external
16883 2000-06-09 Chip Salzenberg <chip@valinux.com>
16884 Mark Mitchell <mark@codesourcery.com>
16886 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16888 (write_signed_number): New macro.
16889 (write_unsigned_number): Likewise.
16890 (write_source_name): Use them.
16891 (write_number): Handle signed and unsigned values.
16892 (write_integer_cst): Use tree_int_cst_sgn, and use
16893 write_unsigned_number or write_signed_number as appropriate.
16894 (write_discriminator): Use write_unsigned_number or
16895 write_signed_number as appropriate.
16896 (write_template_arg_literal): Likewise.
16897 (write_array_type): Use tree_low_cst.
16898 (write_template_parm): Use write_unsigned_number or
16899 write_signed_number as appropriate.
16900 (write_substitution): Adjust call to write_number.
16901 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16902 (write_expression): Handle non-type template arguments of
16903 reference type correctly.
16904 (mangle_thunk): Use write_signed_number.
16906 2000-06-09 Chip Salzenberg <chip@valinux.com>
16908 * mangle.c (find_substition): Don't mangle objects with typename
16909 substitutions (e.g. "cin" as "Si").
16911 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
16913 * call.c (add_candidate): Use ggc_alloc_cleared.
16914 * decl.c (lookup_label): Likewise.
16915 * lex.c (retrofit_lang_decl): Likewise.
16917 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
16919 * semantics.c (expand_body): Push to TV_EXPAND.
16920 * optimize.c (optimize_function): Push to TV_INTEGRATION.
16921 * decl.c (start_function): Always call announce_function.
16923 * tinfo2.cc: Just declare abort.
16925 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
16927 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16928 whenever @ is a symbolic name.
16930 2000-06-08 Jakub Jelinek <jakub@redhat.com>
16932 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16934 2000-06-07 Mark Mitchell <mark@codesourcery.com>
16936 * decl.c (pushdecl): Look up functions by DECL_NAME, not
16937 DECL_ASSEMBLER_NAME.
16939 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16941 * decl2.c (c_language): Define.
16943 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
16945 * lex.c (lang_init_options): Tweak.
16947 * decl2.c: Remove #inclusion of diagnostic.h
16948 (lang_decode_option): Move diagnostic formatting options to
16951 * lang-options.h: Remove documentation for diagnostic options.
16953 * Makefile.in (lex.o): Depends upon diagnostic.h
16955 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16957 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16958 the same DECL_RESULT, it's not a redefinition.
16959 * pt.c (tsubst_decl): Remove code to handle illegal
16962 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
16964 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16966 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
16968 * search.c (maybe_suppress_debug_info): Don't check
16969 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16971 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16974 Remember instantiation context in deferred instantiations.
16975 * cp-tree.h (struct tinst_level): Remove.
16976 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16977 * pt.c (current_tinst_level): Now a tree.
16978 (print_template_context, push_tinst_level, pop_tinst_level,
16979 tinst_for_decl): Adjust.
16980 (reopen_tinst_level): New fn.
16981 (init_pt): Register current_tinst_level as a root.
16982 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16983 of the pending templates list.
16984 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
16985 * lex.c (extract_interface_info): Adjust.
16986 * decl2.c (warn_if_unknown_interface): Adjust.
16988 2000-06-05 Mark Mitchell <mark@codesourcery.com>
16990 * class.c (indirect_primary_base_p): New function.
16991 (determine_primary_base): Use it.
16993 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
16995 Update new-abi dynamic cast algorithm.
16996 * tinfo.cc (__class_type_info::__dyncast_result): Add
16997 whole_details. Adjust constructor.
16998 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16999 Avoid unnecessary searching.
17000 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17002 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17004 * decl.c (init_decl_processing): Don't call record_component_aliases.
17005 * tree.c (build_cplus_array_type_1): Likewise.
17007 2000-06-04 Mark Mitchell <mark@codesourcery.com>
17009 * ir.texi: Correct typo.
17010 * mangle.c (write_expression): Handle non-type template arguments
17011 with reference type.
17012 * method.c (build_overload_value): Likewise.
17013 * pt.c (convert_nontype_argument): Explicitly represent conversion
17014 to a reference with an ADDR_EXPR.
17015 (unify): Always unify arguments in left-to-right order.
17017 2000-06-03 Alex Samuel <samuel@codesourcery.com>
17018 Mark Mitchell <mark@codesourcery.com>
17020 * Make-lang.in (CXX_SRCS): Add mangle.c.
17021 * Makefile.in (CXX_OBJS): Add mangle.o.
17022 (mangle.o): New rule.
17024 * class.c (local_classes): New variable.
17025 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17026 (get_vtt_name): Use mangle_vtt_name for new ABI.
17027 (init_class_processing): Initialize local_classes.
17028 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17029 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17030 (std_identifier): New macro.
17031 (DECL_VOLATILE_MEMFUNC_P): New macro.
17032 (DECL_NAMESPACE_STD_P): Likewise.
17033 (local_classes): Declare.
17034 (get_mostly_instantiated_function_type): Declare.
17035 (init_mangle): Declare.
17036 (mangle_decl): Likewise.
17037 (mangle_type_string): Likewise.
17038 (mangle_type): Likewise.
17039 (mangle_typeinfo_for_type): Likewise.
17040 (mangle_typeinfo_string_for_type): Likewise.
17041 (mangle_vtbl_for_type): Likewise.
17042 (mangle_vtt_for_type): Likewise.
17043 (mangle_ctor_vtbl_for_type): Likewise.
17044 (mangle_thunk): Likewise.
17045 (mangle_conv_op_name_for_type): Likewise.
17046 (mangle_guard_variable): Likewise.
17047 * decl.c (pushtag): Keep track of local classes.
17048 (initialize_predefined_identifiers): Initialize std_identifier.
17049 (init_decl_processing): Use std_identifier.
17050 (start_decl): Don't treat instantiations as specializations.
17051 (grokdeclarator): Likewise.
17052 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
17053 name for fully-instantiated templates.
17054 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17055 destructors with the new ABI.
17056 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17057 (grokfield): Use mangle_type for new ABI.
17058 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17059 (get_sentry): Use mangle_guard_variable for new ABI.
17060 (start_static_initialization_or_destruction): Likewise.
17061 * expr.c (extract_aggr_init): Remove.
17062 (extract_scalar_init): Likewise.
17063 (extract_init): Remove #if 0'd code.
17064 * mangle.c: New function.
17065 * method.c (build_mangled_name): Assert not flag_new_abi.
17066 (build_static_name): Likewise.
17067 (build_decl_overload_real): Likewise.
17068 (build_typename_overload): Likewise.
17069 (build_overload_with_type): Likewise.
17070 (build_overload_name): Likewise.
17071 (get_ctor_vtbl_name): Likewise.
17072 (start_squangling): Likewise.
17073 (get_id_2): Likewise.
17074 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17075 (init_method): Call init_mangle for new ABI.
17076 (make_thunk): Call mangle_thunk for new ABI.
17077 * operators.def: Correct new ABI manglings for the `%' operator.
17079 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17080 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17081 (lookup_template_class): Call mangle_decl for new ABI.
17082 (get_mostly_instantiated_function_type): New function.
17083 (set_mangled_name_for_template_decl): Use it.
17084 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17085 the new ABI. Use mangle_conv_op_name_for_type for instantiated
17086 conversion op names.
17087 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17088 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17089 (tinfo_base_init): Likewise. Mangle typeinfo string name with
17090 mangle_typeinfo_string_for_type.
17092 2000-06-03 Mark Mitchell <mark@codesourcery.com>
17094 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17095 (INNERMOST_TEMPLATE_ARGS): New macro.
17096 (innermost_args): Remove.
17097 (get_innermost_template_args): New function.
17098 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17099 * error.c (dump_function_decl): Be caution when using
17100 most_general_template.
17101 * method.c (build_template_parm_names): Use
17102 INNERMOST_TEMPLATE_ARGS.
17103 * pt.c (add_to_template_args): Tidy comment
17104 (get_innermost_template_args): New function.
17105 (check_explicit_specialization): Clear DECL_INITIAL for a new
17107 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17109 (push_template_decl): Always register specializations of the most
17111 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17112 (coerce_template_parms): Likewise.
17113 (lookup_template_class): Likewise.
17114 (innermost_args): Remove.
17115 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17116 (tsubst_decl): Handle tricky specializations. Use
17117 get_innermost_template_args.
17118 (instantiate_template): Simplify handling of partial
17120 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17121 (most_general_template): Reimplement, in a more straightforward
17123 (regenerate_decl_from_template): Tweak formatting. Use
17124 TMPL_ARGS_DEPTH for clarity.
17125 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17127 * dump.c (dequeue_and_dump): Dump information about thunks.
17129 2000-06-01 Richard Henderson <rth@cygnus.com>
17131 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17133 2000-06-01 Richard Henderson <rth@cygnus.com>
17135 * decl2.c (unsupported_options): Fix typo, make const.
17136 (lang_decode_option): Fix bsearch argument order.
17138 2000-06-01 Mark Mitchell <mark@codesourcery.com>
17140 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17143 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17145 * cp-tree.h (c_get_alias_set): Deleted.
17146 * Makefile.in (decl.o): Include ../expr.h.
17147 * decl.c (expr.h): Include.
17148 (init_decl_processing): Call record_component_aliases for arrays.
17149 (grokdeclarator): Likewise.
17150 Set TREE_ADDRESSABLE for fields that aren't bitfields.
17151 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17153 2000-05-31 Mark Mitchell <mark@codesourcery.com>
17155 Remove guiding declaration support.
17156 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17157 (flag_guiding_decls): Remove.
17158 * call.c (build_user_type_conversion_1): Remove support for
17160 (build_new_function_call): Likewise.
17161 (build_new_op): Likewise.
17162 (build_new_method_call): Likewise.
17163 * decl.c (start_function): Likewise.
17164 * friend.c (is_friend): Likewise.
17165 (do_friend): Likewise.
17166 * decl2.c ((flag_dump_translation_unit): Make it const.
17167 (flag_guiding_decls): Remove.
17168 (unsupported_options): New variable
17169 (compare_options): New function.
17170 (lang_decode_option): Use them.
17172 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17174 * method.c (mangle_expression): Adjust test for legal expression
17177 * pt.c (instantiate_decl): Save and restore the local
17178 specializations list.
17180 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
17182 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17184 2000-05-30 Mark Mitchell <mark@codesourcery.com>
17186 * call.c (add_template_candidate_real): Handle member template
17187 constructors for classes with virtual bases.
17188 (build_user_type_conversion_1): Use in_charge_arg_for_name.
17189 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17191 * ir.texi: Update thunk documentation.
17193 * call.c (joust): Fix handling of overloaded builtin operators.
17195 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
17197 * cp-tree.h (DECL_ANTICIPATED): New macro.
17198 Document new use of DECL_LANG_FLAG_7.
17199 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17200 in the user namespace.
17201 * lex.c (do_identifier): If the identifier's declaration has
17202 DECL_ANTICIPATED on, it has not yet been declared. But do not
17203 replace it with an ordinary implicit declaration.
17205 * tinfo2.cc: Include stdlib.h.
17207 2000-05-29 Mark Mitchell <mark@codesourcery.com>
17209 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17210 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17213 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
17215 * decl2.c (lang_decode_option): Use skip_leading_substring instead
17218 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
17220 * operators.def (<?): Duplicated, should have been...
17223 2000-05-27 Alex Samuel <samuel@codesourcery.com>
17224 Mark Mitchell <mark@codesourcery.com>
17226 * cp-tree.h (ansi_opname): Make it a macro.
17227 (ansi_assopname): Likewise.
17228 (struct lang_decl_flags): Add assignment_operator_p.
17229 (struct lang_decl): Add operator_code.
17230 (DECL_VTT_PARM): Adjust.
17231 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17232 overloaded operator.
17233 (SET_OVERLOADED_OPERATOR_CODE): New macro.
17234 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17235 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17236 (opname_tab): Remove.
17237 (assignop_tab): Likewise.
17238 (operator_name_info_t): New type.
17239 (operator_name_info): New variable.
17240 (assignment_operator_name_info): Likewise.
17241 (build_cp_library_fn): Remove declaration.
17242 (push_cp_library_fn): Likewise.
17243 (operator_name_string): Likewise.
17244 (build_decl_overload): Likewise.
17245 * call.c (print_z_candidates): Simplify.
17246 (build_object_call): Adjust usage of ansi_opname. Use
17247 DECL_OVERLOADED_OPERATOR_P.
17248 (op_error): Adjust operator name lookup.
17249 (build_conditional_expr): Adjust usage of ansi_opname.
17250 (build_new_op): Likewise.
17251 (build_op_delete_call): Likewise.
17252 (build_over_call): Likewise.
17253 (joust): Use DECL_OVERLOADED_OPERATOR_P.
17254 * decl.c (duplicate_decls): Copy operator_code.
17255 (init_decl_processing): Adjust parameters to push_cp_library_fn.
17256 (builtin_function): Adjust parameters to build_library_fn_1.
17257 (build_library_fn_1): Accept an overloaded operator code.
17258 (build_library_fn): Pass ERROR_MARK.
17259 (build_cp_library_fn): Accept an overloaded operator code.
17260 (push_cp_library_fn): Likewise.
17261 (grokfndecl): Tweak.
17262 (grokdeclarator): Simplify code to compute names of overloaded
17263 operators. Adjust use of ansi_opname.
17264 (ambi_op_p): Work on tree_codes, not identifiers.
17265 (unary_op_p): Likewise.
17266 (grok_op_properties): Likewise.
17267 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17268 (lang_mark_tree): Don't try to mark the operator_code.
17269 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17270 * error.c (dump_decl): Remove special handling for operator
17272 (dump_function_name): Likewise.
17273 (dump_expr): Adjust name lookup of operators.
17274 (op_to_string): Simplify.
17275 (assop_to_string): Likewise.
17276 * init.c (build_new_1): Adjust use of ansi_opname.
17277 * lex.c (opname_tab): Remove.
17278 (assignop_tab): Likewise.
17279 (ansi_opname): Likewise.
17280 (ansi_assopname): Likewise.
17281 (operator_name_string): Likewise.
17282 (reinit_lang_specific): Likewise.
17283 (operator_name_info): New variable.
17284 (assignment_operator_name_info): Likewise.
17285 (init_operators): New function.
17286 (init_parse): Use it.
17287 (do_identifier): Adjust use of ansi_opname.
17288 * method.c (mangle_expression): Don't use ansi_opname for
17290 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17291 (build_decl_overload): Remove.
17292 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17293 (do_build_assign_ref): Adjust use of ansi_opname.
17294 (synthesize_method): Likewise.
17295 (implicitly_declare_fn): Likewise.
17296 * operators.def: New file.
17297 * parse.y (operator): Adjust use of ansi_opname.
17298 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17299 (set_mangled_name_for_template_decl): Don't play games with
17301 (special_function_p): Adjust use of ansi_opname.
17302 * typeck.c (check_return_expr): Likewise.
17303 * Make-lang.in (cc1plus): Depend on operators.def.
17304 * Makefile.in (lex.o): Likewise.
17305 (decl.o): Likewise.
17307 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
17309 * Make-lang.in (cplib2.ready): Eradicate.
17311 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17313 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17314 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17315 (built_min, cp_tree_equal): Likewise.
17317 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17319 * class.c (layout_nonempty_base_or_field): Replace
17320 `record_layout_info' with `record_layout_info_s'.
17322 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
17325 * cp-tree.h (struct language_function): x_named_labels is now
17326 a struct named_label_list*.
17327 * decl.c (struct named_label_use_list): Renamed from...
17328 (struct named_label_list): ...this. New struct.
17329 (push_binding_level): Don't set eh_region.
17330 (note_level_for_eh): New fn.
17331 (pop_label): Take label and old value directly.
17332 (pop_labels): Adjust for new named_labels format.
17333 (lookup_label): Likewise.
17334 (poplevel): Note characteristics of a binding level containing a
17335 named label. Mess with named label lists earlier.
17336 (mark_named_label_lists): New fn.
17337 (mark_lang_function): Call it.
17338 (use_label): New fn, split out from...
17339 (make_label_decl): ...here. Don't call it.
17340 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17341 check_previous_gotos): New fns, split out from...
17342 (define_label): ...here.
17343 (check_switch_goto): New fn.
17344 (define_case_label): Call it.
17345 (check_goto): New fn.
17346 * semantics.c (finish_goto_stmt): Call it and use_label.
17347 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17348 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17350 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17352 * class.c (build_vtable_entry_ref): Correct usage of
17353 get_vtbl_decl_for_binfo.
17355 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17356 * method.c (implicitly_declare_fn): Not here.
17358 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
17360 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17361 (CPTI_PTMD_DESC_TYPE): ... here.
17362 (ptmd_desc_type_node): Rename to ...
17363 (ptm_desc_type_node): ... here.
17364 * decl.c: Likewise.
17365 * rtti.c (ptmd_initializer): Rename to ...
17366 (ptm_initializer): ... here.
17367 (sythesize_tinfo_var): Adjust. Deal with pointer to member
17369 (create_tinfo_types): Adjust.
17371 2000-05-25 Mark Mitchell <mark@codesourcery.com>
17373 Finish implementation of VTTs.
17374 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17375 CPTI_VTT_PARM_IDENTIFIER.
17376 (vtt_parm_identifier): New macro.
17377 (vtt_parm_type): Likewise.
17378 (BINFO_SUBVTT_INDEX): Likewise.
17379 (BINFO_VPTR_INDEX): Likewise.
17380 (struct lang_decl): Add vtt_parm.
17381 (DECL_VTT_PARM): New macro.
17382 (DECL_USE_VTT_PARM): Likewise.
17383 (DECL_NEEDS_VTT_PARM_P): Likewise.
17384 (get_vtt_name): Declare.
17385 (build_artificial_parm): Likewise.
17386 (fixup_all_virtual_upcast_offsets): Likewise.
17387 (expand_indirect_vtbls_init): Remove.
17388 * call.c (build_new_method_call): Pass the vtt to subobject
17389 constructors and destructors.
17390 * class.c (get_vtt_name): Give it external linkage.
17391 (build_clone): Handle the magic VTT parameters for clones.
17392 (clone_function_decl): Fix typo in comment.
17393 (build_vtt): Keep track of the indices in the VTTs where various
17394 entities are stored.
17395 (build_vtt_inits): Likewise.
17396 (dfs_build_vtt_inits): Likewise.
17397 (build_ctor_vtbl_group): Tweak type of construction vtables.
17398 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17399 primary bases, when building construction vtables.
17400 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17401 (initialize_predefined_identifiers): Add vtt_parm_identifier.
17402 (init_decl_processing): Initialize vtt_parm_type.
17403 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17404 (lang_mark_tree): Make vtt_parm.
17405 * decl2.c (build_artificial_parm): New function.
17406 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
17407 (grokclassfn): Use build_artificial_parm.
17408 * init.c (initialize_vtbl_ptrs): Call
17409 fixup_all_virtual_upcast_offsets directly.
17410 (perform_member_init): Use the complete subobject destructor for
17412 (build_vtbl_address): New function.
17413 (expand_virtual_init): Handle VTTs.
17414 * optimize (maybe_clone_body): Likewise.
17415 * search.c (fixup_all_virtual_upcast_offsets): Give it external
17417 (expand_indirect_vtbls_init): Remove.
17418 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17419 * tree.c (make_binfo): Make them bigger.
17421 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17423 * inc/cxxabi.h (__pbase_type_info): Define, based on
17424 __pointer_type_info.
17425 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17426 (__pointer_to_member_type_info): Likewise.
17427 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17428 (__pointer_to_member_type_info::__is_pointer_p): Remove.
17429 (__pointer_type_info::__do_catch): Rename to ...
17430 (__pbase_type_info::__do_catch): ... here. Adjust.
17431 (__pbase_type_info::__pointer_catch): Implement.
17432 (__pointer_type_info::__pointer_catch): Adjust.
17433 (__pointer_to_member_type_info::__pointer_catch): Adjust.
17435 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17437 * tinfo.h (__user_type_info::contained_virtual_p): New
17439 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17441 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17442 diamond shaped hierarchy. Add early out for mixed diamond and
17443 duplicate shaped hierarchy.
17445 2000-05-24 Mark Mitchell <mark@codesourcery.com>
17447 * cp-tree.h (build_delete): Change prototype.
17448 (build_vec_delete): Likewise.
17449 * call.c (build_scoped_method_call): Use special_function_kind
17450 values to indicate the kind of destruction to be done.
17451 (build_method_call): Likewise.
17452 * decl.c (finish_destructor_body): Likewise.
17453 (maybe_build_cleanup_1): Likewise. Rename to ...
17454 (maybe_build_cleanup): ... this.
17455 * decl2.c (delete_sanity): Use special_function_kind
17456 values to indicate the kind of destruction to be done.
17457 (build_cleanup): Likewise.
17458 * init.c (perform_member_init): Likewise.
17459 (build_vec_delete_1): Likewise.
17460 (build_dtor_call): Simplify.
17461 (build_delete): Use special_function_kind
17462 values to indicate the kind of destruction to be done.
17463 (build_vbase_delete): Likewise.
17464 (build_vec_delete): Likewise.
17466 * init.c (sort_member_init): Fix typo in error message generation
17469 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
17471 * semantics.c (begin_class_definition): make the packed
17472 attribute be sensitive to the "-fpack-struct" command line flag
17474 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
17476 Update new-abi upcast algorithm.
17477 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17478 prototype and meaning of return value.
17479 (__si_class_type_info::__do_upcast): Likewise.
17480 (__vmi_class_type_info::__do_upcast): Likewise.
17481 * tinfo.cc (__class_type_info::__upcast_result): Replace
17482 whole2dst with part2dst. Adjust ctor.
17483 (__class_type_info::__do_upcast): Adjust call of worker function.
17484 (__class_type_info::__do_upcast): Adjust.
17485 (__si_class_type_info::__do_upcast): Adjust. Use parent's
17487 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17488 virtual base in diamond hierarchy bug.
17490 2000-05-23 Mark Mitchell <mark@codesourcery.com>
17492 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17493 and bitfield to tinfo_fn_p.
17494 (DECL_TINFO_FN_P): Adjust.
17495 (SET_DECL_TINFO_FN_P): Likewise.
17496 (DECL_MUTABLE_P): Likewise.
17497 (DECL_C_BIT_FIELD): Likewise.
17498 (SET_DECL_C_BIT_FIELD): Likewise.
17499 (CLEAR_DECL_C_BIT_FIELD): Likewise.
17500 (DECL_UNINLINABLE): Likewise.
17501 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17502 (handle_using_decl): Remove assertion.
17503 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17504 to build FIELD_DECLs.
17505 (build_base_field): Likewise.
17506 (layout_class_type): Likewise.
17507 * decl.c (init_decl_processing): Likewise.
17508 (build_ptrmemfunc_type): Likewise.
17509 (grokdeclarator): Likewise.
17510 * decl2.c (grok_x_components): Likewise.
17511 * except.c (call_eh_info): Likewise.
17512 * init.c (init_init_processing): Likewise.
17513 * rtti.c (expand_class_desc): Likewise.
17514 (create_pseudo_type_info): Likewise.
17515 (get_vmi_pseudo_type_info): Likewise.
17516 (create_tinfo_types): Likewise.
17517 * ptree.c (print_lang_decl): Adjust.
17518 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17519 before checking DECL_MUTABLE_P.
17521 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17522 parameters for template functions.
17523 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17524 destructors as well as constructors.
17526 2000-05-22 Mark Mitchell <mark@codesourcery.com>
17528 * class.c (build_ctor_vtbl_group): Set inits.
17529 * optimize.c (maybe_clone_body): Set DECL_INLINE and
17530 DECL_THIS_INLINE appropriately for clones.
17532 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17533 (DECL_CONV_FN_P): Simplify.
17534 (DECL_OPERATOR): Remove.
17535 (language_to_string): Declare.
17536 * decl.c (duplicate_decls): Fix typo in comment.
17537 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17538 (grok_op_properties): Use DECL_CONV_FN_P instead of
17539 IDENTIFIER_TYPENAME_P.
17540 * dump.c (dequeue_and_dump): Dump the language linkage of
17542 * error.c (language_to_string): Give it external linkage.
17543 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17544 (implicitly_declare_fn): Set DECL_LANGUAGE.
17545 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17546 IDENTIFIER_TYPENAME_P.
17547 (tsubst_decl): Likewise.
17548 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17549 * semantics.c (finish_member_declaration): Don't mark members of
17550 classes declared in an extern "C" region as extern "C".
17552 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17554 * decl2.c (qualified_lookup_using_namespace): Look through
17557 * decl.c (push_using_decl): Return the old decl on namespace level.
17559 2000-05-21 Mark Mitchell <mark@codesourcery.com>
17561 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17562 (VTT_NAME_PREFIX): New macro.
17563 (CTOR_VTBL_NAME_PREFIX): Likewise.
17564 (get_ctor_vtbl_name): New function.
17565 * class.c (get_vtable_name): Simplify.
17566 (get_vtt_name): New function.
17567 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17568 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17569 when a virtual base becomes primary.
17570 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
17572 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17573 additional parameters.
17574 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17575 (initialize_array): New function.
17576 (build_vtt): Likewise.
17577 (build_vtt_inits): Likewise.
17578 (dfs_build_vtt_inits): Likewise.
17579 (dfs_fixup_binfo_vtbls): Likewise.
17580 (build_ctor_vtbl_group): Likewise.
17581 (initialize_vtable): Use initialize_array.
17582 (accumulate_vtbl_inits): Reimplement to handle construction
17584 (dfs_accumulate_vtbl_inits): Likewise.
17585 (bulid_vtbl_initializer): Adjust parameter name.
17586 * method.c (build_typename_overload): Remove #if 0'd code.
17587 (get_ctor_vtbl_name): New function.
17588 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17589 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17591 * cp-tree.h (struct lang_type): Remove search_slot.
17592 (CLASSTYPE_SEARCH_SLOT): Remove.
17593 (emit_base_init): Change prototype.
17594 (initialize_vtbl_ptrs): Likewise.
17595 (expand_indirect_vtbls_init): Likewise.
17596 (clear_search_slots): Remove.
17597 * decl.c (lang_mark_tree): Don't mark search_slot.
17598 * init.c (initialize_vtbl_ptrs): Simplify.
17599 (emit_base_init): Likewise.
17600 * search.c (struct vbase_info): Document decl_ptr.
17601 (convert_pointer_to_single_level): Remove.
17602 (dfs_find_vbases): Remove.
17603 (dfs_init_base_pointers): Simplify.
17604 (dfs_clear_vbase_slots): Remove.
17605 (dfs_vtable_path_unmark): New function.
17606 (init_vbase_pointers): Simplify.
17607 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17608 (expand_indirect_vtbls_init): Simplify. Don't call
17609 mark_all_temps_used.
17610 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17611 initialize_vtbl_ptrs.
17613 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
17615 * except.c: Add static prototypes.
17617 2000-05-20 H.J. Lu <hjl@gnu.org>
17619 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17621 2000-05-19 Mark Mitchell <mark@codesourcery.com>
17623 Don't create a separate copy of virtual bases for the
17624 CLASSTYPE_VBASECLASSES list.
17625 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17626 (BINFO_FOR_VBASE): Remove.
17627 (CANONICAL_BINFO): Adjust.
17628 (binfo_for_vbase): New function.
17629 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17630 instead of BINFO_FOR_VBASE.
17631 (build_vbase_pointer): Likewise.
17632 (build_secondary_vtable): Likewise.
17633 (dfs_mark_primary_bases): Likewise.
17634 (mark_primary_bases): Likewise.
17635 (layout_nonempty_base_or_field): Likewise.
17636 (dfs_set_offset_for_shared_vbases): Likewise.
17637 (dfs_set_offset_for_unshared_vbases): Likewise.
17638 (layout_virtual_bases): Likewise. Adjust for changes to the
17639 CLASSTYPE_VBASECLASSES list.
17640 (dump_class_hierarchy_r): Use binfo_for_vbase
17641 instead of BINFO_FOR_VBASE.
17642 (dump_class_hierarchy): Likewise.
17643 (finish_vtbls): Likewise.
17644 (build_vtbl_initializer): Adjust for changes to the
17645 CLASSTYPE_VBASECLASSES list.
17646 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17647 * decl.c (finish_destructor_body): Adjust for changes to the
17648 CLASSTYPE_VBASECLASSES list.
17649 * init.c (sort_base_init): Use binfo_for_vbase.
17650 (construct_virtual_bases): Adjust for changes to the
17651 CLASSTYPE_VBASECLASSES list.
17652 (expand_member_init): Use binfo_for_vbase.
17653 (build_vbase_delete): Adjust for changes to the
17654 CLASSTYPE_VBASECLASSES list.
17655 * method.c (do_build_copy_constructor): Likewise.
17656 * rtti.c (get_base_offset): Use binfo_for_vbase.
17657 (expand_class_desc): Remove #if 0'd code.
17658 * search.c (struct vbase_info): Remove vbase_types.
17659 (get_base_distance): Use binfo_for_vbase.
17660 (lookup_field_queue_p): Use CANONICAL_BINFO.
17661 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17662 (get_pure_virtuals): Adjust for changes to the
17663 CLASSTYPE_VBASECLASSES list.
17664 (dfs_find_vbases): Use binfo_for_vbase.
17665 (dfs_init_vbase_pointers): Likewise.
17666 (init_vbase_pointers): Don't initialize vi.vbase_types.
17667 (virtual_context): Use binfo_for_vbase.
17668 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17669 CLASSTYPE_VBASECLASSES list.
17670 (expand_indirect_vtbls_init): Simplify.
17671 (dfs_get_vbase_types): Don't replicate virtual bases.
17672 (find_vbase_instance): Use binfo_for_vbase.
17673 (binfo_for_vbase): New function.
17674 * typeck.c (get_delta_difference): Use binfo_for_vbase.
17676 2000-05-17 Mark Mitchell <mark@codesourcery.com>
17678 * decl2.c (finish_anon_union): Generalize error messages to handle
17679 anonymous structures.
17680 * init.c (perform_member_init): Remove `name' parameter.
17681 (build_field_list): New function.
17682 (sort_member_init): Handle anonymous union initialization order
17683 correctly. Check for multiple initializations of the same union.
17684 (emit_base_init): Don't look up fields by name here.
17685 (expand_member_init): Record the result of name lookup for future
17687 * typeck.c (build_component_ref): Fix formatting.
17689 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
17691 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17692 * typeck.c (build_x_compound_expr): Replace warn_unused with
17695 * decl2.c (lang_decode_option): Update -Wall unused flags by
17696 calling set_Wunused.
17698 2000-05-16 Mark Mitchell <mark@codesourcery.com>
17700 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17701 * init.c (dfs_vtable_path_unmark): Remove.
17702 * search.c (marked_new_vtable_p): Likewise.
17703 (unmarked_new_vtable_p): Likewise.
17704 (dfs_search_slot_nonempty_p): Likewise.
17705 (dfs_mark): Likewise.
17706 (dfs_vtable_path_unmark): Likewise.
17707 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17708 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17709 (dfs_init_vbase_pointers): Remove special-case new ABI code.
17710 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17711 (init_vbase_pointers): Simplify.
17712 (expand_indirect_vtbls_init): Likewise.
17714 * class.c (copy_virtuals): New function.
17715 (build_primary_table): Use it.
17716 (build_secondary_vtable): Likewise.
17717 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17718 indicate that no vcall offset is required.
17719 (add_virtual_function): Likewise.
17720 (modify_all_vtables): Likewise.
17721 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17722 (dfs_accumulate_vtbl_inits): Likewise.
17723 (build_vtbl_initializer): Make changes to handle construction
17725 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17726 (build_rtti_vtbl_entries): Likewise.
17727 (build_vtable_entries): Handle a NULL vcall_index.
17729 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
17731 * decl2.c (lang_decode_option): Fix thinko.
17733 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
17735 * except.c (check_handlers): New fn.
17736 * cp-tree.h: Declare it.
17737 * semantics.c (finish_handler_sequence): Call it.
17738 (finish_function_handler_sequence): Likewise.
17739 (finish_handler_parms): Set TREE_TYPE on the handler.
17740 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17741 * search.c (get_base_distance_recursive): If protect>1, ignore
17743 (get_base_distance): Don't reduce watch_access.
17745 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
17747 * lex.c: #include diagnostic.h.
17748 (lang_init_options): Set default prefixing rules.
17750 * lang-options.h: Add -fdiagnostics-show-location=.
17752 * decl2.c: #include diagnostic.h.
17753 (lang_decode_option): Handle -fdiagnostics-show-location=.
17755 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
17757 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17758 * vec.cc: Revert my 2000-05-07 change.
17760 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
17762 * class.c (check_field_decls): Complain about non-static data
17763 members with same name as class in class with constructor.
17765 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
17767 * decl.c (grokdeclarator): Allow non-static data members with
17768 same name as class.
17770 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
17772 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17773 and pending_inline.filename. Update prototypes.
17774 * decl.c (define_label): Constify filename parameter.
17775 * decl2.c (warn_if_unknown_interface): Constify local char *.
17776 * input.c Constify input_source.filename. Don't declare
17777 input_filename or lineno. Constify filename parameter to feed_input.
17778 * lex.c (init_parse): Constify parameter and return value.
17779 (cp_pragma_interface, cp_pragma_implementation): Constify
17781 (reinit_parse_for_method, reinit_parse_for_block,
17782 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17783 Constify local char *.
17784 * pt.c: Don't declare lineno or input_filename.
17785 (print_template_context, tsubst_friend_function, tsubst_decl,
17786 tsubst, instantiate_decl): Constify local char *.
17787 * semantics.c (expand_body): Constify local char *.
17788 * tree.c (build_srcloc): Constify filename parameter.
17789 * typeck.c (c_expand_asm_operands): Constify filename
17792 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
17794 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17795 offsetof expansion.
17797 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
17799 * inc/cxxabi.h: Fix typos in comment.
17800 (__base_class_info::__offset): Use a static_cast.
17802 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
17804 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17805 of std::size_t and std::ptrdiff_t respectively.
17806 * tinfo.cc: Likewise.
17807 * vec.cc: Likewise.
17809 2000-05-06 Richard Henderson <rth@cygnus.com>
17811 * typeck.c (build_c_cast): Don't warn integer->pointer size
17812 mismatch for constants.
17814 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
17816 * rtti.c (ptmd_initializer): Set non-public, if class is
17819 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17820 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17821 __cxa_vec_delete): Likewise.
17822 * tinfo.cc (__dynamic_cast): Likewise.
17823 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17824 __cxa_vec_delete): Likewise.
17826 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17828 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17829 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17830 (lang_decl_flags): Add vcall_offset.
17831 (THUNK_VCALL_OFFSET): Use it.
17832 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17833 * method.c (make_thunk): Create the lang_decl here, not in
17835 (emit_thunk): Make generic thunks into ordinary functions once
17836 they have been fed to expand_body.
17837 * semantics.c (expand_body): Set current_function_is_thunk here.
17839 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17841 * class.c (update_vtable_entry_for_fn): Prototype.
17843 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17846 * search.c (dfs_build_inheritance_graph_order): Prototype.
17848 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17850 * cp-tree.h (special_function_kind): Add various kinds of
17852 (special_function_p): New function.
17853 * class.c (overrides): Don't let one kind of destructor override
17855 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17856 whether or not to instantiate a template.
17857 * tree.c (special_function_p): Define.
17859 2000-05-03 Mark Mitchell <mark@codesourcery.com>
17861 * cp-tree.def (THUNK_DECL): Remove.
17862 * cp-tree.h (DECL_THUNK_P): New macro.
17863 (DECL_NON_THUNK_FUNCTION_P): Likewise.
17864 (DECL_EXTERN_C_FUNCTION_P): Likewise.
17865 (SET_DECL_THUNK_P): Likewise.
17866 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17867 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17868 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17869 * decl.c (decls_match): Use DECL_EXTERN_C_P.
17870 (duplicate_decls): Likewise.
17871 (pushdecl): Likewise. Adjust thunk handling.
17872 (grokfndecl): Use DECL_EXTERN_C_P.
17873 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17874 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17875 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17876 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17877 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
17878 DECL_NO_STATIC_CHAIN.
17879 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
17880 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17881 * search.c (covariant_return_p): Remove THUNK_DECL handling.
17884 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17886 * tree.c (walk_tree): Set lineno.
17888 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17890 * exception.cc: Update license notice.
17891 * new.cc: Likewise.
17892 * new1.cc: Likewise.
17893 * new2.cc: Likewise.
17894 * tinfo.cc: Likewise.
17895 * tinfo2.cc: Likewise.
17896 * vec.cc: Likewise.
17897 * inc/cxxabi.h: Likewise.
17898 * inc/exception: Likewise.
17899 * inc/new: Likewise.
17900 * inc/new.h: Likewise.
17901 * inc/typeinfo: Likewise.
17903 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17905 * tree.c (build_target_expr_with_type): If we already have a
17906 TARGET_EXPR, just return it.
17908 * optimize.c (initialize_inlined_parameters): Don't generate an
17909 EXPR_STMT if we can just use DECL_INITIAL.
17910 * decl.c (emit_local_var): Only make the initialization a
17911 full-expression if stmts_are_full_exprs_p.
17913 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17915 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17917 * call.c (standard_conversion): Use it.
17918 (direct_reference_binding): Likewise.
17919 (build_over_call): Likewise.
17920 (is_properly_derived_from): Likewise.
17921 (compare_ics): Likewise.
17922 * class.c (resolves_to_fixed_type_p): Likewise.
17923 * optimize.c (declare_return_variable): Likewise.
17924 * pt.c (is_specialization_of): Likewise.
17926 * typeck.c (comp_target_parms): Likeiwse.
17927 (build_static_cast): Likewise.
17928 (build_reinterpret_cast): Likewise.
17929 (build_const_cast): Likewise.
17930 (comp_ptr_ttypes_real): Likewise.
17931 (comp_ptr_ttypes_const): Likewise.
17932 * typeck2.c (process_init_constructor): Likewise.
17934 2000-04-30 Scott Snyder <snyder@fnal.gov>
17936 * decl.c (finish_destructor_body): Use the base destructor when
17937 destroying virtual bases.
17939 2000-04-30 Mark Mitchell <mark@codesourcery.com>
17941 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17943 * optimize.c (struct inline_data): Add target_exprs field.
17944 (declare_return_variable): When a function returns an aggregate,
17945 use the variable declared in the TARGET_EXPR as the remapped
17947 (expand_call_inline): Update the pending target_exprs stack.
17948 (optimize_function): Initialize the stack.
17950 * decl2.c (finish_file): Fix typo in comment.
17952 * method.c (emit_thunk): Don't try to return a `void' value.
17954 * optimize.c (initialize_inlined_parameters): If the parameter is
17955 addressable, we need to make a new VAR_DECL, even if the
17956 initializer is constant.
17958 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
17960 * decl.c (grok_op_properties): Add an extra check of argtypes.
17962 2000-04-27 Mark Mitchell <mark@codesourcery.com>
17964 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17966 (initialize_inlined_parameters): Try to avoid creating new
17969 2000-04-27 Alex Samuel <samuel@codesourcery.com>
17971 * lex.c (my_get_run_time): Remove.
17972 (init_filename_times): Use get_run_time instead of my_get_run_time.
17973 (check_newline): Likewise.
17974 (dump_time_statistics): Likewise.
17975 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17976 of computing elapsed time explicitly.
17978 2000-04-26 Mark Mitchell <mark@codesourcery.com>
17980 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17981 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17982 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17983 before calling decl_constant_value.
17984 * class.c (check_bitfield_decl): Likewise.
17985 * cvt.c (ocp_convert): Likewise.
17986 (convert): Likewise.
17987 * decl.c (compute_array_index_type): Likewise.
17988 (build_enumerator): Likewise.
17989 * decl2.c (check_cp_case_value): Likewise.
17990 * pt.c (convert_nontype_argument): Likewise.
17991 (tsubst): Likewise.
17992 * typeck.c (decay_conversion): Likewise.
17993 (build_compound_expr): Likewise.
17994 (build_reinterpret_cast): Likewise.
17995 (build_c_cast): Likewise.
17996 (convert_for_assignment): Likewise.
17998 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
18000 * decl.c (finish_function): Don't play games with DECL_INLINE.
18002 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
18004 * ir.texi: Correct typo.
18006 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18008 * decl.c (grokdeclarator): Reject VLAs as members.
18010 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
18012 * call.c (standard_conversion): Accept conversion between
18015 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18017 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
18019 * decl2.c (finish_file): Remove double setup for accounting
18022 2000-04-24 Robert Lipe <robertlipe@usa.net>
18024 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18026 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
18028 * new.cc (set_new_handler): Needs to be in std::.
18030 2000-04-23 Mark Mitchell <mark@codesourcery.com>
18032 * cp-tree.h (lang_decl): Remove pretty_function_p.
18033 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18034 language-specific node.
18035 * decl.c (cp_make_fname_decl): Use build_decl, not
18036 build_lang_decl, to build the variables.
18037 (grokvardecl): Don't call build_lang_decl for local variables in
18039 (grokdeclarator): Don't call build_lang_decl for local type
18040 declarations in templates.
18041 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18042 zero'd memory, rather than calling memset.
18043 * pt.c: Include hashtab.h.
18044 (local_specializations): New variable.
18045 (retrieve_local_specialization): Use it.
18046 (register_local_specialization): Likewise.
18047 (tsubst_decl): Don't assume local variables have
18048 DECL_LANG_SPECIFIC.
18049 (instantiate_decl): Set up local_specializations.
18050 * Makefile.in (HTAB_H): New variable.
18052 2000-04-23 Richard Henderson <rth@cygnus.com>
18054 * typeck.c (c_expand_asm_operands): Restore the original
18055 contents of the output list.
18057 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
18059 * ir.texi: Document complex number representation.
18061 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
18063 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18064 (target_incomplete_p): New function.
18065 (tinfo_base_init): Create comdat NTBS name variable.
18066 (ptr_initializer): Add non_public parameter. Calculate it.
18067 (ptmd_initializer): Likewise.
18068 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18069 (create_real_tinfo_var): Add non_public parameter. Use it.
18070 Push proxy into global namespace.
18071 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18073 * inc/typeinfo (type_info::before, type_info::operator==):
18074 Compare __name addresses.
18076 * tinfo2.cc: Remove new-abi builtins comment.
18078 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
18080 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18082 * call.c (joust): Exit early if we get the same function, too.
18084 * decl2.c (key_method): Return NULL_TREE for template classes.
18085 (import_export_class): Don't need to check for template classes.
18087 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
18089 * lex.c: Remove references to cccp.c.
18091 2000-04-18 Mark Mitchell <mark@codesourcery.com>
18093 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18094 volatile_memfunc. Add destructor_attr. Adjust dummy.
18095 (DECL_DESTRUCTOR_P): Use destructor_attr.
18096 (DECL_CONST_MEMFUNC_P): Reimplement.
18097 (DECL_VOLATILE_MEMFUNC_P): Remove.
18098 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18099 (overrides): Use DECL_DESTRUCTOR_P.
18100 (check_for_override): Likewise.
18101 * decl.c (start_function): Likewise.
18102 * decl2.c (grokfclassfn): Likewise.
18103 (check_classfn): Likewise.
18104 (grok_function_init): Likewise.
18106 2000-04-17 Mark Mitchell <mark@codesourcery.com>
18108 * decl2.c (grokfield): Issue error on illegal data member
18111 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
18113 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18115 2000-04-16 Mark Mitchell <mark@codesourcery.com>
18117 * class.c (build_vtable_entry): Don't build thunks for type-info
18120 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
18122 * decl.c (decls_match): Allow a redeclaration of a builtin to
18123 specify args while the builtin did not.
18125 2000-04-15 Mark Mitchell <mark@codesourcery.com>
18127 * cp-tree.def (THUNK_DECL): Add to documentation.
18128 * cp-tree.h (flag_huge_objects): Declare.
18129 * class.c (modify_vtable_entry): Tidy.
18130 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18131 Calculate delta appropriately for the new ABI.
18132 (dfs_modify_vtables): Use it.
18133 (modify_all_vtables): Fix thinko in code to add overriding copies
18134 of functions to primary vtables.
18135 (build_clone): Fix typo in comment.
18136 (clone_function_decl): Correct order of destructors in vtable.
18137 (build_vbase_offset_vtbl_entries): Adjust comment.
18138 (dfs_vcall_offset_queue_p): Remove.
18139 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18140 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18141 (build_vtable_entry): Correct check for pure virtual functions.
18142 Don't declare flag_huge_objects.
18143 * decl.c (flag_huge_objects): Remove declaration.
18144 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18145 Use int_size_in_bytes.
18146 (emit_thunk): Handle vcall offset thunks.
18148 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18150 * decl2.c (parse_time, varconst_time): Delete declarations.
18151 (finish_file): Delete LINENO declaration.
18152 START_TIME and THIS_TIME now long.
18154 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
18156 * class.c (build_base_field): Reformat comment.
18158 * inc/cxxabi.h (stddef.h): Comment inclusion.
18159 (__base_class_info::__offset): Comment shift.
18161 2000-04-12 Mark Mitchell <mark@codesourcery.com>
18163 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18164 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18165 (cp_push_exception_identifier): New macro.
18166 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18167 (DECL_BASE_DESTRUCTOR_P): Likewise.
18168 (DECL_DELETING_DESTRUCTOR_P): Likewise.
18169 (get_vtbl_decl_for_binfo): Fix formatting.
18170 (in_charge_arg_for_name): New macro.
18171 (maybe_build_cleanup_and_delete): Remove declaration.
18172 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18173 (in_charge_arg_for_name): New function.
18174 (build_new_method_call): Use it. Handle cloned destructors.
18175 (build_clone): Don't make the base constructor virtual.
18176 Automatically defer generated functions.
18177 (clone_function_decl): Handle destructors, too.
18178 (clone_constructors_and_destructors): Likewise.
18179 (create_vtable_ptr): Don't create a vtable entry for a cloned
18181 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18182 (initialize_predefined_identifiers): Update appropriately.
18183 (finish_destructor_body): Simplify.
18184 (maybe_build_cleanup_and_delete): Remove.
18185 * except.c (expand_throw): Handle new-ABI destructors.
18186 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18187 (build_dtor_call): New function.
18188 (build_delete): Use it. Simplify.
18189 * optimize.c (maybe_clone_body): Handle destructors.
18190 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18192 * exception.cc (cleanup_fn): New typedef.
18193 (CALL_CLEANUP): New macro.
18194 (cp_eh_info): Use them.
18195 (__cp_push_exception): Likewise.
18196 (__cp_pop_exception): Likewise.
18198 2000-04-11 Mark Mitchell <mark@codesourcery.com>
18200 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18201 (complete_dtor_identifier): New macro.
18202 (CLASSTYPE_FIRST_CONVERSION): Remove.
18203 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18204 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18205 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18206 (CLASSTYPE_CONSTRUCTORS): Likewise.
18207 (CLASSTYPE_DESTRUCTORS): Likewise.
18208 (lang_decl): Add cloned_function.
18209 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18210 (DECL_BASE_CONSTRUCTOR_P): Likewise.
18211 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18212 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18213 (DECL_CLONED_FUNCTION_P): Likewise.
18214 (DECL_CLONED_FUNCTION): Likewise.
18215 (clone_function_decl): Declare.
18216 (maybe_clone_body): Likewise.
18217 * call.c (build_user_type_conversion_1): Call complete object
18218 constructors in the new ABI.
18219 (build_new_method_call): Don't add in-charge parameters under the
18221 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18222 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18223 CLASSTYPE_DESTRUCTOR_SLOT.
18224 (build_clone): New function.
18225 (clone_function_decl): Likewise.
18226 (clone_constructors_and_destructors): Likewise.
18227 (check_bases_and_members): Use it.
18228 * decl.c (iniitialize_predefined_identifiers): Initialize
18229 complete_dtor_identifier.
18230 (finish_function): Don't add extra code to a clone.
18231 (lang_mark_tree): Mark cloned_function.
18232 * decl2.c (mark_used): Don't bother trying to instantiate things
18234 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18235 * method.c (set_mangled_name_for_decl): Don't treat clones as
18237 (synthesize_method): Sythesize cloned functions, not the clones.
18238 * optimize.c (inline_data): Update comment on ret_label.
18239 (remap_block): Don't assume DECL_INITIAL exists.
18240 (copy_body_r): Allow ret_label to be NULL.
18241 (maybe_clone_body): Define.
18242 * pt.c (tsubst_decl): Handle clones.
18243 (instantiate_clone): New function.
18244 (instantiate_template): Use it.
18245 (set_mangled_name_for_template_decl): Don't treat clones as
18247 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18248 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18249 * semantics.c (expand_body): Clone function bodies as necessary.
18251 * optimize.c (remap_decl): Avoid sharing structure for arrays
18252 whose size is only known at run-time.
18253 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18255 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18256 to has_in_charge_parm_p.
18257 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18258 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18259 (DECL_COPY_CONSTRUCTOR_P): New macro.
18260 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18261 (build_user_type_conversion_1): Likewise.
18262 (convert_like_real): Likewise.
18263 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
18264 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18265 (copy_args_p): Likewise.
18266 (grok_ctor_properties): Likewise.
18267 (start_function): Likewise.
18268 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
18269 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18270 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18271 * method.c (do_build_copy_constructor): Use
18272 DECL_HAS_IN_CHARGE_PARM_P.
18273 (synthesize_method): Likewise.
18274 * pt.c (instantiate_template): Remove goto.
18275 * tree.c (build_cplus_method_type): Remove mention of obstacks in
18278 * cp-tre.h (finish_function): Change prototype.
18279 * decl.c (end_cleanup_fn): Adjust caller.
18280 (finish_function): Take only one parameter.
18281 * decl2.c (finish_objects): Adjust caller.
18282 (finish_static_storage_duration_function): Likewise.
18283 * method.c (emit_thunk): Likewise.
18284 * parse.y: Likewise.
18285 * parse.c: Regenerated.
18286 * pt.c (instantiate_decl): Likewise.
18287 * rtti.c (synthesize_tinfo_fn): Likewise.
18288 * semantics.c (expand_body): Likewise.
18290 * cp-tree.h (copy_decl): New function.
18291 * class.c (finish_struct_1): Use it.
18292 * lex.c (copy_decl): Define it.
18293 * pt.c (tsubst_decl): Likewise.
18294 * tree.c (copy_template_template_parm): Likewise.
18296 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18297 has_nonpublic_assign_ref.
18298 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18299 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18300 * class.c (finish_struct_methods): Don't set
18301 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18302 (interface_only): Don't declare.
18303 (interface_unknown): Likewise.
18305 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18307 * tree.h (HAVE_TEMPLATES): Remove definition.
18308 * lang-options.h (-fthis-is-variable): Remove documentation.
18310 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
18312 * class.c (instantiate_type): Handle object-relative template-id.
18314 * semantics.c (finish_expr_stmt): Call convert_to_void here.
18315 * decl.c (cplus_expand_expr_stmt): Not here.
18317 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18318 Initialize exprtype earlier.
18320 * parse.y (fn.def1): Check for defining types in return types.
18322 * decl.c (check_tag_decl): Notice extra fundamental types.
18323 Diagnose empty decls in classes, too.
18325 * decl.c (grokdeclarator): Don't override an anonymous name if no
18326 declarator was given.
18328 * cvt.c (convert_to_void): Call resolve_offset_ref.
18330 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18332 * decl2.c (decl_namespace): Handle getting a type.
18334 * typeck.c (build_c_cast): Re-enable warning for cast between
18335 pointer and integer of different size.
18337 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
18339 * inc/cxxabi.h (__pointer_type_info): Add restrict and
18341 (__pointer_type_info::__pointer_catch): New virtual function.
18342 (__pointer_to_member_type_info): Derive from
18343 __pointer_type_info. Adjust.
18344 (__pointer_to_member_type_info::__do_catch): Remove.
18345 (__pointer_to_member_type_info::__is_pointer_p): Declare.
18346 (__pointer_to_member_type_info::__pointer_catch): Declare.
18347 * rtti.c (qualifier_flags): Add restrict flag.
18348 (ptmd_initializer): Reorder members.
18349 (create_tinfo_types): Expand comments. Reorder
18350 ptmd_desc_type_node members.
18351 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18353 (__pointer_type_info::__do_catch): Move specific code into
18354 __pointer_catch. Call it.
18355 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18356 specific catch checking. Fix void conversion check.
18357 (__pointer_to_member_type_info::__do_catch): Remove.
18358 (__pointer_to_member_type_info::__pointer_catch): Implement.
18360 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18362 * lex.c (init_parse): Remove traces of classof and headof.
18363 * decl2.c (flag_operator_names): Default to 1.
18364 (lang_decode_option): Do not set it for -ansi.
18366 2000-04-09 Mark Mitchell <mark@codesourcery.com>
18368 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18369 (DECL_MAIN_VARIANT): Remove.
18370 * decl.c (duplicate_decls): Don't set it.
18371 (start_function): Likewise.
18372 (lang_mark_tree): Don't mark it.
18373 * decl2.c (defer_fn): Don't use it.
18374 * lex.c (retrofit_lang_decl): Don't set it.
18375 * pt.c (tsubst_decl): Likewise.
18376 * ptree.c (print_lang_decl): Don't print it.
18377 * typeck.c (mark_addressable): Don't use it.
18379 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18381 * vec.cc: Include <new> and <exception>.
18382 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18383 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18385 (__cxa_vec_delete): Catch dtor exceptions.
18387 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18389 Prepend __ to implementation defined names.
18390 * inc/typeinfo (type_info): Rename _name to __name.
18391 (type_info::type_info): Rename parameter.
18392 (type_info::operator==, type_info::operator!=,
18393 type_info::before): Likewise.
18394 (type_info::is_pointer_p, type_info::is_function_p,
18395 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18398 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18399 (__pointer_type_info::__pointer_type_info): Likewise.
18400 (__pointer_type_info::is_pointer_p,
18401 __pointer_type_info::do_catch): Prepend __. Rename parameters.
18402 (__array_type_info::__array_type_info): Rename parameters.
18403 (__function_type_info::__function_type_info): Likewise.
18404 (__function_type_info::is_function_p): Prepend __.
18405 (__enum_type_info::__enum_type_info): Rename parameters.
18406 (__pointer_to_member_type_info::__pointer_to_member_type_info):
18408 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18410 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18411 (__class_type_info::__class_type_info): Rename parameters.
18412 (__class_type_info::sub_kind): Prepend __. Adjust member names.
18413 (__class_type_info::upcast_result,
18414 __class_type_info::dyncast_result): Prepend __. Move definition
18416 (__class_type_info::do_upcast, __class_type_info::do_catch,
18417 __class_type_info::find_public_src,
18418 __class_type_info::do_dyncast,
18419 __class_type_info::do_find_public_src): Prepend __. Rename
18421 (__si_class_type_info::__si_class_type_info): Rename parameters.
18422 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18423 __si_class_type_info::do_find_public_src): Prepent __. Rename
18425 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18426 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18427 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18429 (__dynamic_cast): Rename parameters.
18430 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18431 type_info::do_catch, type_info::do_upcast): Prepend __.
18432 (contained_p, public_p, virtual_p, contained_public_p,
18433 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18434 (__class_type_info::do_catch,
18435 __class_type_info::do_upcast): Prepend __. Adjust.
18436 (__class_type_info::__upcast_result,
18437 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18439 (__class_type_info::find_public_src): Prepend __. Adjust.
18440 (__class_type_info::do_find_public_src,
18441 __si_class_type_info::do_find_public_src,
18442 __vmi_class_type_info::do_find_public_src): Likewise.
18443 (__class_type_info::do_dyncast,
18444 __si_class_type_info::do_dyncast,
18445 __vmi_class_type_info::do_dyncast): Likewise.
18446 (__class_type_info::do_upcast,
18447 __si_class_type_info::do_upcast,
18448 __vmi_class_type_info::do_upcast): Likewise.
18449 (__dynamic_cast): Adjust.
18450 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18451 (__function_type_info::is_function_p): Likewise.
18452 (__pointer_type_info::do_catch): Likewise. Adjust.
18453 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18454 (__throw_type_match_rtti_2): Adjust.
18455 (__is_pointer): Adjust.
18457 2000-04-08 Mark Mitchell <mark@codesourcery.com>
18459 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18460 (complete_ctor_identifier): New macro.
18461 (special_function_kind): Add sfk_copy_constructor and
18462 sfk_assignment_operator.
18463 (LOOKUP_HAS_IN_CHARGE): Remove.
18464 (cons_up_default_function): Rename to ...
18465 (implicitly_declare_fn): ... this.
18466 * call.c (build_new_method_call): Add in-charge parameters for
18468 * class.c (add_implicitly_declared_members): Change parameter name
18469 from cant_have_assignment to cant_have_const_assignment.
18470 Replace calls to cons_up_default_function to implicitly_declare_fn.
18471 * cvt.c (ocp_convert): Use complete_ctor_identifier.
18472 * decl.c (initialize_predefined_identifiers): Initialize it.
18473 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18474 complex expression.
18475 * init.c (expand_default_init): Don't calculate the in-charge
18477 (build_new_1): Likewise.
18478 * lex.c (cons_up_default_function): Move to method.c.
18479 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18480 (implicitly_declare_fn): New function.
18481 * typeck.c (build_static_cast): Use complete_ctor_identifier.
18482 (build_modify_expr): Likewise.
18483 * typeck2.c (build_functional_cast): Likewise.
18485 Under the new ABI, constructors don't return `this'.
18486 * cp-tree.h (warn_reorder): Declare.
18487 (special_function_kind): New enum.
18488 (global_base_init_list): Remove declaration.
18489 (emit_base_init): Don't return a value.
18490 (check_base_init): Don't declare.
18491 (is_aggr_typedef): Likewise.
18492 * decl.c (check_special_function_return_type): New function.
18493 (return_types): Remove.
18494 (grokdeclarator): Use check_special_function_return_type.
18495 (start_function): Don't initialize ctor_label under the new ABI.
18496 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18497 * init.c (begin_init_stmts): Move to top of file.
18498 (finish_init_stmts): Likewise.
18499 (warn_reorder): Don't declare.
18500 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
18502 (check_base_init): Remove.
18503 (is_aggr_typedef): Likewise.
18504 (build_new_1): Don't use the return value of a constructor.
18505 * semantics.c (setup_vtbl_ptr): Don't use the return value
18507 * typeck.c (check_return_expr): Don't magically convert return
18508 statements into `return this' in constructors under the new ABI.
18510 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18511 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18512 (base_ctor_identifier): New macro.
18513 (base_dtor_identifier): Likewise.
18514 (deleting_dtor_identifier): Likewise.
18515 * decl.c: Don't include obstack.h.
18516 (obstack_chunk_alloc): Don't define.
18517 (obstack_chunk_free): Likewise.
18518 (struct predefined_identifier): New type.
18519 (initialize_predefined_identifiers): New function.
18520 (init_decl_processing): Use it.
18521 (debug_temp_inits): Remove.
18522 (start_method): Don't call preserve_data.
18523 (hack_incomplete_structures): Update comment.
18524 * init.c (init_init_processing): Don't initialize
18526 (build_offset_rf): Remove dead code.
18527 (build_delete): Use CLASSTYPE_N_BASECLASSES.
18528 * search.c (init_search_processing): Don't initialize
18531 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18533 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18534 some sign_compare warnings.
18536 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18538 Rename abi::__vmi_class_type_info members.
18539 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18540 base_list, detail_masks members to vmi_flags, vmi_base_count,
18541 vmi_bases and vmi_flags_masks respectively.
18542 (__vmi_class_type_info::vmi_flags_masks): Rename
18543 details_unknown_mask to flags_unknown_mask.
18544 * tinfo.cc (__class_type_info::do_upcast): Adjust.
18545 (__vmi_class_type_info::do_find_public_src): Adjust.
18546 (__vmi_class_type_info::do_dyncast): Adjust.
18547 (__vmi_class_type_info::do_upcast): Adjust.
18549 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18551 * tinfo.cc (convert_to_base): New function.
18552 (get_vbase_offset): Remove. Move into convert_to_base.
18553 (__vmi_class_type_info::do_find_public_src): Adjust.
18554 (__vmi_class_type_info::do_dyncast): Adjust.
18555 (__vmi_class_type_info::do_upcast): Adjust.
18557 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
18559 * tinfo.cc (operator=): Use __builtin_strcmp.
18560 * tinfo2.cc (before): Likewise.
18562 2000-04-06 Mark Mitchell <mark@codesourcery.com>
18564 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18565 (DECL_SAVED_INLINE): Rename to ...
18566 (DECL_DEFERRED_FN): ... this.
18567 (in_function_p): Remove declaration.
18568 (mark_inline_for_output): Rename to ...
18569 (defer_fn): ... this.
18570 * decl.c (finish_function): Adjust call to mark_inline_for_output.
18571 (in_function_p): Remove definition.
18572 * decl2.c (saved_inlines): Rename to ...
18573 (deferred_fns): ... this.
18574 (saved_inlines_used): Rename to ...
18575 (deferred_fns_used): ... this.
18576 (mark_inline_for_output): Rename to ...
18577 (defer_fn): ... this.
18578 (finish_file): Adjust accordingly.
18579 (init_decl2): Likewise.
18580 * lex.c (cons_up_default_function): Likewise.
18581 * pt.c (mark_decl_instantiated): Likewise.
18582 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18584 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18585 * semantics.c (expand_body): Defer more functions.
18587 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18589 * vec.cc: New file.
18590 * Make-lang.in (CXX_LIB2FUNCS): Add it.
18592 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18593 __cxa_vec_delete): Declare.
18595 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18597 * rtti.c (dfs_class_hint_mark): New static function.
18598 (dfs_class_hint_unmark): New static function.
18599 (class_hint_flags): Use them.
18601 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
18603 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18605 2000-04-05 Mark Mitchell <mark@codesourcery.com>
18607 * cp-tree.h (instantiate_decl): Change prototype.
18608 * decl2.c (mark_used): Adjust call.
18609 * optimize.c (inlinable_function_p): Adjust handling of templates.
18610 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18611 (do_type_instantiation): Likewise.
18612 (instantiate_decl): Defer more templates.
18613 (instantiate_pending_templates): Adjust logic to handle inline
18616 * Makefile.in (GGC_H): New variable. Use it throughout in place
18619 * call.c: Don't include obstack.h. Include ggc.h.
18620 (obstack_chunk_alloc): Don't define.
18621 (obstack_chunk_free): Likewise.
18622 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18623 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18624 (pop_switch): Free it.
18626 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18628 * dump.c (dequeue_and_dump): Don't try to print the bit_position
18629 if we don't have a DECL_FIELD_OFFSET.
18631 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
18633 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18634 special_function_p.
18636 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18638 * cfns.gperf (hash, libc_name_p): Prototype.
18640 * rtti.c (build_dynamic_cast_1): Constification.
18642 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18644 * semantics.c (deferred_type_access_control): Prototype.
18646 2000-04-04 Mark Mitchell <mark@codesourcery.com>
18648 Correct many new ABI issues regarding vbase and vcall offset
18650 * cp-tree.h (BINFO_VTABLE): Document.
18651 (struct lang_type): Tweak formatting.
18652 (BINFO_PRIMARY_BINFO): Add to documentation.
18653 (CLASSTYPE_VSIZE): Fix typo in comment.
18654 (CLASSTYPE_VBASECLASSES): Update documentation.
18655 (BINFO_VBASE_MARKED): Remove.
18656 (SET_BINFO_VBASE_MARKED): Likewise.
18657 (CLEAR_BINFO_VBASE_MARKED): Likewise.
18658 (BINFO_FIELDS_MARKED): Remove.
18659 (SET_BINFO_FIELDS_MARKED): Likewise.
18660 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18661 (enum access_kind): New enumeration.
18662 (num_extra_vtbl_entries): Remove declaration.
18663 (size_extra_vtbl_entries): Likewise.
18664 (get_vtbl_decl_for_binfo): New function.
18665 (dfs_vbase_unmark): Remove declaration.
18666 (mark_primary_bases): Likewise.
18667 * class.c (SAME_FN): Remove.
18668 (struct vcall_offset_data_s): Move definition.
18669 (build_vbase_pointer): Use `build', not `build_binary_op', to
18670 access the vbase pointer under the new ABI.
18671 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18672 (build_primary_vtable): Likewise.
18673 (dfs_mark_primary_bases): Move here from search.c.
18674 (mark_primary_bases): Likewise.
18675 (determine_primary_bases): Under the new ABI, don't make a base
18676 class a primary base just because we don't yet have any virtual
18678 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18679 (num_vfun_entries): Remove.
18680 (dfs_count_virtuals): Likewise.
18681 (num_extra_vtbl_entries): Likewise.
18682 (size_extra_vtbl_entries): Likewise.
18683 (layout_virtual_bases): Iterate in inheritance graph order under
18685 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18686 indicate that a vfield is present.
18687 (init_class_processing): Initialize access_public_node, etc., from
18689 (get_vtbl_decl_for_binfo): New function.
18690 (dump_class_hierarchy_r): Likewise.
18691 (dump_class_hierarchy): Use it.
18692 (finish_vtbls): Build the vtbls in inheritance graph order.
18693 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18694 (initialize_vtable): Use get_vtbl_decl_for_binfo.
18695 (accumulate_vtbl_inits): Add comments explaining why a pre-order
18697 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18698 where the vptr points, even for primary vtables.
18699 (build_vtbl_initializer): Adjust handling of vbase and vcall
18701 (build_vcall_and_vbase_vtable_entries): New function.
18702 (dfs_build_vbase_offset_vtbl_entries): Remove.
18703 (build_vbase_offset_vtbl_entries): Reimplement.
18704 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18705 were already handled in a primary base class vtable.
18706 (build_vcall_offset_vtbl_entries): Adjust.
18707 (build_rtti_vtbl_entries): Adjust.
18708 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18709 * init.c (expand_virtual_init): Simplify.
18710 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18711 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18712 * search.c (BINFO_ACCESS): New macro.
18713 (SET_BINFO_ACCESS): Likewise.
18714 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18715 (access_in_type): Likewise.
18716 (dfs_accessible_p): Likewise.
18717 (protected_accessible_p): Likewise.
18718 (lookup_fnfields_1): Adjust documentation.
18719 (dfs_mark_primary_bases): Move to class.c
18720 (mark_primary_bases): Likewise.
18721 (dfs_vbase_unmark): Remove.
18722 (virtual_context): Use BINFO_FOR_VBASE.
18723 (dfs_get_vbase_types): Simplify.
18724 (dfs_build_inheritance_graph_order): New function.
18725 (get_vbase_types): Use it.
18726 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18728 * tinfo.cc (get_vbase_offset): New function.
18729 (__vmi_class_type_info::do_find_public_src): Use it.
18730 (__vmi_class_type_info::do_dyncast): Likewise.
18731 (__vmi_class_type_info::do_upcast): Likewise.
18733 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
18735 * lang-specs.h: Pass -fno-show-column to the preprocessor.
18737 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
18739 * rtti.c (class_hint_flags): Rename flags.
18740 (class_initializer): Remove flags.
18741 (synthesize_tinfo_var): Combine offset and flags. Add flags
18742 for __vmi_class_type_info.
18743 (create_tinfo_types): Remove flags from __class_type_info and
18744 __si_class_type_info. Merge flags and offset from
18745 base_class_type_info.
18746 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18747 (__base_class_info::is_virtual_p): Adjust.
18748 (__base_class_info::is_public_p): Adjust.
18749 (__base_class_info::offset): New accessor.
18750 (__class_type_info::details): Remove member.
18751 (__class_type_info::__class_type_info): Lose details.
18752 (__class_type_info::detail_masks): Remove.
18753 (__si_class_type_info::__si_class_type_info): Lose details.
18754 (__vmi_class_type_info::details): New member.
18755 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18756 (__vmi_class_type_info::detail_masks): New member.
18757 * tinfo.cc (__class_type_info::do_upcast): Initialize result
18758 with unknown_details_mask.
18759 (__vmi_class_type_info::do_find_public_src): Adjust
18760 (__vmi_class_type_info::do_dyncast): Adjust.
18761 (__vmi_class_type_info::do_upcast): Set result details, if
18763 (__dynamic_cast): Temporarily #if out optimization.
18765 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
18767 * rtti.c (get_tinfo_decl): Mark used.
18768 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18769 mark as dealt with, if we output it.
18771 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18773 * class.c: Reorganize to put virtual function table initialization
18774 machinery at the end of the file.
18776 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
18778 * class.c (finish_struct): Use bitsize_zero_node.
18779 * pt.c (instantiate_class_template): Likewise.
18781 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18783 Put RTTI entries at negative offsets in new ABI.
18784 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18785 vbase offset at index -3, not -1.
18786 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18787 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18788 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18789 (build_rtti_vtbl_entries): New function.
18790 (set_rtti_entry): Remove.
18791 (build_primary_vtable): Don't use it.
18792 (build_secondary_vtable): Likewise.
18793 (start_vtable): Remove.
18794 (first_vfun_index): New function.
18795 (set_vindex): Likewise.
18796 (add_virtual_function): Don't call start_vtable. Do call
18798 (set_primary_base): Rename parameter.
18799 (determine_primary_base): Likewise.
18800 (num_vfun_entries): Don't use skip_rtti_stuff.
18801 (num_extra_vtbl_entries): Include RTTI information.
18802 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18803 (skip_rtti_stuff): Remove.
18804 (dfs_modify_vtables): Don't use it.
18805 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
18806 (layout_nonempty_base_or_field): Update size handling.
18807 (create_vtable_ptr): Tweak.
18808 (layout_class_type): Adjust parameter names.
18809 (finish_struct_1): Simplify.
18810 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18811 (skip_rtti_stuff): Remove.
18812 (first_vfun_index): New function.
18813 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18814 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18815 (marked_vtable_pathp): Declare.
18816 (unmarked_vtable_pathp): Likewise.
18817 * error.c (dump_expr): Use first_vfun_index to calculate vtable
18819 * rtti.c (build_headof): Look for RTTI at negative offsets.
18820 (get_tinfo_decl_dynamic): Likewise.
18821 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18823 (create_pseudo_type_info): Do it here instead. Adjust so that
18824 vptr points at first virtual function.
18825 * search.c (marked_vtable_pathp): Make it global.
18826 (unmarked_vtable_pathp): Likewise.
18827 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18828 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18829 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18830 (get_pure_virtuals): Likewise.
18831 (expand_upcast_fixups): Likewise.
18832 * tree.c (debug_binfo): Likewise.
18833 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18836 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18838 * class.c (check_field_decl): Fix typo.
18839 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18840 (check_methods): Likewise.
18841 (check_field_decls): Likewise.
18842 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18843 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18844 Use DECL_RESULT_FLD, not DECL_RESULT.
18845 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18846 * lex.c (identifier_type): Likewise.
18847 * pt.c (determine_specialization, lookup_template_class): Likewise.
18848 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18849 (resolve_overloaded_unification, more_specialized): Likewise.
18850 * semantics.c (finish_member_declaration): Likewise.
18851 * typeck.c (build_x_function_call): Likewise.
18853 2000-03-26 Mark Mitchell <mark@codesourcery.com>
18855 * class.c (layout_empty_base): Handle empty bases with non-byte
18857 (build_base_field): Likewise.
18858 (layout_virtual_bases): Likewise.
18860 * class.c (finish_struct_1): Fix typo in this change:
18862 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18864 2000-03-25 Mark Mitchell <mark@codesourcery.com>
18866 * decl.c (grokdeclarator): Count partial specializations when
18867 keeping track of how many template classes have been seen.
18869 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18871 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18873 * class.c (build_vbase_pointer_fields): layout_field now place_field.
18874 (get_vfield_offset): Use byte_position.
18875 (set_rtti_entry): Set OFFSET to ssizetype zero.
18876 (get_binfo_offset_as_int): Deleted.
18877 (dfs_record_base_offsets): Use tree_low_cst.
18878 (dfs_search_base_offsets): Likewise.
18879 (layout_nonempty_base_or_field): Reflect changes in RLI format
18880 and call byte_position.
18881 (layout_empty_base): Convert offset to ssizetype.
18882 (build_base_field): use rli_size_unit_so_far.
18883 (dfs_propagate_binfo_offsets): Do computation in proper type.
18884 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18885 (layout_class_type): Reflect changes in RLI names and fields.
18886 (finish_struct_1): Set DECL_FIELD_OFFSET.
18887 * dump.c (dequeue_and_dump): Call bit_position.
18888 * expr.c (cplus_expand_constant): Use byte_position.
18889 * rtti.c (expand_class_desc): Use bitsize_one_node.
18890 * typeck.c (build_component_addr): Use byte_position and don't
18891 special case for zero offset.
18893 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
18895 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18897 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18899 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18902 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18904 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18906 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18907 make_typename_type, check_initializer, cp_finish_decl,
18908 xref_tag): Likewise.
18909 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18910 decl_namespace, arg_assoc_template_arg, arg_assoc,
18911 validate_nonmember_using_decl, do_class_using_decl): Likewise.
18912 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18913 args_to_string): Likewise.
18914 * friend.c (is_friend): Likewise.
18915 * lex.c (note_got_semicolon, note_list_got_semicolon,
18916 is_global): Likewise.
18917 * method.c (build_overload_nested_name, build_overload_value,
18918 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18919 * parse.y (typename_sub, typename_sub1): Likewise.
18920 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18921 process_partial_specialization, convert_template_argument,
18922 template_args_equal, add_pending_template, lookup_template_class,
18923 for_each_template_parm_r, maybe_fold_nontype_arg,
18924 tsubst, instantiate_template, type_unification_real, unify,
18925 instantiate_pending_templates, set_mangled_name_for_template_decl):
18927 * repo.c (repo_get_id, repo_template_used): Likewise.
18928 * search.c (lookup_field_1): Likewise.
18929 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18930 * xref.c (classname): Likewise.
18932 2000-03-22 Mark Mitchell <mark@codesourcery.com>
18934 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18935 (CANONICAL_BINFO): New macro.
18936 (BINFO_NEW_VTABLE_MARKED): Use it.
18937 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18938 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18939 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18941 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18942 (build_secondary_vtable): Likewise.
18943 (dfs_finish_vtbls): Likewise.
18944 (dfs_accumulate_vtbl_inits): Likewise.
18945 (accumulate_vtbl_inits): New function.
18946 (finish_vtbls): Make sure that virtual bases come after
18947 non-virtual bases in the vtable group.
18948 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18949 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18950 * search.c (struct vbase_info): Move definition.
18951 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18952 (unmarked_new_vtable_p): Likewise.
18953 (dfs_mark_vtable_path): Remove.
18954 (dfs_mark_new_vtable): Remove.
18955 (dfs_unmark_new_vtable): Likewise.
18956 (dfs_clear_search_slot): Likewise.
18957 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18958 (dfs_clear_vbase_slots): Likewise.
18959 (init_vbase_pointers): LIkewise.
18961 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
18963 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18964 SIZETYPE to a non-SIZETYPE.
18966 2000-03-21 Mark Mitchell <mark@codesourcery.com>
18968 * class.c (layout_virtual_bases): Adjust names in conditionally
18971 * class.c (record_base_offsets): New function.
18972 (layout_conflict_p): Likewise.
18973 (layout_nonempty_base_or_field): Use it.
18974 (layout_empty_base): New function.
18975 (build_base_field): Use it.
18976 (build_base_fields): Update comment.
18977 (layout_virtual_bases): Fold in a little code form
18978 layout_basetypes. Use layout_empty_base.
18979 (layout_basetypes): Remove.
18980 (end_of_class): New function.
18981 (layout_class_type): Use it. Adjust.
18983 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18984 (fntype_p): Remove.
18985 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18987 (dfs_skip_nonprimary_vbases_markedp): Likewise.
18988 * typeck.c (fntype_p): Remove.
18990 * cp-tree.h (TI_SPEC_INFO): Remove.
18991 (CLASSTYPE_TI_SPEC_INFO): Likewise.
18992 * pt.c (process_partial_specialization): Likewise.
18994 * class.c (build_base_field): Fix thinko in computation of binfo
18997 * tree.c (mark_local_for_remap_p): Mark variables declared in
18998 TARGET_EXPRs as well.
19000 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19002 * typeck.c (require_complete_type, complete_type,
19003 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19004 build_array_ref, convert_arguments, pointer_diff,
19005 build_x_unary_op, build_unary_op, build_c_cast,
19006 build_modify_expr): Use COMPLETE_TYPE_P etc.
19007 * call.c (is_complete, convert_like_real,
19008 build_new_method_call): Likewise.
19009 * class.c (build_vbase_pointer_fields, check_bases,
19010 build_base_field, finish_struct_1, pushclass): Likewise.
19011 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19012 * decl.c (maybe_process_template_type_declaration, pushtag,
19013 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19014 layout_var_decl, check_initializer, cp_finish_decl,
19015 grokdeclarator, require_complete_types_for_parms,
19016 grok_op_properties, xref_tag, xref_basetypes,
19017 check_function_type): Likewise.
19018 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19019 * friend.c (do_friend): Likewise.
19020 * init.c (build_offset_ref): Likewise.
19021 * parse.y (structsp): Likewise.
19022 * pt.c (maybe_process_partial_specialization,
19023 tsubst_friend_function, instantiate_class_template, tsubst,
19024 do_type_instantiation, instantiate_pending_templates): Likewise.
19025 * repo.c (repo_get_id): Likewise.
19026 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19027 synthesize_tinfo_var, emit_support_tinfos): Likewise.
19028 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19029 * semantics.c (begin_class_definition): Likewise.
19030 * tree.c (build_cplus_method_type): Likewise.
19031 * typeck2.c (digest_init, build_functional_cast,
19032 add_exception_specifier): Likewise.
19033 * parse.h, parse.c: Regenerated.
19035 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19037 * inc/cxxabi.h: New header file. Define new-abi entry points.
19038 (__pointer_type_info::target): Rename member to ...
19039 (__pointer_type_info::type): ... here.
19040 (__base_class_info::type): Rename member to ...
19041 (__base_class_info::base): ... here.
19042 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19043 * cp-tree.h (CPTI_ABI): New global tree enumeration.
19044 (abi_node): New global tree node.
19045 * decl.c (abi_node): Document.
19046 (init_decl_processing): Initialize abi_node.
19047 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19048 (get_vmi_pseudo_type_info): Likewise.
19049 (create_tinfo_types): Likewise.
19050 (emit_support_tinfos): Likewise.
19051 * tinfo.h (cxxabi.h): Include for new-abi.
19052 Move rtti class definitions to new header file.
19053 * tinfo.cc (abi): Use the namespace.
19054 (std): Move new abi rtti classes from here ...
19055 (__cxxabiv1): ... to here.
19056 * tinfo2.cc (cxxabi.h): Include for new-abi.
19057 Move rtti class definitions to new header file.
19058 (std): Move new abi rtti classes from here ...
19059 (__cxxabiv1): ... to here.
19060 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19063 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19064 Jason Merrill <jason@casey.cygnus.com>
19066 * method.c (build_overload_int): Use host_integerp.
19068 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19070 * init.c (build_offset_ref): Handle the case of a templated member
19073 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19075 * except.c (expand_exception_blocks): Clear catch_clauses_last.
19077 2000-03-18 Mark Mitchell <mark@codesourcery.com>
19079 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19080 * class.c (check_bitfield_decl): Turn illegal bitfields into
19082 (dfs_propagate_binfo_offsets): Adjust for new size_binop
19084 (dfs_offset_for_unshared_vbases): Likewise.
19085 * cvt.c (cp_convert_to_pointer): Convert NULL to a
19086 pointer-to-member correctly under the new ABI.
19087 * expr.c (cplus_expand_constant): Don't use cp_convert when
19088 turning an offset into a pointer-to-member.
19089 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19090 when dereferencing them under the new ABI.
19091 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19092 of pointers-to-members under the new ABI.
19094 * class.c (check_bitfield_decl): Remove restriction on really long
19096 (layout_class_type): Implement new ABI handling of bitfields
19097 longer than their types.
19099 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19101 * parse.y (extdefs): Call ggc_collect.
19102 * parse.c: Regenerated.
19104 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
19106 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19107 (note_name_declared_in_class): Use OVL_CURRENT to get at a
19108 potential overload.
19110 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19112 * class.c (build_vbase_path): Use integer_zerop.
19113 (build_vtable_entry): Use tree_low_cst.
19114 (get_vfield_offset): Use bit_position.
19115 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19117 (check_bitfield_decl): Set DECL_SIZE using convert.
19118 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19119 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19121 (finish_struct_1): Use bit_position.
19122 (dump_class_hierarchy): Use tree_low_cst.
19123 * cp-tree.h (min_precision): Add declaration.
19124 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19125 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19126 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19127 * expr.c (cplus_expand_constant): Use bit_position.
19128 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19129 * rtti.c (get_base_offset): Use bit_position.
19130 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19131 host_integerp, and tree_low_cst.
19132 (pointer_int_sum): Use integer_zerop.
19133 (build_component_addr): Use bit_position.
19135 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
19137 * typeck.c (require_complete_type): Don't assume size_zero_node.
19138 (complete_type_or_else): Likewise.
19140 2000-03-16 Steven Grady <grady@digitaldeck.com>
19141 Jason Merrill <jason@casey.cygnus.com>
19143 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19145 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
19147 * decl2.c (grokfield): Bail out if type is error_mark_node.
19149 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19151 * tinfo2.cc (__ptr_to_member_data): Rename to ...
19152 (__pointer_to_member_data): ... here. Adjust.
19153 * rtti.c (create_tinfo_types): Adjust.
19155 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19157 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19158 * decl.c (ref_desc_type_node): Undocument.
19159 * rtti.c (ptr_ref_initializer): Rename to ...
19160 (ptr_initializer): ... here. Adjust comments.
19161 (ptmd_initializer): Fix comment thinko.
19162 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19163 (create_tinfo_types): Remove ref_desc_type_node init.
19164 * tinfo2.cc (__reference_type_info): Remove.
19166 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19168 * decl.c (cp_finish_decl): Remove obsolete comment.
19170 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19172 2000-03-14 Mark Mitchell <mark@codesourcery.com>
19174 * cp-tree.h: Tweak documentation.
19175 * class.c (build_vbase_pointer_fields): Layout the fields, too.
19176 (avoid_overlap): Remove.
19177 (get_binfo_offset_as_int): New function.
19178 (dfs_serach_base_offsets): Likewise.
19179 (layout_nonempty_base_or_field): Likewise.
19180 (build_base_field): Layout fields here. Avoid placing two objects
19181 of the same type at the same address, under the new ABI.
19182 (build_base_fields): Adjust accordingly.
19183 (create_vtable_ptr): Return the new field, but don't attach it to
19185 (remove_base_field): Remove.
19186 (remove_base_fields): Remove.
19187 (layout_basetypes): Adjust accordingly.
19188 (layout_class_type): Call layout_field for each field, rather than
19189 just making a wholesale call to layout_type.
19191 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
19193 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19195 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
19197 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19199 * except.c (dtor_nothrow): New fn.
19200 (do_pop_exception): Use it. Take type parm.
19201 (push_eh_cleanup): Take type parm.
19202 (expand_start_catch_block): Pass it.
19203 (build_eh_type_type_ref): Accept null type.
19205 2000-03-12 Mark Mitchell <mark@codesourcery.com>
19207 * cp-tree.h (revert_static_member_fn): Change prototype.
19208 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19209 (grok_op_properties): Likewise.
19210 (start_function): Likewise.
19211 (revert_static_member_fn): Simplify.
19212 * pt.c (check_explicit_specialization): Adjust call to
19213 revert_static_member_fn.
19215 2000-03-11 Mark Mitchell <mark@codesourcery.com>
19217 * cp-tree.h (scope_kind): New type.
19218 (tmpl_spec_kind): Likewise.
19219 (declare_pseudo_global_level): Remove.
19220 (pseudo_global_level_p): Rename to template_parm_scope_p.
19221 (pushlevel): Remove declaration.
19222 (begin_scope): New function.
19223 (finish_scope): Likewise.
19224 (current_tmpl_spec_kind): Likewise.
19225 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19226 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
19227 Add template_spec_p.
19228 (toplevel_bindings_p): Adjust.
19229 (declare_pseudo_global_level): Remove.
19230 (pseudo_global_level_p): Rename to template_parm_scope_p.
19231 (current_tmpl_spec_kind): New function.
19232 (begin_scope): Likewise.
19233 (finish_scope): Likewise.
19234 (maybe_push_to_top_level): Adjust.
19235 (maybe_process_template_type_declaration): Likewise.
19236 (pushtag): Likewise.
19237 (pushdecl_nonclass_level): Likewise.
19238 (lookup_tag): Likewise.
19239 (grokfndecl): Handle member template specializations. Share
19240 constructor and non-constructor code.
19241 * decl2.c (check_classfn): Handle member template specializations.
19242 * pt.c (begin_template_parm_list): Use begin_scope.
19243 (begin_specialization): Likewise.
19244 (end_specialization): Likewise.
19245 (check_explicit_specialization): Use current_tmpl_spec_kind.
19246 Handle member template specializations.
19247 (end_template_decl): Use finish_scope. Remove call to
19249 (push_template_decl_real): Remove bogus error message.
19250 (tsubst_decl): Fix typo in code contained in comment.
19251 (instantiate_template): Handle member template specializations.
19252 (most_general_template): Likewise.
19254 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
19256 * lex.c (whitespace_cr): Compress consecutive calls to warning().
19257 (do_identifier): Ditto for error().
19259 * pt.c (convert_nontype_argument): Ditto for cp_error().
19260 (convert_template_argument): Ditto for cp_pedwarn().
19262 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
19264 * exception.cc (__check_null_eh_spec): New fn.
19265 * except.c (expand_end_eh_spec): Call it if the spec is throw().
19267 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19269 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19270 * except.c (expand_end_eh_spec): Add the return type.
19271 * rtti.c (throw_bad_cast): Add the parmtypes.
19272 (throw_bad_typeid): Likewise.
19274 * semantics.c (expand_stmt): Only leave out rtl for unused
19275 artificials, and set DECL_IGNORED_P on them as well.
19276 * decl.c (wrapup_globals_for_namespace): Likewise.
19278 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
19280 * decl.c (maybe_commonize_var): Skip all artificial decls.
19281 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19283 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19285 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19286 * cp-tree.h: Declare flag_enforce_eh_specs.
19287 * decl.c (store_parm_decls, finish_function): Check it.
19289 C library functions don't throw.
19290 * Makefile.in (cfns.h): New target.
19291 (except.o): Depend on it.
19292 * Make-lang.in (cc1plus): Depend on cfns.gperf.
19293 * cfns.gperf: New file.
19294 * cfns.h: Generated.
19295 * except.c: Include it.
19296 (nothrow_libfn_p): New fn.
19297 * decl.c (grokfndecl): Use it.
19298 * cp-tree.h: Declare it.
19300 * decl.c (push_overloaded_decl_1, auto_function,
19301 define_function): Lose.
19302 (build_library_fn_1): New static fn.
19303 (builtin_function): Use it.
19304 (get_atexit_node): Use build_library_fn_ptr.
19305 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19306 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19307 push_void_library_fn, push_throw_library_fn): New fns.
19308 * cp-tree.h: Declare them.
19309 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19310 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19311 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19312 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19313 * rtti.c (build_runtime_decl): Lose.
19314 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19315 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19316 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19318 * call.c (build_call): Remove result_type parm.
19319 Call mark_used on unused artificial fns.
19320 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19322 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
19324 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19326 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19327 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19328 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19329 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19330 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19331 expand_generic_desc): Likewise.
19333 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19335 * exception.cc (__cp_pop_exception): Cleanup the original object.
19337 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19339 * decl.c (grok_op_properties): Merge conversion to void warning
19340 with other silly op warnings.
19342 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
19344 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19345 array CONSTRUCTOR elements. Don't use expr_tree_cons.
19347 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19349 * decl.c (cp_make_fname_decl): New function.
19350 (wrapup_globals_for_namespace): Don't emit unused static vars.
19351 (init_decl_processing): Remove comment about use of
19352 array_domain_type. Set make_fname_decl.
19353 (cp_finish_decl): Remove __FUNCTION__ nadgering.
19354 * semantics.c (begin_compound_stmt): Remove
19355 current_function_name_declared flagging.
19356 (expand_stmt): Don't emit unused local statics.
19357 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19360 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19362 * typeck.c (convert_for_assignment): Don't look at array
19364 * call.c (convert_like_real): Likewise.
19366 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
19368 Add initial support for '\uNNNN' specifier.
19369 * lex.c (read_ucs): New fn.
19370 (readescape, skip_white_space): Call it.
19371 (is_extended_char, is_extended_char_1): New fns.
19372 (utf8_extend_token): New fn, #if 0'd out.
19373 (real_yylex): Treat extended chars like letters.
19375 * search.c (note_debug_info_needed): Walk the bases even if we
19376 weren't deferring the type itself.
19378 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19380 * decl2.c (finish_objects): Constify a char*.
19382 * method.c (emit_thunk): Likewise.
19384 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
19386 * typeck.c (dubious_conversion_warnings): Look through
19389 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19391 * class.c (dfs_modify_vtables): I is now unsigned.
19392 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19393 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19394 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19395 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19396 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19397 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19398 Call integer_all_onesp.
19399 * typeck2.c (process_init_constructor): Use compare_tree_int.
19401 * lang-specs.h (as): Don't call if -syntax-only.
19403 2000-03-06 Mark Mitchell <mark@codesourcery.com>
19405 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19406 RTL_EXPR_HAS_NO_SCOPE after all.
19408 2000-03-05 Mark Mitchell <mark@codesourcery.com>
19410 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19411 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
19412 RTL_EXPR_HAS_NO_SCOPE.
19414 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19417 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19419 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
19421 * call.c (convert_like): Macrofy.
19422 (convert_like_with_context): New macro.
19423 (convert_like_real): Renamed from convert_like. Add calling
19424 context parameters, for diagnostics. Add recursive flag. Call
19425 dubious_conversion_warnings for outer conversion.
19426 (build_user_type_conversion): Use convert_like_with_context.
19427 (build_over_call): Likewise. Don't warn about dubious
19428 conversions here. Adjust convert_default_arg calls.
19429 (convert_default_arg): Add context parameters for diagnostics.
19430 Pass through to convert_like_with_context.
19431 * cp-tree.h (convert_default_arg): Add context parameters.
19432 (dubious_conversion_warnings): Prototype new function.
19433 * typeck.c (convert_arguments): Adjust convert_default_arg call.
19434 (dubious_conversion_warnings): New function, broken
19435 out of convert_for_assignment.
19436 (convert_for_assignment): Adjust.
19438 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
19440 * decl2.c (key_method): Break out from...
19441 (import_export_vtable, import_export_class): ...here.
19443 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19444 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19446 * search.c (note_debug_info_needed, dfs_debug_mark,
19447 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
19448 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19450 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
19452 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19455 2000-03-02 Mark Mitchell <mark@codesourcery.com>
19457 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19458 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19459 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19460 (lang_type): Split gets_new into has_new and has_array_new.
19461 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19462 (TYPE_GETS_NEW): Split into ...
19463 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19464 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19465 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19466 (build_op_new_call): Don't declare.
19467 (build_new_1): Likewise.
19468 * call.c (build_op_new_call): Remove.
19469 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19470 instead of TYPE_NEEDS_DESTRUCTOR.
19471 (finish_struct_bits): Likewise.
19472 (add_implicitly_declared_members): Likewise.
19473 (check_field_decl): Likewise.
19474 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19475 correctly under the new ABI.
19476 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19477 instead of TYPE_NEEDS_DESTRUCTOR.
19478 (initialize_local_var): Likewise.
19479 (destroy_local_var): Likewise.
19480 (cp_finish_decl): Likewise.
19481 (register_dtor_fn): Likewise.
19482 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19483 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
19484 TYPE_VEC_DELETE_TAKES_SIZE here.
19485 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19486 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19487 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19488 (finish_destructor_body): Likewise.
19489 (maybe_build_cleanup_1): Likewise.
19490 * decl2.c (do_static_destruction): Likewise.
19491 * init.c (build_new_1): Make it static.
19492 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19493 (expand_cleanup_for_base): Likewise.
19494 (get_cookie_size): New function.
19495 (build_new_1): Handle array-new cookies correctly under the new
19497 (build_vec_delete_1): Likewise.
19498 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19499 (build_delete): Likewise.
19500 (build_vec_delete): Handle array-new cookies correctly under the new
19502 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19503 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19504 TYPE_HAS_ARRAY_NEW_OPERATOR.
19505 * ptree.c (print_lang_type): Check them.
19506 * search.c (context_for_name_lookup): Fix typo in comment.
19507 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19508 * tree.c (break_out_cleanups): Likewise.
19509 (build_cplus_array_test_1): Likewise.
19510 (cp_build_qualified_type_real): Likewise.
19511 * typeck.c (complete_type): Likewise.
19513 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19514 the command-line, not the end.
19516 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
19518 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19520 2000-03-02 Tom Tromey <tromey@cygnus.com>
19522 * cp-tree.h (build_java_class_ref): Declare.
19523 * init.c (build_java_class_ref): No longer static.
19524 * except.c (expand_throw): Generate a Java-style `throw' if the
19525 thrown object is a "Java" object.
19526 (initialize_handler_parm): Generate a Java-style lookup of
19527 exception info if the caught object is a "Java" object.
19528 (catch_language, catch_language_init): New globals.
19529 (decl_is_java_type): New function.
19530 (expand_start_catch_block): Don't call push_eh_info() or
19531 push_eh_cleanup() when handling a Java-style "catch". Pass Java
19532 class reference to build_catch_block.
19534 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19536 * typeck.c (comptypes): Treat sizetype like its language equivalent.
19538 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
19540 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19541 to merge reference/pointer code and fix incorrect warnings.
19543 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
19545 * search.c (protected_accessible_p): Use context_for_name_lookup.
19547 * init.c (construct_virtual_bases): Fix thinko.
19548 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19550 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
19552 * decl.c (current_function_decl): Move to toplev.c.
19554 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
19556 * pt.c (fn_type_unification): Unify return type, whenever
19558 (get_bindings_real): Only pass return type when necessary.
19559 Remove explicit return type check.
19560 * class.c (resolve_address_of_overloaded_function): Pass desired
19561 return type to fn_type_unification.
19563 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19565 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19567 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19569 * rtti.c (expand_class_desc): Likewise.
19570 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19571 (THUNK_VCALL_OFFSET): Likewise.
19572 (THUNK_DELTA): Reflect changes in ../tree.h.
19574 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
19576 * search.c (protected_accessible_p): Also allow the access if
19577 the member is public in DERIVED. Lose TYPE parm.
19578 (friend_accessible_p): Lose TYPE parm.
19579 (accessible_p): Adjust.
19581 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19583 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19584 on things that are not sizes; ssize_binop deleted.
19585 Call size_diffop when appropriate.
19586 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19587 (build_primary_vtable, build_secondary_vtable): Likewise.
19588 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19589 Variable I is HOST_WIDE_INT.
19590 (get_vfield_offset): Pass proper types to size_binop.
19591 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19592 (finish_struct_1): Likewise.
19593 (skip_rtti_stuff): Arg N is now pointer to signed.
19594 (layout_class_type): Use size_zero_node.
19595 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19596 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19597 * decl.c (complete_arry_type): Pass proper types to size_binop.
19598 (xref_basetypes): BINFO_OFFSET is sizetype.
19599 * error.c (dump_expr): Don't use size_binop non-sizes.
19600 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19601 * init.c (construct_virtual_bases): Fix type error.
19602 (build_vec_delete_1): Pass proper type to size_binop and don't
19604 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19605 * rtti.c (get_base_offset): Pass proper type to size_binop.
19606 * search.c (dfs_find_vbases): Fix type error.
19607 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19608 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19609 * tree.c (debug_binfo): Variable N is signed.
19610 Use HOST_WIDE_INT_PRINT_DEC.
19611 * typeck.c (comptypes): sizetype is same as equivalent integer type.
19612 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19613 size_one_node and size_zero_node.
19614 (c_alignof): Use size_one_node.
19615 (build_component_addr): Pass proper types to size_binop.
19616 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19618 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
19620 Implement class scope using-declarations for functions.
19621 * class.c (handle_using_decl): Call add_method for used functions.
19622 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19623 (add_method): Used functions are hidden by local functions.
19624 (check_bases_and_members): Handle using-decls before finalizing
19625 CLASSTYPE_METHOD_VEC.
19626 * call.c (add_function_candidate): Add ctype parm; if nonzero,
19627 override the type of 'this' accordingly.
19628 (add_template_candidate, add_template_candidate_real): Add ctype parm.
19629 (convert_class_to_reference, build_user_type_conversion_1,
19630 build_new_function_call, build_object_call, build_new_op,
19631 build_new_method_call): Pass ctype parm.
19633 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19635 * call.c (convert_class_to_reference, build_user_type_conversion_1,
19636 build_new_function_call, build_object_call, build_new_op,
19637 build_new_method_call, build_op_delete_call): Don't get basetype_path
19639 * typeck.c (build_component_ref): Likewise.
19640 * init.c (build_offset_ref): Likewise.
19641 (resolve_offset_ref): Don't call enforce_access.
19642 Call build_scoped_ref.
19643 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
19644 would cause an error or if -pedantic.
19645 * class.c (alter_access): Lose binfo parm.
19647 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19649 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19652 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
19654 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19655 pseudo_type_info creation into the std namespace
19657 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19659 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19660 (import_export_class): Remove declaration.
19661 * decl2.c (import_export_class): Make it static.
19662 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19663 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19664 EXPR_WITH_FILE_LOCATION.
19665 * lex.c (check_newline): Tweak filename/lineno setting.
19666 * semantics.c (begin_while_stmt): Fix typo in comment.
19668 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19670 * lang-options.h (-fmessage-length=): Add missing option.
19672 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19674 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
19676 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19678 2000-02-25 Jim Wilson <wilson@cygnus.com>
19680 * optimize.c (expand_call_inline): Emit the return label before
19681 evaluating the return value.
19683 2000-02-24 Mark Mitchell <mark@codesourcery.com>
19685 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19686 than duplicating functionality here.
19687 * optimize.c: Include input.h.
19688 (expand_call_inline): Use push_srcloc and pop_srcloc.
19689 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19690 * parse.c: Regenerated.
19691 * Makefile.in (lex.o): Depend on input.h.
19692 (optimize.o): Likewise.
19694 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
19696 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19697 function type, rather than ICE.
19699 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
19701 * decl.c (grokdeclarator): Call decl_type_access_control.
19702 * parse.y (parse_end_decl): Don't call decl_type_access_control if
19705 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
19707 * decl.c (decls_match): Remove obsolete static member nadgering.
19709 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19711 * decl.c (grokdeclarator): Change ANSI to ISO.
19712 * lex.c (consume_string, readescape, do_identifier): Likewise.
19713 (parse_float, real_yylex): Likewise.
19714 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19715 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19716 new_type_id, maybe_label_decls, simple_stmt,
19717 for.init.statement): Likewise.
19718 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19719 * semantics.c (finish_named_return_value): Likewise.
19720 * parse.c: Regenerate.
19722 2000-02-21 Mark Mitchell <mark@codesourcery.com>
19724 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19725 (CPTI_CLASS_STAR_TYPE): Remove.
19726 (vtable_index_type): Likewise.
19727 (class_star_type_node): Remove.
19728 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19729 (build_binary_op_nodefault): Remove.
19730 * call.c (build_new_op): Use build_binary_op instead of
19731 build_binary_op_nodefault.
19732 * decl.c (init_decl_processing): Remove class_star_type_node
19733 initialization. Make delta_type_node ptrdiff_type_node under the
19734 new ABI. Initialize vtable_index_type.
19735 (build_ptrmemfunc_type): Build different structures for the new
19737 (build_enumerator): Use build_binary_op instead of
19738 build_binary_op_nodefault.
19739 * method.c (build_overload_value): Mangle pointers-to-members
19740 appropriately under the new ABI.
19741 * typeck.c (build_array_ref): Use build_binary_op instead of
19742 build_binary_op_nodefault.
19743 (get_member_function_from_ptrfunc): Adjust for the new ABI.
19744 (build_binary_op_nodefault): Rename to ...
19745 (build_binary_op): ... this. Remove old version. Adjust for
19746 pointer-to-member comparisons under the new ABI.
19747 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
19748 (build_ptrmemfunc): Adjust for the new ABI.
19749 (expand_ptrmemfunc_cst): Likewise.
19750 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19751 (pfn_from_ptrmemfunc): Adjust for the new ABI.
19753 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
19755 * call.c (build_object_call): Compress consecutive calls to
19757 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19758 (build_op_delete_call): Adjust message formatting.
19760 * class.c (check_bases): Compress consecutive calls to
19762 (finish_struct_anon): Say 'ISO C++'.
19764 * decl.c (start_decl): Same here.
19765 (grok_reference_init): Likewise.
19766 (grokfndecl): Correct message formatting.
19767 (grokfndecl): Improve diagnostic.
19768 (check_static_variable_definition): Likewise. Say 'ISO C++'
19769 (compute_array_index_type): Say 'ISO C++'
19770 (create_array_type_for_decl): Compress consecutive calls to
19772 (grokdeclarator): Say 'ISO C++'
19773 (grok_op_properties): Likewise.
19775 * decl2.c (delete_sanity): Clairify diagnostic.
19776 (check_member_template): Same here.
19777 (grok_function_init): Use consistent terminology.
19779 * expr.c (do_case): Say 'ISO C++'
19781 * friend.c (do_friend): Compress consecutive calls to warning.
19783 2000-02-20 Mark Mitchell <mark@codesourcery.com>
19785 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19786 * class.c (build_secondary_vtable): Reorganize. Don't create a
19787 new vtable under the new ABI.
19788 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19789 computing the size.
19790 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19791 the initializing elements.
19792 (initialize_vtable): New function.
19793 (dfs_finish_vtbls): Use it.
19794 (dfs_accumulate_vtbl_inits): New function.
19795 (finish_vtbls): Merge primary and secondary vtables under the new
19797 (finish_struct_1): Remove redundant call to layout_vtable_decl.
19798 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19801 * class.c (build_vtable): New function, split out from ...
19802 (get_vtable_decl): ... here, and ...
19803 (build_secondary_vtable): ... here.
19805 * pt.c (tsubst_decl): Fix formatting.
19807 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19809 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19810 (avoid_overlap, build_base_field): Likewise.
19811 (build_base_field, build_base_fields, is_empty_class):
19812 Test DECL_SIZE with integer_zero.
19813 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19814 * cp-tree.h (struct lang_type): New field size_unit.
19815 (CLASSTYPE_SIZE_UNIT): New macro.
19816 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19817 (cp_finish_decl): Delete -Wlarger-than processing.
19818 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19819 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19820 * tree.c (make_binfo): binfo vector is one entry longer.
19821 (walk_tree): Walk DECL_SIZE_UNIT.
19823 2000-02-19 Mark Mitchell <mark@codesourcery.com>
19825 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19827 (build_vtable_entry): Don't assume all vtable entries are
19829 (build_vtbl_initializer): Adjust accordingly.
19830 (get_vtable_decl): Fix formatting.
19832 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
19834 * semantics.c (deferred_type_access_control): Walk the entire
19836 (save_type_access_control): Rename from
19837 initial_deferred_type_access_control. Just remember the value.
19838 (decl_type_access_control): New fn.
19839 (begin_function_definition): Use deferred_type_access_control, after
19840 we've started the function. Set type_lookups to error_mark_node.
19841 * parse.y (frob_specs, fn.def1): Adjust.
19842 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19843 (parse_end_decl, parse_bitfield0, parse_method): New fns.
19844 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19845 (after_type_component_declarator0): Likewise.
19846 (after_type_component_declarator): Likewise.
19847 (notype_component_declarator): Likewise.
19848 * cp-tree.h: Adjust.
19850 * decl.c (redeclaration_error_message): Allow redeclaration of
19851 namespace-scope decls.
19853 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
19855 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19857 2000-02-17 Mark Mitchell <mark@codesourcery.com>
19859 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19860 * decl2.c (grokclassfn): Likewise.
19862 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19864 * decl2.c (lang_decode_option): Don't set default message length
19866 * lex.c (lang_init_options): Set it here.
19868 2000-02-16 Mark Mitchell <mark@codesourcery.com>
19870 Make DECL_CONTEXT mean the class in which a member function was
19871 declared, even for a virtual function.
19872 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19873 (DECL_FRIEND_CONTEXT): New macro.
19874 (DECL_REAL_CONTEXT): Remove.
19875 (SET_DECL_FRIEND_CONTEXT): Likewise.
19876 (DECL_VIRTUAL_CONTEXT): Adjust.
19877 (DECL_CLASS_SCOPE_P): Use TYPE_P.
19878 (add_friends): Remove.
19879 (hack_decl_function_context): Likewise.
19880 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19882 (build_over_call): Fix indentation. Use DECL_CONTEXT
19883 instead of DECL_CLASS_CONTEXT.
19884 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19885 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19886 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19887 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19888 (build_base_field): Likewise.
19889 (finish_struct_1): Likewise.
19890 (build_self_reference): Likewise.
19891 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19893 (pushtag): Use decl_function_context, not
19894 hack_decl_function_context.
19895 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19896 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19897 (pushdecl): Remove bogus code.
19898 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19899 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19900 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19901 Use decl_function_context, nothack_decl_function_context.
19902 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19903 (grokdeclarator): Likewise. Use decl_function_context, not
19904 hack_decl_function_context.
19905 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
19906 (start_function): Use DECL_FRIEND_CONTEXT, not
19907 DECL_CLASS_CONTEXT. Use decl_function_context, not
19908 hack_decl_function_context.
19909 (finish_function): Use decl_function_context, not
19910 hack_decl_function_context.
19911 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19912 DECL_CLASS_CONTEXT.
19913 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19914 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19915 (grokfield): Likewise.
19916 (finish_builtin_type): Likewise.
19917 (finish_vtable_vardec): Use decl_function_context, not
19918 hack_decl_function_context.
19919 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19920 (start_static_initialization_or_destruction): Likewise.
19921 (finish_static_initialization_or_destruction): Likewise.
19922 (mark_used): Adjust logic for deciding when to synthesize methods.
19923 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19925 * error.c (dump_function_decl): Use DECL_CONTEXT, not
19926 DECL_CLASS_CONTEXT.
19927 * friend.c (is_friend): Likewise.
19928 (add_friends): Remove.
19929 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19930 * lex.c (begin_definition_of_inclass_inline): Use
19931 decl_function_context, not hack_decl_function_context.
19932 (process_next_inline): Likewise.
19933 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19934 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19935 DECL_CLASSS_CONTEXT.
19936 (hack_identifier): Likewise.
19937 (synthesize_method): Use decl_function_context, not
19938 hack_decl_function_context.
19939 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19941 (is_member_template): Use decl_function_context, not
19942 hack_decl_function_context. Use DECL_CONTEXT, not
19943 DECL_CLASS_CONTEXT.
19944 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19945 DECL_CLASS_CONTEXT.
19946 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19948 (push_template_decl_real): Likewise.
19949 (instantiate_class_template): Don't call add_friends.
19950 (tsubst_default_argument): Use DECL_CONTEXT, not
19952 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19953 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19954 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19955 DECL_CLASS_CONTEXT.
19956 * repo.c (repo_inline_used): Likewise.
19957 * search.c (current_scope): Adjust for new _CONTEXT macros.
19958 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19960 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19961 (lookup_fnfields_here):Likewise.
19962 (check_final_overrider): Likewise.
19963 (init_vbase_pointers): Likewise.
19964 (virtual_context): Likewise.
19965 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19966 (expand_body): Use decl_function_context, not
19967 hack_decl_function_context.
19968 * tree.c (hack_decl_function_context): Remove.
19969 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19970 DECL_CLASS_CONTEXT.
19971 * typeck2.c (error_not_base_type): Likewise.
19973 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
19975 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19977 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19979 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19981 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
19983 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19985 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
19987 * decl2.c (lang_decode_option): Enable automatic line wrapping.
19989 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
19991 * parse.y (frob_specs): Split out...
19992 (parse_decl): From here.
19993 (fn.def2): Call initial_deferred_type_access_control.
19994 (after_type_component_declarator0): Call frob_specs.
19995 (notype_component_declarator0): Likewise.
19996 * search.c (friend_accessible_p): Nested classes are friends of their
19999 2000-02-10 Mark Mitchell <mark@codesourcery.com>
20001 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20002 used to create an implicit temporary.
20004 * class.c (dfs_modify_vtables): Tweak calculation of functions to
20007 2000-02-08 Nathan Sidwell <nathan@acm.org>
20009 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20010 strip array element qualifiers too.
20012 2000-02-07 Mark Mitchell <mark@codesourcery.com>
20014 * decl.c (store_parm_decls): Don't build cleanups for parameters
20015 while processing_template_decl.
20017 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
20019 * cp-tree.h (struct saved_scope): Add incomplete field.
20020 (namespace_scope_incomplete): New macro.
20021 * decl.c (pushdecl): Use it.
20022 (hack_incomplete_structures): Use it. See through artificial
20024 (mark_saved_scope): Mark it.
20026 Implement access control for nested types.
20027 * search.c (type_access_control): New fn.
20028 (accessible_p): Now we do perform access control for types.
20029 * semantics.c (deferred_type_access_control): New fn.
20030 (initial_deferred_type_access_control): New fn.
20031 (begin_function_definition): Call it. Add lookups parm.
20032 * decl.c (struct binding_level): Add this_class field.
20033 (pushlevel_class): Set it.
20034 (mark_binding_level): Mark it.
20035 (lookup_name_real): Use it. Call type_access_control.
20036 (mark_saved_scope): Mark lookups field.
20037 * cp-tree.h (flagged_type_tree): Add lookups field.
20038 (struct saved_scope): Add lookups field.
20039 (type_lookups): New macro.
20040 * parse.y (declmods): Now <ftype>.
20041 (parse_decl): Add lookups parm. Call
20042 initial_deferred_type_access_control.
20043 (lang_extdef): Clear type_lookups.
20044 (typed_declspecs, declmods, typespec): Set lookups field.
20045 (initdcl): Call deferred_type_access_control.
20046 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20047 component_decl_1, named_parm): Adjust.
20048 * friend.c (is_friend): Nested classes are friends of their
20051 * class.c (currently_open_derived_class): New fn.
20052 * method.c (hack_identifier): Use it.
20054 * lex.c (do_identifier): Remove obsolete code.
20056 * parse.y (typed_typespecs): Propagate new_type_flag properly.
20058 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
20060 * tinfo.h: Remove apostrophes from C++ comment (xgettext
20061 thinks this file is plain C).
20063 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20065 * Makefile.in (call.o): Depend on $(EXPR_H).
20067 * call.c: Include "expr.h".
20069 * class.c (dump_class_hierarchy): Add prototype.
20071 * search.c (dfs_get_pure_virtuals): Likewise.
20073 2000-02-1 Ulrich Drepper <drepper@redhat.com>
20075 * parse.y (simple_stmt): Allow :: token in asm parameter list.
20076 * parse.c: Rebuilt.
20078 2000-01-31 Jim Wilson <wilson@cygnus.com>
20080 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20081 Store it in DECL_FCONTEXT.
20082 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20084 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
20086 * tinfo.h (old abi): #include "tconfig.h".
20087 * tinfo.cc (convert_to_base): Move into old abi section.
20089 2000-01-31 Mark Mitchell <mark@codesourcery.com>
20091 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20092 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20093 (BINFO_PRIMARY_BINFO): New macro.
20094 (BF_DELTA): Rename to ...
20095 (BV_DELTA): ... this.
20096 (BF_VCALL_INDEX): Rename to ...
20097 (BV_VCALL_INDEX): ... this.
20098 (BF_FN): Rename to ...
20100 * class.c (build_vbase_path): Adjust for changes to reverse_path.
20101 (set_rtti_entry): Rename BF_ macros to BV_ variants.
20102 (modify_vtable_entry): Simplify.
20103 (add_virtual_function): Rename BF_ macros to BV_ variants.
20104 (build_vtable_initializer): Likewise.
20105 (get_class_offset_1): Remove.
20106 (dfs_get_class_offset): Likewise.
20107 (get_class_offset): Likewise.
20108 (dfs_find_final_overrider): New function.
20109 (find_final_overrider): Likewise.
20110 (modify_one_vtable): Remove.
20111 (dfs_find_base): New function.
20112 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
20113 find_final_overrider.
20114 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
20116 (dfs_fixup_vtable_deltas): Remove.
20117 (override_one_vtable): Remove.
20118 (merge_overrides): Likewise.
20119 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20120 unreal chilren of virtual bases.
20121 (finish_struct_1): Don't use merge_overrides. Don't use
20122 dfs_fixup_vtable_deltas.
20123 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20126 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20127 Jason Merrill <jason@yorick.cygnus.com>
20129 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20131 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
20133 * exception.cc (__throw_bad_typeid): Add missing std::.
20135 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20137 * cp-tree.h (make_thunk): PROTO -> PARAMS.
20139 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
20141 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20143 Runtime support for new-abi rtti.
20144 * inc/typeinfo (type_info::operator!=): Define in class.
20145 (type_info::before, type_info::name, type_info::operator==,
20146 type_info::operator!=): Define new ABI implementations.
20147 (type_info::is_pointer_p, type_info::is_function_p): Declare
20148 new virtual functions.
20149 (type_info::do_catch, type_info::do_upcast): Likewise.
20151 * tinfo.h (__base_class_info): Define new class.
20152 (__class_type_info): Likewise.
20153 (__si_class_type_info): Likewise.
20154 (__vmi_class_type_info): Likewise.
20155 (__dynamic_cast): Prototype.
20157 * tinfo.cc: Conditionalize old and new rtti mechanisms.
20158 (type_info::is_pointer_p): Define new function.
20159 (type_info::is_function_p): Likewise.
20160 (type_info::do_catch): Likewise.
20161 (type_info::do_upcast): Likewise.
20162 (vtable_prefix): New structure for vtable access.
20163 (adjust_pointer): Define new template function.
20164 (contained_p, public_p, virtual_p, contained_public_p,
20165 contained_nonpublic_p, contained_nonvirtual_p): Define new
20167 (nonvirtual_base_type): New local variable.
20168 (__class_type_info::~__class_type_info): Define.
20169 (__si_class_type_info::~__si_class_type_info): Likewise.
20170 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20171 (__class_type_info::do_catch): Define new function.
20172 (__class_type_info::do_upcast): Likewise.
20173 (__class_type_info::find_public_src): Likewise.
20174 (__class_type_info::do_find_public_src): Likewise.
20175 (__si_class_type_info::do_find_public_src): Likewise.
20176 (__vmi_class_type_info::do_find_public_src): Likewise.
20177 (__class_type_info::do_dyncast): Likewise.
20178 (__si_class_type_info::do_dyncast): Likewise.
20179 (__vmi_class_type_info::do_dyncast): Likewise.
20180 (__class_type_info::do_upcast): Likewise.
20181 (__si_class_type_info::do_upcast): Likewise.
20182 (__vmi_class_type_info::do_upcast): Likewise.
20183 (__dynamic_cast): Likewise.
20185 * tinfo2.cc (__fundamental_type_info): Define new class.
20186 (__pointer_type_info): Likewise.
20187 (__reference_type_info): Likewise.
20188 (__array_type_info): Likewise.
20189 (__function_type_info): Likewise.
20190 (__enum_type_info): Likewise.
20191 (__ptr_to_member_type_info): Likewise.
20192 (__fundamental_type_info::~__fundamental_type_info): Define.
20193 (__pointer_type_info::~__pointer_type_info): Likewise.
20194 (__reference_type_info::~__reference_type_info): Likewise.
20195 (__array_type_info::~__array_type_info): Likewise.
20196 (__function_type_info::~__function_type_info): Likewise.
20197 (__enum_type_info::~__enum_type_info): Likewise.
20198 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20199 (__pointer_type_info::do_catch): Define new function.
20200 (__ptr_to_member_type_info::do_catch): Define new function.
20202 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20203 (__is_pointer): Likewise.
20205 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20207 2000-01-30 Mark Mitchell <mark@codesourcery.com>
20209 * cp/class.c (build_vtable): Rename to build_primary_vtable.
20210 (prepare_fresh_vtable): Rename to build_secondary_vtable.
20211 (make_new_vtable): New function.
20212 (modify_vtable_entry): Handle generation of new vtables correctly.
20213 (modify_one_vtable): Remove unused parameter.
20214 (dfs_fixup_vtable_deltas): Likewise.
20215 (override_one_vtable): Use build_secondary_vtable.
20216 (finish_struct_1): Use build_primary_vtable and
20217 build_secondary_vtable.
20219 2000-01-28 Ulrich Drepper <drepper@redhat.com>
20221 * cp/decl.c: Adjust variable names, comments, help strings.
20223 2000-01-29 Nathan Sidwell <nathan@acm.org>
20225 * new2.cc (operator delete[]): Use operator delete, don't assume
20228 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
20230 * class.c (build_vtbl_initializer): Add argument to
20231 build_vtable_entry call.
20233 2000-01-27 Mark Mitchell <mark@codesourcery.com>
20235 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20236 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20237 (BF_DELTA): New macro.
20238 (BF_VCALL_INDEX): Likewise.
20240 (THUNK_VCALL_OFFSET): Likewise.
20241 (make_thunk): Change prototype.
20242 * class.c (build_vtable_entry): Integrate
20243 build_vtable_entry_for_fn. Handle vcall indices.
20244 (build_vtable_entry_for_fn): Remove.
20245 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
20246 BF_VCALL_INDEX, BF_FN.
20247 (modify_vtable_entry): Integrate common code from
20248 modify_one_vtable and dfs_fixup_vtable_deltas.
20249 (add_virtual_function): Set BF_VCALL_INDEX.
20250 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
20252 (modify_one_vtable): Simplify.
20253 (dfs_fixup_vtable_deltas): Likewise.
20254 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20255 * method.c (make_thunk): Handle vcall indices.
20257 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
20259 Compiler side new abi rtti (not enabled).
20260 * cp-tree.h (new_abi_rtti_p): New macro.
20261 (emit_support_tinfos): Prototype new function.
20262 (tinfo_decl_p): Likewise.
20263 (emit_tinfo_decl): Likwise.
20264 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20266 (doing_runtime): New local static.
20267 (init_rtti_processing): Add new-abi initializer.
20268 (get_tinfo_decl): Add new-abi logic.
20269 (tinfo_from_decl): Likewise.
20270 (build_dynamic_cast_1): Likewise.
20271 (qualifier_flags): New static function.
20272 (tinfo_base_init): Likewise.
20273 (generic_initializer): Likewise.
20274 (ptr_ref_initializer): Likewise.
20275 (ptmd_initializer): Likewise.
20276 (class_hint_flags): Likewise.
20277 (class_initializer): Likewise.
20278 (synthesize_tinfo_var): Likewise.
20279 (create_real_tinfo_var): Likewise.
20280 (create_pseudo_type_info): Likewise.
20281 (get_vmi_pseudo_type_info): Likewise.
20282 (create_tinfo_types): Likewise.
20283 (emit_support_tinfos): New global function.
20284 (tinfo_decl_p): New global predicate.
20285 (emit_tinfo_decl): New global function.
20286 * class.c (set_rtti_entry): Generalize for old and new rtti.
20287 (build_vtbl_initializer): Likewise.
20288 * decl2.c (finish_file): Likewise.
20290 2000-01-27 Jim Wilson <wilson@cygnus.com>
20292 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20293 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20295 2000-01-27 Mike Stump <mrs@wrs.com>
20297 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20300 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
20302 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20304 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
20306 * optimize.c (calls_setjmp_r): Supply new argument
20307 to special_function_p.
20309 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20311 * call.c: PROTO -> PARAMS.
20312 * class.c: Likewise.
20313 * cp-tree.h: Likewise.
20315 * decl.c: Likewise.
20316 * decl.h: Likewise.
20317 * decl2.c: Likewise.
20318 * dump.c: Likewise.
20319 * errfn.c: Likewise.
20320 * error.c: Likewise.
20321 * except.c: Likewise.
20322 * expr.c: Likewise.
20323 * init.c: Likewise.
20324 * input.c: Likewise.
20327 * method.c: Likewise.
20328 * optimize.c: Likewise.
20329 * parse.y: Likewise.
20331 * repo.c: Likewise.
20332 * rtti.c: Likewise.
20333 * search.c: Likewise.
20334 * semantics.c: Likewise.
20335 * spew.c: Likewise.
20336 * tree.c: Likewise.
20337 * typeck.c: Likewise.
20338 * typeck2.c: Likewise.
20339 * xref.c: Likewise.
20341 2000-01-25 Richard Henderson <rth@cygnus.com>
20343 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20345 2000-01-25 Mark Mitchell <mark@codesourcery.com>
20347 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20348 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20349 (struct vcall_offset_data_s): New type.
20350 (dfs_vcall_offset_queue_p): New function.
20351 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20352 (build_vcall_offset_vtbl_entries): Likewise.
20353 (layout_vtable_decl): Likewise.
20354 (num_vfun_entries): Likewise.
20355 (num_extra_vtbl_entries): Add the entries for vcall offsets.
20356 (build_vtbl_initializer): Likewise.
20357 (dfs_finish_vtabls): Use layout_vtable_decl.
20358 (modify_one_vtables): Always duplicate vtables under the new ABI.
20359 (finish_struct_1): Use layout_vtable_decl.
20361 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20363 * decl.c (member_function_or_else): Change third arg from a format
20364 specifier to an `enum overload_flags'. Callers changed.
20366 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
20368 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20369 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20370 build_const_cast, get_delta_difference, check_return_expr): Avoid
20371 ANSI string concatenation usage.
20373 2000-01-24 Mark Mitchell <mark@codesourcery.com>
20375 * class.c (layout_class_type): Put the fields required to make a
20376 class non-empty at the end, not the beginning, of the TYPE_FIELDs
20379 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
20381 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20384 * decl2.c (mark_used): Do instantiate inlines that have been
20385 explicitly instantiated.
20387 2000-01-24 Richard Henderson <rth@cygnus.com>
20389 * call.c (build_over_call): Use expand_tree_builtin.
20390 * typeck.c (build_function_call_real): Likewise.
20391 (build_binary_op_nodefault): Handle unordered compares.
20393 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20395 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20396 cp_tree_index values.
20397 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20398 New global node #defines for them.
20399 * rtti.c (call_void_fn): Replace with ...
20400 (build_runtime_decl): ... new static function.
20401 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20402 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20403 (build_dynamic_cast_1): Always produce correctly typed result.
20404 Explicitly produce type_info addresses. Use dynamic_cast_node.
20405 * exception.cc (__throw_bad_cast): Return `void *'.
20406 (__throw_bad_typeid): Return `const type_info &'.
20408 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20410 * cp-tree.h (get_vtable_decl): Prototype new function.
20411 * class.c (get_vtable_decl): New function. Broken out from ...
20412 (build_vtable): ... here. Use it.
20413 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20414 by get_vtable_decl.
20416 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20418 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20419 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20420 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20421 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20422 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20423 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20424 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20425 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20426 (CPTI_TINFO_VAR_ID): New enumeration.
20427 (__tp_desc_type_node, __access_mode_type_node,
20428 __bltn_desc_type_node, __user_desc_type_node,
20429 __class_desc_type_node, __ptr_desc_type_node,
20430 __attr_desc_type_node, __func_desc_type_node,
20431 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20432 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20433 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20434 enum_desc_type_node, class_desc_type_node,
20435 si_class_desc_type_node, vmi_class_desc_type_node,
20436 ptmd_desc_type_node, base_desc_type_node): New #defines.
20437 (tinfo_fn_id, tinfo_fn_type): Rename to ...
20438 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20439 (tinfo_var_id): New enumeration.
20440 (DECL_TINFO_FN_P): Augment comment.
20441 * decl.c (cp_global_trees): Adjust documentation.
20442 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20443 tinfo_decl_type and tinfo_var_id.
20444 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20445 (build_typeid): Remove unused variable.
20446 (get_tinfo_var): Use tinfo_var_id.
20447 (tinfo_name): New static function.
20448 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20449 (tinfo_from_decl): Likewise.
20450 (get_base_offset): New static function, broken out of
20452 (expand_si_desc): Use tinfo_name.
20453 (expand_class_desc): Likewise. Lose local static variable.
20454 Use base_desc_type_node. Use get_base_offset.
20455 (expand_ptr_desc): Use tinfo_name.
20456 (expand_attr_desc): Likewise.
20457 (expand_generic_desc): Likewise.
20459 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20460 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20462 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20464 * cp-tree.h (__eprintf): Remove declaration.
20465 * tree.c (__eprintf): Remove definition.
20467 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
20468 Mark Mitchell <mark@codesourcery.com>
20470 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20471 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20473 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
20475 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20477 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20479 * cp-tree.h (register_dtor_fn): New function.
20480 * decl.c (destroy_local_static): Rename to ...
20481 (register_dtor_fn): ... this. Give it external linkage.
20482 (expand_static_init): Use it.
20483 * decl2.c (do_static_initialization): Likewise, if using
20485 (do_static_destruction): Check that __cxa_atexit is not in use.
20486 (finish_file): Don't call do_static_destruction if using
20489 * typeck.c (convert_arguments): Restore two-message error
20492 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
20494 Remap dynamic cast hint values to be consistent across ABIs.
20495 * search.c (dynamic_cast_base_recurse): Remap generated value.
20496 (get_dynamic_cast_base_type): Adjust documentation.
20497 * tinfo.h (__user_type_info::dyncast): Likewise.
20498 (__user_type_info::find_public_subobj): Remap BOFF meaning.
20499 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20500 (__class_type_info::do_dyncast): Likewise.
20501 (__class_type_info::do_find_public_subobj): Likewise.
20502 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20504 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20506 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20508 * typeck2.c (incomplete_type_error): Restore previous
20509 cp_error and cp_error_at call sequence.
20511 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
20513 * class.c (dump_class_hierarchy): Make format agree with argument;
20514 cast pointer to unsigned long and print with %lx.
20516 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20518 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20520 * typeck.c (composite_pointer_type, common_type,
20521 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20522 build_function_call_real, convert_arguments,
20523 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20524 build_unary_op, mark_addressable, build_compound_expr,
20525 build_static_cast, build_reinterpret_cast, build_const_cast,
20526 build_c_cast, build_modify_expr, get_delta_difference,
20527 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20528 'ISO C++'. Fusion consecutive calls to diagnostic message routines
20530 * typeck2.c (readonly_error, abstract_virtuals_error,
20531 process_init_constructor, check_for_new_type): Likewise.
20533 2000-01-19 Mark Mitchell <mark@codesourcery.com>
20535 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20538 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
20540 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20541 (build_x_typeid): Likewise.
20542 (get_tinfo_fn): Likewise.
20543 (get_tinfo_fn_unused): Rename to ...
20544 (get_tinfo_decl): ... here.
20545 * rtti.c (build_headof): Replace logic error with assertion.
20546 (get_tinfo_fn_dynamic): Rename to ...
20547 (get_tinfo_decl_dynamic): ... here. Make static. Use
20548 complete_type_or_else.
20549 (build_x_typeid): Move into ...
20550 (build_typeid): ... here. Adjust call to
20551 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20552 throw_bad_typeid expression.
20553 (get_tinfo_fn_unused): Rename to ...
20554 (get_tinfo_decl): ... here. Adjust comment.
20555 (get_tinfo_fn): Delete.
20556 (tinfo_from_decl): New static function.
20557 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20558 (get_typeid): Use complete_type_or_else.
20559 (build_dynamic_cast_1): Adjust calls to
20560 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20561 * parse.y (primary): Adjust call to build_typeid.
20562 * except.c (build_eh_type_type_ref): Adjust call to
20563 get_tinfo_decl. Mark as used.
20564 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20565 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20566 * parse.c: Regenerated.
20568 2000-01-17 Mark Mitchell <mark@codesourcery.com>
20570 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
20571 calling convention.
20572 (resolves_to_fixed_type_p): Document calling convention.
20573 * rtti.c (build_x_typeid): Initialize NONNULL.
20575 * cp-tree.h (build_shared_int_cst): New function.
20576 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20577 * class.c (modify_vtable_entry): Likewise.
20578 (add_virtual_function): Split out code to generated shared
20579 INTEGER_CSTs to build_share_int_cst.
20580 (modify_all_vtables): Handle all the overridden functions here.
20581 Add overridden functions from non-primary virtual bases to the
20583 (finish_struct_1): Adjust call to modify_all_vtables. Add
20584 overridden functions from non-primary bases to the vtable.
20585 * tree.c (build_shared_int_cst): New function.
20587 * cp-tree.h (scratchalloc): Remove.
20588 (build_scratch_list): Likewise.
20589 * call.c (convert_class_to_reference): Replace build_scratch_list
20590 and build_expr_list with build_tree_list.
20591 (add_candidate): Replace scratchalloc with expralloc. Note memory
20593 (build_user_type_conversion_1): Replace build_scratch_list
20594 and build_expr_list with build_tree_list.
20595 (build_new_op): Likewise.
20596 (build_op_delete_call): Likewise.
20597 (convert_like): Likewise.
20598 * cvt.c (ocp_convert): Likewise.
20599 * decl.c (start_decl): Likewise.
20600 (start_function): Likewise.
20601 (finish_destructor_body): Likewise.
20602 (maybe_build_cleanup_1): Likewise.
20603 * decl2.c (reparse_decl_as_expr): Likewise.
20604 * init.c (perform_member_init): Likewise.
20605 (expand_cleanup_for_base): Likewise.
20606 (build_builtin_delete_call): Likewise.
20607 (build_new_1): Likewise.
20608 (build_delete): Likewise.
20609 * method.c (do_build_assign_ref): Likewise.
20610 * parse.y (already_scoped_stmt): Likewise.
20611 (nontrivial_exprlist): Likewise.
20612 (net_initializer): Likewise.
20613 (initlist): Likewise.
20614 * parse.c: Regenerated.
20615 * rtti.c (build_x_typeid): Likewise.
20616 (build_dynamic_cast_1): Likewise.
20617 * typeck.c (build_x_compound_expr): Likewise.
20618 (build_static_cast): Likewise.
20619 (build_modify_expr): Likewise.
20621 * cp-tree.h (DECL_VINDEX): Add documentation.
20622 * class.c (build_vtable_entry): Likewise.
20623 (start_vtable): Add comment.
20624 (add_virtual_function): Replace pending_hard_virtuals with
20625 overridden_virtuals and pending_virtuals with new_virtuals.
20626 Replace redundant assignments with assertions.
20627 (check_for_override): Add comment.
20628 (check_bases_and_members): Replace pending_hard_virtuals with
20629 overridden_virtuals and pending_virtuals with new_virtuals.
20630 (create_vtbl_ptr): Likewise.
20631 (layout_class_type): Likewise.
20632 (finish_struct_1): Likewise. Add comments.
20634 2000-01-16 Mark Mitchell <mark@codesourcery.com>
20636 * class.c (finish_struct_1): Replace redundant code with
20639 * cp-tree.h (flag_new_abi): Move.
20640 (flag_use_cxa_atexit): Likewise.
20641 (flag_honor_std): Likewise.
20642 (flag_rtti): Likewise.
20643 (vbase_offsets_in_vtable_p): Define.
20644 (vptrs_present_everywhere_p): Likewise.
20645 (TYPE_CONTAINS_VPTR_P): Likewise.
20646 (dfs_walk_real): Declare.
20647 * class.c (build_vbase_pointer_fields): Check
20648 vbase_offsets_in_vtable_p.
20649 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20651 (build_vbase_offset_vtbl_entries): Simplify.
20652 (build_vbase_offset_vtbl_entries): Adjust.
20653 (build_vbase_pointer): Add ability to look up vbase offsets in
20655 (start_vtable): New function.
20656 (add_virtual_function): Use it.
20657 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20658 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20659 (build_vtbl_initializer): Take the type of the complete object as
20660 input. Use it to correctly calculate vbase offsets.
20661 (dfs_finish_vtbls): Pass the complete type to
20662 build_vtbl_initializer.
20663 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20664 (create_vtable_ptr): Create a vtable even if there are no
20665 new virtual functions, under the new ABI.
20666 (finish_struct_1): Likewise.
20667 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20668 * decl.c (exapnd_static_init): Remove call to
20669 preserve_initializer.
20670 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20672 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20673 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20674 (construct_virtual_bases): Don't initialize virtual base pointers
20676 (build_aggr_init): Clean up comment.
20677 (expand_aggr_init_1): Likewise.
20678 * rtti.c (expand_class_desc): Store the virtual function table
20679 index where the vbase offset lives in the offset field.
20680 * search.c (dfs_walk_real): Make it global.
20681 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20682 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20684 * tinfo.h (USItype): Make it signed under the new ABI.
20685 * tinfo.cc (convert_to_base): New function. Encapsulate base
20686 conversion logic here.
20687 (__class_type_info::do_upcast): Use it.
20688 (__class_type_info::do_dyncast): Likewise.
20689 (__class_type_info::do_find_public_subobj): Likewise.
20691 * init.c (construct_virtual_bases): Don't look up the addresses of
20692 virtual bases at run-time.
20694 * class.c (build_vbase_pointer): Relocate.
20695 (build_vbase_pointer_fields): Likewise.
20696 (dfs_build_vbase_offset_vtbl_entries): Likewise.
20697 (build_vbase_offset_vtbl_entries): Likewise.
20699 * decl.c (init_decl_processing): Complain if -fnew-abi
20700 -fno-vtable-thunks is used.
20702 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20705 2000-01-15 Mark Mitchell <mark@codesourcery.com>
20707 * cp-tree.h (num_extra_vtbl_entries): New function.
20708 (size_extra_vtbl_entries): Likewise.
20709 (dfs_vtable_path_unmark): Likewise.
20710 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20711 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20712 * class.c (num_extra_vtbl_entries): New function.
20713 (size_extra_vtbl_entries): Likewise.
20714 (dfs_build_vbase_offset_vtbl_entries): New function.
20715 (build_vbase_offset_vtbl_entries): Likewise.
20716 (build_vtbl_initializer): Use it.
20717 (finish_struct_1): Adjust vtable sizes (using
20718 num_extra_vtbl_entries).
20719 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20720 THUNK_DECL is non-NULL before expanding it.
20721 * init.c (expand_virtual_init): Adjust the vtable pointer by
20722 size_extra_vtbl_entries before storing it.
20723 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20724 Handle TREE_LIST parameters here, not in the dfs_* functions.
20725 (dfs_unmarked_real_bases_queue_p): Adjust.
20726 (dfs_marked_real_bases_queue_p): Likewise.
20727 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20728 (dfs_vtable_path_marked_real_bases_queue_p): New function.
20729 (dfs_vtable_path_unmark): Likewise.
20731 2000-01-14 Mark Mitchell <mark@codesourcery.com>
20733 * optimize.c (copy_body_r): Clear the operand three of a
20734 TARGET_EXPR when copying it.
20736 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20738 * method.c (build_decl_overload_real): Check whether we are in ::
20739 before returning __builtin_new/delete.
20741 2000-01-13 Mark Mitchell <mark@codesourcery.com>
20743 * pt.c (tsubst_friend_function): Improve comment.
20744 (instantiate_decl): Avoid crashing when a "nested" function is
20745 instantiated from the top level.
20747 * dump.c (dqeueue_and_dump): Dump
20748 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20750 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20752 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20754 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
20756 * g++spec.c (lang_specific_driver): Add -fnew-abi if
20757 ENABLE_NEW_GXX_ABI defined.
20758 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20759 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20760 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20762 2000-01-12 Mark Mitchell <mark@codesourcery.com>
20764 * decl.c (start_cleanup_fn): Call pushdecl.
20766 * call.c (convert_class_to_reference): Fix typos.
20767 (build_conditional_expr): Handle errors gracefully.
20768 * class.c (push_nested_class): Likewise.
20769 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20770 (DECL_THIS_EXTERN): Use it.
20771 (DECL_THIS_STATIC): Likewise.
20772 * cvt.c (convert_to_void): Handle errors gracefully.
20773 (build_expr_type_conversion): Likewise.
20774 * decl.c (maybe_push_decl): Likewise.
20775 (start_decl_1): Likewise.
20776 (require_complete_types_for_parms): Likewise.
20777 * parse.y (structsp): Likewise.
20778 (base_class): Likewise.
20779 * parse.c: Regenerated.
20780 * pt.c (finish_member_template_decl): Likewise.
20781 * typeck.c (decay_conversion): Likewise.
20783 * cp-tree.h (dfs_skip_vbases): New function.
20784 (find_vbase_instance): Likewise.
20785 * class.c (determine_primary_base): Allow a nearly empty base to
20786 serve as a primary base class under the new ABI.
20787 (get_class_offset_1): Rename to ...
20788 (dfs_get_class_offset): ... this. Simplify. Don't issue error
20790 (get_class_offset): Use it. Issue error messages here.
20791 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20792 find the right copies of virtual bases.
20793 (fixup_vtable_deltas1): Rename to ...
20794 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
20795 bases as primary bases.
20796 (fixup_vtable_deltas): Remove.
20797 (override_one_vtable): Handle virtual bases as primary bases.
20798 (merge_overrides): Likewise.
20799 (finish_struct_1): Likewise.
20800 (dump_class_hierarchy): Dump primary-ness of bases as well.
20801 * search.c (mark_primary_bases): Use a pre-order traversal to
20802 handle primary virtual bases.
20803 (dfs_skip_vbases): New fiunction.
20804 (expand_upcast_fixups): Adjust to handle primary virtual bases.
20805 (fixup_virtual_upcast_offsets): Likewise.
20806 (fixup_all_virtual_upcast_offsets): Likewise.
20807 (dfs_find_vbase_instances): New function.
20808 (find_vbase_instance): Likewise.
20810 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
20812 * lex.c (DIR_SEPARATOR): Delete macro.
20814 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
20816 * decl2.c (lang_decode_option): Handle automatic line wrapping
20819 2000-01-11 Mark Mitchell <mark@codesourcery.com>
20821 * friend.c (do_friend): Don't resolve scopes when processing
20822 template declarations, even if the qualifying scope doesn't
20823 involve template parameters.
20825 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
20827 * class.c (dfs_modify_vtables_queue_p): Remove.
20828 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20829 and dfs_marked_real_bases_queue_p instead of
20830 dfs_modify_vtables_queue_p.
20832 * class.c (build_vbase_path): Simplify.
20833 (dfs_propagate_binfo_offsets): New function.
20834 (propagate_binfo_offsets): Use it.
20835 (remove_base_field): Simplify.
20836 (dfs_set_offset_for_vbases): Remove.
20837 (dfs_set_offset_for_shared_vbases): New function.
20838 (dfs_set_offset_for_unshared_vbases): Likewise.
20839 (layout_virtual_bases): Use them.
20840 (layout_basetypes): Don't call propagate_binfo_offsets.
20841 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20844 * class.c (build_base_field): New function, split out from ...
20845 (build_base_fields): ... here. Use it. Allocate primary bases
20846 first, under the new ABI.
20847 (get_vtable_entry): Remove.
20848 (remove_base_field): New function, split out from ...
20849 (remove_base_fields): ... here. Adjust since primary bases come
20850 first under the new ABI.
20852 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20853 (initialize_vtbl_ptrs): New function.
20854 (expand_indirect_vtbls_init): Change prototype.
20855 (convert_pointer_to_vbase): Declare.
20856 * init.c (expand_direct_vtbls_init): Remove.
20857 (dfs_initialize_vtbl_ptrs): New function.
20858 (initialize_vtbl_ptrs): Likewise.
20859 (emit_base_init): Use initialize_vtbl_ptrs.
20860 * search.c (convert_pointer_to_vbase): Make it global.
20861 (expand_indirect_vtbls_init): Remove vtable initialization code.
20862 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20864 * class.c (dfs_finish_vtbls): New function.
20865 (finish_vtbls): Use it.
20866 (dump_class_hierarchy): New function.
20868 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20869 (BINFO_VBASE_PRIMARY_P): New macro.
20870 (BINFO_VIRTUALS): Add to documentation.
20871 (SET_BINFO_PRIMARY_MARKED_P): Remove.
20872 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20873 (dfs_mark_primary_bases_queue_p): Likewise.
20874 (dfs_unmarked_real_bases_queue_p): New function.
20875 (dfs_marked_real_bases_queue_p): Likewise.
20876 * search.c (dfs_mark_primary_bases): Adjust.
20877 (mark_primary_bases): Likewise.
20878 (get_shared_vbase_if_not_primary): New function.
20879 (dfs_unmarked_real_bases_queue_p): Likewise.
20880 (dfs_marked_real_bases_queue_p): Likewise.
20881 (dfs_get_pure_virtuals): Simplify.
20882 (get_pure_virtuals): Likewise.
20884 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20886 * lex.c: Include tm_p.h.
20888 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
20890 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20892 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
20894 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20895 * pt.c (instantiate_decl): Defer comdat templates that might not be
20898 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20899 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20900 (finish_file): Likewise.
20902 * decl2.c (import_export_class): Undo 12/14 change.
20904 * error.c (dump_decl): operator new, not operatornew.
20906 * class.c (field_decl_cmp): A nontype is "greater" than a type.
20907 * search.c (lookup_field_1): Look for the last field with the
20910 2000-01-05 Nathan Sidwell <nathan@acm.org>
20912 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20915 2000-01-05 Nathan Sidwell <nathan@acm.org>
20917 * typeck.c (build_static_cast): Don't strip target qualifiers
20918 when casting from a class.
20920 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20922 * class.c (warn_hidden): Initialize variable `fndecl'.
20924 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
20926 * decl.c (flag_isoc9x): New variable to be able to use code in
20927 c-common.c. For now always zero.
20929 2000-01-03 Mark Mitchell <mark@codesourcery.com>
20931 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20932 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20933 or unshare_base_binfos for virtual bases here.
20934 * search.c (dfs_get_vbase_types): Do it here.
20935 (get_vbase_types): Adjust.
20937 2000-01-02 Mark Mitchell <mark@codesourcery.com>
20939 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20940 (BINFO_PRIMARY_MARKED_P): Use flag 5.
20941 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20942 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20943 (unmark_primary_bases): Remove declaration.
20944 (unmarkedp): Declare.
20945 (dfs_vbase_unmark): Likewise.
20946 * class.c (determine_primary_base): Return immediately if there
20947 are no base classes. Call mark_primary_bases here.
20948 (modify_all_direct_vtables): Remove.
20949 (modify_all_indirect_vtables): Remove.
20950 (dfs_modify_vtables_queue_p): New function.
20951 (dfs_modify_vtables): New function.
20952 (modify_all_vtables): Use them.
20953 (build_base_fields): Build FIELD_DECLs for primary virtual base
20955 (create_vtable_ptr): Don't call determine_primary_base here.
20956 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20957 (dfs_set_offset_for_vbases): ... this.
20958 (layout_virtual_bases): Use it.
20959 (layout_class_type): Call determine_primary_base here.
20960 * search.c (unmarkedp): Make it global.
20961 (shared_marked_p): Simplify.
20962 (shared_unmarked_p): Likewise.
20963 (dfs_primary_bases_queue_p): Remove.
20964 (dfs_unmark_primary_bases): Likewise.
20965 (unmark_primary_bases): Likewise.
20966 (mark_primary_bases): Simplify.
20967 (get_pure_virtuals): Don't call mark_primary_bases here.
20968 (dfs_vbase_unmark): New function.
20969 (get_vbase_types): Simplify.
20971 * class.c (struct base_info): Remove.
20972 (determine_primary_base): Take has_virtual_p rather than a
20973 base_info as input. Don't calculate max_has_virtual.
20974 (finish_struct_bits): Remove max_has_virtual argument.
20975 (create_vtable_ptr): Remove max_has_virtual_p argument.
20976 (layout_virtual_bases): Remove max argument.
20977 (layout_basetypes): Likewise.
20978 (layout_class_type): Remove max_has_virtual_p argument.
20979 (finish_struct_1): Remove max_has_virtual.
20981 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20982 (layout_basetypes): Remove.
20983 * class.c (propagate_binfo_offsets): Moved here from tree.c.
20984 Update to handle primary virtual bases.
20985 (remove_base_fields): New function, split out from
20987 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20988 (layout_virtual_bases): New function, split out from
20989 layout_basetypes. Update to handle primary virtual bases.
20990 (layout_basetypes): Moved here from tree.c. Use
20991 remove_base_fields and layout_virtual_bases.
20992 * search.c (dfs_mark_primary_bases_queue_p): New function.
20993 (mark_primary_bases): Use it.
20994 * tree.c (CEIL): Remove.
20995 (propagate_binfo_offsets): Remove.
20996 (layout_basetypes): Remove.
20998 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21000 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21001 (BINFO_PRIMARY_MARKED_P): New macro.
21002 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21003 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21004 (mark_primary_bases): New function.
21005 (unmark_primary_bases): Likewise.
21006 * search.c (get_abstract_virtuals_1): Remove.
21007 (dfs_mark_primary_bases): New function.
21008 (mark_primary_bases): Likewise.
21009 (dfs_unmark_primary_bases): Likewise.
21010 (unmark_primary_bases): Likewise.
21011 (dfs_get_pure_virtuals): Likewise.
21013 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21015 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21016 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21017 (modify_one_vtable): Adjust.
21018 (fixup_vtable_deltas1): Likewise.
21019 (override_one_vtable): Likewise.
21020 * search.c (get_abstract_virtuals_1): Likewise.
21021 (get_pure_virtuals): Likewise.
21022 (expand_upcast_fixups): Likewise.
21023 * tree.c (debug_binfo): Likewise.
21025 * class.c (build_vtable): Don't return a value. Don't rebuild
21026 vtables for bases that have already been handled.
21027 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21028 already been handled.
21029 (modify_one_vtable): Adjust accordingly.
21030 (fixup_vtable_deltas1): Likewise.
21031 (finish_struct_1): Likewise.
21033 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21035 * call.c (build_new_method_call): Also check destructors.