1 2003-09-14 Mark Mitchell <mark@codesourcery.com>
3 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
4 an bit-field whose width exceeds that of its type.
6 2003-09-14 Geoffrey Keating <geoffk@apple.com>
8 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
10 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
12 * ChangeLog: Follow spelling conventions.
15 2003-09-13 Richard Henderson <rth@redhat.com>
17 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
18 during relaxation loop.
20 2003-09-11 David Edelsohn <edelsohn@gnu.org>
22 * decl2.c (var_finalized_p): Swap arms of conditional.
24 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
27 * typeck.c (build_address): If it is a function, mark it used.
28 (build_unary_op): Do not lose object's side-effects when taking
29 address of static member function.
30 * class.c (resolve_address_of_overloaded_function): Use
31 tsubst_flags_t parameter. Only expect overload sets. Adjust.
32 (instantiate_type): Adjust flags passing. Do not lose object's
33 side-effects when taking address of static member function.
35 2003-09-11 Richard Henderson <rth@redhat.com>
37 * semantics.c (expand_or_defer_fn): Update for new
38 cgraph_finalize_function argument.
40 2003-09-10 Richard Henderson <rth@redhat.com>
42 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
44 2003-09-10 Jan Hubicka <jh@suse.cz>
46 * decl2.c (var_finalized_p): New.
47 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
49 2003-09-10 Richard Henderson <rth@redhat.com>
51 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
53 (lower_function): Remove.
54 * cp-tree.h: Update to match.
55 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
56 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
58 2003-09-09 Richard Henderson <rth@redhat.com>
60 * semantics.c (expand_or_defer_fn): Update call to
61 cgraph_finalize_function.
63 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
66 * decl2.c (finish_file): Avoid out-of-bounds array reference
69 2003-09-09 Richard Henderson <rth@redhat.com>
71 * decl2.c (mark_member_pointers): Rename from
72 mark_member_pointers_and_eh_handlers and don't check eh handlers.
74 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
77 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
79 2003-09-08 Mark Mitchell <mark@codesourcery.com>
81 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
82 c_register_builtin_type.
85 * decl2.c (add_function): Do not complain about seeing the same
87 * semantics.c (perform_koenig_lookup): Improve documentation.
90 * pt.c (try_one_overload): Add addr_p parameter.
91 (resolve_overloaded_unification): Pass it.
93 2003-09-08 Richard Henderson <rth@redhat.com>
95 * optimize.c (maybe_clone_body): Inc/dec function_depth.
97 2003-09-08 Richard Henderson <rth@redhat.com>
99 * decl.c (finish_function): Clear current_function_decl.
100 * decl2.c (mark_used): Don't push/pop gc context.
101 * optimize.c (optimize_function): Likewise.
102 * tree.c (cp_cannot_inline_tree_fn): Likewise.
103 * pt.c (instantiate_decl): Inc/dec function_depth instead.
104 * semantics.c (expand_body): Update for tree_rest_of_compilation
107 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
110 * error.c (dump_decl): Handle namespace-alias-definition.
111 * decl.c (warn_extern_redeclared_static): There is no point in
112 checking changes in storage class specifier for a namespace
114 (duplicate_decls): Tidy diagnostic message.
115 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
116 (pp_cxx_right_brace): Likewise.
117 (pp_cxx_original_namespace_definition): New function.
118 (pp_cxx_namespace_alias_definition): Likewise.
119 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
121 Sun Sep 7 13:15:14 CEST 2003 Jan Hubicka <jh@suse.cz>
123 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
124 Avoid re-emitting variables in unit-at-a-time mode.
126 2003-09-06 Mark Mitchell <mark@codesourcery.com>
129 * call.c (standard_conversion): Improve comments.
130 (perform_direct_initialization): Make sure we return an expression
132 * typeck.c (build_static_cast): Check for ambiguity and
133 accessibility when performing conversions.
135 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
137 * cp-tree.h (add_binding): Remove declaration.
138 * name-lookup.h (supplement_binding): Declare.
139 * decl.c (add_binding): Move to name-lookup.c.
140 (push_local_binding): Adjust.
141 (push_class_binding): Likewise.
142 (set_identifier_type_value_with_scope): Likewise.
143 * name-lookup.c (supplement_binding): Rename from add_binding.
144 Return a bool. Improve documentation.
145 (set_namespace_binding): Adjust.
146 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
148 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
151 * class.c (pushclass): Push dependent using decls for nested
152 classes of templates too.
154 2003-09-06 Roger Sayle <roger@eyesopen.com>
157 * class.c (resolve_address_of_overloaded_function): When building
158 list of matching non-template function decls, ignore anticipated
159 declarations of undeclared or shadowed GCC builtins.
161 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
164 * decl.c (define_label): Remove unreachable timevar pop.
165 Always return the decl, even if the definition is invalid.
167 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
170 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
171 unparsed functions queue.
173 2003-09-05 Mark Mitchell <mark@codesourcery.com>
176 * call.c (perform_direct_initialization): Correct logic for
177 direct-initialization of a class type.
180 * pt.c (lookup_template_function): Robustify.
182 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
185 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
186 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
187 is_type_p to lookup_qualified_name.
189 * semantics.c (finish_call_expr): Refactor some code.
192 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
193 (build_min_non_dep): Declare.
194 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
195 (build_min_non_dep): New.
196 * cvt.c (convert_to_void): Don't explicitly copy
197 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
198 * call.c (build_new_method_call): Use build_min_non_dep.
199 * decl2.c (grok_array_decl): Likewise.
200 (build_offset_ref_call_from_tree): Likewise.
201 * typeck.c (finish_class_member_access_expr,
202 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
203 build_x_conditional_expr, build_x_compound_expr): Likewise.
204 (build_static_cast, build_reinterpret_cast,
205 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
206 * typeck2.c (build_x_arrow): Use build_min_non_dep.
207 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
209 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
210 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
211 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
213 2003-09-04 Richard Henderson <rth@redhat.com>
215 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
216 change in cgraph_mark_needed_node arguments.
218 2003-09-02 Geoffrey Keating <geoffk@apple.com>
221 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
222 * tree.c (cp_cannot_inline_tree_fn): Likewise.
224 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
226 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
227 (expr_sizeof): Replace with ...
228 (cxx_sizeof_or_alignof_expr): ... here.
229 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
230 * parser.c (cp_parser_unary_expression): Commonize alignof and
232 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
234 * semantics.c (finish_sizeof, finish_alignof): Remove.
235 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
236 becomes bool. Set TREE_READONLY.
237 (expr_sizeof): Replace with ...
238 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
240 2003-09-04 Mark Mitchell <mark@codesourcery.com>
242 Remove cast-as-lvalue extension.
243 * call.c (build_conditional_expr): Correct formatting.
244 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
245 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
246 * cp-tree.h (non_cast_lvalue_p): Remove.
247 (real_non_cast_lvalue_p): Remove.
248 (non_cast_lvalue_or_else): Remove.
249 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
250 (real_lvalue_p): Adjust call to lvalue_p_1.
251 (non_cast_lvalue_p): Remove.
252 (non_cast_lvalue_or_else): Remove.
253 (lvalue_p): Adjust call to lvalue_p_1.
254 (lvalue_or_else): Simplify.
255 * typeck.c (build_unary_op): Use lvalue_or_else, not
256 non_cast_lvalue_or_else.
257 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
259 2003-09-03 DJ Delorie <dj@redhat.com>
261 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
263 2003-09-03 Mark Mitchell <mark@codesourcery.com>
266 * class.c (include_empty_classes): Correct logic for ABI version 1.
268 2003-09-03 Richard Henderson <rth@redhat.com>
270 * optimize.c (optimize_function): Push/pop ggc context around
271 the call to optimize_inline_calls.
273 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
276 * parser.c (cp_parser_decl_specifier_seq): Add check for a
277 duplicate friend decl-specifier.
279 2003-09-02 Mark Mitchell <mark@codesourcery.com>
282 * pt.c (convert_nontype_argument): Correct representation of
283 REFERENCE_TYPE expressions.
286 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
287 (finish_call_expr): Change prototype.
288 * parser.c (cp_parser_postfix_expression): Adjust call to
290 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
291 * semantics.c (finish_call_expr): Add koenig_p parameter.
293 2003-09-01 Mark Mitchell <mark@codesourcery.com>
296 * cp-tree.h (initialize_reference): Change prototype.
297 * call.c (initialize_reference): Add cleanup parameter.
298 * decl.c (grok_reference_init): Likewise.
299 (check_initializer): Likewise.
300 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
301 (duplicate_decls): When replacing an anticipated builtin, do not
303 * typeck.c (convert_for_initialization): Correct call to
304 initialize_reference.
307 * pt.c (dependent_type_p_r): Pass only the innermost template
308 arguments to any_dependent_template_arguments_p.
310 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
312 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
313 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
314 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
315 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
316 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
318 2003-08-29 Mark Mitchell <mark@codesourcery.com>
321 * pt.c (build_non_dependent_expr): Do not build a
322 NON_DEPENDENT_EXPR for a STRING_CST.
325 * search.c (add_conversions): Avoid adding two conversion
326 operators for the same type.
328 2003-08-29 Mark Mitchell <mark@codesourcery.com>
331 * pt.c (tsubst_copy_and_build): Correct handling of
332 address-of-label extension.
333 * semantics.c (finish_goto_stmt): The address of a label must go
334 through the lvalue-to-rvalue conversion.
336 2003-08-29 Richard Henderson <rth@redhat.com>
337 Jason Merrill <jason@redhat.com>
339 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
340 (LANG_HOOKS_RTL_EXPAND_STMT): New.
341 * cp-tree.h (cxx_expand_function_start): Declare.
342 * decl.c (start_function): Use allocate_struct_function.
343 Move stmts_are_full_exprs_p assertion from expand_body.
344 Do not free_after_parsing or free_after_compilation.
345 (cxx_push_function_context): Move code to set struct function
346 data from genrtl_start_function.
347 * optimize.c (optimize_function): Don't inc/dec function_depth.
348 * semantics.c (expand_body): Use tree_rest_of_compilation.
349 (cxx_expand_function_start): Rename from genrtl_start_function,
350 omit bits done by tree_rest_of_compilation.
351 (genrtl_finish_function): Remove.
352 (clear_decl_rtl): Move to ../tree-optimize.c.
354 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
357 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
359 * cxx-pretty-print.h: Declare.
360 * error.c (dump_template_parameter): Use it.
361 (dump_type): Likewise.
363 2003-08-28 Mark Mitchell <mark@codesourcery.com>
365 * init.c (decl_constant_value): Deal with COND_EXPR specially.
366 * call.c (build_conditional_expr): Revert previous patch.
369 * call.c (build_conditional_expr): Use decl_constant_value to
370 simplify the arguments.
372 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
374 * parser.c (struct cp_token): Use enum bitfields.
375 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
376 512B allocation unit.
377 (cp_parser_token_tree_map_node): Use enum bitfields.
379 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
382 * decl.c (push_class_level_binding): Correct old_decl value from
383 my 2003-07-29 reorganization.
385 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
386 (build_new_method_call): Add goto finish.
387 * semantics.c (simplify_aggr_init_exprs_r): Don't set
388 TREE_SIDE_EFFECTS on a call.
390 2003-08-25 Richard Henderson <rth@redhat.com>
392 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
394 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
396 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
397 (cxx_pretty_printer): Adjust base type.
398 (pp_cxx_function_specifier): Declare.
399 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
400 (pp_cxx_left_paren): Likewise.
401 (pp_cxx_right_paren): Likewise.
402 (pp_cxx_dot): Likewise.
403 (pp_cxx_arrow): Likewise.
404 (pp_cxx_semicolon): Likewise.
405 (pp_cxx_identifier): Likewise.
406 (pp_cxx_cv_qualifier_seq): Likewise.
407 (pp_cxx_storage_class_specifier): Likewise.
408 (pp_cxx_expression_list): Likewise.
409 (pp_cxx_space_for_pointer_operator): Likewise.
410 (pp_cxx_init_declarator): Likewise.
411 (pp_cxx_call_argument_list): Likewise.
412 (pp_cxx_nonconsecutive_character): Tidy.
413 (pp_cxx_conversion_function_id): New function.
414 (pp_cxx_template_id): Likewise.
415 (pp_cxx_template_keyword_if_needed): Likewise.
416 (pp_cxx_nested_name_specifier): Likewise.
417 (pp_cxx_unqualified_id): Tidy
418 (pp_cxx_qualified_id): Handle more nodes.
419 (pp_cxx_primary_expression): Tidy.
420 (pp_cxx_postfix_expression): Likewise.
421 (pp_cxx_new_expression): Tidy.
422 (pp_cxx_delete_expression): Likewise.
423 (pp_cxx_cast_expression): New function.
424 (pp_cxx_pm_expression): Tidy.
425 (pp_cxx_conditional_expression): Likewise.
426 (pp_cxx_assignment_operator): New function.
427 (pp_cxx_assignment_expression): Tidy.
428 (pp_cxx_expression): New function.
429 (pp_cxx_function_specifier): Likewise.
430 (pp_cxx_decl_specifier_seq): Likewise.
431 (pp_cxx_simple_type_specifier): Tidy.
432 (pp_cxx_type_specifier_seq): Likewise.
433 (pp_cxx_ptr_operator): New function.
434 (pp_cxx_implicit_parameter_type): Likewise.
435 (pp_cxx_parameter_declaration): Tidy.
436 (pp_cxx_parameter_declaration_clause): New function.
437 (pp_cxx_exception_specification): Likewise.
438 (pp_cxx_direct_declarator): Tidy.
439 (pp_cxx_declarator): Likewise.
440 (pp_cxx_ctor_initializer): New function.
441 (pp_cxx_function_definition): Likewise.
442 (pp_cxx_abstract_declarator): Tidy.
443 (pp_cxx_direct_abstract_declarator): Likewise.
444 (pp_cxx_type_id): Likewise.
445 (pp_cxx_exception_declaration): New function.
446 (pp_cxx_statement): Likewise.
447 (pp_cxx_simple_declaration): Likewise.
448 (pp_cxx_template_parameter_list): Likewise.
449 (pp_cxx_template_parameter): Likewise.
450 (pp_cxx_template_declaration): Likewise.
451 (pp_cxx_explicit_specialization): Likewise.
452 (pp_cxx_explicit_instantiation): Likewise.
453 (pp_cxx_declaration): Tidy.
454 (pp_cxx_pretty_printer_init): Initialize more fields.
456 2003-08-25 Mark Mitchell <mark@codesourcery.com>
459 * cp-tree.h (build_cplus_method_type): Remove.
460 * call.c (standard_conversion): Use build_method_type_directly
461 instead of build_cplus_method_type.
462 * class.c (build_clone): Likewise.
463 (adjust_clone_args): Likewise.
464 * decl.c (build_ptrmem_type): Likewise.
465 (grokdeclarator): Likewise.
466 (check_function_type): Likewise.
467 * decl2.c (grok_method_quals): Likewise.
468 (maybe_retrofit_in_chrg): Likewise.
469 * pt.c (copy_default_args_to_explicit_spec): Likewise.
470 (tsubst_function_type): Likewise.
472 * tree.c (build_cplus_method_type): Remove.
473 * typeck.c (merge_types): Use build_method_type_directly.
475 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
478 * search.c (dfs_access_in_type): Fix typo in comment.
479 (dfs_accessible_queue_p): Likewise.
480 (dfs_accessible_p): Only terminate when a friend is found.
481 (accessible_p): Return immediately if access_in_type allows
484 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
486 PR c++/641, c++/11876
487 * friend.c (add_friend): Add complain parameter.
488 (make_friend_class): Likewise.
489 (do_friend): Adjust add_friend call.
490 * decl.c (grokdeclarator): Adjust make_friend_class call.
491 * parser.c (cp_parser_member_declaration): Likewise.
492 (cp_parser_template_declaration_after_exp): Likewise.
493 * pt.c (instantiate_class_template): Adjust make_friend_class
495 * cp-tree.h (make_friend_class): Adjust declaration.
496 (add_friend): Likewise.
498 2003-08-21 Jason Merrill <jason@redhat.com>
501 * call.c (build_conditional_expr): Ignore cv-qual differences for
504 2003-08-21 Mark Mitchell <mark@codesourcery.com>
507 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
508 (cp_parser_primary_expression): Adjust call to
509 cp_parser_id_expression.
510 (cp_parser_unqualified_id): Complain about the use of
511 typedef-names in a destructor declarator.
512 (cp_parser_postfix_expression): Adjust call to
513 cp_parser_id_expression.
514 (cp_parser_type_parameter): Likewise.
515 (cp_parser_template_argument): Likewise.
516 (cp_parser_declarator_id): Likewise.
519 * call.c (standard_conversion): Use same_type_p, not pointer
520 equality, to compare types.
523 * parser.c (cp_parser_using_declaration): Check for invalid uses
524 of template-ids here...
525 * decl2.c (do_class_using_decl): ... rather than here.
527 2003-08-20 Mark Mitchell <mark@codesourcery.com>
530 * pt.c (more_specialized): Bump processing_template_decl.
532 2003-08-21 Jason Merrill <jason@redhat.com>
535 * decl.c (grokdeclarator): Recognize a flexible array based on the
536 type, not the form of the declarator.
538 2003-08-20 Jason Merrill <jason@redhat.com>
540 * semantics.c (simplify_aggr_init_expr): Split out from
541 simplify_aggr_init_exprs_r. Convert slot address to match
543 * cp-tree.h: Declare it.
544 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
545 DECL_NAME of a user variable.
547 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
550 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
552 * semantics.c (finish_expr_stmt): Always convert to void.
553 * typeck.c (build_x_compound_exp): Always convert to void.
555 2003-08-19 Mark Mitchell <mark@codesourcery.com>
558 * cp-tree.h (grok_op_properties): Change prototype.
559 * decl.c (grok_op_properties): Add complain parameter.
560 (grokfndecl): Pass it.
561 * pt.c (tsubst_decl): Adjust accordingly.
564 * decl.c (start_method): Return immediately if push_template_decl
565 does not like the declaration.
566 * pt.c (push_template_decl_real): Disallow member template
570 * cp-tree.h (add_binding): Add prototype.
571 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
572 (maybe_warn_about_overly_private_class): Use
573 CLASSTYPE_DESTRUCTORS.
574 (pushclass): Adjust call to set_identifier_type_value.
575 * decl.c (add_binding): Give it external linkage.
576 (push_local_binding): Adjust call to add_binding.
577 (push_class_binding): Likewise.
578 (set_identifier_type_value_with_scope): Change prototype. Use
579 add_binding for global bindings.
580 (set_identifier_type_value): Adjust accordingly.
582 (pushdecl): Use set_identifier_type_value, not
583 set_identifier_type_value_with_scope.
584 (pushdecl_namespace_level): Adjust calls to
585 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
586 (pushdecl_class_level): Likewise.
587 (lookup_tag): Use select_decl.
588 (select_decl): Improve comment.
589 (record_builtin_type): Do not call pushdecl.
590 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
591 (cp_finish_decl): Adjust call to set_identifier_type_value.
592 (check_elaborated_type_specifier): Improve checks for invalid uses
594 (xref_tag): Adjust call to check_elaborated_type_specifier.
595 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
596 * name-lookup.c (set_namespace_binding): Use add_binding.
597 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
598 rather than an IDENTIFIER_NODE, to represent built-in types, if
599 requested by the caller.
600 (cp_parser_postfix_expression): Adjust call.
601 (cp_parser_type_specifier): Likewise.
602 (cp_parser_elaborated_type_specifier): Adjust call to
603 check_elaborated_type_specifier.
604 * typeck2.c (build_functional_cast): Do not perform name lookups.
607 * decl.c (expand_static_init): Remove unncessary code.
609 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
611 PR c++/10538, PR c/5582
612 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
614 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
617 * init.c (build_offset_ref): Perform access checking for
618 pointer to member correctly.
620 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
622 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
624 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
627 * cp-tree.h (finish_stmt_expr): Add bool parameter.
628 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
629 adjust the stmt_expr here.
630 (build_vec_init): Use finish_stmt_expr_expr, convert result to
632 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
634 * pt.c (tsubst_copy): Likewise.
635 * semantics.c (finish_stmt_expr): Add parameter.
637 * pt.c (instantiate_class_template): Push to class's scope before
640 Sun Aug 17 10:05:38 CEST 2003 Jan Hubicka <jh@suse.cz>
643 * semantics.c (finish_id_expression): Mark all functions as used.
645 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
648 * cvt.c (convert_to_void): Indicate which side of conditional has
649 no effects, and rhs of comma operator. Test for no sideeffect
650 expressions here and always build a convert expr.
651 * init.c (expand_default_init): Convert the init to void.
652 * typeck.c (build_x_compound_expr): Do not check for side effects
654 (build_compound_expr): Do not convert lhs when building a
657 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
659 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
660 * decl2.c (build_offset_ref_call_from_tree): Use
661 build_non_dependent_expr.
662 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
663 * pt.c (build_non_dependent_expr): Set operand.
665 2003-08-14 Jan Hubicka <jh@suse.cz>
667 * decl2.c (mark_member_pointers): Rename to...
668 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
669 (lower_function): Update call.
670 * except.c (eh_type_info): Break out from ...
671 (build_eh_type): ... here; tinfo is already used.
672 (finish_eh_spec_block): Mark tinfos as used.
673 * semantics.c (finish_handler_params): Mark tinfo as used.
674 * cp-tree.h (eh_type_info): Declare.
676 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
678 * pt.c (instantiate_class_template): Set location before
681 * decl.c (make_typename_type): Use my_friendly_assert.
682 * pt.c (tsubst_aggr_type): Rearrange context substitution.
684 Thu Aug 14 12:19:25 CEST 2003 Jan Hubicka <jh@suse.cz>
686 * method.c (use_thunk): Expand body directly.
688 2003-08-12 Mark Mitchell <mark@codesourcery.com>
691 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
692 determine whether or not to promote types.
693 (convert_for_arg_passing): Likewise.
694 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
696 * pt.c (tsubst_decl): Do not expect it to be set.
700 * cp-tree.h (check_elaborated_type_specifier): Declare.
701 (handle_class_head): Remove.
702 (note_got_semicolon): Likewise.
703 (note_list_got_semicolon): Likewise.
704 (finish_class_definition): Likewise.
705 * decl.c (check_elaborated_type_specifier): Make it public.
707 (handle_class_head): Remove.
708 * parser.c (cp_parser_elaborated_type_specifier): Use
709 check_elaborated_type_specifier.
710 (cp_parser_class_specifier): Do not call finish_class_definition.
711 (cp_parser_class_head): Or handle_class_head. Check for
712 over-qualified names.
713 * semantics.c (finish_class_definition): Remove.
715 * parser.c (cp_parser_check_for_definition_in_return_type): New
717 (cp_parser_simple_declaration): Adjust call to
718 cp_parser_init_declarator.
719 (cp_parser_decl_specifier_seq): Change type of
720 declares_class_or_enum parameter.
721 (cp_parser_explicit_instantiation): Adjust accordingly.
722 (cp_parser_type_specifier): Change type of
723 declares_class_or_enum parameter.
724 (cp_parser_init_declarator): Add declares_class_or_enum
726 (cp_parser_parameter_declaration): Adjust call to
727 cp_parser_decl_specifier_seq.
728 (cp_parser_function_definition): Likewise.
729 (cp_parser_member_declaration): Likewise.
730 (cp_parser_single_declaration): Likewise.
732 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
733 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
734 (TYPE_OVERLOADS_CALL_EXPR): Remove.
735 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
736 (TYPE_OVERLOADS_ARROW): Likewise.
737 (CLASSTYPE_GOT_SEMICOLON): Likewise.
738 * class.c (check_bases): Do not set them.
739 (finish_struct_1): Likewise.
740 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
741 (build_ptrmemfunc_type): Likewise.
742 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
743 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
744 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
745 * lex.c (note_got_semicolon): Remove.
746 (note_list_got_semicolon): Likewise.
747 * parser.c (cp_parser_simple_declaration): Do not call
748 note_list_got_semicolon.
749 * pt.c (list_eq): Remove.
750 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
751 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
752 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
753 * ptree.c (cxx_print_type): Do not print them.
754 * semantics.c (finish_member_class_template): Do not call
755 note_list_got_semicolon.
757 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
759 * call.c (standard_conversion): Opaque pointers interconvert.
761 * testsuite/g++.dg/other/opaque-3.C: New.
763 2003-08-11 Mark Mitchell <mark@codesourcery.com>
765 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
768 2003-08-10 Mark Mitchell <mark@codesourcery.com>
771 * cp-tree.h (get_vbase): Remove.
772 (get_vbase_types): Remove.
773 * init.c (expand_member_init): Correct logic for looking up base
776 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
778 * error.c (dump_expr): Tidy.
779 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
780 (pp_cxx_begin_template_argument_list): Likewise.
781 (pp_cxx_end_template_argument_list): Likewise.
782 (is_destructor_name): Likewise.
783 (pp_cxx_unqualified_id): Likewise.
784 (pp_cxx_qualified_id): Likewise.
785 (pp_cxx_id_expression): Likewise.
786 (pp_cxx_new_expression): Likewise.
787 (pp_cxx_delete_expression): Likewise.
788 (pp_cxx_pm_expression): Likewise.
789 (pp_cxx_type_specifier): Rework.
790 (pp_cxx_type_id): Likewise.
791 (pp_cxx_primary_expression): Likewise.
792 (pp_cxx_postfix_expression): Likewise.
793 (pp_cxx_unary_expression): Likewise.
794 (pp_cxx_multiplicative_expression): Likewise.
795 (pp_cxx_conditional_expression): Likewise.
796 (pp_cxx_assignment_expression): Likewise.
797 (pp_cxx_pretty_printer_init): Tidy.
799 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
801 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
802 NODE is always a TREE_VEC of nonzero size.
803 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
804 * decl2.c (arg_assoc): Template args will be a vec.
805 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
806 dump_template_argument_list.
807 (dump_template_parms): Args will be a vec.
808 * parser.c (cp_parser_template_argument_list): Produce a
810 * pt.c (coerce_template_parms): Args are always vectors.
811 (mangle_class_name_for_template): Likewise.
812 (lookup_template_function): Likewise.
813 (lookup_template_class): Likewise.
814 (tsubst_template_args): Likewise.
815 (tsubst_baselink): Use tsubst_template_args.
816 (tsubst_qualified_id): Likewise.
817 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
818 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
819 (any_dependent_template_args_p): Args are always vectors.
820 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
823 * call.c (convert_like_real): Add rvalue binding error message.
824 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
828 * pt.c (dependent_type_p_r): A dependent template-id is a class
829 type with dependent template arguments, or a bound template
831 (type_dependent_expression_p): A template function decl cannot
832 have a dependent context.
834 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
837 * parser.c (cp_parser_class_name): Return immediately when scope
840 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
842 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
844 * cp/call.c (standard_conversion): Support opaque types.
846 (strip_top_quals): Use cp_build_qualified_type instead of
849 * cp/typeck.c (convert_for_assignment): Support opaque types.
851 * testsuite/g++.dg/other/opaque-1.C: New.
853 * testsuite/g++.dg/other/opaque-2.C: New.
855 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
857 * decl.c (grokparms): Use cp_build_qualified_type instead
860 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
862 * cxx-pretty-print.h: New file.
863 * cxx-pretty-print.c: Likewise.
864 * error.c (scratch_pretty_printer): Change type.
866 (dump_aggr_type): Likewise.
867 (dump_global_iord): Likewise.
868 (dump_expr): Likewise.
870 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
871 (cxx_initialize_diagnostics): New function.
872 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
873 (CXX_PRETTY_PRINT_H): New variable.
874 (cp/cxx-pretty-print.o): New rule.
875 (cp/cp-lang.o): Update dependence.
876 (cp/error.o): Likewise.
878 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
880 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
881 (DECL_DECLARED_INLINE_P): Remove.
882 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
883 if decl is a FUNCTION_DECL. This never made sense, but now it is
884 required to avoid a tree check failure.
885 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
886 * optimize.c (maybe_clone_body): Likewise.
888 2003-08-04 Roger Sayle <roger@eyesopen.com>
890 * decl.c (cxx_insert_default_attributes): Delete.
891 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
892 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
894 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
897 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
901 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
904 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
907 * cp-tree.def (USING_DECL): Document its type.
908 * class.c (pushclass): If we're entering a template, push any
909 dependent using decls it has.
910 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
912 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
913 (tsubst): Remove USING_DECL checks.
914 (type_dependent_expression_p): Remove USING_DECL case.
915 * semantics.c (finish_member_declaration): A USING_DECL's type
916 indicates whether it is dependent.
918 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
920 * cp-tree.h (pushclass): Remove unneeded parameter.
921 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
922 (push_nested_class): Adjust pushclass call.
923 * pt.c (instantiate_class_template): Likewise.
924 * semantics.c (begin_class_definition): Likewise.
926 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
928 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
930 2003-08-01 Mark Mitchell <mark@codesourcery.com>
933 * decl.c (decls_match): Don't ignore the types of template
937 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
939 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
941 PR c++/8442, c++/8806
942 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
944 (check_elaborated_type_specifier): Add allow_template_p
945 parameter. Check tag mismatch and class template.
946 (xref_tag): Add template_header_p parameter. Add assertion
947 that name is an IDENTIFIER_NODE. Remove implicit typename
948 warning. Simplify lookup process if globalize is true.
949 (cxx_init_decl_processing): Adjust call to xref_tag.
950 (xref_tag_from_type): Likewise.
951 * decl2.c (handle_class_head): Likewise.
952 * parser.c (cp_parser_elaborated_type_specifier,
953 cp_parser_class_head): Likewise.
954 * rtti.c (init_rtti_processing, build_dynamic_cast1,
955 tinfo_base_init, emit_support_tinfos): Likewise.
956 * class.c (is_base_of_enclosing_class): Remove.
957 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
958 template template argument.
959 * cp-tree.h (xref_tag): Adjust declaration.
960 (is_base_of_enclosing_class): Remove.
961 * NEWS: Document template template argument change.
963 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
965 * parser.c (cp_parser_init_declarator,
966 cp_paser_member_declaration): Reformat.
967 * pt.c (lookup_template_class, type_unification_real, unify,
968 type_dependent_expression_p): Reformat.
971 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
973 (finish_stmt_expr_expr): Declare.
974 * parser.c (cp_parser_primary_expression): Tell
975 cp_parser_compount_statement that it is a statement expression.
976 (cp_parser_statement, cp_parser_labeled_statement,
977 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
978 in_statement_expr_p parameter.
979 (cp_parser_expression_statement): Likewise. Call
980 finish_stmt_expr_expr for final expression of a statement
982 (cp_parser_for_init_statement,
983 cp_parser_implicitly_scoped_statement,
984 cp_parser_already_scoped_statement, cp_parser_function_definition,
985 cp_parser_try_block, cp_parser_handled): Adjust.
986 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
987 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
988 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
989 * semantics.c (finish_expr_stmt): Do not deal with statement
991 (begin_stmt_expr): Clear last_expr_type.
992 (finish_stmt_expr_expr): New.
993 (finish_stmt_expr): Process the value expression.
995 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
996 compound expr inside the target's initializer.
999 * parser.c (cp_parser_primary_expression): Do not set
1000 non-constant-p merely because it is a dependent scope.
1003 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1004 * semantics.c (finish_expr_stmt): Do not convert to void in a
1007 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1009 * pt.c (coerce_template_parms): Refactor.
1010 (fn_type_unification): Increment processing_template_decl when
1011 tsubsting an incomplete set of explicit args.
1014 * pt.c (instantiate_class_template): Increment
1015 processing_template_decl around the tsubst of a template member
1017 (tsubst_qualified_id): Assert we do not have a dependent scope.
1019 * pt.c (coerce_template_template_parms, lookup_template_class,
1020 can_complete_type_without_circularity, instantiate_class_template,
1021 tsubst_decl, unify): Reformat.
1023 Thu Jul 31 01:07:41 CEST 2003 Jan Hubicka <jh@suse.cz>
1025 * decl2.c (maybe_make_one_only): Use mark_referenced.
1026 * method.c (use_thunk): Likewsie.
1028 Wed Jul 30 19:12:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1030 * class.c (build_vtable_entry_ref): Kill.
1031 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1032 (build_vfn_ref): Do not call build_vtable_entry_ref.
1033 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1034 * cp-tree.h (prepare_assemble_variable): Kill.
1035 * cp-decl.c (prepare_assemble_variable): Kill.
1037 2003-07-29 Geoffrey Keating <geoffk@apple.com>
1039 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1040 of setting valid_pch by hand.
1042 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1044 * decl.c (finish_enum): Initialize underlying_type.
1046 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
1049 * decl.c (add_binding): Add bval local variable.
1050 (push_class_level_binding): Likewise. Allow a USING_DECL to be
1052 * decl2.c (do_class_using_decl): The type of a using decl is
1054 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1055 function call lookup code.
1056 * pt.c (tsubst): A USING_DECL will have unknown type.
1057 (tsubst_copy_and_build): Allow a using decl.
1058 (type_dependent_expression_p): A USING_DECL will make it
1060 * semantics.c (finish_member_declaration): Push a dependent using
1063 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1066 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1067 * semantics.c (finish_id_expression): Call mark_used for all
1070 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1073 * call.c (standard_conversion): Allow all integral->enumeral
1074 conversions, after marking them as bad.
1075 * decl.c (finish_enum): Make sure that all enumerators are
1076 properly converted to the underlying type.
1077 (build_enumerator): Set DECL_CONTEXT for namespace-scope
1079 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1080 (tsubst_enum): Tidy.
1082 * Make-lang.in (typeck.o): Depend on convert.h.
1083 (class.o): Likewise.
1085 * call.c: Include convert.h.
1086 (convert_arg_to_ellipsis): Use convert_to_real.
1087 * class.c: Include convert.h.
1088 (build_base_path): Use convert_to_integer.
1089 * rtti.c: Include convert.h.
1090 (build_headof): Use convert_to_integer.
1091 * typeck.c: Include convert.h.
1092 (decay_conversion): Use convert_to_integer.
1093 (build_unary_op): Use build_nop.
1094 (get_delta_difference): Use convert_to_integer.
1095 (build_ptrmemfunc): Avoid unncessary conversions.
1097 Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz>
1099 * decl2.c (mark_member_pointers): Verify that member pointer points to
1102 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
1104 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1105 (finish_compound_stmt): Remove no scope arg.
1106 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1107 end_compound_stmt calls.
1108 (expand_static_init, begin_destructor_body, begin_function_body,
1109 finish_function_body): Likewise.
1110 * decl2.c (start_objects, finish_objects,
1111 start_static_storage_duration_function,
1112 finish_static_storage_duration_function): Likewise.
1113 * init.c (begin_init_stmts, finish_init_stmts,
1114 construct_virtual_base, build_vec_init): Likewise.
1115 * method.c (do_build_assign_ref, synthesize_method): Likewise.
1116 * parser.c (cp_parser_compound_statement,
1117 cp_parser_implicitly_scoped_statement,
1118 cp_parser_already_scoped_statement): Likewise.
1119 * pt.c (tsubst_expr): Likewise.
1120 * semantics.c (begin_compound_stmt): No scope arg is a bool.
1121 (finish_compound_stmt): Remove no scope arg.
1123 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1126 2003-07-27 Mark Mitchell <mark@codesourcery.com>
1128 * call.c (standard_conversion): Tweak handling of
1129 pointer-to-member types.
1130 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1131 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1132 pointer-to-data member types.
1134 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
1136 * parser.c (cp_parser_type_parameter): Reformat.
1137 (cp_parser_parameter_declaration): Deprecate default args where
1140 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
1144 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1145 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1146 * init.c (begin_init_stmts): Make static. Return is_global
1147 value. Always call begin_stmt_expr.
1148 (finish_init_stmts): Make static. Add is_global parm. Always
1149 building a stmt tree.
1150 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1151 (build_vec_init): Likewise. Always building a stmt tree.
1152 (expand_default_init): Always building a stmt tree.
1153 (get_temp_regvar): Likewise.
1154 * semantics.c (begin_global_stmt_expr,
1155 finish_global_stmt_expr): Remove.
1157 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1159 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1160 (build_x_compound_expr_from_list): Declare.
1161 * typeck.c (build_x_compound_expr_from_list): New.
1162 (build_x_compound_expr): Adjust.
1163 (build_compound_expr): Remove unreachable code. Take two
1165 * decl.c (grok_reference_init): Use
1166 build_x_compound_expr_from_list.
1167 (expand_static_init): Adjust build_compound_expr call.
1168 (cxx_maybe_build_cleanup): Likewise.
1169 * init.c (perform_member_init): Use
1170 build_x_compound_expr_from_list.
1171 (build_new_1): Likewise.
1172 (build_vec_delete): Adjust build_compound_expr calls.
1173 (build_vbase_delete): Likewise.
1174 * typeck2.c (store_init_value): Use
1175 build_x_compound_expr_from_list.
1176 (build_functional_cast): Likewise.
1178 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1180 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1181 * decl.c (make_typename_type): Pass it.
1182 * pt.c (lookup_template_class): Use it.
1183 (resolve_typename_type): Pass it.
1184 * semantics.c (finish_template_type): Pass it.
1186 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1189 * cp-tree.h (qualified_name_lookup_error): Declare.
1190 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1192 (tsubst_expr) <DECL_STMT case>: Likewise.
1193 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1194 * semantics.c (qualified_name_lookup_error): New, broken out of ...
1195 (finish_id_expression): ... here. Use it.
1197 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
1199 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1201 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1204 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1205 (tsubst_template_arg): New.
1206 (tsubst_template_arg_vector): Rename to ...
1207 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1208 tsubst_template_arg.
1209 (coerce_template_parms): Use tsubst_template_arg for default
1211 (tsubst_template_parms): Likewise.
1212 (tsubst_aggr_type): Adjust.
1213 (tsubst_decl): Likewise.
1214 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1215 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1217 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1219 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1220 * error.c: Use the new pretty-printer framework.
1222 2003-07-24 Per Bothner <pbothner@apple.com>
1224 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1225 which causes errors messages to incorrectly mention included files.
1227 2003-07-24 Mark Mitchell <mark@codesourcery.com>
1229 * cp-tree.h (convert_to_base_statically): Declare.
1230 * call.c (build_special_member_call): Convert INSTANCE to the base
1232 * class.c (convert_to_base_statically): New method.
1233 * init.c (construct_virtual_base): Use it.
1234 * method.c (do_build_assign_ref): Fix typo in comment.
1236 2003-07-24 Jason Merrill <jason@redhat.com>
1238 * decl.c: Just set truthvalue_* to boolean_*.
1240 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
1242 * decl.c (reshape_init): Remove unreachable code.
1244 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1247 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1249 2003-07-23 Mark Mitchell <mark@codesourcery.com>
1252 * cp-tree.h (accessible_base_p): Declare.
1253 * call.c (build_over_call): Use it.
1254 * search.c (accessible_base_p): New function, split out from ...
1255 (lookup_base): ... here.
1258 * call.c (build_conditional_expr): Use perform_implicit_conversion
1259 and error_operand_p. Robustify.
1260 * typeck.c (build_unary_op): Use perform_implicit_conversion.
1262 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
1265 * parser.c (cp_parser_nested_name_specifier): Reset scope on
1267 (cp_parser_elaborated_type_specifier): Likewise.
1269 2003-07-22 Mark Mitchell <mark@codesourcery.com>
1271 Eliminate use of POINTER_TYPE for pointers-to-members.
1272 * call.c (standard_conversion): Rework pointer-to-member handling.
1274 (add_builtin_candidate): Likewise.
1275 (resolve_scoped_fn_name): Remove.
1276 (build_conditional_expr): Rework pointer-to-member handling.
1277 (compare_ics): Likewise.
1278 * class.c (check_field_decls): Use TYPE_PTR_P.
1279 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1281 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1282 (TYPE_PTRMEM_P): Add comment.
1283 (TYPE_PTR_P): Simplify.
1284 (TYPE_PTROB_P): Correct definition.
1285 (TYPE_PTR_TO_MEMBER_P): New macro.
1286 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1287 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1288 (resolved_scoped_fn_name): Remove declaration.
1289 (build_offset_ref): Change prototype.
1290 (resolve_offset_ref): Remove.
1291 (comp_target_types): Remove.
1292 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1294 (convert_to_reference): Use can_convert.
1295 (ocp_convert): Improve error handling. Rework pointer-to-member
1297 (perform_qualification_conversions): Rework pointer-to-member
1299 * decl.c (build_ptrmem_type): Handle functions too.
1300 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1301 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1302 (grokparms): Remove OFFSET_TYPE error message.
1303 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1304 * error.c (dump_type_prefix): Likewise.
1305 * expr.c (cplus_expand_constant): Use build_nop.
1306 * init.c (build_offset_ref): Add address_p parameter. Fold in
1307 necessary bits from resolve_offset_ref.
1308 (resolve_offset_ref): Remove.
1309 * parser.c (cp_parser_postfix_expression): Remove special case
1310 code for OFFSET_TYPE.
1311 * pt.c (convert_nontype_argument): Rework pointer-to-member
1313 (convert_template_argument): Likewise.
1315 (invalid_nontype_parm_type_p): Likewise.
1316 (dependent_type_p_r): Likewise.
1317 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1318 (target_incomplete_p_): Rework pointer-to-member
1320 (get_pseudo_ti_init): Likewise.
1321 (get_pseudo_ti_desc): Likewise.
1322 * semantics.c (finish_qualified_id_expr): Adjust call to
1323 build_offset_ref. Remove use of resolve_offset_ref.
1324 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1325 * typeck.c (target_type): Use TYPE_PTRMEM_P.
1326 (type_unknown_p): Remove obsolete code about the time before
1327 non-dependent expressions were handled correctly.
1328 (qualify_type_recursive): Remove.
1329 (composite_pointer_type_r): New function.
1330 (composite_pointer_type): Use it.
1331 (merge_types): Remove dead comments.
1332 (comp_cv_target_types): Remove.
1333 (comp_target_types): Likewise.
1334 (comp_target_parms): Likewise.
1335 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1336 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1337 (build_binary_op): Do not use of comp_target_types.
1338 (pointer_diff): Remove OFFSET_TYPE case.
1339 (build_unary_op): Adjust pointer-to-member handling.
1340 (unary_complex_lvalue): Likewise.
1341 (check_for_casting_away_constness): Add description parameter.
1342 (build_static_cast): Pass it.
1343 (build_reinterpret_cast): Use check_for_casting_away_constness.
1344 (build_const_cast): Adjust pointer-to-member handling.
1345 (build_c_cast): Likewise.
1346 (convert_for_assignment): Remove OFFSET_TYPE error message.
1347 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1348 (comp_ptr_ttypes_reinterpret): Remove.
1349 (casts_away_constness_r): Adjust pointer-to-member handling.
1350 (casts_away_constness): Liekwise.
1351 (strip_all_pointer_quals): Remove.
1352 * typeck2.c (digest_init): Adjust pointer-to-member handling.
1353 (build_m_component_ref): Likewise.
1355 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
1357 * lex.c (unqualified_fn_lookup_error): Mention that the error
1358 message needs to be kept in synch with the manual.
1360 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1363 * decl.c (grokdeclarator): An array member is only a flexible
1364 array member if the field itself is the array.
1366 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1369 * decl.c (xref_basetypes): Handle error_mark_node.
1371 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1373 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1374 * tree.c (lvalue_p_1): Set it.
1375 * class.c (check_field): Don't allow non-packed non-POD fields to
1377 * call.c (reference_binding): Need a temporary for all bitfield
1379 (convert_like_real): Check it is ok to make a temporary here.
1381 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
1383 * cp-tree.h (hack_identifier): Remove.
1384 * method.c (hack_identifier): Remove.
1385 * semantics.c (finish_id_expression): Expand hack_identifier
1388 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1390 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1391 semantics.c typeck.c: Remove unnecessary casts.
1393 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1395 * cp-tree.h (hack_identifier): Remove.
1396 * method.c (hack_identifier): Remove.
1397 * semantics.c (finish_id_expression): Expand hack_identifier
1400 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1402 * cp-tree.h (finish_non_static_data_member): Add object param.
1403 * method.c (hack_identifier): Adjust.
1404 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1405 again for a FIELD_DECL.
1406 * semantics.c (finish_non_static_data_member): Add object
1407 parameter. Always save the DECL in the COMPONENT_REF.
1408 * call.c (resolve_scoped_fn_name): Adjust.
1410 2003-07-17 Zack Weinberg <zack@codesourcery.com>
1412 * pt.c (get_bindings): Make definition consistent with
1413 forward declaration.
1415 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1418 * friend.c (add_friend): Check access for member functions
1421 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1424 * typeck.c (build_class_member_access_expr): Improve diagnostic.
1426 2003-07-16 Mark Mitchell <mark@codesourcery.com>
1429 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1431 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1432 * decl.c (duplicate_decls): Merge
1433 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1434 * parser.c (cp_parser_postfix_expression): Adjust call to
1435 cp_parser_initializer_list and
1436 cp_parser_parenthesized_expression_list.
1437 (cp_parser_parenthesized_expression_list): Add non_constant_p.
1438 (cp_parser_new_placement): Adjust call to
1439 cp_parser_parenthesized_expression_list.
1440 (cp_parser_direct_new_declarator): Likewise.
1441 (cp_parser_conditional_expression): Remove.
1442 (cp_parser_constant_expression): Parse an assignment-expression,
1443 not a conditional-expression.
1444 (cp_parser_simple_declaration): Resolve expression/declaration
1445 ambiguity more quickly.
1446 (cp_parser_mem_initializer): Adjust call to
1447 cp_parser_parenthesized_expression_list.
1448 (cp_parser_init_declarator): Keep track of whether or not the
1449 initializer is a constant-expression.
1450 (cp_parser_initializer): Add non_constant_p parameter.
1451 (cp_parser_initializer_clause): Likewise.
1452 (cp_parser_initializer_list): Likewise.
1453 (cp_parser_attribute_list): Adjust call to
1454 cp_parser_parenthesized_expression_list.
1455 (cp_parser_functional_cast): Likewise.
1456 * pt.c (tsubst_decl): Copy
1457 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1458 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1459 * semantics.c (finish_id_expression): Use
1460 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1462 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
1464 * lang-options.h: Remove.
1466 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
1469 * class.c (field_decl_cmp): Remove.
1470 (resort_field_decl_cmp): Remove.
1471 (resort_sorted_fields): Remove.
1472 (add_fields_to_vec): Rename to ...
1473 (add_fields_to_record_type): this.
1474 (finish_struct_1): Change to be using
1475 sorted_fields_type's fields.
1476 * cp-tree.h (lang_decl): In lang_decl_u3
1477 change sorted_fields to be a pointer to
1479 (resort_sorted_fields): Remove prototype.
1480 * search.c (lookup_field_1): Change to be using
1481 sorted_fields_type's fields.
1483 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1486 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1487 is a member of other class.
1488 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1489 is a specialization of function template.
1491 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1494 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1497 2003-07-15 Mark Mitchell <mark@codesourcery.com>
1499 * cp-tree.def (LOOKUP_EXPR): Remove.
1500 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1501 (LOOKUP_EXPR_GLOBAL): Remove.
1502 (get_bindings): Remove.
1503 (is_aggr_type_2): Remove.
1504 * call.c (resolved_scoped_fn_name): Remove support for
1506 * decl.c (grokfndecl): Likewise.
1507 (grokdeclarator): Likewise.
1508 * error.c (dump_decl): Likewise.
1509 (dump_expr): Likewise.
1510 * friend.c (do_friend): Likewise.
1511 * init.c (build_offset_ref): Likewise.
1512 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
1514 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1515 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1517 * pt.c (get_bindings): Give it internal linkage.
1518 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1519 (lookup_template_function): Likewise.
1520 (for_each_tempalte_parm_r): Likewise.
1521 (tsubst_decl): Likewise.
1522 (tsubst_qualified_id): Handle template template parameters.
1523 (tsubst_copy): Remove support for LOOKUP_EXPR.
1524 (tsubst_copy_and_build): Likewise.
1525 (most_general_template): Likewise.
1526 (value_dependent_expression_p): Likewise.
1527 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1529 * semantics.c (perform_koenig_lookup): Do not create
1531 (finish_fname): Likewise.
1532 (finish_id_expression): Likewise.
1533 * tree.c (is_aggr_type_2): Remove.
1535 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1538 * typeck.c (check_return_expr): Fix thinko in diagnostic.
1540 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1543 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1546 2003-07-14 Mark Mitchell <mark@codesourcery.com>
1549 * pt.c (dependent_scope_ref_p): New function.
1550 (value_dependent_expression_p): Use it.
1551 (type_dependent_expression_p): Likewise.
1553 * pt.c (tsubst_friend_function): Use reregister_specialization.
1556 * cp-tree.h (lookup_qualified_name): Adjust prototype.
1557 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
1558 call to is_aggr_type.
1559 * parser.c (cp_parser_lookup_name): Adjust call to
1560 lookup_qualified_name.
1561 * pt.c (tsubst_qualified_id): Likewise.
1562 (tsubst_copy_and_build): Likewise.
1563 * semantics.c (finish_qualified_id_expr): Deal with erroneous
1566 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1569 * call.c (op_error): Properly format REALPART_EXPR and
1571 * error.c (dump_expr): Likewise.
1573 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1575 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1577 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1580 * call.c (initialize_reference): Improve diagnostic.
1582 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1585 * pt.c (more_specialized_class): Add full_args parameter.
1586 (most_specialized_class): Adjust calls to more_specialized_class.
1587 * cp-tree.h (more_specialized_class): Adjust declaration.
1589 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
1591 * lex.c (enum tree_node_kind): Delete.
1593 2003-07-13 Mark Mitchell <mark@codesourcery.com>
1596 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1597 (SET_DECL_SELF_REFERENCE_P): Likewise.
1598 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1599 * pt.c (tsubst_decl): Copy it.
1600 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1602 * pt.c (reregister_specialization): Fix thinko in previous change.
1604 * cp-tree.h (cp_id_kind): New type.
1605 (unqualified_name_lookup_error): Change prototype.
1606 (unqualified_fn_lookup_error): New function.
1607 (do_identifier): Remove.
1608 (do_scoped_id): Likewise.
1609 (tsubst_copy_and_build): Change prototype.
1610 (reregister_specialization): New function.
1611 (perform_koenig_lookup): Likewise.
1612 (finish_id_expression): Likewise.
1613 * call.c (build_method_call): Adjust call to
1614 unqualified_name_lookup_error.
1615 * decl.c (duplicate_decls): Use reregister_specialization.
1616 * lex.c (is_global): Remove.
1617 (unqualified_name_lookup_error): Return a value.
1618 (do_identifier): Remove.
1619 (do_scoped_id): Likewise.
1620 (identifier_typedecl_value): Remove.
1621 (unqualified_fn_lookup_error): New function.
1622 * parser.c (cp_parser_id_kind): Remove.
1623 (cp_parser_non_constant_id_expression): Remove.
1624 (cp_parser_primary_expression): Use finish_id_expression.
1625 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1627 (cp_parser_postfix_expression): Use perform_koenig_lookup.
1628 (cp_parser_template_argument): Use cp_id_kind.
1629 (cp_parser_fold_non_dependent_expr): Adjust call to
1630 tsubst_copy_and_build.
1631 * pt.c (unregister_specialization): Rename to ...
1632 (reregister_specialization): This.
1633 (tsubst_friend_function): Use it.
1634 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1635 (tsubst_qualified_id): Likewise.
1636 (tsubst_expr): Likewise.
1637 (tsubst_copy_and_build): Add function_p parameter. Use
1638 finish_id_expression. Introduce RECUR macro.
1639 (tsubst_non_call_postfix_expression): New function.
1640 (regenerate_decl_from_template): Use reregister_specialization.
1641 * semantics.c (perform_koenig_lookup): New function.
1642 (finish_id_expression): Likewise.
1644 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1646 * pt.c (push_access_scope_real): Remove.
1647 (push_access_scope): Move code from push_access_scope_real.
1648 (pop_access_scope): Don't check for TEMPLATE_DECL.
1649 (instantiate_template): Defer access checking during template
1651 (regenerate_decl_from_template): Tidy.
1653 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
1656 * operators.def: Add definitions for __imag__, __real__.
1658 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
1661 * parser.c (cp_parser_expression_list): Rename to ...
1662 (cp_parser_parenthesized_expression_list): ... here. Add attribute
1663 parameter, parse the surounding parentheses.
1664 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1665 parameters. Return int.
1666 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1667 (cp_parser_postfix_expression): Adjust function call parsing.
1668 (cp_parser_new_placement): Adjust.
1669 (cp_parser_new_initializer): Likewise.
1670 (cp_parser_cast_expression): Likewise.
1671 (cp_parser_selection_statement): Likewise.
1672 (cp_parser_mem_initializer): Likewise.
1673 (cp_parser_asm_definition): Likewise.
1674 (cp_parser_init_declarator): Likewise.
1675 (cp_parser_declarator): Make
1676 cdtor_or_conv_p an int ptr.
1677 (cp_parser_direct_declarator): Likewise. Check for a parameter
1678 list on cdtors & conv functions.
1679 (cp_parser_initializer): Adjust.
1680 (cp_parser_member_declaration): Adjust.
1681 (cp_parser_attribute_list): Move code into
1682 cp_parser_parens_expression_list.
1683 (cp_parser_functional_cast): Adjust.
1684 * pt.c (type_dependent_expression_p): Erroneous expressions are
1687 2003-07-11 Geoffrey Keating <geoffk@apple.com>
1689 * decl.c (cp_finish_decl): Handle 'used' attribute.
1691 * cp-lang.c (c_reset_state): New dummy routine.
1692 * cp-tree.h (finish_file): Move prototype to c-common.h.
1693 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1695 2003-07-11 Mark Mitchell <mark@codesourcery.com>
1698 * pt.c (tsubst_qualified_id): Implement suggested resolution for
1700 (type_dependent_expression_p): Likewise.
1702 2003-07-10 Mark Mitchell <mark@codesourcery.com>
1704 * typeck.c (build_binary_op): Do not warn about signed
1705 vs. unsigned comparisons in the bodies of templates.
1708 * parser.c (cp_parser_postfix_expression): Check dependency of
1711 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1714 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1718 * error.c (decl_to_string): Do not print default argument
1721 * cp-tree.h (break_out_calls): Remove declaration.
1722 * tree.c (break_out_calls): Remove.
1723 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1725 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
1728 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1729 * decl2.c (constructor_name_p): Avoid repeated constructor_name
1731 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1733 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1735 * typeck.c (build_x_unary_op): Take note of the fact that
1736 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1739 * parser.c (cp_parser_primary_expression): Preserve the form of
1740 qualified expressions in templates, even if they are not
1742 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1743 (tsubst_qualified_id): Likewise.
1744 * search.c (accessible_p): Treat everything in the body of a
1745 template as accessible.
1747 2003-07-08 Mark Mitchell <mark@codesourcery.com>
1749 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1750 * cp-tree.h (build_call_from_tree): Remove.
1751 (build_member_call): Likewise.
1752 (dependent_template_arg_p): Remove.
1753 (any_dependent_template_arguments_p): New function.
1754 (dependent_template_id_p): Likewise.
1755 (any_type_dependent_arguments_p): Likewise.
1756 (build_non_dependent_expr): Likewise.
1757 (build_non_dependent_args): Likewise.
1758 (build_x_compound_expr): Adjust prototype.
1759 * call.c (build_new_method_call): Handle non-dependent expressions
1761 * decl2.c (grok_array_decl): Likewise.
1762 (build_offset_ref_call_from_tree): Likewise.
1763 (build_call_from_tree): Remove.
1764 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1765 (dump_expr): Likewise.
1766 * init.c (build_member_call): Remove.
1767 * mangle.c (write_expression): Update handling for template-ids.
1768 * parser.c (cp_parser_primary_expression): Use
1769 any_dependent_template_arguments_p. Update constant-expression
1771 (cp_parser_postfix_expression): Use
1772 any_type_dependent_arguments_p. Simplify call processing.
1773 (cp_parser_unary_expression): Simplify.
1774 (cp_parser_expression): Adjust for changes to
1775 build_x_compound_expr.
1776 (cp_parser_template_argument): Implement standard-conforming
1777 parsing of non-type template arguments.
1778 (cp_parser_direct_declarator): Use
1779 cp_parser_fold_non_dependent_expr.
1780 (cp_parser_fold_non_dependent_expr): New function.
1781 (cp_parser_next_token_ends_template_argument_p): Likewise.
1782 * pt.c (convert_template_argument): Do not call
1783 maybe_fold_nontype_arg.
1784 (tsubst_baselink): Likewise.
1785 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
1786 processing work correctly for non-dependent expressions. Adjust
1787 handling of COMPOUND_EXPR. Simplify call processing.
1788 (value_dependent_expression_p): Deal with functional casts and
1789 sizeof/alignof correctly.
1790 (type_dependent_expression_p): Handle overloaded functions.
1791 (any_type_dependent_arguments_p): New function.
1792 (any_dependent_template_arguments_p): Likewise.
1793 (dependent_template_p): Treat SCOPE_REFs as dependent.
1794 (dependent_template_id_p): Simplify.
1795 (build_non_dependent_expr): New function.
1796 (build_non_dependent_args): Likewise.
1797 * semantics.c (finish_stmt_expr): Don't make dependent
1798 statement-expresions have void type.
1799 (finish_call_expr): Handle non-dependent expressions
1801 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1802 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1803 type size_t, even in templates.
1804 (expr_sizeof): Likewise.
1805 (finish_class_member_access_expr): Handle non-dependent expressions
1807 (build_x_indirect_ref): Likewise.
1808 (build_x_binary_op): Likewise.
1809 (build_x_unary_op): Likewise.
1810 (build_x_conditional_expr): Likewise.
1811 (build_x_compound_expr): Likewise.
1812 * typeck2.c (build_x_arrow): Likewise.
1814 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
1816 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1817 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1818 (start_function): Use DECL_ESTIMATED_INSNS.
1819 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1821 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1824 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1827 * pt.c (instantiate_class_template): Don't call xref_tag to
1828 inject name when the friend class is a specialization.
1830 2003-07-07 Mark Mitchell <mark@codesourcery.com>
1832 * cp-tree.h (build_scoped_method_call): Remove.
1833 (lookup_qualified_name): Remove parameter.
1834 (tsubst_copy_and_build): Declare.
1835 (finish_qualified_object_call_expr): Remove.
1836 (check_accessibility_of_qualified_id): New function.
1837 (finish_qualified_id_expr): Likewise.
1838 (non_reference): Likewise.
1839 (build_expr_from-tree): Remove.
1840 * call.c (non_reference): Remove.
1841 (build_scoped_method_call): Likewise.
1842 (build_method_call): Use error_operand_p. Assert that we are not
1843 processing a template.
1844 (standard_conversion): Use non_reference.
1845 * class.c (build_vtbl_entry_ref): Likewise.
1846 (build_vtbl_ref_1): Likewise.
1847 * cvt.c (build_expr_type_conversion): Use non_reference.
1848 * decl.c (lookup_qualified_name): Remove flags parameter.
1849 (grok_op_properties): Use non_reference.
1850 * decl2.c (grok_array_decl): Likewise.
1851 (build_expr_from_tree): Remove.
1852 (build_offset_ref_call_from_tree): Update comment.
1853 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1854 * except.c (prepare_eh_types): Use non_reference.
1855 (can_convert_eh): Likewise.
1856 * init.c (build_dtor_call): Avoid using build_method_call.
1857 * mangle.c (write_template_param): Remove misleading comment.
1858 * method.c (locate_copy): Use non_reference.
1859 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1860 (cp_parser_primary_expression): Do not create SCOPE_REFs is
1861 non-dependent contexts.
1862 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1863 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1864 build_expr_from_tree.
1865 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1866 Use check_accessibility_of_qualified_id.
1867 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1868 build_expr_from_tree.
1869 (tsubst_baselink): New function.
1870 (tsubst_qualified_id): Likewise.
1871 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
1872 (tsubst_expr): Adjust call to lookup_qualified_name.
1873 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
1874 handling of CALL_EXPRs.
1875 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1876 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1877 * search.c (check_final_overrider): Likewise.
1878 * semantics.c (check_accessibility_of_qualified_id): New function.
1879 (finish_qualified_object_call_expr): Remove.
1880 * typeck.c (target_type): Use non_reference.
1881 (cxx_sizeof_or_alignof_type): Likewise.
1882 (dubious_conversion_warnings): Likewise.
1883 (convert_for_initialization): Likewise.
1884 (non_reference): New function.
1886 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1888 * decl.c (print_binding_level, print_other_binding_stack,
1889 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1891 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1893 2003-07-07 Andreas Jaeger <aj@suse.de>
1895 * friend.c: Convert to ISO C90 prototypes.
1897 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1899 * cfns.h: Regenerate.
1901 * typeck.c: Convert remaining prototypes to ISO C90.
1902 * search.c: Likewise.
1904 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1905 * semantics.c (expand_or_defer_fn): Likewise
1906 * mangle.c (discriminator_for_string_literal): Likewise.
1907 * g++spec.c (lang_specific_driver): Likewise.
1909 * search.c (lookup_base_r): Remove unused variable.
1911 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1913 * semantics.c: (genrtl_try_block) Adjust emit_line_note
1916 2003-07-07 Andreas Jaeger <aj@suse.de>
1918 * search.c (lookup_base_r): Remove unused variable.
1920 2003-07-06 Michael Chastain <mec@shout.net>
1923 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1924 assigning to input_filename directly.
1926 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
1928 * call.c: Fix comment formatting.
1929 * class.c: Likewise.
1930 * cp-tree.h: Likewise.
1932 * decl2.c: Likewise.
1933 * error.c: Likewise.
1934 * method.c: Likewise.
1935 * name-lookup.c: Likewise.
1936 * parser.c: Likewise.
1939 * search.c: Likewise.
1940 * typeck.c: Likewise.
1942 2003-07-06 Mark Mitchell <mark@codesourcery.com>
1945 * search.c (lookup_base_r): Remove is_non_public and
1946 within_current_scope parameters. Remove other dead code.
1947 (lookup_base): Adjust call to lookup_base_r.
1948 (adjust_result_of_qualified_name_lookup): Improve comment.
1949 * semantics.c (finish_call_expr): Use maybe_dummy_object.
1951 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1953 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1954 LANG_HOOKS_MISSING_ARGUMENT): Override.
1956 2003-07-05 Mark Mitchell <mark@codesourcery.com>
1959 * typeck.c (build_static_cast): Check for reference conversions
1962 2003-07-04 Mark Mitchell <mark@codesourcery.com>
1964 * cp-tree.h (perform_integral_promotions): Declare.
1965 * call.c (build_addr_func): Use decay_conversion.
1966 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
1967 (convert_for_arg_passing): Use perform_integral_promotions.
1968 * cvt.c (build_expr_type_conversion): Use decay_conversion.
1969 (type_promotes_to): Do not return a cv-qualified type.
1970 * decl.c (grok_reference_init): Fix formatting.
1971 (get_atexit_node): Use decay_conversion.
1972 (build_enumerator): Use perform_integral_promotions.
1973 * init.c (build_vec_init): Use decay_conversion.
1974 * semantics.c (finish_expr_stmt): Likewise.
1975 (finish_switch_cond): Use perform_integral_promotions.
1976 * typeck.c (default_conversion): Likewise.
1977 (perform_integral_promotions): New function.
1978 (build_indirect_ref): Use decay_conversion.
1979 (build_array_ref): Use perform_integral_promotions.
1980 (convert_arguments): Use decay_conversion.
1981 (build_unary_op): Use perform_integral_promotions.
1982 (build_c_cast): Use decay_conversion.
1983 (build_modify_expr): Likewise.
1984 (convert_for_initialization): Likewise.
1985 * typeck2.c (build_x_arrow): Likewise.
1987 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
1989 * call.c: Fix comment typos.
1990 * class.c: Likewise.
1991 * cp-tree.h: Likewise.
1993 * decl2.c: Likewise.
1996 * mangle.c: Likewise.
1997 * parser.c: Likewise.
1999 * search.c: Likewise.
2000 * semantics.c: Likewise.
2002 * typeck.c: Likewise.
2004 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2006 * parser.c (cp_lexer_read_token): No need to handle string
2007 constant concatenation.
2009 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2011 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2012 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2013 ATTRIBUTE_GCC_CXXDIAG.
2015 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2017 * call.c (build_addr_func): Handle bound pointers-to-members.
2018 (build_method_call): Do not call resolve_offset_ref.
2019 (implicit_conversion): Likewise.
2020 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2022 (resolve_args): Do not call resolve_offset_ref.
2023 (build_conditional_expr): Likewise.
2024 (build_new_method_call): Likewise.
2025 * cp-tree.def (OFFSET_REF): Update documentation.
2026 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2027 pointers to members to pointers.
2028 (ocp_convert): Do not call resolve_offset_ref.
2029 (convert_to_void): Likewise.
2030 (build_expr_type_conversion): Likewise.
2031 * decl2.c (delete_sanity): Likewise.
2032 * init.c (resolve_offset_ref): Simplify greatly.
2033 (build_vec_delete): Do not call resolve_offset_ref.
2034 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2036 (cp_parser_unary_expression): Use
2037 cp_parser_simple_cast_expression.
2038 (cp_parser_delete_expression): Likewise.
2039 (cp_parser_cast_expression): Likewise.
2040 (cp_parser_pm_expression): Use cp_parser_binary_op.
2041 (cp_parser_simple_cast_expression): New function.
2042 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2043 * semantics.c (finish_increment_expr): Likewise.
2044 (finish_typeof): Likewise.
2045 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2046 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2047 (decay_conversion): Do not call resolve_offset_ref.
2048 (finish_class_member_access_expr): Likewise.
2049 (convert_arguments): Likewise.
2050 (build_x_binary_op): Handle DOTSTAR_EXPR.
2051 (condition_conversion): Do not call resolve_offset_ref.
2052 (unary_complex_lvalue): Likewise.
2053 (build_static_cast): Likewise.
2054 (build_reinterpret_cast): Likewise.
2055 (build_const_cast): Likewise.
2056 (build_c_cast): Likewise.
2057 (build_modify_expr): Likewise.
2058 (convert_for_assignment): Likewise.
2059 (convert_for_initialization): Likewise.
2060 * typeck2.c (build_x_arrow): Likewise.
2061 (build_m_component_ref): Simplify.
2063 * call.c (build_scoped_method_call): Use convert_to_void.
2064 (build_method_call): Likewise.
2065 * class.c (check_field_decls): Remove dead code.
2066 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2067 * decl2.c (grok_array_decl): Remove dead code.
2068 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2069 as pointer-to-member representation.
2070 * init.c (build_offset_ref): Tidy.
2071 (build_vec_delete_1): Use convert_to_void.
2072 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2073 as pointer-to-member representation.
2075 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
2078 * decl.c (grokdeclarator): Return friend decls, not
2080 * decl2.c (grokfield): Alter friend decl check.
2081 * parser.c (struct cp_parser): Document default_arg chain on
2082 unparsed_functions_queue.
2083 (cp_parser_save_default_args): New.
2084 (cp_parser_init_declarator, cp_parser_function_definition,
2085 cp_parser_member_declaration): Call it.
2086 (cp_parser_class_specifier): Remove unused variable. Alter
2087 processing of unparsed_functions_queue.
2089 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2091 * class.c (add_method, check_field_decl): Fix format specifier.
2092 * decl.c (duplicate_decls, pushdecl, check_goto,
2093 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2094 start_enum): Likewise.
2095 * decl2.c (ambiguous_decl): Likewise.
2096 * pt.c (redeclare_class_template): Likewise.
2098 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
2101 * pt.c (type_unification_real): Don't unify exprs of error type.
2102 * tree.c (error_type): Don't die on error_type.
2105 * decl2.c (arg_assoc_class): Don't die on NULL type.
2106 * typeck.c (type_unknown_p): Don't die on untyped expressions.
2108 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2111 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2114 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2116 * error.c (locate_error): %P takes an `int', not a `tree'.
2118 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
2120 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2121 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2122 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2125 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2126 (expand_or_defer_fn): Declare.
2127 (lower_function): Declare.
2128 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2129 * decl2.c: Include cgraph.h and varpool.h
2130 (maybe_emit_vtables): Make explicit instantations as needed.
2131 (mark_member_pointers, lower_function): New functions.
2132 (finish_file): Do unit-at-a-time.
2133 * method.c (synthesize_method): Use expand_or_defer_fn.
2134 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2135 * parser.c (cp_parser_function_definition_after_decl): Use
2137 * pt.c (instantiate_decl): Likewise.
2138 * semantics.c: Include cgraph.h
2139 (expand_or_defer_fn): Break out from ...
2140 (expand_body): ... here; deal with unit-at-a-time.
2141 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2142 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2144 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2146 * call.c (resolve_scoped_fn_name): Return error_mark_node for
2149 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2152 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2155 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
2158 * error.c (dump_decl): Handle BIT_NOT_EXPR as
2159 pseudo destructor calls.
2161 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
2163 * cp-tree.h (define_label): Replace filename and lineno
2164 arguments with a location_t.
2165 * decl.c (pop_label): Adjust define_label call.
2166 (define_label): Replace filename and lineno arguments with a
2168 * semantics.c (finish_label): Adjust define_label call.
2170 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2173 * decl2.c (grokfield): Do not build NOP_EXPRs around the
2176 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
2178 * Make-lang.in: Update.
2179 * cp-lang.c (c_language): Define.
2180 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2181 * cp-tree.h (cxx_init_options): Remove.
2182 * lex.c: Don't include diagnostic.h.
2183 (cxx_init_options): Remove.
2185 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2188 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2189 tree generated within a template. Use dump_expr to dump an
2192 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2194 * mangle.c (write_expression): Exit gracefully when trying to
2197 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2200 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2201 (value- or type-) dependent expression as DECL_INITIAL is a
2202 valid constant-expression (at parser time).
2204 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2207 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2208 USING_DECL, instead of print_tree_identifier.
2210 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2212 * cp-tree.h (language_to_string): Adjust declaration.
2213 * dump.c (cp_dump_tree): Adjust usage.
2214 * error.c (dump_char): Use output_formatted_scalar. Tidy.
2215 (parm_to_string): Lose unused parameter. Tidy.
2216 (expr_to_string): Likewise.
2217 (code_to_string): Likewise.
2218 (language_to_string): Likewise.
2219 (op_to_string): Likewise.
2220 (assop_to_string): Likewise.
2221 (digit_buffer): Remove.
2222 (dump_type): Format builtin vector type as __vector__.
2224 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2226 * error.c (print_integer): Remove.
2227 (dump_type_suffix): Adjust.
2228 (dump_expr): Likewise.
2230 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2232 * error.c (print_instantiation_partial_context): Take a
2234 (print_instantiation_full_context): Adjust.
2235 (print_instantiation_context): Adjust.
2237 * cp-tree.h (cp_line_of, cp_file_of): Remove.
2238 * error.c (cp_line_of, cp_file_of): Merge into ...
2239 (location_of): ... here. Make static, return a location_t.
2240 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2242 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2245 * call.c (joust): Move warn_conversion check outwards.
2247 2003-06-27 Zack Weinberg <zack@codesourcery.com>
2249 * decl.c (build_typename_type)
2250 * mangle.c (write_template_template_arg)
2251 * parser.c (cp_parser_scope_through_which_access_occurs)
2252 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2253 * repo.c (get_base_filename)
2254 * semantics.c (maybe_convert_cond):
2255 Mark the definition static, matching the forward declaration.
2257 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2260 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2262 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2265 * decl.c (finish_enum): Implement DR377.
2267 * decl.c (cp_finish_decl): Don't make variables with reference
2268 type readonly while they are being initialized.
2270 2003-06-26 Mark Mitchell <mark@codesourcery.com>
2273 * typeck.c (build_static_cast): Avoid returning expressions with
2276 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
2278 * call.c (build_op_delete_call): Use strip_array_call. Correct
2279 error message to say 'delete' or 'delete[]'.
2281 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
2284 * pt.c (check_explicit_specialization): When looking up a
2285 template function from an identifier outside class-scope, bind
2286 it to CP_DECL_CONTEXT.
2288 2003-06-25 Mark Mitchell <mark@codesourcery.com>
2291 * search.c (lookup_base_r): Rely on accessible_p, rather than
2292 trying to emulate that logic here.
2295 * call.c (convert_like): Pass issue_conversion_warnings.
2296 (convert_like_with_context): Likewise.
2297 (convert_like_real): Add issue_conversion_warnings parameter.
2298 (perform_direct_initialization_if_possible): New function.
2299 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2300 * typeck.c (check_for_casting_away_constness): New function.
2301 (build_static_cast): Rewrite.
2303 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
2305 * call.c (enforce_access): Assert we get a binfo.
2306 (build_op_delete_call): Pass a binfo to
2307 perform_or_defer_access_check.
2308 * class.c (alter_access): Likewise.
2309 * decl.c (make_typename_type): Likewise.
2310 (make_unbound_class_template): Likewise.
2311 * lex.c (do_identifier): Likewise.
2312 * method.c (hack_identifier): Likewise.
2313 * parser.c (cp_parser_lookup_name): Likewise.
2314 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2316 * semantics.c (finish_non_static_data_member): Likewise.
2317 (perform_or_defer_access_check): Expect a binfo.
2318 * typeck.c (comptypes): Expect types.
2320 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2321 * friend.c (make_friend_class): Likewise.
2322 * pt.c (check_default_tmpl_args): Likewise.
2323 (lookup_template_class): Likewise.
2325 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
2327 * method.c (thunk_labelno): Move outside ifdef block to make garbage
2330 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
2332 * class.c (build_vtable): Make vtables.
2333 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2334 * decl2.c (output_vtable_inherit): Rename to ...
2335 (prepare_assemble_variable): ... this one; change interface.
2336 (maybe_emit_vtables): Do not call output_vtable_inherit.
2337 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2338 * cp-tree.h (prepare_assemble_variable): New.
2340 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
2342 * method.c: add prototype for make_alias_for_thunk.
2343 (thunk_labelno, make_alias_for_thunk): only define
2344 if ASM_OUTPUT_DEF is defined.
2346 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2348 * method.c (thunk_labelno): New variable.
2349 (make_alias_for_thunk): New function.
2350 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
2351 into the same section as the function it is calling.
2352 Include gt-cp-method.h.
2353 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2354 (cp/method.o): Depend on gt-cp-method.h.
2355 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2357 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
2359 * decl.c (register_dtor_fn): Mark cleanup as used.
2360 * decl2.c (mark_vtable_entries): Skip nops.
2361 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2362 (build_dynamic_cast_1): Likewise.
2363 (tinfo_base_init): Likewise.
2364 (emit_tinfo_decl): Likewise.
2366 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2368 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2371 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2374 * call.c (joust): Warn about choosing conversion sequence only if
2377 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2380 * call.c (op_error): Tidy.
2381 * error.c (dump_expr): Properly format 'T()' when T is an
2384 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2387 * decl.c (grok_op_properties): Warn possible confusing conversion
2388 only if -Wconversion.
2390 2003-06-20 Mark Mitchell <mark@codesourcery.com>
2393 * parser.c (cp_parser_class_head): See through dependent names
2394 when parsing a class-head.
2397 * pt.c (try_class_unification): Correct handling of member class
2400 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
2402 * semantics.c (genrtl_finish_function): Adjust
2403 expand_function_end call.
2405 2003-06-19 Mark Mitchell <mark@codesourcery.com>
2408 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2410 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2413 * cp-tree.h (pushdecl_class_level): Change prototype.
2414 (push_class_level_binding): Likewise.
2415 * decl.c (add_binding): Reject duplicate static data members.
2416 (pushdecl_class_level): Return a value indicating whether or not
2417 the binding was valid.
2418 (push_class_level_binding): Likewise.
2419 * semantics.c (finish_member_declaration): Don't keep invalid
2423 * call.c (initialize_reference): Do not use cp_finish_decl to emit
2424 temporary variables.
2425 * cp-tree.h (static_aggregates): Declare.
2426 (pushdecl_top_level_and_finish): Likewise.
2427 * decl.c (pushdecl_top_level_1): New function.
2428 (pushdecl_top_level): Use it.
2429 (pushdecl_top_level_and_finish): New function.
2430 (initialize_local_var): Remove redundant code.
2431 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
2433 * decl.h (static_aggregates): Remove.
2434 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2435 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2436 (tinfo_base_init): Likewise.
2438 2003-06-19 Matt Austern <austern@apple.com>
2441 * init.c (build_zero_init): Assert that number of array elements
2442 is an integer constant.
2443 (build_default_init) Don't use build_zero_init for arrays with
2444 variable number of elements.
2446 2003-06-19 Andreas Jaeger <aj@suse.de>
2448 * cp-tree.h: Remove duplicated declarations.
2450 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
2452 * pt.c: Convert to ISO C.
2453 * semantics.c: Convert to ISO C.
2455 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2457 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2458 at_least_as_qualified_p, more_qualified_p): Return bool.
2459 * typeck.c: ANSIFY function definitions.
2460 (comp_array_types): Take redeclaration bool parameter.
2461 (comptypes): Rearrange STRICT handling.
2462 (at_least_as_qualified_p, more_qualified_p,
2463 comp_cv_qualification): Cache cv quals.
2464 (compparms): Rearrange loop.
2466 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2468 * cp-tree.h (COMPARE_RELAXED): Rename to ...
2469 (COMPARE_DERIVED): ... here. Adjust comment.
2470 (resolve_typename_type_in_current_instantiation): Remove.
2471 (cp_tree_equal, comptypes): Return a bool.
2472 * cvt.c (convert_to_reference): Adjust comptypes call.
2473 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2474 (resolve_typename_type_in_current_instantiation): Remove.
2475 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2476 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2477 calls. Refactor code.
2478 * typeck.c (comp_array_types): Return bool. Lose callback.
2479 parameter. Adjust cp_tree_equal calls.
2480 (comptypes): Return bool. Adjust strict handling. Remove relaxed
2481 enumeration and java type handling. Deal with typename types here.
2482 Adjust recursive and cp_tree_equals calls. Adjust base and derived
2484 (comp_target_types): Remove unreachable code. Adjust
2485 same_or_base_type_p calls.
2486 (ptr_reasonably_similar): Adjust base and derived check.
2488 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2490 (check_return_expr): Adjust error messages.
2491 * cp-tree.def (SCOPE_REF): Correct comment.
2493 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2495 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2498 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
2500 * optimize.c (dump_function): Form complete flag name by
2501 prefixing 'fdump-' to string returned by dump_flag_name().
2503 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2505 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2508 2003-06-17 Jason Merrill <jason@redhat.com>
2511 * decl.c (grokfndecl): Don't mark a function inline for
2512 -finline-functions if it isn't defined.
2514 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2517 * class.c (handle_using_decl): Robustify.
2520 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2521 * mangle.c (struct globals): Remove internal_mangling_p.
2522 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2523 (write_template_parm): Don't write out the level number.
2524 (conv_type_names): New variable.
2525 (hash_type): New function.
2526 (compare_type): Likewise.
2527 (mangle_conv_op_name_for_type): Don't try to mangle conversion
2529 * search.c (lookup_conversion_operator): New function.
2530 (lookup_fnfields_1): Use it.
2532 2003-06-17 Andreas Jaeger <aj@suse.de>
2534 * except.c: Remove duplicate declaration of push_eh_cleanup.
2536 * call.c: Remove extra declaration of inhibit_warnings.
2538 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2540 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
2541 * mangle.c: Convert to ISO C.
2543 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2545 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2548 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2550 * tree.c: Convert to ISO C.
2552 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
2554 * cp-tree.h: Follow spelling conventions.
2555 * mangle.c: Likewise.
2556 * method.c: Likewise.
2557 * parser.c: Likewise.
2559 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
2561 * decl.c (start_function): Adjust init_function_start call.
2562 * method.c (use_thunk): Likewise.
2563 * semantics.c (genrtl_start_function): Likewise.
2565 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2567 * Make-lang.in: Remove c-options.o.
2569 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
2571 * lex.c: Convert to ISO C.
2573 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
2574 * init.c: removes use of PARAMS macro. Use ISO style function
2575 declarations. (Not copyright-significant change.)
2577 * rtti.c: Remove PARAMS.
2579 * typeck2.c: Convert to ISO C.
2581 2003-06-12 Mark Mitchell <mark@codesourcery.com>
2584 * typeck.c (build_c_cast): Check that the destination type is
2587 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2590 * cp-tree.h (finish_declarator): Remove.
2591 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2592 erroneous declarations.
2593 * semantics.c (finish_declarator): Remove.
2595 2003-06-11 Roger Sayle <roger@eyesopen.com>
2597 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2598 global static constructor/destructor if it will be empty, i.e.
2599 either doesn't call any ctors/dtors or only calls pure or const
2602 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2604 * mangle.c (tm_p.h): Include it.
2605 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2608 * tree.c (cp_cannot_inline_fn): Check for "inline" before
2611 2003-06-10 Jason Merrill <jason@redhat.com>
2614 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2616 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
2618 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2619 (start_cleanup_cnt): New.
2621 2003-06-10 Mark Mitchell <mark@codesourcery.com>
2624 * cp-tree.h (template_for_substitution): Declare.
2625 * decl2.c (mark_used): Use it when figuring out whether or not a
2627 * pt.c (template_for_substitution): Give it external linkage.
2628 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2631 2003-06-09 Zack Weinberg <zack@codesourcery.com>
2634 * mangle.c (write_real_cst): New function. Implement
2635 ABI-compliant mangling of floating-point literals when
2636 -fabi-version>=2; provide backward compatibility with 3.3 when
2637 -fabi-version=1 (with warning). Clarify commentary.
2638 (write_template_arg_literal): Use write_real_cst.
2640 2003-06-07 Andreas Jaeger <aj@suse.de>
2642 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2644 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
2646 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2647 (LANG_HOOKS_HANDLE_OPTION): Override.
2648 * cp-tree.h (cxx_init_options): Update.
2649 * lex.c (cxx_init_options): Update.
2651 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
2653 * Make-lang.in: Add support for stageprofile and stagefeedback
2655 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
2657 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2659 2003-06-04 Andreas Jaeger <aj@suse.de>
2661 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2663 2003-06-03 Jason Merrill <jason@redhat.com>
2665 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2667 * cp/decl.c (reshape_init): Handle vectors.
2669 * testsuite/g++.dg/init/array10.C: New.
2671 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2674 * pt.c (check_explicit_specialization): Check for 'static'
2677 2003-05-31 Diego Novillo <dnovillo@redhat.com>
2679 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2680 the operand of a CONSTRUCTOR node.
2682 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2684 * decl.c (cp_binding_level::this_entity): Rename from this_class.
2685 (cxx_scope_descriptor): New function.
2686 (cxx_scope_debug): Likewise.
2687 (push_binding_level): Use it.
2688 (pop_binding_level): Likewise.
2689 (suspend_binding_level): Likewise.
2690 (resume_binding_level): Likewise.
2691 (pushlevel_class): Adjust use of this_class.
2692 (pushtag): Likewise.
2693 (lookup_name_real): Likewise.
2694 (global_scope_name): New variable.
2695 (initialize_predefined_identifiers): Initialize it.
2696 (push_namespace): Use it.
2697 (make_cxx_scope): New function.
2698 (pushlevel): Use it.
2699 (pushlevel_class): Likewise.
2700 (push_binding_level): Simplify. Loose the last two arguments.
2701 (make_binding_level): Remove.
2702 (initial_push__namespace_scope): New function.
2703 (push_namespace): Use it. Simplify.
2704 (cxx_init_decl_processing): Likewise.
2705 (declare_namespace_level): Remove.
2707 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2710 * pt.c (instantiate_decl): Don't use full template arguments if
2711 we are dealing with specializations.
2713 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2715 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2716 (binding_depth): Unconditionally define.
2717 (is_class_level): Likewise.
2718 (indent): Likewise. Take an indenting parameter.
2719 (push_binding_level): Remove conditional definittion.
2720 (pop_binding_level): Likewise.
2721 (suspend_binding_level): Likewise.
2722 (resume_binding_level): Likewise.
2723 (pushlevel): Likewise.
2724 (pushlevel_class): Likewise.
2725 (poplevel_class): Likewise.
2726 (pop_everything): Likewise.
2728 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2730 * name-lookup.h (global_scope_p): New macro.
2731 * decl.c (pop_binding_level): Use it. Don't refer directly to
2732 global_binding_level.
2733 (suspend_binding_level): Likewise.
2734 (global_bindings_p): Likewise.
2735 (print_other_binding_stack): Likewise.
2736 (print_binding_stack): Likewise.
2737 (maybe_push_to_top_level): Likewise.
2738 (pushdecl_namespace_level): Likewise.
2739 (cxx_init_decl_processing): Likewise.
2740 (start_decl): Likewise.
2741 (cp_finish_decl): Likewise.
2742 (start_function): Likewise.
2743 (global_binding_level): Remove.
2745 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2747 * parser.c (cp_parser_explicit_instantiation): Restore old
2748 access before template instantiation.
2750 2003-05-23 Geoffrey Keating <geoffk@apple.com>
2752 * lang-specs.h: Use -o to specify preprocessor's output file.
2753 Make -no-integrated-cpp work when building PCH files.
2755 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2758 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2759 check for implicitly created typedef to an enum.
2761 2003-05-21 Jason Merrill <jason@redhat.com>
2763 * init.c (build_vec_delete): Copy the address into a temporary
2764 variable before calling build_vec_delete_1.
2765 * decl2.c (delete_sanity): Don't call stabilize_reference.
2767 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
2769 * pt.c (register_specialization): Update the decl's location,
2771 (check_explicit_specialization): Likewise.
2773 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2775 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2777 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
2780 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2781 if the old decl had instantiated DECL_RTL.
2782 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2784 2003-05-19 Matt Austern <austern@apple.com>
2786 * lang-options.h: Document -Wno-invalid-offsetof
2787 * typeck.c (build_class_member_access_expr): Don't complain about
2788 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2790 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2792 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2793 (binding_entry_make): Make entry->chain NULL after getting an entry.
2794 fix the spelling of chain in a comment.
2795 (binding_table_free): speed up by having temporary variable.
2796 (binding_table_new): set table->chain to be NULL after allocating
2798 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2799 binding->previous to NULL after getting an binding for speed.
2801 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
2803 * cp-tree.h (struct lang_type_class): Replace data member tags
2804 with hash-table nested_udts.
2805 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2806 * class.c (unreverse_member_declarations): Don't touch
2808 (pushclass): Use cxx_remember_type_decls.
2809 * decl.c (struct cp_binding_level): Replace data member tags with
2810 hash-table type_decls.
2811 (pop_binding_level): Handle level->type_decls.
2812 (kept_level_p): Adjust.
2813 (poplevel): Remove unused local variable.
2814 (bt_print_entry): New function.
2815 (print_binding_level): Use it.
2816 (push_namespace): Build current_binding_level->type_decls.
2817 (maybe_process_template_type_declaration): Adjust.
2818 (pushtag): Likewise.
2819 (clear_anon_tags): Use binding_table_remove_anonymous_types.
2821 (cxx_remember_type_decls): Rename from storetags. Adjust.
2822 (lookup_tag): Use binding_table_find_anon_type. Tidy.
2823 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2824 (cxx_init_decl_processing): Build global_binding_level->type_decls.
2825 (store_parm_decls): Remove pointless code.
2826 * name-lookup.c (free_binding_entry): New variable.
2827 (ENTRY_INDEX): New macro.
2828 (struct binding_table_s): New datatype.
2829 (binding_entry_make): New function.
2830 (binding_entry_free): Likewise.
2831 (binding_table_construct): Likewise.
2832 (binding_table_free): Likewise.
2833 (binding_table_new): Likewise.
2834 (binding_table_expand): Likewise.
2835 (binding_table_insert): Likewise.
2836 (binding_table_find): Likewise.
2837 (binding_table_find_anon_type): Likewise.
2838 (binding_table_reverse_maybe_remap): Likewise.
2839 (binding_table_remove_anonymous_types): Likewise.
2840 (binding_table_foreach): Likewise.
2841 * name-lookup.h (binding_table): New type.
2842 (binding_entry): Likewise.
2843 (bt_foreach_proc): Likewise.
2844 (struct binding_entry_s): New datatype.
2845 (SCOPE_DEFAULT_HT_SIZE): New macro.
2846 (CLASS_SCOPE_HT_SIZE): Likewise.
2847 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2848 (NAMESPACE_STD_HT_SIZE): Likewise.
2849 (GLOBAL_SCOPE_HT_SIZE): Likewise.
2850 (binding_table_new): Declare.
2851 (binding_table_free): Likewise.
2852 (binding_table_insert): Likewise.
2853 (binding_table_find_anon_type): Likewise.
2854 (binding_table_reverse_maybe_remap): Likewise.
2855 (binding_table_remove_anonymous_types): Likewise.
2856 (binding_table_foreach): Likewise.
2857 (binding_table_find): Likewise.
2858 (cxx_remember_type_decls): Likewise.
2859 * pt.c (bt_instantiate_type_proc): New function.
2860 (do_type_instantiation): Use it.
2861 * search.c (lookup_field_r): Use binding_table_find.
2863 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2865 * semantics.c (perform_deferred_access_checks): Don't discard
2868 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2870 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2871 libiberty VA_ macros, always use stdarg.
2872 * rtti.c (create_pseudo_type_info): Likewise.
2873 * tree.c (build_min_nt, build_min): Likewise.
2875 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2877 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2878 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2879 collapse multiple function calls into one.
2880 * tree.c (debug_binfo): Likewise.
2882 2003-05-15 Jason Merrill <jason@redhat.com>
2885 * call.c (conditional_conversion): Don't consider implicit
2886 conversions if T2 is a base of T1.
2887 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2888 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2890 * parser.c (cp_parser_primary_expression): Convert a static data
2891 member from reference.
2893 2003-05-15 Mark Mitchell <mark@codesourcery.com>
2895 * call.c (build_op_delete_call): Avoid creating unnecessary types.
2896 * class.c (instantiate_type): Remove tests for tf_no_attributes.
2897 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2898 (COMPARE_NO_ATTRIBUTES): Remove.
2899 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2902 * semantics.c (finish_typeof): Refine type-dependency check.
2904 2003-05-13 Jason Merrill <jason@redhat.com>
2906 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2907 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2909 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2911 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2913 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2915 PR c++/10230, c++/10481
2916 * semantics.c (finish_non_static_data_member): Handle when the
2917 non-static member is not from a base of the current class type.
2919 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2922 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2923 template and has dependent context.
2925 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2927 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2929 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2932 * cp-tree.h (saved_scope): Remove check_access field.
2933 (tsubst_flags_t): Remove tf_parsing.
2934 * decl.c (maybe_push_to_top_level): Don't initialize
2935 scope_chain->check_access.
2936 (make_typename_type, make_unbound_class_template): Don't use
2938 (register_dtor_fn): Use push/pop_deferring_access_checks
2939 instead of scope_chain->check_access.
2940 * method.c (use_thunk): Likewise.
2941 * parser.c (cp_parser_explicit_instantiation
2942 (cp_parser_constructor_declarator_p): Don't call
2943 push/pop_deferring_access_checks here.
2944 (cp_parser_template_argument, cp_parser_class_name): Don't use
2946 (yyparse): Check flag_access_control.
2947 * pt.c (instantiate_class_template): Call
2948 push/pop_deferring_access_checks.
2949 * semantics.c (push_deferring_access_checks): Propagate
2951 (perform_or_defer_access_check): Make sure basetype_path is
2952 a type before comparison.
2953 * call.c (build_op_delete_call, build_over_call): Use
2954 perform_or_defer_access_check.
2955 * class.c (alter_access): Likewise.
2956 * init.c (build_offset_ref): Likewise.
2957 * lex.c (do_identifier): Likewise.
2958 * method.c (hack_identifier): Likewise.
2959 * search.c (lookup_member): Likewise.
2960 * semantics.c (finish_non_static_data_member): Likewise.
2961 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2962 instead of flag_access_control.
2964 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2967 * parser.c (cp_parser_class_name): Remove check_access parameter.
2968 All caller adjusted. Update declaration.
2969 (cp_parser_lookup_name): Likewise.
2970 * semantics.c (push_deferring_access_checks): Change parameter type
2971 to enum deferring_kind. All caller adjusted.
2972 (resume_deferring_access_checks): Adjust to use new enum.
2973 (stop_deferring_access_checks): Likewise.
2974 (perform_or_defer_access_check): Likewise.
2975 * cp-tree.h (deferring_kind): New enum.
2976 (deferred_access): Adjust field type.
2977 (push_deferring_access_checks): Update declaration.
2979 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2981 PR c++/10555, c++/10576
2982 * pt.c (lookup_template_class): Handle class template with
2983 multiple levels of parameters when one of the levels contain
2986 2003-05-08 Jason Merrill <jason@redhat.com>
2988 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2989 expression. Undo some of the recent reorg.
2991 2003-05-07 Richard Henderson <rth@redhat.com>
2994 * cfns.gperf: Comment out POSIX thread cancellation points,
2995 plus abort and raise.
2996 * cfns.h: Regenerate.
2998 2003-05-07 Jason Merrill <jason@redhat.com>
3000 * call.c (build_conditional_expr): Don't assume that the folded
3001 expression has result_type.
3003 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3005 * typeck.c (build_unary_op): Deal with const qualifier in
3006 invalid pointer-to-member earlier.
3008 2003-05-05 Jason Merrill <jason@redhat.com>
3011 * call.c (conditional_conversion): Build an RVALUE_CONV if
3012 we're just changing the cv-quals.
3013 (build_conditional_expr): Don't call convert to change
3016 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3019 * typeck.c (build_unary_op): Don't output const qualifier when
3020 output invalid pointer-to-member diagnostics.
3022 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3024 * decl.c: Fix typos.
3026 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3029 * decl.c (start_function): Use same_type_p to check return type
3032 2003-05-03 Zack Weinberg <zack@codesourcery.com>
3035 * cp/typeck.c (build_x_compound_expr): No need to check
3036 extra_warnings as well as warn_unused_value.
3038 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3040 PR c++/9364, c++/10553, c++/10586
3041 * decl.c (make_typename_type): Don't crash on illegal code.
3043 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
3045 * class.c (finish_struct): Use location_t and input_location
3047 * decl.c (make_label_decl): Likewise.
3048 (use_label): Likewise.
3049 * decl2.c (warn_if_unknown_interface): Likewise.
3050 (start_static_initialization_or_destruction): Likewise.
3051 (generate_ctor_or_dtor_function): Likewise.
3052 (finish_file): Likewise.
3053 * error.c (print_instantiation_full_context): Likewise.
3054 * init.c (create_temporary_var): Likewise.
3055 * method.c (synthesize_method): Likewise.
3056 * parser.c (cp_token): Likewise.
3057 (cp_lexer_set_source_position_from_token): Likewise.
3058 (cp_lexer_get_preprocessor_token): Likewise.
3059 (cp_parser_statement): Likewise.
3060 * pt.c (tsubst_friend_function): Likewise.
3061 (instantiate_class_template): Likewise.
3062 (tsubst_decl): Likewise.
3064 (instantiate_decl): Likewise.
3065 * semantics.c (begin_class_definition): Likewise.
3066 (expand_body): Likewise.
3068 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3070 * class.c (finish_struct): Rename lineno to input_line.
3071 * decl.c (push_binding_level, pop_binding_level,
3072 suspend_binding_level, resume_binding_level, make_label_decl,
3073 use_label, start_function): Likewise.
3074 * decl2.c (warn_if_unknown_interface,
3075 start_static_initialization_or_destruction,
3076 generate_ctor_or_dtor_function, finish_file): Likewise.
3077 * error.c (cp_line_of, print_instantiation_full_context,
3078 print_instantiation_context): Likewise.
3079 * except.c (check_handlers_1, check_handlers): Likewise.
3080 * init.c (create_temporary_var): Likewise.
3081 * method.c (use_thunk, synthesize_method): Likewise.
3082 * parser.c (cp_lexer_set_source_position_from_token,
3083 cp_lexer_get_preprocessor_token): Likewise.
3084 * pt.c (push_tinst_level, pop_tinst_level,
3085 tsubst_friend_function, instantiate_class_template, tsubst_decl,
3086 tsubst, tsubst_expr, instantiate_decl): Likewise.
3087 * semantics.c (genrtl_try_block, finish_label_stmt,
3088 begin_class_definition, expand_body,
3089 genrtl_finish_function): Likewise.
3090 * tree.c (build_min_nt, build_min): Likewise.
3092 2003-05-01 Mark Mitchell <mark@codesourcery.com>
3094 * decl2.c (comdat_linkage): Don't externalize explicit
3097 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3100 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3103 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
3105 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
3106 (struct lang_identifier): ... to here.
3107 (LANG_ID_FIELD): Remove.
3108 (SET_LANG_ID): Remove.
3109 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3110 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3111 (IDENTIFIER_IMPLICIT_DECL): Likewise.
3112 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3113 (IDENTIFIER_ERROR_LOCUS): Likewise.
3114 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3116 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3119 * pt.c (convert_template_argument): Correct diagnostic.
3121 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3123 PR c++/9432, c++/9528
3124 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3126 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
3128 * decl.c (check_previous_goto_1): Adjust prototype.
3129 (check_previous_goto): Adjust use.
3130 (check_switch_goto): Likewise.
3131 (use_label): Adjust.
3132 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3133 (struct named_label_use_list): Use location_t datatype.
3135 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3138 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3139 that have not yet been written out.
3141 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3144 * class.c (layout_class_type): Mark overlong bitfields as having
3145 the maximum size permitted by their type, after layout.
3148 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3150 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3152 * call.c (build_operator_new_call): Fix typo.
3153 * lang-options.h: Likewise.
3155 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3158 * cp-tree.h (lookup_field_1): Declare it.
3159 * search.c (lookup_field_1): Make it public.
3160 * decl.c (reshape_init): Handle designated initializers.
3162 * decl.c (maybe_commonize_var): Further tweak support for systems
3163 without weak symbols.
3165 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3167 * decl.c (maybe_commonize_var): Fix thinko in last patch.
3169 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3172 * method.c (use_thunk): Decrement immediate_size_expand.
3175 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3176 (DECL_MAYBE_TEMPLATE): Remove.
3177 * class.c (fixed_type_or_null): Avoid infinite recursion.
3179 * decl.c (maybe_commonize_var): Make the code match the comments.
3180 * pt.c (instantiate_decl): Move call to import_export_decl.
3182 2003-04-26 Mark Mitchell <mark@codesourcery.com>
3184 * decl2.c (finish_file): Fix merge botch.
3186 2003-04-25 Mark Mitchell <mark@codesourcery.com>
3188 * decl2.c (finish_file): Don't call import_export_decl for
3189 functions that are not defined.
3190 (handle_class_head): Robustify.
3191 * pt.c (instantiate_decl): Do not call cp_finish_decl for
3192 variables that are not defined.
3194 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
3196 * call.c (print_z_candidates): Fix off by one error.
3198 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
3201 * call.c (joust): Don't warn about conversion ops that are exact
3202 or cv-conversions. Rearrange to avoid multiple type comparisons.
3204 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3207 * call.c (build_cxx_call): Robustify.
3209 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
3211 * Make-lang.in (lex.o): Remove mbchar.h.
3212 * lex.c (MULTIBYTE_CHARS): Lose.
3213 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3216 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3219 * cp-tree.h (duplicate_tag_error): Remove.
3220 * class.c (duplicate_tag_error): Remove.
3221 * semantics.c (begin_class_definition): Return immediately for a
3222 duplicate class definition.
3225 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3227 2003-04-22 Mark Mitchell <mark@codesourcery.com>
3230 * search.c (lookup_fnfields_1): Handle empty slots in the method
3234 * decl.c (check_elaborated_type_specifier): New function, split
3236 (xref_tag): ... here. Use the new function in more places.
3238 * rtti.c (throw_bad_typeid): Use build_cxx_call.
3240 2003-04-21 Mark Mitchell <mark@codesourcery.com>
3242 * call.c (build_over_call): Use build_cxx_call.
3243 (build_cxx_call): New method, split out of build_over_call.
3244 * cp-tree.h (language_function): Add can_throw.
3245 (build_cxx_call): Declare it.
3246 * decl.c (finish_function): If a function does not contain any
3247 calls to functions that can throw an exception, indicate that
3249 * decl2.c (mark_used): Do not defer the instantiation of
3250 functions, if the current function does not throw.
3251 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3252 * pt.c (instantiate_decl): Make sure import_export_decl is called
3253 before emitting things.
3254 * rtti.c (throw_bad_cast): Use build_cxx_call.
3255 (build_dynamic_cast_1): Likewise.
3256 * typeck.c (build_function_call): Likewise.
3258 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
3261 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3262 expressions. Reverts my 2002-08-08 patch.
3264 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3267 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3269 * cp/decl2.c (start_static_storage_duration_function): Take count
3270 arg, don't check if it wraps round.
3271 (generate_ctor_or_dtor_function): Add locus arg, use it.
3272 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3274 (finish_file): Set line numbers to past EOF for synthesized
3277 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3280 * search.c (lookup_field_1): Final scan goes backwards for
3281 types, forwards for non-types.
3283 2003-04-17 Roger Sayle <roger@eyesopen.com>
3286 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3287 "nothrow" function attributes.
3289 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3292 * pt.c (type_dependent_expression_p): Handle array new.
3294 2003-04-15 Mark Mitchell <mark@codesourcery.com>
3297 * parser.c (cp_parser_primary_expression): Reorganize logic for
3298 dealing with name lookup failures.
3300 2003-04-15 Jason Merrill <jason@redhat.com>
3302 * decl2.c (mark_used): Don't instantiate anything if
3305 2003-04-14 Ziemowit Laski <zlaski@apple.com>
3307 * tree.c (build_cplus_array_type_1): Do not call
3308 uses_template_parms() on a NULL index_type.
3310 2003-04-13 Roger Sayle <roger@eyesopen.com>
3312 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3314 2003-04-12 Mark Mitchell <mark@codesourcery.com>
3317 * init.c (build_new_1): Reorganize.
3319 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3321 * class.c (initialize_array)
3322 * decl.c (reshape_init)
3323 * decl2.c (build_expr_from_tree)
3324 * init.c (build_zero_init)
3325 * pt.c (tsubst_copy, tsubst_copy_and_build)
3326 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3327 (ptm_initializer, class_initializer, get_pseudo_ti_init)
3328 * semantics.c (finish_compound_literal)
3329 * typeck.c (build_ptrmemfunc1)
3330 * typeck2.c (store_init_value, process_init_constructor)
3331 (build_functional_cast): Use build_constructor.
3333 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3335 * call.c (print_z_candidates): Use gcc_gettext_width, not
3336 strlen, to determine how much padding to use.
3338 2003-04-10 Zack Weinberg <zack@codesourcery.com>
3340 * decl.c: Update all calls to shadow_warning.
3342 2003-04-10 Mark Mitchell <mark@codesourcery.com>
3344 * class.c (layout_class_type): Correct handling for overlong
3345 bit-fields whose width is the same as an integer type.
3347 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3349 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3350 * cp-lang.c (cp_tree_size): New function.
3351 (LANG_HOOKS_TREE_SIZE): Override.
3353 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3354 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3355 (union lang_tree_node): Remove common and srcloc members.
3356 (build_srcloc_here): Don't prototype.
3357 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3358 * pt.c (pending_templates): Correct comment.
3359 * tree.c (build_srcloc, build_srcloc_here): Kill.
3361 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3363 * call.c: Include intl.h.
3364 (print_z_candidate): Always use inform; get rid of errfn
3365 argument. Reorganize so that all the strings get picked up
3366 by xgettext. Note obligation of caller to pass first argument
3368 (print_z_candidates): Update to match. Indent second and
3369 successive candidates by strlen() of translated message.
3370 (joust): Restructure ambiguous-conversion pedwarn so that
3371 translators see a complete sentence. Update calls to
3374 * Make-lang.in (cp/call.o): Update dependencies.
3376 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3378 * decl.c (set_current_binding_level): Delete, revert last change.
3379 (current_binding_level): Modify to allow it as as lvalue.
3381 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3383 * name-lookup.c (find_binding): Pass appropriate pointer type to
3384 POP_TIMEVAR_AND_RETURN.
3386 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3388 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3389 * cp-tree.h: Don't insist on having GNUC.
3391 2003-04-03 Jason Merrill <jason@redhat.com>
3393 * cvt.c (ocp_convert): Only abort if we try to convert an object
3394 of TREE_ADDRESSABLE type.
3396 * class.c (build_vtable): Set DECL_ALIGN here.
3397 (get_vtable_decl): Not here.
3398 (layout_vtable_decl): Or here.
3399 (create_vtable_ptr): Or here.
3400 (layout_class_type): Or here.
3401 (check_bitfield_decl): Don't mess with field alignment.
3403 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3405 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3406 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3407 * rtti.c (dfs_class_hint_mark): Likewise.
3409 * decl.c (push_local_name, push_class_level_binding,
3410 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3411 functions returning void.
3412 * decl2.c (add_using_namespace): Likewise.
3414 * decl.c (print_binding_level, print_other_binding_stack,
3415 print_binding_stack): Cast argument of %p specifier to void*.
3416 * ptree.c (cxx_print_decl): Likewise.
3418 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3419 VAR_FUNCTION_OR_PARM_DECL_CHECK,
3420 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3421 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3422 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3424 * decl.c (set_current_binding_level): New macro. Use throughout
3425 when setting the current binding level.
3427 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3429 * method.c (mangling_flags): Likewise.
3431 * cp-tree.h (lang_type_header): Add __extension__ and use
3432 CHAR_BITFIELD for members.
3434 2003-04-02 Geoffrey Keating <geoffk@apple.com>
3437 * mangle.c: Include gt-cp-mangle.h.
3438 (subst_identifiers): Mark with GTY.
3439 * config-lang.in (gtfiles): Add cp/mangle.c.
3440 * Make-lang.in: (gt-cp-mangle.h): New rule.
3441 (cp/mangle.o): Depends on gt-cp-mangle.h.
3443 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
3445 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3446 after \$(srcdir)/cp/name-lookup.h.
3447 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3448 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
3449 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3450 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3452 2003-03-31 Jason Merrill <jason@redhat.com>
3455 * class.c (check_field_decl): Don't set DECL_ALIGN.
3457 2003-03-30 Mark Mitchell <mark@codesourcery.com>
3460 * decl.c (grokdeclarator): Tidy, slightly.
3461 * search.c (lookup_field_1): Add want_type parameter.
3462 (lookup_field_r): Adjust call to lookup_field_1.
3464 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3466 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3468 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3470 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
3472 (cxx_scope_find_binding_for_name): Likewise.
3473 * decl.c (find_binding: Move to name-lookup.c.
3474 (binding_for_name): Likewise.
3475 (cxx_scope_find_binding_for_name): Likewise.
3476 (BINDING_LEVEL): Remove.
3477 (push_binding): Tidy.
3478 (push_class_binding): Likewise.
3479 (pop_binding): Likewise.
3480 (poplevel): Likewise.
3481 (poplevel_class): Likewise.
3482 (set_identifier_type_value_with_scope): Likewise.
3483 (push_overloaded_decl): Likewise.
3484 (lookup_tag): Likewise.
3485 (unqualified_namespace_lookup): Likewise.
3486 (lookup_name_current_level): Likewise.
3487 (maybe_inject_for_scope_var): Likewise.
3488 (namespace_binding): Move to name-lookup.c.
3489 (set_namespace_binding): Likewise.
3490 * decl2.c (lookup_using_namespace): Tidy.
3491 (qualified_lookup_using_namespace): Likewise.
3492 (do_toplevel_using_decl): Likewise.
3493 * name-lookup.c: Include "timevar.h"
3494 * name-lookup.h (cxx_scope): Declare.
3495 (struct cxx_binding): Lose member "has_level". Adjust "scope"
3497 (BINDING_SCOPE): Adjust definition.
3498 (BINDING_HAS_LEVEL_P): Remove.
3500 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3502 * name-lookup.c: New file.
3503 * name-lookup.h: Likewise..
3504 * decl.c (push_binding): Adjust use cxx_binding_make.
3505 (free_bindings): Move to name-lookup.c
3506 (pop_binding): Use cxx_binding_free.
3507 (binding_for_name): Tidy.
3508 * cp-tree.h: Include "name-lookup.h"
3509 (cxx_binding_make): Move to name-lookup.h
3510 (cxx_binding_clear): Likewise.
3511 (struct cxx_binding): Likewise.
3512 (LOCAL_BINDING_P): Likewise.
3513 (INHERITED_VALUE_BINDING_P): Likewise.
3514 (BINDING_SCOPE): Likewise.
3515 (BINDING_HAS_LEVEL_P): Likewise.
3516 (BINDING_VALUE): Likewise.
3517 (BINDING_TYPE): Likewise.
3518 * config-lang.in (gtfiles): Add cp/name-lookup.h
3519 * Make-lang.in (cp/name-lookup.o): New rule.
3520 (CXX_OBJS): Add cp/name-lookup.o
3521 (CXX_TREE_H): Add cp/name-lookup.h
3523 2003-03-28 Jason Merrill <jason@redhat.com>
3526 * cvt.c (force_rvalue): New fn.
3527 * call.c (build_conditional_expr): Use it.
3528 * cp-tree.h: Declare it.
3530 2003-03-28 Mike Stump <mrs@apple.com>
3532 * error.c (dump_expr): Add 0x to printed hex numbers to make
3533 output match source code better.
3535 2003-03-28 Mark Mitchell <mark@codesourcery.com>
3538 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3541 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3542 non-existant ssdf_decls array.
3543 (finish_file): Call generator_ctor_or_dtor_function when there are
3544 static constructors or destructors and no other static
3547 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
3550 * decl2.c (finish_file): Don't warn about explicitly instantiated
3553 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3556 * pt.c (lookup_template_class): Only check instantiated args if
3557 they do not contain template parameters.
3559 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3562 * parser.c (cp_parser_function_definition): Set
3563 DECL_INITIALIZED_IN_CLASS for members.
3564 * pt.c (instantiate_decl): Only reduce the template args for
3565 friends that are not defined in class.
3567 2003-03-25 Jason Merrill <jason@redhat.com>
3569 * call.c (print_z_candidate): Change name of first arg to msgid.
3570 (joust): Add comment for translators.
3572 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3574 PR c++/9898, PR c++/383, DR 322
3575 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3576 through reference types on both PARM and ARG.
3578 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3581 * error.c (dump_expr) <BASELINK>: Use dump_expr.
3582 * pt.c (maybe_fold_nontype_args): New function.
3583 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3584 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3585 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3586 maybe_fold_nontype_args.
3588 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3591 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3593 2003-03-23 Mark Mitchell <mark@codesourcery.com>
3596 * typeck.c (cxx_mark_addressable): Adjust call to
3597 gen_mem_addressof or put_var_into_stack.
3599 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
3601 PR c++/9978, c++/9708
3602 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3603 * call.c (add_template_candidate_real): Adjust
3604 instantiate_template call.
3605 * class.c (resolve_address_of_overloaded_function): Likewise.
3606 * decl.c (build_enumerator): Set TREE_CONSTANT.
3607 * pt.c (check_instantiated_args): New.
3608 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3610 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3611 (reduce_template_parm_level): Likewise.
3612 (process_template_parm): Likewise.
3613 (check_explicit_specialization): Adjust instantiate_template call.
3614 (convert_template_argument): Don't check non-type argument here.
3615 (lookup_template_class): Check them here.
3616 (tsubst_friend_function): Adjust instantiate_template call.
3617 (instantiate_template): Add tsubst_flags parameter, use it. Check
3620 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3622 * decl.c: Update calls to shadow_warning.
3624 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
3627 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3628 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3630 2003-03-20 Mark Mitchell <mark@codesourcery.com>
3632 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3634 * cp/pt.c (instantiate_class_template): Fix formatting.
3636 2003-03-14 Matt Austern <austern@apple.com>
3638 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3639 (unemitted_tinfo_decl_p): Remove.
3640 (emit_tinfo_decl): Change declaration to remove unused parameter.
3641 * decl2.c (finish_file): Change tinfo emission to loop through
3642 unemitted_tinfo_decls array instead of looping through all decls.
3643 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3644 unused second parameter.
3645 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3646 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3647 (emit_tinfo_decl): remove unused second parameter, add assertion
3648 that decl hasn't already been emitted.
3650 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3652 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3653 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3656 2003-03-19 Jason Merrill <jason@redhat.com>
3658 PR c++/8316, c++/9315, c++/10136
3659 * call.c (print_z_candidate): Split out from...
3660 (print_z_candidiates): ...here.
3663 2003-03-17 Roger Sayle <roger@eyesopen.com>
3666 * decl.c (duplicate_decls): Use the new type when prototyping
3667 anticipated decls, even when the types match. This defines the
3668 exception list for the built-in function.
3670 2003-03-17 Jason Merrill <jason@redhat.com>
3673 * typeck.c (build_class_member_access_expr): Compare
3676 2003-03-17 Mark Mitchell <mark@codesourcery.com>
3679 * parser.c (cp_parser_declarator_id): Clear parser->scope.
3681 2003-03-16 Jason Merrill <jason@redhat.com>
3684 * decl.c (finish_function): Only allow the NRVO to use variables
3685 declared at function scope.
3687 2003-03-17 Andreas Jaeger <aj@suse.de>
3689 * Make-lang.in (cp/TAGS): Remove.
3691 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
3694 * cp-tree.h (struct language_function): Add in_base_initializer.
3695 (in_base_initializer): define it.
3696 (expand_member_init): Remove INIT param.
3697 * init.c (expand_member_init): Remove INIT param, return the member.
3698 (emit_mem_initializers): Set in_base_initializer.
3699 * class.c (build_base_path): Check in_base_initializer.
3700 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3701 * pt.c (tsubst_initializer_list): Likewise.
3703 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
3705 * decl.c (binding_for_name): Fix initialization thinko.
3707 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3709 Compile-time improvement: 2/n.
3710 * cp-tree.h (struct cxx_binding): New datatype;
3711 (struct lang_identifier): Use it.
3712 (LOCAL_BINDING_P): Adjust definition.
3713 (INHERITED_VALUE_BINDING_P): Likewise.
3714 (BINDING_SCOPE): Likewise.
3715 (BINDING_HAS_LEVEL_P): Likewise.
3716 (BINDING_VALUE): Likewise.
3717 (BINDING_TYPE): Likewise.
3718 (IDENTIFIER_VALUE): Likewise.
3719 (struct tree_binding): Remove.
3720 (TS_CP_BINDING): Likewise.
3721 ((union lang_tree_node): Remove field "binding".
3722 (cxx_binding_clear): New macro.
3723 (binding_for_name): Adjust return type.
3724 (qualified_lookup_using_namespace): Adjust prototype.
3725 (lookup_using_namespace): Adjust prototype.
3726 (cxx_scope_find_binding_for_name): Declare.
3727 * cp-tree.def: Remove CPLUS_BINDING definition.
3728 * decl.c (push_binding): Adjust local variable type.
3729 (add_binding): Likewise.
3730 (push_class_binding): Likewise.
3731 (pop_binding): Likewise.
3732 (poplevel): Likewise.
3733 (poplevel_class): Likewise.
3734 (free_bindings): Adjust type.
3735 (find_binding): Adjust return type, add a third parameter. Remove
3736 non-useful assertion now that we use static typing.
3737 (cxx_scope_find_binding_for_name): New function.
3738 (binding_for_name): Use it. Adjust local variable type. Simplify.
3739 (namespace_binding): Simplify.
3740 (set_namespace_binding): Likewise.
3741 (set_identifier_type_value_with_scope): Adjust local variable type.
3742 (lookup_tag): Don't type-abuse of local variable 'old'.
3743 (lookup_namespace_name): Likewise. Allocate binding on stack.
3744 (select_decl): Adjust prototype.
3745 (unqualified_namespace_lookup): Allocate binding on stack.
3746 Don't type-abuse of local variable 'val'.
3747 (lookup_name_real): Likewise.
3748 (maybe_inject_for_scope_var): Adjust local variable type.
3749 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3750 (namespace_binding): Adjust logic, simplify.
3751 (BINDING_LEVEL): Adjust definition.
3752 (push_class_level_binding): Adjust local variable type.
3753 (struct cxx_saved_binding): Adjust field 'binding' type.
3754 * decl2.c (ambiguous_decl): Adjust prototype.
3755 (lookup_using_namespace): Adjust local variable type.
3756 (qualified_lookup_using_namespace): Catch type error and correct
3757 ensueing logic error.
3758 (do_nonmember_using_decl): Adjust local variable type. Allocate
3759 temporary cxx_binding on stack.
3760 (do_toplevel_using_decl): Adjust local variable type.
3761 * ptree.c (cxx_print_cxx_binding): New function.
3762 (cxx_print_identifier): Use it.
3763 (cxx_print_xnode): Delete CPLUS_BINDING case label.
3765 2003-03-15 Roger Sayle <roger@eyesopen.com>
3767 * tree.c (count_functions): Fix whitespace.
3769 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
3771 * Make-lang.in: Update.
3773 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3776 * pt.c (maybe_process_partial_specialization): Handle
3777 member class template when enclosing class template is
3778 explicit specialized.
3779 (most_general_template): Stop looking when DECL is already
3782 2003-03-13 Jason Merrill <jason@redhat.com>
3785 * search.c (lookup_conversions): Call complete_type here.
3786 * call.c (implicit_conversion): Not here.
3788 2003-03-13 Mark Mitchell <mark@codesourcery.com>
3790 * decl2.c (do_nonmember_using_decl): Correct handling of
3791 simultaneous type/non-type bindings.
3793 * call.c (initialize_reference): Remove bogus assertion.
3794 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3796 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
3799 * expr.c (cxx_expand_expr): Return const0_rtx for throw
3802 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3805 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3806 to merge old and new declarations.
3808 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3811 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3812 (cp/g++.1): Build it from scratch in the build tree.
3813 (c++.install-man): Depend on it. Install it from the build tree.
3814 (c++.mostlyclean): Clean it.
3816 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3819 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3820 to merge old and new declarations.
3823 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3825 2003-03-11 Jason Merrill <jason@redhat.com>
3828 * search.c (lookup_member): Fix handling of functions in a class
3831 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3834 * call.c (convert_class_to_reference): Adjust usage of
3836 (any_viable): Remove.
3837 (splice_viable): Combine with any_viable.
3838 (print_z_candidates): Avoid printing duplicates.
3839 (build_user_type_conversion_1): Adjust usage of splice_viable.
3840 (build_new_function_call): Likewise.
3841 (build_operator_new_call): Likewise.
3842 (build_object_call): Likewise.
3843 (build_conditional_expr): Likewise.
3844 (build_new_op): Likewise.
3845 (build_new_method_call): Likewise.
3846 (joust): Remove spurious comment.
3847 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3848 * decl2.c (arg_assoc_class): Simplify.
3849 * friend.c (add_friend): Likewise.
3851 2003-03-11 Jason Merrill <jason@redhat.com>
3854 * decl2.c (check_classfn): A member template only matches a
3857 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
3859 * Make-lang.in (CXX_C_OBJS): Update.
3860 * lang-specs.h: Don't define __GNUG__ here.
3862 2003-03-10 Mark Mitchell <mark@codesourcery.com>
3864 * call.c (perform_overload_resolution): New function.
3865 (build_new_function_call): Use it.
3866 (build_operator_new_call): Likewise.
3867 (add_candidates): Add explicit_targs and template_only parameters.
3868 (build_new_op): Adjust accordingly.
3869 * cp-tree.h (build_operator_new_call): New function.
3870 (build_function_call_real): Remove.
3871 (build_function_call_maybe): Likewise.
3872 * init.c (build_new_1): Use build_operator_new_call.
3873 * typeck.c (build_function_call_real): Rename to ...
3874 (build_function_call): ... this.
3876 2003-03-10 Devang Patel <dpatel@apple.com>
3879 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3881 2003-03-10 Jason Merrill <jason@redhat.com>
3884 * decl.c (push_using_directive): Push before recursing.
3886 PR c++/9868, c++/9524
3887 * call.c (resolve_scoped_fn_name): Handle the case of a function
3890 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3891 argument in the pointer-to-member case.
3893 2003-03-09 Mark Mitchell <mark@codesourcery.com>
3896 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3897 pointers to member functions.
3900 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3901 in pointer-to-member-function types.
3903 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3905 * expr.c (cplus_expand_constant): Use C90 prototype style.
3906 (cxx_expand_expr): Likewise.
3908 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3911 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3914 2003-03-08 Geoffrey Keating <geoffk@apple.com>
3916 * lang-specs.h (c++-header): Change .pch to .gch.
3918 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3920 * cp-tree.h (cxx_init): Update prototype.
3921 * lex.c (cxx_init): Similarly.
3923 2003-03-08 Mark Mitchell <mark@codesourcery.com>
3926 * cp-tree.h (begin_mem_initializers): Remove.
3927 * parser.c (cp_parser_mem_initializer_list): Inline it here.
3928 Do not call finish_mem_initializers if not in a constructor.
3929 (cp_parser_class_head): Fix typo in error message.
3930 * semantics.c (begin_mem_initializers): Remove.
3931 * testsuite/g++.dg/parser/constructor1.C: New test.
3934 * call.c (add_function_candidate): Skip builtin fuctions that have
3935 not yet been declared.
3938 * init.c (build_new_1): Correct logic for determining whether or
3939 not to use an array cookie.
3942 * parser.c (cp_parser_postfix_expression): Call
3943 finish_non_static_data_member, even when processing_template_decl.
3946 * cp-tree.h (is_ancestor): New function.
3947 (handle_class_head): Change prototype.
3948 * decl2.c (is_namespace_ancestor): Rename to ...
3949 (namespace_anecestor): ... this.
3950 (set_decl_namespace): Adjust accordingly.
3951 (handle_class_head): Remove unncessary parameters.
3952 * parser.c (cp_parser_class_head): Check that
3953 nested-name-specifiers are used appropriately.
3955 2003-03-07 Mark Mitchell <mark@codesourcery.com>
3957 * call.c (reference_binding): Remove REF_IS_VAR parameter.
3958 (implicit_conversion): Adjust call to reference_binding.
3959 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3960 (initialize_reference): Adjust handling for references bound to
3962 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3964 (real_non_cast_lvalue_p): New method.
3965 * cvt.c (build_up_reference): Adjust use of
3966 make_temporary_var_for_ref_to_temp.
3967 * tree.c (real_non_cast_lvalue_p): New method.
3969 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3971 * except.c (init_exception_processing): Use C90 prototype style.
3972 (cp_protect_cleanup_actions): Likewise.
3973 (prepare_eh_type): Likewise.
3974 (build_eh_type_type): Likewise.
3975 (build_exc_ptr): Likewise.
3976 (do_begin_catch): Likewise.
3977 (dtor_nothrow): Likewise.
3978 (do_end_catch): Likewise.
3979 (push_eh_cleanup): Likewise.
3980 (decl_is_java_type): Likewise.
3981 (choose_personality_routine): Likewise.
3982 (initialize_handler_parm): Likewise.
3983 (expand_start_catch_block): Likewise.
3984 (expand_end_catch_block): Likewise.
3985 (begin_eh_spec_block): Likewise.
3986 (finish_eh_spec_block): Likewise.
3987 (do_allocate_exception): Likewise.
3988 (do_free_exception): Likewise.
3989 (wrap_cleanups_r): Likewise.
3990 (stabilize_throw_expr): Likewise.
3991 (build_throw): Likewise.
3992 (complete_ptr_ref_or_void_ptr_p): Likewise.
3993 (is_admissible_throw_operand): Likewise.
3994 (nothrow_libfn_p): Likewise.
3995 (can_convert_eh): Likewise.
3996 (check_handlers_1): Likewise.
3997 (check_handlers): Likewise.
3999 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4001 * call.c (merge_conversion_sequences): New function.
4002 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4003 (convert_class_to_reference): Correct handling of second
4004 standard conversion sequence in a user-defined conversion
4006 (build_user_type_conversion_1): Use merge_conversion_sequences.
4007 * cp-tree.def: Add comments for CONV nodes.
4008 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4010 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4012 * error.c (init_error): Use C90 prototype style.
4013 (dump_scope): Likewise.
4014 (dump_qualifiers): Likewise.
4015 (dump_template_argument): Likewise.
4016 (dump_template_argument_list): Likewise.
4017 (dump_template_parameter): Likewise.
4018 (dump_template_bindings): Likewise.
4019 (dump_type): Likewise.
4020 (dump_typename): Likewise.
4021 (class_key_or_enum): Likewise.
4022 (dump_aggr_type): Likewise.
4023 (dump_type_prefix): Likewise.
4024 (dump_type_suffix): Likewise.
4025 (dump_global_iord): Likewise.
4026 (dump_simple_decl): Likewise.
4027 (dump_decl): Likewise.
4028 (dump_template_decl): Likewise.
4029 (dump_function_decl): Likewise.
4030 (dump_parameters): Likewise.
4031 (dump_exception_spec): Likewise.
4032 (dump_function_name): Likewise.
4033 (dump_template_parms): Likewise.
4034 (dump_char): Likewise.
4035 (dump_expr_list): Likewise.
4036 (dump_expr): Likewise.
4037 (dump_binary_op): Likewise.
4038 (dump_unary_op): Likewise.
4039 (type_as_string): Likewise.
4040 (expr_as_string): Likewise.
4041 (decl_as_string): Likewise.
4042 (context_as_string): Likewise.
4043 (lang_decl_name): Likewise.
4044 (cp_file_of): Likewise.
4045 (cp_line_of): Likewise.
4046 (decl_to_string): Likewise.
4047 (expr_to_string): Likewise.
4048 (fndecl_to_string): Likewise.
4049 (code_to_string): Likewise.
4050 (language_to_string): Likewise.
4051 (parm_to_string): Likewise.
4052 (op_to_string): Likewise.
4053 (type_to_string): Likewise.
4054 (assop_to_string): Likewise.
4055 (args_to_string): Likewise.
4056 (cv_to_string): Likewise.
4057 (cxx_print_error_function): Likewise.
4058 (cp_diagnostic_starter): Likewise.
4059 (cp_diagnostic_finalizer): Likewise.
4060 (cp_print_error_function): Likewise.
4061 (function_category): Likewise.
4062 (print_instantiation_full_context): Likewise.
4063 (print_instantiation_partial_context): Likewise.
4064 (maybe_print_instantiation_context): Likewise.
4065 (print_instantiation_context): Likewise.
4066 (cp_printer): Likewise.
4067 (print_integer): Likewise.
4068 (print_non_consecutive_character): Likewise.
4069 (locate_error): Likewise.
4071 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4074 * call.c (reference_binding): Add ref_is_var parameter.
4075 (implicit_conversion): Adjust call to reference_binding.
4076 (initialize_reference): Likewise.
4079 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4083 * class.c (get_basefndecls): Use lookup_fnfields_1.
4085 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4088 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4090 (cp_parser_single_declaration): Likewise.
4092 2003-03-05 Jason Merrill <jason@redhat.com>
4095 * call.c (build_conditional_expr): Use convert rather than an
4098 2003-03-02 Matt Austern <austern@apple.com>
4100 * decl.c (cp_binding_level): Add static_decls varray member.
4101 (add_decl_to_level): Add static/inline namespace scope
4102 declarations to static_decls array.
4103 (wrapup_global_for_namespace): Pass static_decls only, instead of
4104 all decls, to wrapup_global_declarations/check_global_declarations.
4105 (push_namespace): Initialize static_decls for ordinary namespaces.
4106 (cxx_init_decl_processing): Initialize static_decls for global
4109 2003-03-05 Mark Mitchell <mark@codesourcery.com>
4111 * class.c (end_of_class): Correct thinko.
4113 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
4115 * config-lang.in: Replace ${libstdcxx_version} by its value.
4117 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4119 * cp-tree.h (cxx_saved_binding): Declare.
4120 (struct saved_scope): Adjust type of field 'old_binding'.
4121 * decl.c (cxx_saved_binding_make): New macro.
4122 (struct cxx_saved_binding): Define.
4123 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
4125 (maybe_push_to_top_level): Adjust local variable type.
4126 (pop_from_top_level): Likewise.
4128 2003-03-04 Tom Tromey <tromey@redhat.com>
4130 * Make-lang.in (c++.tags): New target.
4132 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
4134 * Make-lang.in: Update.
4136 2003-03-03 Jason Merrill <jason@redhat.com>
4138 * decl.c (finish_enum): Do set the type in a template. Simplify.
4139 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4141 2003-03-03 Mark Mitchell <mark@codesourcery.com>
4144 * call.c (convert_class_to_reference): Correct conversion
4146 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4147 (implicit_conversion): Adjust call to reference_binding.
4148 (add_candidate): Change type of candidates parameter.
4149 (add_function_candidate): Likewise.
4150 (add_conv_candidate): Likewise.
4151 (build_builtin_candidate): Likewise.
4152 (add_builtin_candidate): Likewise.
4153 (add_builtin_candidates): Likewise.
4154 (add_template_candidate_real): Likewise.
4155 (add_template_candidate): Likewise.
4156 (add_template_conv_candidate): Likewise.
4157 (build_user_type_conversion_1): Adjust accordingly.
4158 (build_object_call): Likewise.
4159 (build_conditional_expr): Likewise.
4160 (add_candidates): Likewise.
4161 (build_new_op): Likewise.
4162 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
4163 (build_new_method_call): Adjust calls to add_function_candidate.
4164 (make_temporary_var_for_ref_to_temp): New function.
4165 (initialize_reference): Add decl parameter.
4166 * class.c (build_rtti_vtbl_entries): Use build_address and
4168 * cp-tree.h (initialize_reference): Change prototype.
4169 (make_temporary_var_for_ref_to_temp): New function.
4170 (build_type_conversion): Change prototype.
4171 (build_address): New function.
4172 (build_nop): Likewise.
4173 * cvt.c (cp_convert_to_pointer): Adjust call to
4174 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
4176 (convert_to_pointer_force): Use build_nop.
4177 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4178 (convert_to_reference): Adjust call to build_type_conversion.
4179 (ocp_convert): Likewise.
4180 (build_type_conversion): Remove for_sure parameter.
4181 * decl.c (grok_reference_init): Use initialize_reference.
4182 * typeck.c (build_address): New function.
4183 (build_nop): Likewise.
4184 (build_unary_op): Use them.
4185 (build_ptrmemfunc): Tidy slightly.
4186 (convert_for_initialization): Adjust call to
4187 initialize_reference.
4188 * typeck2.c (store_init_value): Remove #if 0'd code.
4190 2003-03-03 Jason Merrill <jason@redhat.com>
4192 * decl.c (start_function): Clear DECL_NUM_STMTS.
4194 * class.c (get_vtable_decl): Use vtbl_type_node.
4195 (build_primary_vtable): Check for it.
4197 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
4199 * decl.c (check_initializer): Check for vector_opaque_p.
4201 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
4203 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4204 invoke an external cpp during compilation.
4206 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4208 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4210 (start_decl): Likewise.
4211 (start_function): Likewise.
4213 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
4215 * Make-lang.in (CXX_C_OBJS): Update.
4217 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4220 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4223 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
4225 * parser.c (cp_parser_init_declarator): Revert opaque
4226 vector_opaque_p change.
4227 Do not include target.h.
4229 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4232 * cp-tree.h (build_zero_init): Add parameter.
4233 * decl.c (cp_finish_decl): Adjust call.
4234 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
4236 (build_default_init): Add nelts parameter. Adjust calls to
4238 (build_new_1): Adjust call to build_default_init.
4239 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4241 2003-02-26 Devang Patel <dpatel@apple.com>
4243 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4244 required. Postpone enum setting for template decls.
4245 (build_enumerator): Delay copying value node until finish_enum
4246 (). Remove #if 0'ed code.
4247 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4248 (tsubst_copy): Add check for enum type.
4250 2003-02-25 Mark Mitchell <mark@codesourcery.com>
4253 * decl2.c (prune_vars_needing_no_initialization): Do not throw
4254 away initializations for DECL_EXTERNAL VAR_DECLs.
4255 (finish_file): Adjust accordingly.
4256 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4258 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4260 * decl.c (add_binding): Time TV_NAME_LOOKUP.
4261 (push_class_binding): Likewise.
4262 (set_namespace_binding): Likewise.
4264 2003-02-24 Mark Mitchell <mark@codesourcery.com>
4267 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4268 specializations back to the main template.
4269 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4270 * pt.c (resolve_typename_type): Likewise.
4272 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
4275 * pt.c (tsubst_copy_and_build): For a templated function inside a
4276 scope, process template arguments.
4278 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4281 * typeck2.c (abstract_virtuals_error): Don't check when
4282 TYPE is still template parameter dependent.
4284 2003-02-23 Mark Mitchell <mark@codesourcery.com>
4287 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4288 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4289 * pt.c (instantiate_class_template): Don't try to instantiate
4291 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4293 2003-02-21 Mark Mitchell <mark@codesourcery.com>
4296 * decl.c (grokdeclarator): Do not allow parameters with variably
4299 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
4301 * search.c (grow_bfs_bases): Remove. Fold into ...
4302 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4305 2003-02-20 Mark Mitchell <mark@codesourcery.com>
4308 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4309 when the G++ 3.2 ABI prevents correct compilation.
4311 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
4313 Change base class access representation. Share virtual base
4315 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4317 * cp/class.c (build_base_path): Likewise.
4318 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4319 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4320 (make_new_vtable): Adjust.
4321 (force_canonical_binfo_r): Delete.
4322 (force_canonical_binfo): Delete.
4323 (mark_primary_virtual_base): Delete.
4324 (dfs_unshared_virtual_bases): Delete.
4325 (mark_primary_bases): Adjust.
4326 (maybe_warn_about_overly_private_class): Adjust.
4327 (dfs_base_derived_from): Delete.
4328 (base_derived_from): Follow the inheritance chain.
4329 (struct find_final_overrider_data): Add vpath member.
4330 (dfs_find_final_overrider): Adjust.
4331 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4332 (find_final_overrider): Adjust.
4333 (update_vtable_entry_for_fn): Adjust.
4334 (modify_all_vtables): Adjust.
4335 (walk_subobject_offsets): Adjust.
4336 (layout_nonempty_base_or_field): Adjust.
4337 (layout_empty_base): Remove last parameter. Adjust.
4338 (build_base_field): Adjust.
4339 (build_base_fields): Adjust.
4340 (propagate_binfo_offsets): Remove last parameter. Adjust.
4341 (dfs_set_offset_for_unshared_vbases): Delete.
4342 (layout_virtual_bases): Adjust.
4343 (finish_struct_1): Adjust.
4344 (init_class_processing): Don't init access nodes.
4345 (dfs_get_primary_binfo): Delete.
4346 (get_primary_binfo): Adjust.
4347 (dump_class_hierarchy_r): Remove most derived arg, add IGO
4349 (dump_class_hierarchy): Adjust.
4350 (finish_vtbls): Adjust.
4351 (get_original_base): Delete.
4352 (build_vtt_inits): Adjust.
4353 (dfs_build_secondary_vptr_vtt_inits): Adjust.
4354 (dfs_ctor_vtable_bases_queue_p): Adjust.
4355 (build_ctor_vtbl_group): Adjust.
4356 (dfs_accumulate_vtbl_inits): Adjust.
4357 (build_vtbl_initializer): Adjust.
4358 (build_vbase_offset_vtbl_entries): Adjust.
4359 (add_vcall_offset_vtbl_entries_1): Adjust.
4360 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4361 (access_*_node): Remove.
4362 (CANONICAL_BINFO): Delete.
4363 (BINFO_UNSHARED_MARKED): Remove.
4364 (BINFO_MARKED): Set LANG_FLAG_0 directly.
4365 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4366 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4367 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4369 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4370 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4371 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4373 (BINFO_DEPENDENT_BASE_P): New.
4374 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4376 (markedp, unmarkedp): Adjust.
4377 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4378 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4379 find_vbase_instance, binfo_for_vbase): Delete.
4380 (copied_binfo, original_binfo): Declare.
4381 (finish_base_specifier): Add virtual_p arg.
4382 (unshare_base_binfos): Delete.
4383 (copy_base_binfos): Declare.
4384 (reverse_path): Delete.
4385 * cp/decl.c (xref_basetypes): Access and virtuality passed
4386 differently. Don't copy direct base binfos here. Call
4388 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4389 (initialize_vtbl_ptrs): Adjust.
4390 (expand_member_init): Adjust.
4391 * cp/parser.c (cp_parser_base_specifier): Adjust.
4392 * cp/pt.c (instantiate_class_template): Adjust.
4393 (get_template_base_recursive): Adjust.
4394 * cp/rtti.c (get_pseudo_ti_init): Adjust.
4395 (get_pseudo_ti_desc): Adjust.
4396 * cp/tree.c (unshare_base_binfos): Rename to ...
4397 (copy_base_binfos): ... here, reimplement.
4398 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4399 (reverse_path): Remove.
4400 * cp/typeck.c (get_delta_difference): Adjust error messages.
4401 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4402 * cp/search.c (lookup_base_r): Adjust.
4403 (dynamic_cast_base_recurse): Adjust.
4404 (canonical_binfo): Remove.
4405 (dfs_canonical_queue): Remove.
4406 (dfs_assert_unmarked_p): Remove.
4407 (assert_canonical_unmarked): Remove.
4408 (shared_marked_p, shared_unmarked_p): Remove.
4409 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4410 (dfs_access_in_type): Adjust.
4411 (access_in_type): Adjust.
4412 (dfs_accessible_queue_p): Adjust.
4413 (dfs_accessible_p): Adjust.
4414 (is_subobject_of_p_1, is_subobject_of_p): Remove.
4415 (struct lookup_field_info): Remove from_dep_base_p field.
4416 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4417 (lookup_field_r): Remove dependent base code.
4418 (lookup_member): Likewise.
4419 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4420 (dfs_unmarked_real_bases_queue_p): Remove.
4421 (dfs_marked_real_bases_queue_p): Remove.
4422 (dfs_skip_vbases): Remove.
4423 (dfs_get_pure_virtuals): Adjust.
4424 (markedp, unmarkedp): Adjust.
4425 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4426 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4427 (dfs_unmark): Adjust.
4428 (dfs_get_vbase_types):Remove.
4429 (dfs_build_inheritance_graph_order): Remove.
4430 (get_vbase_types): Remove
4431 (dfs_find_vbase_instance): Remove.
4432 (find_vbase_instance): Remove.
4433 (dfs_debug_unmarkedp): Adjust.
4434 (dependent_base_p): Remove.
4435 (dfs_push_type_decls): Adjust.
4436 (dfs_push_decls): Adjust.
4437 (dfs_no_overlap_yet): Adjust.
4438 (copied_binfo): New function.
4439 (original_binfo): New function.
4440 (binfo_for_vbase): Remove.
4442 2003-02-18 Zack Weinberg <zack@codesourcery.com>
4444 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4445 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4448 2003-02-18 Mark Mitchell <mark@codesourcery.com>
4451 * class.c (layout_class_type): In the 3.2 ABI, take into account
4452 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4454 2003-02-18 Matt Austern <austern@apple.com>
4456 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4458 * cp/decl.c (wrapup_globals_for_namespace): Remove special
4459 handling of global namespace.
4461 2003-02-18 Geoffrey Keating <geoffk@apple.com>
4463 * cp-tree.h (rid_to_yy): Delete.
4464 (C_RID_YYCODE): Delete.
4465 (finish_file): Delete redundant declaration.
4467 2003-02-18 Jason Merrill <jason@redhat.com>
4470 * decl.c (reshape_init): Don't mess with initializer labels.
4473 * parser.c (cp_parser_postfix_expression): Set idk properly for
4474 object->scope::member.
4476 2003-02-18 Ben Elliston <bje@redhat.com>
4479 * decl.c (duplicate_decls): Fix typo in comment.
4481 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
4484 * class.c (build_base_field): Mark fields for base classes with
4487 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4490 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4491 CONSTRUCTOR_ELTS only once.
4493 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4496 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4497 (dump_type_suffix): Likewise.
4499 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
4501 * search.c: ANSIfy function declarations and definitions.
4502 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4503 * call.c (build_method_call, resolve_scoped_fn_name,
4504 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4506 * class.c (handle_using_decl): Likewise.
4507 * decl.c (make_typename_type, make_unmound_class_template,
4508 start_decl, compute_array_index_type): Likewise.
4509 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4510 * init.c (expand_member_init, build_member_call): Likewise.
4511 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4512 resolve_typename_type): Likewise.
4513 * typeck.c (lookup_destructor, finish_class_member_access_exprm
4514 build_prememfunc_access_expr): Likewise.
4516 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4518 * decl2.c: Include "timevar.h".
4519 (namespace_ancestor): Time name lookup.
4520 (add_using_namespace): Likewise.
4521 (lookup_using_namespace): Likewise.
4522 (qualified_lookup_using_namespace): Likewise.
4523 (decl_namespace): Likewise.
4524 (lookup_arg_dependent): Likewise.
4525 * lex.c (do_identifier): Likewise.
4526 (do_scoped_id): Likewise.
4527 * pt.c (lookup_template_class): Likewise.
4529 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
4531 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4533 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4535 * decl.c: Include "timevar.h".
4536 (poplevel): Time name lookup.
4537 (find_binding): Likewise.
4538 (push_namespace): Likewise.
4539 (pop_nested_namespace): Likewise.
4540 (store_bindings): Likewise.
4541 (maybe_push_to_top_level): Likewise.
4542 (pop_from_top_level): Likewise.
4543 (push_local_name): Likewise.
4544 (pushtag): Likewise.
4545 (pushdecl): Likewise.
4546 (pushdecl_with_scope): Likewise.
4547 (pushdecl_namespace_level): Likewise.
4548 (pushdecl_top_level): Likewise.
4549 (pushdecl_class_level): Likewise.
4550 (push_class_level_binding): Likewise.
4551 (push_using_decl): Likewise.
4552 (push_using_directive): Likewise.
4553 (push_overloaded_decl): Likewise.
4554 (lookup_label): Likewise.
4555 (define_label): Likewise.
4556 (lookup_tag): Likewise.
4557 (lookup_tag_reverse): Likewise.
4558 (lookup_namespace_name): Likewise.
4559 (select_decl): Likewise.
4560 (unqualified_namespace_lookup): Likewise.
4561 (lookup_name_real): Likewise.
4562 (lookup_name_current_level): Likewise.
4563 (lookup_type_current_level): Likewise.
4564 (maybe_inject_for_scope_var): Likewise.
4565 (xref_tag): Likewise.
4567 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4569 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
4571 * decl.c (build_enumerator): Remove unneeded test.
4573 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
4575 * cp-tree.h (struct lang_type_header): Make all fields unsigned
4578 2003-02-03 Mark Mitchell <mark@codesourcery.com>
4581 * call.c (z_candidate): Add args.
4582 (convert_class_to_reference): Set it.
4583 (implicit_conversion): Tidy.
4584 (add_candidate): Add args parameter.
4585 (add_function_candidate): Adjust call to add_candidate.
4586 (add_conv_candidate): Likewise.
4587 (build_builtin_candidate): Likewise.
4588 (build_user_type_conversion_1): Eliminate wasteful tree_cons
4590 (build_new_function_call): Likewise.
4591 (build_object_call): Likewise.
4592 (add_candidates): New function.
4593 (build_new_op): Use it.
4594 (covert_like_real): Adjust call to build_over_call.
4595 (build_over_call): Remove args parameter.
4596 * operators.def: Add <?= and >?=.
4598 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
4600 * typeck.c (build_indirect_ref): Don't check flag_volatile.
4602 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4605 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4607 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
4609 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4610 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4611 (BINFO_LANG_ELTS): New #define.
4612 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4614 2003-01-30 Geoffrey Keating <geoffk@apple.com>
4616 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4618 2003-01-30 Mark Mitchell <mark@codesourcery.com>
4620 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4622 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4623 rather than TYPE_LANG_FLAG_0.
4624 (TYPE_BUILT_IN): Remove.
4625 (TYPE_DEPENDENT_P): New macro.
4626 (TYPE_DEPENDENT_P_VALID): Likewise.
4627 (lang_type_class): Add fields_readonly.
4628 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4629 * pt.c (dependent_type_p_r): New function, split out from ...
4630 (dependent_type_p): ... here. Memoize results.
4631 * search.c (dependent_base_p): Use dependent_type_p, not
4632 uses_template_parms.
4633 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4636 2003-01-29 Mark Mitchell <mark@codesourcery.com>
4638 * call.c (build_field_call): Use build_new_op, not build_opfncall.
4639 (prep_operand): New function.
4640 (build_new_op): Use it. Remove dead code.
4641 * class.c (pushclass): Change "modify" parameter type from int to
4643 (currently_open_class): Use same_type_p, not pointer equality.
4644 (push_nested_class): Adjust calls to pushclass, remove modify
4646 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4647 (pushclass): Change prototype.
4648 (push_nested_class): Likewise.
4649 (grokoptypename): Remove.
4650 (build_opfncall): Remove.
4651 (value_dependent_expression_p): Declare.
4652 (resolve_typename_type): Likewise.
4653 (resolve_typename_type_in_current_instantiation): Likewise.
4654 (enter_scope_of): Remove.
4656 (tsubst_expr): Likewise.
4657 (tsubst_copy): Likewise.
4658 (tsubst_copy_and_build): Likewise.
4659 * decl.c (warn_about_implicit_typename_lookup): Remove.
4660 (finish_case_label): Return error_mark_node for erroneous labels.
4661 (start_decl): Adjust calls to push_nested_class.
4662 (grokfndecl): Call push_scope/pop_scope around call to
4664 (grokdeclarator): Do not call tsubst.
4665 (start_function): Adjust calls to push_nested_class.
4666 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4667 (check_classfn): Use push_scope/pop_scope around type comparisions.
4668 (grokoptypename): Remove.
4669 (push_sscope): Adjust call to push_nested_class.
4670 * error.c (dump_type): Show cv-qualification of typename types.
4671 * init.c (build_member_call): Use build_new_op, not
4673 * method.c (build_opfncall): Remove.
4674 * parser.c (cp_parser): Add allow_non_constant_expression_p and
4675 non_constant_expression_p.
4676 (cp_parser_constant_expression): Adjust prototype.
4677 (cp_parser_resolve_typename_type): Remove.
4678 (cp_parser_non_constant_expression): New function.
4679 (cp_parser_non_constant_id_expression): Likewise.
4680 (cp_parser_new): Set allow_non_constant_expression_p and
4681 non_constant_expression_p.
4682 (cp_parser_primary_expression): Reject `this' and `va_arg' in
4683 constant-expressions. Note that dependent names aren't really
4685 (cp_parser_postfix_expression): Reject conversions to non-integral
4686 types in constant-expressions. Neither are increments or
4688 (cp_parser_unary_expression): Reject increments and decrements in
4689 constant-expressions.
4690 (cp_parser_direct_new_declarator): Adjust call to
4691 cp_parser_constant_expression.
4692 (cp_parser_cast_expression): Reject conversions to non-integral
4693 types in constant-expressions.
4694 (cp_parser_assignment_expression): Rejects assignments in
4695 constant-expressions.
4696 (cp_parser_expression): Reject commas in constant-expressions.
4697 (cp_parser_labeled_statement): Adjust call to
4698 cp_parser_constant_expression.
4699 (cp_parser_direct_declarator): Simplify array bounds, even in
4700 templates, when they are non-dependent. Use
4701 resolve_typename_type, not cp_parser_resolve_typename_type.
4702 (cp_parser_class_head): Use resolve_typename_type, not
4703 cp_parser_resolve_typename_type.
4704 (cp_parser_member_declaration): Adjust call to
4705 cp_parser_constant_expression.
4706 (cp_parser_constant_initializer): Likewise.
4707 (cp_parser_constructor_declarator): Use resolve_typename_type, not
4708 cp_parser_resolve_typename_type.
4709 (cp_parser_late_parsing_default_args): Adjust call to
4711 * pt.c (tsubst): Give it internal linkage.
4712 (tsubst_expr): Likewise.
4713 (tsubst_copy): Likewise.
4714 (tsubst_copy_and_build): Likewise.
4715 (push_access_scope_real): Likewise.
4716 (tsubst_friend_class): Likewise.
4717 (instantiate_class_template): Adjust call to pushclass.
4718 (value_dependent_expression_p): Give it external linkage.
4720 (resolve_typename_type): New function.
4721 * semantics.c (finish_call_expr): Use build_new_op, not
4723 (begin_constructor_declarator): Remove.
4724 (begin_class_definition): Adjust call to pushclass.
4725 (enter_scope_of): Remove.
4726 * typeck.c (comptypes): Resolve typename types as appropriate.
4727 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4728 (build_x_compound_expr): Likewise.
4729 (build_modify_expr): Likewise.
4730 (build_x_modify_expr): Likewise.
4731 * typeck2.c (build_x_arrow): Likewise.
4733 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
4735 * pt.c (last_pending_template) Declare GTY().
4737 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4740 * parser.c (cp_parser_elaborated_type_specifier): Convert
4741 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4742 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4744 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
4747 * pt.c (unify): Don't unify '*T' with 'U C::*'.
4750 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4751 inside a declarator.
4753 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
4755 * class.c (update_vtable_entry_for_fn): Add index parameter.
4756 Generate vcall thunk for covariant overriding from a virtual
4758 (dfs_modify_vtables): Adjust.
4760 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
4763 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4765 (cp_parser_base_specifier): Look for and consume a
4766 TEMPLATE keyword. Replace switch with array index.
4769 * semantics.c (finish_non_static_data_member): Remember the
4770 field's type even in a template.
4773 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4777 * parser.c (cp_parser_cast_expression): Be more tentative.
4779 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4781 * cp-tree.h (flagged_type_tree_s): Remove.
4782 (check_for_new_type): Likewise.
4783 * typeck2.c (check_for_new_type): Likewise.
4785 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
4787 * dump.c: ANSIfy function declarations and definitions.
4789 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
4791 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4794 * init.c (build_new): Set the type of the new-expression, even
4795 when processing_templte_decl.
4798 * parser.c (cp_parser_primary_expression): Improve error message
4799 for templates used in an expression context.
4802 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4803 parse when encountering "typedef".
4805 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
4807 * class.c, parser.c: ANSIfy function definitions and declarations.
4809 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4812 * error.c (dump_decl): For an OVERLOAD, just print the name of the
4813 function; it doesn't make sense to try to print its type.
4814 * semantics.c (finish_typeof): Issue errors about invalid uses.
4817 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4819 (cp_parser_expression_statement): Use it.
4820 (cp_parser_explicit_instantiation): Likewise.
4821 * pt.c (do_decl_instantiation): Improve error handling logic.
4823 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4826 * parser.c (cp_parser_using_declaration): Issue error messages
4827 about name resolution failures here.
4830 * class.c (currently_open_derived_class): Use dependent_type_p.
4831 * cp-tree.h (dependent_type_p): New function.
4832 (dependent_template_arg_p): Likewise.
4833 (dependent_template_p): Likewise.
4834 (type_dependent_expression_p): Likewise.
4835 * parser.c (cp_parser_dependent_type_p): Remove.
4836 (cp_parser_value_dependent_type_p): Likewise.
4837 (cp_parser_type_dependent_expression_p): Likewise.
4838 (cp_parser_dependent_template_arg_p): Likewise.
4839 (cp_parser_dependent_template_id_p): Likewise.
4840 (cp_parser_dependent_template_p): Likewise.
4841 (cp_parser_diagnose_invalid_type_name): Replace
4842 cp_parser_dependent_type_p with dependent_type_p, etc.
4843 (cp_parser_primary_expresion): Likewise.
4844 (cp_parser_nested_name_specifier_opt): Likewise.
4845 (cp_parser_postfix_expression): Likewise.
4846 (cp_parser_unary_expression): Likewise.
4847 (cp_parser_template_name): Likewise.
4848 (cp_parser_class_name): Likewise.
4849 (cp_parser_lookup_name): Likewise.
4850 * pt.c (dependent_type_p): New function.
4851 (value_dependent_expression_p): Likewise.
4852 (type_dependent_expression_p): Likewise.
4853 (dependent_template_arg_p): Likewise.
4854 (dependent_template_id_p): Likewise.
4855 (dependent_template_p): Likewise.
4859 * parser.c (cp_parser_simple_declaration): Return quickly when
4860 encountering errors.
4862 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4864 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4866 2003-01-17 Jason Merrill <jason@redhat.com>
4868 PR c++/9167, c++/9358
4869 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4871 2003-01-17 Jason Merrill <jason@redhat.com>
4874 * call.c (build_conditional_expr): Always do lvalue-rvalue
4877 2003-01-17 Mark Mitchell <mark@codesourcery.com>
4880 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4881 * cp-tree.h (BASELINK_BINFO): Adjust.
4882 (BASELINK_FUNCTIONS): Likewise.
4883 (BASELINK_ACCESS_BINFO): Likewise.
4884 (tree_baselink): New structure.
4885 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4886 (lang_tree_node): Add baselink.
4887 * decl.c (cp_tree_node_structure): Add BASELINK case.
4888 * search.c (build_baselink): Adjust.
4889 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
4890 test from TREE_LIST case.
4893 * parser.c (cp_parser_constructor_declarator_p): Do not assume
4894 that a constructor cannot be declared outside of its own class.
4896 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4897 be resolved, neither can the qualified name.
4899 * rtti.c (get_pseudo_ti_desc): Fix thinko.
4901 2003-01-16 Jason Merrill <jason@redhat.com>
4904 * init.c (build_vec_init): Re-add maxindex parm.
4905 (perform_member_init, build_aggr_init): Pass it.
4906 (build_new_1): Pass it. Use an incomplete array type for full_type.
4907 * typeck.c (build_modify_expr): Pass it.
4908 * cp-tree.h: Adjust.
4910 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
4912 * cp-tree.h (tsubst_copy_and_build): New declaration.
4913 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4914 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
4915 (tsubst_copy_and_build): New function.
4917 2003-01-16 Mark Mitchell <mark@codesourcery.com>
4919 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4920 (PARTIAL_INSTANTIATION_P): Remove.
4921 (IMPLICIT_TYPENAME_P): Likewise.
4922 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4923 (build_typename_type): Remove declaration.
4924 (parmlist_is_exprlist): Likewise.
4925 * decl.c (build_typename_type): Make it static, remove third
4927 (push_class_binding): Don't do implicit typename stuff.
4928 (make_typename_type): Likewise.
4929 (lookup_name_real): Likewise.
4930 (grokdeclarator): Don't try to convert declarations into
4931 initializations. Don't do implicit typename stuff.
4932 (parmlist_is_exprlist): Remove.
4933 (xref_basetypes): Simplify.
4934 * decl2.c (grokfield): Don't try to convert declarations into
4936 (build_anon_union_vars): Do this while processing templates, too.
4937 (finish_anon_union): Likewise.
4938 * error.c (dump_type): Remove implicit typename handling.
4939 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4940 (cp_parser_primary_expression): Correct handling of names not
4941 found by unqualified name lookup in templates.
4942 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4943 of types when possible.
4944 (cp_parser_simple_declaration): Complain intelligently about some
4945 invalid declarations.
4946 (cp_parser_member_declaration): Likewise.
4947 (cp_parser_constructor_declarator_p): Don't check when we're in a
4949 * pt.c (instantiate_class_template): Remove
4950 PARTIAL_INSTANTIATION_P gunk.
4951 * search.c (lookup_field_r): Don't build implicit typenames.
4952 (marked_pushdecls_p): Don't enter dependent base types.
4953 (unmarked_pushdecls_p): Likewise.
4954 * semantics.c (begin_class_definition): Remove implicit typename
4957 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
4960 * parser.c (cp_parser_direct_declarator): If accepting either
4961 abstract or named, the name must be an unqualified-id.
4963 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4965 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4967 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4969 * decl2.c (check_classfn): Fix uninitialized warning.
4970 (build_anon_union_vars): Likewise.
4971 * pt.c (tsubst_copy): Likewise.
4973 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
4975 Further conform g++'s __vmi_class_type_info to the C++ ABI
4977 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4979 (class_hint_flags): Likewise.
4981 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4983 * config-lang.in: Add semantics.c to gtfiles.
4984 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4985 (saved_scope): Likewise.
4986 (type_lookups): Remove.
4987 (deferred_access): New structure.
4988 (type_access_control): Remove.
4989 (save_type_access_control): Likewise.
4990 (reset_type_access_control): Likewise.
4991 (decl_type_access_control): Likewise.
4992 (push_deferring_access_checks): Declare.
4993 (resume_deferring_access_checks): Likewise.
4994 (stop_deferring_access_checks): Likewise.
4995 (pop_deferring_access_checks): Likewise.
4996 (get_deferred_access_checks): Likewise.
4997 (pop_to_parent_deferring_access_checks): Likewise.
4998 (perform_deferred_access_checks): Likewise.
4999 (perform_or_defer_access_check): Likewise.
5000 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5001 (make_unbound_class_template): Likewise.
5002 (grokdeclarator): Don't call decl_type_access_control.
5003 * parser.c (cp_parser_context): Remove deferred_access_checks
5004 and deferring_access_checks_p fields.
5005 (cp_parser_context_new): Adjust.
5006 (cp_parser): Remove access_checks_lists.
5007 (cp_parser_defer_access_check): Remove.
5008 (cp_parser_start_deferring_access_checks): Remove.
5009 (cp_parser_stop_deferring_access_checks): Remove.
5010 (cp_parser_perform_deferred_access_checks): Remove.
5011 (cp_parser_nested_name_specifier_opt): Use new deferred access
5013 (cp_parser_simple_declaration): Likewise.
5014 (cp_parser_template_id): Likewise.
5015 (cp_parser_function_definition): Likewise.
5016 (cp_parser_class_specifier): Likewise.
5017 (cp_parser_lookup_name): Likewise.
5018 (cp_parser_single_declaration): Likewise.
5019 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5020 (cp_parser_parse_tentatively): Likewise.
5021 (cp_parser_parse_definitely): Likewise.
5022 (yyparse): Likewise.
5023 (cp_parser_init_declarator): Remove access_checks parameter.
5024 Use new deferred access functions.
5025 (cp_parser_function_definition_from_specifiers_and_declarator):
5027 (cp_parser_class_head): Remove deferring_access_checks_p and
5028 saved_access_checks parameters. Use new deferred access functions.
5029 (cp_parser_member_specification_opt): Don't call
5030 reset_type_access_control.
5031 * search.c (type_access_control): Remove.
5032 * semantics.c: Include "gt-cp-semantics.h".
5033 (deferred_type_access_control): Remove.
5034 (deferred_access_stack): New variable.
5035 (deferred_access_free_list): Likewise.
5036 (push_deferring_access_checks): New function.
5037 (resume_deferring_access_checks): Likewise.
5038 (stop_deferring_access_checks): Likewise.
5039 (pop_deferring_access_checks): Likewise.
5040 (get_deferred_access_checks): Likewise.
5041 (pop_to_parent_deferring_access_checks): Likewise.
5042 (perform_deferred_access_checks): New function, adapted from
5043 cp_parser_perform_deferred_access_checks.
5044 (perform_or_defer_access_check): New function, adapted from
5045 cp_parser_defer_access_check.
5046 (current_type_lookups): Remove.
5047 (deferred_type_access_control): Likewise.
5048 (decl_type_access_control): Likewise.
5049 (save_type_access_control): Likewise.
5050 (reset_type_access_control): Likewise.
5051 (begin_function_definition): Adjust.
5052 (begin_class_definiton): Likewise.
5054 2003-01-13 Jason Merrill <jason@redhat.com>
5057 * class.c (build_base_path): Take the address before calling save_expr.
5059 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5060 all the ambiguous conversions are bad.
5062 * class.c (maybe_warn_about_overly_private_class): Don't stop
5063 searching when we find a nonprivate method.
5065 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5067 2003-01-12 Mark Mitchell <mark@codesourcery.com>
5069 * cp-tree.h (get_arglist_len_in_bytes): Remove.
5072 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5073 typeame types more robustly.
5075 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
5077 * parser.c: Fix comment typos.
5079 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5082 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5083 an object_type which is not a class type.
5085 2003-01-10 Geoffrey Keating <geoffk@apple.com>
5087 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5088 (cp_parser_late_parsing_default_args): Likewise.
5090 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
5092 * cfns.gperf: ANSIfy function declarations.
5093 * cfns.h: Regenerate.
5094 * cp-tree.h: ANSIfy function declarations.
5096 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5098 * cp-tree.h (reparse_absdcl_as_expr): Remove.
5099 (reparse_absdcl_as_casts): Likewise.
5100 (reparse_decl_as_expr): Likewise.
5101 (finish_decl_parsing): Likewise.
5102 * decl2.c (reparse_absdcl_as_expr): Remove.
5103 (reparse_absdcl_as_casts): Likewise.
5104 (repase_decl_as_expr): Likewise.
5105 (finish_decl_parsing): Likewise.
5110 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5112 (cp_parser_nested_name_specifier_opt): Correct the
5113 check_dependency_p false.
5114 (cp_parser_postfix_expression): Fix formatting.
5115 (cp_parser_decl_specifier_seq): Avoid looking for constructor
5116 declarators when possible.
5117 (cp_parser_template_id): Avoid performing name-lookup when
5119 (cp_parser_class_head): Do not count specializations when counting
5120 levels of templates.
5121 (cp_parser_constructor_declarator_p): Return immediately if
5122 there's no chance that the tokens form a constructor declarator.
5123 * rtti.c (throw_bad_typeid): Add comment. Do not return an
5124 expression with reference type.
5125 (get_tinfo_decl_dynamic): Do not return an expression with
5127 (build_typeid): Add comment. Do not return an expression with
5129 * typeck.c (build_class_member_access_expr): Improve handling of
5130 conditionals and comma-expressions as objects.
5132 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5134 * cfns.gperf: ANSIfy function declarations.
5135 * cfns.h: Regenerate.
5136 * cp-tree.h: ANSIfy function declarations.
5137 * parser.c: ANSIfy function declarations & definitions.
5139 * decl.c (bad_specifiers): Fix parameter order error I introduced.
5141 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5143 Merge from pch-branch:
5145 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5147 Merge to tag pch-merge-20030102:
5149 * semantics.c (finish_translation_unit): Don't call finish_file.
5150 * parser.c: Don't include ggc.h.
5151 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5152 read first token here. Don't allow PCH files after the first
5154 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5155 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5156 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5157 (cp_parser_late_parsing_for_member): Don't duplicate call to
5158 cp_lexer_set_source_position_from_token.
5159 (cp_parser_late_parsing_default_args): Likewise.
5160 (yyparse): Call finish_file after clearing the_parser.
5162 2002-12-11 Geoffrey Keating <geoffk@apple.com>
5164 * Make-lang.in: Remove $(GGC_H) from all dependencies.
5165 (CXX_TREE_H): Add $(GGC_H).
5166 * class.c: Don't include ggc.h.
5167 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5168 (method_name_cmp): Likewise.
5169 (resort_data): New variable.
5170 (resort_field_decl_cmp): New.
5171 (resort_method_name_cmp): New.
5172 (resort_sorted_fields): New.
5173 (resort_type_method_vec): New.
5174 (finish_struct_methods): Delete cast.
5175 (finish_struct_1): Delete cast.
5176 * cp-tree.h: Include ggc.h.
5177 (struct lang_type_class): Add reorder attribute to field `methods'.
5178 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5179 (resort_sorted_fields): New prototype.
5180 (resort_type_method_vec): New prototype.
5181 * call.c: Don't include ggc.h.
5183 * decl2.c: Likewise.
5186 * method.c: Likewise.
5187 * optimize.c: Likewise.
5188 * parse.y: Likewise.
5191 * search.c: Likewise.
5192 * semantics.c: Likewise.
5196 * lang-specs.h: Remove comment.
5198 2002-12-03 Geoffrey Keating <geoffk@apple.com>
5200 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5201 (operator_name_info): Mark to be saved for PCH, specify size.
5202 (assignment_operator_name_info): Likewise.
5204 2002-11-19 Geoffrey Keating <geoffk@apple.com>
5206 * decl.c (anon_cnt): Mark to be saved for PCH.
5208 2002-10-25 Geoffrey Keating <geoffk@apple.com>
5210 * lex.c (init_reswords): Delete now-untrue comment.
5211 Allocate ridpointers using GGC.
5213 2002-10-04 Geoffrey Keating <geoffk@apple.com>
5215 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5217 * g++spec.c (lang_specific_driver): Don't include standard
5218 libraries in `added'.
5220 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
5222 * decl2.c (finish_file): Call c_common_write_pch.
5223 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5225 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
5227 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5228 files when using g++.
5229 * lang-specs.h: Handle compiling C++ header files.
5231 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5233 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5235 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5237 * pt.c (push_access_scope_real): Call push_to_top_level for
5238 function in namespace scope.
5239 (pop_access_scope): Call pop_from_top_level for function in
5242 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5244 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5246 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
5248 * Make-lang.in (c++.install-common, c++.install-man,
5249 c++.uninstall): Prepend $(DESTDIR) to destination paths in
5250 all (un)installation commands.
5251 (c++.install-common): Rewrite $(LN) commands to support
5252 DESTDIR with "ln" as well as with "ln -s".
5254 2003-01-08 Jason Merrill <jason@redhat.com>
5256 * parser.c (cp_parser_primary_expression): See through explicitly
5257 scoped ALIAS_DECLs, too.
5259 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
5261 * decl.c: Remove some #if 0 code.
5263 * decl.c: ANSIfy function declarations.
5265 2003-01-07 Mark Mitchell <mark@codesourcery.com>
5267 * parser.c (cp_parser_asm_definition): Correct handling of omitted
5270 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5273 * decl.c (make_typename_type): Check access only when tf_error.
5274 (make_unbound_class_template): Likewise.
5275 * pt.c (saved_access_scope): New variable.
5276 (push_access_scope_real): New function.
5277 (push_access_scope): Likewise.
5278 (pop_access_scope): Likewise.
5279 (tsubst_default_argument): Use them.
5280 (instantiate_template): Likewise.
5281 (regenerate_decl_from_template): Likewise.
5282 (instantiate_decl): Likewise.
5283 (get_mostly_instantiated_function_type): Likewise.
5285 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
5287 * tree.c: Delete bogus #if 0 code.
5289 2003-01-07 Andreas Schwab <schwab@suse.de>
5291 * class.c (layout_class_type): Don't use
5292 PCC_BITFIELD_TYPE_MATTERS if not defined.
5294 2003-01-06 Mark Mitchell <mark@codesourcery.com>
5297 * decl2.c (build_cleanup): Mark the object as used.
5299 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5300 (hash_local_specialization): New function.
5301 (register_local_specialization): Revert 2003-01-05 change.
5302 (instantiate_decl): Use hash_local_specialization when creating
5303 the local_specializations table.
5305 * decl2.c (mark_used): Do not synthesize thunks.
5307 * class.c (layout_class_type): Correct handling of unnamed
5308 bitfields wider than their types.
5311 * parser.c (cp_parser): Remove default_arg_types. Update
5312 documentation for unparsed_functions_queues.
5313 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5315 (cp_parser_new): Don't set parser->default_arg_types.
5316 (cp_parser_function_definition): Adjust usage of
5317 unparsed_funtions_queues.
5318 (cp_parser_class_specifier): Don't mess with
5319 parser->default_arg_types. Handle default argument processing in
5320 a separate phase from function body processing.
5321 (cp_parser_template_declaration_after_export): Adjust usage of
5322 unparsed_functions_queues.
5323 (cp_parser_late_parsing_for_member): Do not handle default
5326 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
5329 * parser.c (cp_parser_declarator_kind): New enum.
5330 (cp_parser_declarator): Adjust.
5331 (cp_parser_direct_declarator): Adjust. Allow for either named or
5332 abstract declarator. Prefer abstract, if possible. Allow
5333 parenthesized function name.
5334 (cp_parser_condition): Adjust cp_parser_declarator call.
5335 (cp_parser_explicit_instantiation): Likewise.
5336 (cp_parser_init_declarator): Likewise.
5337 (cp_parser_type_id): Likewise.
5338 (cp_parser_function_definition): Likewise.
5339 (cp_parser_member_declaration): Likewise.
5340 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5341 the tentative parsing.
5342 (cp_parser_exception_declaration): Likewise.
5344 2003-01-05 Mark Mitchell <mark@codesourcery.com>
5346 * parser.c (cp_parser_template_parameter): Adjust call to
5347 cp_parser_parameter_declaration.
5348 (cp_parser_parameter_declaration_list): Likewise.
5349 (cp_parser_parameter_declaration): Replace
5350 greater_than_is_operator_p with template_parm_p parameter. Do not
5351 cache tokens for template default arguments.
5353 * pt.c (retrieve_local_specialization): Use htab_find, not
5354 htab_find_with_hash.
5355 (register_local_specialization): Use htab_find_slot, not
5356 htab_find_slot_with_hash.
5357 (instantiate_decl): Pass a hash function to htab_create.
5359 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5361 * parser.c (cp_parser_binary_expression,
5362 cp_parser_multiplicative_expression,
5363 cp_parser_additive_expression, cp_parser_shift_expression,
5364 cp_parser_relational_expression, cp_parser_equality_expression,
5365 cp_parser_and_expression, cp_parser_exclusive_or_expression,
5366 cp_parser_inclusive_or_expression,
5367 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5368 cp_parser_binary_expression): Const-ify.
5370 2003-01-04 Mark Mitchell <mark@codesourcery.com>
5372 * method.c (use_thunk): Disable access control while building the
5375 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
5377 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5380 2003-01-03 Matt Austern <austern@apple.com>
5382 * cp-tree.h (struct lang_type_class): add field for key method
5383 (cp_global_trees): rename dynamic_classes to keyed_classes
5384 (key_method): add definition
5385 * class.c (finish_struct_1): compute class's key method, and add
5386 the class to keyed_classes list if there is no key method.
5387 * decl.c (finish_function): add class to keyed_classes list if we
5388 see a definition of the class's key method.
5389 * pt.c (instantiate_class_template): add template specialization
5390 of a dynamic class to keyed_classes list.
5391 * decl2.c (key_method): remove
5392 (finish_file): iterate only through keyed_classes list when
5393 deciding whether to emit vtables, remove class from its list after
5396 2003-01-02 Jason Merrill <jason@redhat.com>
5398 * call.c (build_conditional_expr): Stabilize lvalues properly.
5399 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5400 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5401 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5403 * call.c (convert_like_real): Call decl_constant_value for an
5404 IDENTITY_CONV even if there are no more conversions.
5406 * cvt.c (build_up_reference): Don't push unnamed temps.
5408 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5410 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5411 for a backend struct.
5413 * except.c (wrap_cleanups_r, build_throw): Make
5414 MUST_NOT_THROW_EXPRs void.
5415 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5417 * init.c (build_vec_delete_1): Pre-evaluate the base address.
5419 * init.c (get_temp_regvar): Simplify logic.
5421 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5422 our replacement is a decl.
5424 * decl.c (cp_make_fname_decl): Push the decls inside the
5427 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
5430 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5433 2003-01-03 Graham Stott <graham.stott@btinternet.com>
5435 * parser.c (struct cp_parser): Add access_checks_lists field
5436 (cp_parser_simple_declaration): Use.
5437 (cp_parser_init_declarator): Likewise.
5439 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5441 * parser.c (cp_parser_declaration): Accept the __extension__
5442 keyword before the declaration.
5445 * parser.c (cp_parser_parameter_declaration): Allow attributes to
5446 appear after the declarator.
5448 * call.c (build_new_method_call): Fix typo in message format
5451 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5453 * parser.c (cp_lexer_next_token_is): Declare it inline.
5454 (cp_lexer_set_source_position_from_token): Likewise.
5455 (cp_lexer_debugging_p): Likewise.
5456 (cp_parser_parsing_tentatively): Likewise.
5457 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5458 to the cp_lexer_peek_token.
5460 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5463 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
5465 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5466 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5467 cp/repo.c: Fix copyright years.
5469 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
5471 * lex.c: Remove superfluous include of cpplib.h.
5472 (CONSTRAINT): Define without conditions.
5473 (init_cp_pragma): Use c_register_pragma.
5475 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5477 * .cvsignore: Remove.
5479 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
5481 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5482 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5483 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5484 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5485 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5487 * lex.h: parse.y is dead, so don't mention it. Also replace the
5488 copyright header with the default GNU copyright header.
5490 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5492 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5493 (lookup_name_namespace_only): Likewise.
5494 (begin_only_namespace_names): Likewise.
5495 (end_only_namespace_names): Likewise.
5496 * decl.c (only_namespace_names): Remove.
5497 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5498 (lookup_name_real): Do not check only_namespace_names.
5499 (lookup_name_namespace_only): Remove.
5500 (begin_only_namespace_names): Likewise.
5501 (end_only_namespace_names): Likewise.
5502 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5503 nested-name-specifiers more gracefully.
5504 (cp_parser_class_or_namespace_name): Avoid looking up namespace
5505 names when they cannot possibly appear.
5506 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5507 (cp_parser_elaborated_type_specifier): Likewise.
5508 (cp_parser_namespace_name): Only look for namespace names.
5509 (cp_parser_lookup_name): Add is_namespace parameter.
5510 (cp_parser_lookup_name_simple): Adjust call to
5511 cp_parser_lookup_name.
5513 * parser.c (cp_parser_dependent_type_p): Fix thinko.
5515 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5517 * .cvsignore: Update.
5519 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
5521 * class.c (modify_vtable_entry): Remove unused variable.
5522 (get_vcall_index): Always expect a non-thunk.
5523 (update_vtable_entry_for_fn): Combine covariant adjustments, when
5524 overriding a thunk. Pass get_vcall_index a non-thunk.
5526 * decl2.c (finish_file): Mark undefined inlines as extern.
5528 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5530 * cp-tree.def (RETURN_INIT): Remove.
5531 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5532 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5533 (note_level_for_for): Remove.
5534 (note_level_for_try): Likewise.
5535 (note_level_for_catch): Likewise.
5536 (finish_named_return_value): Likewise.
5537 (do_pushlevel): Change prototype.
5538 (pending_lang_change): Remove.
5539 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5541 (note_level_for_for): Remove.
5542 (note_level_for_try): Likewise.
5543 (note_level_for_catch): Likewise.
5544 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5545 * parser.c (cp_parser_context_free_list): Make it "deletable".
5546 (cp_parser_template_argument): Remove misleading comment.
5547 * pt.c (tsubst_expr): Remove RETURN_INIT code.
5548 * semantics.c (genrtl_named_return_value): Remove.
5549 (do_pushlevel): Take a scope kind as an argument.
5550 (begin_if_stmt): Adjust.
5551 (begin_while_stmt): Likewise.
5552 (begin_for_stmt): Likewise.
5553 (finish_for_init_stmt): Likewise.
5554 (begin_switch_stmt): Likewise.
5555 (begin_handler): Likewise.
5556 (begin_compound_stmt): Likewise.
5557 (finish_named_return_value): Remove.
5558 (cp_expand_stmt): Remove RETURN_INIT case.
5559 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5561 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5564 * parser.c (cp_parser_direct_declarator): Handle erroneous
5565 parenthesized declarators correctly.
5567 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5569 * cp-tree.h (pending_lang_change): Declare.
5571 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5573 * parser.c (cp_parser_context_free_list): New variable.
5574 (cp_parser_context_new): Use it.
5575 (cp_parser_error): Check return code from
5576 cp_parser_simulate_error.
5577 (cp_parser_simulate_error): Return a value.
5578 (cp_parser_id_expression): Optimize common case.
5579 (cp_parser_class_name): Likewise.
5580 (cp_parser_class_specifier): Adjust call to
5581 cp_parser_late_parsing_default_args.
5582 (cp_parser_lookup_name): Optimize common case.
5583 (cp_parser_late_parsing_for_member): Adjust call to
5584 cp_parser_late_parsing_default_args.
5585 (cp_parser_late_parsing_default_args): Add scope parameter.
5586 (cp_parser_require): Avoid creating the error message unless it's
5588 (cp_parser_parse_definitely): Place free'd contexts on the free
5591 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5593 2002-12-30 David Edelsohn <edelsohn@gnu.org>
5595 * parser.c (cp_parser_parameter_declaration_clause): Treat system
5596 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5598 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5600 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5603 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5607 * Make-lang.in (gt-cp-spew.h): Remove.
5608 * cp-tree.h (do_pending_lang_change): Remove.
5609 (do_identifier): Change prototype.
5610 (finish_id_expr): Remove.
5611 * decl.c (lookup_name_real): Remove yylex variable.
5612 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5613 * lex.c (init_cpp_parse): Remove.
5614 (reduce_cmp): Likewise.
5615 (token_cmp): Likewise.
5617 (lastiddecl): Likewise.
5618 (token_count): Likewise.
5619 (reduce_count): Likewise.
5621 (print_parse_statistics): Likewise.
5622 (do_pending_lang_change): Likewise.
5623 (do_identifier): Remove parsing parameter.
5624 * lex.h (lastiddecl): Remove.
5625 (looking_for_typename): Remove.
5626 (looking_for_template): Likewise.
5627 (pending_lang_change): Likewise.
5629 * semantics.c (finish_id_expr): Remove.
5631 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5634 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5636 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
5637 end, not the C front end.
5639 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
5641 * cp-tree.h (THUNK_TARGET): New macro.
5642 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5643 (finish_thunk): Remove offset parms.
5644 * class.c (find_final_overrider): Look through thunks.
5645 (get_vcall_index): Use THUNK_TARGET.
5646 (update_vtable_entry_for_fn): Look through thunks. Set covariant
5647 fixed offset here. Adjust finish_thunk call.
5648 (build_vtbl_initializer): Adjust finish_thunk calls.
5649 * mangle.c (mangle_call_offset): Remove superfluous if.
5650 (mangle_thunk): Adjust.
5651 * method.c (make_thunk): Adjust.
5652 (finish_thunk): Adjust.
5653 (thunk_adjust): Remove assert.
5654 (use_thunk): Use THUNK_TARGET
5655 * dump1.c (cp_dump_tree): Adjust thunk dumping.
5658 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5659 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5661 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5663 Remove traditional C constructs 4/n.
5664 * decl2.c (grok_method_quals, warn_if_unknown_interface,
5665 grok_x_components, cp_build_parm_decl, build_artificial_parm,
5666 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5667 delete_sanity, check_member_template, check_java_method,
5668 check_classfn, finish_static_data_member_decl, grokfield,
5669 grokbitfield, grokoptypename, grok_function_init,
5670 cplus_decl_attributes, constructor_name, defer_fn,
5671 build_anon_union_vars, finish_anon_union, coerce_new_type,
5672 coerce_delete_type, comdat_linkage, maybe_make_one_only,
5673 key_method, import_export_vtable, import_export_class,
5674 output_vtable_inherit, import_export_decl, import_export_tinfo,
5675 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5676 set_guard, start_objects, finish_objects,
5677 start_static_storage_duration_function,
5678 finish_static_storage_duration_function, get_priority_info,
5679 start_static_initialization_or_destruction,
5680 finish_static_initialization_or_destruction,
5681 do_static_initialization, do_static_destruction,
5682 prune_vars_needing_no_initialization, write_out_vars,
5683 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5684 add_using_namespace, merge_functions, ambiguous_decl,
5685 lookup_using_namespace, lookup_using_namespace,
5686 qualified_lookup_using_namespace, set_decl_namespace,
5687 decl_namespace, current_decl_namespace, push_decl_namespace,
5688 pop_decl_namespace, push_scope, pop_scope, add_function,
5689 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5690 lookup_arg_dependent, do_namespace_alias,
5691 validate_nonmember_using_decl, do_nonmember_using_decl,
5692 do_toplevel_using_decl, do_local_using_decl,
5693 do_class_using_decl, do_using_directive, check_default_args,
5694 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
5695 * parser.c (cp_parser_class_head): Use booleanss.
5696 * decl.c (walk_globals, walk_vtables): Likewise.
5697 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5698 walk_globals): Change return type from 'int' to 'bool'.
5699 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5700 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5701 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5702 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5703 qualifier_flags, tinfo_base_init, generic_initializer,
5704 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5705 dfs_class_hint_unmark, class_hint_flags, class_initializer,
5706 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5707 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5708 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5709 * repo.c (repo_compile_flags, repo_template_declared,
5710 repo_template_defined, repo_class_defined, repo_get_id,
5711 repo_template_used, repo_vtable_used, repo_inline_used,
5712 repo_tinfo_used, repo_template_instantiated, extract_string,
5713 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5714 finish_repo): Likewise.
5715 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5716 cxx_print_xnode): Likewise..
5717 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5718 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5719 * cxxfilt.c (demangle_it, print_demangler_list, usage,
5720 standard_symbol_characters, hp_symbol_characters, main, fatal):
5722 (strip_underscore): Change type from 'int' to 'bool'.
5723 (main): Use boolean constants.
5725 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5727 Remove traditional C constructs 3/n.
5728 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5729 build_up_reference, warn_ref_binding, convert_to_reference,
5730 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5731 convert_to_void, convert, convert_force, build_type_conversion,
5732 build_expr_type_conversion, type_promotes_to,
5733 perform_qualification_conversions): Use C90 prototyping style.
5734 * decl2.c (grok_array_decl): Use boolean constant.
5735 (delete_sanity): Likewise.
5736 * typeck.c (build_unary_op): Likewise.
5737 * semantics.c (finish_switch_cond): Likewise.
5738 * parser.c (cp_parser_direct_new_declarator): Likewise.
5739 * init.c (build_new): Likewise.
5741 2002-12-27 Mark Mitchell <mark@codesourcery.com>
5743 * Make-lang.in (po-generated): Remove parse.c.
5744 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
5745 ($(srcdir)/cp/parse.h): Remove target.
5746 ($(srcdir)/cp/parse.c): Likewise.
5747 (gt-cp-parse.h): Likewise.
5748 (gt-cp-parser.h): New target.
5749 (c++.distclean): Do not remove parse.output.
5750 (c++.maintainer-clean): Do not remove parse.c or parse.h.
5751 (cp/spew.o): Remove target.
5752 (cp/lex.o): Adjust dependencies.
5753 (cp/pt.o): Likewise.
5754 (cp/parse.o): Likewise.
5755 (cp/TAGS): Do not mention parse.c.
5756 (cp/parser.o): New target.
5757 * NEWS: Mention the new parser.
5758 * call.c (build_scoped_method_call): Simplify.
5759 (build_method_call): Likewise.
5760 (build_new_function_call): Adjust calls to add_function_candidate
5761 and add_template_candidate.
5762 (build_new_op): Improve handling of erroroneous operands.
5763 (convert_default_arg): Remove circular argument processing.
5764 (name_as_c_string): New function.
5765 (build_new_method_call): Use it.
5766 (perform_implicit_conversion): Use error_operand_p.
5767 * class.c (finish_struct_anon): Use constructor_name_p.
5768 (check_field_decls): Likewise.
5769 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5770 (resolve_address_of_overloaded_function): Likewise.
5771 (instantiate_type): Tweak pointer-to-member handling.
5772 (get_primary_binfo): Remove incorrect assertion.
5773 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5774 * cp-tree.h (DEFARG_TOKENS): New macro.
5775 (default_arg): New structure.
5776 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5777 (lang_tree_node): Add default_arg.
5778 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5779 (type_info_ref_type): New macro.
5780 (saved_scope): Make processing_explicit_instantiation a boolean.
5781 (check_access): New field.
5782 (unparsed_text): Remove.
5783 (language_function): Remove unparsed_inlines.
5784 (error_operand_p): New macro.
5785 (lang_decl): Adjust pending_inline_info.
5786 (DEFARG_POINTER): Remove.
5787 (tag_types): Add typenames.
5788 (lookup_ualified_name): Declare.
5789 (lookup_name_real): Likewise.
5790 (shadow_tag): Adjust prototype.
5791 (get_scope_of_declarator): Declare it.
5792 (process_next_inline): Remove it.
5793 (check_for_missing_semicolon): Likewise.
5794 (maybe_get_template_decl_from_type_decl): Declare it.
5795 (finish_label_stmt): Adjust prototype.
5796 (finish_non_static_data_meber): Declare it.
5797 (finish_pseudo_destructor_call_expr): Rename to ...
5798 (finish_pseudo_destructor_expr): ... this.
5799 (finish_compound_literal): Declare it.
5800 (begin_inline_definitions): Remove it.
5801 (init_spew): Remove.
5802 (peekyylex): Likewise.
5803 (arbitrate_lookup): Likewise.
5804 (frob_opname): Likewise.
5805 (maybe_snarf_defarg): Likewise.
5806 (add_defarg_fn): Likewise.
5807 (do_pending_defargs): Likewise.
5808 (done_pending_defargs): Likewise.
5809 (unprocessed_defarg_fn): Likewise.
5810 (replace_defarg): Likewise.
5811 (end_input): Likewise.
5812 (get_overloaded_fn): Likewise.
5813 * cvt.c (convert_to_reference): Improve error handling.
5814 * decl.c (lookup_name_real): Do not declare it static.
5815 (maybe_push_to_top_level): Set check_access.
5816 (identifier_type_value): Adjust call to lookup_name_real.
5817 (lookup_qualified_name): New method.
5818 (lookup_name_real): Remove special-case parsing code.
5819 (lookup_name-nonclass): Adjust call to lookup_name_real.
5820 (lookup_name_namespace_only): Likewise.
5821 (lookup_name): Likewise.
5822 (check_tag_decl): Return the type declared.
5823 (shadow_tag): Likewise.
5824 (register_dtor_fn): Tweak check_access.
5825 (grokfndecl): Use constructor_name_p.
5826 (get_scope_of_declarator): New function.
5827 (grokdeclarator): Obscure tweaks for slightly different declarator
5829 (start_method): Return error_mark_node to indicate failure.
5830 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5831 * decl2.c (constructor_name_full): Simplify.
5832 (constructor_name): Use it.
5833 (build_expr_from_tree): Adjust for changes to do new parser.
5834 (push_scope): Improve robustness.
5835 (validate_nonmember_using_decl): Process declarations, not names.
5836 (do_class_using_decl): Likewise.
5837 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5839 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5840 * expr.c (cxx_expand_expr): Handle BASELINKs.
5841 * init.c (member_init_ok_or_else): Issue more errors.
5842 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5843 * lex.c: Do not include parse.h.
5844 (yypring): Do not declare.
5846 (make_reference_declarator): Remove error-generating code.
5847 (rid_to_yy): Remove.
5848 (cxx_init): Do not call init_spew.
5850 (check_for_missing_semicolon): Remove.
5851 * lex.h (got_scope): Remove.
5852 (got_object): Remove.
5853 * method.c (hack_identifier): Use finish_non_static_data_member.
5854 (implicitly_declare_fn): Adjust use of constructor_name.
5855 * parser.c: New file.
5856 * pt.c (parse.h): Do not include it.
5857 (maybe_get_template_decl_from_template): Do not declare it.
5858 (finish_member_template_decl): Tweak.
5859 (begin_explicit_instantiation): Adjust for
5860 processing_explicit_instantiation being boolean.
5861 (end_explicit_instantiation): Likewise.
5862 (maybe_process_partial_specialization): Tighten specialization
5864 (retrieve_local_specialization): Adjust ue of hash table.
5865 (eq_local_specializations): New function.
5866 (register_local_specialization): Likewise.
5867 (push_template_decl_real): Remove unnecessary test.
5868 (maybe_get_template_decl_from_type_decl): Don't make it static.
5869 (for_each_template_parm_r): Handle TYPEOF_TYPE.
5870 (tsubst_copy): Use retrieive_local_specialization to handle
5871 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
5872 Handle COMPONENT_REFs with pseudo-destructor-expressions.
5873 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5874 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5875 (unify): Tweak handling of CONST_DECLs.
5876 (regenerate_decl_from_template): Use push_nested_class.
5877 (template_for_substitution): New funciton.
5878 (instantiate_decl): Use it. Register parameters as local
5880 * rtti.c (init_rtti_processing): Set type_info_ref_type.
5881 (build_typeid): Use it.
5882 (get_typeid): Likeise.
5883 * search.c (accessible_p): Use check_access, not
5884 flag_access_control.
5885 (adjust_result_of_qualified_name_lookup): Pay attention to the
5887 * semantics.c (finish_asm_stmt): Adjust error handling.
5888 (finish_label_stmt): Return the statement.
5889 (finish_non_static_data_member): New function.
5890 (finish_class_expr): Handle BASELINKs.
5891 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5892 (finish_object_call_expr): Simplify handling during templates.
5893 (finish_pseudo_destructor_call_expr): Rename to ...
5894 (finish_pseudo_dtor_expr): ... this.
5895 (finish_compound_literal): New function.
5896 (begin_inline_definitions): Remove.
5897 (finish_sizeof): Remove special template handling.
5898 * spew.c: Do not include parse.h.
5899 * tree.c (get_overloaded_fn): Remove.
5900 * typeck.c (build_class_member_access_expr): Handle
5901 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
5902 (lookup_destructor): New function.
5903 (finish_class_member_access_expr): Use it.
5904 (convert_arguments): Simplify.
5905 (build_unary_op): Handle BASELINKs.
5907 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
5910 * decl2.c (mark_used): Defer inline functions.
5911 (finish_file): Merge deferred_fns loops. Check all used
5912 inline functions have a definition.
5913 * method.c (make_thunk): Thunks are not inline.
5915 PR c++/5116, c++/764
5916 * call.c (build_new_op): Make sure template class operands are
5919 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
5922 * cp-tree.h (resolve_scoped_fn_name): Prototype.
5923 * call.c (resolve_scoped_fn_name): New function. Deal with
5924 more template expansion. Broken out of ...
5925 * parse.y (parse_finish_call_expr): ... here. Call it.
5926 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5927 resolve_scoped_fn_name and build_call_from_tree.
5930 * decl.c (duplicate_decls): Templates may be disambiguated by
5934 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5935 conversion operators on failure.
5937 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5939 Remove traditional C constructs 2/n.
5940 * call.c (tourney, build_field_call, equal_functions, joust,
5941 compare_ics, build_over_call, build_java_interface_fn_ref,
5942 convert_like_real, op_error, build_object_call, resolve_args,
5943 build_vfield_ref, check_dtor_name, build_scoped_method_call,
5944 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5945 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5946 standard_conversion, reference_related_p,
5947 reference_compatible_p, convert_class_to_reference,
5948 direct_reference_binding, reference_binding,
5949 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5950 add_template_conv_candidate, any_viable, any_strictly_viable,
5951 build_this, splice_viable, print_z_candidates,
5952 build_user_type_conversion, build_new_function_call,
5953 conditional_conversion, build_conditional_expr, build_new_op,
5954 build_op_delete_call, enforce_access, call_builtin_trap,
5955 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5956 convert_default_arg, type_passed_as, convert_for_arg_passing,
5957 in_charge_arg_for_name, is_properly_derived_from,
5958 maybe_handle_implicit_object, maybe_handle_ref_bind,
5959 source_type, add_warning, can_convert, can_convert_arg,
5960 perform_implicit_conversion, can_convert_arg_bad,
5961 initialize_reference, add_conv_candidate,
5962 add_template_candidate_real, add_template_candidate): Ansify.
5964 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
5967 * cp-tree.h (grokoptypename): Add SCOPE parameter.
5968 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5969 if in a template scope.
5970 * parse.y (unoperator): Return the scope.
5971 (operator_name): Adjust grokoptypename call.
5973 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5975 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5976 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
5977 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5979 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5981 * ChangeLog: Fix a typo.
5982 * class.c: Fix comment typos.
5983 * cp-tree.h: Likewise.
5985 2002-12-18 Jason Merrill <jason@redhat.com>
5987 Handle anonymous unions at the tree level.
5988 C++ ABI change: Mangle anonymous unions using the name of their
5989 first named field (by depth-first search). Should not cause
5990 binary compatibility problems, though, as the compiler previously
5991 didn't emit anything for affected unions.
5992 * cp-tree.def (ALIAS_DECL): New tree code.
5993 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
5994 first field, not the largest.
5995 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
5996 push the decl, and write it out at namespace scope.
5997 * decl.c (lookup_name_real): See through an ALIAS_DECL.
5998 (pushdecl): Add namespace bindings for ALIAS_DECLs.
5999 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6000 of a decl which doesn't have one.
6001 * typeck.c (build_class_member_access_expr): Don't recurse if
6002 we already have the type we want.
6004 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6007 * friend.c (make_friend_class): Allow partial specialization
6008 when declaration is not a template friend.
6010 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6013 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6014 TREE_PROTECTED to created decl nodes.
6016 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6018 * class.c (build_base_field): Do not set DECL_PACKED on the
6021 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
6023 * cp-tree.h (struct tree_srcloc): Use location_t.
6024 (SOURCE_LOCUS): New.
6025 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6027 2002-12-17 Jason Merrill <jason@redhat.com>
6029 * decl.c (finish_function): Also complain about no return in
6031 * semantics.c (finish_return_stmt): Also call check_return_expr in
6033 * typeck.c (check_return_expr): In a template, just remember that we
6036 2002-12-16 Jason Merrill <jason@redhat.com>
6038 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6041 * semantics.c (do_pushlevel): Call pushlevel after adding the
6043 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6044 * parse.y (function_body): Go back to using compstmt.
6045 * decl.c (pushdecl): Skip another level to get to the parms level.
6047 * call.c (build_new_method_call): Use is_dummy_object to determine
6048 whether or not to evaluate the object parameter to a static member
6051 2002-12-14 Jason Merrill <jason@redhat.com>
6053 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6054 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6055 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6056 don't bother with an AGGR_INIT_EXPR.
6057 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6058 just generate a new decl normally. Take return slot parm.
6059 * cp-tree.h: Adjust prototype.
6061 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
6064 * cvt.c (convert_to_pointer_force): Don't try comparing against
6067 2002-12-13 Geoffrey Keating <geoffk@apple.com>
6069 * cp-tree.h: Have the multiple-include guards around
6072 2002-12-10 David Edelsohn <edelsohn@gnu.org>
6074 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6076 (snarf_method): Same.
6077 (snarf_defarg): Same.
6079 2002-12-10 Mark Mitchell <mark@codesourcery.com>
6082 * pt.c (tsubst_copy): Handle destructor names more correctly.
6084 2002-12-10 Matt Austern <austern@apple.com>
6086 * cp-tree.h: get rid of needs_virtual_reinit bit.
6088 2002-12-09 Mark Mitchell <mark@codesourcery.com>
6090 * NEWS: Document removal of in-class initialization extension for
6091 static data members of non-arithmetic, non-enumeration type.
6092 * decl.c (check_static_variable_definition): Do not allow that
6094 * decl2.c (grokfield): Do not call digest_init when processing
6097 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6099 * error.c (dump_expr): Fix format specifier warning.
6101 2002-12-04 Geoffrey Keating <geoffk@apple.com>
6103 * class.c (finish_struct_1): Correct comment.
6104 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6106 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6109 * error.c (dump_expr): Don't ever try to dump a non-existent
6112 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
6114 Implement covariant returns.
6115 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6116 (struct lang_decl_flags): Add this_thunk_p flag.
6117 Rename vcall_offset to virtual_offset.
6118 (struct lang_decl): Rename delta to fixed_offset.
6119 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6120 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6121 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6122 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6123 (make_thunk): Add this_adjusting arg.
6124 (finish_thunk): Declare.
6125 (mangle_thunk): Add this_adjusting arg.
6126 * class.c (get_vcall_index): Use base function for lookup.
6127 (update_vtable_entry_for_fn): Generate covariant thunk.
6128 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6129 (build_vtbl_initializer): Use base function for lookup.
6130 Finish covariant thunk here. Adjust thunk generation.
6131 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6132 Adjust thunk dumping.
6133 * mangle.c (mangle_call_offset): New function.
6134 (mangle_thunk): Adjust for covariant thunks.
6135 * method.c (make_thunk): Adjust. Do not set name here.
6136 (finish_thunk): New function. Set name here.
6137 (use_thunk): Generate covariant thunks too.
6138 (thunk_adjust): New function.
6139 * search.c (covariant_return_p): Remove. Fold into ...
6140 (check_final_overrider): ... here. Simplify.
6141 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6143 2002-12-03 Jason Merrill <jason@redhat.com>
6146 * call.c (build_over_call): Check specifically for TARGET_EXPR
6149 PR c++/8461, c++/8625
6150 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6151 (cp_convert_parm_for_inlining): Remove.
6152 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6154 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6155 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6157 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6158 an ambiguous conversion.
6160 2002-12-03 Mark Mitchell <mark@codesourcery.com>
6163 * decl.c (reshape_init): Handle erroneous initializers.
6165 2002-12-02 Mark Mitchell <mark@codesourcery.com>
6168 * spew.c (remove_last_token): Make sure that last_chunk is set
6172 * error.c (dump_expr): Handle character constants with
6175 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6178 * decl.c (grokdeclarator): Require class-key for all friend class.
6179 Output the correct type and context in the error message.
6181 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6184 * pt.c (unify): Use variably_modified_type_p to test validity of
6185 template argument types.
6188 * cp-tree.h (lang_type_class): Add typeinfo_var.
6189 (CLASSTYPE_TYPEINFO_VAR): New macro.
6190 * rtti.c (get_tinfo_decl): Use it.
6193 * init.c (expand_member_init): Always get the main variant of a
6196 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6200 * decl.c (cxx_init_decl_processing): Use size_type_node, not
6202 * decl2.c (coerce_new_type): Likewise.
6203 * except.c (do_allocate_exception): Likewise.
6205 2002-11-30 Zack Weinberg <zack@codesourcery.com>
6207 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6208 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6209 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6210 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6211 typeck2.c: Include coretypes.h and tm.h.
6212 * Make-lang.in: Update dependencies.
6214 2002-11-30 Mark Mitchell <mark@codesourcery.com>
6217 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6218 (check_initializer): Validate the type of the initialized
6219 variable, even if the initializer is absent.
6220 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6223 * typeck.c (convert_for_assignment): Do not use
6224 decl_constant_value on the operand.
6227 * pt.c (instantiate_decl): Handle template friends defined outside
6228 of the class correctly.
6230 2002-11-29 Joe Buck <jbuck@synopsys.com>
6232 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6235 2002-11-29 Mark Mitchell <mark@codesourcery.com>
6237 * class.c (walk_subobject_offsets): Recur on binfos as well as on
6239 (layout_nonempty_base_or_field): Pass it a binfo when processing a
6241 (layout_empty_base): Likewise.
6242 (build_base_field): Likewise.
6244 2002-11-27 Mark Mitchell <mark@codesourcery.com>
6246 * class.c (build_base_field): Make sure we get the canonical base
6247 when descending through primary bases.
6249 2002-11-26 Geoffrey Keating <geoffk@apple.com>
6251 * decl.c (check_initializer): Don't error on initialisation of
6252 a scalar with a brace-enclosed expression.
6254 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
6256 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6257 (template_parms_equal): Remove prototype.
6258 * typeck.c (buuld_indirect_ref): Reformat.
6260 2002-11-25 Jason Merrill <jason@redhat.com>
6262 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6265 2002-11-25 Mark Mitchell <mark@codesourcery.com>
6267 * tree.c (cp_build_qualified_type_real): Correct handling of
6269 * class.c (walk_subobject_offsets): Fix thinko.
6270 (build_base_field): Record offsets of empty bases in primary
6272 (layout_class_type): Record offsets of empty bases in fields.
6274 * search.c (is_subobject_of_p_1): Fix thinko.
6275 (lookup_field_queue_p): Likewise.
6277 2002-11-24 Mark Mitchell <mark@codesourcery.com>
6279 * class.c (layout_class_type): Reuse tail padding when laying out
6282 2002-11-22 Mark Mitchell <mark@codesourcery.com>
6284 * rtti.c (qualifier_flags): Fix thinko.
6286 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6288 Remove traditional C constructs 1/n.
6289 * cp-tree.h (init_method, set_mangled_name_for_decl,
6290 build_opfncall, hack_identifier, make_thunk, use_thunk,
6291 synthesize_method, implicitly_declare_fn,
6292 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6293 maybe_clone_body): Remove use of PARAMS.
6295 * method.c (do_build_assign_ref, do_build_copy_constructor,
6296 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6298 (synthesize_method): Use 'bool' type and constants instead of
6300 (locate_copy): Likewise.
6301 (implicitly_declare_fn): Likewise.
6303 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6304 Remove old-style declaration.
6305 (maybe_clone_body): Use 'bool' type and constants.
6307 2002-11-21 Glen Nakamura <glen@imodulo.com>
6310 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6311 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6312 of the branches of a COND_EXPR.
6314 2002-11-19 Mark Mitchell <mark@codesourcery.com>
6316 * pt.c (for_each_template_parm): Free allocated memory.
6317 * search.c (is_subobject_of_p_1): New function.
6318 (is_subobject_of_p): Avoid walking virtual bases multiple times.
6320 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6322 * g++spec.c (lang_specific_spec_functions): New.
6324 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
6326 * ChangeLog: Follow spelling conventions.
6327 * class.c: Likewise.
6328 * decl2.c: Likewise.
6330 2002-11-14 Zack Weinberg <zack@codesourcery.com>
6332 * search.c (dfs_push_decls): Do not try to reorder elements
6333 3..n of method_vec if method_vec has only two elements.
6334 Reverse order of two tests to avoid accessing unallocated
6337 2002-11-14 Mark Mitchell <mark@codesourcery.com>
6339 * class.c (dfs_find_final_overrider): Adjust so that the most
6340 derived object is a binfo, rather than a class type.
6341 (find_final_overrider): Likewise.
6342 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6343 (add_vcall_offset): Likewise.
6345 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6348 * pt.c (instantiate_template): Push class scope for member
6350 (get_mostly_instantiated_function_type): Likewise. Don't call
6351 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
6352 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6353 * mangle.c (write_encoding, write_unqualified_name): Adjust.
6355 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6357 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6358 vcall offfsets. Split out ...
6359 (add_vcall_offset): ... new function.
6362 * pt.c (for_each_template_parm): Add htab parameter.
6363 (process_partial_specialization): Adjust call.
6364 (push_template_decl_real): Likewise.
6365 (pair_fn_data): Add visited.
6366 (for_each_template_parm_r): Avoid walking duplicates more than
6368 (uses_template_parms): Adjust call to for_each_template_parm.
6370 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6372 * class.c (add_implicitly_declared_members): Put implicitly
6373 declared functions at the end of TYPE_METHODs when -fabi-version
6376 2002-11-05 Geoffrey Keating <geoffk@apple.com>
6378 * decl2.c (finish_file): Correct spelling.
6380 2002-11-03 Mark Mitchell <mark@codesourcery.com>
6382 * call.c (build_special_member_call): Do not try to lookup VTTs by
6384 * class.c (vtbl_init_data): Add generate_vcall_entries.
6385 (get_vtable_decl): Do not look up virtual tables by name.
6386 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6387 (set_primary_base): Do not set CLASSTYPE_RTTI.
6388 (determine_primary_base): Likewise.
6389 (get_matching_virtual): Remove.
6390 (get_vcall_index): New function.
6391 (update_vtable_entry_for_fn): Do not try to use virtual thunks
6392 when they are not required. Assign vcall indices at this point.
6393 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6394 Do update dynamic_classes.
6395 (build_vtt): Do not add VTTs to the symbol table.
6396 (build_ctor_vtbl_group): Likewise.
6397 (build_vtbl_initializer): Simplify handling of vcall indices.
6398 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6399 for the most derived class.
6400 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6402 * cp-tree.h (dynamic_classes): New macro.
6403 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
6404 (CLASSTYPE_RTTI): Remove.
6405 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6406 (CLASSTYPE_VCALL_INDICES): New macro.
6407 (CLASSTYPE_VTABLES): Likewise.
6408 (BV_USE_VCALL_INDEX_P): Remove.
6409 (build_vtable_path): Remove.
6410 * decl2.c (finish_vtable_vardecl): Remove.
6411 (key_method): Remove #if 0'd code.
6412 (finish_vtable_vardecl): Rename to ...
6413 (maybe_emit_vtables): ... this.
6414 (finish_file): Use it.
6415 * search.c (look_for_overrides_here): Update comment.
6417 2002-11-01 Zack Weinberg <zack@codesourcery.com>
6420 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6422 2002-10-30 Jason Merrill <jason@redhat.com>
6425 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6426 * call.c (convert_for_arg_passing): Set it.
6427 * except.c (stabilize_throw_expr): Recurse for such an arg.
6429 2002-10-31 Mark Mitchell <mark@codesourcery.com>
6431 * cp-tree.h (lang_decl_flags): Remove init_priority.
6432 (lang_decl): Add delta.
6433 (GLOBAL_INIT_PRIORITY): Remove.
6434 (THUNK_DELTA): Revise definition.
6435 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6436 * dump.c (cp_dump_tree): Don't dump it.
6438 2002-10-30 Mark Mitchell <mark@codesourcery.com>
6441 * typeck2.c (process_init_constructor): Call complete_array_type.
6444 * decl.c (make_typename_type): Issue errors about invalid results.
6446 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6448 Core issue 287, PR c++/7639
6449 * cp-tree.h (lang_type_class): Add decl_list field.
6450 (CLASSTYPE_DECL_LIST): New macro.
6451 (maybe_add_class_template_decl_list): Add declaration.
6452 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6453 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6454 (maybe_add_class_template_decl_list): New function.
6455 (add_implicitly_declared_members): Use it.
6456 * decl.c (maybe_process_template_type_declaration): Likewise.
6457 (pushtag): Likewise.
6458 * friend.c (add_friend): Likewise.
6459 (make_friend_class): Likewise.
6460 * semantics.c (finish_member_declaration): Likewise.
6461 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6462 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6463 to process members and friends in the order of declaration.
6465 2002-10-29 Mark Mitchell <mark@codesourcery.com>
6468 * decl.c (finish_destructor_body): Create the label to jump to
6469 when returning from a destructor here.
6470 (finish_function_body): Rather than here.
6472 2002-10-25 Zack Weinberg <zack@codesourcery.com>
6475 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6476 SCOPE_REF is not null before dereferencing it.
6478 2002-10-25 Mark Mitchell <mark@codesourcery.com>
6480 * call.c (build_over_call): Use DECL_CONTEXT, not
6481 DECL_VIRTUAL_CONTEXT.
6482 * class.c (modify_vtable_entry): Don't mess with
6483 DECL_VIRTUAL_CONTEXT.
6484 (set_vindex): Remove.
6485 (set_primary_base): Remove vfuns_p parameter.
6486 (determine_primary_base): Likewise.
6487 (modify_all_vtables): Likewise.
6488 (layout_class_type): Likewise. Adjust calls to other functions
6490 (finish_struct_1): Adjust calls to modified functions. Set
6492 * cp-tree.h (lang_type_class): Remove vsize.
6493 (CLASSTYPE_VSIZE): Remove.
6494 (lang_decl): Remove thunks.
6495 (DECL_THUNKS): Adjust.
6496 (DECL_VIRTUAL_CONTEXT): Remove.
6497 (duplicate_decls): Don't copy it.
6498 * pt.c (build_template_decl): Don't set it.
6499 (tsubst_decl): Likewise.
6500 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6502 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6503 (build_vtable_entry): Remove.
6504 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6505 (lang_decl): Add thunks.
6506 (DECL_THUNKS): New macro.
6507 * decl.c (duplicate_decls): Copy it.
6508 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6509 * semantics.c (emit_associated_thunks): Simplify.
6511 2002-10-24 David Edelsohn <edelsohn@gnu.org>
6514 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6515 lang_type structure exists before accessing field.
6516 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6517 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6518 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6519 * class.c (check_field_decls): Use new macros.
6520 * typeck2.c (process_init_constructor): Remove redundant check for
6521 existence of lang_type structure.
6523 2002-10-24 Mark Mitchell <mark@codesourcery.com>
6525 * class.c (end_of_base): New method.
6526 (end_of_class): Use it. Check indirect virtual bases.
6528 * class.c (check_field_decls): Fix typo.
6530 2002-10-23 Mark Mitchell <mark@codesourcery.com>
6533 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6537 * spew.c (next_token): Do not return an endless stream of
6538 END_OF_SAVED_INPUT tokens.
6539 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6540 the cached token stream.
6541 (snarf_defarg): Likewise.
6543 2002-10-23 Zack Weinberg <zack@codesourcery.com>
6545 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6546 variably_modified_type_p.
6547 * cp-tree.h: Remove prototype of variably_modified_type_p.
6548 * tree.c (variably_modified_type_p): Remove; now implemented
6549 in language-independent code.
6551 2002-10-22 Mark Mitchell <mark@codesourcery.com>
6554 * spew.c (snarf_parenthesized_expression): New function.
6555 (snarf_block): Use it.
6557 2002-10-22 Richard Henderson <rth@redhat.com>
6559 * method.c (use_thunk): Always compute vcall_value; assert that
6560 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
6561 for vcall thunks as well.
6563 2002-10-21 Mark Mitchell <mark@codesourcery.com>
6565 * class.c (empty_base_at_nonzero_offset_p): New function.
6566 (layout_nonempty_base_or_field): Do not check for conflicts when
6567 laying out a virtual base using the GCC 3.2 ABI.
6568 (build_base_field): Correct checking for presence of empty classes
6569 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6571 * class.c (include_empty_classes): Use normalize_rli.
6572 (layout_class_type): Likewise.
6574 * decl.c (reshape_init): Tweak handling of character arrays.
6577 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6578 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6579 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6580 (check_field_decls): Likewise.
6581 (layout_class_type): Likewise.
6582 (finish_struct_1): Initialize it.
6583 (walk_subobject_offsets): Use it to prune searches.
6585 2002-10-20 Mark Mitchell <mark@codesourcery.com>
6587 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6588 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6589 TARGET_ASM_OUTPUT_MI_THUNK in comments.
6591 2002-10-18 Zack Weinberg <zack@codesourcery.com>
6593 * decl.c (start_decl): Point users of the old initialized-
6594 typedef extension at __typeof__.
6596 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6598 * Make-lang.in (method.o): Depend on TARGET_H.
6599 * method.c (target.h): Include it.
6600 (use_thunk): Use target hooks. Use vcall thunks, if available.
6602 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6604 * class.c (base_derived_from): Make sure return value is a bool.
6606 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6608 * class.c (find_final_overrider_data_s): Remove overriding_fn and
6610 (dfs_base_derived_from): New function.
6611 (base_derived_from): Likewise.
6612 (dfs_find_final_overrider): Use base_derived_from.
6613 (find_final_overrider): Adjust.
6615 2002-10-18 Jason Merrill <jason@redhat.com>
6618 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6619 with condition decls in a template.
6621 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
6623 * class.c (add_method): Compare template parms too.
6625 2002-10-17 Mark Mitchell <mark@codesourcery.com>
6628 * class.c (handle_using_decl): Allow the declaration used to be
6629 from an ambiguous base.
6631 * pt.c (convert_template_argument): Revert this change:
6632 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6633 * pt.c (convert_template_argument): Do not fold non-type
6634 template rguments when inside a template.
6636 * init.c (expand_default_init): Handle brace-enclosed initializers
6639 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6641 * mangle.c (write_expression): Correct handling of enumeration
6643 (write_template_arg): Likewise.
6644 * pt.c (convert_template_argument): Do not fold non-type template
6645 arguments when inside a template.
6648 * cvt.c (convert_to_reference): Allow references as the incoming
6651 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6654 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6655 build_qualified_type.
6657 2002-10-15 Richard Henderson <rth@redhat.com>
6659 * error.c (dump_expr): Use real_to_decimal directly, and with
6662 2002-10-15 Mark Mitchell <mark@codesourcery.com>
6664 * decl.c (reshape_init): Fix typo.
6666 * cp-tree.h (operator_name_info_t): Add arity.
6667 * lex.c (init_operators): Initialize it.
6668 * mangle.c (write_conversion_operator_name): New function.
6669 (write_unqualified_name): Use it.
6670 (write_template_args): Accept template arguments as a TREE_LIST.
6671 (write_expression): Adjust handling of qualified names to match
6674 2002-10-15 Jason Merrill <jason@redhat.com>
6676 * call.c (call_builtin_trap): New fn.
6677 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
6678 (build_call): Don't set current_function_returns_abnormally outside
6681 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6683 * class.c (check_field_decls): Remove empty_p parameter. Instead,
6684 clear CLASSTYPE_EMPTY_P.
6685 (build_base_field): Likewise.
6686 (build_base_fields): Likewise.
6687 (check_bases_and_members): Likewise.
6688 (create_vtbl_ptr): Likewise.
6689 (layout_class_type): Likewise. Ensure that empty classes have
6690 size zero when used as base classes in the 3.2 ABI.
6691 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6692 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
6694 (is_empty_class): Correct definition when using post-3.2 ABI.
6695 * cp-tree.h (lang_type_class): Add empty_p.
6696 (CLASSTYPE_EMPTY_P): New macro.
6698 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
6700 * init.c (build_delete): Do not apply save_expr for arrays.
6701 (build_vec_delete): Likewise.
6703 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6705 * decl.c (layout_var_decl): Call layout_decl even for variables
6706 whose type is an array with unspecified bounds.
6709 * lex.c (do_identifier): Add another option for the parsing
6711 * parse.y (do_id): Use it.
6713 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
6715 PRs C++/6803, C++/7721 and C++/7803
6716 * decl.c (grokdeclarator): Gracefully handle template-name as
6719 2002-10-11 Jason Molenda <jmolenda@apple.com>
6721 * init.c (build_field_list): Provide uses_unions_p with a default
6724 2002-10-11 Mark Mitchell <mark@codesourcery.com>
6727 * cp-tree.h (variably_modified_type_p): New function.
6728 (grokdeclarator) Tighten check for variably modified types as
6730 * pt.c (convert_template_argument): Do not allow variably modified
6731 types as template arguments.
6732 * tree.c (variably_modified_type_p): New function.
6734 * NEWS: Document removal of "new X = ..." extension.
6735 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6736 brace-enclosed initializers.
6737 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6738 (initialize_local_var): Remove declaration.
6739 (expand_static_init): Likewise.
6740 * decl.c (next_initializable_field): New function.
6741 (reshape_init): Likewise.
6742 (check_initializer): Use them. Build dynamic initializer for
6743 aggregates here too.
6744 (initialize_local_var): Simplify, and incorporate cleanup
6745 insertion code as well.
6746 (destroy_local_var): Remove.
6747 (cp_finish_decl): Tidy.
6748 (expand_static_init): Fold checks for whether or not a variable
6749 needs initialization into this function. Simplify.
6750 * decl2.c (do_static_initialization): Simplify.
6751 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6752 be done for us automatically.
6753 (expand_default_init): Handle brace-enclosed initializers
6755 (expand_aggr_init_1): Remove RTL-generation code.
6756 (build_vec_init): Remove "new X = ..." support.
6757 * parse.y (new_initializer): Likewise.
6758 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6759 brace-enclosed initializer.
6760 (create_pseudo_type_info): Likewise.
6761 * typeck2.c (store_init_value): Don't try to handle digest_init
6762 being called more than once.
6763 (digest_init): Tidy handling of brace-enclosed initializers.
6765 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6767 * decl.c (typename_hash): Use htab_hash_pointer.
6769 2002-10-10 Jim Wilson <wilson@redhat.com>
6771 * decl.c (duplicate_decls): Don't call decl_attributes.
6773 2002-10-09 Zack Weinberg <zack@codesourcery.com>
6776 * decl.c (start_decl): Unconditionally issue error for
6777 'typedef foo = bar'.
6778 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6779 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6781 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6783 * decl2.c (prune_vtable_vardecl): Delete unused function.
6785 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6788 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6789 procesing template functions.
6790 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6791 type. Call layout_decl.
6792 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6794 2002-10-07 Richard Henderson <rth@redhat.com>
6796 * decl2.c, pt.c: Revert c++/7754 fix.
6798 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6801 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6803 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6806 * pt.c (for_each_template_parm_r): Handle BASELINKs.
6809 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6810 procesing template functions.
6811 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6812 type. Call layout_decl.
6813 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6815 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6818 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6819 template parameters.
6820 (globals): Add entity and need_abi_warning.
6821 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6822 CLASSTYPE_TEMPLATE_INFO.
6823 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6825 (write_prefix): Handle typename types correctly.
6826 (write_template_prefix): Handle template template parameters
6828 (start_mangling): Add entity parameter.
6829 (finish_mangling): Warn about names whose mangling will change.
6830 (mangle_decl_string): Adjust.
6831 (mangle_type_string): Likewise.
6832 (mangle_special_for_type): Likewise.
6833 (mangle_ctor_vtbl_for_type): Likewise.
6834 (mangle_thunk): Likewise.
6835 (mangle_guard_variable): Likewise.
6836 (mangle_ref_init_variable): Likewise.
6838 2002-10-02 Mark Mitchell <mark@codesourcery.com>
6841 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6842 * cp-tree.h (emit_base_init): Rename to ....
6843 (emit_mem_initializers): ... this.
6844 (expand_member_init): Change prototype.
6845 * init.c (perform_member_init): Compute explicit, rather than
6846 requiring it as a parameter.
6847 (sort_member_init): Rename to ...
6848 (sort_mem_initializers): ... this. Process bases and data members
6850 (sort_base_init): Remove.
6851 (emit_base_init): Rename to ...
6852 (emit_mem_initializers): ... this.
6853 (expand_aggr_vbase_init_1): Remove.
6854 (construct_virtual_bases): Rename to ...
6855 (construct_virtual_base): ... this.
6856 (expand_member_init): Rework handling of base initializers.
6857 * method.c (do_build_copy_constructor): Use
6858 finish_mem_initializers.
6859 * parse.y (member_init): Adjust calls to expand_member_init.
6860 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6861 (tsubst_initializer_list): Use expand_member_init.
6862 * semantics.c (finish_mem_intiailizers): Simplify.
6864 2002-10-02 Matt Austern <austern@apple.com>
6865 * decl.c (walk_vtables_r): Fixed typo that caused result to
6866 never get a nonzero value.
6868 2002-10-02 Roger Sayle <roger@eyesopen.com>
6870 PR optimization/6627
6871 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6872 from here, and move it to tree.h.
6873 * decl.c (cxx_init_decl_processing): If storing the vbit
6874 in function pointers, ensure that force_align_functions_log
6877 2002-10-02 Matt Austern <austern@apple.com>
6879 * class.c (check_field_decls): Changed warning about const member
6880 variables so that it doesn't get issued for a class aggregate.
6882 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6884 * decl.c (cp_finish_decl): Make sure array types are laid out,
6885 even if the array bounds are unknown.
6887 2002-10-01 Steve Ellcey <sje@cup.hp.com>
6889 * class.c (build_vtbl_initializer): Change build_c_cast
6892 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6894 * decl.c (cp_finish_decl): Make sure array types are laid out,
6895 even if the array bounds are unknown.
6897 * decl.c (cp_finish_decl): Correct check for dynamic
6898 initialization of thread-local storage.
6900 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
6902 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6905 2002-09-30 Steve Ellcey <sje@cup.hp.com>
6907 * class.c (build_vtbl_initializer): Add cast.
6908 (add_vcall_offset_vtbl_entries_1):
6909 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6911 2002-09-30 Mark Mitchell <mark@codesourcery.com>
6913 * class.c (walk_subobject_offsets): Correct the calculation of
6914 offsets for virtual bases. Correct the counting of array
6916 (layout_nonempty_base_or_field): Simplify. Correct the
6917 calculation of offsets to be propagated through the binfo
6919 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6920 Add the FIELD_DECL to TYPE_FIELDS.
6921 (build_base_fields): Adjust accordingly.
6922 (layout_virtual_bases): Use build_base_field.
6923 (end_of_class): Return a tree, not an integer.
6924 (warn_about_ambiguous_direct_bases): Rename to ...
6925 (warn_about_ambiguous_bases): ... this.
6926 (include_empty_classes): New function.
6927 (layout_class_type): Create an alternative version of the type to
6928 be used when as a base class type. Do not call
6929 finish_record_layout until we are done laying out the class.
6930 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
6932 (CLASSTYPE_SIZE): Reimplement.
6933 (CLASSTYPE_SIZE_UNIT): Likewise.
6934 (CLASSTYPE_ALIGN): Likweise.
6935 (CLASSTYPE_USER_ALIGN): Likewise.
6936 (CLASSTYPE_AS_BASE): New macro.
6937 (DECL_INITIALIZED_P): Likewise.
6938 (extract_init): Remove prototype.
6939 (build_forced_zero_init): Rename to ...
6940 (build_zero_init): ... this.
6941 (force_store_init_value): Remove.
6942 * decl.c (obscure_complex_init): Remove.
6943 (duplicate_decls): Copy DECL_INITIALIZED_P.
6944 (check_initializer): Do not leave junk in DECL_INITIAL.
6945 (cp_finish_decl): Handle zero-initialization of entities with
6946 static storage duration.
6947 * expr.c (extract_init): Remove.
6948 * init.c (build_forced_zero_init): Remove.
6949 (build_zero_init): New function.
6950 (build_default_init): Use it.
6951 (build_field_list): Skip FIELD_DECLs for base subobjects.
6952 (push_base_cleanups): Likewise.
6953 * method.c (do_build_assign_ref): Likewise.
6954 (synthesize_exception_spec): Likewise.
6955 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6956 (regenerate_decl_from_template): To not set DECL_INITIAL for a
6957 static data member whose initialization took place in its class.
6958 (instantiate_decl): Do not pass an initializer to cp_finish_decl
6960 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6961 (dfs_unuse_fields): Likewise.
6962 * tree.c (pod_type_p): Handle error_mark_node.
6963 (zero_init_p): Likewise.
6964 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6966 * typeck2.c (store_init_value): Remove #if 0'd code.
6967 (force_store_init_value): Remove.
6968 (process_init_constructor): Use build_zero_init.
6970 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
6973 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6975 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
6977 * cp-tree.h: Fix comment typos.
6981 2002-09-25 Mark Mitchell <mark@codesourcery.com>
6983 * cp/class.c (contains_empty_class_p): New method.
6984 (walk_subobject_offsets): Correct computation of field offset.
6985 (layout_empty_base): Correct placement of emtpy base classes.
6986 (layout_class_type): Warn about ABI changes.
6988 2002-09-23 Mark Mitchell <mark@codesourcery.com>
6990 * cp/class.c (layout_virtual_bases): Do not round the size of the
6991 type to a multiple of the alignment before laying out virtual bases.
6992 (layout_class_type): Correct handling of bit-fields that are wider
6993 than their type inside unions. Round the size of the type to a
6994 even number of bytes when computing the size without virtual
6996 * cp/cp-tree.h (abi_version_at_least): New macro.
6998 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7000 * ChangeLog: Follow spelling conventions.
7001 * ChangeLog.2: Likewise.
7003 * class.c: Likewise.
7004 * cp-tree.h: Likewise.
7007 * decl2.c: Likewise.
7008 * except.c: Likewise.
7009 * friend.c: Likewise.
7010 * g++spec.c: Likewise.
7013 * mangle.c: Likewise.
7014 * method.c: Likewise.
7015 * operators.def: Likewise.
7016 * optimize.c: Likewise.
7019 * search.c: Likewise.
7020 * semantics.c: Likewise.
7023 * typeck.c: Likewise.
7025 2002-09-18 Devang Patel <dpatel@apple.com>
7027 * cp/cp-tree.h: New prototype for walk_vtabls().
7028 * cp/decl.c (walk_vtables_r): New function.
7029 (struct cp_binding_level): Add new members, namespaces,
7030 names_size and vtables.
7031 (add_decl_to_level): Add decl in namespaces or vtables
7032 chain, if conditions match.
7033 (walk_vtables): New function.
7034 (walk_namespaces_r): Travers separate namespace chain
7035 for namespace decls.
7036 (wrapup_globals_for_namespace): Use names_size instead
7038 * cp/decl2.c (finish_file): Use walk_vtables() instead of
7039 walk_globals() to walk vtable decls.
7041 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
7043 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7044 ICE with invalid pointers & references.
7046 2002-09-17 Zack Weinberg <zack@codesourcery.com>
7048 * Make-lang.in: Remove all references to the demangler.
7049 * cxxfilt.c: Moved to binutils.
7051 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7054 * pt.c (tsubst_decl): Remove assert.
7056 Remove DR 295 implementation.
7057 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7058 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7059 about ignoring volatile qualifiers.
7061 * search.c (lookup_member): Correct documentation.
7063 2002-09-16 Geoffrey Keating <geoffk@apple.com>
7065 * cp-tree.h (union lang_tree_node): Add chain_next option.
7067 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7069 * parse.y (parse_finish_call_expr): Check lookup_member result.
7072 * semantic.c (finish_asm_stmt): Fix operand/output_operands
7074 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7076 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
7079 * call.c (build_over_call): Convert this pointer for fns found by
7082 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
7084 * ChangeLog: Follow spelling conventions.
7085 * ChangeLog.1: Likewise.
7087 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
7090 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7092 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
7094 * error.c: Fix comment formatting.
7095 * except.c: Likewise.
7097 * friend.c: Likewise.
7098 * g++spec.c: Likewise.
7101 * mangle.c: Likewise.
7102 * method.c: Likewise.
7103 * optimize.c: Likewise.
7106 * search.c: Likewise.
7107 * semantics.c: Likewise.
7110 * typeck.c: Likewise.
7111 * typeck2.c: Likewise.
7113 2002-09-13 Matt Austern <austern@apple.com>
7116 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7117 * cp/call.c: Change call-by-const-reference mechanism to use
7118 non_cast_lvalue_p when deciding whether the create a temporary.
7119 We need a temporary when passing, e.g. (long) x by const ref.
7121 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
7123 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7125 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
7127 * decl.c: Fix comment formatting.
7128 * decl2.c: Likewise.
7130 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
7132 * call.c: Fix comment formatting.
7133 * class.c: Likewise.
7134 * cp-lang.c: Likewise.
7135 * cp-tree.h: Likewise.
7138 2002-09-11 Zack Weinberg <zack@codesourcery.com>
7140 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7141 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7142 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7143 minor adjustments (use version_string, eliminate yet another
7144 duplicate of xmalloc)
7146 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7148 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7150 2002-09-05 Jason Merrill <jason@redhat.com>
7152 * typeck2.c (add_exception_specifier): Only pedwarn for an
7154 (require_complete_eh_spec_types): New fn.
7155 (cxx_incomplete_type_diagnostic): Also support pedwarning.
7156 * typeck.c (complete_type_or_diagnostic): Likewise.
7157 * call.c (build_call): Call require_complete_eh_spec_types.
7158 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7159 on an incomplete type.
7161 2002-09-04 Jakub Jelinek <jakub@redhat.com>
7163 * decl.c (start_cleanup_fn): Clear interface_only before
7164 start_function, restore it afterwards.
7166 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
7168 * cp-tree.h (finish_builtin_type): Remove.
7169 * decl2.c (finish_builtin_type): Move to common code.
7170 * decl.c (build_ptrmemfunc_type): Adjust.
7171 * rtti.c (create_pseudo_type_info): Adjust.
7172 (create_tinfo_types): Adjust.
7174 2002-08-31 Jason Merrill <jason@redhat.com>
7176 * cp-lang.c (cp_expr_size): Allow initialization from a
7179 2002-08-30 Richard Henderson <rth@redhat.com>
7182 * tree.c: Include target.h.
7183 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7185 * Makefile.in (tree.o): Update.
7187 2002-08-27 Mark Mitchell <mark@codesourcery.com>
7189 * class.c (layout_virtual_bases): Warn about bugs in G++ that
7190 result in incorrect object layouts.
7191 (layout_class_type): Likewise.
7193 2002-08-24 Matt Austern <austern@apple.com>
7195 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7197 (real_lvalue_p): Update caller.
7199 (non_cast_lvalue_or_else): New.
7200 * tree.h: Declare it.
7201 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7203 2002-08-22 Mark Mitchell <mark@codesourcery.com>
7205 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7206 and COND_EXPR specially; fix error message output.
7208 2002-08-22 Jason Merrill <jason@redhat.com>
7210 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7211 * semantics.c (nullify_returns_r): Likewise.
7213 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
7216 * typeck.c (finish_class_member_access_expr): Diagnose cases where
7217 name lookup finds nothing.
7219 2002-08-15 Jason Merrill <jason@redhat.com>
7221 * semantics.c (finish_then_clause): Remove redundant assignment.
7222 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7223 extra binding level outside the if/switch statement.
7224 (finish_while_cond, finish_for_cond): Rewrite complex condition
7227 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
7229 * parse.y (sizeof, alignof, typeof): New non-terminals to
7230 increment skip_evaluation. Replace terminals with them and
7231 decrement skip_evaluation at the end of rules using them.
7232 * decl2.c (mark_used): Don't assemble_external if
7233 skipping evaluation.
7235 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
7238 * parse.y (parse_finish_call_expr): Handle incomplete
7239 type used to name a scope.
7241 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
7244 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7245 regression caused by my 2002-08-08 patch.
7247 2002-08-13 Mark Mitchell <mark@codesourcery.com>
7249 * decl.c (pushdecl_class_level): Honor requests to bind names to
7252 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7254 * decl2.c (build_call_from_tree): Fix uninitialized variable.
7255 * parse.y (parse_finish_call_expr): Likewise.
7256 * repo.c (old_args, old_dir, old_main): Const-ify.
7258 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
7260 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7261 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7262 * optimize.c (maybe_clone_body): Likewise.
7263 * pt.c (tsubst_enum): Likewise.
7264 (lookup_template_class): Likewise.
7265 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7267 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
7269 * lang-specs.h: Remove -ansi.
7271 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
7273 * tree.c (maybe_dummy_object): Replace // with /* */
7275 2002-08-09 Mark Mitchell <mark@codesourcery.com>
7277 * call.c (standard_conversion): Use build_ptrmem_type.
7278 * cp-tree.h (build_ptrmem_type): New function.
7279 (adjust_result_of_qualified_name_lookup): Likewise.
7280 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7281 static data members.
7282 (build_ptrmem_type): New function.
7283 (grokdeclarator): Do not use build_offset_type when encountering a
7285 * parse.y (parse_finish_call_expr): Use
7286 adjust_result_of_qualified_name_lookup.
7287 * search.c (adjust_result_of_qualified_name_lookup): New function.
7288 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7289 accessing OFFSET_TYPEs directly.
7291 2002-08-08 Mike Stump <mrs@apple.com>
7293 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7294 (type_decays_to): Likewise.
7295 * class.c (find_final_overrider): Likewise.
7296 (maybe_note_name_used_in_class): Likewise.
7297 * decl.c (current_tmpl_spec_kind): Likewise.
7298 (add_binding): Likewise.
7299 (push_class_binding): Likewise.
7300 (duplicate_decls): Likewise.
7301 (layout_var_decl): Likewise.
7302 (grokfndecl): Likewise.
7303 (grokdeclarator): Likewise.
7304 (check_default_argument): Likewise.
7305 * decl2.c (handle_class_head): Likewise.
7306 * error.c (dump_template_decl): Likewise.
7307 * init.c (build_offset_ref): Likewise.
7308 * pt.c (check_specialization_scope): Likewise.
7309 (determine_specialization): Likewise.
7310 (check_explicit_specialization): Likewise.
7311 (maybe_check_template_type): Likewise.
7312 (process_partial_specialization): Likewise.
7313 (check_default_tmpl_args): Likewise.
7314 (push_template_decl_real): Likewise.
7315 (convert_template_argument): Likewise.
7316 (try_class_unification): Likewise.
7317 (get_bindings_real): Likewise.
7318 (do_decl_instantiation): Likewise.
7319 * semantics.c (begin_function_definition): Likewise.
7320 (finish_member_declaration): Likewise.
7321 (check_multiple_declarators): Likewise.
7322 * typeck.c (comp_array_types): Likewise.
7323 (comptypes): Likewise.
7324 (expr_sizeof): Likewise.
7325 (build_binary_op): Likewise.
7326 (dubious_conversion_warnings): Likewise.
7327 (check_return_expr): Likewise.
7329 2002-08-08 Mark Mitchell <mark@codesourcery.com>
7331 * typeck.c (build_class_member_access_expr): Do not return
7332 error_mark_node when no error has occurred.
7334 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7336 * typeck.c (build_component_addr): Remove.
7337 (build_unary_op): Just check it's not a bitfield, and then build
7340 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7342 * class.c (convert_to_base): Correct check for error_mark_node.
7343 (create_vtable_ptr): Remove unused VFUNS_P parm.
7345 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7347 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7349 2002-08-07 Mark Mitchell <mark@codesourcery.com>
7351 Rework build_component_ref.
7352 * call.c (build_vfield_ref): Do not go through build_component_ref.
7353 (build_field_call): Use build_class_member_access_expr.
7354 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7355 (build_object_call): Likewise.
7356 * class.c (convert_to_base): New function.
7357 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7358 (instantiate_type): Handle BASELINKs.
7359 * cp-tree.def (BASELINK): New tree code.
7360 * cp-tree.h (BASELINK_P): Reimplement.
7361 (SET_BASELINK_P): Remove.
7362 (BASELINK_BINFO): Reimplement.
7363 (BASELINK_FUNCTIONS): Likewise.
7364 (BASELINK_ACCESS_BINFO): Likewise.
7365 (BASELINK_OPTYPE): Likewise.
7366 (convert_to_base): New function.
7368 (build_object_ref): Remove.
7369 (build_component_ref_1): Likewise.
7370 (build_component_ref): Likewise.
7371 (build_x_component_ref): Likewise.
7372 (build_class_member_access_expr): New function.
7373 (finish_class_member_access_expr): Likewise.
7374 (build_ptrmemfunc_access_expr): Likewise.
7375 * decl.c (grokdeclarator): Handle BASELINKs.
7376 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7377 finish_class_member_access_expr.
7378 (arg_assoc): Handle BASELINKs.
7379 (do_class_using_decl): Likewise.
7380 * error.c (dump_decl): Likewise.
7381 (dump_expr): Use build_ptrmemfunc_access_expr.
7382 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7384 (build_throw): Use BASELINK_FUNCTIONS.
7385 * init.c (perform_member_init): Use
7386 build_class_member_access_expr.
7387 (build_offset_ref): Handle BASELINKs. Use
7388 build_class_member_access_expr.
7389 * method.c (hack_identifier): Likewise.
7390 * parse.y (do_id): Use BASELINK, not TREE_LIST.
7391 (primary): Remove uses of build_object_ref.
7392 * pt.c (lookup_template_function): Handle BASELINKs.
7393 (resolve_overloaded_unification): Likewise.
7394 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7395 (lookup_field): Use BASELINK, not TREE_LIST.
7396 (lookup_fnfiels): Likewise.
7397 (setup_class_bindings): Likewise.
7398 * semantics.c (finish_object_call_expr): Do not use
7399 build_method_call when we already know what function is being
7401 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7402 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7404 (name_p): New function.
7405 * typeck.c (build_object_ref): Remove.
7406 (build_component_ref_1): Likewise.
7407 (build_x_component_ref): Likewise.
7408 (build_class_member_access_expr): New function.
7409 (finish_class_member_access_expr): Likewise.
7410 (build_ptrmemfunc_access_expr): Likewise.
7411 (get_member_function_from_ptrfunc): Use
7412 build_ptrmemfunc_access_expr.
7413 (build_binary_op): Likewise.
7414 (build_unary_op): Likewise.
7415 (build_ptrmemfunc): Likewise.
7416 (pfn_from_ptrmemfunc): Likewise.
7417 * typeck2.c (build_m_component_ref): Adjust comment.
7419 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
7421 * Make-lang.in (CXX_C_OBJS): Update.
7422 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7423 * cp-tree.h (cxx_decode_option): Remove.
7424 * decl2.c (compare_options, lang_f_options, unsupported_options,
7425 cxx_decode_option): Remove.
7427 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
7429 * typeck.c (build_x_unary_op): Handle pointer-to-member.
7431 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
7433 * class.c: Don't include obstack.h.
7435 * decl2.c: Delete bogus comment.
7436 * error.c: Don't include obstack.h.
7437 * except.c: Likewise.
7438 (dump_type): Correct comment.
7439 * method.c: Don't include obstack.h.
7442 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
7445 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7446 expressions to pointer-to-data-member of pointer-to-member-functions.
7448 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
7450 * cvt.c (ocp_convert): Delete obsolete code.
7451 * parse.y (permanent_obstack): Delete declaration.
7452 * pt.c (permanent_obstack): Delete declaration.
7453 * repo.c (permanent_obstack): Delete declaration.
7454 (open_repo_file): Use xmalloc instead of permanent_obstack.
7455 (init_repo): Use xstrdup instead of permanent_obstack.
7457 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
7459 * cp-tree.h (VF_DERIVED_VALUE): Remove.
7460 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7462 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
7465 C++ ABI change - vfunc ordering.
7466 * class.c (add_virtual_function): Remove.
7467 (dfs_modify_all_vtables): Take list of all declared
7468 virtuals. Assign all that are not in primary base.
7469 (check_for_override): Adjust comments.
7470 (create_vtable_ptr): Take single list of virtuals. Build chain
7471 of declared virtuals here.
7472 (layout_class_type): Take single list of virtuals. Adjust.
7473 (finish_struct_1): Keep virtuals on single list. Adjust.
7475 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7477 * init.c (build_member_call): Use build_new_method_call, not
7480 2002-08-02 Krister Walfridsson <cato@df.lth.se>
7482 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7484 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7486 * call.c (build_method_call): Issue a more helpful error message
7487 about ambiguous method names.
7489 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
7491 * tree.c (build_shared_int_cst): Make cache file scope, and
7494 2002-08-02 Jason Merrill <jason@redhat.com>
7496 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7497 (cp_expr_size): New fn.
7498 * call.c (build_over_call): Lose empty class hackery.
7499 (convert_arg_to_ellipsis): Promote non-POD warning to error.
7500 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7502 * semantics.c (expand_body): Do tree optimization in the function
7505 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
7507 * cp-tree.h: Move all warning and flag declarations to c-common.h.
7508 * decl.c: Move all warning and flag variables to c-common.c.
7509 * decl2.c: Move all warning and flag variables to c-common.c.
7510 * lex.c (flag_digraphs): Remove.
7511 (warn_traditional): Now in c-common.c.
7513 2002-07-31 Mark Mitchell <mark@codesourcery.com>
7515 * call.c (build_field_call): Do not look up the field by name.
7516 (build_method_call): Simplify.
7517 (struct z_candidate): Add access_path and conversion_path. Remove
7519 (convert_class_to_reference): Adjust use of
7520 add_function_candidate.
7521 (add_candidate): Add conversion_path argument.
7522 (add_function_candidate): Use it.
7523 (add_conv_dndidate): Likewise.
7524 (build_builtin_candidate): Likewise.
7525 (add_template_candidate_real): Add conversion_path argument.
7526 (add_template_conv_candidate): Likewise.
7527 (add_template_candidate): Likewise.
7528 (build_user_type_conversion_1): Use it.
7529 (build_new_function_call): Remove name lookup code. Adjust use of
7530 add_template_candidate and add_function_candidate.
7531 (build_new_op): Likewise.
7532 (convert_like_real): Use build_special_member_call.
7533 (build_over_call): Use cand->conversion_path.
7534 (build_special_member_call): New method.
7535 (build_new_method_call): Remove name lookup code.
7536 * cp-tree.def (OFFSET_REF): Update documentation.
7537 (TEMPLATE_ID_EXPR): Likewise.
7538 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7539 (BASELINK_OPTYPE): Likewise.
7540 (build_new_method_call): Adjust prototype.
7541 (build_special_member_call): New method.
7542 (build_baselink): New method.
7543 (build_offset_ref_call_from_tree): Likewise.
7544 (build_call_from_tree): Likewise.
7545 (finish_qualified_call_expr): Remove.
7546 (finish_call_expr): Adjust prototype.
7547 (build_x_function_call): Remove.
7548 * cvt.c (ocp_convert): Use build_special_member_call.
7549 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7550 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7552 (build_offset_ref_call_from_tree): New function.
7553 (build_call_from_tree): Likewise.
7554 * init.c (expand_cleanup): Use build_special_member_call.
7555 (expand_default_init): Likewise.
7556 (build_member_call): Use finish_call_expr.
7557 (build_new_1): Use build_special_member_call.
7558 (push_base_cleanups): Likewise.
7559 * method.c (do_build_assign_ref): Likewise.
7560 * parse.y (template_id): Do not pass a COMPONENT_REF to
7561 lookup_template_function.
7562 (primary): Use parse_finish_call_epxr, not finish_call_expr.
7563 (parse_finish_call_expr): New function.
7564 * pt.c (lookup_template_function): Add assertions.
7565 * search.c (lookup_base): Allow T to be a binfo.
7566 (build_baselink): New function.
7567 (lookup_member): Use it.
7568 * semantics.c (finish_call_expr): Do not do name lookup.
7569 (finish_object_call_expr): Remove #if 0'd code.
7570 (finish_qualified_call_expr): Remove.
7571 * typeck.c (build_x_function_call): Remove.
7572 (build_static_case): Use build_special_member_call.
7573 * typeck2.c (build_functional_cast): Likewise.
7575 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7577 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7579 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
7581 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7583 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
7585 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7588 2002-07-29 Alan Modra <amodra@bigpond.net.au>
7590 * cp-tree.h: Comment typo fix.
7592 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
7594 * spew.c (space_for_token): Allocate zeroed memory for a new token
7597 2002-07-27 Roger Sayle <roger@eyesopen.com>
7599 * decl.c (builtin_function_1): No need to explicitly mark
7600 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7602 2002-07-27 Roger Sayle <roger@eyesopen.com>
7604 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7606 2002-07-26 Jason Merrill <jason@redhat.com>
7608 * call.c (build_over_call): Likewise.
7609 (cp_convert_parm_for_inlining): New fn.
7610 (convert_for_arg_passing): New fn.
7611 (convert_default_arg, build_over_call): Use it.
7612 (type_passed_as): New fn.
7613 * pt.c (tsubst_decl): Use it.
7614 * decl2.c (cp_build_parm_decl): New fn.
7615 (build_artificial_parm): Use it.
7616 (start_static_storage_duration_function): Likewise.
7617 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7618 (grokparms): Don't mess with DECL_ARG_TYPE.
7619 * typeck.c (convert_arguments): Use convert_for_arg_passing.
7620 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7622 * cp-tree.h: Declare new fns.
7624 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
7626 * cp-tree.h (flag_operator_names): Remove.
7627 * decl2.c (flag_operator_names): Remove.
7628 (lang_f_options): Remove operator-names.
7629 * lex.c (D_OPNAME): Remove.
7630 (reswords): Remove operator names.
7631 (rid_to_yy): Remove operator names.
7632 (init_reswords): No need to handle D_OPNAME.
7633 * spew.c (read_process_identifier): There are no operator
7636 2002-07-26 Jason Merrill <jason@redhat.com>
7638 * dump.c (cp_dump_tree): Call c_dump_tree.
7639 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7641 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7643 * error.c (print_whitespace): Remove.
7644 * g++spec.c (LIBUNWIND): Move.
7645 * mangle.c (mangled_position, write_signed_number): Remove.
7647 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7649 * decl2.c (cxx_decode_option): Similarly.
7651 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
7653 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7654 (cxx_sizeof_or_alignof_type): Take a third argument.
7655 (cxx_sizeof): Adjust definition.
7656 (cxx_alignof): Likewise.
7657 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7658 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7660 (c_sizeof_nowarn): Remove definition.
7661 (build_unary_op): Use cxx_sizeof_nowarn.
7663 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
7665 * tree.c (cp_build_qualified_type_real): When copying
7666 pointer-to-method types, unshare the record that holds
7667 the cached pointer-to-member-function type.
7669 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7671 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7673 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
7676 * typeck.c (cxx_sizeof_or_alignof_type): New function.
7677 (c_sizeof): Remove definition.
7678 (expr_sizeof): Use cxx_sizeof.
7679 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7680 * decl.c (finish_destructor_body): Use cxx_sizeof.
7681 * semantics.c (finish_alignof): Likewise.
7682 (finish_alignof): Use cxx_alignof.
7683 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7684 (cxx_sizeof_or_alignof_type): Declare.
7685 (my_friendly_assert): Move to ../c-common.h.
7687 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7689 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7691 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7693 PR c++/7347, c++/7348
7694 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7695 * decl.c (make_typename_type): Use it.
7696 (make_unbound_class_template): Likewise.
7697 (lookup_name_real): Don't call type_access_control if scope is
7698 template parameter dependent.
7699 * parse.y (template_arg): Call make_unbound_class_template with
7701 (nest_name_specifier): Call make_typename_type with tf_parsing set.
7702 (typename_sub0): Likewise.
7703 (typename_sub1): Likewise.
7704 (instantiate_decl): Push class scope.
7705 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7706 for both static variable and member function template.
7707 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7709 * search.c (type_access_control): Do type access for TEMPLATE_DECL
7712 2002-07-20 Roger Sayle <roger@eyesopen.com>
7714 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7715 test by using positive_option. Make whitespace consistent.
7717 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
7719 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7720 members with 'locus'. Adjust use throughout.
7721 (struct feed): Likewise.
7722 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7724 (snarf_defarg): Use error(), not error_with_file_and_line().
7726 2002-07-19 Chris Demetriou <cgd@broadcom.com>
7728 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7729 cpp_options is included.
7731 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7733 PR c++/2862, c++/2863
7734 * pt.c (determine_specialization): Compare the length of
7735 TYPE_ARG_TYPES. Tidy.
7737 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7740 * decl.c (duplicate_decls): Don't propagate inlining parameters from
7741 olddecl to newdecl when newdecl is a specialization of the
7742 instantiation olddecl.
7744 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7746 PR c++/4802, c++/5387
7747 * decl.c (make_typename_type): Use enforce_access.
7749 2002-07-17 Scott Snyder <snyder@fnal.gov>
7752 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7754 2002-07-12 Mark Mitchell <mark@codesourcery.com>
7756 * class.c (add_method): Correct handling of conversion operators.
7758 2002-07-11 Mark Mitchell <mark@codesourcery.com>
7761 * class.c (add_method): Simplify.
7763 2002-07-11 Jason Merrill <jason@redhat.com>
7766 * tree.c (cp_copy_res_decl_for_inlining): Also copy
7769 2002-07-10 Graham Stott <graham.stott@btinternet.com>
7771 * pt.c (template_parm_this_level_p, push_template_decl_real):
7772 Pass depth as int pointer.
7774 2002-07-11 Tim Josling <tej@melbpc.org.au>
7776 Remove front end hard coding from gengtype.c.
7778 * config-lang.in (gtfiles): Add files needed for this front end.
7780 2002-07-10 Mark Mitchell <mark@codesourcery.com>
7782 * cp-tree.h (unqualified_name_lookup_error): Declare it.
7783 (begin_function_definition): Adjust prototype.
7784 * lex.c (unqualified_name_lookup_error): New function, split out
7786 (do_identifier): ... here.
7787 * parse.y (parse_begin_function_definition): New function.
7789 * semantics.c (begin_function_definition): Accept decl-specifiers
7790 and attributes as separate parameters.
7792 2002-07-10 Jason Merrill <jason@redhat.com>
7795 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7796 modifying the old one.
7798 2002-07-09 Mark Mitchell <mark@codesourcery.com>
7800 * cp-tree.h (constructor_name_p): Declare it.
7801 (check_template_template_default_arg): Likewise.
7802 * class.c (handle_using_decl): Use constructor_name_p.
7803 * decl.c (grokdeclarator): Likewise.
7804 * decl2.c (constructor_name_p): Define it.
7805 * init.c (build_member_call): Use constructor_name_p.
7806 * parse.y (template_parm): Use check_template_template_default_arg.
7807 * pt.c (check_explicit_specialization): Use constructor_name_p.
7808 * semantics.c (check_template_template_default_arg): New function.
7810 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7812 * pt.c (can_complete_type_without_circularity): Add static to
7813 function definition.
7815 2002-07-08 Mark Mitchell <mark@codesourcery.com>
7817 * cp-tree.h (have_extern_spec): Declare it
7818 * decl.c (have_extern_spec): Define it.
7819 (start_decl): Eliminate use of used_extern_spec.
7820 (start_function): Likewise.
7821 * parse.y (have_extern_spec): Remove declaration.
7822 (used_extern_spec): Likewise.
7823 (frob_specs): Eliminate use of used_extern_spec.
7824 (.hush_warning): Likewise.
7826 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7828 * Make-lang.in (cp/parse.o): Depend on decl.h.
7829 * cp-tree.h (do_decl_instantiation): Change prototype.
7830 * parse.y: Include decl.h.
7831 (parse_decl_instantiation): New function.
7832 (explicit_instantiation): Use it.
7833 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7836 2002-07-07 Roger Sayle <roger@eyesopen.com>
7838 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7839 constructor and destructor tests when passed a TEMPLATE_DECL.
7841 2002-07-05 Jason Merrill <jason@redhat.com>
7843 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7846 PR optimization/7145
7847 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7849 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
7851 Repair damage on weak-impared targets caused by my previous patch.
7852 * cp-tree.h (import_export_tinfo): Add parameter.
7853 * decl2.c (import_export_tinfo): Add parameter, post adjust
7855 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7856 import_export_tinfo.
7858 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7861 * init.c (build_aggr_init): Remove qualifiers of init before calling
7863 (build_vec_init): Flatten multi-dimensional array during cleanup.
7864 (build_vec_delete_1): Abort if the type of each element is array.
7866 2002-07-03 Graham Stott <graham.stott@btinternet.com>
7868 * pt.c (instantiate_class_template): Fix typo.
7870 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7872 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7873 by CVS conflict in my last patch.
7875 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7878 * pt.c (can_complete_type_without_circularity): New function.
7879 (instantiate_class_template): Use it.
7880 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7881 message due to incomplete fields.
7883 2002-07-01 Mark Mitchell <mark@codesourcery.com>
7886 * mangle.c (write_expression): Add mangling for sizeof when
7888 * operators.def: Remove stale comment.
7890 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
7892 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7893 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7894 (tinfo_decl_type): Replace with ...
7895 (type_info_ptr_type): ... this.
7896 (import_export_tinfo): Declare.
7897 (tinfo_decl_p): Rename to ...
7898 (unemitted_tinfo_decl_p): ... this.
7899 * decl2.c (import_export_decl): Break out tinfo handling into ...
7900 (import_export_tinfo): ... here. New function.
7901 (finish_file): Adjust.
7902 * rtti.c (TINFO_REAL_NAME): New macro.
7903 (init_rtti_processing): Create the tinfo types.
7904 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7905 (get_tinfo_decl): Adjust.
7906 (get_tinfo_ptr): New function.
7907 (get_type_id): Use it.
7908 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7909 (ptr_initializer): Use get_tinfo_ptr.
7910 (ptm_initializer): Likewise.
7911 (synthesize_tinfo_var): Break into ...
7912 (get_pseudo_ti_init): ... this. Just create the initializer.
7913 (get_pseudo_ti_desc): .. and this.
7914 (create_real_tinfo_var): Remove.
7915 (create_pseudo_type_info): Don't create the vtable decl here.
7916 (get_vmi_pseudo_type_info): Remove.
7917 (create_tinfo_types): Adjust.
7918 (tinfo_decl_p): Rename to ...
7919 (unemitted_tinfo_decl_p): ... here. Adjust.
7920 (emit_tinfo_decl): Adjust. Create the initializer.
7922 2002-06-27 Mark Mitchell <mark@codesourcery.com>
7925 * pt.c (tsubst_friend_class): Substitute into the context of the
7926 friend before using it.
7928 2002-06-26 Mark Mitchell <mark@codesourcery.com>
7930 * cp-tree.h (xref_tag): Change prototype.
7931 (handle_class_head): Likewise.
7932 (build_x_component_ref): Likewise.
7933 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7934 (xref_tag): Take attributes as a separate parameter.
7935 (xref_tag_from_type): Adjust call to xref_tag.
7936 * decl2.c (build_expr_from_tree): Adjust call to
7937 build_x_component_ref.
7938 (handle_class_head): Take attributes as a separate parameter.
7939 * parse.y (parse_xref_tag): New function.
7940 (parse_handle_class_head): Likewise.
7941 (primary): Use parse_xref_tag.
7942 (class_head_decl): Use parse_handle_class_head.
7943 (class_head_defn): Likewise.
7944 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7945 (build_dynamic_cast_1): Likewise.
7946 (create_pseudo_type_info): Likewise.
7947 (emit_support_tinfos): Likewise.
7948 * typeck.c (build_object_ref): Adjust call to
7949 build_x_component_ref.
7950 (build_x_component_ref): Remove protect parameter.
7952 2002-06-25 Mark Mitchell <mark@codesourcery.com>
7954 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7955 * class.c (handle_using_decl): Likewise.
7956 (instantiate_type): Likewise.
7957 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7958 (xref_basetypes): Change prototype.
7959 (begin_mem_initializers): New function.
7960 (get_overloaded_fn): Likewise.
7961 * decl.c (xref_basetypes): Simplify.
7962 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7963 * init.c (build_offset_ref): Likewise.
7964 * parse.y (base_init): Use begin_mem_initializers().
7965 (structsp): Adjust call to xref_basetypes.
7966 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7967 (instantiate_class_template): Adjust call to xref_basetypes.
7968 * semantics.c (begin_mem_initializers): New function.
7969 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7970 (really_overlaoded_fn): Likewise.
7971 (get_overloaded_fn): New function.'
7972 (get_first_fn): USe BASELINK_FUNCTIONS.
7974 2002-06-24 Mark Mitchell <mark@codesourcery.com>
7976 * cp-tree.h (SCALAR_TYPE_P): New macro.
7977 (check_for_out_of_scope_variable): New function.
7978 (at_class_scope_p): Likewise.
7979 (finish_fname): Likewise.
7980 * class.c (finish_struct): Use at_function_scope_p.
7981 * decl.c (check_for_out_of_scope_variable): New function, split
7982 out from do_identifier.
7983 (finish_enum): Use at_function_scope_p.
7984 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7985 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
7986 (primary): Use at_function_scope_p.
7987 * search.c (at_class_scope_p): New function.
7988 * semantics.c (finish_fname): Likewise.
7989 (check_multiple_declarators): Use at_function_scope_p.
7991 2002-06-23 Mark Mitchell <mark@codesourcery.com>
7993 * parse.y (parse_scoped_id): New function.
7995 * cp-tree.h (do_scoped_id): Adjust declaration.
7996 * lex.c (do_scoped_id): Remove call to yylex.
7997 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7998 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7999 expanding it inline.
8001 2002-06-23 Matt Thomas <matt@3am-software.com>
8003 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8006 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8008 * mangle.c (integer_type_codes): Const-ify.
8010 2002-06-20 Richard Henderson <rth@redhat.com>
8013 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8014 Call put_var_into_stack.
8016 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8018 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8019 array size calculation.
8021 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8024 * pt.c (tsubst_expr): Handle FILE_STMT.
8026 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8029 * pt.c (lookup_template_class): Don't build complete argument of
8030 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8033 2002-06-19 Akim Demaille <akim@epita.fr>
8035 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8037 * spew.c, lex.c: Adjust.
8038 * parse.y (explicit_instantiation): Add empty action to override
8039 the default $$ = $1 where it introduces a type clash.
8041 2002-06-14 Jason Merrill <jason@redhat.com>
8043 * semantics.c (begin_for_stmt): Push the 'for' scope before
8044 adding the FOR_STMT.
8047 * class.c (build_base_field): Set DECL_PACKED.
8048 (layout_class_type): Don't use tail padding of PODs.
8049 * mangle.c (write_unqualified_name): Fix template conversion op
8052 2002-06-16 Richard Henderson <rth@redhat.com>
8055 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8056 after template instantiation.
8058 2002-06-16 Richard Henderson <rth@redhat.com>
8060 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8062 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
8064 * cp-tree.h (compiler_error): Remove declaration.
8065 * lex.c (compiler_error): Remove definition.
8067 2002-06-14 Steve Ellcey <sje@cup.hp.com>
8069 * g++spec.c (LIBUNWIND): New.
8070 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8072 2002-06-13 Jessica Han <jessica@cup.hp.com>
8074 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8075 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8076 (build_vbase_offset_vtbl_entries): Likewise.
8077 * rtti.c (build_headof): Likewise.
8078 (get_tinfo_decl_dynamic): Likewise.
8079 (create_pseudo_type_info): Likewise.
8081 2002-06-12 Stan Shebs <shebs@apple.com>
8083 * mpw-config.in: Remove file, no longer used.
8084 * mpw-make.sed: Ditto.
8086 2002-06-07 Zack Weinberg <zack@codesourcery.com>
8088 * decl2.c: Update call to cpp_handle_option.
8090 2002-06-07 H.J. Lu (hjl@gnu.org)
8092 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8094 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
8096 * error.c (cp_error_at): Fix typo.
8098 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
8100 * error.c (cp_diagnostic_starter): Adjust call.
8101 (maybe_print_instantiation_context): Change prototype to take a
8102 'diagnostic_info *'.
8103 (print_instantiation_full_context): Likewise.
8104 (print_instantiation_partial_context): Likewise.
8105 (cp_diagnostic_starter): Likewise.
8106 (cp_diagnostic_finalizer): Likewise.
8107 (cp_print_error_function): Likewise.
8108 (cp_printer): Take a secondary parameter as a 'text_info *'.
8109 Remove output_state savings. Adjust calls.
8111 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8113 * pt.c (inline_parm_levels): Mark for GC.
8115 * mangle.c (start_mangling): Allocate G.substitutions here...
8116 (init_mangle): ... rather than here.
8117 (finish_mangling): Clear the varray pointer when done with it.
8118 * spew.c (yylexstring): Don't use VARRAY_FREE.
8119 * search.c (bfs_walk): Don't use VARRAY_FREE.
8120 * decl2.c (pending_statics): Use gengtype to mark.
8121 (deferred_fns): Likewise.
8122 (ssdf_decls): Likewise.
8123 (init_decl2): Delete.
8124 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8125 (cxx_init_decl_processing): Don't call init_decl2.
8126 (cxx_pop_function_context): Don't use VARRAY_FREE.
8127 * cp-tree.h (struct saved_scope): No need for special marking
8129 (struct language_function): Likewise.
8130 (local_classes): Use gengtype to mark.
8131 (init_decl2): Delete prototype.
8132 * class.c (init_class_processing): Don't use
8133 ggc_add_tree_varray_root.
8134 (build_vtbl_initializer): Don't use VARRAY_FREE.
8136 * decl.c (typename_compare): Don't use same_type_p.
8138 * decl.c: Include hashtab.h instead of hash.h.
8139 (typename_hash): Update to use htab_h.
8140 (typename_compare): Likewise.
8141 (typename_htab): Use gengtype to mark.
8142 (build_typename_type): Update to use htab_h.
8143 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8145 * Make-lang.in (gt-cp-tree.h): New rule.
8146 (cp/tree.o): Depend on gt-cp-tree.h.
8147 * config-lang.in (gtfiles): Add cp/tree.c.
8148 * tree.c: Include gt-cp-tree.h.
8149 (list_hash_table): Use gengtype to mark.
8150 (init_tree): Use gengtype to mark trees.
8152 * Make-lang.in (cp/decl.o): Add debug.h dependency.
8153 * call.c (struct z_candidate): Use gengtype.
8154 (USER_CONV_CAND): Use WRAPPER_ZC.
8155 (convert_class_to_reference): Use build_zc_wrapper.
8156 (build_type_conversion_1): Likewise.
8157 (build_over_call): Use WRAPPER_ZC.
8158 (add_warning): Use build_zc_wrapper.
8159 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8160 * cp-tree.h (struct lang_identifier): Use gengtype.
8161 (struct template_parm_index_s): Likewise.
8162 (struct ptrmem_cst): Likewise.
8163 (struct tree_binding): Likewise.
8164 (struct tree_overload): Likewise.
8165 (struct tree_srcloc): Likewise.
8166 (struct tree_wrapper): Likewise. Also modify to have a pointer
8167 to struct z_candidate rather than void.
8168 (enum cp_tree_node_structure_enum): New.
8169 (union lang_tree_node): New.
8170 (cxx_mark_tree): Delete prototype.
8171 (cp_tree_node_structure): New prototype.
8172 (build_ptr_wrapper): Delete prototype.
8173 (build_int_wrapper): Delete prototype.
8174 (build_zc_wrapper): New prototype.
8175 * decl.c: Include debug.h
8176 (cxx_mark_tree): Delete.
8177 (cp_tree_node_structure): New.
8178 * tree.c (build_ptr_wrapper): Delete.
8179 (build_int_wrapper): Delete.
8180 (build_zc_wrapper): New.
8182 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8183 Correct typo. Patch from k_fukui@highway.ne.jp.
8185 * semantics.c (current_stmt_tree): Update for change to
8186 struct language_function.
8187 (finish_mem_initializers): Likewise.
8188 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8189 * cp-tree.h (struct language_function): Rename from
8190 cp_language_function. Change all uses.
8191 (cp_function_chain): Don't need to cast.
8193 * class.c (duplicate_tag_error): Reset discriminator.
8194 (check_bases_and_members): Update for data structure changes.
8195 * cp-tree.h (struct lang_id2): Use gengtype.
8196 (flagged_type_tree): Likewise.
8197 (SET_LANG_ID): Use GGC on struct lang_id2.
8198 (struct cp_language_function): Use gengtype. Remove field
8199 'x_vcalls_possible_p'.
8200 (current_vcalls_possible_p): Delete.
8201 (struct lang_type_header): New.
8202 (struct lang_type_class): Rename from struct lang_type. Include
8203 struct lang_type_header.
8204 (struct lang_type_ptrmem): New.
8205 (struct lang_type): New.
8206 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
8207 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
8208 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8209 (struct lang_decl_flags): Use gengtype. Add discriminators.
8210 (struct lang_decl): Use gengtype. Add and use discriminators.
8211 Update the macros that reference moved fields.
8212 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
8213 (SET_DECL_THUNK_P): Set discriminator too.
8214 (clear_inline_text_obstack): Delete prototype.
8215 (finish_inline_definitions): Delete prototype.
8216 (mark_pending_inlines): Delete prototype.
8217 (lang_check_failed): New prototype.
8218 * decl.c (struct named_label_use_list): Use gengtype.
8219 (struct named_label_list): Likewise.
8220 (mark_binding_level): Delete.
8221 (mark_named_label_lists): Delete.
8222 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8223 (cxx_init_decl_processing): Use generated marker routine.
8224 (begin_destructor_body): Delete dead set to
8225 current_vcalls_possible_p.
8226 (mark_lang_function): Delete.
8227 (mark_cp_function_context): Delete.
8228 (lang_mark_tree): Use generated marker routines.
8229 * decl2.c (start_objects): Set discriminator when setting
8230 GLOBAL_INIT_PRIORITY.
8231 * lex.c (retrofit_lang_decl): Set discriminators.
8232 (copy_lang_type): Update for changes to lang_type structure.
8233 (cp_make_lang_type): Set discriminator.
8234 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
8235 * search.c: Include ggc.h.
8236 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8237 (finish_inline_definitions): Delete.
8238 * spew.c (struct token): Use gengtype.
8239 (struct token_chunk): New.
8240 (struct unparsed_text): Use gengtype. Store tokens in chunks.
8241 (struct feed): Use gengtype.
8242 (feed_obstack): Delete.
8243 (feed): Mark as GC root.
8244 (pending_inlines): Mark as GC root.
8245 (pending_inlines_tail): Likewise.
8246 (processing_these_inlines): Likewise.
8247 (token_obstack): Make static.
8248 (first_token): Likewise.
8249 (init_spew): Don't initialize deleted things; use gengtype for roots.
8250 (clear_inline_text_obstack): Delete.
8251 (feed_input): Use GC for struct feed. Update for changes to
8252 struct unparsed_text.
8253 (mark_pending_inlines): Delete.
8254 (next_token): Rename from add_token. Change all callers. Update
8255 for changes to struct unparsed_text.
8256 (space_for_token): New.
8257 (remove_last_token): New.
8258 (alloc_unparsed_text): New.
8259 (snarf_block): Take an unparsed_text. Update for changes to struct
8261 (snarf_method): Update for changes to struct unparsed_text.
8262 (snarf_defarg): Update for changes to struct unparsed_text.
8263 * tree.c (lang_check_failed): New.
8265 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8266 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8267 (cp/spew.o): Add dependency on gt-<filename>.h.
8268 (cp/decl2.o): Add dependency on gt-<filename>.h.
8269 (cp/call.o): Add dependency on gt-<filename>.h.
8270 (cp/pt.o): Add dependency on gt-<filename>.h.
8271 (cp/repo.o): Add dependency on gt-<filename>.h.
8272 (cp/parse.o): Add dependency on gt-<filename>.h.
8273 * call.c: Use gengtype for roots.
8274 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8275 decl2.c parse.y pt.c repo.c spew.c.
8276 * cp-tree.h: Use gengtype for roots.
8277 (struct saved_scope): Use GGC, gengtype.
8278 (cp_parse_init): Delete prototype.
8279 (init_pt): Delete prototype.
8280 * decl.c: Use gengtype for roots.
8281 (mark_saved_scope): Delete.
8282 (cxx_init_decl_processing): Don't call deleted initilisation
8284 (signed_size_zero_node): Delete, unused.
8285 * decl.h: Use gengtype for roots.
8286 * decl2.c: Use gengtype for roots.
8287 * lex.h: Use gengtype for roots.
8288 * parse.y: Use gengtype for roots.
8289 (cp_parse_init): Delete.
8290 * pt.c: Use gengtype for roots.
8292 * repo.c: Use gengtype for roots.
8293 * spew.c: Use gengtype for roots.
8295 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
8296 (cp/decl.o): Add dependency on gtype-cp.h.
8297 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8298 Include gtype-cp.h. Allow for filename changes.
8300 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8301 (cp/decl.o): Add cp/gt-decl.h dependency.
8302 * config-lang.in (gtfiles): New.
8303 * tree.h: Rename struct binding_level to struct cp_binding_level.
8304 * decl.c: Rename struct binding_level to struct cp_binding_level.
8305 Include cp/gt-decl.h.
8306 (struct cp_binding_level): Use gengtype.
8307 (make_binding_level): Use GGC on struct cp_binding_level.
8308 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8309 (cxx_init_decl_processing): Mark free_binding_level as
8312 * decl.c (mark_cp_function_context): Update calling sequence.
8314 * decl.c (start_function): Don't free 'struct
8315 cp_language_function'.
8316 (pop_cp_function_context): Likewise.
8317 (save_function_data): Allocate it using GC.
8318 * semantics.c (genrtl_start_function): Don't free 'struct
8319 cp_language_function'.
8321 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
8323 * lang-specs.h: Use cpp_debug_options.
8325 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8327 * mangle.c, tree.c: Include real.h.
8328 * Make-lang.in: Update dependency lists.
8330 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
8332 * lex.c: Don't include c-lex.h.
8333 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8335 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
8337 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8339 2002-05-22 Richard Henderson <rth@redhat.com>
8341 * decl.c (obscure_complex_init): Check for VAR_DECL
8342 before using DECL_THREAD_LOCAL.
8344 2002-05-22 Richard Henderson <rth@redhat.com>
8346 * decl.c (check_tag_decl): Handle RID_THREAD.
8347 (obscure_complex_init): Reject run-time init of tls.
8348 (grokvardecl, grokdeclarator): Handle RID_THREAD.
8349 * lex.c (reswords): Add __thread.
8350 (rid_to_yy): Map RID_THREAD to SCSPEC.
8352 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
8354 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8355 * cp-tree.h (cxx_post_options): Kill.
8356 * cp-lex.c (cxx_post_options): Kill.
8358 2002-05-21 Richard Henderson <rth@redhat.com>
8360 * lex.c (rid_to_yy): Add RID_THREAD.
8362 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
8364 * init.c (build_vec_init): Test for trivial copy-assignment when
8365 copy-assigning arrays.
8367 2002-05-20 Andreas Jaeger <aj@suse.de>
8369 * init.c (build_default_init): Remove unused variable.
8371 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
8373 * call.c (any_strictly_viable): New.
8374 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8376 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8378 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8380 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8383 * pt.c (do_decl_instantiation): Don't complain explicit
8384 instantiation after explicit specialization.
8385 (do_type_instantiation): Likewise.
8387 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
8389 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8391 (complete_type_or_else): ... this. Redefined as macro.
8392 (cxx_incomplete_type_diagnostic): Declare.
8393 (cxx_incomplete_type_error): Define as macro.
8394 * init.c (build_delete): Warn about incomplete types other than
8395 void, and use the built-in operator delete for them.
8396 * typeck.c (complete_type_or_diagnostic): Renamed from
8397 complete_type_or_else. Added warn_only argument, passed to...
8398 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
8399 warnings or errors depending on new warn_only argument. Renamed
8401 (cxx_incomplete_type_error): ... this. New implementation in
8402 terms of cxx_incomplete_type_diagnostic.
8404 2002-05-18 Jason Merrill <jason@redhat.com>
8407 * decl2.c (import_export_decl): If we clear
8408 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8410 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8413 * pt.c (verify_class_unification): Don't check if PARM is template
8414 parameter dependent. Simplify.
8415 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8416 parameter dependent expression.
8418 2002-05-14 Jason Merrill <jason@redhat.com>
8420 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8422 (synthesize_tinfo_var): Take the public decl.
8423 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
8424 (emit_tinfo_decl): Adjust. Call import_export_decl.
8425 * decl2.c (import_export_decl): Simplify tinfo decl handling.
8427 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
8429 * cp-tree.h (struct lang_type): Added non_zero_init.
8430 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8431 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8432 * class.c (check_field_decls): Test non_zero_init.
8433 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8434 zero-to-NULL conversions.
8435 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8436 type that needs zero-initialization without zeros.
8437 (check_initializer_decl): Compute zero-initializer for types
8438 that require a non-trivial one.
8439 * init.c (build_forced_zero_init): New function.
8440 (build_default_init): Use it.
8441 * tree.c (zero_init_p): New function.
8442 * typeck2.c (force_store_init_value): New function.
8443 (process_init_constructor): Create non-trivial zero-initializers
8444 for array members and class fields.
8446 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
8448 * lang-specs.h: Remove redundant -lang-c++.
8450 2002-05-13 Jason Merrill <jason@redhat.com>
8452 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8453 (fixed_type_or_null): See through reference vars.
8454 (build_base_path): Vtable contents are constant.
8455 * typeck.c (get_member_function_from_ptrfunc): Likewise.
8457 2002-05-12 Jason Merrill <jason@redhat.com>
8459 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8462 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
8464 * cp-tree.h (flag_ansi): Remove.
8465 * decl2.c (flag_ansi): Remove.
8466 (cxx_decode_option): Set flag_iso and flag_undef.
8468 2002-05-09 Jason Merrill <jason@redhat.com>
8470 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8471 Use subtraction rather than a bitmask to get the index.
8472 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8474 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8476 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
8478 * Make-lang.in (decl2.o): Update.
8479 * cp-tree.h (warn_multichar): Remove.
8480 * decl2.c: Include c-common.h.
8481 (warn_multichar): Remove.
8483 2002-05-03 Jason Merrill <jason@redhat.com>
8485 * tree.c (build_cplus_array_type): Only const and volatile get
8488 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8490 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8492 ABI change, returning simple classes from functions.
8493 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8494 TYPE_HAS_TRIVIAL_INIT_REF is false or
8495 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8497 2002-04-30 Jason Merrill <jason@redhat.com>
8500 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8501 anonymous class with a typedef if there are attributes.
8503 2002-04-29 Paul Eggert <eggert@twinsun.com>
8505 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8507 2002-04-29 Jakub Jelinek <jakub@redhat.com>
8510 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8513 2002-04-29 Mark Mitchell <mark@codesourcery.com>
8516 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8517 enter that scope before name lookup.
8520 * method.c (do_build_copy_constructor): Avoid building
8521 cv-qualified reference types.
8523 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
8526 * decl.c (grok_op_properties): Assignment ops don't have to return
8527 by value. operator% should.
8529 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8532 * decl.c (duplicate_decls): Call merge_weak.
8534 2002-04-26 Richard Henderson <rth@redhat.com>
8536 * parse.y (malloced_yyss, malloced_yyvs): New.
8537 (yyoverflow): Re-add. Set them.
8538 (free_parser_stacks): New.
8540 2002-04-26 Mark Mitchell <mark@codesourcery.com>
8543 * method.c (do_build_assign_ref): Pass a derivation to
8544 build_method_call when calling base class assignment operators.
8546 2002-04-26 Richard Henderson <rth@redhat.com>
8548 * parse.y (yyoverflow): Revert.
8550 2002-04-26 Richard Henderson <rth@redhat.com>
8553 * parse.y (string): Remove. Update all uses to use STRING
8554 instead, and not call combine_strings.
8555 * rtti.c (tinfo_name): Use fix_string_type.
8556 * semantics.c (finish_asm_stmt): Don't call combine_strings.
8557 * spew.c (yylexstring): New.
8558 (read_token): Use it.
8560 2002-04-25 Richard Henderson <rth@redhat.com>
8563 * parse.y (yyoverflow): New.
8565 2002-04-25 Jason Merrill <jason@redhat.com>
8568 * search.c (check_final_overrider): No longer static.
8569 * class.c (update_vtable_entry_for_fn): Call it.
8570 * cp-tree.h: Adjust.
8572 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8574 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8575 * cp-tree.h (cxx_set_yydebug): Die.
8576 * lex.c (YYDEBUG): Get from c-lex.h.
8577 (cxx_set_yydebug): Remove.
8578 * parse.y: Include c-lex.h.
8579 (YYDEBUG): Get from c-lex.h.
8581 2002-04-24 Mark Mitchell <mark@codesourcery.com>
8584 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8587 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
8589 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8590 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8592 * cp-tree.h (cp_attribute_table): Rename.
8593 * decl.c (lang_attribute_table): Remove declaration.
8594 (cxx_init_decl_processing): Don't set it.
8595 * tree.c (cp_attribute_table): Rename.
8597 2002-04-24 Jason Merrill <jason@redhat.com>
8600 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8601 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8602 The pedwarn for array assignment is now unconditional.
8603 * tree.c (build_cplus_array_type_1): Still process simple array types
8604 normally in templates.
8607 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8610 2002-04-23 Jakub Jelinek <jakub@redhat.com>
8612 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8613 node with attributes.
8615 2002-2-23 David O'Brien <obrien@FreeBSD.org>
8617 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8618 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8620 2002-04-23 Mark Mitchell <mark@codesourcery.com>
8623 * pt.c (tsubst_friend_class): Handle templates with explicit
8627 * typeck.c (merge_types): Remember the cv-qualification of pointer
8628 types when merging them.
8630 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
8632 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8633 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8634 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8635 cxx_mark_function_context): New.
8636 * decl.c (push_cp_function_context, pop_cp_function_context,
8637 mark_cp_function_context): Rename for consistency.
8638 (cxx_init_decl_processing): Don't set old hooks.
8640 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
8642 * call.c (convert_type_from_ellipsis): Rename, update.
8643 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8644 * cp-tree.h (convert_type_from_ellipsis): Rename.
8645 * decl.c (cxx_init_decl_processing): Don't set hook.
8647 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8649 * call.c (build_new_method_call): Update.
8650 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8651 * cp-tree.h (cxx_incomplete_type_error): New.
8652 * decl.c (grokdeclarator, grokparms): Update.
8653 * decl2.c (check_classfn): Update.
8654 * pt.c (tsubst): Update.
8655 * typeck.c (complete_type_or_else, expr_sizeof,
8656 decay_conversion): Update.
8657 * typeck2.c (incomplete_type_error): Rename.
8658 (add_exception_specifier): Update.
8660 2002-04-18 Jason Merrill <jason@redhat.com>
8663 * search.c (setup_class_bindings): A class template qualifies as a
8666 2002-04-17 Jakub Jelinek <jakub@redhat.com>
8669 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8672 2002-04-16 Mark Mitchell <mark@codesourcery.com>
8674 * init.c (begin_init_stmts): Remove commented out code.
8675 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8676 * semantics.c (begin_gobal_stmt_expr): Adjust call to
8677 expand_start_stmt_expr.
8679 2002-04-15 Mark Mitchell <mark@codesourcery.com>
8681 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8682 dso_handle itself, to __cxa_atexit.
8684 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8686 * error.c (cxx_print_error_function): Adjust call to macros.
8688 2002-04-14 Jakub Jelinek <jakub@redhat.com>
8690 * class.c (layout_virtual_bases): Do all dsize computation on trees.
8692 2002-04-14 Jason Merrill <jason@redhat.com>
8694 * typeck.c (get_member_function_from_ptrfunc): Don't do
8695 gratuitious division and multiplication on
8696 ptrmemfunc_vbit_in_delta targets.
8698 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8701 * semantics.c (finish_expr_stmt): Remember the type of the
8702 expression before any conversions are performed.
8704 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8707 * call.c (add_template_candidate_real): Do not treat member
8708 templates as copy constructors.
8710 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8712 * decl.c (duplicate_decls): Do not copy the RTL for a variable
8713 declaration if the old variable had an incomplete type and the new
8715 (complete_vars): Do not call layout_decl for completed variables.
8717 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
8719 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8720 with an explicit one.
8721 (follow_tag_typedef): New.
8722 (lookup_tag): Use it to extract the tag of an explicit typedef.
8723 (xref_tag): Likewise.
8725 2002-04-11 Andrew Haley <aph@redhat.com>
8727 * typeck.c (type_after_usual_arithmetic_conversions):
8728 If two types have the same variant, return immediately.
8729 When two floating-point operands are the same precision:
8730 convert to float if one of the operands is float;
8731 if neither operand is one of the standard types, return the type
8732 of the first operand.
8734 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
8737 * decl.c (make_typename_type): Remove implicit typenameness.
8739 2002-04-09 Jason Merrill <jason@redhat.com>
8741 PR optimization/6189
8742 * semantics.c (genrtl_start_function): Don't free
8743 DECL_SAVED_FUNCTION_DATA for inline functions.
8745 * init.c (build_member_call): For now, don't convert to
8746 intermediate base if it would cause an error.
8748 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
8750 * parse.y (namespace_qualifier, maybe_identifier,
8751 begin_explicit_instantiation, end_explicit_instantiation,
8752 apparent_template_type, .finish_template_type,
8753 do_id, maybe_init, defarg_again, component_decl_1):
8754 Add ending ';', in accordance with POSIX.
8756 2002-04-06 Mark Mitchell <mark@codesourcery.com>
8759 * class.c (layout_class_type): Remember incomplete static
8761 (finish_struct_1): Call complete_vars, not
8762 hack_incomplete_structures.
8763 * cp-tree.h (hack_incomplete_structures): Rename to ...
8764 (complete_vars): ... this.
8765 (struct saved_scope): Remove incomplete.
8766 (namespace_scope_incomplete): Remove.
8767 * decl.c (struct binding_level): Remove incomplete.
8768 (incomplete_vars): New variable.
8769 (mark_binding_level): Don't mark incomplete.
8770 (print_binding_level): Don't print it.
8771 (mark_saved_scope): Don't mark incomplete.
8772 (pushdecl): Use maybe_register_incopmlete_var.
8773 (cxx_init_decl_processing): Register incomplete_vars for GC.
8774 (start_decl_1): Clarify error message.
8775 (hack_incomplete_vars): Remove.
8776 (maybe_register_incomplete_var): New function.
8777 (complete_vars): Likewise.
8779 2002-04-06 Jason Merrill <jason@redhat.com>
8782 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8783 set before checking it.
8786 * init.c (build_member_call): Use build_scoped_ref.
8787 (resolve_offset_ref): Likewise.
8788 * call.c (build_scoped_method_call): Likewise.
8789 * tree.c (maybe_dummy_object): Kludge around current_class_type being
8791 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8792 * cp-tree.h: Adjust.
8794 * init.c (push_base_cleanups): Just use build_scoped_method_call.
8797 * method.c (implicitly_declare_fn): Pass unqualified type to
8798 synthesize_exception_spec.
8800 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8802 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8803 * cvt.c: Update comment.
8804 * init.c (expand_cleanup_for_base): Update.
8805 * semantics.c (finish_parenthesized_expr): Update.
8806 * typeck.c (cp_truthvalue_conversion): Update.
8808 2002-04-04 Jason Merrill <jason@redhat.com>
8810 * semantics.c (finish_eh_cleanup): New fn.
8811 * cp-tree.h: Add prototype.
8812 * init.c (perform_member_init, expand_cleanup_for_base): Use
8814 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8815 * cp-tree.h: Remove references.
8816 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8817 * dump.c (cp_dump_tree): Likewise.
8818 * pt.c (tsubst_expr): Likewise.
8819 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8820 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8821 * tree.c (cp_statement_code_p): Likewise.
8823 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8826 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8830 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8832 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8834 2002-04-03 Richard Henderson <rth@redhat.com>
8836 * cp-lang.c (cxx_warn_unused_global_decl): New.
8837 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8839 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
8841 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8842 * tree.c (init_tree): Don't set hook.
8844 2002-04-03 Roger Sayle <roger@eyesopen.com>
8847 * decl.c (duplicate_decls): Don't mess with assembler names when
8848 redeclaring builtin functions as static.
8850 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8852 * call.c (build_addr_func): Update.
8853 * class.c (resolve_address_of_overloaded_function): Update.
8854 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8855 * cp-tree.h (cxx_mark_addressable): New.
8856 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8857 * decl2.c (build_cleanup): Update.
8858 * except.c (build_throw): Update.
8859 * init.c (resolve_offset_ref): Update.
8860 * pt.c (convert_nontype_argument): Update.
8861 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8862 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8863 unary_complex_lvalue): Update.
8864 (mark_addressable): Rename.
8866 2002-04-01 Roger Sayle <roger@eyesopen.com>
8869 * decl.c (duplicate_decls): Overwrite the RTL when (and only
8870 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
8871 but follow the SET_DECL_RTL idiom used elsewhere in the function.
8873 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8875 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8876 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8877 * decl.c (grokdeclarator): Update.
8878 * mangle.c (write_integer_cst): Update.
8879 * typeck.c (build_binary_op): Update.
8881 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8883 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8884 * lex.c (cxx_init): Don't set hook.
8886 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8888 * Make-lang.in (error.o): Update.
8889 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8890 * cp-tree.h (struct diagnostic_context): Predeclare.
8891 (cxx_print_error_function): New.
8892 * error.c: Include langhooks-def.h.
8893 (lang_print_error_function): Rename. Update.
8894 (init_error): Don't set hook.
8896 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8898 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8900 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8901 * decl.c (finish_enum): Similarly.
8902 * error.c (dump_type): Similarly.
8903 * lex.c (cxx_init): Similarly.
8904 * mangle.c (write_builtin_type): Similarly.
8905 * typeck.c (comptypes): Similarly.
8907 2002-03-28 Roger Sayle <roger@eyesopen.com>
8910 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8911 in the g++ front-end.
8912 (duplicate_decl): Allow redefinition of anticipated built-ins.
8913 Fix inlining problem by over-writing the old DECL_RTL.
8914 (lookup_namespace_name): Fail to find an identifier in the
8915 specified namespace if its still anticipated.
8916 (builtin_function_1): New function split out from builtin_function
8917 to create a builtin in the current namespace with given context.
8918 (builtin_function): Call builtin_function_1 to define the
8919 appropriate builtins in both the std and global namespaces.
8920 (select_decl): Don't test for anticipated decls here.
8921 (unqualified_namespace_lookup): Instead ignore them whilst
8922 searching through scopes and namespaces.
8923 * decl2.c (do_nonmember_using_decl): If a using declaration
8924 specifies an anticipated built-in function, mark it as no longer
8925 anticipated in that scope.
8926 (ambiguous_decl): Avoid resolving to an anticipated decl.
8927 * lex.c (do_scoped_id): Fail to find an identifier in the global
8928 namespace if its still anticipated.
8930 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8932 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8933 * cp-tree.h (cp_make_lang_type): Rename.
8934 * lex.c (cp_make_lang_type): Rename.
8935 (make_aggr_type): Update.
8936 * tree.c (init_tree): Don't set make_lang_type_fn.
8938 2002-03-29 Jakub Jelinek <jakub@redhat.com>
8941 * class.c (finish_struct_1): Update static field's DECL_MODE even
8942 if its type is a variant of t.
8944 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8946 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8947 * cp-tree.h (cxx_insert_default_attributes): New.
8948 * decl.c (insert_default_attributes): Rename.
8950 2002-03-27 Mark Mitchell <mark@codesourcery.com>
8953 * call.c (build_op_delete_call): Allow for the fact the placement
8954 may be a COMPOUND_EXPR.
8956 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8958 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8959 * cp-tree.h (init_cplus_expand): Remove.
8960 (cxx_expand_expr): New.
8961 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8963 (init_cplus_expand): Remove.
8964 * lex.c (cxx_init): Don't call init_cplus_expand.
8966 2002-03-26 Mark Mitchell <mark@codesourcery.com>
8969 * init.c (build_new_1): Allow for the fact the result of
8970 build_function_call may be a COMPOUND_EXPR.
8972 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
8975 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8976 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8977 (dfs_skip_nonprimary_vbases_markedp): Remove.
8978 * search.c (get_shared_vbase_if_not_primary): Remove.
8979 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8980 (dfs_skip_nonprimary_vbases_markedp): Remove.
8981 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8982 (dfs_marked_real_bases_queue_p): Likewise.
8984 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8986 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8987 * cp-tree.h (cxx_mark_tree): New.
8988 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8990 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8992 * cp-tree.h (cxx_maybe_build_cleanup): New.
8993 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8994 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8995 * tree.c (build_target_expr): Update.
8996 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8998 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9000 * decl2.c (cxx_decode_option): Handle -E.
9001 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9002 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9004 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9007 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9009 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9011 * error.c (dump_type): Be careful about implicit typenames.
9013 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9016 * semantics.c (finish_base_specifier): Handle erronous base
9019 2002-03-22 Zack Weinberg <zack@codesourcery.com>
9021 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9024 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
9026 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9027 an index into the vtable_entry array regardless of
9028 TARGET_PTRMEMFUNC_VBIT_LOCATION.
9030 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
9032 * tree.c (cp_cannot_inline_tree_fn): Same.
9034 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9036 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9037 insert_block, getdecls, global_bindings_p): New.
9039 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
9042 * mangle.c (struct globals) Add internal_mangling_p member.
9043 (write_template_param): Do internal mangling, if needed.
9044 (mangle_conv_op_name_for_type): Request internal mangling.
9046 2002-03-20 Jason Merrill <jason@redhat.com>
9049 * init.c (build_delete): Check access for a member op delete here.
9050 * decl2.c (delete_sanity): Not here.
9052 2002-03-19 Jason Merrill <jason@redhat.com>
9055 * class.c (get_vfield_name): Use the constructor_name.
9057 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9059 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9060 * cp-tree.h (lang_printable_name): Rename.
9061 * error.c (lang_decl_name): Use new hook.
9062 * lex.c (cxx_init): Remove old hook.
9063 * pt.c (tsubst_decl): Use new hook.
9064 * tree.c (lang_printable_name): Rename.
9066 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
9069 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9070 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9071 only after recording the declaration.
9073 2002-03-18 Jason Merrill <jason@redhat.com>
9076 * init.c (resolve_offset_ref): Hand off to build_component_ref.
9078 PR c++/4222, c++/5995
9079 * call.c (build_over_call): Fix empty class logic.
9082 * cp-tree.h (struct saved_scope): Add last_parms field.
9083 * decl.c (maybe_push_to_top_level): Save last_function_parms.
9084 (pop_from_top_level): Restore it.
9087 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
9091 * pt.c (tsubst_friend_function): Use decl_namespace_context.
9093 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9094 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9095 type with a nontrivial destructor.
9097 2002-03-17 Jason Merrill <jason@redhat.com>
9100 * class.c (build_base_path): Virtual base layout is fixed in
9103 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9105 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9106 * parse.y (yyparse): Remove macro.
9108 2002-03-17 Jason Merrill <jason@redhat.com>
9111 * init.c (build_new_1): Pass the right pointer to op delete.
9113 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
9116 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9117 conversion operators go.
9118 (struct lang_decl_flags): Add template_conv_p and unused
9120 (DECL_TEMPLATE_CONV_FN_P): New macro.
9121 * call.c (build_user_type_conversion_1): Don't check second type
9122 conversion of overload set first.
9123 * class.c (add_method): Make sure templated conversion operators
9124 all end up on slot 2.
9125 * lex.c (do_identifier): A conversion operator token might be
9126 satisfied by a templated conversion operator.
9127 * pt.c (check_explicit_specialization): Use
9128 CLASSTYPE_FIRST_CONVERSION_SLOT.
9129 (template_parm_this_level_p): New function.
9130 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9131 * search.c (lookup_fnfields_1): Template conversions will be on
9133 * typeck.c (build_component_ref): Preserve the type of an
9134 conversion operator name on the overload type.
9135 (build_x_function_call): Retrieve the conversion operator name.
9137 2002-03-15 Richard Henderson <rth@redhat.com>
9139 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9141 2002-03-15 Mark Mitchell <mark@codesourcery.com>
9143 * cp-tree.h (CLEANUP_DECL): Remove.
9144 (CLEANUP_EXPR): Likewise.
9145 * decl.c (destroy_local_var): Simplify.
9146 (maybe_build_cleanup): Tidy.
9147 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9148 * semantics.c (cp_expand_stmt): Likewise.
9149 * cp/tree.c (cp_statement_code_p): Likewise.
9151 2002-03-15 Jason Merrill <jason@redhat.com>
9154 * decl.c (duplicate_decls): Use merge_types instead of common_type.
9155 * typeck.c (common_type): Just hand off to
9156 type_after_usual_arithmetic_conversions and
9157 composite_pointer_type.
9158 (merge_types): New fn.
9159 (commonparms): Use it instead of common_type.
9160 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9161 (composite_pointer_type): Also handle attributes.
9162 * cp-tree.h: Declare merge_types.
9164 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9166 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9168 2002-03-14 Richard Henderson <rth@redhat.com>
9170 * decl.c: Include c-pragma.h.
9171 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9172 * Make-lang.in: Update dependencies.
9174 2002-03-14 Jakub Jelinek <jakub@redhat.com>
9177 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9178 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9180 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9182 * mangle.c (write_builtin_type): Handle 128-bit integers even if
9183 they are not a standard integer type.
9185 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9187 * cp-tree.h (init_init_processing): Remove declaration.
9188 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9189 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9191 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9193 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9195 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9197 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9198 cplus_tree_code_name): Delete.
9199 (cxx_init): Don't call add_c_tree_codes, instead set
9200 lang_unsafe_for_reeval. Don't try to copy into the various
9203 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
9206 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9207 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9210 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9212 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
9213 DR209 is now not a defect.
9214 * cp-tree.h (skip_type_access_control): Remove.
9215 * decl.c (grokdeclarator): Do type access control for friend
9217 * semantics.c (decl_type_access_control): Don't reset
9218 current_type_lookups.
9219 (save_type_access_control): Always save the lookups.
9220 (skip_type_access_control): Remove.
9221 (finish_class_definition): Don't change type_lookups.
9223 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9225 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
9227 * typeck.c (build_static_cast): Compare non-qualified types
9228 with pointer to member conversions.
9230 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
9231 Daniel Berlin <dan@dberlin.org>
9233 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9234 (cxx_get_alias_set): Use it.
9236 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9238 * cp-tree.h (stabilize_expr): Prototype.
9240 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
9242 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9243 conditional return void.
9245 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
9247 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9248 * cp-tree.h (cxx_unsave): New.
9249 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9250 (init_tree): Update.
9252 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9254 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9255 explicit sizeof/sizeof.
9256 * decl2.c (cxx_decode_option): Likewise.
9257 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9259 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
9262 * decl.c (lookup_tag): Only reject enum/class mismatch, not
9263 class/union mismatch.
9264 * parse.y (check_class_key): New function.
9265 (structsp): Call it.
9267 2002-03-01 Michael Matz <matz@suse.de>
9269 * typeck.c (cp_pointer_int_sum): Complete inner type which is
9270 used later by size_in_bytes().
9272 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
9274 * cp-tree.h: Require __GNUC__ to be #defined.
9275 (build_init): Add missing prototype.
9277 2002-03-01 Jason Merrill <jason@redhat.com>
9279 * except.c: Don't include decl.h or obstack.h. Do include
9281 (build_throw): Destroy temporaries from the thrown
9282 expression before calling __cxa_throw. Construct a thrown
9283 temporary directly into the exception object.
9284 (stabilize_throw_expr): New function.
9285 (wrap_cleanups_r): New function.
9286 * tree.c (stabilize_expr): New function.
9287 * init.c (build_init): New function.
9288 * Make-lang.in (cp/except.o): Adjust .h deps.
9290 2002-02-28 Jason Merrill <jason@redhat.com>
9292 * search.c (lookup_base_r): Don't clear is_non_public just because
9293 we found a friendly scope.
9295 * decl.c (finish_function): Only warn about missing return
9296 statement with -Wreturn-type.
9298 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9300 * class.c (build_clone): Update.
9301 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9302 * cp-tree.h (cxx_dup_lang_specific_decl): New.
9303 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9304 (copy_decl): Update.
9305 * method.c (make_thunk): Update.
9307 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9309 * decl2.c: Delete traditional-mode-related code copied from
9310 the C front end but not used, or used only to permit the
9313 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
9316 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9319 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9322 * semantics.c (finish_switch_cond): Don't call get_unwidened
9325 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
9328 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9330 (make_typename_type): Use tsubst_flags_t.
9331 * decl.c (make_typename_type): Adjust. Return non-artificial
9332 TYPE_DECLs, if required.
9333 (grokdeclarator): Simplify CVR qualification handling. Allow bad
9334 qualifiers on typedef types.
9335 * decl2.c (handle_class_head): Adjust make_typename_type call.
9336 * parse.y (nested_name_specifier): Likewise.
9337 (typename_sub0): Likewise.
9338 (typename_sub1): Likewise.
9339 * pt.c (convert_template_argument): Adjust make_typename_type
9341 (tsubst): Adjust cp_build_qualified_type_real calls.
9342 (check_cv_quals_for_unify): Cope with allowing bad qualifications
9343 on template type parms.
9344 (instantiate_decl): Recheck substitutions to give warnings on bad
9346 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9348 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
9350 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9352 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9353 unless DECL_ALWAYS_INLINE.
9355 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9357 * typeck.c (cp_pointer_int_sum): Renamed from
9358 pointer_int_sum, call pointer_int_sum.
9360 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9362 * decl.c (duplicate_decls): Return 0 if issued error about
9365 2002-02-19 Jason Merrill <jason@redhat.com>
9367 ABI change: Mangle `void (A::*)() const' as
9368 M1AKFvvE, not MK1AFvvE.
9369 * mangle.c (write_function_type): Write cv-quals for member
9371 (write_pointer_to_member_type): Not here.
9373 2002-02-18 Jason Merrill <jason@redhat.com>
9375 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9376 (do_decl_instantiation): Likewise.
9378 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
9381 * decl.c (duplicate_decls): Make warning unconditional
9382 if duplicate default argument declarations are present.
9384 2002-02-17 Jakub Jelinek <jakub@redhat.com>
9386 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9389 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
9391 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9392 remove incorrect comment. Move #if 0'd code to common path. Use
9393 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9395 2002-02-13 Jason Merrill <jason@redhat.com>
9397 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9398 (finish_function): Don't warn if current_function_returns_null.
9400 * typeck2.c (digest_init): Do handle values of vector type.
9402 * typeck2.c (digest_init, process_init_constructor): Treat vectors
9405 2002-02-11 Jason Merrill <jason@redhat.com>
9407 * parse.y (reserved_declspecs): Don't handle attributes.
9408 (reserved_typespecquals): Handle them here.
9409 * Make-lang.in (parse.c): Adjust expected conflicts.
9411 2002-02-08 Jakub Jelinek <jakub@redhat.com>
9413 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9414 instead of compstmt.
9415 (compstmt_or_stmtexpr): Renamed from compstmt.
9416 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9418 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9420 Rename instantiate_type_flags to tsubst_flags_t & expand use.
9421 * cp-tree.h (instantiate_type_flags): Rename to ...
9422 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9423 add tf_warning flag.
9424 (instantiate_type): Adjust prototype.
9425 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9426 do_type_instantiation, cp_build_qualified_type_real): Likewise.
9427 cp_build_qualified_type: Adjust.
9428 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9430 * call.c (standard_conversion): Rename itf_* to tf_*.
9431 (reference_binding): Likewise.
9432 (convert_like_real): Likewise.
9433 * cvt.c (cp_convert_to_pointer): Likewise.
9434 (convert_to_reference): Likewise.
9435 * decl.c (lookup_namespace_name): Use tf_* flags.
9436 (make_typename_type): Likewise.
9437 (grokdeclarator): Likewise.
9438 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9439 (coerce_template_template_parms, convert_template_argument,
9440 coerce_template_parms, maybe_get_template_decl_from_type_decl,
9441 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9442 instantiate_class_template, tsubst_template_arg_vector,
9443 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9444 tsubst_decl, tsubst_arg_types, tsubst_function_type,
9445 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9446 instantiate_template, fn_type_unification,
9447 resolve_overloaded_unification, verify_class_unification,
9448 unify, get_bindings_real, do_type_instantiation,
9449 regenerate_decl_from_template, instantiate_decl,
9450 tsubst_initializer_list, tsubst_enum,
9451 get_mostly_instantiated_function_type,
9452 invalid_nontype_parm_type_p): Likewise.
9453 * tree.c (cp_build_qualified_type_real): Likewise.
9454 * typeck.c (build_binary_op): Rename itf_* to tf_*.
9455 (build_ptrmemfunc): Likewise.
9456 (convert_for_assignment): Likewise.
9458 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9461 * decl.c (grokdeclarator): Allow friend declarations from
9463 * decl2.c (handle_class_head): Don't push into template parm contexts.
9464 * pt.c (push_template_decl_real): Template parm contexts are never
9467 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
9469 * class.c: Include target.h.
9470 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9471 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9473 * Make-lang.in: Adjust deps.
9475 2002-02-05 Jason Merrill <jason@redhat.com>
9477 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9479 2002-02-04 Jakub Jelinek <jakub@redhat.com>
9481 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9482 (finish_switch_cond): Set SWITCH_TYPE.
9484 2002-02-04 Richard Henderson <rth@redhat.com>
9486 * method.c (use_thunk): Always initialize the block tree. Reindent.
9487 * semantics.c (expand_body): Emit thunks after function, not before.
9489 2002-02-04 Jason Merrill <jason@redhat.com>
9491 * decl.c (start_function): Call cplus_decl_attributes immediately
9492 after grokdeclarator.
9494 * decl.c (start_function): Combine DECL_RESULT handling code.
9496 2002-02-03 Jason Merrill <jason@redhat.com>
9499 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9500 (cp/xref.o): Remove dependencies.
9501 * class.c (finish_struct_1, check_methods): Don't call xref fns.
9502 (finish_struct_1): Likewise.
9503 * friend.c (make_friend_class): Likewise.
9504 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9505 * spew.c (read_process_identifier): Likewise.
9507 2002-02-01 Jason Merrill <jason@redhat.com>
9510 * decl.c (finish_function): Warn about a non-void function with
9511 no return statement and no abnormal exit.
9512 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9513 (current_function_returns_abnormally): New macro.
9514 * call.c (build_call): Set it.
9516 * typeck.c (build_component_ref): Always complain about offsetof
9517 constructs on non-PODs. Only make it an error for members of
9520 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9521 (dump_function_decl): Always dump parms.
9523 * decl2.c (finish_static_data_member_decl): Complain about a local
9524 class with a static data member.
9527 * search.c (lookup_field_1): Don't xref a static data member
9528 just because we looked it up.
9530 2002-01-31 Jason Merrill <jason@redhat.com>
9532 * Make-lang.in (parse.c): Handle .output file.
9535 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9537 * semantics.c (finish_class_definition): Adjust.
9539 Allow attributes in parms and casts.
9540 * parse.y (named_parm): Don't strip attrs.
9541 (declmods): Remove 'attributes' production.
9542 (nonempty_cv_qualifiers): Accept attributes.
9543 (ATTRIBUTE): Give precedence.
9544 * decl.c (groktypename): Handle attributes.
9545 (grokparms): Likewise.
9547 2002-01-29 Jakub Jelinek <jakub@redhat.com>
9549 * decl2.c (cxx_decode_option): Pass 0 as last argument to
9551 * lang-specs.h: Use cpp_unique_options instead of cpp_options
9552 when used together with cc1_options.
9554 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
9557 * typeck2.c (digest_init): Make sure non-array core type is
9559 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9560 constructor, rather than build a new one.
9561 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9562 PURPOSE of constructor elts.
9564 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9566 * Make-lang.in (parse.c): Adjust expected number of
9567 shift-reduce conflicts.
9568 (decl.o): Depend on diagnostic.h.
9569 * decl.c: Include diagnostic.h.
9570 (grokdeclarator): Check for null pointer.
9571 (finish_function): Don't abort when
9572 current_binding_level->parm_flag != 1, if errors have
9573 occurred; throw away the statement tree and extra binding
9574 levels, and continue.
9575 * lex.c (note_list_got_semicolon): Check for null pointer.
9576 * method.c (hack_identifier): Just return error_mark_node if
9577 value is error_mark_node.
9578 * parse.y (primary: TYPEID(type_id)): No need to use
9579 TYPE_MAIN_VARIANT here.
9580 (handler_seq): Accept an empty list of catch clauses and
9581 generate a fake handler block to avoid later crashes.
9582 (ansi_raise_identifier): Accept the error token too.
9583 * semantics.c (begin_class_definition,
9584 finish_class_definition): Check for error_mark_node.
9586 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9588 * typeck2.c (friendly_abort): Delete definition.
9589 * cp-tree.h (friendly_abort): Don't prototype.
9590 (my_friendly_assert): Use fancy_abort.
9592 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9594 * cp-tree.h (my_friendly_abort): Remove.
9596 2002-01-23 Jakub Jelinek <jakub@redhat.com>
9598 * spew.c (pending_inlines, pending_inlines_tail,
9599 processing_these_inlines): Make static.
9600 (mark_pending_inlines): Remove static.
9601 (begin_parsing_inclass_inline): If in function, save pi
9602 for GC to cp_function_chain->unparsed_inlines instead.
9603 (process_next_inline): Likewise.
9604 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9605 (mark_pending_inlines): Add prototype.
9606 * decl.c (spew_debug): Remove unused extern.
9607 (mark_lang_function): Call mark_pending_inlines.
9609 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9611 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9612 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9613 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9614 Change my_fancy_abort() to abort().
9616 2002-01-23 Jason Merrill <jason@redhat.com>
9619 * class.c (fixed_type_or_null): Fix thinko.
9622 * init.c (resolve_offset_ref): Use build_indirect_ref.
9624 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9626 2002-01-22 Jason Merrill <jason@redhat.com>
9628 * parse.y (function_body): Suppress the block for the outermost
9630 * decl.c (pushdecl): Don't try to skip it.
9631 (begin_function_body): Keep the block we create, not the next one.
9632 * init.c (emit_base_init): Don't mess with keep_next_level.
9634 * class.c (build_base_path): Tweak formatting.
9636 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
9638 Fix regression introduced with patch for c++/775
9639 * parse.y (class_head_defn): Check for template specializations
9640 with a different class-key.
9642 2002-01-17 Jason Merrill <jason@redhat.com>
9644 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9645 (begin_function_body): Call them and keep_next_level.
9646 * init.c (emit_base_init): Call keep_next_level.
9647 * semantics.c (setup_vtbl_ptr): Lose.
9648 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9649 (vtbls_set_up_p): Lose.
9650 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9651 * method.c (do_build_copy_constructor): Likewise.
9652 (synthesize_method): Call finish_mem_initializers.
9653 * parse.y (nodecls): Likewise.
9655 * error.c (dump_type_suffix): Print the exception specs before
9657 (dump_function_decl): Here, too.
9659 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9661 2002-01-10 Ira Ruben <ira@apple.com>
9664 * decl.c (start_method): Handle attrlist.
9666 2002-01-10 Jakub Jelinek <jakub@redhat.com>
9668 * decl2.c (max_tinst_depth): Increase default limit to 500.
9670 2002-01-10 Graham Stott <grahams@redhat.com>
9672 * spew.c (YYCHAR): Uppercase macro parameter and add
9675 (NAME): Uppercase macro parameter.
9677 2002-01-09 Graham Stott <grahams@redhat.com>
9679 * decl.h (grokdeclarator): Wrap long line.
9681 * semantics.c (FINISH_COND): Uppercase macro paramaters and
9684 2002-01-08 Graham Stott <grahams@redhat.com>
9686 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9687 (PALLOC): Uppercase macro parameter and whitespace.
9688 (SALLOC): Uppercase macro parameter.
9689 (SFREE): Uppercase macros parameter, add parenthese and
9691 (STREQL): Uppercase macro parameter and whitespace.
9698 * call.c (convert_like): Add parenthesis and wrap.
9699 (convert_like_with_context): Likewise.
9700 (ICS_RANK): Whitespace.
9701 (NEED_TEMPORARY_P): Remove parenthesis.
9703 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9705 (VTT_MARKED_BINFO_P): Likewise.
9707 * decl.c (BINDING_LEVEL): Add parenthesis.
9708 (DEF_OPERATOR): Likewise.
9710 * mangle.c (MANGLE_TRACE): Add parenthesis.
9711 (MANGLE_TRACE_TREE): Likewise.
9712 (write_signed_number): Likewise.
9713 (write_unsigned_number): Likewise.
9715 * pt.c (ccat): Uppercase macro parameter.
9718 * search.c (SET_BINFO_ACCESS): Add parenthesis.
9720 2002-01-07 Jason Merrill <jason@redhat.com>
9722 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9726 * method.c (make_thunk): If !flag_weak, give the thunk the
9728 (use_thunk): Here, too.
9730 2002-01-07 Graham Stott <grahams@redhat.com>
9732 * error.c: Update copyright date.
9733 (print_scope_operator): Add parenthesis.
9734 (print_left_paren): Likewise.
9735 (print_right_paren): Likewise.
9736 (print_left_bracket): Likewise.
9737 (print_right_bracket): Likewise.
9738 (print_template_argument_list_start): Likewise.
9739 (print_template_argument_list_end): Likewise.
9740 (print_non_consecutive_character): Likewise.
9741 (print_tree_identifier): Likewise.
9742 (print_identifier): Likewise.
9743 (NEXT_CODE): Uppercase macro parameter.
9744 (ident_fndecl): Delete unused.
9745 (GLOBAL_THING): Likewise.
9747 2002-01-06 Graham Stott <grahams@redhat.com>
9749 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9750 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9751 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9752 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9753 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9754 (C_IS_RESERVED_WORD): Uppercase macro parameter.
9755 (C_RID_YYCODE) Likewise.
9756 (ptrmem_cst): Use rtx.
9757 (LOCAL_BINDING_P): Add whitespace.
9758 (INHERITED_VALUE_BINDING_P): Likewise.
9759 (BINDING_SCOPE): Wrap long line.
9760 (BINDING_HAS_LEVEL_P): Remove parenthesis.
9761 (BINDING_VALUE): Wrap long line.
9762 (BINDING_TYPE): Whitespace.
9763 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9764 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9765 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9766 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9767 (same_type_p): Uppercase macro parameters.
9768 (same_type_ignoring_top_level_qualifiers_p): Likewise.
9769 (OVL_FUNCTION): Wrap long line.
9770 (OVL_CHAIN): Whitespace.
9771 (OVL_CURRENT): Add parenthesis and whitespace.
9772 (OVL_NEXT): Whitespace.
9773 (OVL_USED): Likewise.
9774 (IDENTIFIER_TYPE_VALUE): Likewise.
9775 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9776 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9777 (LANG_ID_FIELD): Whitespace.
9778 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9779 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9780 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9781 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9782 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9783 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9784 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9785 (IDENTIFIER_VIRTUAL_P): Likewise.
9786 (IDENTIFIER_OPNAME_P): Likewise.
9787 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9788 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9789 (C_SET_EXP_ORIGINAL_CODE): Likewise.
9790 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9791 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9792 (IS_AGGR_TYPE): Uppercase macro parameter.
9793 (CLASS_TYPE_P): Likewise.
9794 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9795 (IS_AGGR_TYPE_2): Whitespace.
9796 (TAGGED_TYPE_P): Uppercase macro parameter.
9797 (TYPE_BUILT_IN): Whitespace.
9798 (TYPE_FOR_JAVA): Likewise.
9799 (FUNCTION_ARG_CHAIN): Remove parenthesis.
9800 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9801 (FUNCTION_FIRST_USER_PARAM): Likewise.
9802 (PROMOTES_TO_AGGR_TYPE): Whitespace.
9803 (DERIVED_FROM_P): Add parenthesis and wrap.
9804 (UNIQUELY_DERIVED_FROM_P): Likewise.
9805 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9806 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9807 (CLASSTYPE_USE_TEMPLATE): Whitespace.
9808 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9809 (TYPE_GETS_DELETE): Add parenthesis.
9810 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9811 (TYPE_HAS_ASSIGN_REF): Likewise,
9812 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9813 (TYPE_HAS_INIT_REF): Likewise.
9814 (TYPE_HAS_CONST_INIT_REF): Likewise.
9815 (TYPE_BEING_DEFINED): Likewise.
9816 (TYPE_LANG_SPECIFIC): Likewise.
9817 (CLASSTYPE_RTTI): Likewise.
9818 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9819 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9820 (TYPE_OVERLOADS_ARROW): Likewise.
9821 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9822 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9823 (CLASSTYPE_METHOD_VEC): Likewise.
9824 (CLASSTYPE_MARKED_N): Likewise.
9825 (CLASSTYPE_MARKED): Likewise.
9826 (CLASSTYPE_MARKED2): Likewise.
9827 (CLASSTYPE_MARKED3): Likewise.
9828 (CLASSTYPE_MARKED4): Likewise.
9829 (CLASSTYPE_MARKED5): Likewise.
9830 (CLASSTYPE_MARKED6): Likewise.
9831 (SET_CLASSTYPE_MARKED): Whitespace.
9832 (CLEAR_CLASSTYPE_MARKED): Likewise.
9833 (SET_CLASSTYPE_MARKED2): Likewise.
9834 (CLEAR_CLASSTYPE_MARKED2): Likewise.
9835 (SET_CLASSTYPE_MARKED3): Likewise.
9836 (CLEAR_CLASSTYPE_MARKED3): Likewise.
9837 (SET_CLASSTYPE_MARKED4): Likewise.
9838 (CLEAR_CLASSTYPE_MARKED4): Likewise.
9839 (SET_CLASSTYPE_MARKED5): Likewise.
9840 (CLEAR_CLASSTYPE_MARKED5): Likewise.
9841 (SET_CLASSTYPE_MARKED6): Likewise.
9842 (CLEAR_CLASSTYPE_MARKED6): Likewise.
9843 (CLASSTYPE_TAGS): Likewise.
9844 (CLASSTYPE_VSIZE): Likewise.
9845 (CLASSTYPE_VBASECLASSES): Likewise.
9846 (CANONICAL_BINFO): Add parenthesis.
9847 (CLASSTYPE_SIZE(NODE): Likewise.
9848 (CLASSTYPE_SIZE_UNIT): Likewise.
9849 (CLASSTYPE_ALIGN(NODE): Likewise.
9850 (CLASSTYPE_USER_ALIGN): Likewise.
9851 (TYPE_JAVA_INTERFACE): Likewise.
9852 (CLASSTYPE_PURE_VIRTUALS): Likewise.
9853 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9854 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9855 (CLASSTYPE_HAS_MUTABLE): Likewise.
9856 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9857 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9858 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9859 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9860 (CLASSTYPE_INTERFACE_ONLY): Likewise.
9861 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9862 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9863 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9864 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9865 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9866 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9867 (BINFO_UNSHARED_MARKED): Whitespace.
9868 (BINFO_MARKED): Whitespace and wrap.
9869 (SET_BINFO_MARKED): Likewise.
9870 (CLEAR_BINFO_MARKED): Likewise.
9871 (BINFO_VTABLE_PATH_MARKED): Likewise.
9872 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9873 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9874 (BINFO_SUBVTT_INDEX): Remove parenthesis.
9875 (BINFO_VPTR_INDEX): Likewise.
9876 (BINFO_PRIMARY_BASE_OF): Likewise,
9877 (CLASSTYPE_VFIELDS): Whitespace.
9878 (VF_DERIVED_VALUE): Wrap long line.
9879 (NAMESPACE_LEVEL): Whitespace.
9880 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9881 (DEFARG_POINTER): Whitespace.
9882 (DECL_NEEDED_P): Remove parenthesis.
9883 (DECL_LANGUAGE): Whitespace.
9884 (SET_DECL_LANGUAGE): Add parenthesis.
9885 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9886 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9887 (DECL_IN_AGGR_P): Whitespace.
9888 (DECL_FRIEND_P): Likewise.
9889 (DECL_BEFRIENDING_CLASSES): Likewise.
9890 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9891 (DECL_NONCONVERTING_P): Whitespace.
9892 (DECL_PURE_VIRTUAL_P): Likewise.
9893 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9894 (DECL_PENDING_INLINE_INFO): Whitespace.
9895 (DECL_SORTED_FIELDS): Likewise.
9896 (DECL_DEFERRED_FN): Likewise.
9897 (DECL_TEMPLATE_INFO): Likewise.
9898 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9899 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9900 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9901 (TMPL_ARGS_LEVEL): Likewise.
9902 (SET_TMPL_ARGS_LEVEL): Likewise.
9903 (INNERMOST_TEMPLATE_PARMS): Whitespace.
9904 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9905 (INTEGRAL_CODE_P(CODE): Add parenthesis.
9906 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9907 (TYPE_HAS_CONSTRUCTOR): Whitespace.
9908 (TREE_HAS_CONSTRUCTOR): Likewise.
9909 (TYPE_HAS_DESTRUCTOR): Likewise.
9910 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9911 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9912 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9913 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9914 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9915 (TYPE_PTRMEMFUNC_P): Likewise.
9916 (TYPE_PTRMEMFUNC_FLAG): Likewise.
9917 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9918 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9919 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9920 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9921 (DECL_ACCESS): Whitespace.
9922 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9923 (DECL_GLOBAL_DTOR_P): Likewise.
9924 (GLOBAL_INIT_PRIORITY): Likewise.
9925 (DECL_TEMPLATE_PARMS): Likewise.
9926 (DECL_TEMPLATE_RESULT): Likewise.
9927 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9928 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9929 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9930 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9931 (PRIMARY_TEMPLATE_P): Add parenthesis.
9932 (DECL_USE_TEMPLATE): Whitespace.
9933 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9934 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9935 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9936 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9937 (CALL_DECLARATOR_PARMS): Remove parenthesis.
9938 (CALL_DECLARATOR_QUALS): Likewise.
9939 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9940 (TEMP_NAME_P): Wrap.
9941 (VFIELD_NAME_P): Likewise.
9942 (B_SET): Uppercase macro parameters and add parenthesis.
9945 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9946 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9947 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9948 (same_or_base_type_p): Likewise.
9949 (cp_deprecated): Likewise.
9951 2002-01-05 Richard Henderson <rth@redhat.com>
9953 * semantics.c (expand_body): Revert last change.
9955 2002-01-04 Jason Merrill <jason@redhat.com>
9958 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9961 * class.c (build_vtbl_initializer): Check for a lost primary
9962 before calculating the vtable entry to throw away.
9964 2002-01-02 Jason Merrill <jason@redhat.com>
9966 * semantics.c (expand_body): Call outlining_inline_function when
9967 emitting an inline function out of line.
9969 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9971 PR c++/5116, c++/764 reversion
9972 * call.c (build_new_op): Revert the instantiations. They are
9975 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9978 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9980 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9983 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9984 (tsubst, case POINTER_TYPE): Handle pmfs here.
9985 (tsubst, case OFFSET_TYPE): Check it is not an offset to
9986 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9988 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9991 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9992 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9993 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9995 (tsubst_template_parms): Break up loop statements.
9996 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9997 parm PARM_DECLs don't get promoted.
9999 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10002 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10003 (build_x_function_call): Cope with a COMPONENT_REF containing a
10006 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10009 * pt.c (convert_template_argument): Be more careful determining
10010 when RECORD_TYPE templates are or are not templates.
10012 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10015 * cp-tree.h (handle_class_head): Adjust prototype.
10016 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10017 parameters. Use for all class heads.
10018 * parse.y (named_class_head_sans_basetype, named_class_head,
10019 named_complex_class_head_sans_basetype,
10020 named_class_head_sans_basetype_defn,
10021 unnamed_class_head): Remove.
10022 (class_head, class_head_apparent_template): Recognize class heads
10023 (class_head_decl, class_head_defn): New reductions. Process class
10025 (structsp): Adjust class definition and class declaration
10027 (maybe_base_class_list): Give diagnostic on empty list.
10029 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10032 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10033 single non-static member.
10034 (unary_complex_lvalue): If it cannot be a pointer to member, don't
10035 make it so. Check it is not pointer to reference.
10037 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10040 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10041 are processing a template decl.
10043 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10045 PR c++/5116, c++/764
10046 * call.c (build_new_op): Make sure template class operands are
10047 instantiated. Simplify arglist construction.
10049 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10051 * call.c (build_user_type_conversion_1): Use my_friendly_assert
10052 rather than if ... abort.
10053 * cvt.c (convert_to_reference): Likewise.
10054 * semantics.c (setup_vtbl_ptr): Likewise.
10055 * pt.c (lookup_template_class): Comment typo.
10057 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10060 * pt.c (push_template_decl_real): Make sure DECL has
10061 DECL_LANG_SPECIFIC.
10063 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10066 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10067 for non-reference fields.
10068 * typeck.c (require_complete_type): Use resolve_offset_ref).
10070 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
10073 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10075 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
10078 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10079 up. Don't stabilize_references when initializing a reference.
10081 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10083 * decl2.c (lang_f_options): Const-ify.
10085 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10087 * config-lang.in (diff_excludes): Remove.
10089 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
10092 * typeck.c (build_function_call_real): Use original function
10093 expression for errors.
10095 2001-12-18 Jason Merrill <jason@redhat.com>
10098 * class.c (add_method): Do compare 'this' quals when trying to match a
10099 used function. Don't defer to another used function.
10101 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10103 * pt.c (instantiate_clone): Remove, fold into ...
10104 (instantiate_template): ... here. Simplify by removing mutual
10106 * typeck2.c (build_m_component_ref): Don't cv qualify the function
10107 pointed to by a pointer to function.
10108 * class.c (delete_duplicate_fields_1): Typo.
10110 2001-12-18 Jason Merrill <jason@redhat.com>
10112 C++ ABI change: destroy value arguments in caller.
10113 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10114 create an extra binding level for the parameters.
10115 * decl.c (store_parm_decls): Don't do parameter cleanups.
10117 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10119 * call.c (build_new_method_call): Use '%#V'.
10120 * error.c (cv_to_string): Use V parameter to determine padding.
10122 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
10124 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10125 spellings in messages.
10127 2001-12-17 Zack Weinberg <zack@codesourcery.com>
10129 * cp-tree.h: Delete #defines for cp_error, cp_warning,
10130 cp_pedwarn, and cp_compiler_error.
10131 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10132 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10133 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10134 typeck2.c: Change calls to the above macros to use their
10135 language-independent equivalents: error, warning, pedwarn, and
10136 internal_error respectively.
10138 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
10140 * decl2.c (finish_file): Remove back_end_hook.
10142 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10144 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10145 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10146 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10148 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
10150 * lang-options.h: Use American spelling in messages.
10152 2001-12-13 Jason Merrill <jason@redhat.com>
10154 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10156 Use cleanups to run base and member destructors.
10157 * init.c (push_base_cleanups): New function, split out from...
10158 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
10159 * decl.c (finish_destructor_body): Move vbase destruction code to
10160 push_base_cleanups.
10161 (begin_function_body, finish_function_body): New fns.
10162 (finish_function): Move [cd]tor handling and call_poplevel to
10163 finish_function_body.
10164 (pushdecl): Skip the new level.
10165 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10166 (setup_vtbl_ptr): Call push_base_cleanups.
10167 * method.c (synthesize_method): Call {begin,end}_function_body.
10168 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10169 * cp-tree.h: Declare new fns.
10170 * parse.y (function_body, .begin_function_body): New nonterminals.
10171 (fndef, pending_inline, function_try_block): Use function_body.
10172 (ctor_initializer_opt, function_try_block): No longer has a value.
10173 (base_init): Remove .set_base_init token.
10174 (.set_base_init, compstmt_or_error): Remove.
10175 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10177 * optimize.c (maybe_clone_body): Fix parameter updating.
10179 2001-12-12 Jason Merrill <jason@redhat.com>
10181 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10182 * semantics.c (genrtl_start_function): Don't pass
10183 parms_have_cleanups or push an extra binding level.
10184 (genrtl_finish_function): Lose cleanup_label cruft.
10186 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10187 (ctor_label): Remove.
10188 * semantics.c (finish_return_stmt): Lose ctor_label support.
10189 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10190 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10193 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10194 check for [cd]tors.
10195 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10197 * decl.c (finish_function): Check VMS_TARGET, not VMS.
10199 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10200 (end_cleanup_fn): And poplevel.
10202 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10203 if we're in a template.
10205 2001-12-12 Jakub Jelinek <jakub@redhat.com>
10207 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10208 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10209 THIS_NAME_P): Delete.
10210 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10211 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10212 with internal naming scheme.
10213 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10215 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
10217 * decl.c (grokdeclarator): Deprecated implicit typename use.
10219 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
10222 * parse.y (frob_specs): Indicate it is a language linkage which
10223 contained the extern.
10224 * decl.c (grokdeclarator): Allow extern language linkage with
10227 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
10230 * decl.c (add_binding): Don't reject duplicate typedefs involving
10231 template parameters.
10233 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
10235 * parse.y, semantics.c: Similarly.
10237 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
10240 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10241 (copy_args_p): Rename to ...
10242 (copy_fn_p): ... here.
10243 (grok_special_member_properties): New function.
10244 (grok_op_properties): Lose VIRTUALP parameter.
10245 (copy_assignment_arg_p): Remove.
10246 * call.c (build_over_call): Use copy_fn_p.
10247 * decl.c (grokfndecl): Reformat. Adjust call to
10248 grok_op_properties.
10249 (copy_args_p): Rename to ...
10250 (copy_fn_p): ... here. Reject template functions. Check for pass
10252 (grok_special_member_properties): Remember special functions.
10253 (grok_ctor_properties): Don't remember them here, just check.
10254 (grok_op_properties): Likewise.
10255 (start_method): Call grok_special_member_properties.
10256 * decl2.c (grokfield): Likewise.
10257 (copy_assignment_arg_p): Remove.
10258 (grok_function_init): Don't remember abstract assignment here.
10259 * pt.c (instantiate_class_template): Call
10260 grok_special_member_properties.
10261 (tsubst_decl): Adjust grok_op_properties call.
10263 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
10265 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10266 RID_TYPES_COMPATIBLE_P.
10268 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10270 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10271 call to build_aggr_init.
10272 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10274 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
10276 * parse.y: Replace uses of the string non-terminal with STRING.
10277 Don't perform string concatentaion here.
10278 (string): Remove non-terminal.
10279 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10281 2001-12-05 Jason Merrill <jason@redhat.com>
10283 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10284 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10285 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10286 * pt.c (push_tinst_level): No longer static.
10287 * cp-tree.h: Declare them.
10289 * init.c (resolve_offset_ref): Don't check access for the base
10290 conversion to access a FIELD_DECL.
10292 * cp-tree.h (TYPE_REFFN_P): New macro.
10293 * decl.c (bad_specifiers): Check it, too.
10295 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10296 on the __*_type_info type if we haven't seen a definition.
10298 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
10300 * decl.c: Include c-common.h.
10301 (shadow_warning): Move to c-common.c.
10303 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10305 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10307 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10309 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10311 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10314 * init.c (sort_base_init): Allow binfos to be directly specified.
10315 * method.c (do_build_copy_constructor): Explicitly convert to the
10317 (do_build_assign_ref): Likewise.
10319 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
10321 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10322 declaration and initialization.
10324 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10326 * typeck2.c: Remove leading capital from diagnostic messages, as
10327 per GNU coding standards.
10329 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
10332 * decl.c (xref_basetypes): Handle attributes between
10335 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
10338 * parse.y (named_complex_class_head_sans_basetype): Add new
10340 * Make-lang.in (parse.c): Adjust expected conflict count.
10342 2001-12-03 Jason Merrill <jason@redhat.com>
10344 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10345 immediate binfos for our virtual bases.
10347 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
10349 * call.c (build_java_interface_fn_ref): Similarly.
10350 * except.c (is_admissible_throw_operand): Similarly.
10351 * init.c (build_java_class_ref): Similarly.
10352 * xref.c (open_xref_file): Similarly.
10354 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10356 * class.c (finish_struct): Remove trailing periods from messages.
10357 * decl.c (check_tag_decl): Similarly.
10358 * lex.c (cxx_set_yydebug): Similarly.
10359 * typeck2.c (friendly_abort): Similarly.
10361 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10364 * cp-tree.h (ovl_member): Remove.
10365 * decl2.c (merge_functions): Handle extern "C" functions
10367 * tree.c (ovl_member): Remove.
10369 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10372 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10373 FUNCTION_DECL, as input.
10374 (mark_overriders): Remove.
10375 (warn_hidden): Rework for the new ABI.
10377 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10380 * call.c (convert_like_real): Do not build additional temporaries
10381 for rvalues of class type.
10383 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
10385 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10386 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10387 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10388 (DERIVED_FROM_P): Likewise.
10389 (enum base_access): Renumber, add ba_quiet bit mask.
10390 (get_binfo): Remove.
10391 (get_base_distance): Remove.
10392 (binfo_value): Remove.
10393 (ACCESSIBLY_DERIVED_FROM_P): Remove.
10394 * call.c (standard_conversion): Use lookup_base.
10395 * class.c (strictly_overrides): Likewise.
10396 (layout_virtual_bases): Likewise.
10397 (warn_about_ambiguous_direct_bases): Likewise.
10398 (is_base_of_enclosing_class): Likewise.
10399 (add_vcall_offset_vtbl_entries_1): Likewise.
10400 * cvt.c (build_up_reference): Adjust comment.
10401 * init.c (build_member_call): Reformat.
10402 * search.c (get_binfo): Remove.
10403 (get_base_distance_recursive): Remove.
10404 (get_base_distance): Remove.
10405 (lookup_base_r): Tweak.
10406 (lookup_base): Add ba_quiet control. Complete the types here.
10407 (covariant_return_p): Use lookup_base.
10408 * tree.c (binfo_value): Remove.
10409 (maybe_dummy_object): Use lookup_base.
10410 * typeck.c (build_static_cast): Use lookup_base.
10411 (get_delta_difference): Likewise.
10412 * typeck2.c (binfo_or_else): Use lookup_base.
10413 (build_scoped_ref): Add back error_mark_check.
10414 (build_m_component_ref): Use lookup_base.
10416 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10418 * Make-lang.in (c++.generated-manpages): New dummy target.
10420 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10422 * Make-lang.in (cp-lang.o): Depends on c-common.h.
10423 * cp-lang.c (c-common.h): Include.
10424 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10425 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10426 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10428 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
10430 * decl2.c (c_language): Move to c-common.c.
10431 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10433 (cxx_init): Update.
10435 2001-11-26 Jason Merrill <jason@redhat.com>
10437 * call.c (joust): Remove COND_EXPR hack.
10439 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
10441 * search.c (lookup_base_r): Declare bk in variable declaration
10444 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
10447 * class.c (build_vbase_pointer): Remove.
10448 (build_vbase_path): Remove.
10449 (build_base_path): New function.
10450 * cp-tree.h (base_access, base_kind): New enumerations.
10451 (build_base_path): Declare.
10452 (convert_pointer_to_real): Remove.
10453 (convert_pointer_to): Remove.
10454 (lookup_base): Declare.
10455 (convert_pointer_to_vbase): Remove.
10456 * call.c (build_scoped_method_call): Use lookup_base &
10457 build_base_path instead of convert_pointer_to_real,
10458 get_base_distance & get_binfo.
10459 (build_over_call): Likewise.
10460 * cvt.c (cp_convert_to_pointer): Likewise.
10461 (convert_to_pointer_force): Likewise.
10462 (build_up_reference): Likewise.
10463 (convert_pointer_to_real): Remove.
10464 (convert_pointer_to): Remove.
10465 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10466 instead of convert_pointer_to_vbase & build_vbase_path.
10467 (emit_base_init): Use build_base_path instead of
10468 convert_pointer_to_real.
10469 (expand_virtual_init): Lose unrequired conversions.
10470 (resolve_offset_ref): Use lookup_base and build_base_path
10471 instead of convert_pointer_to.
10472 * rtti.c (build_dynamic_cast_1): Use lookup_base &
10473 build_base_path instead of get_base_distance & build_vbase_path.
10474 * search.c (get_vbase_1): Remove.
10475 (get_vbase): Remove.
10476 (convert_pointer_to_vbase): Remove.
10477 (lookup_base_r): New function.
10478 (lookup_base): New function.
10479 * typeck.c (require_complete_type): Use lookup_base &
10480 build_base_path instead of convert_pointer_to.
10481 (build_component_ref): Likewise.
10482 (build_x_function_call): Likewise.
10483 (get_member_function_from_ptrfunc): Likewise.
10484 (build_component_addr): Likewise.
10485 * typeck2.c (build_scoped_ref): Likewise.
10487 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10489 * cp-tree.h (CP_TYPE_QUALS): Removed.
10490 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10491 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10492 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10493 * dump.c (cp_dump_tree): Use void* dump_info argument to match
10494 lang-hooks prototype.
10495 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10496 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10497 CP_TYPE_QUALS changed to cp_type_quals.
10498 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10499 (CXX_C_OBJS): Remove c-dump.o.
10501 2001-11-21 Mark Mitchell <mark@codesourcery.com>
10504 * pt.c (lookup_template_class): Ensure that all specializations
10505 are registered on the list corresponding to the most general
10508 2001-11-20 Mark Mitchell <mark@codesourcery.com>
10510 * call.c (non_reference): Add documentation.
10511 (convert_class_to_reference): Do not strip reference types
10512 from conversion operators.
10513 (maybe_handle_ref_bind): Simplify.
10514 (compare_ics): Correct handling of references.
10516 2001-11-19 John Wilkinson <johnw@research.att.com>
10518 * dump.c (dump_op): New function.
10519 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
10520 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10521 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10523 2001-11-19 Mark Mitchell <mark@codesourcery.com>
10526 * semantics.c (finish_sizeof): Make sure that expression created
10527 while processing a template do not have a type.
10528 (finish_alignof): Likewise.
10529 * typeck.c (c_sizeof): Likewise.
10530 (expr_sizeof): Likewise.
10532 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10534 * lex.c (cxx_finish): Call c_common_finish.
10535 (finish_parse): Remove.
10537 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10539 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10540 when displaying error message about missing array bounds.
10542 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10544 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10546 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10548 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
10550 * cp-tree.h (print_class_statistics): Restore.
10552 2001-11-15 Jason Merrill <jason@redhat.com>
10554 * method.c (use_thunk): Don't emit debugging information for thunks.
10556 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10557 * decl.c (make_typename_type): Handle getting a class template.
10558 * search.c (lookup_field_r): A class template is good enough for
10561 * call.c (convert_like_real): Only use cp_convert for the bad part.
10562 (standard_conversion): Also allow bad int->enum.
10563 * typeck.c (ptr_reasonably_similar): Also allow functions to
10564 interconvert. Pointers to same-size integers are reasonably
10567 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10570 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
10573 * init.c (sort_base_init): Remove unreachable code.
10574 (expand_member_init): Adjust comment to reflect reality. Simplify
10575 and remove unreachable code.
10577 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10579 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10580 (cxx_init): Update prototype.
10581 * decl.c (init_decl_processing): Rename. Move null node init
10582 to its creation time.
10583 * lex.c (cxx_init_options): Update.
10584 (cxx_init): Combine with old init_parse; also call
10585 cxx_init_decl_processing.
10587 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
10589 * decl.c (check_initializer): Try to complete the type of an
10590 array element before checking whether it's complete. Don't
10591 complain about arrays with complete element types but an
10593 (cp_finish_decl): Build the hierarchical constructor before
10594 calling maybe_deduce_size_from_array_init.
10596 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
10598 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10600 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
10603 * parse.y (already_scoped_stmt): Remove.
10604 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10606 2001-11-12 H.J. Lu <hjl@gnu.org>
10608 * cvt.c (ocp_convert): Don't warn the address of a weak
10609 function is always `true'.
10611 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10613 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10614 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10615 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10616 * cp-tree.h (print_class_statistics): Remove.
10617 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10618 cxx_print_identifier, cxx_set_yydebug): New.
10619 * lex.c (set_yydebug): Rename c_set_yydebug.
10620 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10621 lang_print_xnode): Rename.
10622 * tree.c (print_lang_statistics): Rename.
10624 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10626 * class.c (dump_array): Fix format specifier warning.
10628 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10630 * cp-lang.c (LANG_HOOKS_NAME): Override.
10631 (struct lang_hooks): Constify.
10632 * lex.c (cxx_init_options): Update.
10633 (lang_identify): Remove.
10634 * parse.y (language_string): Remove.
10636 2001-11-08 Andreas Franck <afranck@gmx.de>
10638 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10639 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10640 suggested by autoconf.
10641 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10642 (c++.install-common): Use the transformed target alias names.
10644 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10646 * Make-lang.in: Update.
10647 * cp-lang.c: Include langhooks-def.h.
10649 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10651 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10653 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10655 * lex.c (copy_lang_type): Add static prototype.
10657 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10659 * pt.c (unify): Handle SCOPE_REF.
10661 2001-11-01 Jakub Jelinek <jakub@redhat.com>
10663 * tree.c (cp_copy_res_decl_for_inlining): Adjust
10664 DECL_ABSTRACT_ORIGIN for the return variable.
10666 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10668 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10670 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
10672 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10673 semantics.c, spew.c: Fix spelling errors.
10675 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10677 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10679 2001-10-25 Zack Weinberg <zack@codesourcery.com>
10681 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10684 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10686 * cp-lang.c (cxx_get_alias_set): New function.
10687 Point LANG_HOOKS_GET_ALIAS_SET to it.
10689 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10691 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10692 * cp-tree.h (make_unbound_class_template): Prototype new function.
10693 * decl.c (make_unbound_class_template): New function.
10694 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10695 * error.c (dump_type): Likewise.
10696 * mangle.c (write_type): Likewise.
10697 * parse.y (template_parm): Likewise.
10698 (template_argument): Use make_unbound_class_template.
10699 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10700 (tsubst): Likewise.
10701 (tsubst_copy): Likewise.
10703 * tree.c (walk_tree): Likewise.
10704 * typeck.c (comptypes): Likewise.
10706 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10708 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10709 extra calls into fewer ones.
10711 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
10713 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10714 Warn when merging inline with attribute noinline.
10715 (start_decl, start_function): Warn if inline and attribute
10716 noinline appear in the same declaration.
10718 2001-10-16 H.J. Lu <hjl@gnu.org>
10720 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10721 for tree checking disabled.
10723 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
10725 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10726 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10728 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10730 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10731 (unify): Only handle MINUS_EXPR specially if the above flag is set
10732 and the subtracted constant is 1. Clear the flag on recursive calls.
10733 Set it when unifying the maximum value in an INTEGER_TYPE's range.
10735 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10737 * decl.c (bad_specifiers): Don't allow exception specifications
10740 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
10742 * cp/lex.c (init_cp_pragma): Similarly.
10744 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10746 * pt.c (lookup_template_class): Build complete template arguments
10747 for BOUND_TEMPLATE_TEMPLATE_PARM.
10749 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10751 * cp-tree.h (TYPE_BINFO): Update comment.
10752 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10753 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10754 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10755 (copy_type): Prototype new function.
10756 * lex.c (copy_lang_decl): Gather tree node statistics.
10757 (copy_lang_type): New function.
10758 (copy_type): Likewise.
10759 (cp_make_lang_type): Create lang_type for
10760 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
10761 and BOUND_TEMPLATE_TEMPLATE_PARM.
10762 * pt.c (tsubst): Use copy_type instead of copy_node.
10763 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10765 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10767 * pt.c (determine_specialization): Ignore functions without
10768 DECL_TEMPLATE_INFO.
10770 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
10773 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10775 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
10777 * typeck2.c (store_init_value): Don't re-digest a bracketed
10780 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10783 2001-10-11 Richard Henderson <rth@redhat.com>
10785 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10786 of an asm statement.
10787 (build_vtbl_ref_1): Split out from build_vtbl_ref.
10788 (build_vfn_ref): Use it to handle vtable descriptors before
10789 calling build_vtable_entry_ref.
10790 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10792 2001-10-10 Richard Henderson <rth@redhat.com>
10794 * parse.y (asm_operand): Allow named operands.
10795 * semantics.c (finish_asm_stmt): Tweek for changed location
10796 of the operand constraint.
10798 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
10800 * call.c (standard_conversion): Add bad conversion between
10801 integers and pointers.
10802 (convert_like_real): Don't use convert_for_initialization for bad
10803 conversions; complain here and use cp_convert.
10804 (build_over_call): Don't handle bad conversions specially.
10805 (perform_implicit_conversion): Allow bad conversions.
10806 (can_convert_arg_bad): New fn.
10807 * cp-tree.h: Declare it.
10808 * typeck.c (convert_for_assignment): Use it.
10809 (ptr_reasonably_similar): Any target type is similar to void.
10811 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
10813 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10814 (cp/cp-lang.o): New rule.
10815 * cp-tree.h: Declare hooks.
10816 * tree.c: Make hooks non-static.
10817 (init_tree): Don't initialize hooks here.
10818 * lex.c: Likewise. Move definition of lang_hooks to...
10819 * cp-lang.c: ... new file.
10821 2001-10-08 Richard Henderson <rth@redhat.com>
10823 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10824 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10826 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10828 * class.c (build_vtable_entry_ref): Const-ify.
10829 * decl.c (predefined_identifier,
10830 initialize_predefined_identifiers): Likewise.
10831 * init.c (build_new_1): Likewise.
10832 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10835 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
10837 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10838 (INSNS_PER_STMT): Likewise.
10839 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10840 (copy_body, initialize_inlined_parameters): Likewise.
10841 (declare_return_variable, inlinable_function_p): Likewise.
10842 (expand_call_inline, expand_calls_inline): Likewise.
10843 (optimize_inline_calls, clone_body): Likewise.
10844 * tree.c (walk_tree): Moved to ../tree-inline.c.
10845 (walk_tree_without_duplicates): Likewise.
10846 (copy_tree_r, remap_save_expr): Likewise.
10848 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
10850 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10851 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10852 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10853 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10854 (flag_inline_trees): Moved declaration to ../tree-inline.h.
10855 (walk_tree): Moved declaration to ../tree-inline.h.
10856 (walk_tree_without_duplicates, copy_tree_r): Likewise.
10857 (remap_save_expr): Likewise.
10858 * decl.c: Include tree-inline.h.
10859 (lang_mark_tree): Don't mark inlined_fns.
10860 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10861 * optimize.c: Include tree-inline.h.
10862 (optimize_inline_calls): Move declaration to ../tree.h, as
10864 (remap_decl): Use language-independent constructs and hooks.
10865 (remap_block, copy_body_r, declare_return_variable): Likewise.
10866 (inlinable_function_p): Likewise. Don't test for
10867 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10868 no longer language-specific.
10869 (optimize_inline_calls): Likewise. Make it non-static. Moved
10870 call of dump_function to...
10871 (optimize_function): Here...
10872 (clone_body): New function, extracted from...
10873 (maybe_clone_body): ... here. Build decl_map locally and pass
10874 it on to clone_body.
10875 * pt.c, semantics.c: Include tree-inline.h.
10876 * tree.c: Likewise.
10877 (cp_walk_subtrees): New language-specific hook for tree inlining.
10878 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10879 cp_is_overload_p, cp_auto_var_in_fn_p,
10880 cp_copy_res_decl_for_inlining): Likewise.
10881 (walk_tree): Move language-specific constructs into...
10882 (cp_walk_subtrees): this new function.
10883 (copy_tree_r): Use language-independent constructs and hooks.
10884 (init_tree): Initialize tree inlining hooks.
10885 (remap_save_expr): Adjust prototype so that the declaration
10886 does not require the definition of splay_tree.
10888 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
10890 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10891 to build the declaration instead of the declaration itself.
10893 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
10895 * decl2.c (cxx_decode_option): Add 'else'.
10897 * spew.c (end_input): No longer static.
10898 * cp-tree.h: Declare it.
10899 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10901 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10903 * call.c (build_over_call), typeck.c (build_function_call_real):
10904 Pass type attributes to check_function_format rather than name or
10905 assembler name. Don't require there to be a name or assembler
10906 name to check formats.
10908 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10910 * decl.c (init_decl_processing): Don't call
10911 init_function_format_info. Initialize lang_attribute_table
10913 (builtin_function): Call decl_attributes.
10914 (insert_default_attributes): New.
10916 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
10918 * decl.c (grokdeclarator): Copy array typedef handling from C
10921 * decl.c (grokdeclarator): Copy too-large array handling from C
10924 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
10926 * config-lang.in (target_libs): Added target-gperf, so that we
10927 don't try to build it if C++ is disabled.
10929 2001-09-23 Zack Weinberg <zack@codesourcery.com>
10931 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10932 (cp/errfn.o): Delete rule.
10933 (cp/error.o): Depend on flags.h.
10934 * errfn.c: Delete file.
10935 * cp-tree.h: Declare warn_deprecated. Remove definitions of
10936 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10937 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10938 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10939 internal_error respectively. Make cp_deprecated into a macro.
10940 Don't define cp_printer typedef or declare cp_printers.
10941 * error.c: Include flags.h.
10942 Delete: struct tree_formatting_info, print_function_argument_list,
10943 print_declaration, print_expression, print_function_declaration,
10944 print_function_parameter, print_type_id, print_cv_qualifier_seq,
10945 print_type_specifier_seq, print_simple_type_specifier,
10946 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10947 print_parameter_declaration_clause, print_exception_specification,
10948 print_nested_name_specifier, and definition of cp_printers.
10949 (locate_error): New function.
10950 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10951 rewritten in terms of locate_error and diagnostic.c.
10952 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10953 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
10954 (init_error): Adjust to match.
10956 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10958 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10960 2001-09-21 Richard Henderson <rth@redhat.com>
10962 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10963 (build_vtbl_initializer): Likewise.
10964 (build_vfn_ref): New.
10965 * cp-tree.h: Declare it.
10966 * call.c (build_over_call): Use it.
10967 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10968 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10970 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
10972 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10974 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
10976 Table-driven attributes.
10977 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10978 * decl2.c (cplus_decl_attributes): Only take one attributes
10980 * cp-tree.c (cplus_decl_attributes): Update prototype.
10981 * class.c (finish_struct), decl.c (start_decl, start_function),
10982 decl2.c (grokfield), friend.c (do_friend), parse.y
10983 (parse_bitfield): Update calls to cplus_decl_attributes.
10984 * decl.c (grokdeclarator): Take a pointer to a single ordinary
10986 * decl.h (grokdeclarator): Update prototype.
10987 * decl2.c (grokfield): Take a single ordinary attribute list.
10988 * friend.c (do_friend): Likewise.
10989 * decl.c (shadow_tag, groktypename, start_decl,
10990 start_handler_parms, grokdeclarator, grokparms, start_function,
10991 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10992 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10993 (process_template_parm, do_decl_instantiation): Pass single
10994 ordinary attribute lists around.
10995 * decl.c (grokdeclarator): Correct handling of nested attributes.
10997 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
10998 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11001 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11002 (cp_attribute_table): Declare.
11003 * decl.c (valid_lang_attribute): Don't define.
11004 (lang_attribute_table): Define.
11005 (init_decl_processing): Initialize lang_attribute_table instead of
11006 valid_lang_attribute.
11007 * tree.c (cp_valid_lang_attribute): Remove.
11008 (handle_java_interface_attribute, handle_com_interface_attribute,
11009 handle_init_priority_attribute): New functions.
11010 (cp_attribute_table): New array.
11011 * decl2.c (import_export_class): Don't use
11012 targetm.valid_type_attribute.
11014 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11016 * Make-lang.in (cp/error.o): Depend on real.h
11017 * error.c: #include "real.h"
11019 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11021 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11022 xmalloc/strcpy/strcat.
11024 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11026 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11028 * pt.c (tsubst_decl): Likewise.
11030 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11032 * decl2.c (lang_f_options): Const-ification.
11033 * lex.c (cplus_tree_code_name): Likewise.
11034 * spew.c (yyerror): Likewise.
11036 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11039 * class.c (force_canonical_binfo_r): Check & move an indirect
11040 primary base first.
11041 (force_canonical_binfo): Check that it's not already
11043 (mark_primary_virtual_base): Remove BINFO parameter.
11044 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11046 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11048 Remove TYPE_NONCOPIED_PARTS.
11049 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11050 CLASSTYPE_PURE_VIRTUALS.
11051 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11052 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11053 (layout_class_type): Don't call fixup_inline_methods here ...
11054 (finish_struct_1): ... call it here.
11056 2001-09-04 Mark Mitchell <mark@codesourcery.com>
11058 * decl.c (duplicate_decls): Remove code deadling with
11060 * decl2.c (finish_file): Likewise.
11061 * pt.c (instantiate_decl): Likewise.
11062 * semantics.c (expand_body): Don't defer local functions if
11063 they wouldn't be deferred for some other reason. Don't
11064 generate RTL for functions that will not be emitted.
11065 (genrtl_start_function): Remove code deadling with
11067 (genrtl_finish_function): Likewise.
11069 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
11072 * call.c (build_over_call): Do not optimize any empty base
11075 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11077 * error.c (dump_template_decl): Output template parameters
11078 together with their specifiers.
11079 Output `class' prefix for template template parameter.
11080 (dump_decl): Fix formatting.
11082 2001-08-30 Kurt Garloff <garloff@suse.de>
11084 * optimize.c (inlinable_function_p): Allow only smaller single
11085 functions. Halve inline limit after reaching recursive limit.
11087 2001-08-30 Joern Rennecke <amylaar@redhat.com>
11088 Jason Merrill <jason_merrill@redhat.com>
11090 * class.c (build_vtable_entry_ref): Subtract in char*, not
11093 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
11095 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11096 (build_cplus_array_type): Use cp_build_qualified_type, not
11097 TYPE_MAIN_VARIANT, to get an unqualified version.
11099 * decl2.c (grok_alignof): Lose.
11100 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11101 * typeck.c (c_alignof): Lose.
11102 * semantics.c (finish_sizeof, finish_alignof): New.
11103 * parse.y: Use them.
11104 * cp-tree.h: Declare them.
11106 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
11108 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11109 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11110 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11112 2001-08-19 Jakub Jelinek <jakub@redhat.com>
11114 * typeck2.c (add_exception_specifier): Only require complete type if
11115 not in processing template declaration.
11117 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11119 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11120 GNU_xref_start_scope and GNU_xref_end_scope.
11122 * tree.c (TYPE_HASH): Moved to ../tree.h.
11124 2001-08-16 Mark Mitchell <mark@codesourcery.com>
11126 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11129 2001-08-14 Richard Henderson <rth@redhat.com>
11131 * class.c, cp-tree.h (build_vfn_ref): Remove.
11132 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11134 2001-08-13 Mark Mitchell <mark@codesourcery.com>
11136 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11137 empty class assignment as having side-effects to avoid
11140 2001-08-13 Zack Weinberg <zackw@panix.com>
11142 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11143 * except.c: Include libfuncs.h.
11145 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11147 * decl.c (grokdeclarator): Clarify diagnostic message.
11149 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11151 * decl2.c (do_nonmember_using_decl): Replace using directive
11152 with using declaration in the error message.
11154 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11156 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11157 criterion to avoid rebuilding expression tree instead of
11158 processing_template_decl.
11160 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11162 Support named return value optimization for inlines, too.
11163 * decl.c (finish_function): Nullify returns here.
11164 * semantics.c (genrtl_start_function): Not here.
11165 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11166 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
11167 Also nullify the CLEANUP_STMT for the nrv.
11168 * cp-tree.h: Declare it.
11169 * optimize.c (declare_return_variable): Replace the nrv with the
11171 * typeck.c (check_return_expr): Be more flexible on alignment check.
11172 Ignore cv-quals when checking for a matching type.
11174 2001-08-09 Richard Henderson <rth@redhat.com>
11176 * decl2.c (finish_objects): Use target hooks instead of
11177 assemble_constructor and assemble_destructor.
11179 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11181 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11183 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
11186 Stop using TYPE_NONCOPIED_PARTS.
11187 * call.c (build_over_call): Be careful when copy constructing
11188 or assigning to an empty class.
11189 * class.c (check_bases_and_members): It has a
11190 COMPLEX_ASSIGN_REF if it has a vptr.
11191 (layout_class_type): Don't add empty class padding to
11192 TYPE_NONCOPIED_PARTS.
11193 (finish_struct_1): Don't add the VFIELD either.
11194 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11197 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11199 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11201 2001-08-06 Richard Henderson <rth@redhat.com>
11203 * decl2.c (finish_objects): Pass a symbol_ref and priority to
11204 assemble_{constructor,destructor}. Remove priority handling.
11206 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11208 Don't allow template-id in using-declaration.
11209 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11210 (do_class_using_decl): Likewise.
11212 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11214 * cp/spew.c (read_token): No need to pop buffers.
11216 2001-08-02 Stan Shebs <shebs@apple.com>
11218 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11219 (fnaddr_from_vtable_entry): Remove decl.
11220 * method.c (use_thunk): Update comment.
11222 2001-08-01 Andrew Cagney <ac131313@redhat.com>
11224 * repo.c (get_base_filename): Change return value to const char
11227 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
11231 * cp-tree.h (flag_honor_std): Remove.
11232 (CPTI_FAKE_STD): Remove.
11233 (std_node): Remove comment about it being NULL.
11234 (fake_std_node): Remove.
11235 * decl.c (in_fake_std): Remove.
11236 (walk_namespaces_r): Remove fake_std_node check.
11237 (push_namespace): Remove in_fake_std code.
11238 (pop_namespace): Likewise.
11239 (lookup_name_real): Remove fake_std_node check.
11240 (init_decl_processing): Always create std_node. Always add
11241 std:: things there.
11242 (builtin_function): Always put non '_' fns in std.
11243 * decl2.c (flag_honor_std): Remove.
11244 (lang_f_options): Remove honor-std.
11245 (unsupported_options): Add honor-std.
11246 (set_decl_namespace): Remove fake_std_node check.
11247 (validate_nonmember_using_decl): Likewise.
11248 (do_using_directive): Likewise.
11249 (handle_class_head): Likewise.
11250 * dump.c (cp_dump_tree): Likewise.
11251 * except.c (init_exception_processing): Adjust.
11252 * init.c (build_member_call): Remove fake_std_node check.
11253 (build_offset_ref): Likewise.
11254 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11255 * rtti.c (init_rtti_processing): Adjust.
11257 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11259 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11260 operand while calling cp_tree_equal.
11262 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11264 The 3.0 ABI no longer has vbase pointer fields.
11265 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11266 FORMAT_VBASE_NAME): Remove.
11267 * method.c (do_build_copy_constructor): Adjust.
11268 (do_build_assign_ref): Adjust.
11269 * search.c (lookup_field_r): Adjust.
11270 * typeck.c (build_component_ref): Adjust.
11272 The 3.0 ABI always has a vtable pointer at the start of every
11274 * rtti.c (build_headof_sub): Remove.
11275 (build_headof): Adjust.
11276 (get_tinfo_decl_dynamic): No need to check flag_rtti
11278 (create_real_tinfo_var): Explain why we need a hidden name.
11280 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11283 * class.c (update_vtable_entry_for_fn): The fixed adjustment
11284 of a virtual thunk should be from declaring base.
11286 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11288 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11289 the shared virtual base, so preserving inheritance graph order.
11291 2001-07-30 Andreas Jaeger <aj@suse.de>
11293 * decl2.c: Remove unused var global_temp_name_counter.
11295 2001-07-28 Richard Henderson <rth@redhat.com>
11297 * method.c (pending_inlines): Remove.
11299 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11301 * class.c (mark_primary_virtual_base): Don't adjust base
11303 (dfs_unshared_virtual_bases): Adjust them here.
11304 (mark_primary_bases): Explain why we adjust at the end.
11306 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11308 * class.c (finish_struct_1): When copying the primary base's
11309 VFIELD, make sure we find it is at offset zero.
11311 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11313 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11314 tsubst_expr for default template arguments.
11316 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11319 * spew.c (yylex): Only copy the token's lineno, if it is
11322 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11325 * call.c (resolve_args): Simplify, call
11326 convert_from_reference.
11327 (build_new_op): Resolve and convert from reference ARG1
11328 earlier. Adjust ARG2 & ARG3 resolve and conversion.
11330 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11332 * decl.c (last_function_parm_tags): Remove.
11333 (current_function_parm_tags): Remove.
11334 (init_decl_processing): Adjust.
11335 (start_function): Adjust.
11336 (store_parm_decls): Adjust.
11339 * decl.c (grokdeclarator): Detect when a function typedef is
11340 declaring a function, and create last_function_parms correctly.
11342 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
11344 * call.c (joust): Only prefer a non-builtin candidate to a builtin
11345 one if they have the same signature.
11347 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
11348 it rather than toplevel_bindings_p. Give it a mangled name if static.
11349 (convert_to_reference): Adjust.
11350 * decl2.c (get_temp_name): Lose.
11351 * mangle.c (mangle_ref_init_variable): New fn.
11352 (mangle_guard_variable): Strip the ref-init header.
11353 * cp-tree.h: Adjust.
11354 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11356 (grok_reference_init): Always use DECL_INITIAL.
11358 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11361 * call.c (build_conditional_expr): Recheck args after
11363 * cp-tree.h (build_conditional_expr): Move to correct file.
11364 * typeck.c (decay_conversion): Diagnose any unknown types
11366 (build_binary_op): Don't do initial decay or default
11367 conversions on overloaded functions.
11368 (build_static_cast): Don't do a decay conversion here.
11370 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11373 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11374 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11376 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11378 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11379 (create_vtbl_ptr): ... here.
11381 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11383 * class.c (build_vbase_offset_vbtl_entries): Look for
11384 non-primary base of which we are a sub vtable.
11386 2001-07-24 Phil Edwards <pme@sources.redhat.com>
11388 * semantics.c (finish_this_expr): Remove unused code.
11390 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
11392 Simplify rtti, now we've only one ABI.
11393 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11395 (tinfo_decl_id, tinfo_var_id): Remove.
11396 (get_typeid_1): Remove.
11398 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11399 (typeid_ok_p): New function.
11400 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11401 (get_tinfo_decl): Remove old abi documentation.
11402 (tinfo_from_decl): Remove.
11403 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11404 (get_typeid_1): Remove.
11405 (get_base_offset): Remove.
11406 (synthesize_tinfo_var): Absorb get_base_offset.
11407 (create_real_tinfo_var): Don't use tinfo_decl_id.
11409 2001-07-23 Graham Stott <grahams@redhat.com>
11411 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11412 variable has_two_argument_delete_p.
11414 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
11416 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11417 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11418 (CPTI_INDEX_IDENTIFIER): Remove.
11419 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11420 (delta2_identifier): Remove.
11421 (index_identifier): Remove.
11422 (pfn_or_delta2_identifier): Remove.
11423 (flag_vtable_thunks): Remove.
11424 (VTABLE_DELTA2_NAME): Remove.
11425 (VTABLE_INDEX_NAME): Remove.
11426 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11427 (vfunc_ptr_type_node): Adjust.
11428 (VTABLE_NAME_PREFIX): Adjust.
11429 (build_vfn_ref): Lose first parameter.
11430 (fixup_all_virtual_upcast_offsets): Remove.
11431 * decl.c (initialize_predefined_identifiers): Remove
11432 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11433 (init_decl_processing): Remove no-vtable-thunk code.
11434 * decl2.c (flag_vtable_thunks): Remove.
11435 (mark_vtable_entries): Remove no-vtable-thunk code.
11436 * error.c (dump_decl): Remove no-vtable-thunk code.
11437 (dump_expr): Adjust ptr to member function code.
11438 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11440 * rtti.c (build_headof): Remove no-vtable-thunk code.
11441 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11442 * search.c (get_base_distance): Remove expand_upcast_fixups case.
11443 (virtual_context) Remove.
11444 (expand_upcast_fixups): Remove.
11445 (fixup_virtual_upcast_offsets): Remove.
11446 (fixup_all_virtual_upcast_offsets): Remove.
11447 * typeck.c (get_member_function_from_ptrfunc): Remove
11448 no-vtable-thunk code.
11449 * call.c (build_over_call): Adjust call to build_vfn_ref.
11450 * class.c (build_vfn_ref): Lose first parameter. Remove
11451 no-vtable-thunk code.
11452 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11453 (build_vtable_entry): Remove no-vtable-thunk code.
11455 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
11457 Remove old-abi remnants. Remove comments about old abi
11458 behavior. Remove references to 'new-abi' in comments.
11459 * cp-tree.h: Adjust comments.
11460 (vbase_offsets_in_vtable_p): Delete.
11461 (vcall_offsets_in_vtable_p): Delete.
11462 (vptrs_present_everywhere_p): Delete.
11463 (all_overridden_vfuns_in_vtables_p): Delete.
11464 (merge_primary_and_secondary_vtables_p): Delete.
11465 (TYPE_CONTAINS_VPTR_P): Adjust.
11466 (VTT_NAME_PREFIX): Remove.
11467 (CTOR_VTBL_NAME_PREFIX): Remove.
11468 (init_vbase_pointers): Remove.
11469 * class.c: Adjust coments.
11470 (build_vbase_pointer_fields): Delete.
11471 (build_vbase_pointer): Remove old-abi code.
11472 (build_secondary_vtable): Likewise.
11473 (modify_all_vtables): Likewise.
11474 (create_vtable_ptr): Likewise.
11475 (layout_class_type): Likewise.
11476 (finish_struct_1): Likewise.
11477 (finish_vtbls): Likewise.
11478 (dfs_finish_vtbls): Delete.
11479 (build_vbase_offset_vtbl_entries): Remove old-abi code.
11480 * cvt.c: Adjust comments.
11481 * decl.c: Adjust comments.
11482 * decl2.c: Adjust comments.
11483 * init.c: Adjust comments.
11484 (construct_virtual_bases): Remove old-abi code.
11485 * lang-specs.h: Remove -fno-new-abi.
11486 * mangle.c: Adjust comments.
11487 * rtti.c: Adjust comments.
11488 (get_base_offset): Remove old-abi-code.
11489 * search.c: Adjust comments.
11490 (dfs_init_vbase_pointers): Remove.
11491 (dfs_vtable_path_unmark): Remove.
11492 (init_vbase_pointers): Remove.
11493 * semantics.c: Adjust comments.
11494 (emit_associated_thunks): Remove old-abi code.
11495 * typeck.c: Adjust comments.
11497 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
11499 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11502 2001-07-19 Mark Mitchell <mark@codesourcery.com>
11504 * class.c (finish_struct_anon): Forbid nested classes.
11506 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11508 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11509 * optimize.c: Include debug.h.
11510 (maybe_clone_body): Use debug hook.
11511 * semantics.c: Include debug.h.
11512 (expand_body): Use debug hook.
11514 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11516 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11518 2001-07-18 Mark Mitchell <mark@codesourcery.com>
11520 * class.c (type_requires_array_cookie): New function.
11521 (check_methods): Don't try to figure out whether the type needs a
11523 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11524 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11525 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11526 * pt.c (instantiate_class_template): Don't set
11527 TYPE_VEC_DELETE_TAKES_SIZE.
11528 * NEWS: Document ABI changes from GCC 3.0.
11530 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
11531 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11533 * NEWS (Changes in GCC 3.0): Fix typo.
11535 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
11537 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11538 which attributes are to be attached, and a flags argument. Update
11539 call to decl_attributes.
11540 (grokfield): Update call to decl_attributes.
11541 * class.c (finish_struct): Update call to cplus_decl_attributes.
11542 * cp-tree.h (cplus_decl_attributes): Update prototype.
11543 * decl.c (start_decl, grokdeclarator, start_function): Update
11544 calls to decl_attributes and cplus_decl_attributes.
11545 * friend.c (do_friend): Update call to cplus_decl_attributes.
11546 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11548 2001-07-12 Mark Mitchell <mark@codesourcery.com>
11550 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11551 for `register' variables with an asm-specification.
11553 2001-07-11 Mark Mitchell <mark@codesourcery.com>
11555 * semantics.c (finish_asm_stmt): Mark the output operands
11556 to an asm addressable, if necessary.
11558 2001-07-11 Ben Elliston <bje@redhat.com>
11560 * Revert this change -- there is a subtle bug.
11563 * decl.c (finish_enum): New "attributes" argument; pass it to
11564 cplus_decl_attributes. Use a narrower type if the enum is packed.
11565 * cp-tree.h (finish_enum): Adjust prototype.
11566 * parse.y (enum_head): New non-terminal.
11567 (structsp): Use it. Enums now may be preceded or followed by
11568 optional attributes -- pass their chained tree to finish_enum().
11569 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11571 2001-07-10 Mark Mitchell <mark@codesourcery.com>
11573 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11576 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
11578 * semantics.c (cp_expand_stmt): Fix for null
11579 current_function_return_value.
11581 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
11583 * call.c (build_op_delete_call): Initialize fn.
11584 (convert_like_real): Delete conditional.
11585 (joust): Initialize *w and *l.
11586 * class.c: Add prototype for binfo_ctor_vtable.
11587 (get_primary_binfo): Initialize result.
11588 * init.c (build_java_class_ref): Initialize name.
11590 2001-07-09 Erik Rozendaal <dlr@acm.org>
11592 * typeck.c (unary_complex_lvalue): Do not duplicate the
11593 argument to modify, pre-, or post-increment when used as an
11594 lvalue and when the argument has side-effects.
11596 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11598 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11599 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
11600 cplus_decl_attributes even if attrs is NULL.
11601 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11603 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11605 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11606 calls to decl_attributes.
11608 2001-07-06 Ira Ruben <ira@apple.com>
11610 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11611 be DECL_TEMPLATE_RESULT.
11613 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11615 * cp-tree.h (copy_template_template_parm): Rename to ...
11616 (bind_template_template_parm): ... here.
11617 * tree.c (copy_template_template_parm): Rename to ...
11618 (bind_template_template_parm): ... here. Remove the case when
11619 NEWARGS is NULL_TREE.
11620 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11621 BOUND_TEMPLATE_TEMPLATE_PARM.
11622 * pt.c (lookup_template_class): Adjust.
11624 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
11626 * cvt.c (convert_lvalue): New fn.
11627 * cp-tree.h: Declare it.
11628 * method.c (do_build_assign_ref): Use it.
11629 (do_build_copy_constructor): Convert parm to base types
11630 before calling base constructors.
11632 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11633 DECL_USER_ALIGN. Check flag_elide_constructors instead of
11635 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11637 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
11639 * optimize.c (optimize_inline_calls): New function, broken out
11641 (optimize_function): ... here. Call it. Don't inline if it is
11643 (dump_function): Print name of dump flag causing this dump.
11644 * semantics.c (expand_body): Move thunk inline check to
11647 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
11649 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11650 (comptypes): Use target.comp_type_attributes.
11652 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
11654 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11656 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11658 * error.c (lang_print_error_function): Add a `diagnostic_context *'
11661 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11663 * decl2.c (import_export_class): Update.
11665 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11667 * error.c (init_error): Adjust settings.
11669 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11671 * error.c (init_error): Adjust settings.
11673 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
11675 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11676 return pointers to data members by reference rather than by value.
11678 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
11680 Implement the Named Return Value optimization.
11681 * cp-tree.h (struct cp_language_function): Add x_return_value.
11682 (current_function_return_value): Now a macro.
11683 * decl.c: Don't define it.
11684 (define_label, finish_case_label): Don't clear it.
11685 (init_decl_processing): Don't register it with GC.
11686 * semantics.c (genrtl_finish_function): Don't check it for
11687 no_return_label. Copy the RTL from the return value to
11688 current_function_return_value and walk, calling...
11689 (nullify_returns_r): ...this new fn.
11690 * typeck.c (check_return_expr): Set current_function_return_value.
11692 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
11694 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11695 sharing a ctor vtable with. Merge code for cases 1 and 2.
11696 (binfo_ctor_vtable): New fn.
11697 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11699 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
11701 * class.c (dfs_find_final_overrider): Fix logic.
11703 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11704 virtual thunk instead of non-virtual.
11705 (get_matching_virtual): Uncomment.
11707 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11708 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
11711 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
11713 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11714 we've not emerged from the hierarchy of RTTI_BINFO on reaching
11715 a non-virtual base.
11717 2001-06-13 Mark Mitchell <mark@codesourcery.com>
11719 * NEWS: Update release number.
11721 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11723 PR c++/3130, c++/3131, c++/3132
11724 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11725 * class.c (force_canonical_binfo_r): Move
11726 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11727 virtual bases unless they're primary and what they're primary
11728 too has been moved.
11729 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11730 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11731 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11733 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11734 (layout_nonempty_base_or_field): Add most derived type
11736 (layout_empty_base): Likewise.
11737 (build_base_field): Likewise.
11738 (build_base_fields): Likewise.
11739 (propagate_binfo_offsets): Add most derived type
11740 parameter. Skip non canonical virtual bases too.
11741 (dfs_set_offset_for_unshared_vbases): Don't skip primary
11742 bases. Do skip canonical bases.
11743 (layout_virtual_bases): Adjust.
11744 (layout_class_type): Adjust.
11745 (dfs_get_primary_binfo): Build list of virtual primary base
11747 (get_primary_binfo): Check that the shared virtual primary
11748 base candidate was found first.
11749 (accumulate_vtbl_inits): Don't do anything for non-vptr
11750 containing binfos. For case 1 primary virtual bases, keep
11751 checking that we've not emerged from the hierarchy of RTTI_BINFO.
11753 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11756 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11757 hierarchy looking for primary bases for a ctor
11758 vtable. Recursively call oneself, if we meet our primary via
11759 this route and haven't met it yet via inheritance graph order.
11761 2001-06-11 Mark Mitchell <mark@codesourcery.com>
11763 * lang-options.h: Emit documentation for -fno-honor-std, not
11766 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
11768 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11769 Don't clobber delta.
11770 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11772 2001-06-10 Mark Mitchell <mark@codesourcery.com>
11773 Gabriel Dos Reis <gdr@codesourcery.com>
11775 * Make-lang.in (cp/call.o): Depend on diagnostic.h
11776 (cp/typeck.o): Depend on diagnostic.h
11777 (cp/typeck2.o): Depend on diagnostic.h
11778 (cp/repo.o): Depend on dignostic.h
11779 * typeck.c: #include diagnostic.h
11780 (convert_for_initialization): Remove extern declaration for
11781 warningcount and errorcount.
11783 * call.c: #include diagnostic.h
11784 (convert_like_real): Remove extern declaration for warnincount and
11787 * repo.c: #include diagnostic.h
11788 * typeck2.c: #include diagnostic.h
11790 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11792 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11793 in previous change.
11795 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11798 * friend.c (do_friend): Use push_decl_namespace for classes at
11801 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11802 Jason Merrill <jason_merrill@redhat.com>
11805 * class.c (build_secondary_vtable): Use assert, rather than an error
11807 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11808 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11809 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11810 Don't set BINFO_VTABLE for a primary virtual base.
11812 2001-06-07 Mark Mitchell <mark@codesourcery.com>
11814 * decl.c (duplicate_decls): Update source position information
11815 when a template function is defined.
11817 2001-06-07 Phil Edwards <pme@sources.redhat.com>
11819 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
11821 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
11824 * decl.c (pushtag): Don't push into a complete type's scope.
11826 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
11828 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11829 (struct lang_decl_flags): Lose generate_with_vtable_p.
11830 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11831 * class.c (copy_virtuals): Adjust.
11832 * decl2.c (mark_vtable_entries): Adjust.
11833 * method.c (make_thunk, build_vtable_entry): Adjust.
11834 * class.c (update_vtable_entry_for_fn): Only look as far as the
11835 first defining class.
11836 (build_vtbl_initializer): Put nothing in the slot for a function only
11837 defined in a lost primary virtual base.
11838 (add_vcall_offset_vtbl_entries_1): Use the same code for
11839 the lost primary case and the normal case.
11840 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11841 (get_vfield_offset, get_derived_offset): Lose.
11842 (dfs_find_final_overrider): Use look_for_overrides_here.
11843 (get_matching_virtual): New fn.
11844 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11845 not BV_VCALL_INDEX.
11846 * search.c (look_for_overrides_here): Split out from...
11847 (look_for_overrides_r): Here.
11849 * class.c (find_final_overrider): Return error_mark_node on error.
11851 * decl2.c (key_method): #if 0 accidental change.
11853 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
11855 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11856 (build_over_call): Likewise.
11857 * decl.c (grokparms): Likewise.
11858 * pt.c (tsubst_decl): Likewise.
11859 * typeck.c (convert_arguments): Likewise.
11861 2001-06-05 Mark Mitchell <mark@codesourcery.com>
11863 * semantics.c (begin_class_definition): Robustify.
11865 * pt.c (instantiate_decl): Tell the repository code about the
11866 clones, not the cloned functions.
11867 * repo.c (repo_template_used): Explicitly instantiate the cloned
11868 function, not the clones.
11870 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11872 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11873 ICS_BAD_FLAG on created conversion.
11874 (compare_ics): Break out rank.
11876 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11878 * decl.c (xref_tag): Remove extraneous %s on dependent name
11881 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11883 * class.c (layout_vtable_decl): Fix off by one error on
11885 (build_vtt): Likewise.
11886 (build_ctor_vtbl_group): Likewise.
11888 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11890 * class.c (maybe_indent_hierarchy): New function.
11891 (dump_class_hierarchy_r): Add flags. Dump extra binfo
11892 information, if enabled. Use maybe_indent_hierarchy. Adjust
11894 (dump_class_hierarchy): Adjust prototype. Adjust output format.
11895 (dump_array, dump_vtable, dump_vtt): New functions.
11896 (finish_struct_1): Adjust hierarchy dumping.
11897 (initialize_vtable): Call dump_vtable.
11898 (build_vtt): Call dump_vtt.
11899 (build_ctor_vtbl_group): Call dump_vtable.
11900 * decl2.c (flag_dump_class_layout): Remove.
11901 (cxx_decode_option): Remove dump translation unit
11902 and dump class hierarchy check. Call dump_switch_p.
11903 (finish_file): Adjust dumping.
11904 (dump.c): Only dump base classes if not TDF_SLIM.
11905 Only dump namespace members if not TDF_SLIM.
11906 * optimize.c (dump_function): New function.
11907 (optimize_function): Call dump_function.
11908 * semantics.c (expand_body): Use dump_enabled_p.
11910 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
11913 Part missed from first commit
11914 * decl2.c (finish_anon_union): Copy context.
11916 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
11919 * optimize.c (remap_decl): Remap anonymous aggregate members too.
11921 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
11924 * semantics.c (expand_body): Don't optimize thunks.
11926 2001-05-25 Sam TH <sam@uchicago.edu>
11928 * cp-tree.h lex.h: Fix header include guards.
11930 2001-05-25 Mark Mitchell <mark@codesourcery.com>
11932 * decl.c (init_decl_processing): Tweak.
11934 2001-05-24 Mark Mitchell <mark@codesourcery.com>
11936 * decl.c (duplicate_decls): Tidy.
11937 (init_decl_processing): Always set flag_no_builtin.
11939 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
11942 * decl2.c (do_local_using_decl): Push the decls, even in a
11945 2001-05-22 Mark Mitchell <mark@codesourcery.com>
11947 * optimize.c (initialize_inlined_parameters): Don't set
11948 TREE_READONLY for a VAR_DECL taking the place of an inlined
11951 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
11953 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11954 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11957 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
11959 * parse.y: Refer to compound literals as such, not as
11960 constructor-expressions.
11962 2001-05-21 Mark Mitchell <mark@codesourcery.com>
11964 * call.c (build_op_delete_call): Ignore exception-specifications
11965 when looking for matching delete operators.
11966 * init.c (build_new_1): Compute whether or not the allocation
11967 function used is a placement allocation function or not, and
11968 communicate this information to build_op_delete_call.
11970 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
11972 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
11973 (build_vtbl_ref): Adjust.
11974 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11975 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11977 (unsupported_options): Correspondingly.
11979 * decl2.c (maybe_make_one_only): Check flag_weak, not
11980 supports_one_only().
11982 * cp-tree.def (START_CATCH_STMT): Lose.
11983 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
11984 * tree.c (cp_statement_code_p): Don't case it.
11985 * semantics.c (cp_expand_stmt): Likewise.
11986 * cp-tree.h (START_CATCH_TYPE): Lose.
11987 (HANDLER_TYPE): New.
11988 * except.c (expand_start_catch_block): Don't start any blocks.
11990 (expand_end_catch_block): Don't end any blocks.
11991 * parse.y (handler): Don't pass anything from finish_handler_parms
11993 * pt.c (tsubst_expr): Likewise.
11994 * semantics.c (begin_handler): Call note_level_for_catch here.
11995 (finish_handler_parms): Don't return anything.
11996 (genrtl_catch_block, begin_catch_block): Lose.
11997 (genrtl_handler): Call expand_start_catch here.
11999 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12001 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12002 (get_vtable_decl, build_vtt): Not here.
12004 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12007 * optimize.c (update_cloned_parm): Copy addressability and other
12010 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12012 * pt.c (determine_specialization): Ignore artificial functions.
12014 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12016 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12017 (C_RID_CODE): Remove.
12018 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12019 (init_parse): Don't do it here.
12021 2001-05-18 Diego Novillo <dnovillo@redhat.com>
12023 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12024 function declaration to avoid stripping the symbol's attributes.
12026 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
12028 * decl.c (pushdecl): Adjust error string.
12029 (xref_tag): Adjust friend class injection warning. Remove the
12030 inherited name from the class shadowed scope.
12032 2001-05-17 Mark Mitchell <mark@codesourcery.com>
12034 * except.c (cp_protect_cleanup_actions): New function.
12035 (init_exception_processing): Don't set protect_cleanup_actions
12036 here. Do set lang_protect_cleanup_actions.
12038 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12040 * spew.c (read_token): Call yyerror on all unexpected tokens.
12042 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12044 * init.c (member_init_ok_or_else): Take a tree rather than
12046 (expand_member_init): Adjust.
12048 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
12050 * decl.c (duplicate_decls): Suppress warning about duplicate
12051 decls if the first decl is a friend.
12053 2001-05-12 Zack Weinberg <zackw@stanford.edu>
12055 * except.c (choose_personality_routine): Export. Add
12056 explanatory comment. Take an enum languages, not a boolean.
12057 (initialize_handler_parm): Adjust to match.
12058 * cp-tree.h: Prototype choose_personality_routine.
12059 * lex.c (handle_pragma_java_exceptions): New function.
12060 (init_cp_pragma): Register #pragma GCC java_exceptions.
12062 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12064 * method.c (build_mangled_C99_name): Remove unused prototype.
12066 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
12068 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12069 * typeck.c (get_member_function_from_ptrfunc,
12070 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12071 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12073 Reverted Geoff Keating's 2001-05-03's patch.
12075 2001-05-11 Ira Ruben <ira@apple.com>
12077 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12079 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
12081 * cp-tree.h (finish_label_expr, lookup_label): Delete.
12082 * parse.y: Update for '&&'; don't issue warning here.
12083 * semantics.c (finish_label_expr): Delete.
12085 2001-05-07 Mark Mitchell <mark@codesourcery.com>
12087 * splay-tree.h (splay_tree_max): New function.
12088 (splay_tree_min): Likewise.
12090 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
12092 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12093 (pfn_vflag_identifier): Define.
12094 Update comment about layout of pointer functions.
12095 (build_ptrmemfunc1): Update prototype.
12096 (expand_ptrmemfunc_cst): Update prototype.
12097 * decl.c (initialize_predefined_identifiers): Initialize
12098 pfn_vflag_identifier.
12099 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12100 an extra field to the type.
12101 * expr.c (cplus_expand_constant): Pass 'flag' between
12102 expand_ptrmemfunc_cst and build_ptrmemfunc1.
12103 * typeck.c (get_member_function_from_ptrfunc): When
12104 FUNCTION_BOUNDARY < 16, look at additional field to determine
12105 if a pointer-to-member is a real pointer or a vtable offset.
12106 (build_ptrmemfunc1): Add new parameter to contain extra field.
12107 (build_ptrmemfunc): Pass the extra field around.
12108 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12109 (pfn_from_ptrmemfunc): Ignore the extra field.
12111 2001-05-03 Mark Mitchell <mark@codesourcery.com>
12113 * cp-tree.h (flag_inline_trees): Update documentation.
12114 * decl.c (init_decl_processing): Adjust handling of
12115 flag_inline_functions and flag_inline_trees to support -O3.
12116 (grokfndecl): Set DECL_INLINE on all functions if that's what
12117 the user requested.
12118 (save_function_data): Clear DECL_INLINE in
12119 current_function_cannot_inline is non-NULL.
12120 * decl2.c (flag_inline_trees): Update documentation.
12122 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
12124 * dump.c (cp_dump_tree, USING_STMT case): New case.
12125 * tree.c (cp_statement_code_p): Add USING_STMT.
12126 * decl2.c (do_using_directive): Add the using directive statement.
12128 * tree.c (walk_tree): Reformat an if block.
12130 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12132 * decl.c (compute_array_index_type): Don't try to do anything with
12133 the indices when processing a template.
12135 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12137 * call.c: NULL_PTR -> NULL.
12138 * class.c: Likewise.
12140 * decl.c: Likewise.
12141 * decl2.c: Likewise.
12142 * except.c: Likewise.
12143 * init.c: Likewise.
12144 * rtti.c: Likewise.
12145 * search.c: Likewise.
12146 * tree.c: Likewise.
12147 * typeck.c: Likewise.
12148 * typeck2.c: Likewise.
12150 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12152 * decl2.c (do_using_directive): Revert previous patch.
12154 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12156 * cp-tree.def (USING_STMT): New statement node.
12157 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12158 * decl2.c (do_using_directive): Add USING_STMT to statement
12159 tree. Don't emit errors when processing template decl.
12160 * pt.c (tsubst_expr, USING_STMT case): New case.
12161 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12163 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12165 * call.c (build_new_op): Convert args from reference here.
12166 (build_conditional_expr): Don't convert here.
12168 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12170 * spew.c (last_token_id): New static variable.
12171 (read_token): Set it here.
12172 (yyerror): Use it here.
12174 2001-04-30 Richard Henderson <rth@redhat.com>
12176 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12177 * decl.c: Likewise.
12179 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12181 * gxxint.texi: Remove.
12182 * Make-lang.in: Remove all traces of gxxint.texi.
12184 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
12186 * decl2.c (start_static_initialization_or_destruction): Correct
12187 logic to handle the -fno-use-cxa-atexit case.
12189 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12191 * optimize.c (update_cloned_parm): New function.
12192 (maybe_clone_body): Use it. Update the `this' parameter too.
12194 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
12196 * decl2.c (unsupported_options): Add new-abi.
12197 * lang-options.h: Remove no longer supported options.
12199 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12201 * except.c (can_convert_eh): Don't check template parms,
12202 typename types etc.
12204 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12206 * optimize.c (maybe_clone_body): Copy parameter names and locations.
12208 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12210 * cp-tree.h (adjust_clone_args): Prototype new function.
12211 * class.c (adjust_clone_args): New function.
12212 * decl.c (start_function): Call it for in charge ctors.
12214 2001-04-26 Mark Mitchell <mark@codesourcery.com>
12216 * method.c (use_thunk): Make sure that thunks really are emitted
12219 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
12221 * mangle.c (write_chars): New macro.
12222 (hwint_to_ascii): New function
12223 (write_number): Use it.
12224 (write_integer_cst): Deal with really big numbers.
12226 2001-04-25 Mark Mitchell <mark@codesourcery.com>
12228 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12231 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
12233 * decl.c (grokdeclarator): Set context of namespace scope
12236 2001-04-24 Zack Weinberg <zackw@stanford.edu>
12238 * cp/optimize.c: Include hashtab.h.
12239 (struct inline_data): Add tree_pruner.
12240 (expand_call_inline, expand_calls_inline): Use it when calling
12242 (optimize_function): Initialize and free tree_pruner.
12244 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12246 Lazy __FUNCTION__ generation.
12247 * cp-tree.def (FUNCTION_NAME): Remove.
12248 * cp-tree.h (function_name_declared_p): Remove.
12249 (cp_fname_init): Prototype.
12250 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12251 don't call declare_function_name. Call start_fname_decls.
12252 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12253 clobber the line number.
12254 (cp_fname_init): New function.
12255 (start_function): Call start_fname_decls.
12256 (finish_function): Call finish_fname_decls.
12257 * lex.c (reswords): Add slots for __FUNCTION__ et al.
12258 (rid_to_yy): Add mappings for __FUNCTION__ et al.
12259 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12260 * parse.y (VAR_FUNC_NAME): New token.
12261 (primary): Add VAR_FUNC_NAME.
12262 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12264 (tsubst, FUNCTION_NAME case): Remove.
12265 (tsubst_copy, FUNCTION_NAME case): Remove.
12266 (tsubst_expr, DECL_STMT case): Be careful with a
12267 DECL_PRETTY_FUNCTION_P.
12268 (instantiate_decl): Remove function_name_declared_p.
12269 * semantics.c (begin_compound_statement): Don't call
12270 declare_function_name here.
12271 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12272 (finish_translation_unit): Call finish_fname_decls.
12273 (expand_body): Remove function_name_declared_p.
12274 * typeck2.c (digest_init): Allow any ERROR_MARK.
12276 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12278 * pt.c (tsubst_decl): Use VOID_TYPE_P.
12279 * semantics.c: Fix some typos.
12281 2001-04-23 Phil Edwards <pme@sources.redhat.com>
12283 * cp/decl2.c (flag_honor_std): Always initialize to 1.
12285 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12287 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12289 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
12291 * except.c (build_throw): Wrap the initialization of the exception
12292 object in a MUST_NOT_THROW_EXPR.
12293 (do_free_exception): #if 0.
12295 2001-04-20 Mark Mitchell <mark@codesourcery.com>
12297 * cp-tree.h (finish_enum): Change prototype.
12298 * decl.c (finish_enum): Reorganize.
12299 * parse.y (structsp): Adjust calls to finish_enum.
12301 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12303 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12306 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12308 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12309 (layout_empty_base): Return at end flag.
12310 (build_base_field): Likewise.
12311 (build_base_fields): Likewise.
12312 (layout_virtual_bases): Don't add 1 to eoc value.
12313 (end_of_class): Use full size for empty bases.
12314 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12315 empty bases. Don't add 1 to eoc value. Only add trailing padding
12316 if we're an empty class with no empty bases.
12317 (dump_class_hierarchy): Dump size and alignment.
12319 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12321 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12324 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12326 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12327 is found, look first if name does not match the structure name.
12329 2001-04-19 Mark Mitchell <mark@codesourcery.com>
12331 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12333 (SET_DECL_LANGUAGE): New macro.
12334 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12335 (pushdecl): Likewise.
12336 (build_library_fn_1): Likewise.
12337 (build_cp_library_fn): Likewise.
12338 (grokfndecl): Likewise.
12339 (grokvardecl): Mark `extern "C"' variables as having C linkage.
12340 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12341 * lex.c (retrofit_lang_decl): Likewise.
12342 * mangle.c (mangle_decl_string): Don't mangle the names of
12343 variables declared with C language linkage.
12344 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12346 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
12348 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12349 flag_access_control from uninitialized storage.
12351 2001-04-15 Mark Mitchell <mark@codesourcery.com>
12353 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12354 * mangle.c (write_pointer_to_member_type): Fix mangling of
12355 pointers to cv-qualified member function types.
12357 * init.c (build_delete): Create a SAVE_EXPR for the address if
12358 we're going to use it more than once.
12360 2001-04-13 Mark Mitchell <mark@codesourcery.com>
12362 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12363 (expand_ptremfunc_cst): Change prototype.
12364 (delta2_from_ptrmemfunc): Remove.
12365 * expr.c (cplus_expand_constant): Adjust call to
12366 expand_ptrmemfunc_cst.
12367 * typeck.c (build_ptrmemfunc1): Simplify.
12368 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12369 results in a constant.
12370 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12371 (delta2_from_ptrmemfunc): Remove.
12372 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12374 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
12376 * cp-tree.h (decl_namespace_list): New macro.
12377 (struct saved_scope): Add decl_ns_list.
12378 * decl.c (mark_saved_scope): Mark it.
12379 * decl2.c: Lose static decl_namespace_list.
12380 (init_decl2): Don't save it.
12382 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12384 * cp-tree.h (warn_return_type, yylex): Delete redundant
12387 * decl.c (current_class_depth, global_namespace): Likewise.
12389 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12391 * repo.c (flag_use_repository): Likewise.
12393 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12395 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12396 set_block, pushdecl, getdecls, gettags, init_decl_processing,
12397 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12398 lvalue_or_else, print_lang_statistics, comp_target_types,
12399 unsigned_type, signed_type, signed_or_unsigned_type,
12400 build_function_call, mark_addressable, incomplete_type_error):
12401 Delete redundant declarations.
12403 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
12405 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12406 (TYPE_ANONYMOUS_P): New macro.
12407 (TAGGED_TYPE_P): New macro.
12408 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12409 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12410 * tree.c (no_linkage_helper): Likewise.
12411 * semantics.c (begin_class_definition): Likewise.
12412 * pt.c (convert_template_argument): Likewise.
12413 * lex.c (check_for_missing_semicolon): Likewise.
12415 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12417 * class.c (dfs_unshared_virtual_bases): New function.
12418 (mark_primary_bases): Call it.
12419 (check_bases): Ignore virtual bases when determining
12422 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12424 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12426 2001-04-11 Mark Mitchell <mark@codesourcery.com>
12428 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12429 cloned function to the clone.
12431 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12433 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12435 * semantics.c: Include expr.h.
12437 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
12439 * method.c (implicitly_declare_fn): Commonize code for copy ctor
12440 and assignment op. Set TREE_USED for parameter.
12442 2001-04-10 Mark Mitchell <mark@codesourcery.com>
12444 * class.c (find_final_overrider_data): Add `candidates'.
12445 (dfs_find_final_overrider): Don't issue error messages
12447 (find_final_overrider): Issue error messages here.
12448 (build_base_field): Don't warn about amgibuous direct bases here.
12449 (warn_about_ambiguous_direct_bases): New function.
12450 (layout_class_type): Use it.
12452 2001-04-10 Richard Henderson <rth@redhat.com>
12454 * typeck.c (build_array_ref): Push the array reference inside
12455 COMPOUND_EXPR and COND_EXPR.
12457 2001-04-05 Mark Mitchell <mark@codesourcery.com>
12459 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12460 * decl.c (duplicate_decls): Adjust accordingly.
12461 (maybe_commonize_var): Likewise.
12462 (grokfndecl): Likewise.
12463 (start_function): Likewise.
12464 (start_method): Likewise.
12465 * decl2.c (key_method): Likewise.
12466 (import_export_decl): Likewise.
12467 * method.c (implicitly_declare_fn): Likewise.
12468 * optimize.c (maybe_clone_body): Likewise.
12470 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
12472 * lang-specs.h: Add __DEPRECATED.
12474 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
12476 * search.c (get_dynamic_cast_base_type): When building a new
12477 constant, set its type to ssizetype.
12479 2001-04-04 Jakub Jelinek <jakub@redhat.com>
12481 * optimize.c (expand_call_inline): Only add newly inlined statements
12482 into inlined_stmts.
12484 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12486 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12487 (OPERATOR_FORMAT): Likewise.
12488 (OPERATOR_TYPENAME_FORMAT): Likewise.
12489 * operators.def: Remove old name-mangling information.
12490 * decl.c (grok_op_properties): Adjust accordingly.
12491 * lex.c (init_operators): Likewise.
12492 * rtti.c (get_tinfo_decl): Issue error messages about types that
12493 have variable size.
12495 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12497 * decl2.c (import_export_decl): Don't call import_export_class
12498 when processing an inline member function.
12499 * semantics.c (expand_body): Call import_export_decl before
12500 emitting inline functions.
12502 2001-03-28 Richard Henderson <rth@redhat.com>
12504 IA-64 ABI Exception Handling:
12505 * cp-tree.def (EH_SPEC_BLOCK): New.
12506 (MUST_NOT_THROW_EXPR): New.
12507 * cp-tree.h: Update changed function declarations.
12508 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12509 (CPTI_CALL_UNEXPECTED): New.
12510 (struct cp_language_function): Rename x_eh_spec_try_block
12511 to x_eh_spec_block.
12512 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12513 * decl.c (current_binding_level): If no current function
12514 bindings, revert to scope_chain.
12515 (initialize_predefined_identifiers): Remove __cp_push_exception.
12516 (store_parm_decls): Use begin_eh_spec_block.
12517 (finish_function): Use finish_eh_spec_block.
12518 (mark_lang_function): Update for name changes.
12519 * decl2.c (finish_file): No mark_all_runtime_matches.
12520 * dump.c (cp_dump_tree): Handle new tree codes.
12521 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12522 * except.c (catch_language_init, catch_language): Remove.
12523 (init_exception_processing): Don't set language code.
12524 Initialize call_unexpected_node, protect_cleanup_actions,
12525 eh_personality_libfunc, lang_eh_runtime_type.
12526 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12527 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12528 (prepare_eh_type): Split out type canonicalizations ...
12529 (build_eh_type_type): ... from here.
12530 (build_eh_type_type_ref): Remove.
12531 (mark_all_runtime_matches): Remove.
12532 (build_exc_ptr): New.
12533 (do_begin_catch, do_end_catch): New.
12534 (do_pop_exception): Remove.
12535 (build_terminate_handler): Remove.
12536 (choose_personality_routine): Split out language choice from ...
12537 (initialize_handler_parm): ... here.
12538 Use MUST_NOT_THROW_EXPR.
12539 (expand_start_catch_block): Use do_begin_catch. Simplify Java
12540 exception object handling.
12541 (expand_start_eh_spec, expand_end_eh_spec): Remove.
12542 (expand_exception_blocks, alloc_eh_object): Remove.
12543 (begin_eh_spec_block, finish_eh_spec_block): New.
12544 (do_allocate_exception, do_free_exception): New.
12545 (expand_throw): Merge into ...
12546 (build_throw): ... here. Update for abi.
12547 * expr.c (cplus_expand_expr): No expand_internal_throw.
12548 Handle MUST_NOT_THROW_EXPR.
12549 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12550 * semantics.c (*) Update for except.h name changes.
12551 (genrtl_try_block): No protect_with_terminate.
12552 (genrtl_eh_spec_block): New.
12553 (genrtl_handler): Don't emit the goto here.
12554 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12555 (genrtl_finish_function): Don't expand_exception_blocks.
12556 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12558 2001-03-28 Richard Henderson <rth@redhat.com>
12560 * decl.c (struct named_label_list): Rename eh_region to
12561 in_try_scope, add in_catch_scope.
12562 (struct binding_level): Rename eh_region to is_try_scope,
12563 add is_catch_scope.
12564 (note_level_for_try): Rename from note_level_for_eh.
12565 (note_level_for_catch): New.
12566 (poplevel): Copy both is_try_scope and is_catch_scope to
12567 the named_label_list struct.
12568 (check_previous_goto_1): Don't check for catch block via
12569 DECL_ARTIFICIAL; use in_try_scope instead.
12570 (check_goto): Likewise.
12571 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12572 * except.c (expand_start_catch_block): Call note_level_for_catch.
12573 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12575 2001-03-27 Richard Henderson <rth@redhat.com>
12577 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12578 exceptions_via_longjmp.
12580 2001-03-27 Phil Edwards <pme@sources.redhat.com>
12582 * pt.c (check_default_tmpl_args): Make error messages clearer.
12584 2001-03-26 Phil Edwards <pme@sources.redhat.com>
12586 * error.c: Also undefine 'A' macro used for cp_printers definition.
12588 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12590 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12592 2001-03-26 Mike Yang <yang@research.att.com>
12593 Mark Mitchell <mark@codesourcery.com>
12595 * dump.c (dump_access): New function.
12596 (cp_dump_tree): Use it. Dump basetype information for class
12599 2001-03-26 Mark Mitchell <mark@codesourcery.com>
12601 * Makefile.in (optimize.o): Depend on params.h.
12602 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12603 (init_decl_processing): Set flag_no_inline when doing
12605 * optimize.c: Include params.h.
12606 (struct inline_data): Improve documentation of FNS. Add
12607 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12608 (INSNS_PER_STMT): New macro.
12609 (remap_block): Use CLONING_P.
12610 (inlinable_function_p): Don't inline big functions.
12611 (expand_call_inline): Keep track of how much inlining we've done.
12612 (optimize_function): Set FIRST_INLINED_FN.
12613 (maybe_clone_body): Set CLONING_P.
12614 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12616 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12617 rest_of_compilation. Clear DECL_RTL for local variables
12619 (clear_decl_rtl): New function.
12621 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
12624 * cp-tree.h (skip_type_access_control,
12625 reset_type_access_control): Prototype.
12626 * decl.c (grokdeclarator): Access of friends is not checked.
12627 * parse.y (component_decl_list): Reset type access control.
12628 * semantics.c (decl_type_access_control): Clear
12629 current_type_lookups.
12630 (save_type_access_control): Don't save if not deferring.
12631 (skip_type_access_control, reset_type_access_control): New
12633 (begin_class_definition): Do type access control for basetypes.
12634 Start deferred access control.
12635 (finish_class_definition): Resume immediate access control if
12636 this is a local class.
12638 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12640 * class.c (add_method): Use memcpy/memmove, not bcopy.
12642 * decl.c (duplicate_decls): Likewise.
12644 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12646 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12649 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12651 * decl.c (local_names): Define.
12652 (push_local_name): New.
12653 (grok_reference_init): Return init if initializing static reference
12654 variable with non-constant instead of emitting it.
12655 Move expand_static_init call to cp_finish_decl.
12656 (layout_var_decl): Call push_local_name.
12657 (maybe_commonize_var): Allow inlining functions even if they have
12658 static local variables, use comdat_linkage for them if flag_weak.
12659 (check_initializer): Call obscure_complex_init if
12660 grok_reference_init returned nonzero.
12661 (save_function_data): Clear x_local_names.
12662 (pop_cp_function_context): Free x_local_names.
12663 (mark_inlined_fns): Remove.
12664 (mark_lang_function): Mark x_local_names.
12665 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12666 Mark inlined_fns as tree, remove call to mark_inlined_fns.
12667 * class.c (alter_access): Ensure DECL_ACCESS is never set if
12668 DECL_DISCRIMINATOR_P.
12669 * cp-tree.h (cp_language_function): Add x_local_names.
12670 (lang_decl_flags): Add discriminator into u2.
12671 (lang_decl_inlined_fns): Remove.
12672 (lang_decl): inlined_fns is now a TREE_VEC.
12673 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12674 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12675 TREE_VEC, not a custom structure.
12676 (optimize_function): Likewise.
12677 * mangle.c (discriminator_for_local_entity): Discriminate among
12678 VAR_DECL local entities.
12679 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12682 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
12684 Add support for Java interface method calls.
12685 * cp-tree.h (struct lang_type): Add java_interface flag.
12686 (TYPE_JAVA_INTERFACE): New macro.
12687 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12688 by setting TYPE_JAVA_INTERFACE.
12689 * call.c (java_iface_lookup_fn): New static.
12690 (build_over_call): If calling a method declared in a
12691 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12692 expression which resolves the function address.
12693 (build_java_interface_fn_ref): New function.
12695 2001-03-22 Richard Henderson <rth@redhat.com>
12697 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12698 * except.c: Don't include it.
12700 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12701 based on an idea from Joe Buck <jbuck@synopsys.com>
12703 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12705 (data_def, component_decl): Add reductions to bad_decl.
12707 2001-03-22 Jakub Jelinek <jakub@redhat.com>
12709 * method.c (do_build_assign_ref): Don't use build_modify_expr for
12710 anonymous aggregates, since they don't have assignment operator
12712 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12713 assignment operators for anonymous structure fields.
12715 2001-03-21 Jason Merrill <jason@redhat.com>
12717 * pt.c (instantiate_decl): Abort if we see a member constant
12718 instantiation that doesn't already have its initializer.
12719 Downgrade explicit instantiation without definition to pedwarn.
12721 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12722 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12723 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12725 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12726 (pending_vtables): Remove.
12727 * decl2.c (pending_vtables): Remove.
12728 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12729 CLASSTYPE_VTABLE_NEEDS_WRITING.
12730 (import_export_class): Likewise.
12731 (init_decl2): Don't mark pending_vtables.
12732 * lex.c (handle_pragma_vtable): Just sorry.
12733 * pt.c (instantiate_class_template): Don't mess with
12734 CLASSTYPE_VTABLE_NEEDS_WRITING.
12735 (mark_class_instantiated): Likewise.
12736 * ptree.c (print_lang_type): Don't print it.
12737 * semantics.c (begin_class_definition): Don't set it.
12739 * pt.c (template_tail): Replace with last_pending_template.
12740 (maybe_templates, maybe_template_tail): Remove.
12741 (add_pending_template): Adjust.
12742 (instantiate_pending_templates): Adjust.
12744 * cp-tree.h (struct saved_scope): Remove lang_stack field.
12745 (current_lang_stack): Remove.
12746 * decl.c (maybe_push_to_top_level): Don't initialize it.
12747 (duplicate_decls): Use current_lang_depth.
12748 (xref_basetypes): Likewise.
12749 * class.c (current_lang_depth): New fn.
12750 (push_lang_context): Use more varray functionality.
12751 (pop_lang_context): Likewise.
12753 * error.c (GLOBAL_THING): Always use '__'.
12755 2001-03-21 Mark Mitchell <mark@codesourcery.com>
12757 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12759 * mangle.c (mangle_decl_string): Mangle the names of overloaded
12760 operators, even when they have `extern "C"' linkage.
12762 2001-03-19 Mark Mitchell <mark@codesourcery.com>
12764 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12765 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12766 where it's not necessary.
12767 (add_method): Remove optimization involving comparison of
12768 DECL_ASSEMBLER_NAME.
12769 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12770 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12771 where it's not necessary.
12772 (check_methods): Likewise.
12773 (build_clone): Likewise.
12774 (built_vtt): Likewise.
12775 * cp-tree.h (DECL_NEEDED_P): Likewise.
12776 * decl.c (pushtag): Likewise.
12777 (duplicate_decls): Likewise.
12778 (pushdecl): Likewise.
12779 (builtin_function): Likewise.
12780 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12781 (build_cp_library_fn): Likewise.
12782 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12783 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12784 where it's not necessary.
12785 (make_rtl_for_nonlocal_decl): Likewise.
12786 (cp_finish_decl): Likewise.
12787 (grokfndecl): Likewise.
12788 (grokvardecl): Likewise.
12789 (grokdeclarator): Likewise.
12790 (start_function): Likewise.
12791 (cp_missing_return_ok_p): Likewise.
12792 * decl2.c (grokclassfn): Likewise.
12793 (check_classfn): Likewise.
12794 (finish_static_data_member_decl): Likewise.
12795 (grokfield): Likewise.
12796 * error.c (GLOBAL_IORD_P): Remove.
12797 (dump_global_iord): Improve output.
12798 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12799 * except.c (nothrow_libfn_p): Summarily reject any function not in
12801 * init.c (build_java_class_ref): Don't explicitly set
12802 DECL_ASSEMBLER_NAME after calling mangle_decl.
12803 * mangle.c (mangle_decl_string): Handle extern "C" functions.
12804 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12805 * method.c (set_mangled_name_for_decl): Don't explicitly set
12806 DECL_ASSEMBLER_NAME after calling mangle_decl.
12807 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12808 IDENTIFIER_GLOBAL_VALUE for the thunk.
12809 * pt.c (set_mangled_name_for_template_decl): Remove.
12810 (check_explicit_specialization): Don't use it.
12811 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12812 (tsubst_friend_function): Likewise.
12813 (tsubst_decl): Likewise.
12814 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12815 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12816 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12817 where it's not necessary.
12818 (tinfo_base_init): Likewise.
12819 (create_real_tinfo_var): Likewise.
12820 * search.c (looup_field_1): Likewise.
12821 * semantics.c (finish_named_return_value): Likewise.
12822 * tree.c (init_tree): Set lang_set_decl_assembler_name.
12824 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
12826 Correct semantics restrictions checking in throw-expression.
12827 * except.c (is_admissible_throw_operand): New function.
12828 (build_throw): Use it.
12830 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12832 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12835 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12837 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12838 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12839 * decl.c (duplicate_decls): Likewise.
12840 (builtin_function): Likewise.
12841 (build_library_fn): Likewise.
12842 (build_cp_library_fn): Likewise.
12843 (check_initializer): Likewise.
12844 (cp_finish_decl): Likewise.
12845 * decl2.c (grokfield): Likewise.
12846 (grok_function_init): Remove #if 0'd code.
12847 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12848 * friend.c (do_friend): Likewise.
12849 * init.c (get_temp_regvar): Likewise.
12850 * method.c (make_thunk): Likewise.
12851 * pt.c (tsubst_friend_function): Likewise.
12852 (tsubst_decl): Likewise.
12853 (regenerate_decl_from_template): Likewise.
12854 * semantics.c (genrtl_named_return_value): Likewise.
12855 (expand_body): Likewise.
12856 (genrtl_finish_function): Likewise.
12857 * tree.c (cp_tree_equal): Likewise.
12859 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
12861 * call.c (convert_like_real): Add extra semantics to INNER
12862 parameter. Don't convert to temporary if a user conversion
12863 gives us an lvalue that we're about to bind to a reference.
12864 Set INNER to indicate pending reference binding on recursive
12867 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12869 * cp/lex.c: Delete duplicate pending_lang_change.
12871 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12873 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12875 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12876 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12878 2001-03-09 Zack Weinberg <zackw@stanford.edu>
12880 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12882 2001-03-08 Stan Shebs <shebs@apple.com>
12884 * cp-tree.h (set_identifier_local_value): Remove unused decl.
12886 2001-03-06 Zack Weinberg <zackw@stanford.edu>
12888 * spew.c: Remove references to CPP_OSTRING.
12890 2001-03-06 Andrew Haley <aph@redhat.com>
12892 * typeck.c (convert_arguments): Check that we have an fndecl.
12894 2001-03-05 Andrew Haley <aph@redhat.com>
12896 * typeck.c (convert_arguments): Don't do ellipsis conversion for
12897 __built_in_constant_p.
12899 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12901 * typeck.c (build_static_cast): Allow enum to enum conversions
12904 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12906 * class.c (check_field_decls): Pointers to member do not a
12907 non-pod struct make, as per DR 148.
12909 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12911 * call.c (joust): cp_pedwarn when using gnu extension concerning
12912 worst conversion sequences.
12914 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12916 * decl.c: Replace all uses of 'boolean' with 'bool'.
12918 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12920 * lang-specs.h: Add zero initializer for cpp_spec field to
12921 all array elements that need one. Don't put an #ifdef inside
12922 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12925 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12927 Implement using decls inside template functions.
12928 * decl2.c (validate_nonmember_using_decl): Don't special case
12929 fake_std_node in the global namespace. Don't reject early when
12930 processing a template.
12931 (do_local_using_decl): Add to statement tree. Don't do further
12932 processing when building a template.
12933 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12935 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12937 * decl2.c (do_nonmember_using_decl): Don't complain if we find
12938 same function. Do complain about ambiguating extern "C"
12941 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
12943 Remove floating point and complex type template constant parms.
12944 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12945 COMPLEX_TYPE extensions.
12946 (invalid_nontype_parm_type_p): Likewise.
12948 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
12950 * except.c (call_eh_info): Revert "match_function"'s type.
12952 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
12954 Fix ctor vtable vcall offsets.
12955 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12956 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12957 (get_matching_base): Remove.
12958 (get_original_base): New function.
12959 (build_vtbl_initializer): Initialize vid.rtti_binfo.
12960 Use a virtual thunk for a ctor vtable with an index
12961 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12962 primary base within a constructor vtable. Only set
12963 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12964 when primary base has been lost.
12965 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12967 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
12969 * call.c (joust): Ensure more_specialized()'s argument length
12970 parameter has correct value for constructors.
12972 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
12974 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12976 * decl.c (mark_inlined_fns): Prototype.
12978 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12980 * spew.c (yylex): Correct handling of friends.
12982 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12984 * mangle.c (write_encoding): Pass write_function_type the
12985 FUNCTION_DECL for the function being encoded.
12986 (write_function_type): Pass it along to write_bare_function_type.
12987 (write_bare_function_type): Pass it along to write_method_parms.
12988 (write_method_parms): Don't mangle the compiler-generated
12989 parameters to a constructor or destructor.
12991 2001-02-22 Andreas Jaeger <aj@suse.de>
12993 * optimize.c: Include toplev.h for
12994 note_deferral_of_defined_inline_function prototype.
12996 2001-02-22 Jakub Jelinek <jakub@redhat.com>
12998 * cp-tree.h (struct lang_decl_inlined_fns): New.
12999 (struct lang_decls): Add inlined_fns.
13000 (DECL_INLINED_FNS): New macro.
13001 * optimize.c (struct inline_data): Add inlined_fns.
13002 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13003 (inlinable_function_p): Likewise, fix typo in comment,
13004 function is not inlinable if it already inlined function currently
13006 (expand_call_inline): Add fn to inlined_fns if necessary.
13007 (optimize_function): Initialize inlined_fns.
13008 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13009 * decl.c (mark_inlined_fns): New function.
13010 (lang_mark_tree): Call it.
13012 2001-02-21 Jason Merrill <jason@redhat.com>
13014 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13015 (DECL_UNINLINABLE): Move to middle-end.
13017 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13018 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13019 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13020 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13021 parms and outer BLOCK. note_deferral_of_defined_inline_function.
13023 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13024 second parm of op=.
13026 2001-02-19 Mark Mitchell <mark@codesourcery.com>
13028 * decl2.c (set_decl_namespace): Allow explicit instantiations in
13031 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13033 * optimize.c (expand_call_inline): Don't walk subtrees of type
13036 2001-02-18 Mark Mitchell <mark@codesourcery.com>
13038 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13041 2001-02-18 Jason Merrill <jason@redhat.com>
13043 Do put the VTT parameter in DECL_ARGUMENTS.
13044 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13045 (current_vtt_parm): New macro.
13046 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13047 (DECL_HAS_VTT_PARM_P): New macro.
13048 (DECL_VTT_PARM): Remove.
13049 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13050 * decl.c (duplicate_decls): Only copy the operator code if
13052 (start_function): Set current_vtt_parm.
13053 (lang_mark_tree): Don't mark vtt_parm.
13054 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13055 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
13056 * class.c (build_clone): Maybe remove the VTT parm.
13057 * optimize.c (maybe_clone_body): Set up the VTT parm.
13058 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13059 * call.c (build_over_call): Just allow the VTT arg.
13060 * method.c (make_thunk): Don't set DECL_VTT_PARM.
13061 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13062 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13063 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13064 * error.c (dump_function_decl): Likewise.
13065 * call.c (build_user_type_conversion_1, convert_like_real): Abort
13066 if we try to call a constructor with in-charge or VTT parms.
13067 * method.c (skip_artificial_parms_for): New fn.
13068 * call.c (add_function_candidate, build_over_call): Call it.
13069 * call.c (build_new_method_call): Use current_vtt_parm.
13070 * init.c (expand_virtual_init): Likewise.
13071 * class.c (same_signature_p): No longer static.
13072 * cp-tree.h: Declare it.
13073 * search.c (look_for_overrides_r): Use it.
13075 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13077 * cp-tree.h (new_abi_rtti_p): Remove.
13078 (name_mangling_version): Likewise.
13079 (flag_do_squangling): Likewise.
13080 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13081 * decl.c (grokfndecl): Likewise.
13082 * decl2.c (name_mangling_version): Remove.
13083 (flag_do_squangling): Likewise.
13084 (lang_f_options): Remove `squangle'.
13085 (unsupported_options): Add `squangle'.
13086 (cxx_decode_option): Issue a warning about uses of
13087 -fname-mangling-version.
13088 (finish_file): Remove old ABI support.
13089 * pt.c (check_explicit_specialization): Likewise.
13090 (tsubst_decl): Likewise.
13091 * rtti.c (init_rtti_processing): Likewise.
13092 (build_headof): Likewise.
13093 (get_tinfo_decl_dynamic): Likewise.
13094 (tinfo_from_decl): Likewise.
13095 (build_dynamic_cast_1): Likewise.
13096 (synthesize_tinfo_var): Likewise.
13097 * init.c (build_new): Allow enumeration types for the array-bounds
13098 in a direct-new-declarator.
13100 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13102 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13103 TREE_PROTECTED from the template being specialized.
13105 2001-02-17 Jason Merrill <jason@redhat.com>
13107 * decl2.c (build_artificial_parm): Set TREE_READONLY.
13109 * decl.c (bad_specifiers): Allow throw specs on things with
13110 pointer-to-function or -member-function type.
13111 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13114 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13116 * call.c (check_dtor_name): Handle template names correctly.
13118 2001-02-16 Jason Merrill <jason@redhat.com>
13120 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13121 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13122 * optimize.c (maybe_clone_body): Don't substitute it.
13123 * call.c (build_new_method_call): Check in_chrg instead.
13124 * init.c (expand_virtual_init): Likewise.
13126 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
13128 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13129 class-type introduces at least a type-name.
13131 2001-02-16 Jakub Jelinek <jakub@redhat.com>
13133 * call.c (convert_like_real): Create a temporary for non-lvalue.
13135 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
13137 * cp-tree.h: Fix typos in comments.
13139 2001-02-16 Jason Merrill <jason@redhat.com>
13141 * optimize.c (remap_block): If we're compiling a clone, pass the
13142 new block to insert_block.
13144 2001-02-16 Mark Mitchell <mark@codesourcery.com>
13146 * semantics.c (finish_asm_stmt): Robustify.
13148 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13150 * pt.c (push_template_decl_real): Don't remangle the name of a
13153 2001-02-15 Jim Meyering <meyering@lucent.com>
13155 * Make-lang.in (c++.install-common): Depend on installdirs.
13156 (c++.install-info): Likewise.
13157 (c++.install-man): Likewise.
13159 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13161 * typeck2.c (build_m_component_ref): Robustify.
13163 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
13165 * friend.c (do_friend): Don't take the nested [template] class
13166 into account when deciding whether to warn about the friend
13167 function not referring to a template function.
13169 2001-02-14 Jakub Jelinek <jakub@redhat.com>
13171 * typeck.c (build_unary_op): Clarify error message.
13173 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
13175 * parse.y (component_constructor_declarator): allow optional
13176 parentheses around constructor class name.
13178 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13180 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13182 * init.c (emit_base_init): Remove incorrect comment about
13184 * method.c (make_thunk): Fix comment alignment.
13186 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13188 Kill remnants of this is variable.
13189 * cp-tree.h (flag_this_is_variable): Remove.
13190 * decl2.c (flag_this_is_variable): Remove.
13191 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13192 (build_vbase_path): The path is non-static, even in a cdtor.
13193 (resolves_to_fixed_type_p): Add additional return value.
13194 * search.c (init_vbase_pointers): Adjust.
13195 * tree.c (lvalue_p_1): Adjust.
13196 * typeck.c (mark_addressable): Adjust.
13198 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13200 * pt.c (unify): Don't check cv quals of array types.
13202 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13204 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13205 check whether we already have the type.
13207 2001-02-13 Mark Mitchell <mark@codesourcery.com>
13209 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13210 * call.c (build_op_delete_call): Simplify to remove duplicate
13212 * class.c (clone_function_decl): Don't build the deleting variant
13213 of a non-virtual destructor.
13214 * decl.c (finish_destructor_body): Don't call delete if this is a
13215 non-virtual destructor.
13216 * init.c (build_delete): Explicitly call `operator delete' when
13217 deleting an object with a non-virtual destructor.
13219 2001-02-13 Jason Merrill <jason@redhat.com>
13221 * lang-specs.h: Add more __EXCEPTIONS.
13223 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13225 * typeck2.c (process_init_constructor): Check
13226 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13228 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13230 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13231 Remove spurious information in comment. Allow further
13232 adjustments of REFERENCE_TYPE args.
13234 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13236 * errfn.c (cp_deprecated): Tweak diagnostic text.
13237 * parse.y (new_initializer): Deprecate initializer lists
13240 2001-02-12 Mark Mitchell <mark@codesourcery.com>
13242 Remove old ABI support.
13244 2001-02-11 Mark Mitchell <mark@codesourcery.com>
13246 * decl2.c (flag_vtable_thunks): Always set it to 1.
13247 (flag_new_abi): Likewise.
13248 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13250 * Makefile.in (g++spec.o): Fix typo.
13252 2001-02-09 Jason Merrill <jason@redhat.com>
13254 * lang-specs.h: Restore definition of __EXCEPTIONS.
13256 2001-02-08 Jason Merrill <jason@redhat.com>
13258 * search.c (shared_member_p): New function.
13259 (lookup_field_r): Use it.
13260 * cp-tree.h (SHARED_MEMBER_P): Remove.
13262 * method.c (process_overload_item): Handle template-dependent array
13264 * pt.c (type_unification_real): If we end up with undeduced nontype
13267 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13270 * typeck2.c (friendly_abort): Don't say anything if we have
13271 earlier errors or sorries.
13273 * decl.c (check_tag_decl): Notice attempts to redefine bool and
13274 wchar_t. Ignore if in_system_header.
13276 * decl.c (maybe_push_cleanup_level): New fn...
13277 (start_decl_1): ...split out from here.
13278 * cvt.c (build_up_reference): Use it.
13279 * cp-tree.h: Declare it.
13281 2001-02-07 Mark Mitchell <mark@codesourcery.com>
13283 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13286 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
13288 * pt.c (lookup_template_class): Make sure it's a primary
13289 template or template_template_parm when called from the parser.
13290 (instantiate_template_class): Add assertion.
13292 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
13294 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13295 from error_mark_node.
13297 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
13299 Fix specification and implementation bugs in V3 ABI
13300 construction vtables.
13301 * cp-tree.h (flag_dump_class_layout): New flag.
13302 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13303 (BINFO_LOST_PRIMARY_P): New flag.
13304 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13305 (BINFO_PRIMARY_MARKED_P): Rename to ...
13306 (BINFO_PRIMARY_P): ... here.
13307 (binfo_via_virtual): New prototype.
13308 * decl2.c (flag_dump_class_layout): New flag.
13309 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13310 use `=' as a file name separator.
13311 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13313 (build_vtbl_address): If this is a virtual primary base, then
13314 get the vtbl of what it is ultimately primary for.
13315 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13316 for BINFO_PRIMARY_P.
13317 (dfs_skip_nonprimary_vbases_markedp): Likewise.
13318 (get_shared_vbase_if_not_primary): Likewise.
13319 (dfs_get_pure_virtuals): Likewise.
13320 (expand_upcast_fixups): Likewise.
13321 (fixup_virtual_upcast_offsets): Likewise.
13322 (dfs_find_vbase_instance): Likewise.
13323 (find_vbase_instance): Likewise.
13324 (binfo_from_vbase): Adjust comment to reflect reality.
13325 (binfo_via_virtual): New function.
13326 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13327 for binfo walking during VTT construction.
13328 (dfs_mark_primary_bases): Remove.
13329 (force_canonical_binfo_r): New function.
13330 (force_canonical_binfo): New function.
13331 (mark_primary_virtual_base): New function.
13332 (mark_primary_bases): Walk in inheritance graph order, use
13333 mark_primary_virtual_base.
13334 (determine_primary_base): Use some more intermediate variables.
13335 (dfs_find_final_overrider): Don't check for overriding along a
13337 (dfs_modify_vtables): Walk into primary virtual bases too.
13338 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13339 (build_base_fields): Likewise.
13340 (dfs_set_offset_for_unshared_vbases): Likewise.
13341 (layout_virtual_bases): Likewise.
13342 (end_of_class): Likewise.
13343 (finish_struct_1): Call dump_class_hierarchy, if requested.
13344 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13345 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13346 (dump_class_hierarchy): Add file parameter. Append to file, if
13348 (finish_vtbls): Adjust accumulate_vtbl_inits call.
13349 Use canonical base for virtual bases.
13350 (build_vtt): Add more comments. Adjust build_vtt_inits call.
13351 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13352 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13353 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13355 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13356 from DATA. We want virtual primary bases and all bases via virtual.
13357 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13358 virtual base when not a construction vtable.
13359 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13360 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13361 Use canonical bases when processing virtual bases.
13362 (accumulate_vtbl_inits): We're interested in any base via a
13364 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13365 within a construction vtable, determine what is being overridden.
13366 (build_vtbl_initializer): Add more comments
13367 (add_vcall_offset_vtbl_entries_1): Adjust comment.
13368 (build_rtti_vtbl_entries): Check if the base has lost its
13371 2001-02-05 Mark Mitchell <mark@codesourcery.com>
13373 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13375 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13377 * decl.c (pushdecl): Call abort instead of fatal.
13378 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13379 * init.c (build_new_1): Likewise.
13380 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13381 * decl.c (build_typename_type): hash_table_init now returns void.
13382 decl.c (init_decl_processing): Make an error non-fatal.
13384 2001-02-04 Mark Mitchell <mark@codesourcery.com>
13386 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13388 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13389 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13390 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13391 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13392 * decl.c (maybe_commonize_var): Use the new name-mangling where
13394 * decl2.c (comdat_linkage): Enhance comments. Make all
13395 compiler-generated things static, if COMDAT is not available.
13396 (get_tinfo_decl): Do not make typeinfo objects that belong in the
13398 (tinfo_base_init): Use the correct mangled name for typeinfo
13399 strings, and push them into the global scope.
13400 (typeinfo_in_lib_p): New function.
13401 (synthesize_tinfo_var): Use it.
13402 (create_real_tinfo_var): Likewise.
13404 2001-02-03 Jakub Jelinek <jakub@redhat.com>
13406 * decl.c (push_class_binding): Use context_for_name_lookup instead
13407 of CP_DECL_CONTEXT.
13408 * search.c (context_for_name_lookup): Remove static. Check for NULL
13409 context in the loop.
13410 * cp-tree.h (context_for_name_lookup): Add prototype.
13412 2001-02-02 Jakub Jelinek <jakub@redhat.com>
13414 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13415 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13417 * call.c (convert_class_to_reference, build_user_type_conversion_1,
13418 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13420 2001-02-02 Mark Mitchell <mark@codesourcery.com>
13422 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13423 of macros used when compiling g++spec.c.
13424 * g++spec.c (lang_specific_driver): Link with the shared
13427 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
13429 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13430 make_reference_declarator, make_call_declarator), method.c
13431 (implicitly_declare_fn), parse.y (namespace_using_decl,
13432 notype_unqualified_id, expr_or_declarator, new_type_id,
13433 after_type_declarator, direct_after_type_declarator,
13434 notype_declarator, complex_notype_declarator,
13435 complex_direct_notype_declarator, qualified_id,
13436 notype_qualified_id, overqualified_id, direct_new_declarator,
13437 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13438 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13439 instead of build_parse_node.
13441 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13443 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13444 (minus_one_node): Moved to top level gcc directory. Renamed
13445 to integer_minus_one_node.
13447 * init.c (init_init_processing): Don't set minus_one_node.
13448 (build_vec_init): Use integer_minus_one_node.
13450 * rtti.c (get_tinfo_decl_dynamic): Likewise.
13452 2001-01-28 Jakub Jelinek <jakub@redhat.com>
13454 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13455 identical and they would be replaced with constant, remove
13456 MODIFY_EXPR from the tree.
13458 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13460 * Make-lang.in: Remove all dependencies on defaults.h.
13461 * call.c: Don't include defaults.h.
13462 * decl.c: Likewise.
13463 * decl2.c: Likewise.
13464 * except.c: Likewise.
13466 * rtti.c: Likewise.
13467 * tree.c: Likewise.
13468 * typeck.c: Likewise.
13470 2001-01-25 Jakub Jelinek <jakub@redhat.com>
13472 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13473 operators even in "C" linkage.
13474 * method.c (set_mangled_name_for_decl): Likewise.
13475 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13476 overloaded operators in "C" linkage.
13478 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13480 * pt.c (tsubst_decl): Remove IN_DECL parameter.
13481 (tsubst_arg_types): Check parameter is not void.
13482 (tsubst): Adjust tsubst_decl call.
13484 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13486 * call.c (add_builtin_candidate): Quote std properly, from
13489 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13491 * pt.c (check_explicit_specialization): Clone constructors and
13494 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13496 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13497 indicates anything special about template depth. Make sure we
13498 only count the user visible template classes.
13500 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13502 * call.c (build_conv): Typo in comment.
13503 (add_builtin_candidate): Add more explanation.
13504 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13505 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13506 when we have enumeral types.
13507 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13508 candidates for relops and eqops.
13509 (joust): Simplify control flow. Allow a non-template user
13510 function to hide a builtin.
13512 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
13514 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13515 (more_specialized): Add deduction parameter.
13516 * call.c (joust): Adjust more_specialized call.
13517 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13518 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13519 (get_bindings_order): Remove.
13520 (get_bindings_real): Add DEDUCE parameter.
13521 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13522 REFERENCE_TYPE jig for DEDUCE_ORDER.
13523 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13524 maybe_adjust_types_for_deduction.
13525 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13527 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13528 (check_cv_quals_for_unify): Use new unify qualifier flags.
13529 (unify): Clear new unify qualifier flags.
13530 (get_bindings_real): Add DEDUCE parameter.
13531 (get_bindings): Adjust call to get_bindings_real.
13532 (get_bindings_overload): Likewise.
13533 (most_specialized_instantiation): Adjust call to
13536 2001-01-19 Jason Merrill <jason@redhat.com>
13538 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13540 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13543 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
13545 * decl2.c (arg_assoc_class): Fix double iteration logic.
13547 2001-01-19 Jason Merrill <jason@redhat.com>
13549 * init.c (build_delete): Always call convert_force to strip cv-quals.
13551 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13552 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13553 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13555 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13557 * search.c (get_vbase_1): Count only virtual bases.
13559 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13561 * class.c (duplicate_tag_error): Robustify flag clearing.
13563 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13565 * cp-tree.h (lookup_template_class): Add complain parm.
13566 * decl.c (lookup_namespace_name): Adjust call to
13567 lookup_template_class.
13568 (make_typename_type): Likewise.
13569 * semantics.c (finish_template_type): Likewise.
13570 * pt.c (lookup_template_class): Add complain parm. Adjust.
13571 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13572 (tsubst): Likewise.
13574 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13576 * pt.c (copy_default_args_to_explicit_spec): Preserve
13577 object's CV quals. Reorganize.
13579 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13581 * typeck.c (build_modify_expr): Say `initialization' for
13583 * init.c (build_default_init): Convert to enumeral type, if
13586 2001-01-18 Jakub Jelinek <jakub@redhat.com>
13588 * parse.y (nomods_initdcl0): Properly set things up for
13591 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13593 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13594 (type_unification_real): Set it.
13597 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13599 * decl.c (finish_destructor_body): Convert to vbase pointer here.
13601 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13603 * semantics.c (begin_class_definition): Check we're not inside a
13604 template parm list.
13606 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13608 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13611 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13613 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13614 * call.c (build_over_call): Add comment.
13616 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13618 * cvt.c (ocp_convert): Handle vector type conversion
13619 * typeck2.c (digest_init): Handle vector type initializations
13621 2001-01-16 Phil Edwards <pme@sources.redhat.com>
13623 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
13626 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13628 * pt.c (check_nontype_parm): Rename to ...
13629 (invalid_nontype_parm_type_p): ... here.
13630 (process_template_parm): Adjust.
13631 (convert_template_argument): Adjust.
13633 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13635 * pt.c (check_nontype_parm): New function.
13636 (process_template_parm): Use it.
13637 (convert_template_argument): Use it.
13638 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13641 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
13643 * tree.c: Add defaults.h
13644 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13645 * Make-lang.in (cp/tree.o): Add defaults.h.
13647 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13649 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13651 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13653 * g++.1: Change to be ".so man1/gcc.1".
13655 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13657 * Make-lang.in (c++.info, c++.install-info): Build and install g++
13659 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13660 ($(srcdir)/cp/g++int.info): New target.
13661 * gxxint.texi: Add info directory entry. Use @@ in email address.
13662 * .cvsignore: Update.
13664 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13666 * typeck.c (build_c_cast): Do template processing earlier.
13667 Always pedwarn on array casts.
13669 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13671 * friend.c (make_friend_class): Make sure a templated class is
13672 actually a template.
13674 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13676 * decl2.c (get_guard): Set linkage from guarded decl.
13678 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13680 * call.c (convert_default_arg): Check for unprocessed
13682 * cp-tree.h (replace_defarg): Move to spew.c.
13683 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13684 spew.c, which is where they really are.
13685 (done_pending_defargs): Declare.
13686 (unprocessed_defarg_fn): Declare.
13687 * decl.c (replace_defarg): Move to spew.c
13688 * parse.y (structsp): Call done_pending_defargs.
13689 * spew.c (defarg_fns): Rearrange list structure.
13690 (defarg_fnsdone): New static variable.
13691 (defarg_depfns): New static variable.
13692 (init_spew): Adjust.
13693 (add_defarg_fn): Store the type in TREE_TYPE.
13694 (do_pending_defargs): Detect and deal with ordering constraints
13696 (done_pending_defargs): New function.
13697 (unprocessed_defarg_fn): New function.
13698 (replace_defarg): Moved from decl.c. Robustify. Don't save
13699 if circularity detected.
13701 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13703 * pt.c (unify): Check array has a domain, before checking
13704 whether it is variable sized.
13706 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13708 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13709 parameters with pointers to arrays of unknown bound.
13711 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13713 * parse.y (template_parm_header, template_spec_header): New
13714 reductions. Split out from ...
13715 (template_header): ... here. Use them.
13716 (template_template_parm): Use template_parm_header.
13717 * semantics.c (finish_template_template_parm): Add assert.
13719 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13721 * mangle.c (write_builtin_type): Fix thinko.
13723 * pt.c (copy_default_args_to_explicit_spec_1): New function.
13724 (copy_default_args_to_explicit_spec): Likewise.
13725 (check_explicit_specialization): Use it.
13727 * class.c (finish_struct_1): Remove last argument in call to
13728 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13729 * decl.c (builtin_function): Likewise.
13730 (build_cp_library_fn): Likewise.
13731 (check_initializer): Likewise.
13732 (make_rtl_for_nonlocal_decl): Likewise.
13733 (cp_finish_decl): Likewise.
13734 (start_function): Likewise.
13735 * decl2.c (finish_anon_union): Likewise.
13736 * friend.c (do_friend): Likewise.
13737 * init.c (build_java_class_ref): Likewise.
13738 * method.c (make_thunk): Likewise.
13739 * pt.c (tsubst_friend_function): Likewise.
13740 * semantics.c (expand_body): Likewise.
13742 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13744 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13745 looking at DECL_CLONED_FUNCTION for non-functions.
13747 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13749 * error.c (dump_template_parameter): Use parm to determine how
13750 to print default value.
13752 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13754 * class.c (duplicate_tag_error): Clear more flags.
13756 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13758 * call.c (build_new_method_call): Use binfo_for_vbase.
13760 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
13762 * cp-tree.h (flag_cond_mismatch): Don't declare.
13763 * decl2.c (flag_cond_mismatch): Don't define.
13764 (lang_f_options): Remove cond-mismatch.
13765 (unsupported_options): Add cond-mismatch.
13767 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
13769 * class.c (handle_using_decl): Reject using of constructor name
13770 of sourcing class. Allow injecting of a method with same name as
13771 nested class. Fixup error messages.
13773 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
13775 * decl2.c (lang_decode_option): Handle -Wformat=2.
13777 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13779 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13780 initialized_in_class.
13781 (DECL_DEFINED_IN_CLASS_P): Rename to ...
13782 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13783 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13784 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13785 * pt.c (check_default_tmpl_args): Adjust for
13786 DECL_INITIALIZED_IN_CLASS_P.
13787 (instantiate_class_template): Likewise.
13788 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13790 * class.c (finish_struct): Constify saved_filename.
13792 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13794 * class.c (duplicate_tag_error): Adjust diagnostic.
13795 (finish_struct): Locally set location to start of struct.
13796 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13798 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13800 * decl.c (struct binding_level): Adjust class_shadowed comments
13801 to reflect reality.
13802 (push_class_level_binding): Adjust comments to reflect reality.
13803 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13804 Don't set TREE_VALUE on the class_shadowed list.
13806 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13808 * decl2.c (acceptable_java_type): Allow references too.
13809 * init.c (build_java_class_ref): When using the new ABI, search
13810 `class$' and have it mangled with `mangle_decl.'
13811 * mangle.c (write_java_integer_type_codes): New function.
13812 (write_builtin_type): Detect and mangle Java integer and real
13815 2001-01-07 Mark Mitchell <mark@codesourcery.com>
13817 * decl2.c (grokfield): Don't accept `asm' specifiers for
13818 non-static data members.
13820 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13822 * expr.c (cplus_expand_expr): Don't reset `target'.
13824 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
13826 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13828 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13830 * parse.y (template_datadef): Check for error_mark_node.
13832 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13834 * cp-tree.def (DEFAULT_ARG): Make `x' class.
13836 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
13838 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13839 (record_builtin_type): Make non-static.
13840 (flag_short_double): Don't declare.
13841 (init_decl_processing): Remove the creation of many tree nodes now
13842 in c_common_nodes_and_builtins.
13843 (build_void_list_node): New function.
13844 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13845 * cp-tree.h (flag_short_wchar): Don't declare.
13847 2001-01-04 Mark Mitchell <mark@codesourcery.com>
13849 * call.c (build_conv): Don't use build1 for USER_CONV.
13850 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13852 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
13854 * lex.c (lang_init): Call c_common_lang_init.
13856 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13858 * search.c (lookup_fnfields_here): Remove.
13859 (look_for_overrides_r): Use lookup_fnfields_1.
13860 Ignore functions from using declarations.
13862 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13864 Implement exceptions specifiers for implicit member functions.
13865 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13866 * method.c (synthesize_exception_spec): New function.
13867 (locate_dtor, locate_ctor, locate_copy): New functions.
13868 (implicitly_declare_fn): Generate the exception spec too.
13869 * search.c (check_final_overrider): Check artificial functions
13871 * typeck2.c (merge_exception_specifiers): New function.
13873 2001-01-03 Jason Merrill <jason@redhat.com>
13875 * init.c (build_default_init): New fn.
13876 (perform_member_init): Split out from here.
13877 (build_new_1): Use it. Simplify initialization logic.
13878 (build_vec_init): Take an array, rather than a pointer and maxindex.
13879 Speed up simple initializations. Don't clean up if we're assigning.
13880 * cp-tree.h: Adjust.
13881 * decl2.c (do_static_initialization): Remove TREE_VEC case.
13882 * parse.y (new_initializer): Return void_zero_node for ().
13883 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13884 * typeck2.c (digest_init): Only complain about user-written
13887 2000-12-22 Mike Stump <mrs@wrs.com>
13889 * decl2.c: (max_tinst_depth): Increase to 50.
13891 2001-01-02 Mark Mitchell <mark@codesourcery.com>
13893 * class.c (invalidate_class_lookup_cache): Zero the
13894 previous_class_values.
13895 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13897 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13898 * decl.c (free_bindings): New variable.
13899 (push_binding): Don't create a new binding if we have one on the
13901 (pop_binding): Put old bindings on the free list.
13902 (init_decl_processing): Use size_int, not build_int_2.
13903 Register free_bindings as a GC root.
13904 (cp_make_fname_decl): Use size_int, not build_int_2.
13905 (push_inline_template_parms_recursive): Likewise.
13906 (end_template_parm_list): Likewise.
13907 (for_each_template_parm): Do not use walk_tree_without_duplicates.
13908 (tsubst_template_parms): Use size_int, not build_int_2.
13909 (tsubst): Likewise.
13910 * rtti.c (get_vmi_pseudo_type_info): Likewise.
13912 2001-01-02 Richard Henderson <rth@redhat.com>
13914 * parse.y (asm): Set ASM_INPUT_P.
13916 2001-01-02 Jason Merrill <jason@redhat.com>
13918 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13921 * typeck.c (cp_truthvalue_conversion): New fn.
13922 * cvt.c (ocp_convert): Use it.
13924 * cp-tree.h: Lose c-common.c decls.
13926 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13927 * cvt.c (convert_to_void): Use type_unknown_p.
13929 * typeck.c (strip_all_pointer_quals): Also strip quals from
13930 pointer-to-member types.
13932 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
13935 * call.c (build_new_method_call): Do evaluate the object parameter
13936 when accessing a static member.
13937 * typeck.c (build_component_ref): Likewise.
13939 2001-01-02 Andreas Jaeger <aj@suse.de>
13941 * decl.c (cp_missing_noreturn_ok_p): New.
13942 (init_decl_processing): Set lang_missing_noreturn_ok_p.
13944 2000-12-29 Jakub Jelinek <jakub@redhat.com>
13946 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13948 2000-12-29 Mark Mitchell <mark@codesourcery.com>
13950 * class.c (pushclass): Remove #if 0'd code.
13951 * cp-tree.h (overload_template_name): Remove.
13952 * decl.c (store_bindings): Simplify.
13953 (pop_from_top_level): Likewise.
13954 * pt.c (overload_template_name): Remove.
13955 (instantiate_decl): Don't call push_to_top_level if it's not
13958 2000-12-28 Mark Mitchell <mark@codesourcery.com>
13960 * pt.c (register_local_specialization): Don't return a value.
13961 (lookup_template_class): Use move-to-front heuristic when looking
13962 up template instantiations.
13963 (instantiate_decl): Only push_to_top_level when we're actually
13964 going to instantiate the template.
13966 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
13968 * search.c (binfo_for_vtable): Return least derived class, not
13969 most. Handle secondary vtables.
13971 2000-12-22 Jason Merrill <jason@redhat.com>
13973 * pt.c (more_specialized): Don't optimize len==0.
13974 (fn_type_unification): If we're adding the return type, increase len.
13976 * typeck.c (build_binary_op): Fix pmf comparison logic.
13978 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13979 DECL_STATIC_FUNCTION_P.
13981 * semantics.c (genrtl_finish_function): Don't try to jump to
13982 return_label unless it exists.
13984 In partial ordering for a call, ignore parms for which we don't have
13986 * call.c (joust): Pass len to more_specialized.
13987 (add_template_candidate_real): Strip 'this', pass len.
13988 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
13989 (get_bindings_order): New fn. Pass len down.
13990 (get_bindings_real): Strip 'this', pass len.
13991 (fn_type_unification): Likewise.
13992 (type_unification_real): Succeed after checking 'len' args.
13993 (most_specialized_instantiation): Lose explicit_args parm.
13994 * class.c (resolve_address_of_overloaded_function): Strip 'this',
13997 2000-12-21 Jason Merrill <jason@redhat.com>
13999 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14000 DECL_TEMPLATE_RESULT.
14002 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14003 lookup_fnfields_here.
14005 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14007 * call.c (build_object_call): Also allow conversions that return
14008 reference to pointer to function.
14009 (add_conv_candidate): Handle totype being ref to ptr to fn.
14010 (build_field_call): Also allow members of type reference to function.
14011 Lose support for calling pointer to METHOD_TYPE fields.
14013 * error.c (dump_expr): Handle *_CAST_EXPR.
14015 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14017 * tree.c (break_out_cleanups): Lose.
14018 * cp-tree.h: Remove prototype.
14019 * typeck.c (build_component_ref): Don't break_out_cleanups.
14020 (build_compound_expr): Likewise.
14021 * semantics.c (finish_expr_stmt): Likewise.
14023 2000-12-20 Richard Henderson <rth@redhat.com>
14025 * cp-tree.h: Update declarations.
14026 * decl.c (finish_case_label): Return the new stmt node.
14027 * semantics.c (finish_goto_stmt): Likewise.
14028 (finish_expr_stmt, finish_return_stmt): Likewise.
14029 (finish_break_stmt, finish_continue_stmt): Likewise.
14030 (finish_asm_stmt): Likewise.
14031 * parse.y (already_scoped_stmt): Set STMT_LINENO.
14032 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14033 (simple_if, simple_stmt): Return the new stmt node.
14034 (save_lineno): New.
14036 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
14038 * cp-tree.h: Don't declare warn_long_long.
14040 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14042 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14045 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14047 * pt.c (unify): Handle when both ARG and PARM are
14048 BOUND_TEMPLATE_TEMPLATE_PARM.
14050 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14052 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14053 DECL_TEMPLATE_PARM_P.
14055 2000-12-15 Jason Merrill <jason@redhat.com>
14057 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
14059 * init.c (build_new_1): Don't strip quals from type.
14061 * decl.c (pushdecl): Don't check for linkage on a non-decl.
14063 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14065 * call.c (build_new_function_call): Lose space before paren in
14067 (build_new_method_call): Likewise.
14069 * typeck2.c (build_m_component_ref): Propagate quals from datum.
14071 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14073 * pt.c (check_explicit_specialization): Propagate default
14074 function arguments to explicit specializations.
14076 2000-12-13 DJ Delorie <dj@redhat.com>
14078 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14081 2000-12-08 Jason Merrill <jason@redhat.com>
14083 * error.c (dump_function_name): Don't let the user see __comp_ctor.
14085 Clean up copy-initialization in overloading code.
14086 * call.c (build_user_type_conversion_1): Die if we are asked to
14087 convert to the same or a base type.
14088 (implicit_conversion): Avoid doing so. Lose reference binding code.
14089 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14090 direct-initialization. Also do direct-init part of copy-init.
14091 (build_user_type_conversion): Don't provide context to convert_like.
14092 * cvt.c (ocp_convert): build_user_type_conversion will now provide
14093 the constructor call for copy-init.
14095 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14096 instantiation of a member template.
14097 (do_decl_instantiation): Not here.
14099 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14101 * class.c (check_field_decls): Don't special case anonymous
14102 fields in error messages.
14103 (note_name_declared_in_class): Use %D on diagnostic.
14105 * tree.c (pod_type_p): Use strip_array_types.
14106 (cp_valid_lang_attribute): Likewise.
14107 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14108 multiple evaluations.
14109 (cp_has_mutable_p): Use strip_array_types.
14111 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14113 * cp-tree.h (sufficient_parms_p): Declare new function.
14114 * call.c (sufficient_parms_p): New function, broken out of ...
14115 (add_function_candidate): ... here. Use it.
14116 (add_conv_candidate): Use it.
14117 * decl.c (grok_ctor_properties): Use it.
14119 2000-12-07 Jakub Jelinek <jakub@redhat.com>
14121 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14123 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
14125 * decl2.c (lang_decode_option): Handle -Wformat-security.
14127 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14129 * pt.c (verify_class_unification): New function.
14130 (get_class_bindings): Use it.
14131 (try_class_unification): Tidy.
14132 (unify): Handle when argument of a template-id is not
14133 template parameter dependent.
14134 (template_args_equal): Handle when TREE_CODE's do not match.
14136 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
14138 * lang-specs.h (c++): When invoking the stand-alone preprocessor
14139 for -save-temps, pass all relevant -Defines to it, and then don't
14140 pass them to cc1plus.
14142 2000-12-05 Will Cohen <wcohen@redhat.com>
14144 * decl.c (finish_case_label): Cleared
14145 more_cleanups_ok in surrounding function scopes.
14146 (define_label): Likewise.
14148 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14150 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14151 (get_matching_virtual): Remove.
14152 (look_for_overrides): Declare new function.
14153 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14155 * class.c (check_for_override): Move base class iteration code
14156 to look_for_overrides.
14157 * search.c (next_baselink): Remove.
14158 (get_virtuals_named_this): Remove.
14159 (get_virtual_destructor): Remove.
14160 (tree_has_any_destructors_p): Remove.
14161 (struct gvnt_info): Remove.
14162 (check_final_overrider): Remove `virtual' from error messages.
14163 (get_matching_virtuals): Remove. Move functionality to ...
14164 (look_for_overrides): ... here, and ...
14165 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14168 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14170 * typeck.c (get_delta_difference): If via a virtual base,
14172 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14175 2000-12-04 Richard Henderson <rth@redhat.com>
14177 * error.c (dump_tree): Use output_add_string not OB_PUTS.
14179 2000-12-04 Jason Merrill <jason@redhat.com>
14181 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14182 (write_builtin_type): Pass intSI_type_node and the like through
14184 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14185 Pass intSI_type_node and the like through type_for_mode.
14186 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14187 * pt.c (tsubst, unify): Likewise.
14188 * tree.c (walk_tree): Likewise.
14189 * error.c (dump_type): Likewise.
14190 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14192 * Make-lang.in: Tweak top comment for emacs.
14193 (cp/TAGS): Restore.
14195 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14197 * class.c (clone_function_decl): Robustify.
14199 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
14201 * decl.c (store_bindings): Only search in the non modified
14202 old_bindings for duplicates.
14204 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
14206 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14207 TYPE_POLYMORPHIC_P.
14209 * typeck.c (build_static_cast): Remove unused variable.
14211 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14213 * pt.c: Fix typo in comment.
14215 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14217 * decl2.c (warn_format): Remove definition.
14218 (lang_decode_option): Handle -Wformat-nonliteral,
14219 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
14221 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14223 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14224 (init_decl_processing): Don't create string_type_node,
14225 const_string_type_node, wint_type_node, intmax_type_node,
14226 uintmax_type_node, default_function_type, ptrdiff_type_node and
14227 unsigned_ptrdiff_type_node. Adjust position of call to
14228 c_common_nodes_and_builtins.
14229 (identifier_global_value): New function.
14231 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
14233 * call.c (standard_conversion): Reject pointer to member
14234 conversions from ambiguous, inaccessible or virtual bases.
14235 * typeck.c (build_static_cast): Don't check pointers to members
14238 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14240 * method.c (do_build_copy_constructor): Preserve cv
14241 qualifications when accessing source object members.
14242 (do_build_assign_ref): Likewise. Remove separate diagnostics for
14245 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14247 * method.c (do_build_assign_ref): Construct appropriately
14248 CV-qualified base reference. Don't allow const casts in base
14251 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14253 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14254 incomplete return type.
14256 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14258 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14259 * semantics.c (finish_base_specifier): Accept a _TYPE not a
14262 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14264 * spew.c (yyerror): Cope if yylval.ttype is NULL.
14266 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14268 * decl.c (grokdeclarator): Diagnose undefined template contexts.
14270 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14272 * decl.c (grokdeclarator): Do type access control on friend
14275 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14277 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14278 bison parser ickiness.
14279 * pt.c (tsubst_friend_function): Enter namespace scope when
14280 tsubsting the function name.
14281 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14283 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14285 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14286 * cvt.c (cp_convert_to_pointer): Add force parameter.
14287 Allow conversions via virtual base if forced.
14288 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14289 (ocp_convert): Likewise.
14290 * search.c (binfo_from_vbase): Return the virtual base's binfo.
14291 * typeck.c (get_delta_difference): Adjust handling of virtual
14294 2000-11-26 Mark Mitchell <mark@codesourcery.com>
14296 * tree.c (struct list_hash): Remove.
14297 (list_hash_table): Make it be an htab.
14298 (struct list_proxy): New type.
14299 (list_hash_eq): New function.
14300 (list_hash_pieces): Renamed from ...
14301 (list_hash): ... this.
14302 (list_hash_lookup): Remove.
14303 (list_hash_add): Remove.
14304 (hash_tree_cons): Use the generic hashtable.
14305 (mark_list_hash): Remove.
14306 (init_tree): Create the hashtable.
14308 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
14310 * method.c (build_mangled_C9x_name): Rename to
14311 build_mangled_C99_name. Change C9X references in comments to
14314 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14316 * parse.y (unary_expr): Move VA_ARG from here ...
14317 (primary): ... to here.
14319 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14321 * semantics.c (finish_id_expr): If type is error_mark, return
14324 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
14326 * pt.c (lookup_template_class): Simplify loop exit constructs.
14327 Cope when there is no partial instantiation of a template
14330 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
14332 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14334 2000-11-22 Mark Mitchell <mark@codesourcery.com>
14336 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14339 * pt.c (do_decl_instantiate): Explicitly clone constructors and
14340 destructors that haven't already been cloned.
14342 2000-11-20 Richard Henderson <rth@redhat.com>
14344 * parse.y (yyparse_1): Rename the parser entry point.
14346 2000-11-20 Alex Samuel <samuel@codesourcery.com>
14348 * mangle.c (write_name): Use <unscoped-name> for names directly in
14350 (write_unscoped_name): Accept names directly in function scope.
14352 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
14354 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14355 * parse.y (extdef): Add EXPORT reduction.
14356 * spew.c (yylex): Don't skip export here.
14358 2000-11-19 Mark Mitchell <mark@codesourcery.com>
14360 * decl.c (init_decl_processing): Correct name of pure virtual
14361 function under the new ABI.
14362 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14363 (throw_bad_typeid): Likewise for bad typeid function.
14365 2000-11-18 Mark Mitchell <mark@codesourcery.com>
14367 * decl.c (grokparms): Don't even function types of `void' type,
14369 * mangle.c (write_type): Don't crash when confronted with the
14372 * decl.c (grokparms): Don't create parameters of `void' type.
14374 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
14376 * lex.c (mark_impl_file_chain): Delete.
14377 (init_parse): Remove call to ggc_add_string_root. No need to
14378 ggc_strdup a string constant. Do not add impl_file_chain to GC
14380 (handle_pragma_implementation): No need to ggc_strdup main_filename.
14382 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14384 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14386 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14388 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14389 * decl.c (grokdeclarator): Don't reject void parms here.
14390 (require_complete_types_for_parms): Simplify, use
14391 complete_type_or_else.
14392 (grokparms): Remove bitrot. Remove funcdef parm.
14393 Deal with ellipsis parm lists here.
14394 * semantics.c (finish_parmlist): Don't append void_list_node
14395 here. Set PARMLIST_ELLIPSIS_P.
14397 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14399 * typeck2.c (incomplete_type_error): Reorganize to avoid
14400 excessive diagnostics.
14402 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
14404 * lex.c (struct impl_files, internal_filename): Constify a char *.
14406 2000-11-16 Mark Mitchell <mark@codesourcery.com>
14408 * mangle.c (write_special_name_constructor): Don't generate
14409 assembler junk when confronted with an old-style constructor.
14410 (write_special_name_destructor): Likewise.
14411 (mangle_decl_string): Do it here instead.
14413 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
14415 * call.c (op_error): Make error messages clearer.
14417 2000-11-15 Mark Mitchell <mark@codesourcery.com>
14419 * decl.c (wrapup_globals_for_namespace): Don't mark things
14420 TREE_ASM_WRITTEN when they're not.
14422 2000-11-15 Jason Merrill <jason@redhat.com>
14424 * typeck2.c (friendly_abort): Uncount the error before handing
14425 off to fancy_abort.
14427 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
14429 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14431 2000-11-14 Mark Mitchell <mark@codesourcery.com>
14433 * class.c (build_vtbl_initializer): Fix typo in comment.
14434 * typeck.c (expr_sizeof): Don't crash on errors.
14436 2000-11-14 Jim Wilson <wilson@redhat.com>
14438 * lang-specs.h: Add %2 after %(cc1_options).
14440 2000-11-14 Richard Henderson <rth@redhat.com>
14442 * typeck.c (c_sizeof): Be strict about casting result value
14443 back to c_size_type_node.
14444 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14446 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
14448 * typeck.c (build_unary_op): Use boolean_increment from
14449 c-common.c, moving the relevant code there.
14451 2000-11-11 Jason Merrill <jason@redhat.com>
14453 * typeck.c (mark_addressable): Don't call put_var_into_stack.
14455 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14458 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14460 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14461 * lex.c (copy_lang_decl): Likewise.
14463 2000-11-09 Mark Mitchell <mark@codesourcery.com>
14465 * dump.c (cp_dump_tree): Don't dump function bodies here.
14467 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14468 (dump.o): Update dependency list.
14469 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14470 (flag_dump_translation_unit): Likewise.
14471 (CP_TYPE_QUALS): Adjust definition.
14472 (DECL_C_BIT_FIELD): Remove.
14473 (SET_DECL_C_BIT_FIELD): Likewise.
14474 (CLEAR_DECL_C_BIT_FIELD): Likewise.
14475 (add_maybe_template): Likewise.
14476 (strip_array_types): Likewise.
14477 (dump_node_to_file): Likewise.
14478 (cp_dump_tree): New function.
14479 * decl.c (init_decl_processing): Set lang_dump_tree.
14480 * decl2.c (flag_dump_translation_unit): Remove.
14481 * dump.c: Move most of it to ../c-dump.c.
14482 (cp_dump_tree): New function.
14483 * pt.c (add_maybe_template): Remove.
14484 * typeck.c (strip_array_types): Likewise.
14486 2000-11-07 Eric Christopher <echristo@redhat.com>
14488 * decl.c (init_decl_processing): Change definition of
14489 __wchar_t to wchar_t. Remove artificial declaration of
14491 * lex.c: Change instances of __wchar_t to wchar_t.
14493 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
14495 * lex.c (do_identifier): Don't lookup_name for operators.
14496 * parse.y (operator): Save looking_for_typename.
14497 (unoperator): Restore it.
14498 * spew.c (frob_opname): Use nth_token for lookahead.
14500 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
14502 * decl.c (grok_op_properties): Always use coerce_new_type and
14503 coerce_delete_type.
14504 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14505 exception specification. Tidy up.
14506 (coerce_delete_type): Preserve exception specification. Tidy up.
14508 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
14510 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14511 (push_binding_level), error.c (cp_tree_printer), pt.c
14512 (process_partial_specialization, tsubst_template_arg_vector),
14513 search.c (lookup_member): Use memset () instead of bzero ().
14515 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
14517 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14519 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
14521 * Make-lang.in (c++.distdir): Remove.
14523 2000-11-04 Mark Mitchell <mark@codesourcery.com>
14525 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14526 declarations from different namespaces to be combined.
14528 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
14530 * decl.c: Include tm_p.h.
14532 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
14534 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14536 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
14538 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14539 (build_overload_value), repo.c (open_repo_file), xref.c
14540 (open_xref_file): Use strchr () and strrchr () instead of index ()
14543 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
14545 * call.c (build_over_call): Call fold on the CALL_EXPR.
14547 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
14549 * error.c (dump_template_decl): Separate template hearders with
14552 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
14554 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
14555 TS_* flags with corresponding TFF_*. Adjust prototypes of
14556 functions (which used to take a tree_string_flags) to take an int.
14558 * cp-tree.h (enum tree_string_flags): Remove
14559 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14560 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14561 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14562 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14563 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14564 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14565 (type_as_string, decl_as_string, expr_as_string,
14566 context_as_string): Adjust prototype.
14568 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14569 instead of TS_PLAIN.
14571 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14572 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14575 2000-10-30 Mark Mitchell <mark@codesourcery.com>
14577 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14578 (linkage_kind): New enumeration.
14579 (decl_linkage): New function.
14580 * decl2.c (comdat_linkage): Extend comment.
14581 * error.c (dump_function_decl): Print the arguments used to
14582 instantiate a template, even when not printing the type of the
14584 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14585 not TREE_PUBLIC, to test for external linkage.
14586 * tree.c (decl_linkage): New function.
14588 2000-10-28 Mark Mitchell <mark@codesourcery.com>
14590 * pt.c (instantiate_decl): Always instantiate static data members
14591 initialized in-class.
14593 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
14595 * Make-lang.in: Move all build rules here from Makefile.in,
14596 adapt to new context. Wrap all rules that change the current
14597 directory in parentheses. Expunge all references to $(P).
14598 When one command depends on another and they're run all at
14599 once, use && to separate them, not ;. Add OUTPUT_OPTION to
14600 all object-file generation rules. Delete obsolete variables.
14602 * Makefile.in: Delete.
14603 * config-lang.in: Delete outputs= line.
14605 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
14607 * error.c (dump_function_decl): Print no space between
14608 `ptr-operator' the `type-specifier' of the return type.
14609 (dump_type_prefix): Make sure we put space at the appropriate
14612 2000-10-23 Jason Merrill <jason@redhat.com>
14614 * call.c (equal_functions): Also call decls_match for extern "C" fns.
14616 2000-10-22 Jason Merrill <jason@redhat.com>
14618 * call.c (build_conditional_expr): Use ocp_convert to force
14621 2000-10-22 Mark Mitchell <mark@codesourcery.com>
14623 * call.c (standard_conversion): Use RVALUE_CONVs for all
14624 expressions that satisfy lvalue_p, not just those that satisfy
14627 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14629 * typeck.c (c_sizeof): Return an expression of `size_t' type,
14630 not one with TYPE_IS_SIZETYPE set.
14631 (dubious_conversion_warnings): Remove special-case code.
14633 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
14635 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14636 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14637 (dump_type_prefix): Print vector-of-int as 'int vector'.
14638 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14639 * tree.c (walk_tree): Handle VECTOR_TYPE.
14641 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14643 2000-10-21 Jason Merrill <jason@redhat.com>
14645 * parse.y (operator): Set got_object from got_scope.
14646 Set looking_for_typename.
14647 * decl.c (lookup_name_real): Clear val after setting from_obj.
14648 Reorganize diagnostic.
14650 2000-10-20 Jason Merrill <jason@redhat.com>
14652 * tree.c (walk_tree): Don't walk into default args.
14654 * error.c (dump_expr): Use host_integerp.
14656 2000-10-20 David Edelsohn <edelsohn@gnu.org>
14658 * typeck2.c (abstract_virtuals_error): Use "because" instead of
14659 "since" in error message.
14661 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14663 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14665 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
14667 * decl.c (revert_static_member_fn): Fixed typo.
14669 2000-10-19 Mark Mitchell <mark@codesourcery.com>
14671 * class.c (subobject_offset_fn): New type.
14672 (dfs_record_base_offsets): Remove.
14673 (record_base_offsets): Likewise.
14674 (dfs_search_base_offsets): Likewise.
14675 (record_subobject_offset): New function.
14676 (check_subobject_offset): Likewise.
14677 (walk_subobject_offsets): Likewise.
14678 (record_subobject_offsets): Likewise.
14679 (layout_conflict_p): Reimplement.
14680 (layout_nonempty_base_or_field): Correct handling of type
14681 conflicts during layout.
14682 (layout_empty_base): Likewise.
14683 (build_base_field): Adjust to handle new representation of empty
14685 (build_base_fields): Likewise.
14686 (layout_virtual_bases): Likewise.
14687 (splay_tree_compare_integer_csts): New function.
14688 (layout_class_type): Use a splay_tree, rather than a varray, to
14689 represent the offsets of empty bases.
14691 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14692 * decl.c (select_decl): Don't return declarations that are
14695 2000-10-18 Mark Mitchell <mark@codesourcery.com>
14697 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14698 (fake_std_node): New macro.
14699 * decl.c (in_std): Rename to ...
14700 (in_fake_std): ... this.
14701 (flag_no_builtin): Remove.
14702 (flag_no_nonansi_builtin): Likewise.
14703 (walk_namespaces_r): Use fake_std_node.
14704 (push_namespace): Use std_identifier.
14705 (pop_namespace): Use in_fake_std.
14706 (lookup_name_real): Use fake_std_node.
14707 (init_decl_processing): When -fhonor-std, create the `std'
14708 namespace. Don't create a dummy fake_std_node in that case.
14709 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
14710 (builtin_function): Put builtins whose names don't begin
14711 with `_' in the std namespace.
14712 * decl2.c (flag_no_builtin): Remove.
14713 (flag_no_nonansi_builtin): Likewise.
14714 (set_decl_namespace): Use fake_std_node.
14715 (validate_nonmember_using_decl): Likewise.
14716 (do_using_directive): Likewise.
14717 (handle_class_head): Likewise.
14718 * dump.c (dequeue_and_dump): Likewise.
14719 * except.c (init_exception_processing): Use std_identifier.
14720 * init.c (build_member_call): Use fake_std_node.
14721 * rtti.c (init_rtti_processing): Use std_identifier.
14723 2000-10-17 Mark Mitchell <mark@codesourcery.com>
14725 * cp-tree.h (back_end_hook): Remove declaration.
14726 * decl2.c (back_end_hook): Remove definition.
14728 * dump.c (dequeue_and_dump): Dump TREE_USED.
14730 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
14732 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14734 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14736 * decl.c (WINT_TYPE): Define.
14737 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14738 c_size_type_node, signed_size_type_node and wint_type_node.
14740 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14742 * decl2.c (warn_missing_format_attribute): New variable.
14743 (lang_decode_option): Decode -Wmissing-format-attribute.
14745 2000-10-16 Mark Mitchell <mark@codesourcery.com>
14747 * typeck.c (qualify_type): Remove.
14748 (composite_pointer_type): Fix handling of conversions to `cv void*'.
14750 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14752 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14754 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14756 * Makefile.in (parse.c, parse.h): Create atomically.
14758 2000-10-12 Mark Mitchell <mark@codesourcery.com>
14760 * class.c (current_obstack): Remove.
14761 * decl.c (ggc_p): Remove.
14762 (start_decl): Don't use decl_tree_cons.
14763 (grokdeclarator): Don't use build_decl_list.
14764 (start_function): Don't use decl_tree_cons.
14765 (finish_function): Don't mess with obstacks.
14766 * decl2.c (grok_x_components): Don't use build_decl_list.
14767 * lex.c (make_call_declarator): Don't call decl_tree_cons.
14768 (implicitly_declare_fn): Don't call build_decl_list.
14769 * parse.y (frob_specs): Don't call build_decl_list or
14771 (expr_or_declarator_intern): Don't call decl_tree_cons.
14772 (primary): Don't call build_decl_list.
14773 (fcast_or_absdcl): Likewise.
14774 (typed_declspecs): Don't call decl_tree_cons.
14775 (reserved_declspecs): Don't call build_decl_list.
14776 (declmods): Likewise.
14777 (reserved_typespecquals): Likewise.
14779 (new_type_id): Likewise.
14780 (cv_qualifiers): Likewise.
14781 (after_type_declarator_intern): Likewise.
14782 (notype_declarator_intern): Likewise.
14783 (absdcl_intern): Likewise.
14784 (named_parm): Likewise.
14785 * pt.c (most_specialized_class): Likewise.
14786 * repo.c (temporary_obstack): Make it a structure, not a pointer.
14787 (init_repo): Initialize it.
14788 * search.c (current_obstack): Remove.
14789 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14791 2000-10-09 Richard Henderson <rth@cygnus.com>
14793 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14794 (c++ language support bits for libgcc): Remove.
14795 (c++.clean): Remove cplib2.txt cleanup.
14796 * config-lang.in (headers, lib2funcs): Remove.
14798 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14799 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14800 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14801 * inc/new.h, inc/typeinfo: Remove files.
14803 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
14805 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14807 (init_decl_processing): Initialize intmax_type_node and
14810 2000-10-06 Richard Henderson <rth@cygnus.com>
14812 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14813 (original_result_rtx): Remove.
14814 * decl.c (save_function_data): Don't clear x_result_rtx.
14815 (mark_lang_function): Don't mark it either.
14816 * expr.c (fixup_result_decl): Remove.
14817 * semantics.c (genrtl_named_return_value): Frob the return decl
14818 before calling emit_local_var.
14819 (genrtl_finish_function): Don't call fixup_result_decl.
14820 Always emit the jump to return_label.
14822 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
14824 * pt.c (lookup_template_class): Set current access for enum.
14825 (tsubst_enum): Set file & line for enum decl.
14827 * spew.c (yylex): Remove unused variable.
14829 2000-10-05 Richard Henderson <rth@cygnus.com>
14831 * semantics.c (genrtl_finish_function): Don't init or check
14832 can_reach_end; remove noreturn and return value checks.
14834 2000-10-05 Tom Tromey <tromey@cygnus.com>
14836 * init.c (build_java_class_ref): Use `build_static_name' with a
14837 suffix, not a prefix, to build the class object's name.
14839 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14841 * cp-tree.h (access_kind): Fix comment typo.
14842 * decl2.c (grokfield): Fix diagnostic typo.
14843 * semantics.c (finish_template_type): Fix comment typo.
14844 (finish_qualified_object_call_expr): Likewise.
14846 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14848 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14851 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14853 * spew.c (frob_id): New static function.
14854 (frob_opname): Use it.
14857 2000-10-01 Mark Mitchell <mark@codesourcery.com>
14859 * decl.c (lang_mark_false_label_stack): Remove.
14860 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14862 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
14864 * gxxint.texi: Use @email for formatting email addresses.
14866 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
14868 * error.c: Remove direct obstack manipulation. Replace with
14869 output_buffer-based formatting. Adjust calls to removed macros.
14870 (obstack_chunk_alloc, obstack_chunk_free): Remove.
14871 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14872 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14874 2000-09-24 Mark Mitchell <mark@codesourcery.com>
14876 * ir.texi: Move to ../c-tree.texi.
14878 2000-09-20 Jason Merrill <jason@redhat.com>
14880 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14882 2000-09-21 Andreas Jaeger <aj@suse.de>
14884 * errfn.c: Move declaration of cp_printer and cp_printers to ...
14885 * cp-tree.h: ... here.
14887 * error.c: Remove declaration of cp_printer.
14889 2000-09-20 Mark Mitchell <mark@codesourcery.com>
14891 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14893 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
14895 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14898 2000-09-18 Mark Mitchell <mark@codesourcery.com>
14900 * decl.c (start_function): Robustify.
14902 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14904 * cp-tree.h (check_function_format): Accept a `status' parameter.
14906 * call.c, typeck.c: Updates calls to `check_function_format'.
14908 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
14910 * decl2.c (handle_class_head): Always push some scope even
14913 2000-09-16 Mark Mitchell <mark@codesourcery.com>
14915 * cp-tree.h (struct cp_language_function): Remove
14916 x_scope_stmt_stack and name_declared.
14917 (current_scope_stmt_stack): Remove.
14918 (function_name_declared_p): New macro.
14919 (struct lang_decl_flags): Use c_lang_decl as a base class.
14921 (struct lang_decl): Replace saved_tree with context.
14922 (DECL_FRIEND_CONTEXT): Adjust accordingly.
14923 (SET_DECL_FRIEND_CONTEXT): Likewise.
14924 (DECL_VIRTUAL_CONTEXT): Likewise.
14925 (DECL_SAVED_TREE): Remove.
14926 (C_DECLARED_LABEL_FLAG): Likewise.
14927 (cplus_expand_expr_stmt): Don't declare.
14928 (add_decl_stmt): Likewise.
14929 (add_scope_stmt): Likewise.
14930 * decl.c (mark_stmt_tree): Remove.
14931 (case_compare): Likewise.
14932 (finish_case_label): Use c_add_case_label.
14933 (init_decl_processing): Set more language-specific hooks.
14934 (build_enumerator): Fix typo in comment.
14935 (cplus_expand_expr_stmt): Remove.
14936 (mark_lang_function): Use mark_c_language_function.
14937 (lang_mark_tree): Use c_mark_lang_decl.
14938 * decl2.c: Change order of inclusion.
14939 * except.c: Likewise.
14940 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
14941 back on c_expand_expr.
14942 * friend.c: Include expr.h.
14943 * init.c: Change order of inclusion.
14944 * Makefile.in: Update dependencies.
14945 * lex.h (free_lang_decl_chain): Remove.
14946 * optimize.c (maybe_clone_body): Use function_name_declared_p.
14947 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14949 (instantiate_decl): Use function_name_declared_p.
14950 * semantics.c (lang_expand_expr_stmt): Remove.
14951 (set_current_function_name_declared): Likewise.
14952 (current_function_name_declared): Likewise.
14953 (begin_compound_stmt): Use function_name_declared_p.
14954 (add_decl_stmt): Remove.
14955 (setup_vtbl_ptr): Use function_name_declared_p.
14956 (add_scope_stmt): Remove.
14957 (current_scope_stmt_stack): New function.
14958 (cp_expand_stmt): Don't handle SCOPE_STMTs.
14959 (expand_body): Use function_name_declared_p.
14960 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14961 * typeck.c: Change order of includes.
14962 (convert_sequence): Remove.
14964 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
14966 * lex.c (reswords): Add _Complex.
14968 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14970 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14972 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
14974 * init.c (begin_init_stmts): Don't use // comments.
14976 2000-09-12 Jason Merrill <jason@redhat.com>
14978 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14979 all non-extern arrays.
14981 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14982 typenames, too. Downgrade complaint to pedwarn.
14983 (xref_tag): Warn about surprising behavior of 'friend struct T'.
14984 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14985 'class This::Inherited'.
14987 2000-09-12 Mark Mitchell <mark@codesourcery.com>
14989 * decl.c (finish_case_label): Given the LABEL_DECL a
14992 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
14994 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14995 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14996 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14997 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14998 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15000 (sorry_for_unsupported_tree, print_scope_operator,
15001 print_left_paren, print_right_paren, print_left_bracket,
15002 print_right_bracket, print_whitespace): Likewise.
15003 (aggr_variety): Rename to class_key_or_enum.
15004 (print_type): Rename to print_type_id.
15005 (print_type_specifier_seq, print_simple_type_specifier,
15006 print_elaborated_type_specifier,
15007 print_rest_of_abstract_declarator,
15008 print_parameter_declaration_clause, print_exception_specification,
15009 print_nested_name_specifier, print_template_id,
15010 typedef_original_name, print_template_argument_list_start,
15011 print_template_argument_list_end): New functions.
15013 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15015 * ir.texi: Add more documentation.
15017 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15019 * cp-tree.h (struct saved_scope): Remove x_function_parms.
15020 (current_function_parms): Don't define.
15021 (struct cp_language_function): Remove parms_stored.
15022 (current_function_just_assigned_this): Don't define.
15023 (current_function_parms_stored): Likewise.
15024 (static_ctors): Declare.
15025 (static_dtors): Likewise.
15026 (SF_EXPAND): Don't define.
15027 (expand_start_early_try_stmts): Remove declaration.
15028 (store_parm_decls): Likewise.
15029 * decl.c (static_ctors): Don't declare.
15030 (static_dtors): Likewise.
15031 (struct binding_level): Remove this_block.
15032 (poplevel): Remove dead code.
15033 (set_block): Likewise.
15034 (mark_binding_level): Don't mark this_block.
15035 (mark_saved_scope): Don't mark x_function_parms.
15036 (init_decl_processing): Don't add current_function_parms as a GC
15038 (check_function_type): Change prototype.
15039 (start_function): Remove RTL-generation code.
15040 (expand_start_early_try_stmts): Remove.
15041 (store_parm_decls): Give it internal linkage. Remove
15042 RTL-generation code.
15043 (finish_function): Remove RTL-generation code.
15044 * decl2.c (static_ctors): Fix formatting.
15045 (static_dtors): Likewise.
15046 * method.c (use_thunk): Don't call store_parm_decls.
15047 (synthesize_method): Likewise.
15048 * optimize.c (maybe_clone_body): Likewise.
15049 * parse.y (fn.def2): Likewise.
15050 (.set_base_init): Likewise.
15051 (nodecls): Likewise.
15052 * pt.c (instantiate_decl): Likewise.
15053 * rtti.c (synthesize_tinfo_fn): Likewise.
15054 * semantics.c (genrtl_try_block): Simplify.
15055 (expand_body): Use genrtl_start_function and
15056 genrtl_finish_function.
15057 (genrtl_start_function): New function.
15058 (genrtl_finish_function): Likewise.
15060 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15062 * error.c (cp_tree_printer, case 'P'): Append break.
15064 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15066 * cp-tree.h (frob_opname): Declare.
15067 * parse.y (saved_scopes): New static variable.
15068 (cp_parse_init): Adjust.
15069 (do_id): If lastiddecl is NULL, do do_identifier.
15070 (operator): Save scope information.
15071 (unoperator): New reduction. Restore scope information.
15072 (operator_name): Append unoperator. Call frob_opname.
15073 * spew.c (frob_opname): Define.
15075 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
15077 * decl.c, rtti.c: Include defaults.h if not already included.
15078 Don't define the *_TYPE_SIZE macros.
15080 2000-09-09 Mark Mitchell <mark@codesourcery.com>
15082 * cp-tree.h (push_switch): Change prototype.
15083 (check_cp_case_value): Remove declaration.
15084 (decl_constant_value): Likewise.
15085 * decl.c (struct cp_switch): Add switch_stmt and cases.
15086 (case_compare): New function.
15087 (push_switch): Set switch_stmt. Initialize cases.
15088 (pop_switch): Clean up cases.
15089 (define_case_label): Rename to ...
15090 (finish_case_label): ... this. Do semantic analysis for case
15092 (start_function): Correct comment.
15093 * decl2.c (check_cp_case_value): Remove.
15094 * expr.c (do_case): Remove.
15095 * pt.c (tsubst_expr): Adjust call to finish_case_label.
15096 * semantics.c (genrtl_do_poplevel): Remove declaration.
15097 (RECHAIN_STMTS): Remove.
15098 (finish_break_stmt): Use build_break_stmt.
15099 (finish_continue_stmt): Use build_continue_stmt.
15100 (finish_switch_cond): Adjust condition here, rater than in
15101 c_expand_start_case.
15102 (finish_case_label): Remove.
15103 * typeck.c (c_expand_return): Remove.
15104 (c_expand_start_case): Likewise.
15106 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
15108 * ir.texi: Document type nodes.
15110 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15112 * cp-tree.h (init_cp_semantics): Declare.
15113 (genrtl_try_block): Don't declare.
15114 (genrtl_handler): Likewise.
15115 (genrtl_catch_block): Likewise.
15116 (genrtl_ctor_stmt): Likewise.
15117 (genrtl_subobject): Likewise.
15118 (genrtl_do_poplevel): Likewise.
15119 (genrtl_named_return_value): Likewise.
15120 * lex.c (init_parse): Call init_cp_semantics.
15121 * semantics.c (genrtl_try_block): Give it internal linkage.
15122 (genrtl_handler): Likewise.
15123 (genrtl_catch_block): Likewise.
15124 (genrtl_ctor_stmt): Likewise.
15125 (genrtl_subobject): Likewise.
15126 (genrtl_do_poplevel): Likewise.
15127 (genrtl_named_return_value): Likewise.
15128 (lang_expand_stmt): Rename to ...
15129 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
15130 (init_cp_semantics): Define.
15132 * decl.c (initialize_local_var): Remove RTL-generating code.
15133 * semantics.c (genrtl_try_block): Fix formatting.
15135 Move statement-tree facilities from C++ to C front-end.
15136 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15137 (void_zero_node): Remove.
15138 (stmt_tree): Likewise.
15139 (scope_chain): Adjust.
15140 (language_function): Rename to cp_language_function.
15141 (cp_function_chain): Adjust.
15142 (current_stmt_tree): Remove.
15143 (last_tree): Likewise.
15144 (last_expr_type): Likewise.
15145 (struct lang_decl): Adjust.
15146 (STMT_IS_FULL_EXPR_P): Remove.
15147 (add_tree): Remove.
15148 (begin_stmt_tree): Likewise.
15149 (finish_stmt_tree): Likewise.
15150 (walk_tree_fn): Likewise.
15151 (walk_stmt_tree): Likewise.
15152 * class.c (finish_struct): Replace use of add_tree with add_stmt.
15153 * decl.c (mark_stmt_tree): Adjust type.
15154 (init_decl_processing): Don't build void_zero_node.
15155 (initialize_local_var): Adjust usage of current_stmt_tree.
15156 (finish_enum): Use add_stmt, not add_tree.
15157 (save_function_data): Adjust use of language_function.
15158 (finish_constructor_body): Use add_stmt, not add_tree.
15159 (finish_destructor_body): Likewise.
15160 (push_cp_function_context): Adjust use of language_function.
15161 (pop_cp_function_context): Likewise.
15162 (mark_lang_function): Likewise.
15163 (mark_cp_function_context): Likewise.
15164 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15165 (build_vec_init): Likewise.
15166 * semantics.c (SET_LAST_STMT): Remove.
15167 (RECHAIN_STMTS): Don't use it.
15168 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15169 (current_stmt_tree): Define.
15170 (add_tree): Remove.
15171 (finish_goto_stmt): Use add_stmt, not add_tree.
15172 (finish_expr_stmt): Likewise.
15173 (begin_if_stmt): Likewise.
15174 (finish_then_clause): Likewise.
15175 (begin_while_stmt): Likewise.
15176 (begin_do_stmt): Likewise.
15177 (finish_return_stmt): Likewise.
15178 (begin_for_stmt): Likewise.
15179 (finish_break_stmt): Likewise.
15180 (finish_continue_stmt): Likewise.
15181 (begin_switch_stmt): Likewise.
15182 (finish_case_label): Likewise.
15183 (begin_try_block): Likewise.
15184 (begin_function_try_block): Likewise.
15185 (begin_handler): Likewise.
15186 (begin_catch_block): Likewise.
15187 (begin_compound_stmt): Likewise.
15188 (begin_asm_stmt): Likewise.
15189 (finish_asm_stmt): Likewise.
15190 (finish_label_stmt): Likewise.
15191 (add_decl_stmt): Likewise.
15192 (finish_subobject): Likewise.
15193 (finish_decl_cleanup): Likewise.
15194 (finish_named_return_value): Likewise.
15195 (setup_vtbl_ptr): Likewise.
15196 (add_scope_stmt): Likewise.
15197 (finish_stmt_expr): Likewise.
15198 (prune_unused_decls): Remove.
15199 (begin_stmt_tree): Likewise.
15200 (finish_stmt_tree): Likewise.
15201 (prep_stmt): Adjust use of current_stmt_tree.
15202 (lang_expand_stmt): Likewise.
15203 * tree.c (statement_code_p): Remove.
15204 (cp_statement_code_p): New function.
15205 (walk_stmt_tree): Remove.
15206 (init_tree): Set lang_statement_code_p.
15208 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
15210 Integrated preprocessor.
15212 * Make-lang.in, Makefile.in: Remove all references to input.c,
15213 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
15214 * gxx.gperf, hash.h, input.c: Delete.
15215 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15216 initialized properly.
15218 * class.c (fixup_pending_inline): Take a tree, not a
15219 struct pending_inline *. All callers changed.
15220 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15221 RID_PROTECTED entries in ridpointers[] array here.
15222 * decl.c (duplicate_decls): Do not refer to struct
15224 (record_builtin_type, init_decl_processing): Use RID_MAX not
15226 (grokdeclarator): Use C_IS_RESERVED_WORD.
15227 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15229 (grok_x_components): Do not inspect pending_inlines chain.
15231 * cp-tree.h (struct lang_identifier): Add rid_code entry.
15232 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15233 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15234 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15235 TIME_IDENTIFIER_FILEINFO): Kill.
15237 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
15238 single 32-bit word.
15239 * parse.y: Call do_pending_inlines unconditionally.
15240 reinit_parse_for_method is now snarf_method. fn.defpen is no
15241 longer necessary. Remove unnecessary <itype> annotation on
15242 SCOPE. Do not refer to end_of_file or struct pending_inline.
15243 * semantics.c (begin_inline_definitions): Call
15244 do_pending_inlines unconditionally.
15246 * lex.c: Remove all code now shared with C front end.
15247 Initialize cpplib properly if USE_CPPLIB. Put reserved words
15248 into the get_identifier table. Rewrite pragma handling to
15249 work with the registry. Move code to save tokens for later
15250 processing to spew.c.
15252 * spew.c: Rewrite everything in terms of token streams instead
15253 of text. Move routines here from lex.c / input.c as
15254 appropriate. GC-mark trees hanging off the pending inlines
15257 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15259 * NEWS: Mention that the named return value extension has been
15261 * cp-tree.h (original_result_rtx): Define.
15262 (TREE_REFERENCE_EXPR): Remove.
15263 (DECL_VPARENT): Likewise.
15264 (pushdecl_nonclass_level): Likewise.
15265 (store_return_init): Likewise.
15266 (reinit_lang_specific): Likewise.
15267 (genrtl_named_return_value): Change prototype.
15268 * decl.c (original_result_rtx): Remove.
15269 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15270 Do not generate RTL for local variables here.
15271 (store_return_init): Remove.
15272 * semantics.c (genrtl_named_return_value): Simplify. Fold in
15274 (finish_named_return_value): Adjust accordingly. Warn that this
15275 extension is deprecated.
15276 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15278 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15280 * pt.c (type_unification_real): Replace switch with if.
15281 (unify): Tsubst non-type parms before comparing.
15283 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15285 * error.c (dump_typename): New function, broken out of ...
15286 (dump_type): ... here. Use it.
15287 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15289 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15291 * init.c (build_offset_ref): Deal with namespace scoped
15294 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15296 * class.c (resolve_address_of_overloaded_function): Add
15297 explanation message.
15298 * decl.c (define_case_label): Reformat explanation.
15299 * decl2.c (finish_static_data_member_decl): Likewise.
15300 (grokfield): Likewise.
15301 * friend.c (do_friend): Likewise.
15303 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
15305 * tree.c (walk_tree): Expose tail recursion.
15306 (walk_stmt_tree): New function.
15307 * cp-tree.h: Prototype walk_stmt_tree.
15308 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15309 the BLOCKs directly. If a BLOCK has no variables after
15310 pruning, discard it.
15311 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
15312 restore the line number.
15314 2000-09-05 Mark Mitchell <mark@codesourcery.com>
15316 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15317 (pt.o): Remove dependency on HTAB_H.
15318 * cp-tree.h: Include hashtab.h.
15319 (walk_tree): Change prototype.
15320 (walk_tree_without_duplicates): New function.
15321 * decl.c (check_default_argument): Use it.
15322 * optimize.c (remap_decl): Adjust calls to walk_tree.
15323 (copy_body): Likewise.
15324 (expand_calls_inline): Likewise.
15325 (calls_setjmp_p): Use walk_tree_without_duplicates.
15326 * pt.c: Don't include hashtab.h.
15327 (for_each_template_parm): Use walk_tree_without_duplicates.
15328 * semantics.c (finish-stmt_tree): Likewise.
15329 (expand_body): Likewise.
15330 * tree.c (walk_tree): Add additional parameter.
15331 (walk_tree_without_duplicates): New function.
15332 (count_trees): Use it.
15333 (verify_stmt_tree): Adjust call to walk_tree.
15334 (find_tree): Use walk_tree_without_duplicates.
15335 (no_linkage_check): Likewise.
15336 (break_out_target_exprs): Adjust call to walk_tree.
15337 (cp_unsave): Likewise.
15339 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15341 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15342 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15343 * cp-tree.h (TYPE_BINFO): Adjust comment.
15344 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15345 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15346 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15347 (TYPE_TEMPLATE_INFO): Likewise.
15348 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15349 * class.c (push_nested_class): Likewise.
15350 * decl.c (lookup_name_real): Likewise.
15351 (grokdeclarator): Likewise.
15352 (grok_op_properties): Likewise.
15353 (xref_tag): Likewise.
15354 (xref_basetypes): Likewise.
15355 * decl2.c (constructor_name_full): Likewise.
15356 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15357 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15358 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15359 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15360 (dump_type_suffix): Likewise.
15361 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15363 (get_aggr_from_typedef): Likewise.
15364 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15365 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15366 (write_template_parm): Likewise.
15367 (write_template_template_parm): Check tree code instead of
15368 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15369 * method.c (build_overload_nested_name): Add
15370 BOUND_TEMPLATE_TEMPLATE_PARM.
15371 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15372 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15373 * pt.c (convert_template_argument): Check tree code instead of
15374 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15375 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15376 (for_each_template_parm): Adjust comment.
15377 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
15378 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15379 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
15380 template_args_equal to compare template template parameter cases.
15381 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15382 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15384 * tree.c (copy_template_template_parm): Decide whether to create
15385 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15386 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15387 (copy_tree_r): Likewise.
15388 * typeck.c (comptypes): Likewise. Check tree code instead of
15389 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15391 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
15393 * decl.c (finish_function): Move the code for handling functions
15394 marked with the constructor and destructor attributes inside the
15397 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15399 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15401 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15403 * pt.c (lookup_template_class): Remove abort.
15404 * tree.c (get_type_decl): Allow error_mark_node.
15406 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15408 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15411 2000-09-03 Mark Mitchell <mark@codesourcery.com>
15413 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15416 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15418 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15419 union tag mismatch error reporting.
15421 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15423 * call.c (build_scoped_method_call): Check it is not a namespace.
15425 2000-08-30 Jason Merrill <jason@redhat.com>
15427 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15429 * tree.c (bot_manip): Check TREE_CONSTANT rather than
15430 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
15431 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15433 * decl.c (start_function): Always call make_function_rtl.
15435 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15437 * semantics.c (prune_unused_decls): New function.
15438 (finish_stmt_tree): Call it via walk_tree.
15440 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15442 * class.c (build_secondary_vtable): Constify a char *.
15443 * decl.c (init_decl_processing): Initialize function_id_node,
15444 pretty_function_id_node, and func_id_node.
15445 * input.c (struct input_source): Constify 'str'.
15446 (feed_input): Constify first argument.
15447 * mangle.c (write_identifier): Constify argument.
15448 * pt.c (mangle_class_name_for_template): Constify argument.
15450 2000-08-29 Mark Mitchell <mark@codesourcery.com>
15452 * typeck.c (mark_addressable): Remove code that pokes around in
15455 2000-08-28 Jason Merrill <jason@redhat.com>
15457 * lex.c (file_name_nondirectory): Move to toplev.c.
15459 * cp-tree.h (LOCAL_CLASS_P): New macro.
15460 * class.c (finish_struct_1): Use it.
15462 2000-08-27 Alex Samuel <samuel@codesourcery.com>
15464 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15465 (write_encoding): Pass another argument to write_name.
15466 (write_name): Add ignore_local_scope parameter. Fix handling of
15468 (write_nested_name): Use write_unqualified_name.
15469 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
15470 (write_template_prefix): Use write_unqualified_name.
15471 (write_component): Remove.
15472 (write_local_name): Add parameter. Use direct local entity to
15473 discriminator calculation.
15474 (write_class_enum_type): Pass another argument to write_name.
15475 (write_template_template_arg): Likewise.
15476 (make_guard_variable): Likewise.
15478 2000-08-27 Jason Merrill <jason@redhat.com>
15480 * decl.c (pushdecl): Matching decls for local externs are found in
15481 the current level. Propagate linkage information from previous
15484 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
15486 * ir.texi (Expressions): Fix typo.
15488 2000-08-25 Greg McGary <greg@mcgary.org>
15490 * tree.c (init_tree): Use ARRAY_SIZE.
15492 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15494 * error.c (cp_tree_printer): Rework.
15496 2000-08-25 Mark Mitchell <mark@codesourcery.com>
15498 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15500 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15501 (cp-demangle.o): Remove target.
15502 (dyn-string.o): Likewise.
15504 * decl.c (grokfndecl): Require that `main' return an `int'.
15505 * mangle.c (write_encoding): Don't mangle return types for
15506 conversion functions.
15508 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15510 * error.c (tree_formatting_info): New data type.
15511 (tree_being_formatted): New macro.
15512 (tree_formatting_flags): Likewise.
15513 (put_whitespace): Likewise.
15514 (print_tree_identifier): Likewise.
15515 (print_identifier): Likewise.
15516 (cp_tree_printer, print_function_argument_list, print_declaration,
15517 print_expression, print_function_declaration,
15518 print_function_parameter, print_type, print_cv_qualifier): New
15520 (init_error): Initialize lang_printer.
15522 2000-08-24 Jason Merrill <jason@redhat.com>
15524 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15525 adjustment necessary.
15527 2000-08-24 Greg McGary <greg@mcgary.org>
15529 * cp-tree.h (MAIN_NAME_P): Remove macro.
15531 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
15533 * error.c (print_instantiation_context): Don't forget to flush the
15536 2000-08-23 Jason Merrill <jason@redhat.com>
15538 * typeck.c (build_ptrmemfunc): Save the input pmf.
15540 * method.c (process_modifiers): Use same_type_p.
15542 2000-08-23 Mark Mitchell <mark@codesourcery.com>
15544 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15545 * mangle.c (write_function_type): Change prototype.
15546 (write_encoding): Don't mangle return types for
15547 constructors or destructors.
15548 (write_type): Adjust call to write_function_type.
15549 * pt.c (instantiate_template): Instantiate alternate entry points
15550 when instantiating the main function.
15552 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15554 * error.c (cp_print_error_function): Don't use embedded '\n' in
15557 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15559 * decl.c (init_decl_processing): Remove bogus initialization.
15560 * error.c (lang_print_error_function): Restore here.
15561 (init_error): Initialize print_error_function.
15563 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15565 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15567 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
15569 * Makefile.in (error.o): Depends on diagnostic.h
15571 * cp-tree.h (problematic_instantiation_changed,
15572 record_last_problematic_instantiation, current_instantiation,
15573 print_instantiation_context): Declare.
15574 (maybe_print_template_context): Remove.
15576 * decl.c (init_decl_processing): Set print_error_function to NULL.
15577 (lang_print_error_function): Remove, since we're using a new
15580 * error.c: #include diagnostic.h
15581 (function_category): New function.
15582 (cp_diagnostic_starter): Likewise.
15583 (cp_diagnostic_finalizer): Likewise.
15584 (cp_print_error_function): Likewise.
15585 (maybe_print_instantiation_context): Likewise.
15586 (print_instantiation_full_context): Likewise.
15587 (print_instantiation_partial_context): Likewise.
15588 (print_instantiation_context): Define.
15589 (init_error): Initialize diagnostic pager and finalizer.
15591 * pt.c (problematic_instantiation_changed): Define.
15592 (record_last_problematic_instantiation): Likewise.
15593 (current_instantiation): Likewise.
15594 (maybe_print_template_context): Remove.
15595 (print_template_context): Likewise.
15596 (current_tinst_level): Make static to reflect Brendan Kehoe's
15597 change of 1995-04-13.
15598 (push_tinst_level): Call print_instantiation_context.
15600 2000-08-21 Nix <nix@esperi.demon.co.uk>
15602 * lang-specs.h: Do not process -o or run the assembler if
15605 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
15607 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15609 * decl2.c (lang_decode_option): Disable gettext attributes for
15612 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
15614 * lex.c (lang_init_options): Default diagnostic message maximum
15615 length to 80, when line-wrapping.
15617 2000-08-20 Mark Mitchell <mark@codesourcery.com>
15619 * class.c (build_vtbl_initializer): Clear the entire
15620 vtbl_init_data. Start keeping track of the functions for which we
15621 have created vcall offsets here.
15622 (dfs_build_vcall_offset_vtbl_entries): Remove.
15623 (build_vcall_offset_vtbl_entries): Reimplement.
15624 (add_vcall_offset_vtbl_entries_r): New function.
15625 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
15626 computing when vcall offsets are necessary.
15628 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15630 * decl.c (member_function_or_else): Use cp_error ... %T.
15631 (grokdeclarator): Likewise.
15632 (start_method): Likewise.
15633 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15635 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15637 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15640 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15642 * cp-tree.h (PTRMEM_OK_P): New macro.
15643 (itf_ptrmem_ok): New enumeration value.
15644 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15645 argument. Diagnose implicit pointer to member.
15646 (instantiate_type): Don't diagnose implicit pointer to member
15647 here. Pass itf_ptrmem_ok if ok. Adjust calls to
15648 resolve_address_of_overloaded_function.
15649 * init.c (build_offset_ref): Set PTRMEM_OK_P.
15650 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15651 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15652 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15653 (build_unary_op): Deal with single non-static member in
15656 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15658 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15660 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15662 * cp-tree.h (enum_name_string): Remove prototype.
15663 (report_case_error): Remove prototype.
15664 * cp/typeck2.c (enum_name_string): Remove.
15665 (report_case_error): Remove.
15666 * error.c (dump_expr): Deal with enum values directly.
15667 Correctly negate integer constant.
15669 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15671 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15672 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15673 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15674 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15675 (__cxa_vec_new): Use __cxa_vec_new2.
15676 (__cxa_vec_delete): Use __cxa_vec_delete2.
15678 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15680 * vec.cc (__cxa_vec_new): Set "C" linkage.
15681 (__cxa_vec_ctor): Likewise.
15682 (__cxa_vec_cctor): Likewise.
15683 (__cxa_vec_dtor): Likewise.
15684 (__cxa_vec_delete): Likewise.
15685 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15686 (__cxa_vec_ctor): Likewise.
15687 (__cxa_vec_cctor): Likewise.
15688 (__cxa_vec_dtor): Likewise.
15689 (__cxa_vec_delete): Likewise.
15691 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15693 * class.c (instantiate_type): Reinstate local variable
15694 deleted in previous change.
15696 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15699 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15701 * cp-tree.h (instantiate_type_flags): New enumeration.
15702 (instantiate_type): Change parameter.
15703 * class.c (instantiate_type): Adjust prototype. Adjust.
15704 * call.c (standard_conversion): Adjust instantiate_type call.
15705 (reference_binding): Likewise.
15706 (build_op_delete_call): Likewise.
15707 (convert_like_real): Likewise.
15708 * cvt.c (cp_convert_to_pointer): Likewise.
15709 (convert_to_reference): Likewise.
15710 * pt.c (convert_nontype_argument): Likewise.
15711 * typeck.c (build_binary_op): Likewise.
15712 (build_ptrmemfunc): Likewise.
15713 (convert_for_assignment): Likewise.
15715 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15717 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15718 (current_aggr): Define.
15719 * decl.c (grokdeclarator): Make sure a friend class is an
15720 elaborated type specifier.
15721 * parse.y (current_aggr): Remove static definition.
15722 (cp_parse_init): Adjust.
15723 (structsp): Clear and restore current_aggr.
15724 (component_decl_list): Clear current_aggr.
15726 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15727 aggregate tag on the typename's context.
15729 * pt.c (tsubst_friend_class): Return error_mark_node, if
15730 parms becomes NULL.
15731 (instantiate_class_template): Ignore error_mark_node friend types.
15733 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
15735 * cvt.c (warn_ref_binding): New static function, broken out of ...
15736 (convert_to_reference): ... here. Use it.
15738 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15740 * parse.y (template_arg): Add rule for template qualified with
15743 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15745 * decl2.c (add_function): Reorganize.
15746 (arg_assoc): Do not consider function template decls.
15748 2000-08-11 Jason Merrill <jason@redhat.com>
15750 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15753 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15755 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15756 (lookup_nested_tag): Likewise.
15758 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15761 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15763 * parse.y (named_complex_class_head_sans_basetype): Remove
15766 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15768 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15769 explicit TEMPLATE_ID_EXPR args.
15770 (build_expr_from_tree, case CALL_EXPR): Likewise.
15772 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15774 * decl.c (check_tag_decl): Diagnose typename's which don't
15777 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
15779 * init.c (build_aggr_init): Reject bogus array initializers
15782 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15784 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15786 * cp/tinfo.cc (__dynamic_cast): Likewise.
15787 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15789 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15791 * cvt.c (convert_to_pointer_force): Fix error message when
15792 attempting to cast from ambiguous base.
15794 2000-08-08 Jason Merrill <jason@redhat.com>
15796 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15797 (tsubst_template_arg_vector): Likewise.
15799 * decl2.c (build_anon_union_vars): Choose the largest field; don't
15800 assume that one will be as large as the union.
15802 2000-08-07 Kazu Hirata <kazu@hxi.com>
15804 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15805 * decl.c (pop_labels): Likewise.
15807 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
15809 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15811 (__pointer_to_member_type_info): Likewise.
15812 (__base_class_info): Likewise.
15813 (__class_type_info): Likewise.
15814 (__si_class_type_info): Likewise.
15815 (__vmi_class_type_info): Likewise.
15816 * tinfo.cc (__si_class_type_info::__do_find_public_src):
15817 Changed member names to match specifications.
15818 (__vmi_class_type_info::__do_find_public_src): Likewise.
15819 (__si_class_type_info::__do_dyncast): Likewise.
15820 (__vmi_class_type_info::__do_dyncast): Likewise.
15821 (__si_class_type_info::__do_upcast): Likewise.
15822 (__vmi_class_type_info::__do_upcast): Likewise.
15823 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15824 (__pbase_type_info::__pointer_catch): Likewise.
15825 (__pointer_type_info::__pointer_catch): Likewise.
15826 (__pointer_to_member_type_info::__pointer_catch): Likewise.
15828 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
15830 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15831 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15832 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15834 2000-08-04 Mark Mitchell <mark@codesourcery.com>
15836 * cp-tree.h (add_method): Change prototype.
15837 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
15838 Don't double the size of the method vector in the error case.
15839 (handle_using_decl): Adjust call to add_method.
15840 (add_implicitly_declared_members): Likewise.
15841 (clone_function_decl): Likewise.
15842 * decl2.c (check_classfn): Likewise.
15843 * semantics.c (finish_member_declaration): Likewise.
15845 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
15847 * decl.c (flag_isoc94): New variable.
15849 2000-08-02 Jason Merrill <jason@redhat.com>
15851 * pt.c (do_type_instantiation): Add complain parm; don't complain
15852 if called recursively.
15853 * cp-tree.h, parse.y: Adjust.
15855 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
15857 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15858 -Wno-strict-prototypes.
15860 * g++spec.c: Adjust type of second argument to
15861 lang_specific_driver, and update code as necessary.
15863 * cp-tree.h: Don't prototype min_precision here.
15864 (my_friendly_assert): Cast expression to void.
15865 * semantics.c (do_poplevel): Initialize scope_stmts.
15867 2000-08-02 Mark Mitchell <mark@codesourcery.com>
15869 * cp-tree.h (DECL_NEEDED_P): Tweak.
15871 2000-07-28 Jason Merrill <jason@redhat.com>
15873 * lang-specs.h: Use %i in rule for .ii files.
15875 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
15877 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15879 2000-07-30 Mark Mitchell <mark@codesourcery.com>
15881 Allow indirect primary bases.
15882 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
15884 (CLASSTYPE_VFIELD_PARENT): Remove.
15885 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15886 (BINFO_PRIMARY_BINFO): Remove.
15887 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15888 (BINFO_VBASE_PRIMARY_P): Likewise.
15889 (BINFO_PRIMARY_BASE_OF): New macro.
15890 (BINFO_INDIRECT_PRIMARY_P): Likewise.
15891 (get_primary_binfo): New function.
15892 * decl.c (lang_mark_tree): Make lang_type::primary_base.
15893 * class.c (vcall_offset_data_s): Rename to ...
15894 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
15895 and add ctor_vtbl_p.
15896 (get_derived_offset): Use get_primary_binfo.
15897 (dfs_mark_primary_bases): Adjust handling of virtual primary
15899 (mark_primary_bases): Likewise.
15900 (set_primary_base): Take a binfo, not an integer, as a
15901 representation of the primary base.
15902 (indirect_primary_base_p): Remove.
15903 (determine_primary_base): Adjust for indirect primary bases.
15904 (dfs_find_final_overrider): Fix typo in coment.
15905 (update_vtable_entry_for_fn): Use get_primary_binfo.
15906 (layout_nonempty_base_or_field): Tweak.
15907 (build_base_fields): Adjust for new primary base semantics.
15908 (dfs_propagate_binfo_offsets): Remove.
15909 (propagate_binfo_offsets): Rewrite.
15910 (dfs_set_offset_for_shared_vbases): Remove.
15911 (layout_virtual_bases): Don't use it.
15912 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15914 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15915 CLASSTYPE_VFIELD_PARENT.
15916 (dfs_get_primary_binfo): New function.
15917 (get_primary_binfo): Likewise.
15918 (dump_class_hierarchy_r): Tweak printing of primary bases.
15919 (build_vtbl_initializer): Fix typo in comments. Use
15921 (build_vcall_and_vbase_vtbl_entries): Likewise.
15922 (build_vbaes_offset_vtbl_entries): Likewise.
15923 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15924 BV_VCALL_INDEX to handle indirect primary bases.
15925 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15926 (build_rtti_vtbl_entries): Likewise.
15927 * search.c (get_shared_vbase_if_not_primary): Tweak.
15928 (find_vbase_instance): Likewise.
15929 (binfo_for_vtable): Simplify.
15930 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15931 (make_binfo): Make it have 11 entries.
15933 2000-07-30 Alex Samuel <samuel@codesourcery.com>
15935 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15936 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15937 ascertaining primaryness.
15938 (G): Remove template_args.
15939 (decl_is_template_id): New function.
15940 (write_encoding): Use decl_is_template_id.
15941 (write_name): Likewise. Handle type_decls. Get main variant of
15943 (write_nested_name): Likewise.
15944 (write_prefix): Likewise.
15945 (write_template_prefix): Likewise.
15946 (write_special_name_constructor): Remove defunct production from
15948 (write_bare_function_type): Remove comment about absent parameter.
15949 (write_template_template_arg): Add missing grammar production to
15952 2000-07-27 Jason Merrill <jason@redhat.com>
15954 * decl.c (duplicate_decls): If common_type produces a non-typedef
15955 type for a typedef, just use the old type.
15957 2000-07-27 Mark Mitchell <mark@codesourcery.com>
15959 * cp-tree.h (function_depth): Declare.
15960 (verify_stmt_tree): Likewise.
15961 (find_tree): Likewise.
15962 * decl.c (function_depth): Give it external linkage.
15963 * optimize.c (optimize_function): Increment and decrement it.
15964 * tree.c (verify_stmt_tree_r): New function.
15965 (verify_stmt_tree): Likewise.
15966 (find_tree_r): Likewise.
15967 (find_tree): Likewise.
15969 2000-07-27 Jason Merrill <jason@redhat.com>
15971 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15973 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15975 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15977 * decl.c (start_cleanup_fn): Mark the function as `inline'.
15978 * decl2.c (get_guard): Call cp_finish_decl, not
15979 rest_of_decl_compilation, for local guards.
15980 * lex.c (do_identifier): Remove unused variable.
15982 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
15984 * parse.y: Add missing ';'.
15986 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15988 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15991 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15993 Kill strict_prototype. Backwards compatibility only for
15994 non NO_IMPLICIT_EXTERN_C systems.
15995 * cp-tree.h (flag_strict_prototype): Remove.
15996 (strict_prototype): Remove.
15997 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15998 * decl.c (maybe_push_to_top_level): Adjust.
15999 (pop_from_top_level): Adjust.
16000 (decls_match): Only allow sloppy parm matching for ancient
16002 (init_decl_processing): Adjust.
16003 (grokdeclarator): Adjust.
16004 * decl2.c (flag_strict_prototype): Remove.
16005 (strict_prototype): Remove.
16006 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16007 (lang_f_options): Remove "strict-prototype".
16008 (unsupported-options): Add "strict-prototype".
16009 * lex.c (do_identifier): Adjust.
16010 (do_scoped_id): Adjust.
16011 * parse.y (empty_parms): Adjust.
16012 * class.c (push_lang_context): Adjust.
16013 (pop_lang_context): Adjust.
16014 * typeck.c (comp_target_parms): Adjust.
16016 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16018 * decl.c (poplevel): Deal with anonymous variables at for scope.
16019 (maybe_inject_for_scope_var): Likewise.
16021 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
16023 * decl.c: Remove all signal handling code, now done in toplev.c.
16025 2000-07-23 Mark Mitchell <mark@codesourcery.com>
16027 * decl.c (make_rtl_for_nonlocal_decl): Rework.
16029 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16032 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
16034 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16035 Define my_friendly_assert and my_friendly_abort as macros
16036 which may call friendly_abort. Prototype friendly abort, not
16037 my_friendly_abort or my_friendly_assert.
16038 * decl.c (signal_catch): Report the signal caught in the error
16039 message. Call fatal directly.
16040 * typeck2.c (ack, my_friendly_assert): Delete.
16041 (my_friendly_abort): Rename to friendly_abort. Expect file,
16042 line, and function parameters. Report the abort code, then
16043 call fancy_abort. Do not mask an abort if errors have
16046 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
16048 * typeck.c (comp_target_parms): Remove obsolete parameter.
16049 (comp_target_types): Adjust.
16051 2000-07-17 Jason Merrill <jason@redhat.com>
16053 * typeck.c (mark_addressable): Never set TREE_USED.
16054 * call.c (build_call): Don't abort on calls to library functions
16055 that have been declared normally.
16057 * typeck.c (build_binary_op): Fix grammar in warning.
16059 * exception.cc (__eh_free): Fix prototype.
16061 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16063 * decl.c (pushdecl): Handle seeing an OVERLOAD in
16064 IDENTIFIER_NAMESPACE_VALUE.
16066 2000-07-16 Mark Mitchell <mark@codesourcery.com>
16068 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16069 * method.c (use_thunk): Correct handling of vcall offsets.
16071 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
16073 * .cvsignore: parse.h and parse.c have no cp- prefix.
16075 2000-07-13 Mark Mitchell <mark@codesourcery.com>
16077 * .cvsignore: New file.
16079 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
16081 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
16083 2000-07-12 Mark Mitchell <mark@codesourcery.com>
16085 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16087 * parse.h: Likewise.
16089 2000-07-11 Mark Mitchell <mark@codesourcery.com>
16091 * class.c (layout_class_type): Add pointers to virtual bases after
16092 base classes under the old ABI.
16094 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
16096 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16097 (finish_continue_stmt): Likewise.
16098 (begin_for_stmt): Remove call to note_level_for_for.
16099 (finish_goto_stmt): Change call from build_min_nt
16101 (finish_expr_stmt): Likewise.
16102 (begin_if_stmt): Likewise.
16103 (begin_while_stmt): Likewise.
16104 (finish_while_stmt): Likewise.
16105 (finish_return_stmt): Likewise.
16106 (begin_for_stmt): Likewise.
16107 (finish_for_stmt): Likewise.
16108 (finish_break_stmt): Likewise.
16109 (begin_switch_stmt): Likewise.
16110 (finish_case_label): Likewise.
16111 (genrtl_try_block): Likewise.
16112 (begin_try_block): Likewise.
16113 (begin_handler): Likewise.
16114 (begin_compound_stmt): Likewise.
16115 (finish_asm_stmt): Likewise.
16116 (finish_label_stmt): Likewise.
16117 (add_decl_stmt): Likewise.
16118 (finish_subobject): Likewise.
16119 (finish_decl_cleanup): Likewise.
16120 (finish_named_return_value): Likewise.
16121 (setup_vtbl_ptr): Likewise.
16122 (add_scope_stmt): Likewise.
16123 * decl.c (finish_constructor_body): Likewise.
16124 (finish_destructor_body): Likewise.
16125 * optimize.c (copy_body_r): Likewise.
16126 (initialize_inlined_parameters): Likewise.
16127 (declare_return_variable): Likewise.
16128 (expand_call_inline): Likewise.
16130 2000-07-10 Jakub Jelinek <jakub@redhat.com>
16132 * semantics.c (expand_body): Sync interface information
16133 at the end of function body expansion.
16135 2000-07-09 Jason Merrill <jason@redhat.com>
16137 * init.c (build_new_1): Bail early if the call to new fails.
16139 * decl.c (compute_array_index_type): Check specifically for
16140 an INTEGER_CST, not just TREE_CONSTANT.
16142 * decl.c (duplicate_decls): Don't call duplicate_decls on
16143 the DECL_TEMPLATE_RESULT.
16144 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16147 * error.c (dump_template_bindings): Don't crash if we had an
16148 invalid argument list.
16150 * typeck.c (c_expand_start_case): Do narrowing here.
16151 * semantics.c (finish_switch_cond): Not here.
16153 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
16155 * parse.y (asm_clobbers): Do string concatenation.
16157 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16159 * decl.c (pushtag): Don't put local classes in template functions
16160 on the local_classes list.
16162 2000-07-04 Scott Snyder <snyder@fnal.gov>
16164 * decl2.c (get_guard): Add missing return for old ABI local
16167 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16169 * cp-tree.h (char_type_p): New function.
16170 * decl.c (init_decl_processing): Don't initialize
16171 signed_wchar_type_node or unsigned_wchar_type_node.
16172 (complete_array_type): Handle brace-enclosed string-constants.
16173 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16174 * tree.c (char_type_p): New function.
16175 * typeck2.c (digest_init): Use char_type_p.
16177 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
16179 * pt.c (tsubst): Don't layout type, if it's error_mark.
16181 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
16183 * pt.c (instantiate_pending_templates): Reset template level.
16185 2000-07-05 Jason Merrill <jason@redhat.com>
16187 * call.c (joust): Don't complain about `operator char *()' beating
16188 `operator const char *() const'.
16190 2000-07-04 scott snyder <snyder@fnal.gov>
16191 Jason Merrill <jason@redhat.com>
16193 * repo.c (repo_get_id): Handle the case where a class with virtual
16194 bases has a null TYPE_BINFO_VTABLE.
16196 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
16197 Jason Merrill <jason@redhat.com>
16199 * parse.y (member_init): Just pass in the type.
16200 * init.c (expand_member_init): Handle getting a type.
16202 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16203 Jason Merrill <jason@redhat.com>
16205 * decl.c (finish_function): Warn if a function has no return
16207 Suggested by Andrew Koenig.
16208 * typeck.c (check_return_expr): Do set current_function_returns_value
16209 if we got an error_mark_node.
16211 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16213 * decl2.c (push_decl_namespace): Push the original namespace.
16215 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16217 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16218 * semantics.c (begin_class_definition): Clear it.
16220 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
16222 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16223 (genrtl_expr_stmt): Likewise.
16224 (genrtl_decl_stmt): Likewise.
16225 (genrtl_if_stmt): Likewise.
16226 (genrtl_while_stmt): Likewise.
16227 (genrtl_do_stmt): Likewise.
16228 (genrtl_return_stmt): Likewise.
16229 (genrtl_for_stmt): Likewise.
16230 (genrtl_break_stmt): Likewise.
16231 (genrtl_continue_stmt): Likewise.
16232 (genrtl_scope_stmt): Likewise.
16233 (genrtl_switch_stmt): Likewise.
16234 (genrtl_case_label): Likewise.
16235 (genrtl_begin_compound_stmt): Likewise.
16236 (genrtl_finish_compound_stmt): Likewise.
16237 (genrtl_compound_stmt): Likewise.
16238 (genrtl_asm_stmt): Likewise.
16240 * init.c (begin_init_stmts): Remove call to
16241 genrtl_begin_compound_stmt.
16242 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16244 * semantics.c (lang_expand_stmt): Changed call to
16245 genrtl_compound_stmt to ignore return value.
16247 2000-07-02 Mark Mitchell <mark@codesourcery.com>
16249 * mangle.c (canonicalize_for_substitution): Return the canonical
16252 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16254 * typeck.c (commonparms): Remove obstack manipulations.
16256 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
16258 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16260 * Makefile.in (OBJS): Added ../c-semantics.o.
16261 (OBJDEPS): Likewise.
16263 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16265 (struct stmt_tree): Added comment.
16266 (current_function_name_declared): Removed.
16267 (stmts_are_full_exprs_p): Likewise.
16268 (genrtl_do_pushlevel): Likewise.
16269 (genrtl_clear_out_block): Likewise.
16270 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16271 (DECL_ANON_UNION_ELEMS): Likewise.
16272 (emit_local_var): Likewise.
16273 (make_rtl_for_local_static): Likewise.
16274 (do_case): Likewise.
16275 (expand_stmt): Likewise.
16276 (genrtl_decl_cleanup): Likewise.
16277 (c_expand_asm_operands): Likewise.
16278 (c_expand_return): Likewise.
16279 (c_expand_start_case): Likewise.
16281 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16282 (emit_local_var): Likewise.
16283 (initialize_local_var): Change reference to
16284 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16285 Change reference to stmts_are_full_exprs_p to
16286 current_stmt_tree->stmts_are_full_exprs_p.
16287 (push_cp_function_context): Likewise.
16289 * expect.c (expand_throw): Change reference to
16290 stmts_are_full_exprs_p.
16292 * init.c (build_aggr_init): Change reference to
16293 stmts_are_full_exprs_p.
16294 (build_vec_init): Likewise.
16296 * optimize.c (maybe_clone_body): Change reference to
16297 current_function_name_declared to
16298 cp_function_chain->name_declared.
16300 * pt.c (instantiate_decl): Change reference to
16301 current_function_name_declared to
16302 cp_function_chain->name_declared.
16304 * semantics.c (expand_cond): Moved declaration to c-common.h.
16305 (genrtl_do_pushlevel): Moved to c-semantics.c.
16306 (genrtl_clear_out_block): Likewise.
16307 (genrtl_goto_stmt): Likewise.
16308 (genrtl_expr_stmt): Likewise.
16309 (genrtl_decl_stmt): Likewise.
16310 (gerntl_if_stmt): Likewise.
16311 (genrtl_while_stmt): Likewise.
16312 (genrtl_do_stmt): Likewise.
16313 (genrtl_return_stmt): Likewise.
16314 (genrtl_for_stmt): Likewise.
16315 (genrtl_break_stmt): Likewise.
16316 (genrtl_continue_stmt): Likewise.
16317 (genrtl_scope_stmt): Likewise.
16318 (genrtl_switch_stmt): Likewise.
16319 (genrtl_case_label): Likewise.
16320 (genrtl_begin_compound_stmt): Likewise.
16321 (genrtl_finish_compound_stmt): Likewise.
16322 (genrtl_compound_stmt): Likewise.
16323 (genrtl_asm_stmt): Likewise.
16324 (genrtl_decl_cleanup): Likewise.
16325 (expand_cond): Likewise.
16326 (expand_stmt): Renamed to ...
16327 (lang_expand_stmt): ... this.
16328 (lang_expand_expr_stmt): Initialize.
16329 (set_current_function_name_declared): Likewise.
16330 (stmts_are_full_exprs_p): Likewise.
16331 (current_function_name_declared): Likewise.
16332 (anon_aggr_type_p): Likewise.
16333 (do_poplevel): Change reference to
16334 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16335 Change reference to stmts_are_full_exprs_p to
16336 current_stmt_tree->stmts_are_full_exprs_p.
16337 (add_tree): Likewise.
16338 (finish_expr_stmt): Likewise.
16339 (prep_stmt): Likewise.
16340 (lang_expand_stmt): Likewise.
16341 (begin_compound_stmt): Change reference to
16342 current_function_name_declared to
16343 cp_function_chain->name_declared and call to
16344 current_function_name_declared().
16345 (setup_vtbl_ptr): Likewise.
16346 (genrtl_do_poplevel): Removed.
16348 2000-06-30 Jason Merrill <jason@redhat.com>
16350 * init.c (init_init_processing): Go back to aligning like
16351 double_type_node for old ABI.
16352 (get_cookie_size): Make cookie larger if we get a type that needs
16354 (build_vec_delete): Call it.
16356 * typeck.c (qualify_type_recursive): New fn.
16357 (composite_pointer_type): Use it.
16358 (build_binary_op): Use composite_pointer_type.
16360 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
16361 Jason Merrill <jason@redhat.com>
16363 * typeck.c (check_return_expr): Don't complain about returning
16364 NULL from operator new if -fcheck-new.
16365 * cp-tree.h: Declare flag_check_new here.
16366 * init.c: Not here.
16368 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16370 * mangle.c (find_substitution): Use same_type_p.
16371 (write_encoding): Don't check for substitutions.
16373 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16375 * parse.y (expr_no_comma_rangle): New non-terminal.
16376 (template_parm): Use it for default parameter case.
16377 (template_arg): Use it.
16378 (expr_no_commas): Remove commented out undefined extensions.
16379 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16380 * parse.h, parse.c: Rebuilt.
16382 2000-06-30 Mark Mitchell <mark@codesourcery.com>
16384 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16385 (finish_asm_stmt): Do it here, instead.
16387 * cp-tree.h (ridpointers): Don't declare.
16388 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16389 (record_builtin_java_type): Likewise.
16390 (init_decl_processing): Likewise.
16391 * lex.c: Move inclusion of lex.h.
16392 (ridpointers): Don't define.
16393 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
16395 * lex.h (enum rid): Rename to ...
16396 (enum cp_rid): ... this.
16397 (ridpointers): Don't declare.
16398 * parse.y: Move inclusion of lex.h.
16399 * parse.c: Regenerated.
16400 * spew.c: Move inclusion of lex.h.
16402 * cp-tree.h (struct language_function): Remove temp_name_counter.
16403 (temp_name_counter): Remove.
16404 (get_temp_name): Change prototype.
16405 (get_guard): New function.
16406 (get_guard_cond): Likewise.
16407 (set_guard): Likewise.
16408 * cvt.c (build_up_reference): Adjust call to get_temp_name.
16409 * decl.c (expand_static_init): Use get_guard and friends to
16410 implement guard variables.
16411 * decl2.c (get_temp_name): Assume that the variables created are
16413 (get_sentry): Rename to ...
16414 (get_guard): ... this. Implement new ABI guard variables.
16415 (get_guard_bits): New function.
16416 (get_guard_cond): Likewise.
16417 (set_guard): Likewise.
16418 (start_static_initialization_or_destruction): Use them.
16419 (do_static_initialization): Replace sentry with guard throughout.
16420 (do_static_destruction): Likewise.
16421 * init.c (create_temporary_var): Add comment.
16423 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16425 * mangle.c (find_substitution): Use same_type_p.
16426 (write_encoding): Don't check for substitutions.
16428 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16430 * parse.y (expr_no_comma_rangle): New non-terminal.
16431 (template_parm): Use it for default parameter case.
16432 (template_arg): Use it.
16433 (expr_no_commas): Remove commented out undefined extensions.
16434 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16435 * parse.h, parse.c: Rebuilt.
16437 2000-06-29 Mark Mitchell <mark@codesourcery.com>
16439 * cp-tree.h (flag_const_strings): Remove.
16440 (warn_parentheses): Likewise.
16441 (warn_format): Likewise.
16442 (common_type): Likewise.
16443 (default_conversion): Likewise.
16444 (build_binary_op): Likewise.
16445 (cp_build_binary_op): New macro.
16446 * call.c (build_new_op): Use cp_build_binary_op instead of
16448 * class.c (build_vtable_entry_ref): Likewise.
16449 * decl.c (expand_static_init): Likewise.
16450 (compute_array_index_type): Likewise.
16451 (build_enumerator): Likewise.
16452 * decl2.c (delete_sanity): Likewise.
16453 (start_static_initialization_or_destruction): Likewise.
16454 * error.c (dump_type_suffix): Likewise.
16455 * init.c (resolve_offset_ref): Likewise.
16456 (build_new): Likewise.
16457 (build_new_1): Likewise.
16458 (build_vec_delete_1): Likewise.
16459 (build_vec_init): Likewise.
16460 (build_delete): Likewise.
16461 * rtti.c (synthesize_tinfo_fn): Likewise.
16462 (synthesize_tinfo_var): Likewise.
16463 * search.c (expand_upcast_fixups): Likewise.
16464 (fixup_all_virtual_upcast_offsets): Likewise.
16465 * typeck.c (build_array_ref): Likewise.
16466 (get_member_function_from_ptrfunc): Likewise.
16467 (build_binary_op): Add parameter.
16468 (pointer_int_sum): Use cp_build_binary_op.
16469 (pointer_diff): Likewise.
16470 (build_modify_expr): Likewise.
16471 (get_delta_difference): Likewise.
16472 (build_ptrmemfunc): Likewise.
16474 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
16476 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16477 * decl.c (create_implicit_typedef): Adjust.
16478 * decl2.c (build_artificial_parm): Adjust.
16479 * method.c (implicitly_declare_fn): Adjust.
16480 * pt.c (push_inline_template_parms_recursive): Adjust.
16481 (process_template_parm): Adjust.
16482 (overloaded_template_name): Adjust.
16483 * semantics.c (finish_template_template_parm): Adjust.
16485 2000-06-28 Mark Mitchell <mark@codesourcery.com>
16487 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16488 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16489 where to emit thunks.
16490 (build_vtt): Adjust call to build_vtt_inits.
16491 (build_vtt_inits): Add parameter to indicate whether or not
16492 sub-VTTs for virtual bases should be included. Adjust handling of
16493 construction vtables.
16494 (get_matching_base): New function.
16495 (dfs_build_vtt_inits): Rename to ...
16496 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16497 construction vtables.
16498 (dfs_fixup_binfo_vtbls): Likewise.
16499 (build_ctor_vtbl_groups): Build construction vtables for virtual
16501 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16502 to build construction vtbls.
16503 (dfs_accumulate_vtbl_inits): Adjust handling of
16504 construction vtables.
16506 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16509 2000-06-27 Mark Mitchell <mark@codesourcery.com>
16511 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16513 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16515 * search.c (hides): Remove.
16516 (is_subobject_of_p): Add most_derived parameter. Use
16518 (lookup_field_queue_p): Adjust.
16519 (lookup_field_r): Adjust.
16521 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16523 * decl2.c (handle_class_head): Bash typedefs to the type's main
16526 2000-06-25 Mark Mitchell <mark@codesourcery.com>
16528 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16529 (begin_global_stmt_expr): ... this.
16530 (genrtl_finish_stmt_expr): Rename to ...
16531 (finish_global_stmt_expr): ... this.
16532 * init.c (begin_init_stmts): Adjust calls.
16533 (finish_init_stmts): Likewise.
16534 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16535 (begin_global_stmt_expr): ... this.
16536 (genrtl_finish_stmt_expr): Rename to ...
16537 (finish_global_stmt_expr): ... this.
16539 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16541 * search.c (lookup_member): Fix typo in comment.
16543 2000-06-24 Jason Merrill <jason@redhat.com>
16545 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16546 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16548 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16550 * parse.y (complex_direct_notype_declarator): Support global_scope.
16551 * Makefile.in: Adjust conflict count.
16553 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16555 * parse.y (template_arg): Convert TEMPLATE_DECL
16556 that is a template template parameter to
16557 TEMPLATE_TEMPLATE_PARM here.
16559 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16560 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16561 (copy_template_template_parm): Adjust prototype.
16562 * decl.c (grokdeclarator): Remove dead code.
16563 * pt.c (process_template_parm): Tidy.
16564 (lookup_template_class): Construct nodes in
16565 copy_template_template_parm.
16566 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16567 lookup_template_class. Use TYPE_TI_TEMPLATE.
16568 * tree.c (copy_template_template_parm): Add NEWARGS
16570 (mapcar): Adjust call to copy_template_template_parm.
16571 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16572 * method.c (build_template_template_parm_names): Change error
16573 code to avoid compilation warning.
16575 * gxxint.texi: Document template template parameter
16578 2000-06-21 Alex Samuel <samuel@codesourcery.com>
16580 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16581 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16582 (cp-demangle.o): New rule.
16583 (dyn-string.o): Likewise.
16584 * inc/cxxabi.h (__cxa_demangle): New declaration.
16586 2000-06-22 Mark Mitchell <mark@codesourcery.com>
16588 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16589 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16590 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
16591 a tree, not an int.
16592 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16593 (make_thunk): Change prototype.
16594 (emit_thunk): Rename to use_thunk.
16595 (mangle_thunk): Change prototype.
16596 * class.c (get_derived_offset): Simplify.
16597 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16598 BV_GENERATE_THUNK_WITH_VTABLE_P.
16599 (build_primary_vtable): Simplify.
16600 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16601 (dfs_find_base): Remove.
16602 (update_vtable_entry_for_fn): Correct bug in finding the base
16603 where a virtual function was first declared. Figure out whether
16604 or not to emit a vcall-thunk with the vtables in which it appears.
16605 Correct logic for deciding whether to use an ordinary thunk, or a
16607 (finish_struct_1): Remove unnecssary code.
16608 (build_vtbl_initializer): Use ssize_int for the running counter of
16610 (build_vtbl_initializer): Only use vcall thunks where necessary.
16611 Mark thunks as needing to be emitted with their vtables, or not.
16612 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16613 indices. Use size_binop.
16614 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16615 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
16617 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16618 (build_vtable_entry): Mark thunks as needing to be emitted with
16619 their vtables, or not.
16620 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16621 * decl2.c (mark_vtable_entries): Use use_thunk instead of
16623 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
16625 * error.c (dump_expr): Use BV_FN.
16626 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16628 * method.c (make_thunk): Likewise.
16629 (emit_thunk): Rename to use_thunk. Allow callers to decide
16630 whether or not to actually emit the thunk. Adjust for changes in
16631 representation of vcall offsets.
16632 * search.c (dfs_get_pure_virtuals): Use BV_FN.
16633 * semantics.c (emit_associated_thunks): New function.
16634 (expand_body): Use it.
16635 * ir.texi: Adjust decriptions of thunks.
16637 2000-06-22 Jason Merrill <jason@redhat.com>
16639 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16640 (tsubst_friend_function): Copy it here.
16642 * decl.c (grok_op_properties): Fix typo.
16644 * decl2.c (delete_sanity): Clarify warning, avoid failure on
16647 * pt.c (check_explicit_specialization): Clarify error.
16649 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16650 an old OVERLOAD when we're declaring a non-function.
16651 (pushdecl, destroy_local_var): Check for error_mark_node.
16652 (warn_extern_redeclared_static): Also bail early if
16653 we're a CONST_DECL.
16654 (push_overloaded_decl): Ignore an old error_mark_node.
16656 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
16658 * call.c (build_x_va_arg): Check if in a template decl.
16659 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16661 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16663 * class.c (push_lang_context): TYPE_NAME gets you to the Java
16665 * decl.c (check_goto): Computed gotos assumed OK.
16667 2000-06-20 Jason Merrill <jason@redhat.com>
16669 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16670 for which we don't need to look for instantiations.
16672 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
16674 * parse.y (program): Always call finish_translation_unit.
16675 * parse.c, parse.h: Rebuilt.
16677 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
16679 * method.c: Don't include hard-reg-set.h.
16681 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16683 * rtti.c (get_base_offset): Cope when vbase field is in a base.
16685 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16687 * call.c (build_conditional_expr): Use VOID_TYPE_P.
16688 * cvt.c (cp_convert_to_pointer): Likewise.
16689 (convert_to_void): Likewise.
16690 * error.c (dump_expr): Likewise.
16691 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16692 * init.c (build_delete): Likewise.
16693 * method.c (emit_thunk): Likewise.
16694 * optmize.c (declare_return_variable): Likewise.
16695 * rtti.c (get_tinfo_decl_dynamic): Likewise.
16696 (get_typeid): Likewise.
16697 (build_dynamic_cast_1): Likewise.
16698 * typeck.c (composite_pointer_type): Likewise.
16699 (common_type): Likewise.
16700 (build_indirect_ref): Likewise.
16701 (build_binary_op): Likewise.
16702 (build_x_compound_expr): Likewise.
16703 (check_return_expr): Likewise.
16704 * typeck2.c (add_exception_specifier): Likewise.
16706 * mangle.c (write_method_parms): Use direct comparison for end
16709 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
16711 * cp-tree.h (genrtl_try_block): Declare function.
16712 (genrtl_handler): Likewise.
16713 (genrtl_catch_block): Likewise.
16714 (genrtl_ctor_stmt): Likewise.
16715 (genrtl_subobject): Likewise.
16716 (genrtl_decl_cleanup): Likewise.
16717 (genrtl_do_poplevel): Likewise.
16718 (genrtl_do_pushlevel): Likewise.
16719 (genrtl_clear_out_block): Likewise.
16720 (genrtl_goto_stmt): Likewise.
16721 (genrtl_expr_stmt): Likewise.
16722 (genrtl_decl_stmt): Likewise.
16723 (genrtl_if_stmt): Likewise.
16724 (genrtl_while_stmt): Likewise.
16725 (genrtl_do_stmt): Likewise.
16726 (genrtl_return_stmt): Likewise.
16727 (genrtl_for_stmt): Likewise.
16728 (genrtl_break_stmt): Likewise.
16729 (genrtl_continue_stmt): Likewise.
16730 (genrtl_scope_stmt): Likewise.
16731 (genrtl_switch_stmt): Likewise.
16732 (genrtl_case_label): Likewise.
16733 (genrtl_begin_compound_stmt): Likewise.
16734 (genrtl_finish_compound_stmt): Likewise.
16735 (genrtl_compound_stmt): Likewise.
16736 (genrtl_asm_stmt): Likewise.
16737 (genrtl_named_return_value): Likewise.
16738 (genrtl_begin_stmt_expr): Likewise.
16739 (genrtl_finish_stmt_expr): Likewise.
16740 (finish_for_stmt): Removed first argument.
16741 (finish_switch_stmt): Likewise.
16743 * semantics.c (genrtl_try_block): Define function.
16744 (genrtl_handler): Likewise.
16745 (genrtl_catch_block): Likewise.
16746 (genrtl_ctor_stmt): Likewise.
16747 (genrtl_subobject): Likewise.
16748 (genrtl_decl_cleanup): Likewise.
16749 (genrtl_do_poplevel): Likewise.
16750 (genrtl_do_pushlevel): Likewise.
16751 (genrtl_clear_out_block): Likewise.
16752 (genrtl_goto_stmt): Likewise.
16753 (genrtl_expr_stmt): Likewise.
16754 (genrtl_decl_stmt): Likewise.
16755 (genrtl_if_stmt): Likewise.
16756 (genrtl_while_stmt): Likewise.
16757 (genrtl_do_stmt): Likewise.
16758 (genrtl_return_stmt): Likewise.
16759 (genrtl_for_stmt): Likewise.
16760 (genrtl_break_stmt): Likewise.
16761 (genrtl_continue_stmt): Likewise.
16762 (genrtl_scope_stmt): Likewise.
16763 (genrtl_switch_stmt): Likewise.
16764 (genrtl_case_label): Likewise.
16765 (genrtl_begin_compound_stmt): Likewise.
16766 (genrtl_finish_compound_stmt): Likewise.
16767 (genrtl_compound_stmt): Likewise.
16768 (genrtl_asm_stmt): Likewise.
16769 (genrtl_named_return_value): Likewise.
16770 (genrtl_begin_stmt_expr): Likewise.
16771 (genrtl_finish_stmt_expr): Likewise.
16772 (finish_for_stmt): Removed first argument and generate rtl
16774 (finish_switch_stmt): Likewise.
16775 (do_poplevel): Removed generate rtl specific code.
16776 (do_pushlevel): Likewise.
16777 (add_tree): Likewise.
16778 (finish_goto_stmt): Likewise.
16779 (finish_expr_stmt): Likewise.
16780 (begin_if_stmt): Likewise.
16781 (finish_if_stmt_cond): Likewise.
16782 (finish_then_clause): Likewise.
16783 (begin_else_clause): Likewise.
16784 (finish_else_clause): Likewise.
16785 (finish_if_stmt): Likewise.
16786 (clear_out_block): Likewise.
16787 (begin_while_stmt): Likewise.
16788 (finish_while_stmt_cond): Likewise.
16789 (finish_while_stmt): Likewise.
16790 (begin_do_stmt): Likewise.
16791 (finish_do_body): Likewise.
16792 (finish_do_stmt): Likewise.
16793 (finish_return_stmt): Likewise.
16794 (begin_for_stmt): Likewise.
16795 (finish_for_init_stmt): Likewise.
16796 (finish_for_cond): Likewise.
16797 (finish_for_expr): Likewise.
16798 (finish_break_stmt): Likewise.
16799 (finish_continue_stmt): Likewise.
16800 (begin_switch_stmt): Likewise.
16801 (finish_switch_cond): Likewise.
16802 (finish_case_label): Likewise.
16803 (begin_try_block): Likewise.
16804 (begin_function_try_block): Likewise.
16805 (finish_try_block): Likewise.
16806 (finish_cleanup_try_block): Likewise.
16807 (finish_cleanup): Likewise.
16808 (finish_function_try_block): Likewise.
16809 (finish_handler_sequence): Likewise.
16810 (finish_function_handler_sequence): Likewise.
16811 (begin_handler): Likewise.
16812 (finish_handler_parms): Likewise.
16813 (begin_catch_block): Likewise.
16814 (finish_handler): Likewise.
16815 (begin_compound_stmt): Likewise.
16816 (finish_compound_stmt): Likewise.
16817 (finish_asm_stmt): Likewise.
16818 (finish_label_stmt): Likewise.
16819 (finish_label_decl): Likewise.
16820 (finish_subobject): Likewise.
16821 (finish_decl_cleanup): Likewise.
16822 (finish_named_return_value): Likewise.
16823 (begin_stmt_expr): Likewise.
16824 (finish_stmt_expr): Likewise.
16826 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16827 to call genrtl_expr_stmt when appropriate.
16829 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16830 begin_compound_expr to call genrtl_begin_stmt_expr and
16831 genrtl_begin_compound_expr when appropriate.
16832 (finish_init_stmts): Changed calls to finish_compound_expr and
16833 finish_stmt_expr to call genrtl_finish_compound_expr and
16834 genrtl_finish_stmt_expr when appropriate.
16835 (expand_default_init): Changed call to finish_expr_stmt to call
16836 genrtl_expr_stmt when appropriate.
16837 (build_vec_init): Likewise.
16839 * parse.y (simple_stmt): Removed first argument from call to
16840 finish_for_stmt. Removed first argument from call to
16841 finish_switch_stmt.
16843 * parse.c: Regenerated.
16845 * pt.c (tsubst_expr): Removed first argument from call to
16846 finish_for_stmt. Removed first argument from call to
16847 finish_switch_stmt.
16849 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
16851 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16852 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16854 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16855 (cplus_tree_code_length[]): Likewise.
16856 (cplus_tree_code_name[]): Likewise.
16857 (init_parse): Added call to add_c_tree_codes. Changed
16858 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16860 2000-06-16 Mark Mitchell <mark@codesourcery.com>
16862 * cp-tree.h (finish_mem_initializers): Declare.
16863 (count_trees): Likewise.
16864 * parse.y (base_init): Use finish_mem_initializers.
16865 * semantics.c (finish_mem_initializers): New function.
16867 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
16868 the number of trees.
16870 (count_trees): Don't use it.
16872 2000-06-15 Jason Merrill <jason@redhat.com>
16874 * tree.c (count_trees): New debugging function.
16876 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16877 * init.c (build_member_call): Pull out the name of a DECL.
16879 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16880 * semantics.c (expand_body): Push to TV_INTEGRATION here.
16881 * optimize.c (optimize_function): Not here.
16882 * pt.c (instantiate_decl): Push to TV_PARSE.
16884 2000-06-15 Mark Mitchell <mark@codesourcery.com>
16886 * cp-tree.h (struct language_function): Remove x_base_init_list
16887 and x_member_init_list.
16888 (current_base_init_list): Remove.
16889 (current_member_init_list): Likewise.
16890 (setup_vtbl_ptr): Change prototype.
16891 (emit_base_init): Likewise.
16892 (expand_member_init): Likewise.
16893 (reinit_parse_for_function): Remove.
16894 * decl.c (save_function_data): Don't clear x_base_init_list and
16895 x_member_init_list.
16896 (mark_language_function): Don't mark them.
16897 * init.c (perform_member_init): Tweak comment.
16898 (sort_member_init): Take the list of initializers as an argument.
16899 (sort_base_init): Likewise.
16900 (emit_base_init): Likewise.
16901 (expand_member_init): Return the initializer. Don't use global
16903 * lex.c (reinit_parse_for_function): Remove.
16904 * method.c (build_template_parm_names): Correct substitution.
16905 (do_build_copy_constructor): Don't use current_member_init_list
16906 and current_base_init_list.
16907 (synthesize_method): Likewise.
16908 * parse.y (base_init): Split mem-initializers into
16909 base-initializers and field-initializers.
16910 (member_init_list): Build up the list here.
16911 (member_init): Return the initializer.
16912 (fn.depfn): Don't use reinit_parse_for_function.
16913 * parse.c: Regenerated.
16914 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16916 (tsubst_expr): Don't use current_member_init_list
16917 and current_base_init_list.
16918 (tsubst_expr_values): Rename to ...
16919 (tsubst_initializer_list): ... this. Use convert_from_reference.
16920 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16921 and current_base_init_list.
16922 (begin_function_definition): Don't call reinit_parse_for_function.
16924 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16926 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16929 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16931 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
16933 * cp-tree.h (IF_COND): Move to c-common.h.
16934 (THEN_CLAUSE): Likewise.
16935 (ELSE_CLAUSE): Likewise.
16936 (WHILE_COND): Likewise.
16937 (WHILE_BODY): Likewise.
16938 (DO_COND): Likewise.
16939 (DO_BODY): Likewise.
16940 (RETURN_EXPR): Likewise.
16941 (EXPR_STMT_EXPR): Likewise.
16942 (FOR_INIT_STMT): Likewise.
16943 (FOR_COND): Likewise.
16944 (FOR_EXPR): Likewise.
16945 (FOR_BODY): Likewise.
16946 (SWITCH_COND): Likewise.
16947 (SWITCH_BODY): Likewise.
16948 (CASE_LOW): Likewise.
16949 (CASE_HIGH): Likewise.
16950 (GOTO_DESTINATION): Likewise.
16951 (COMPOUND_BODY): Likewise.
16952 (ASM_CV_QUAL): Likewise.
16953 (ASM_STRING): Likewise.
16954 (ASM_OUTPUTS): Likewise.
16955 (ASM_INPUTS): Likewise.
16956 (ASM_CLOBBERS): Likewise.
16957 (DECL_STMT_DECL): Likewise.
16958 (STMT_EXPR_STMT): Likewise.
16959 (LABEL_STMT_LABEL): Likewise.
16960 (SCOPE_BEGIN_P): Likewise.
16961 (SCOPE_END_P): Likewise.
16962 (SCOPE_STMT_BLOCK): Likewise.
16963 (SCOPE_NULLIFIED_P): Likewise.
16964 (SCOPE_NO_CLEANUPS_P): Likewise.
16965 (SCOPE_PARTIAL_P): Likewise.
16966 (ASM_VOLATILE_P): Likewise.
16967 (STMT_LINENO): Likewise.
16968 (STMT_LINENO_FOR_FN_P): Likewise.
16970 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16971 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16972 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16973 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16974 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16976 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16978 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16979 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16981 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16982 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16983 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16985 2000-06-14 Mark Mitchell <mark@codesourcery.com>
16987 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16988 * class.c (dfs_find_final_overrider): Set it appropriately.
16989 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16990 avoid unneeded secondary vptrs.
16992 2000-06-13 Jakub Jelinek <jakub@redhat.com>
16994 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16995 (check_bitfield_decl, check_field_decl): Likewise.
16996 (build_vtbl_or_vbase_field, build_base_field): Likewise.
16997 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16998 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16999 (xfer_tag, finish_enum): Likewise.
17000 * decl2.c (finish_builtin_type): Likewise.
17001 * init.c (init_init_processing): Likewise.
17002 * pt.c (instantiate_class_template): Likewise.
17003 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17004 * cp-tree.h (struct lang_type): Add user_align member.
17005 (CLASSTYPE_USER_ALIGN): Define.
17007 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17009 * Make-lang.in (c++.install-common): Install g++-cross in
17010 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17011 $(target_alias)-g++ and $(target_alias)-c++.
17013 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17015 * class.c (vcall_offset_data_s): Add last_init and fns.
17016 (overrides): Rename to same_signature_p.
17017 (dfs_find_final_overrider): Adjust accordingly.
17018 (mark_overriders): Likewise.
17019 (warn_hidden): Likewise.
17020 (build_vtbl_initializer): Reorganize machinery for building things
17021 at negative offsets.
17022 (build_vcall_and_vbase_vtbl_entries): Likewise.
17023 (build_vbase_offset_vtbl_entries): Likewise.
17024 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17025 offset entries. Do not create two entries for functions with the
17027 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17028 (build_rtti_vtbl_entries): Reorganize machinery for building things
17029 at negative offsets.
17031 * optimize.c (expand_call_inline): Don't recurse into the code
17032 used to initialize the parameters more than once.
17034 2000-06-11 Mark Mitchell <mark@codesourcery.com>
17036 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17037 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17038 (find_substitution): Only use the `Sa' substitution for
17039 std::allocator, not instantiations of it.
17040 (write_template_prefix): Move comment. Only use a TREE_LIST to
17041 represent substitutions for a member template.
17042 (write_array_type): Mangle array dimensions correctly.
17043 * optimize.c (maybe_clone_body): Copy more information from the
17045 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17046 on the regenerated declaration.
17048 2000-06-11 Chip Salzenberg <chip@valinux.com>
17049 Mark Mitchell <mark@codesourcery.com>
17051 * class.c (build_vtable): Clarify comment.
17052 (build_ctor_vtbl_group): Pass the most derived type to
17055 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17057 * decl2.c (compare_options): Don't needlessly cast away const-ness.
17059 2000-06-10 Mark Mitchell <mark@codesourcery.com>
17061 * decl.c (add_binding): Handle duplicate declarations of external
17064 2000-06-09 Chip Salzenberg <chip@valinux.com>
17065 Mark Mitchell <mark@codesourcery.com>
17067 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17069 (write_signed_number): New macro.
17070 (write_unsigned_number): Likewise.
17071 (write_source_name): Use them.
17072 (write_number): Handle signed and unsigned values.
17073 (write_integer_cst): Use tree_int_cst_sgn, and use
17074 write_unsigned_number or write_signed_number as appropriate.
17075 (write_discriminator): Use write_unsigned_number or
17076 write_signed_number as appropriate.
17077 (write_template_arg_literal): Likewise.
17078 (write_array_type): Use tree_low_cst.
17079 (write_template_parm): Use write_unsigned_number or
17080 write_signed_number as appropriate.
17081 (write_substitution): Adjust call to write_number.
17082 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17083 (write_expression): Handle non-type template arguments of
17084 reference type correctly.
17085 (mangle_thunk): Use write_signed_number.
17087 2000-06-09 Chip Salzenberg <chip@valinux.com>
17089 * mangle.c (find_substition): Don't mangle objects with typename
17090 substitutions (e.g. "cin" as "Si").
17092 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
17094 * call.c (add_candidate): Use ggc_alloc_cleared.
17095 * decl.c (lookup_label): Likewise.
17096 * lex.c (retrofit_lang_decl): Likewise.
17098 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
17100 * semantics.c (expand_body): Push to TV_EXPAND.
17101 * optimize.c (optimize_function): Push to TV_INTEGRATION.
17102 * decl.c (start_function): Always call announce_function.
17104 * tinfo2.cc: Just declare abort.
17106 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
17108 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17109 whenever @ is a symbolic name.
17111 2000-06-08 Jakub Jelinek <jakub@redhat.com>
17113 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17115 2000-06-07 Mark Mitchell <mark@codesourcery.com>
17117 * decl.c (pushdecl): Look up functions by DECL_NAME, not
17118 DECL_ASSEMBLER_NAME.
17120 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17122 * decl2.c (c_language): Define.
17124 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
17126 * lex.c (lang_init_options): Tweak.
17128 * decl2.c: Remove #inclusion of diagnostic.h
17129 (lang_decode_option): Move diagnostic formatting options to
17132 * lang-options.h: Remove documentation for diagnostic options.
17134 * Makefile.in (lex.o): Depends upon diagnostic.h
17136 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17138 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17139 the same DECL_RESULT, it's not a redefinition.
17140 * pt.c (tsubst_decl): Remove code to handle illegal
17143 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
17145 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17147 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
17149 * search.c (maybe_suppress_debug_info): Don't check
17150 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17152 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17155 Remember instantiation context in deferred instantiations.
17156 * cp-tree.h (struct tinst_level): Remove.
17157 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17158 * pt.c (current_tinst_level): Now a tree.
17159 (print_template_context, push_tinst_level, pop_tinst_level,
17160 tinst_for_decl): Adjust.
17161 (reopen_tinst_level): New fn.
17162 (init_pt): Register current_tinst_level as a root.
17163 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17164 of the pending templates list.
17165 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
17166 * lex.c (extract_interface_info): Adjust.
17167 * decl2.c (warn_if_unknown_interface): Adjust.
17169 2000-06-05 Mark Mitchell <mark@codesourcery.com>
17171 * class.c (indirect_primary_base_p): New function.
17172 (determine_primary_base): Use it.
17174 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
17176 Update new-abi dynamic cast algorithm.
17177 * tinfo.cc (__class_type_info::__dyncast_result): Add
17178 whole_details. Adjust constructor.
17179 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17180 Avoid unnecessary searching.
17181 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17183 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17185 * decl.c (init_decl_processing): Don't call record_component_aliases.
17186 * tree.c (build_cplus_array_type_1): Likewise.
17188 2000-06-04 Mark Mitchell <mark@codesourcery.com>
17190 * ir.texi: Correct typo.
17191 * mangle.c (write_expression): Handle non-type template arguments
17192 with reference type.
17193 * method.c (build_overload_value): Likewise.
17194 * pt.c (convert_nontype_argument): Explicitly represent conversion
17195 to a reference with an ADDR_EXPR.
17196 (unify): Always unify arguments in left-to-right order.
17198 2000-06-03 Alex Samuel <samuel@codesourcery.com>
17199 Mark Mitchell <mark@codesourcery.com>
17201 * Make-lang.in (CXX_SRCS): Add mangle.c.
17202 * Makefile.in (CXX_OBJS): Add mangle.o.
17203 (mangle.o): New rule.
17205 * class.c (local_classes): New variable.
17206 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17207 (get_vtt_name): Use mangle_vtt_name for new ABI.
17208 (init_class_processing): Initialize local_classes.
17209 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17210 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17211 (std_identifier): New macro.
17212 (DECL_VOLATILE_MEMFUNC_P): New macro.
17213 (DECL_NAMESPACE_STD_P): Likewise.
17214 (local_classes): Declare.
17215 (get_mostly_instantiated_function_type): Declare.
17216 (init_mangle): Declare.
17217 (mangle_decl): Likewise.
17218 (mangle_type_string): Likewise.
17219 (mangle_type): Likewise.
17220 (mangle_typeinfo_for_type): Likewise.
17221 (mangle_typeinfo_string_for_type): Likewise.
17222 (mangle_vtbl_for_type): Likewise.
17223 (mangle_vtt_for_type): Likewise.
17224 (mangle_ctor_vtbl_for_type): Likewise.
17225 (mangle_thunk): Likewise.
17226 (mangle_conv_op_name_for_type): Likewise.
17227 (mangle_guard_variable): Likewise.
17228 * decl.c (pushtag): Keep track of local classes.
17229 (initialize_predefined_identifiers): Initialize std_identifier.
17230 (init_decl_processing): Use std_identifier.
17231 (start_decl): Don't treat instantiations as specializations.
17232 (grokdeclarator): Likewise.
17233 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
17234 name for fully-instantiated templates.
17235 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17236 destructors with the new ABI.
17237 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17238 (grokfield): Use mangle_type for new ABI.
17239 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17240 (get_sentry): Use mangle_guard_variable for new ABI.
17241 (start_static_initialization_or_destruction): Likewise.
17242 * expr.c (extract_aggr_init): Remove.
17243 (extract_scalar_init): Likewise.
17244 (extract_init): Remove #if 0'd code.
17245 * mangle.c: New function.
17246 * method.c (build_mangled_name): Assert not flag_new_abi.
17247 (build_static_name): Likewise.
17248 (build_decl_overload_real): Likewise.
17249 (build_typename_overload): Likewise.
17250 (build_overload_with_type): Likewise.
17251 (build_overload_name): Likewise.
17252 (get_ctor_vtbl_name): Likewise.
17253 (start_squangling): Likewise.
17254 (get_id_2): Likewise.
17255 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17256 (init_method): Call init_mangle for new ABI.
17257 (make_thunk): Call mangle_thunk for new ABI.
17258 * operators.def: Correct new ABI manglings for the `%' operator.
17260 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17261 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17262 (lookup_template_class): Call mangle_decl for new ABI.
17263 (get_mostly_instantiated_function_type): New function.
17264 (set_mangled_name_for_template_decl): Use it.
17265 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17266 the new ABI. Use mangle_conv_op_name_for_type for instantiated
17267 conversion op names.
17268 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17269 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17270 (tinfo_base_init): Likewise. Mangle typeinfo string name with
17271 mangle_typeinfo_string_for_type.
17273 2000-06-03 Mark Mitchell <mark@codesourcery.com>
17275 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17276 (INNERMOST_TEMPLATE_ARGS): New macro.
17277 (innermost_args): Remove.
17278 (get_innermost_template_args): New function.
17279 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17280 * error.c (dump_function_decl): Be caution when using
17281 most_general_template.
17282 * method.c (build_template_parm_names): Use
17283 INNERMOST_TEMPLATE_ARGS.
17284 * pt.c (add_to_template_args): Tidy comment
17285 (get_innermost_template_args): New function.
17286 (check_explicit_specialization): Clear DECL_INITIAL for a new
17288 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17290 (push_template_decl): Always register specializations of the most
17292 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17293 (coerce_template_parms): Likewise.
17294 (lookup_template_class): Likewise.
17295 (innermost_args): Remove.
17296 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17297 (tsubst_decl): Handle tricky specializations. Use
17298 get_innermost_template_args.
17299 (instantiate_template): Simplify handling of partial
17301 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17302 (most_general_template): Reimplement, in a more straightforward
17304 (regenerate_decl_from_template): Tweak formatting. Use
17305 TMPL_ARGS_DEPTH for clarity.
17306 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17308 * dump.c (dequeue_and_dump): Dump information about thunks.
17310 2000-06-01 Richard Henderson <rth@cygnus.com>
17312 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17314 2000-06-01 Richard Henderson <rth@cygnus.com>
17316 * decl2.c (unsupported_options): Fix typo, make const.
17317 (lang_decode_option): Fix bsearch argument order.
17319 2000-06-01 Mark Mitchell <mark@codesourcery.com>
17321 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17324 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17326 * cp-tree.h (c_get_alias_set): Deleted.
17327 * Makefile.in (decl.o): Include ../expr.h.
17328 * decl.c (expr.h): Include.
17329 (init_decl_processing): Call record_component_aliases for arrays.
17330 (grokdeclarator): Likewise.
17331 Set TREE_ADDRESSABLE for fields that aren't bitfields.
17332 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17334 2000-05-31 Mark Mitchell <mark@codesourcery.com>
17336 Remove guiding declaration support.
17337 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17338 (flag_guiding_decls): Remove.
17339 * call.c (build_user_type_conversion_1): Remove support for
17341 (build_new_function_call): Likewise.
17342 (build_new_op): Likewise.
17343 (build_new_method_call): Likewise.
17344 * decl.c (start_function): Likewise.
17345 * friend.c (is_friend): Likewise.
17346 (do_friend): Likewise.
17347 * decl2.c ((flag_dump_translation_unit): Make it const.
17348 (flag_guiding_decls): Remove.
17349 (unsupported_options): New variable
17350 (compare_options): New function.
17351 (lang_decode_option): Use them.
17353 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17355 * method.c (mangle_expression): Adjust test for legal expression
17358 * pt.c (instantiate_decl): Save and restore the local
17359 specializations list.
17361 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
17363 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17365 2000-05-30 Mark Mitchell <mark@codesourcery.com>
17367 * call.c (add_template_candidate_real): Handle member template
17368 constructors for classes with virtual bases.
17369 (build_user_type_conversion_1): Use in_charge_arg_for_name.
17370 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17372 * ir.texi: Update thunk documentation.
17374 * call.c (joust): Fix handling of overloaded builtin operators.
17376 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
17378 * cp-tree.h (DECL_ANTICIPATED): New macro.
17379 Document new use of DECL_LANG_FLAG_7.
17380 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17381 in the user namespace.
17382 * lex.c (do_identifier): If the identifier's declaration has
17383 DECL_ANTICIPATED on, it has not yet been declared. But do not
17384 replace it with an ordinary implicit declaration.
17386 * tinfo2.cc: Include stdlib.h.
17388 2000-05-29 Mark Mitchell <mark@codesourcery.com>
17390 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17391 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17394 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
17396 * decl2.c (lang_decode_option): Use skip_leading_substring instead
17399 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
17401 * operators.def (<?): Duplicated, should have been...
17404 2000-05-27 Alex Samuel <samuel@codesourcery.com>
17405 Mark Mitchell <mark@codesourcery.com>
17407 * cp-tree.h (ansi_opname): Make it a macro.
17408 (ansi_assopname): Likewise.
17409 (struct lang_decl_flags): Add assignment_operator_p.
17410 (struct lang_decl): Add operator_code.
17411 (DECL_VTT_PARM): Adjust.
17412 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17413 overloaded operator.
17414 (SET_OVERLOADED_OPERATOR_CODE): New macro.
17415 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17416 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17417 (opname_tab): Remove.
17418 (assignop_tab): Likewise.
17419 (operator_name_info_t): New type.
17420 (operator_name_info): New variable.
17421 (assignment_operator_name_info): Likewise.
17422 (build_cp_library_fn): Remove declaration.
17423 (push_cp_library_fn): Likewise.
17424 (operator_name_string): Likewise.
17425 (build_decl_overload): Likewise.
17426 * call.c (print_z_candidates): Simplify.
17427 (build_object_call): Adjust usage of ansi_opname. Use
17428 DECL_OVERLOADED_OPERATOR_P.
17429 (op_error): Adjust operator name lookup.
17430 (build_conditional_expr): Adjust usage of ansi_opname.
17431 (build_new_op): Likewise.
17432 (build_op_delete_call): Likewise.
17433 (build_over_call): Likewise.
17434 (joust): Use DECL_OVERLOADED_OPERATOR_P.
17435 * decl.c (duplicate_decls): Copy operator_code.
17436 (init_decl_processing): Adjust parameters to push_cp_library_fn.
17437 (builtin_function): Adjust parameters to build_library_fn_1.
17438 (build_library_fn_1): Accept an overloaded operator code.
17439 (build_library_fn): Pass ERROR_MARK.
17440 (build_cp_library_fn): Accept an overloaded operator code.
17441 (push_cp_library_fn): Likewise.
17442 (grokfndecl): Tweak.
17443 (grokdeclarator): Simplify code to compute names of overloaded
17444 operators. Adjust use of ansi_opname.
17445 (ambi_op_p): Work on tree_codes, not identifiers.
17446 (unary_op_p): Likewise.
17447 (grok_op_properties): Likewise.
17448 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17449 (lang_mark_tree): Don't try to mark the operator_code.
17450 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17451 * error.c (dump_decl): Remove special handling for operator
17453 (dump_function_name): Likewise.
17454 (dump_expr): Adjust name lookup of operators.
17455 (op_to_string): Simplify.
17456 (assop_to_string): Likewise.
17457 * init.c (build_new_1): Adjust use of ansi_opname.
17458 * lex.c (opname_tab): Remove.
17459 (assignop_tab): Likewise.
17460 (ansi_opname): Likewise.
17461 (ansi_assopname): Likewise.
17462 (operator_name_string): Likewise.
17463 (reinit_lang_specific): Likewise.
17464 (operator_name_info): New variable.
17465 (assignment_operator_name_info): Likewise.
17466 (init_operators): New function.
17467 (init_parse): Use it.
17468 (do_identifier): Adjust use of ansi_opname.
17469 * method.c (mangle_expression): Don't use ansi_opname for
17471 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17472 (build_decl_overload): Remove.
17473 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17474 (do_build_assign_ref): Adjust use of ansi_opname.
17475 (synthesize_method): Likewise.
17476 (implicitly_declare_fn): Likewise.
17477 * operators.def: New file.
17478 * parse.y (operator): Adjust use of ansi_opname.
17479 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17480 (set_mangled_name_for_template_decl): Don't play games with
17482 (special_function_p): Adjust use of ansi_opname.
17483 * typeck.c (check_return_expr): Likewise.
17484 * Make-lang.in (cc1plus): Depend on operators.def.
17485 * Makefile.in (lex.o): Likewise.
17486 (decl.o): Likewise.
17488 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
17490 * Make-lang.in (cplib2.ready): Eradicate.
17492 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17494 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17495 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17496 (built_min, cp_tree_equal): Likewise.
17498 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17500 * class.c (layout_nonempty_base_or_field): Replace
17501 `record_layout_info' with `record_layout_info_s'.
17503 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
17506 * cp-tree.h (struct language_function): x_named_labels is now
17507 a struct named_label_list*.
17508 * decl.c (struct named_label_use_list): Renamed from...
17509 (struct named_label_list): ...this. New struct.
17510 (push_binding_level): Don't set eh_region.
17511 (note_level_for_eh): New fn.
17512 (pop_label): Take label and old value directly.
17513 (pop_labels): Adjust for new named_labels format.
17514 (lookup_label): Likewise.
17515 (poplevel): Note characteristics of a binding level containing a
17516 named label. Mess with named label lists earlier.
17517 (mark_named_label_lists): New fn.
17518 (mark_lang_function): Call it.
17519 (use_label): New fn, split out from...
17520 (make_label_decl): ...here. Don't call it.
17521 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17522 check_previous_gotos): New fns, split out from...
17523 (define_label): ...here.
17524 (check_switch_goto): New fn.
17525 (define_case_label): Call it.
17526 (check_goto): New fn.
17527 * semantics.c (finish_goto_stmt): Call it and use_label.
17528 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17529 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17531 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17533 * class.c (build_vtable_entry_ref): Correct usage of
17534 get_vtbl_decl_for_binfo.
17536 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17537 * method.c (implicitly_declare_fn): Not here.
17539 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
17541 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17542 (CPTI_PTMD_DESC_TYPE): ... here.
17543 (ptmd_desc_type_node): Rename to ...
17544 (ptm_desc_type_node): ... here.
17545 * decl.c: Likewise.
17546 * rtti.c (ptmd_initializer): Rename to ...
17547 (ptm_initializer): ... here.
17548 (sythesize_tinfo_var): Adjust. Deal with pointer to member
17550 (create_tinfo_types): Adjust.
17552 2000-05-25 Mark Mitchell <mark@codesourcery.com>
17554 Finish implementation of VTTs.
17555 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17556 CPTI_VTT_PARM_IDENTIFIER.
17557 (vtt_parm_identifier): New macro.
17558 (vtt_parm_type): Likewise.
17559 (BINFO_SUBVTT_INDEX): Likewise.
17560 (BINFO_VPTR_INDEX): Likewise.
17561 (struct lang_decl): Add vtt_parm.
17562 (DECL_VTT_PARM): New macro.
17563 (DECL_USE_VTT_PARM): Likewise.
17564 (DECL_NEEDS_VTT_PARM_P): Likewise.
17565 (get_vtt_name): Declare.
17566 (build_artificial_parm): Likewise.
17567 (fixup_all_virtual_upcast_offsets): Likewise.
17568 (expand_indirect_vtbls_init): Remove.
17569 * call.c (build_new_method_call): Pass the vtt to subobject
17570 constructors and destructors.
17571 * class.c (get_vtt_name): Give it external linkage.
17572 (build_clone): Handle the magic VTT parameters for clones.
17573 (clone_function_decl): Fix typo in comment.
17574 (build_vtt): Keep track of the indices in the VTTs where various
17575 entities are stored.
17576 (build_vtt_inits): Likewise.
17577 (dfs_build_vtt_inits): Likewise.
17578 (build_ctor_vtbl_group): Tweak type of construction vtables.
17579 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17580 primary bases, when building construction vtables.
17581 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17582 (initialize_predefined_identifiers): Add vtt_parm_identifier.
17583 (init_decl_processing): Initialize vtt_parm_type.
17584 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17585 (lang_mark_tree): Make vtt_parm.
17586 * decl2.c (build_artificial_parm): New function.
17587 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
17588 (grokclassfn): Use build_artificial_parm.
17589 * init.c (initialize_vtbl_ptrs): Call
17590 fixup_all_virtual_upcast_offsets directly.
17591 (perform_member_init): Use the complete subobject destructor for
17593 (build_vtbl_address): New function.
17594 (expand_virtual_init): Handle VTTs.
17595 * optimize (maybe_clone_body): Likewise.
17596 * search.c (fixup_all_virtual_upcast_offsets): Give it external
17598 (expand_indirect_vtbls_init): Remove.
17599 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17600 * tree.c (make_binfo): Make them bigger.
17602 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17604 * inc/cxxabi.h (__pbase_type_info): Define, based on
17605 __pointer_type_info.
17606 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17607 (__pointer_to_member_type_info): Likewise.
17608 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17609 (__pointer_to_member_type_info::__is_pointer_p): Remove.
17610 (__pointer_type_info::__do_catch): Rename to ...
17611 (__pbase_type_info::__do_catch): ... here. Adjust.
17612 (__pbase_type_info::__pointer_catch): Implement.
17613 (__pointer_type_info::__pointer_catch): Adjust.
17614 (__pointer_to_member_type_info::__pointer_catch): Adjust.
17616 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17618 * tinfo.h (__user_type_info::contained_virtual_p): New
17620 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17622 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17623 diamond shaped hierarchy. Add early out for mixed diamond and
17624 duplicate shaped hierarchy.
17626 2000-05-24 Mark Mitchell <mark@codesourcery.com>
17628 * cp-tree.h (build_delete): Change prototype.
17629 (build_vec_delete): Likewise.
17630 * call.c (build_scoped_method_call): Use special_function_kind
17631 values to indicate the kind of destruction to be done.
17632 (build_method_call): Likewise.
17633 * decl.c (finish_destructor_body): Likewise.
17634 (maybe_build_cleanup_1): Likewise. Rename to ...
17635 (maybe_build_cleanup): ... this.
17636 * decl2.c (delete_sanity): Use special_function_kind
17637 values to indicate the kind of destruction to be done.
17638 (build_cleanup): Likewise.
17639 * init.c (perform_member_init): Likewise.
17640 (build_vec_delete_1): Likewise.
17641 (build_dtor_call): Simplify.
17642 (build_delete): Use special_function_kind
17643 values to indicate the kind of destruction to be done.
17644 (build_vbase_delete): Likewise.
17645 (build_vec_delete): Likewise.
17647 * init.c (sort_member_init): Fix typo in error message generation
17650 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
17652 * semantics.c (begin_class_definition): make the packed
17653 attribute be sensitive to the "-fpack-struct" command line flag
17655 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
17657 Update new-abi upcast algorithm.
17658 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17659 prototype and meaning of return value.
17660 (__si_class_type_info::__do_upcast): Likewise.
17661 (__vmi_class_type_info::__do_upcast): Likewise.
17662 * tinfo.cc (__class_type_info::__upcast_result): Replace
17663 whole2dst with part2dst. Adjust ctor.
17664 (__class_type_info::__do_upcast): Adjust call of worker function.
17665 (__class_type_info::__do_upcast): Adjust.
17666 (__si_class_type_info::__do_upcast): Adjust. Use parent's
17668 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17669 virtual base in diamond hierarchy bug.
17671 2000-05-23 Mark Mitchell <mark@codesourcery.com>
17673 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17674 and bitfield to tinfo_fn_p.
17675 (DECL_TINFO_FN_P): Adjust.
17676 (SET_DECL_TINFO_FN_P): Likewise.
17677 (DECL_MUTABLE_P): Likewise.
17678 (DECL_C_BIT_FIELD): Likewise.
17679 (SET_DECL_C_BIT_FIELD): Likewise.
17680 (CLEAR_DECL_C_BIT_FIELD): Likewise.
17681 (DECL_UNINLINABLE): Likewise.
17682 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17683 (handle_using_decl): Remove assertion.
17684 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17685 to build FIELD_DECLs.
17686 (build_base_field): Likewise.
17687 (layout_class_type): Likewise.
17688 * decl.c (init_decl_processing): Likewise.
17689 (build_ptrmemfunc_type): Likewise.
17690 (grokdeclarator): Likewise.
17691 * decl2.c (grok_x_components): Likewise.
17692 * except.c (call_eh_info): Likewise.
17693 * init.c (init_init_processing): Likewise.
17694 * rtti.c (expand_class_desc): Likewise.
17695 (create_pseudo_type_info): Likewise.
17696 (get_vmi_pseudo_type_info): Likewise.
17697 (create_tinfo_types): Likewise.
17698 * ptree.c (print_lang_decl): Adjust.
17699 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17700 before checking DECL_MUTABLE_P.
17702 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17703 parameters for template functions.
17704 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17705 destructors as well as constructors.
17707 2000-05-22 Mark Mitchell <mark@codesourcery.com>
17709 * class.c (build_ctor_vtbl_group): Set inits.
17710 * optimize.c (maybe_clone_body): Set DECL_INLINE and
17711 DECL_THIS_INLINE appropriately for clones.
17713 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17714 (DECL_CONV_FN_P): Simplify.
17715 (DECL_OPERATOR): Remove.
17716 (language_to_string): Declare.
17717 * decl.c (duplicate_decls): Fix typo in comment.
17718 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17719 (grok_op_properties): Use DECL_CONV_FN_P instead of
17720 IDENTIFIER_TYPENAME_P.
17721 * dump.c (dequeue_and_dump): Dump the language linkage of
17723 * error.c (language_to_string): Give it external linkage.
17724 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17725 (implicitly_declare_fn): Set DECL_LANGUAGE.
17726 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17727 IDENTIFIER_TYPENAME_P.
17728 (tsubst_decl): Likewise.
17729 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17730 * semantics.c (finish_member_declaration): Don't mark members of
17731 classes declared in an extern "C" region as extern "C".
17733 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17735 * decl2.c (qualified_lookup_using_namespace): Look through
17738 * decl.c (push_using_decl): Return the old decl on namespace level.
17740 2000-05-21 Mark Mitchell <mark@codesourcery.com>
17742 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17743 (VTT_NAME_PREFIX): New macro.
17744 (CTOR_VTBL_NAME_PREFIX): Likewise.
17745 (get_ctor_vtbl_name): New function.
17746 * class.c (get_vtable_name): Simplify.
17747 (get_vtt_name): New function.
17748 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17749 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17750 when a virtual base becomes primary.
17751 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
17753 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17754 additional parameters.
17755 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17756 (initialize_array): New function.
17757 (build_vtt): Likewise.
17758 (build_vtt_inits): Likewise.
17759 (dfs_build_vtt_inits): Likewise.
17760 (dfs_fixup_binfo_vtbls): Likewise.
17761 (build_ctor_vtbl_group): Likewise.
17762 (initialize_vtable): Use initialize_array.
17763 (accumulate_vtbl_inits): Reimplement to handle construction
17765 (dfs_accumulate_vtbl_inits): Likewise.
17766 (bulid_vtbl_initializer): Adjust parameter name.
17767 * method.c (build_typename_overload): Remove #if 0'd code.
17768 (get_ctor_vtbl_name): New function.
17769 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17770 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17772 * cp-tree.h (struct lang_type): Remove search_slot.
17773 (CLASSTYPE_SEARCH_SLOT): Remove.
17774 (emit_base_init): Change prototype.
17775 (initialize_vtbl_ptrs): Likewise.
17776 (expand_indirect_vtbls_init): Likewise.
17777 (clear_search_slots): Remove.
17778 * decl.c (lang_mark_tree): Don't mark search_slot.
17779 * init.c (initialize_vtbl_ptrs): Simplify.
17780 (emit_base_init): Likewise.
17781 * search.c (struct vbase_info): Document decl_ptr.
17782 (convert_pointer_to_single_level): Remove.
17783 (dfs_find_vbases): Remove.
17784 (dfs_init_base_pointers): Simplify.
17785 (dfs_clear_vbase_slots): Remove.
17786 (dfs_vtable_path_unmark): New function.
17787 (init_vbase_pointers): Simplify.
17788 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17789 (expand_indirect_vtbls_init): Simplify. Don't call
17790 mark_all_temps_used.
17791 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17792 initialize_vtbl_ptrs.
17794 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
17796 * except.c: Add static prototypes.
17798 2000-05-20 H.J. Lu <hjl@gnu.org>
17800 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17802 2000-05-19 Mark Mitchell <mark@codesourcery.com>
17804 Don't create a separate copy of virtual bases for the
17805 CLASSTYPE_VBASECLASSES list.
17806 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17807 (BINFO_FOR_VBASE): Remove.
17808 (CANONICAL_BINFO): Adjust.
17809 (binfo_for_vbase): New function.
17810 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17811 instead of BINFO_FOR_VBASE.
17812 (build_vbase_pointer): Likewise.
17813 (build_secondary_vtable): Likewise.
17814 (dfs_mark_primary_bases): Likewise.
17815 (mark_primary_bases): Likewise.
17816 (layout_nonempty_base_or_field): Likewise.
17817 (dfs_set_offset_for_shared_vbases): Likewise.
17818 (dfs_set_offset_for_unshared_vbases): Likewise.
17819 (layout_virtual_bases): Likewise. Adjust for changes to the
17820 CLASSTYPE_VBASECLASSES list.
17821 (dump_class_hierarchy_r): Use binfo_for_vbase
17822 instead of BINFO_FOR_VBASE.
17823 (dump_class_hierarchy): Likewise.
17824 (finish_vtbls): Likewise.
17825 (build_vtbl_initializer): Adjust for changes to the
17826 CLASSTYPE_VBASECLASSES list.
17827 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17828 * decl.c (finish_destructor_body): Adjust for changes to the
17829 CLASSTYPE_VBASECLASSES list.
17830 * init.c (sort_base_init): Use binfo_for_vbase.
17831 (construct_virtual_bases): Adjust for changes to the
17832 CLASSTYPE_VBASECLASSES list.
17833 (expand_member_init): Use binfo_for_vbase.
17834 (build_vbase_delete): Adjust for changes to the
17835 CLASSTYPE_VBASECLASSES list.
17836 * method.c (do_build_copy_constructor): Likewise.
17837 * rtti.c (get_base_offset): Use binfo_for_vbase.
17838 (expand_class_desc): Remove #if 0'd code.
17839 * search.c (struct vbase_info): Remove vbase_types.
17840 (get_base_distance): Use binfo_for_vbase.
17841 (lookup_field_queue_p): Use CANONICAL_BINFO.
17842 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17843 (get_pure_virtuals): Adjust for changes to the
17844 CLASSTYPE_VBASECLASSES list.
17845 (dfs_find_vbases): Use binfo_for_vbase.
17846 (dfs_init_vbase_pointers): Likewise.
17847 (init_vbase_pointers): Don't initialize vi.vbase_types.
17848 (virtual_context): Use binfo_for_vbase.
17849 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17850 CLASSTYPE_VBASECLASSES list.
17851 (expand_indirect_vtbls_init): Simplify.
17852 (dfs_get_vbase_types): Don't replicate virtual bases.
17853 (find_vbase_instance): Use binfo_for_vbase.
17854 (binfo_for_vbase): New function.
17855 * typeck.c (get_delta_difference): Use binfo_for_vbase.
17857 2000-05-17 Mark Mitchell <mark@codesourcery.com>
17859 * decl2.c (finish_anon_union): Generalize error messages to handle
17860 anonymous structures.
17861 * init.c (perform_member_init): Remove `name' parameter.
17862 (build_field_list): New function.
17863 (sort_member_init): Handle anonymous union initialization order
17864 correctly. Check for multiple initializations of the same union.
17865 (emit_base_init): Don't look up fields by name here.
17866 (expand_member_init): Record the result of name lookup for future
17868 * typeck.c (build_component_ref): Fix formatting.
17870 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
17872 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17873 * typeck.c (build_x_compound_expr): Replace warn_unused with
17876 * decl2.c (lang_decode_option): Update -Wall unused flags by
17877 calling set_Wunused.
17879 2000-05-16 Mark Mitchell <mark@codesourcery.com>
17881 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17882 * init.c (dfs_vtable_path_unmark): Remove.
17883 * search.c (marked_new_vtable_p): Likewise.
17884 (unmarked_new_vtable_p): Likewise.
17885 (dfs_search_slot_nonempty_p): Likewise.
17886 (dfs_mark): Likewise.
17887 (dfs_vtable_path_unmark): Likewise.
17888 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17889 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17890 (dfs_init_vbase_pointers): Remove special-case new ABI code.
17891 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17892 (init_vbase_pointers): Simplify.
17893 (expand_indirect_vtbls_init): Likewise.
17895 * class.c (copy_virtuals): New function.
17896 (build_primary_table): Use it.
17897 (build_secondary_vtable): Likewise.
17898 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17899 indicate that no vcall offset is required.
17900 (add_virtual_function): Likewise.
17901 (modify_all_vtables): Likewise.
17902 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17903 (dfs_accumulate_vtbl_inits): Likewise.
17904 (build_vtbl_initializer): Make changes to handle construction
17906 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17907 (build_rtti_vtbl_entries): Likewise.
17908 (build_vtable_entries): Handle a NULL vcall_index.
17910 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
17912 * decl2.c (lang_decode_option): Fix thinko.
17914 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
17916 * except.c (check_handlers): New fn.
17917 * cp-tree.h: Declare it.
17918 * semantics.c (finish_handler_sequence): Call it.
17919 (finish_function_handler_sequence): Likewise.
17920 (finish_handler_parms): Set TREE_TYPE on the handler.
17921 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17922 * search.c (get_base_distance_recursive): If protect>1, ignore
17924 (get_base_distance): Don't reduce watch_access.
17926 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
17928 * lex.c: #include diagnostic.h.
17929 (lang_init_options): Set default prefixing rules.
17931 * lang-options.h: Add -fdiagnostics-show-location=.
17933 * decl2.c: #include diagnostic.h.
17934 (lang_decode_option): Handle -fdiagnostics-show-location=.
17936 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
17938 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17939 * vec.cc: Revert my 2000-05-07 change.
17941 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
17943 * class.c (check_field_decls): Complain about non-static data
17944 members with same name as class in class with constructor.
17946 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
17948 * decl.c (grokdeclarator): Allow non-static data members with
17949 same name as class.
17951 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
17953 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17954 and pending_inline.filename. Update prototypes.
17955 * decl.c (define_label): Constify filename parameter.
17956 * decl2.c (warn_if_unknown_interface): Constify local char *.
17957 * input.c Constify input_source.filename. Don't declare
17958 input_filename or lineno. Constify filename parameter to feed_input.
17959 * lex.c (init_parse): Constify parameter and return value.
17960 (cp_pragma_interface, cp_pragma_implementation): Constify
17962 (reinit_parse_for_method, reinit_parse_for_block,
17963 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17964 Constify local char *.
17965 * pt.c: Don't declare lineno or input_filename.
17966 (print_template_context, tsubst_friend_function, tsubst_decl,
17967 tsubst, instantiate_decl): Constify local char *.
17968 * semantics.c (expand_body): Constify local char *.
17969 * tree.c (build_srcloc): Constify filename parameter.
17970 * typeck.c (c_expand_asm_operands): Constify filename
17973 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
17975 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17976 offsetof expansion.
17978 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
17980 * inc/cxxabi.h: Fix typos in comment.
17981 (__base_class_info::__offset): Use a static_cast.
17983 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
17985 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17986 of std::size_t and std::ptrdiff_t respectively.
17987 * tinfo.cc: Likewise.
17988 * vec.cc: Likewise.
17990 2000-05-06 Richard Henderson <rth@cygnus.com>
17992 * typeck.c (build_c_cast): Don't warn integer->pointer size
17993 mismatch for constants.
17995 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
17997 * rtti.c (ptmd_initializer): Set non-public, if class is
18000 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18001 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18002 __cxa_vec_delete): Likewise.
18003 * tinfo.cc (__dynamic_cast): Likewise.
18004 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18005 __cxa_vec_delete): Likewise.
18007 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18009 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18010 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18011 (lang_decl_flags): Add vcall_offset.
18012 (THUNK_VCALL_OFFSET): Use it.
18013 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18014 * method.c (make_thunk): Create the lang_decl here, not in
18016 (emit_thunk): Make generic thunks into ordinary functions once
18017 they have been fed to expand_body.
18018 * semantics.c (expand_body): Set current_function_is_thunk here.
18020 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18022 * class.c (update_vtable_entry_for_fn): Prototype.
18024 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18027 * search.c (dfs_build_inheritance_graph_order): Prototype.
18029 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18031 * cp-tree.h (special_function_kind): Add various kinds of
18033 (special_function_p): New function.
18034 * class.c (overrides): Don't let one kind of destructor override
18036 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18037 whether or not to instantiate a template.
18038 * tree.c (special_function_p): Define.
18040 2000-05-03 Mark Mitchell <mark@codesourcery.com>
18042 * cp-tree.def (THUNK_DECL): Remove.
18043 * cp-tree.h (DECL_THUNK_P): New macro.
18044 (DECL_NON_THUNK_FUNCTION_P): Likewise.
18045 (DECL_EXTERN_C_FUNCTION_P): Likewise.
18046 (SET_DECL_THUNK_P): Likewise.
18047 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18048 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18049 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18050 * decl.c (decls_match): Use DECL_EXTERN_C_P.
18051 (duplicate_decls): Likewise.
18052 (pushdecl): Likewise. Adjust thunk handling.
18053 (grokfndecl): Use DECL_EXTERN_C_P.
18054 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18055 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18056 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18057 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18058 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
18059 DECL_NO_STATIC_CHAIN.
18060 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
18061 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18062 * search.c (covariant_return_p): Remove THUNK_DECL handling.
18065 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18067 * tree.c (walk_tree): Set lineno.
18069 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18071 * exception.cc: Update license notice.
18072 * new.cc: Likewise.
18073 * new1.cc: Likewise.
18074 * new2.cc: Likewise.
18075 * tinfo.cc: Likewise.
18076 * tinfo2.cc: Likewise.
18077 * vec.cc: Likewise.
18078 * inc/cxxabi.h: Likewise.
18079 * inc/exception: Likewise.
18080 * inc/new: Likewise.
18081 * inc/new.h: Likewise.
18082 * inc/typeinfo: Likewise.
18084 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18086 * tree.c (build_target_expr_with_type): If we already have a
18087 TARGET_EXPR, just return it.
18089 * optimize.c (initialize_inlined_parameters): Don't generate an
18090 EXPR_STMT if we can just use DECL_INITIAL.
18091 * decl.c (emit_local_var): Only make the initialization a
18092 full-expression if stmts_are_full_exprs_p.
18094 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18096 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18098 * call.c (standard_conversion): Use it.
18099 (direct_reference_binding): Likewise.
18100 (build_over_call): Likewise.
18101 (is_properly_derived_from): Likewise.
18102 (compare_ics): Likewise.
18103 * class.c (resolves_to_fixed_type_p): Likewise.
18104 * optimize.c (declare_return_variable): Likewise.
18105 * pt.c (is_specialization_of): Likewise.
18107 * typeck.c (comp_target_parms): Likeiwse.
18108 (build_static_cast): Likewise.
18109 (build_reinterpret_cast): Likewise.
18110 (build_const_cast): Likewise.
18111 (comp_ptr_ttypes_real): Likewise.
18112 (comp_ptr_ttypes_const): Likewise.
18113 * typeck2.c (process_init_constructor): Likewise.
18115 2000-04-30 Scott Snyder <snyder@fnal.gov>
18117 * decl.c (finish_destructor_body): Use the base destructor when
18118 destroying virtual bases.
18120 2000-04-30 Mark Mitchell <mark@codesourcery.com>
18122 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18124 * optimize.c (struct inline_data): Add target_exprs field.
18125 (declare_return_variable): When a function returns an aggregate,
18126 use the variable declared in the TARGET_EXPR as the remapped
18128 (expand_call_inline): Update the pending target_exprs stack.
18129 (optimize_function): Initialize the stack.
18131 * decl2.c (finish_file): Fix typo in comment.
18133 * method.c (emit_thunk): Don't try to return a `void' value.
18135 * optimize.c (initialize_inlined_parameters): If the parameter is
18136 addressable, we need to make a new VAR_DECL, even if the
18137 initializer is constant.
18139 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
18141 * decl.c (grok_op_properties): Add an extra check of argtypes.
18143 2000-04-27 Mark Mitchell <mark@codesourcery.com>
18145 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18147 (initialize_inlined_parameters): Try to avoid creating new
18150 2000-04-27 Alex Samuel <samuel@codesourcery.com>
18152 * lex.c (my_get_run_time): Remove.
18153 (init_filename_times): Use get_run_time instead of my_get_run_time.
18154 (check_newline): Likewise.
18155 (dump_time_statistics): Likewise.
18156 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18157 of computing elapsed time explicitly.
18159 2000-04-26 Mark Mitchell <mark@codesourcery.com>
18161 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18162 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18163 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18164 before calling decl_constant_value.
18165 * class.c (check_bitfield_decl): Likewise.
18166 * cvt.c (ocp_convert): Likewise.
18167 (convert): Likewise.
18168 * decl.c (compute_array_index_type): Likewise.
18169 (build_enumerator): Likewise.
18170 * decl2.c (check_cp_case_value): Likewise.
18171 * pt.c (convert_nontype_argument): Likewise.
18172 (tsubst): Likewise.
18173 * typeck.c (decay_conversion): Likewise.
18174 (build_compound_expr): Likewise.
18175 (build_reinterpret_cast): Likewise.
18176 (build_c_cast): Likewise.
18177 (convert_for_assignment): Likewise.
18179 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
18181 * decl.c (finish_function): Don't play games with DECL_INLINE.
18183 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
18185 * ir.texi: Correct typo.
18187 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18189 * decl.c (grokdeclarator): Reject VLAs as members.
18191 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
18193 * call.c (standard_conversion): Accept conversion between
18196 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18198 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
18200 * decl2.c (finish_file): Remove double setup for accounting
18203 2000-04-24 Robert Lipe <robertlipe@usa.net>
18205 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18207 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
18209 * new.cc (set_new_handler): Needs to be in std::.
18211 2000-04-23 Mark Mitchell <mark@codesourcery.com>
18213 * cp-tree.h (lang_decl): Remove pretty_function_p.
18214 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18215 language-specific node.
18216 * decl.c (cp_make_fname_decl): Use build_decl, not
18217 build_lang_decl, to build the variables.
18218 (grokvardecl): Don't call build_lang_decl for local variables in
18220 (grokdeclarator): Don't call build_lang_decl for local type
18221 declarations in templates.
18222 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18223 zero'd memory, rather than calling memset.
18224 * pt.c: Include hashtab.h.
18225 (local_specializations): New variable.
18226 (retrieve_local_specialization): Use it.
18227 (register_local_specialization): Likewise.
18228 (tsubst_decl): Don't assume local variables have
18229 DECL_LANG_SPECIFIC.
18230 (instantiate_decl): Set up local_specializations.
18231 * Makefile.in (HTAB_H): New variable.
18233 2000-04-23 Richard Henderson <rth@cygnus.com>
18235 * typeck.c (c_expand_asm_operands): Restore the original
18236 contents of the output list.
18238 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
18240 * ir.texi: Document complex number representation.
18242 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
18244 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18245 (target_incomplete_p): New function.
18246 (tinfo_base_init): Create comdat NTBS name variable.
18247 (ptr_initializer): Add non_public parameter. Calculate it.
18248 (ptmd_initializer): Likewise.
18249 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18250 (create_real_tinfo_var): Add non_public parameter. Use it.
18251 Push proxy into global namespace.
18252 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18254 * inc/typeinfo (type_info::before, type_info::operator==):
18255 Compare __name addresses.
18257 * tinfo2.cc: Remove new-abi builtins comment.
18259 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
18261 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18263 * call.c (joust): Exit early if we get the same function, too.
18265 * decl2.c (key_method): Return NULL_TREE for template classes.
18266 (import_export_class): Don't need to check for template classes.
18268 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
18270 * lex.c: Remove references to cccp.c.
18272 2000-04-18 Mark Mitchell <mark@codesourcery.com>
18274 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18275 volatile_memfunc. Add destructor_attr. Adjust dummy.
18276 (DECL_DESTRUCTOR_P): Use destructor_attr.
18277 (DECL_CONST_MEMFUNC_P): Reimplement.
18278 (DECL_VOLATILE_MEMFUNC_P): Remove.
18279 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18280 (overrides): Use DECL_DESTRUCTOR_P.
18281 (check_for_override): Likewise.
18282 * decl.c (start_function): Likewise.
18283 * decl2.c (grokfclassfn): Likewise.
18284 (check_classfn): Likewise.
18285 (grok_function_init): Likewise.
18287 2000-04-17 Mark Mitchell <mark@codesourcery.com>
18289 * decl2.c (grokfield): Issue error on illegal data member
18292 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
18294 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18296 2000-04-16 Mark Mitchell <mark@codesourcery.com>
18298 * class.c (build_vtable_entry): Don't build thunks for type-info
18301 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
18303 * decl.c (decls_match): Allow a redeclaration of a builtin to
18304 specify args while the builtin did not.
18306 2000-04-15 Mark Mitchell <mark@codesourcery.com>
18308 * cp-tree.def (THUNK_DECL): Add to documentation.
18309 * cp-tree.h (flag_huge_objects): Declare.
18310 * class.c (modify_vtable_entry): Tidy.
18311 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18312 Calculate delta appropriately for the new ABI.
18313 (dfs_modify_vtables): Use it.
18314 (modify_all_vtables): Fix thinko in code to add overriding copies
18315 of functions to primary vtables.
18316 (build_clone): Fix typo in comment.
18317 (clone_function_decl): Correct order of destructors in vtable.
18318 (build_vbase_offset_vtbl_entries): Adjust comment.
18319 (dfs_vcall_offset_queue_p): Remove.
18320 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18321 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18322 (build_vtable_entry): Correct check for pure virtual functions.
18323 Don't declare flag_huge_objects.
18324 * decl.c (flag_huge_objects): Remove declaration.
18325 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18326 Use int_size_in_bytes.
18327 (emit_thunk): Handle vcall offset thunks.
18329 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18331 * decl2.c (parse_time, varconst_time): Delete declarations.
18332 (finish_file): Delete LINENO declaration.
18333 START_TIME and THIS_TIME now long.
18335 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
18337 * class.c (build_base_field): Reformat comment.
18339 * inc/cxxabi.h (stddef.h): Comment inclusion.
18340 (__base_class_info::__offset): Comment shift.
18342 2000-04-12 Mark Mitchell <mark@codesourcery.com>
18344 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18345 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18346 (cp_push_exception_identifier): New macro.
18347 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18348 (DECL_BASE_DESTRUCTOR_P): Likewise.
18349 (DECL_DELETING_DESTRUCTOR_P): Likewise.
18350 (get_vtbl_decl_for_binfo): Fix formatting.
18351 (in_charge_arg_for_name): New macro.
18352 (maybe_build_cleanup_and_delete): Remove declaration.
18353 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18354 (in_charge_arg_for_name): New function.
18355 (build_new_method_call): Use it. Handle cloned destructors.
18356 (build_clone): Don't make the base constructor virtual.
18357 Automatically defer generated functions.
18358 (clone_function_decl): Handle destructors, too.
18359 (clone_constructors_and_destructors): Likewise.
18360 (create_vtable_ptr): Don't create a vtable entry for a cloned
18362 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18363 (initialize_predefined_identifiers): Update appropriately.
18364 (finish_destructor_body): Simplify.
18365 (maybe_build_cleanup_and_delete): Remove.
18366 * except.c (expand_throw): Handle new-ABI destructors.
18367 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18368 (build_dtor_call): New function.
18369 (build_delete): Use it. Simplify.
18370 * optimize.c (maybe_clone_body): Handle destructors.
18371 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18373 * exception.cc (cleanup_fn): New typedef.
18374 (CALL_CLEANUP): New macro.
18375 (cp_eh_info): Use them.
18376 (__cp_push_exception): Likewise.
18377 (__cp_pop_exception): Likewise.
18379 2000-04-11 Mark Mitchell <mark@codesourcery.com>
18381 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18382 (complete_dtor_identifier): New macro.
18383 (CLASSTYPE_FIRST_CONVERSION): Remove.
18384 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18385 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18386 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18387 (CLASSTYPE_CONSTRUCTORS): Likewise.
18388 (CLASSTYPE_DESTRUCTORS): Likewise.
18389 (lang_decl): Add cloned_function.
18390 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18391 (DECL_BASE_CONSTRUCTOR_P): Likewise.
18392 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18393 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18394 (DECL_CLONED_FUNCTION_P): Likewise.
18395 (DECL_CLONED_FUNCTION): Likewise.
18396 (clone_function_decl): Declare.
18397 (maybe_clone_body): Likewise.
18398 * call.c (build_user_type_conversion_1): Call complete object
18399 constructors in the new ABI.
18400 (build_new_method_call): Don't add in-charge parameters under the
18402 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18403 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18404 CLASSTYPE_DESTRUCTOR_SLOT.
18405 (build_clone): New function.
18406 (clone_function_decl): Likewise.
18407 (clone_constructors_and_destructors): Likewise.
18408 (check_bases_and_members): Use it.
18409 * decl.c (iniitialize_predefined_identifiers): Initialize
18410 complete_dtor_identifier.
18411 (finish_function): Don't add extra code to a clone.
18412 (lang_mark_tree): Mark cloned_function.
18413 * decl2.c (mark_used): Don't bother trying to instantiate things
18415 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18416 * method.c (set_mangled_name_for_decl): Don't treat clones as
18418 (synthesize_method): Sythesize cloned functions, not the clones.
18419 * optimize.c (inline_data): Update comment on ret_label.
18420 (remap_block): Don't assume DECL_INITIAL exists.
18421 (copy_body_r): Allow ret_label to be NULL.
18422 (maybe_clone_body): Define.
18423 * pt.c (tsubst_decl): Handle clones.
18424 (instantiate_clone): New function.
18425 (instantiate_template): Use it.
18426 (set_mangled_name_for_template_decl): Don't treat clones as
18428 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18429 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18430 * semantics.c (expand_body): Clone function bodies as necessary.
18432 * optimize.c (remap_decl): Avoid sharing structure for arrays
18433 whose size is only known at run-time.
18434 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18436 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18437 to has_in_charge_parm_p.
18438 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18439 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18440 (DECL_COPY_CONSTRUCTOR_P): New macro.
18441 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18442 (build_user_type_conversion_1): Likewise.
18443 (convert_like_real): Likewise.
18444 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
18445 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18446 (copy_args_p): Likewise.
18447 (grok_ctor_properties): Likewise.
18448 (start_function): Likewise.
18449 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
18450 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18451 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18452 * method.c (do_build_copy_constructor): Use
18453 DECL_HAS_IN_CHARGE_PARM_P.
18454 (synthesize_method): Likewise.
18455 * pt.c (instantiate_template): Remove goto.
18456 * tree.c (build_cplus_method_type): Remove mention of obstacks in
18459 * cp-tre.h (finish_function): Change prototype.
18460 * decl.c (end_cleanup_fn): Adjust caller.
18461 (finish_function): Take only one parameter.
18462 * decl2.c (finish_objects): Adjust caller.
18463 (finish_static_storage_duration_function): Likewise.
18464 * method.c (emit_thunk): Likewise.
18465 * parse.y: Likewise.
18466 * parse.c: Regenerated.
18467 * pt.c (instantiate_decl): Likewise.
18468 * rtti.c (synthesize_tinfo_fn): Likewise.
18469 * semantics.c (expand_body): Likewise.
18471 * cp-tree.h (copy_decl): New function.
18472 * class.c (finish_struct_1): Use it.
18473 * lex.c (copy_decl): Define it.
18474 * pt.c (tsubst_decl): Likewise.
18475 * tree.c (copy_template_template_parm): Likewise.
18477 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18478 has_nonpublic_assign_ref.
18479 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18480 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18481 * class.c (finish_struct_methods): Don't set
18482 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18483 (interface_only): Don't declare.
18484 (interface_unknown): Likewise.
18486 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18488 * tree.h (HAVE_TEMPLATES): Remove definition.
18489 * lang-options.h (-fthis-is-variable): Remove documentation.
18491 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
18493 * class.c (instantiate_type): Handle object-relative template-id.
18495 * semantics.c (finish_expr_stmt): Call convert_to_void here.
18496 * decl.c (cplus_expand_expr_stmt): Not here.
18498 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18499 Initialize exprtype earlier.
18501 * parse.y (fn.def1): Check for defining types in return types.
18503 * decl.c (check_tag_decl): Notice extra fundamental types.
18504 Diagnose empty decls in classes, too.
18506 * decl.c (grokdeclarator): Don't override an anonymous name if no
18507 declarator was given.
18509 * cvt.c (convert_to_void): Call resolve_offset_ref.
18511 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18513 * decl2.c (decl_namespace): Handle getting a type.
18515 * typeck.c (build_c_cast): Re-enable warning for cast between
18516 pointer and integer of different size.
18518 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
18520 * inc/cxxabi.h (__pointer_type_info): Add restrict and
18522 (__pointer_type_info::__pointer_catch): New virtual function.
18523 (__pointer_to_member_type_info): Derive from
18524 __pointer_type_info. Adjust.
18525 (__pointer_to_member_type_info::__do_catch): Remove.
18526 (__pointer_to_member_type_info::__is_pointer_p): Declare.
18527 (__pointer_to_member_type_info::__pointer_catch): Declare.
18528 * rtti.c (qualifier_flags): Add restrict flag.
18529 (ptmd_initializer): Reorder members.
18530 (create_tinfo_types): Expand comments. Reorder
18531 ptmd_desc_type_node members.
18532 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18534 (__pointer_type_info::__do_catch): Move specific code into
18535 __pointer_catch. Call it.
18536 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18537 specific catch checking. Fix void conversion check.
18538 (__pointer_to_member_type_info::__do_catch): Remove.
18539 (__pointer_to_member_type_info::__pointer_catch): Implement.
18541 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18543 * lex.c (init_parse): Remove traces of classof and headof.
18544 * decl2.c (flag_operator_names): Default to 1.
18545 (lang_decode_option): Do not set it for -ansi.
18547 2000-04-09 Mark Mitchell <mark@codesourcery.com>
18549 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18550 (DECL_MAIN_VARIANT): Remove.
18551 * decl.c (duplicate_decls): Don't set it.
18552 (start_function): Likewise.
18553 (lang_mark_tree): Don't mark it.
18554 * decl2.c (defer_fn): Don't use it.
18555 * lex.c (retrofit_lang_decl): Don't set it.
18556 * pt.c (tsubst_decl): Likewise.
18557 * ptree.c (print_lang_decl): Don't print it.
18558 * typeck.c (mark_addressable): Don't use it.
18560 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18562 * vec.cc: Include <new> and <exception>.
18563 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18564 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18566 (__cxa_vec_delete): Catch dtor exceptions.
18568 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18570 Prepend __ to implementation defined names.
18571 * inc/typeinfo (type_info): Rename _name to __name.
18572 (type_info::type_info): Rename parameter.
18573 (type_info::operator==, type_info::operator!=,
18574 type_info::before): Likewise.
18575 (type_info::is_pointer_p, type_info::is_function_p,
18576 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18579 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18580 (__pointer_type_info::__pointer_type_info): Likewise.
18581 (__pointer_type_info::is_pointer_p,
18582 __pointer_type_info::do_catch): Prepend __. Rename parameters.
18583 (__array_type_info::__array_type_info): Rename parameters.
18584 (__function_type_info::__function_type_info): Likewise.
18585 (__function_type_info::is_function_p): Prepend __.
18586 (__enum_type_info::__enum_type_info): Rename parameters.
18587 (__pointer_to_member_type_info::__pointer_to_member_type_info):
18589 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18591 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18592 (__class_type_info::__class_type_info): Rename parameters.
18593 (__class_type_info::sub_kind): Prepend __. Adjust member names.
18594 (__class_type_info::upcast_result,
18595 __class_type_info::dyncast_result): Prepend __. Move definition
18597 (__class_type_info::do_upcast, __class_type_info::do_catch,
18598 __class_type_info::find_public_src,
18599 __class_type_info::do_dyncast,
18600 __class_type_info::do_find_public_src): Prepend __. Rename
18602 (__si_class_type_info::__si_class_type_info): Rename parameters.
18603 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18604 __si_class_type_info::do_find_public_src): Prepent __. Rename
18606 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18607 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18608 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18610 (__dynamic_cast): Rename parameters.
18611 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18612 type_info::do_catch, type_info::do_upcast): Prepend __.
18613 (contained_p, public_p, virtual_p, contained_public_p,
18614 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18615 (__class_type_info::do_catch,
18616 __class_type_info::do_upcast): Prepend __. Adjust.
18617 (__class_type_info::__upcast_result,
18618 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18620 (__class_type_info::find_public_src): Prepend __. Adjust.
18621 (__class_type_info::do_find_public_src,
18622 __si_class_type_info::do_find_public_src,
18623 __vmi_class_type_info::do_find_public_src): Likewise.
18624 (__class_type_info::do_dyncast,
18625 __si_class_type_info::do_dyncast,
18626 __vmi_class_type_info::do_dyncast): Likewise.
18627 (__class_type_info::do_upcast,
18628 __si_class_type_info::do_upcast,
18629 __vmi_class_type_info::do_upcast): Likewise.
18630 (__dynamic_cast): Adjust.
18631 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18632 (__function_type_info::is_function_p): Likewise.
18633 (__pointer_type_info::do_catch): Likewise. Adjust.
18634 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18635 (__throw_type_match_rtti_2): Adjust.
18636 (__is_pointer): Adjust.
18638 2000-04-08 Mark Mitchell <mark@codesourcery.com>
18640 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18641 (complete_ctor_identifier): New macro.
18642 (special_function_kind): Add sfk_copy_constructor and
18643 sfk_assignment_operator.
18644 (LOOKUP_HAS_IN_CHARGE): Remove.
18645 (cons_up_default_function): Rename to ...
18646 (implicitly_declare_fn): ... this.
18647 * call.c (build_new_method_call): Add in-charge parameters for
18649 * class.c (add_implicitly_declared_members): Change parameter name
18650 from cant_have_assignment to cant_have_const_assignment.
18651 Replace calls to cons_up_default_function to implicitly_declare_fn.
18652 * cvt.c (ocp_convert): Use complete_ctor_identifier.
18653 * decl.c (initialize_predefined_identifiers): Initialize it.
18654 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18655 complex expression.
18656 * init.c (expand_default_init): Don't calculate the in-charge
18658 (build_new_1): Likewise.
18659 * lex.c (cons_up_default_function): Move to method.c.
18660 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18661 (implicitly_declare_fn): New function.
18662 * typeck.c (build_static_cast): Use complete_ctor_identifier.
18663 (build_modify_expr): Likewise.
18664 * typeck2.c (build_functional_cast): Likewise.
18666 Under the new ABI, constructors don't return `this'.
18667 * cp-tree.h (warn_reorder): Declare.
18668 (special_function_kind): New enum.
18669 (global_base_init_list): Remove declaration.
18670 (emit_base_init): Don't return a value.
18671 (check_base_init): Don't declare.
18672 (is_aggr_typedef): Likewise.
18673 * decl.c (check_special_function_return_type): New function.
18674 (return_types): Remove.
18675 (grokdeclarator): Use check_special_function_return_type.
18676 (start_function): Don't initialize ctor_label under the new ABI.
18677 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18678 * init.c (begin_init_stmts): Move to top of file.
18679 (finish_init_stmts): Likewise.
18680 (warn_reorder): Don't declare.
18681 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
18683 (check_base_init): Remove.
18684 (is_aggr_typedef): Likewise.
18685 (build_new_1): Don't use the return value of a constructor.
18686 * semantics.c (setup_vtbl_ptr): Don't use the return value
18688 * typeck.c (check_return_expr): Don't magically convert return
18689 statements into `return this' in constructors under the new ABI.
18691 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18692 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18693 (base_ctor_identifier): New macro.
18694 (base_dtor_identifier): Likewise.
18695 (deleting_dtor_identifier): Likewise.
18696 * decl.c: Don't include obstack.h.
18697 (obstack_chunk_alloc): Don't define.
18698 (obstack_chunk_free): Likewise.
18699 (struct predefined_identifier): New type.
18700 (initialize_predefined_identifiers): New function.
18701 (init_decl_processing): Use it.
18702 (debug_temp_inits): Remove.
18703 (start_method): Don't call preserve_data.
18704 (hack_incomplete_structures): Update comment.
18705 * init.c (init_init_processing): Don't initialize
18707 (build_offset_rf): Remove dead code.
18708 (build_delete): Use CLASSTYPE_N_BASECLASSES.
18709 * search.c (init_search_processing): Don't initialize
18712 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18714 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18715 some sign_compare warnings.
18717 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18719 Rename abi::__vmi_class_type_info members.
18720 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18721 base_list, detail_masks members to vmi_flags, vmi_base_count,
18722 vmi_bases and vmi_flags_masks respectively.
18723 (__vmi_class_type_info::vmi_flags_masks): Rename
18724 details_unknown_mask to flags_unknown_mask.
18725 * tinfo.cc (__class_type_info::do_upcast): Adjust.
18726 (__vmi_class_type_info::do_find_public_src): Adjust.
18727 (__vmi_class_type_info::do_dyncast): Adjust.
18728 (__vmi_class_type_info::do_upcast): Adjust.
18730 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18732 * tinfo.cc (convert_to_base): New function.
18733 (get_vbase_offset): Remove. Move into convert_to_base.
18734 (__vmi_class_type_info::do_find_public_src): Adjust.
18735 (__vmi_class_type_info::do_dyncast): Adjust.
18736 (__vmi_class_type_info::do_upcast): Adjust.
18738 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
18740 * tinfo.cc (operator=): Use __builtin_strcmp.
18741 * tinfo2.cc (before): Likewise.
18743 2000-04-06 Mark Mitchell <mark@codesourcery.com>
18745 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18746 (DECL_SAVED_INLINE): Rename to ...
18747 (DECL_DEFERRED_FN): ... this.
18748 (in_function_p): Remove declaration.
18749 (mark_inline_for_output): Rename to ...
18750 (defer_fn): ... this.
18751 * decl.c (finish_function): Adjust call to mark_inline_for_output.
18752 (in_function_p): Remove definition.
18753 * decl2.c (saved_inlines): Rename to ...
18754 (deferred_fns): ... this.
18755 (saved_inlines_used): Rename to ...
18756 (deferred_fns_used): ... this.
18757 (mark_inline_for_output): Rename to ...
18758 (defer_fn): ... this.
18759 (finish_file): Adjust accordingly.
18760 (init_decl2): Likewise.
18761 * lex.c (cons_up_default_function): Likewise.
18762 * pt.c (mark_decl_instantiated): Likewise.
18763 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18765 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18766 * semantics.c (expand_body): Defer more functions.
18768 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18770 * vec.cc: New file.
18771 * Make-lang.in (CXX_LIB2FUNCS): Add it.
18773 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18774 __cxa_vec_delete): Declare.
18776 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18778 * rtti.c (dfs_class_hint_mark): New static function.
18779 (dfs_class_hint_unmark): New static function.
18780 (class_hint_flags): Use them.
18782 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
18784 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18786 2000-04-05 Mark Mitchell <mark@codesourcery.com>
18788 * cp-tree.h (instantiate_decl): Change prototype.
18789 * decl2.c (mark_used): Adjust call.
18790 * optimize.c (inlinable_function_p): Adjust handling of templates.
18791 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18792 (do_type_instantiation): Likewise.
18793 (instantiate_decl): Defer more templates.
18794 (instantiate_pending_templates): Adjust logic to handle inline
18797 * Makefile.in (GGC_H): New variable. Use it throughout in place
18800 * call.c: Don't include obstack.h. Include ggc.h.
18801 (obstack_chunk_alloc): Don't define.
18802 (obstack_chunk_free): Likewise.
18803 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18804 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18805 (pop_switch): Free it.
18807 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18809 * dump.c (dequeue_and_dump): Don't try to print the bit_position
18810 if we don't have a DECL_FIELD_OFFSET.
18812 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
18814 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18815 special_function_p.
18817 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18819 * cfns.gperf (hash, libc_name_p): Prototype.
18821 * rtti.c (build_dynamic_cast_1): Constification.
18823 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18825 * semantics.c (deferred_type_access_control): Prototype.
18827 2000-04-04 Mark Mitchell <mark@codesourcery.com>
18829 Correct many new ABI issues regarding vbase and vcall offset
18831 * cp-tree.h (BINFO_VTABLE): Document.
18832 (struct lang_type): Tweak formatting.
18833 (BINFO_PRIMARY_BINFO): Add to documentation.
18834 (CLASSTYPE_VSIZE): Fix typo in comment.
18835 (CLASSTYPE_VBASECLASSES): Update documentation.
18836 (BINFO_VBASE_MARKED): Remove.
18837 (SET_BINFO_VBASE_MARKED): Likewise.
18838 (CLEAR_BINFO_VBASE_MARKED): Likewise.
18839 (BINFO_FIELDS_MARKED): Remove.
18840 (SET_BINFO_FIELDS_MARKED): Likewise.
18841 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18842 (enum access_kind): New enumeration.
18843 (num_extra_vtbl_entries): Remove declaration.
18844 (size_extra_vtbl_entries): Likewise.
18845 (get_vtbl_decl_for_binfo): New function.
18846 (dfs_vbase_unmark): Remove declaration.
18847 (mark_primary_bases): Likewise.
18848 * class.c (SAME_FN): Remove.
18849 (struct vcall_offset_data_s): Move definition.
18850 (build_vbase_pointer): Use `build', not `build_binary_op', to
18851 access the vbase pointer under the new ABI.
18852 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18853 (build_primary_vtable): Likewise.
18854 (dfs_mark_primary_bases): Move here from search.c.
18855 (mark_primary_bases): Likewise.
18856 (determine_primary_bases): Under the new ABI, don't make a base
18857 class a primary base just because we don't yet have any virtual
18859 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18860 (num_vfun_entries): Remove.
18861 (dfs_count_virtuals): Likewise.
18862 (num_extra_vtbl_entries): Likewise.
18863 (size_extra_vtbl_entries): Likewise.
18864 (layout_virtual_bases): Iterate in inheritance graph order under
18866 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18867 indicate that a vfield is present.
18868 (init_class_processing): Initialize access_public_node, etc., from
18870 (get_vtbl_decl_for_binfo): New function.
18871 (dump_class_hierarchy_r): Likewise.
18872 (dump_class_hierarchy): Use it.
18873 (finish_vtbls): Build the vtbls in inheritance graph order.
18874 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18875 (initialize_vtable): Use get_vtbl_decl_for_binfo.
18876 (accumulate_vtbl_inits): Add comments explaining why a pre-order
18878 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18879 where the vptr points, even for primary vtables.
18880 (build_vtbl_initializer): Adjust handling of vbase and vcall
18882 (build_vcall_and_vbase_vtable_entries): New function.
18883 (dfs_build_vbase_offset_vtbl_entries): Remove.
18884 (build_vbase_offset_vtbl_entries): Reimplement.
18885 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18886 were already handled in a primary base class vtable.
18887 (build_vcall_offset_vtbl_entries): Adjust.
18888 (build_rtti_vtbl_entries): Adjust.
18889 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18890 * init.c (expand_virtual_init): Simplify.
18891 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18892 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18893 * search.c (BINFO_ACCESS): New macro.
18894 (SET_BINFO_ACCESS): Likewise.
18895 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18896 (access_in_type): Likewise.
18897 (dfs_accessible_p): Likewise.
18898 (protected_accessible_p): Likewise.
18899 (lookup_fnfields_1): Adjust documentation.
18900 (dfs_mark_primary_bases): Move to class.c
18901 (mark_primary_bases): Likewise.
18902 (dfs_vbase_unmark): Remove.
18903 (virtual_context): Use BINFO_FOR_VBASE.
18904 (dfs_get_vbase_types): Simplify.
18905 (dfs_build_inheritance_graph_order): New function.
18906 (get_vbase_types): Use it.
18907 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18909 * tinfo.cc (get_vbase_offset): New function.
18910 (__vmi_class_type_info::do_find_public_src): Use it.
18911 (__vmi_class_type_info::do_dyncast): Likewise.
18912 (__vmi_class_type_info::do_upcast): Likewise.
18914 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
18916 * lang-specs.h: Pass -fno-show-column to the preprocessor.
18918 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
18920 * rtti.c (class_hint_flags): Rename flags.
18921 (class_initializer): Remove flags.
18922 (synthesize_tinfo_var): Combine offset and flags. Add flags
18923 for __vmi_class_type_info.
18924 (create_tinfo_types): Remove flags from __class_type_info and
18925 __si_class_type_info. Merge flags and offset from
18926 base_class_type_info.
18927 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18928 (__base_class_info::is_virtual_p): Adjust.
18929 (__base_class_info::is_public_p): Adjust.
18930 (__base_class_info::offset): New accessor.
18931 (__class_type_info::details): Remove member.
18932 (__class_type_info::__class_type_info): Lose details.
18933 (__class_type_info::detail_masks): Remove.
18934 (__si_class_type_info::__si_class_type_info): Lose details.
18935 (__vmi_class_type_info::details): New member.
18936 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18937 (__vmi_class_type_info::detail_masks): New member.
18938 * tinfo.cc (__class_type_info::do_upcast): Initialize result
18939 with unknown_details_mask.
18940 (__vmi_class_type_info::do_find_public_src): Adjust
18941 (__vmi_class_type_info::do_dyncast): Adjust.
18942 (__vmi_class_type_info::do_upcast): Set result details, if
18944 (__dynamic_cast): Temporarily #if out optimization.
18946 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
18948 * rtti.c (get_tinfo_decl): Mark used.
18949 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18950 mark as dealt with, if we output it.
18952 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18954 * class.c: Reorganize to put virtual function table initialization
18955 machinery at the end of the file.
18957 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
18959 * class.c (finish_struct): Use bitsize_zero_node.
18960 * pt.c (instantiate_class_template): Likewise.
18962 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18964 Put RTTI entries at negative offsets in new ABI.
18965 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18966 vbase offset at index -3, not -1.
18967 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18968 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18969 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18970 (build_rtti_vtbl_entries): New function.
18971 (set_rtti_entry): Remove.
18972 (build_primary_vtable): Don't use it.
18973 (build_secondary_vtable): Likewise.
18974 (start_vtable): Remove.
18975 (first_vfun_index): New function.
18976 (set_vindex): Likewise.
18977 (add_virtual_function): Don't call start_vtable. Do call
18979 (set_primary_base): Rename parameter.
18980 (determine_primary_base): Likewise.
18981 (num_vfun_entries): Don't use skip_rtti_stuff.
18982 (num_extra_vtbl_entries): Include RTTI information.
18983 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18984 (skip_rtti_stuff): Remove.
18985 (dfs_modify_vtables): Don't use it.
18986 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
18987 (layout_nonempty_base_or_field): Update size handling.
18988 (create_vtable_ptr): Tweak.
18989 (layout_class_type): Adjust parameter names.
18990 (finish_struct_1): Simplify.
18991 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18992 (skip_rtti_stuff): Remove.
18993 (first_vfun_index): New function.
18994 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18995 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18996 (marked_vtable_pathp): Declare.
18997 (unmarked_vtable_pathp): Likewise.
18998 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19000 * rtti.c (build_headof): Look for RTTI at negative offsets.
19001 (get_tinfo_decl_dynamic): Likewise.
19002 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19004 (create_pseudo_type_info): Do it here instead. Adjust so that
19005 vptr points at first virtual function.
19006 * search.c (marked_vtable_pathp): Make it global.
19007 (unmarked_vtable_pathp): Likewise.
19008 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19009 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19010 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19011 (get_pure_virtuals): Likewise.
19012 (expand_upcast_fixups): Likewise.
19013 * tree.c (debug_binfo): Likewise.
19014 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19017 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19019 * class.c (check_field_decl): Fix typo.
19020 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19021 (check_methods): Likewise.
19022 (check_field_decls): Likewise.
19023 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19024 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19025 Use DECL_RESULT_FLD, not DECL_RESULT.
19026 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19027 * lex.c (identifier_type): Likewise.
19028 * pt.c (determine_specialization, lookup_template_class): Likewise.
19029 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19030 (resolve_overloaded_unification, more_specialized): Likewise.
19031 * semantics.c (finish_member_declaration): Likewise.
19032 * typeck.c (build_x_function_call): Likewise.
19034 2000-03-26 Mark Mitchell <mark@codesourcery.com>
19036 * class.c (layout_empty_base): Handle empty bases with non-byte
19038 (build_base_field): Likewise.
19039 (layout_virtual_bases): Likewise.
19041 * class.c (finish_struct_1): Fix typo in this change:
19043 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19045 2000-03-25 Mark Mitchell <mark@codesourcery.com>
19047 * decl.c (grokdeclarator): Count partial specializations when
19048 keeping track of how many template classes have been seen.
19050 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19052 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19054 * class.c (build_vbase_pointer_fields): layout_field now place_field.
19055 (get_vfield_offset): Use byte_position.
19056 (set_rtti_entry): Set OFFSET to ssizetype zero.
19057 (get_binfo_offset_as_int): Deleted.
19058 (dfs_record_base_offsets): Use tree_low_cst.
19059 (dfs_search_base_offsets): Likewise.
19060 (layout_nonempty_base_or_field): Reflect changes in RLI format
19061 and call byte_position.
19062 (layout_empty_base): Convert offset to ssizetype.
19063 (build_base_field): use rli_size_unit_so_far.
19064 (dfs_propagate_binfo_offsets): Do computation in proper type.
19065 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19066 (layout_class_type): Reflect changes in RLI names and fields.
19067 (finish_struct_1): Set DECL_FIELD_OFFSET.
19068 * dump.c (dequeue_and_dump): Call bit_position.
19069 * expr.c (cplus_expand_constant): Use byte_position.
19070 * rtti.c (expand_class_desc): Use bitsize_one_node.
19071 * typeck.c (build_component_addr): Use byte_position and don't
19072 special case for zero offset.
19074 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
19076 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19078 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19080 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19083 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19085 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19087 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19088 make_typename_type, check_initializer, cp_finish_decl,
19089 xref_tag): Likewise.
19090 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19091 decl_namespace, arg_assoc_template_arg, arg_assoc,
19092 validate_nonmember_using_decl, do_class_using_decl): Likewise.
19093 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19094 args_to_string): Likewise.
19095 * friend.c (is_friend): Likewise.
19096 * lex.c (note_got_semicolon, note_list_got_semicolon,
19097 is_global): Likewise.
19098 * method.c (build_overload_nested_name, build_overload_value,
19099 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19100 * parse.y (typename_sub, typename_sub1): Likewise.
19101 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19102 process_partial_specialization, convert_template_argument,
19103 template_args_equal, add_pending_template, lookup_template_class,
19104 for_each_template_parm_r, maybe_fold_nontype_arg,
19105 tsubst, instantiate_template, type_unification_real, unify,
19106 instantiate_pending_templates, set_mangled_name_for_template_decl):
19108 * repo.c (repo_get_id, repo_template_used): Likewise.
19109 * search.c (lookup_field_1): Likewise.
19110 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19111 * xref.c (classname): Likewise.
19113 2000-03-22 Mark Mitchell <mark@codesourcery.com>
19115 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19116 (CANONICAL_BINFO): New macro.
19117 (BINFO_NEW_VTABLE_MARKED): Use it.
19118 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19119 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19120 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19122 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19123 (build_secondary_vtable): Likewise.
19124 (dfs_finish_vtbls): Likewise.
19125 (dfs_accumulate_vtbl_inits): Likewise.
19126 (accumulate_vtbl_inits): New function.
19127 (finish_vtbls): Make sure that virtual bases come after
19128 non-virtual bases in the vtable group.
19129 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19130 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19131 * search.c (struct vbase_info): Move definition.
19132 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19133 (unmarked_new_vtable_p): Likewise.
19134 (dfs_mark_vtable_path): Remove.
19135 (dfs_mark_new_vtable): Remove.
19136 (dfs_unmark_new_vtable): Likewise.
19137 (dfs_clear_search_slot): Likewise.
19138 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19139 (dfs_clear_vbase_slots): Likewise.
19140 (init_vbase_pointers): LIkewise.
19142 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
19144 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19145 SIZETYPE to a non-SIZETYPE.
19147 2000-03-21 Mark Mitchell <mark@codesourcery.com>
19149 * class.c (layout_virtual_bases): Adjust names in conditionally
19152 * class.c (record_base_offsets): New function.
19153 (layout_conflict_p): Likewise.
19154 (layout_nonempty_base_or_field): Use it.
19155 (layout_empty_base): New function.
19156 (build_base_field): Use it.
19157 (build_base_fields): Update comment.
19158 (layout_virtual_bases): Fold in a little code form
19159 layout_basetypes. Use layout_empty_base.
19160 (layout_basetypes): Remove.
19161 (end_of_class): New function.
19162 (layout_class_type): Use it. Adjust.
19164 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19165 (fntype_p): Remove.
19166 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19168 (dfs_skip_nonprimary_vbases_markedp): Likewise.
19169 * typeck.c (fntype_p): Remove.
19171 * cp-tree.h (TI_SPEC_INFO): Remove.
19172 (CLASSTYPE_TI_SPEC_INFO): Likewise.
19173 * pt.c (process_partial_specialization): Likewise.
19175 * class.c (build_base_field): Fix thinko in computation of binfo
19178 * tree.c (mark_local_for_remap_p): Mark variables declared in
19179 TARGET_EXPRs as well.
19181 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19183 * typeck.c (require_complete_type, complete_type,
19184 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19185 build_array_ref, convert_arguments, pointer_diff,
19186 build_x_unary_op, build_unary_op, build_c_cast,
19187 build_modify_expr): Use COMPLETE_TYPE_P etc.
19188 * call.c (is_complete, convert_like_real,
19189 build_new_method_call): Likewise.
19190 * class.c (build_vbase_pointer_fields, check_bases,
19191 build_base_field, finish_struct_1, pushclass): Likewise.
19192 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19193 * decl.c (maybe_process_template_type_declaration, pushtag,
19194 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19195 layout_var_decl, check_initializer, cp_finish_decl,
19196 grokdeclarator, require_complete_types_for_parms,
19197 grok_op_properties, xref_tag, xref_basetypes,
19198 check_function_type): Likewise.
19199 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19200 * friend.c (do_friend): Likewise.
19201 * init.c (build_offset_ref): Likewise.
19202 * parse.y (structsp): Likewise.
19203 * pt.c (maybe_process_partial_specialization,
19204 tsubst_friend_function, instantiate_class_template, tsubst,
19205 do_type_instantiation, instantiate_pending_templates): Likewise.
19206 * repo.c (repo_get_id): Likewise.
19207 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19208 synthesize_tinfo_var, emit_support_tinfos): Likewise.
19209 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19210 * semantics.c (begin_class_definition): Likewise.
19211 * tree.c (build_cplus_method_type): Likewise.
19212 * typeck2.c (digest_init, build_functional_cast,
19213 add_exception_specifier): Likewise.
19214 * parse.h, parse.c: Regenerated.
19216 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19218 * inc/cxxabi.h: New header file. Define new-abi entry points.
19219 (__pointer_type_info::target): Rename member to ...
19220 (__pointer_type_info::type): ... here.
19221 (__base_class_info::type): Rename member to ...
19222 (__base_class_info::base): ... here.
19223 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19224 * cp-tree.h (CPTI_ABI): New global tree enumeration.
19225 (abi_node): New global tree node.
19226 * decl.c (abi_node): Document.
19227 (init_decl_processing): Initialize abi_node.
19228 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19229 (get_vmi_pseudo_type_info): Likewise.
19230 (create_tinfo_types): Likewise.
19231 (emit_support_tinfos): Likewise.
19232 * tinfo.h (cxxabi.h): Include for new-abi.
19233 Move rtti class definitions to new header file.
19234 * tinfo.cc (abi): Use the namespace.
19235 (std): Move new abi rtti classes from here ...
19236 (__cxxabiv1): ... to here.
19237 * tinfo2.cc (cxxabi.h): Include for new-abi.
19238 Move rtti class definitions to new header file.
19239 (std): Move new abi rtti classes from here ...
19240 (__cxxabiv1): ... to here.
19241 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19244 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19245 Jason Merrill <jason@casey.cygnus.com>
19247 * method.c (build_overload_int): Use host_integerp.
19249 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19251 * init.c (build_offset_ref): Handle the case of a templated member
19254 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19256 * except.c (expand_exception_blocks): Clear catch_clauses_last.
19258 2000-03-18 Mark Mitchell <mark@codesourcery.com>
19260 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19261 * class.c (check_bitfield_decl): Turn illegal bitfields into
19263 (dfs_propagate_binfo_offsets): Adjust for new size_binop
19265 (dfs_offset_for_unshared_vbases): Likewise.
19266 * cvt.c (cp_convert_to_pointer): Convert NULL to a
19267 pointer-to-member correctly under the new ABI.
19268 * expr.c (cplus_expand_constant): Don't use cp_convert when
19269 turning an offset into a pointer-to-member.
19270 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19271 when dereferencing them under the new ABI.
19272 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19273 of pointers-to-members under the new ABI.
19275 * class.c (check_bitfield_decl): Remove restriction on really long
19277 (layout_class_type): Implement new ABI handling of bitfields
19278 longer than their types.
19280 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19282 * parse.y (extdefs): Call ggc_collect.
19283 * parse.c: Regenerated.
19285 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
19287 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19288 (note_name_declared_in_class): Use OVL_CURRENT to get at a
19289 potential overload.
19291 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19293 * class.c (build_vbase_path): Use integer_zerop.
19294 (build_vtable_entry): Use tree_low_cst.
19295 (get_vfield_offset): Use bit_position.
19296 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19298 (check_bitfield_decl): Set DECL_SIZE using convert.
19299 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19300 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19302 (finish_struct_1): Use bit_position.
19303 (dump_class_hierarchy): Use tree_low_cst.
19304 * cp-tree.h (min_precision): Add declaration.
19305 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19306 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19307 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19308 * expr.c (cplus_expand_constant): Use bit_position.
19309 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19310 * rtti.c (get_base_offset): Use bit_position.
19311 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19312 host_integerp, and tree_low_cst.
19313 (pointer_int_sum): Use integer_zerop.
19314 (build_component_addr): Use bit_position.
19316 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
19318 * typeck.c (require_complete_type): Don't assume size_zero_node.
19319 (complete_type_or_else): Likewise.
19321 2000-03-16 Steven Grady <grady@digitaldeck.com>
19322 Jason Merrill <jason@casey.cygnus.com>
19324 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19326 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
19328 * decl2.c (grokfield): Bail out if type is error_mark_node.
19330 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19332 * tinfo2.cc (__ptr_to_member_data): Rename to ...
19333 (__pointer_to_member_data): ... here. Adjust.
19334 * rtti.c (create_tinfo_types): Adjust.
19336 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19338 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19339 * decl.c (ref_desc_type_node): Undocument.
19340 * rtti.c (ptr_ref_initializer): Rename to ...
19341 (ptr_initializer): ... here. Adjust comments.
19342 (ptmd_initializer): Fix comment thinko.
19343 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19344 (create_tinfo_types): Remove ref_desc_type_node init.
19345 * tinfo2.cc (__reference_type_info): Remove.
19347 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19349 * decl.c (cp_finish_decl): Remove obsolete comment.
19351 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19353 2000-03-14 Mark Mitchell <mark@codesourcery.com>
19355 * cp-tree.h: Tweak documentation.
19356 * class.c (build_vbase_pointer_fields): Layout the fields, too.
19357 (avoid_overlap): Remove.
19358 (get_binfo_offset_as_int): New function.
19359 (dfs_serach_base_offsets): Likewise.
19360 (layout_nonempty_base_or_field): Likewise.
19361 (build_base_field): Layout fields here. Avoid placing two objects
19362 of the same type at the same address, under the new ABI.
19363 (build_base_fields): Adjust accordingly.
19364 (create_vtable_ptr): Return the new field, but don't attach it to
19366 (remove_base_field): Remove.
19367 (remove_base_fields): Remove.
19368 (layout_basetypes): Adjust accordingly.
19369 (layout_class_type): Call layout_field for each field, rather than
19370 just making a wholesale call to layout_type.
19372 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
19374 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19376 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
19378 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19380 * except.c (dtor_nothrow): New fn.
19381 (do_pop_exception): Use it. Take type parm.
19382 (push_eh_cleanup): Take type parm.
19383 (expand_start_catch_block): Pass it.
19384 (build_eh_type_type_ref): Accept null type.
19386 2000-03-12 Mark Mitchell <mark@codesourcery.com>
19388 * cp-tree.h (revert_static_member_fn): Change prototype.
19389 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19390 (grok_op_properties): Likewise.
19391 (start_function): Likewise.
19392 (revert_static_member_fn): Simplify.
19393 * pt.c (check_explicit_specialization): Adjust call to
19394 revert_static_member_fn.
19396 2000-03-11 Mark Mitchell <mark@codesourcery.com>
19398 * cp-tree.h (scope_kind): New type.
19399 (tmpl_spec_kind): Likewise.
19400 (declare_pseudo_global_level): Remove.
19401 (pseudo_global_level_p): Rename to template_parm_scope_p.
19402 (pushlevel): Remove declaration.
19403 (begin_scope): New function.
19404 (finish_scope): Likewise.
19405 (current_tmpl_spec_kind): Likewise.
19406 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19407 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
19408 Add template_spec_p.
19409 (toplevel_bindings_p): Adjust.
19410 (declare_pseudo_global_level): Remove.
19411 (pseudo_global_level_p): Rename to template_parm_scope_p.
19412 (current_tmpl_spec_kind): New function.
19413 (begin_scope): Likewise.
19414 (finish_scope): Likewise.
19415 (maybe_push_to_top_level): Adjust.
19416 (maybe_process_template_type_declaration): Likewise.
19417 (pushtag): Likewise.
19418 (pushdecl_nonclass_level): Likewise.
19419 (lookup_tag): Likewise.
19420 (grokfndecl): Handle member template specializations. Share
19421 constructor and non-constructor code.
19422 * decl2.c (check_classfn): Handle member template specializations.
19423 * pt.c (begin_template_parm_list): Use begin_scope.
19424 (begin_specialization): Likewise.
19425 (end_specialization): Likewise.
19426 (check_explicit_specialization): Use current_tmpl_spec_kind.
19427 Handle member template specializations.
19428 (end_template_decl): Use finish_scope. Remove call to
19430 (push_template_decl_real): Remove bogus error message.
19431 (tsubst_decl): Fix typo in code contained in comment.
19432 (instantiate_template): Handle member template specializations.
19433 (most_general_template): Likewise.
19435 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
19437 * lex.c (whitespace_cr): Compress consecutive calls to warning().
19438 (do_identifier): Ditto for error().
19440 * pt.c (convert_nontype_argument): Ditto for cp_error().
19441 (convert_template_argument): Ditto for cp_pedwarn().
19443 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
19445 * exception.cc (__check_null_eh_spec): New fn.
19446 * except.c (expand_end_eh_spec): Call it if the spec is throw().
19448 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19450 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19451 * except.c (expand_end_eh_spec): Add the return type.
19452 * rtti.c (throw_bad_cast): Add the parmtypes.
19453 (throw_bad_typeid): Likewise.
19455 * semantics.c (expand_stmt): Only leave out rtl for unused
19456 artificials, and set DECL_IGNORED_P on them as well.
19457 * decl.c (wrapup_globals_for_namespace): Likewise.
19459 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
19461 * decl.c (maybe_commonize_var): Skip all artificial decls.
19462 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19464 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19466 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19467 * cp-tree.h: Declare flag_enforce_eh_specs.
19468 * decl.c (store_parm_decls, finish_function): Check it.
19470 C library functions don't throw.
19471 * Makefile.in (cfns.h): New target.
19472 (except.o): Depend on it.
19473 * Make-lang.in (cc1plus): Depend on cfns.gperf.
19474 * cfns.gperf: New file.
19475 * cfns.h: Generated.
19476 * except.c: Include it.
19477 (nothrow_libfn_p): New fn.
19478 * decl.c (grokfndecl): Use it.
19479 * cp-tree.h: Declare it.
19481 * decl.c (push_overloaded_decl_1, auto_function,
19482 define_function): Lose.
19483 (build_library_fn_1): New static fn.
19484 (builtin_function): Use it.
19485 (get_atexit_node): Use build_library_fn_ptr.
19486 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19487 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19488 push_void_library_fn, push_throw_library_fn): New fns.
19489 * cp-tree.h: Declare them.
19490 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19491 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19492 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19493 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19494 * rtti.c (build_runtime_decl): Lose.
19495 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19496 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19497 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19499 * call.c (build_call): Remove result_type parm.
19500 Call mark_used on unused artificial fns.
19501 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19503 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
19505 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19507 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19508 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19509 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19510 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19511 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19512 expand_generic_desc): Likewise.
19514 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19516 * exception.cc (__cp_pop_exception): Cleanup the original object.
19518 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19520 * decl.c (grok_op_properties): Merge conversion to void warning
19521 with other silly op warnings.
19523 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
19525 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19526 array CONSTRUCTOR elements. Don't use expr_tree_cons.
19528 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19530 * decl.c (cp_make_fname_decl): New function.
19531 (wrapup_globals_for_namespace): Don't emit unused static vars.
19532 (init_decl_processing): Remove comment about use of
19533 array_domain_type. Set make_fname_decl.
19534 (cp_finish_decl): Remove __FUNCTION__ nadgering.
19535 * semantics.c (begin_compound_stmt): Remove
19536 current_function_name_declared flagging.
19537 (expand_stmt): Don't emit unused local statics.
19538 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19541 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19543 * typeck.c (convert_for_assignment): Don't look at array
19545 * call.c (convert_like_real): Likewise.
19547 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
19549 Add initial support for '\uNNNN' specifier.
19550 * lex.c (read_ucs): New fn.
19551 (readescape, skip_white_space): Call it.
19552 (is_extended_char, is_extended_char_1): New fns.
19553 (utf8_extend_token): New fn, #if 0'd out.
19554 (real_yylex): Treat extended chars like letters.
19556 * search.c (note_debug_info_needed): Walk the bases even if we
19557 weren't deferring the type itself.
19559 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19561 * decl2.c (finish_objects): Constify a char*.
19563 * method.c (emit_thunk): Likewise.
19565 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
19567 * typeck.c (dubious_conversion_warnings): Look through
19570 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19572 * class.c (dfs_modify_vtables): I is now unsigned.
19573 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19574 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19575 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19576 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19577 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19578 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19579 Call integer_all_onesp.
19580 * typeck2.c (process_init_constructor): Use compare_tree_int.
19582 * lang-specs.h (as): Don't call if -syntax-only.
19584 2000-03-06 Mark Mitchell <mark@codesourcery.com>
19586 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19587 RTL_EXPR_HAS_NO_SCOPE after all.
19589 2000-03-05 Mark Mitchell <mark@codesourcery.com>
19591 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19592 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
19593 RTL_EXPR_HAS_NO_SCOPE.
19595 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19598 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19600 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
19602 * call.c (convert_like): Macrofy.
19603 (convert_like_with_context): New macro.
19604 (convert_like_real): Renamed from convert_like. Add calling
19605 context parameters, for diagnostics. Add recursive flag. Call
19606 dubious_conversion_warnings for outer conversion.
19607 (build_user_type_conversion): Use convert_like_with_context.
19608 (build_over_call): Likewise. Don't warn about dubious
19609 conversions here. Adjust convert_default_arg calls.
19610 (convert_default_arg): Add context parameters for diagnostics.
19611 Pass through to convert_like_with_context.
19612 * cp-tree.h (convert_default_arg): Add context parameters.
19613 (dubious_conversion_warnings): Prototype new function.
19614 * typeck.c (convert_arguments): Adjust convert_default_arg call.
19615 (dubious_conversion_warnings): New function, broken
19616 out of convert_for_assignment.
19617 (convert_for_assignment): Adjust.
19619 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
19621 * decl2.c (key_method): Break out from...
19622 (import_export_vtable, import_export_class): ...here.
19624 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19625 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19627 * search.c (note_debug_info_needed, dfs_debug_mark,
19628 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
19629 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19631 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
19633 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19636 2000-03-02 Mark Mitchell <mark@codesourcery.com>
19638 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19639 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19640 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19641 (lang_type): Split gets_new into has_new and has_array_new.
19642 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19643 (TYPE_GETS_NEW): Split into ...
19644 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19645 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19646 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19647 (build_op_new_call): Don't declare.
19648 (build_new_1): Likewise.
19649 * call.c (build_op_new_call): Remove.
19650 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19651 instead of TYPE_NEEDS_DESTRUCTOR.
19652 (finish_struct_bits): Likewise.
19653 (add_implicitly_declared_members): Likewise.
19654 (check_field_decl): Likewise.
19655 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19656 correctly under the new ABI.
19657 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19658 instead of TYPE_NEEDS_DESTRUCTOR.
19659 (initialize_local_var): Likewise.
19660 (destroy_local_var): Likewise.
19661 (cp_finish_decl): Likewise.
19662 (register_dtor_fn): Likewise.
19663 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19664 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
19665 TYPE_VEC_DELETE_TAKES_SIZE here.
19666 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19667 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19668 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19669 (finish_destructor_body): Likewise.
19670 (maybe_build_cleanup_1): Likewise.
19671 * decl2.c (do_static_destruction): Likewise.
19672 * init.c (build_new_1): Make it static.
19673 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19674 (expand_cleanup_for_base): Likewise.
19675 (get_cookie_size): New function.
19676 (build_new_1): Handle array-new cookies correctly under the new
19678 (build_vec_delete_1): Likewise.
19679 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19680 (build_delete): Likewise.
19681 (build_vec_delete): Handle array-new cookies correctly under the new
19683 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19684 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19685 TYPE_HAS_ARRAY_NEW_OPERATOR.
19686 * ptree.c (print_lang_type): Check them.
19687 * search.c (context_for_name_lookup): Fix typo in comment.
19688 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19689 * tree.c (break_out_cleanups): Likewise.
19690 (build_cplus_array_test_1): Likewise.
19691 (cp_build_qualified_type_real): Likewise.
19692 * typeck.c (complete_type): Likewise.
19694 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19695 the command-line, not the end.
19697 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
19699 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19701 2000-03-02 Tom Tromey <tromey@cygnus.com>
19703 * cp-tree.h (build_java_class_ref): Declare.
19704 * init.c (build_java_class_ref): No longer static.
19705 * except.c (expand_throw): Generate a Java-style `throw' if the
19706 thrown object is a "Java" object.
19707 (initialize_handler_parm): Generate a Java-style lookup of
19708 exception info if the caught object is a "Java" object.
19709 (catch_language, catch_language_init): New globals.
19710 (decl_is_java_type): New function.
19711 (expand_start_catch_block): Don't call push_eh_info() or
19712 push_eh_cleanup() when handling a Java-style "catch". Pass Java
19713 class reference to build_catch_block.
19715 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19717 * typeck.c (comptypes): Treat sizetype like its language equivalent.
19719 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
19721 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19722 to merge reference/pointer code and fix incorrect warnings.
19724 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
19726 * search.c (protected_accessible_p): Use context_for_name_lookup.
19728 * init.c (construct_virtual_bases): Fix thinko.
19729 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19731 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
19733 * decl.c (current_function_decl): Move to toplev.c.
19735 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
19737 * pt.c (fn_type_unification): Unify return type, whenever
19739 (get_bindings_real): Only pass return type when necessary.
19740 Remove explicit return type check.
19741 * class.c (resolve_address_of_overloaded_function): Pass desired
19742 return type to fn_type_unification.
19744 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19746 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19748 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19750 * rtti.c (expand_class_desc): Likewise.
19751 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19752 (THUNK_VCALL_OFFSET): Likewise.
19753 (THUNK_DELTA): Reflect changes in ../tree.h.
19755 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
19757 * search.c (protected_accessible_p): Also allow the access if
19758 the member is public in DERIVED. Lose TYPE parm.
19759 (friend_accessible_p): Lose TYPE parm.
19760 (accessible_p): Adjust.
19762 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19764 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19765 on things that are not sizes; ssize_binop deleted.
19766 Call size_diffop when appropriate.
19767 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19768 (build_primary_vtable, build_secondary_vtable): Likewise.
19769 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19770 Variable I is HOST_WIDE_INT.
19771 (get_vfield_offset): Pass proper types to size_binop.
19772 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19773 (finish_struct_1): Likewise.
19774 (skip_rtti_stuff): Arg N is now pointer to signed.
19775 (layout_class_type): Use size_zero_node.
19776 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19777 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19778 * decl.c (complete_arry_type): Pass proper types to size_binop.
19779 (xref_basetypes): BINFO_OFFSET is sizetype.
19780 * error.c (dump_expr): Don't use size_binop non-sizes.
19781 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19782 * init.c (construct_virtual_bases): Fix type error.
19783 (build_vec_delete_1): Pass proper type to size_binop and don't
19785 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19786 * rtti.c (get_base_offset): Pass proper type to size_binop.
19787 * search.c (dfs_find_vbases): Fix type error.
19788 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19789 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19790 * tree.c (debug_binfo): Variable N is signed.
19791 Use HOST_WIDE_INT_PRINT_DEC.
19792 * typeck.c (comptypes): sizetype is same as equivalent integer type.
19793 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19794 size_one_node and size_zero_node.
19795 (c_alignof): Use size_one_node.
19796 (build_component_addr): Pass proper types to size_binop.
19797 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19799 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
19801 Implement class scope using-declarations for functions.
19802 * class.c (handle_using_decl): Call add_method for used functions.
19803 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19804 (add_method): Used functions are hidden by local functions.
19805 (check_bases_and_members): Handle using-decls before finalizing
19806 CLASSTYPE_METHOD_VEC.
19807 * call.c (add_function_candidate): Add ctype parm; if nonzero,
19808 override the type of 'this' accordingly.
19809 (add_template_candidate, add_template_candidate_real): Add ctype parm.
19810 (convert_class_to_reference, build_user_type_conversion_1,
19811 build_new_function_call, build_object_call, build_new_op,
19812 build_new_method_call): Pass ctype parm.
19814 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19816 * call.c (convert_class_to_reference, build_user_type_conversion_1,
19817 build_new_function_call, build_object_call, build_new_op,
19818 build_new_method_call, build_op_delete_call): Don't get basetype_path
19820 * typeck.c (build_component_ref): Likewise.
19821 * init.c (build_offset_ref): Likewise.
19822 (resolve_offset_ref): Don't call enforce_access.
19823 Call build_scoped_ref.
19824 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
19825 would cause an error or if -pedantic.
19826 * class.c (alter_access): Lose binfo parm.
19828 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19830 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19833 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
19835 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19836 pseudo_type_info creation into the std namespace
19838 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19840 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19841 (import_export_class): Remove declaration.
19842 * decl2.c (import_export_class): Make it static.
19843 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19844 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19845 EXPR_WITH_FILE_LOCATION.
19846 * lex.c (check_newline): Tweak filename/lineno setting.
19847 * semantics.c (begin_while_stmt): Fix typo in comment.
19849 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19851 * lang-options.h (-fmessage-length=): Add missing option.
19853 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19855 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
19857 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19859 2000-02-25 Jim Wilson <wilson@cygnus.com>
19861 * optimize.c (expand_call_inline): Emit the return label before
19862 evaluating the return value.
19864 2000-02-24 Mark Mitchell <mark@codesourcery.com>
19866 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19867 than duplicating functionality here.
19868 * optimize.c: Include input.h.
19869 (expand_call_inline): Use push_srcloc and pop_srcloc.
19870 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19871 * parse.c: Regenerated.
19872 * Makefile.in (lex.o): Depend on input.h.
19873 (optimize.o): Likewise.
19875 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
19877 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19878 function type, rather than ICE.
19880 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
19882 * decl.c (grokdeclarator): Call decl_type_access_control.
19883 * parse.y (parse_end_decl): Don't call decl_type_access_control if
19886 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
19888 * decl.c (decls_match): Remove obsolete static member nadgering.
19890 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19892 * decl.c (grokdeclarator): Change ANSI to ISO.
19893 * lex.c (consume_string, readescape, do_identifier): Likewise.
19894 (parse_float, real_yylex): Likewise.
19895 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19896 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19897 new_type_id, maybe_label_decls, simple_stmt,
19898 for.init.statement): Likewise.
19899 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19900 * semantics.c (finish_named_return_value): Likewise.
19901 * parse.c: Regenerate.
19903 2000-02-21 Mark Mitchell <mark@codesourcery.com>
19905 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19906 (CPTI_CLASS_STAR_TYPE): Remove.
19907 (vtable_index_type): Likewise.
19908 (class_star_type_node): Remove.
19909 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19910 (build_binary_op_nodefault): Remove.
19911 * call.c (build_new_op): Use build_binary_op instead of
19912 build_binary_op_nodefault.
19913 * decl.c (init_decl_processing): Remove class_star_type_node
19914 initialization. Make delta_type_node ptrdiff_type_node under the
19915 new ABI. Initialize vtable_index_type.
19916 (build_ptrmemfunc_type): Build different structures for the new
19918 (build_enumerator): Use build_binary_op instead of
19919 build_binary_op_nodefault.
19920 * method.c (build_overload_value): Mangle pointers-to-members
19921 appropriately under the new ABI.
19922 * typeck.c (build_array_ref): Use build_binary_op instead of
19923 build_binary_op_nodefault.
19924 (get_member_function_from_ptrfunc): Adjust for the new ABI.
19925 (build_binary_op_nodefault): Rename to ...
19926 (build_binary_op): ... this. Remove old version. Adjust for
19927 pointer-to-member comparisons under the new ABI.
19928 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
19929 (build_ptrmemfunc): Adjust for the new ABI.
19930 (expand_ptrmemfunc_cst): Likewise.
19931 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19932 (pfn_from_ptrmemfunc): Adjust for the new ABI.
19934 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
19936 * call.c (build_object_call): Compress consecutive calls to
19938 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19939 (build_op_delete_call): Adjust message formatting.
19941 * class.c (check_bases): Compress consecutive calls to
19943 (finish_struct_anon): Say 'ISO C++'.
19945 * decl.c (start_decl): Same here.
19946 (grok_reference_init): Likewise.
19947 (grokfndecl): Correct message formatting.
19948 (grokfndecl): Improve diagnostic.
19949 (check_static_variable_definition): Likewise. Say 'ISO C++'
19950 (compute_array_index_type): Say 'ISO C++'
19951 (create_array_type_for_decl): Compress consecutive calls to
19953 (grokdeclarator): Say 'ISO C++'
19954 (grok_op_properties): Likewise.
19956 * decl2.c (delete_sanity): Clairify diagnostic.
19957 (check_member_template): Same here.
19958 (grok_function_init): Use consistent terminology.
19960 * expr.c (do_case): Say 'ISO C++'
19962 * friend.c (do_friend): Compress consecutive calls to warning.
19964 2000-02-20 Mark Mitchell <mark@codesourcery.com>
19966 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19967 * class.c (build_secondary_vtable): Reorganize. Don't create a
19968 new vtable under the new ABI.
19969 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19970 computing the size.
19971 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19972 the initializing elements.
19973 (initialize_vtable): New function.
19974 (dfs_finish_vtbls): Use it.
19975 (dfs_accumulate_vtbl_inits): New function.
19976 (finish_vtbls): Merge primary and secondary vtables under the new
19978 (finish_struct_1): Remove redundant call to layout_vtable_decl.
19979 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19982 * class.c (build_vtable): New function, split out from ...
19983 (get_vtable_decl): ... here, and ...
19984 (build_secondary_vtable): ... here.
19986 * pt.c (tsubst_decl): Fix formatting.
19988 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19990 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19991 (avoid_overlap, build_base_field): Likewise.
19992 (build_base_field, build_base_fields, is_empty_class):
19993 Test DECL_SIZE with integer_zero.
19994 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19995 * cp-tree.h (struct lang_type): New field size_unit.
19996 (CLASSTYPE_SIZE_UNIT): New macro.
19997 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19998 (cp_finish_decl): Delete -Wlarger-than processing.
19999 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20000 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20001 * tree.c (make_binfo): binfo vector is one entry longer.
20002 (walk_tree): Walk DECL_SIZE_UNIT.
20004 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20006 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20008 (build_vtable_entry): Don't assume all vtable entries are
20010 (build_vtbl_initializer): Adjust accordingly.
20011 (get_vtable_decl): Fix formatting.
20013 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20015 * semantics.c (deferred_type_access_control): Walk the entire
20017 (save_type_access_control): Rename from
20018 initial_deferred_type_access_control. Just remember the value.
20019 (decl_type_access_control): New fn.
20020 (begin_function_definition): Use deferred_type_access_control, after
20021 we've started the function. Set type_lookups to error_mark_node.
20022 * parse.y (frob_specs, fn.def1): Adjust.
20023 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20024 (parse_end_decl, parse_bitfield0, parse_method): New fns.
20025 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20026 (after_type_component_declarator0): Likewise.
20027 (after_type_component_declarator): Likewise.
20028 (notype_component_declarator): Likewise.
20029 * cp-tree.h: Adjust.
20031 * decl.c (redeclaration_error_message): Allow redeclaration of
20032 namespace-scope decls.
20034 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
20036 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20038 2000-02-17 Mark Mitchell <mark@codesourcery.com>
20040 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20041 * decl2.c (grokclassfn): Likewise.
20043 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20045 * decl2.c (lang_decode_option): Don't set default message length
20047 * lex.c (lang_init_options): Set it here.
20049 2000-02-16 Mark Mitchell <mark@codesourcery.com>
20051 Make DECL_CONTEXT mean the class in which a member function was
20052 declared, even for a virtual function.
20053 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20054 (DECL_FRIEND_CONTEXT): New macro.
20055 (DECL_REAL_CONTEXT): Remove.
20056 (SET_DECL_FRIEND_CONTEXT): Likewise.
20057 (DECL_VIRTUAL_CONTEXT): Adjust.
20058 (DECL_CLASS_SCOPE_P): Use TYPE_P.
20059 (add_friends): Remove.
20060 (hack_decl_function_context): Likewise.
20061 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20063 (build_over_call): Fix indentation. Use DECL_CONTEXT
20064 instead of DECL_CLASS_CONTEXT.
20065 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20066 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20067 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20068 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20069 (build_base_field): Likewise.
20070 (finish_struct_1): Likewise.
20071 (build_self_reference): Likewise.
20072 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20074 (pushtag): Use decl_function_context, not
20075 hack_decl_function_context.
20076 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20077 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20078 (pushdecl): Remove bogus code.
20079 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20080 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20081 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20082 Use decl_function_context, nothack_decl_function_context.
20083 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20084 (grokdeclarator): Likewise. Use decl_function_context, not
20085 hack_decl_function_context.
20086 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
20087 (start_function): Use DECL_FRIEND_CONTEXT, not
20088 DECL_CLASS_CONTEXT. Use decl_function_context, not
20089 hack_decl_function_context.
20090 (finish_function): Use decl_function_context, not
20091 hack_decl_function_context.
20092 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20093 DECL_CLASS_CONTEXT.
20094 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20095 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20096 (grokfield): Likewise.
20097 (finish_builtin_type): Likewise.
20098 (finish_vtable_vardec): Use decl_function_context, not
20099 hack_decl_function_context.
20100 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20101 (start_static_initialization_or_destruction): Likewise.
20102 (finish_static_initialization_or_destruction): Likewise.
20103 (mark_used): Adjust logic for deciding when to synthesize methods.
20104 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20106 * error.c (dump_function_decl): Use DECL_CONTEXT, not
20107 DECL_CLASS_CONTEXT.
20108 * friend.c (is_friend): Likewise.
20109 (add_friends): Remove.
20110 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20111 * lex.c (begin_definition_of_inclass_inline): Use
20112 decl_function_context, not hack_decl_function_context.
20113 (process_next_inline): Likewise.
20114 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20115 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20116 DECL_CLASSS_CONTEXT.
20117 (hack_identifier): Likewise.
20118 (synthesize_method): Use decl_function_context, not
20119 hack_decl_function_context.
20120 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20122 (is_member_template): Use decl_function_context, not
20123 hack_decl_function_context. Use DECL_CONTEXT, not
20124 DECL_CLASS_CONTEXT.
20125 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20126 DECL_CLASS_CONTEXT.
20127 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20129 (push_template_decl_real): Likewise.
20130 (instantiate_class_template): Don't call add_friends.
20131 (tsubst_default_argument): Use DECL_CONTEXT, not
20133 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20134 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20135 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20136 DECL_CLASS_CONTEXT.
20137 * repo.c (repo_inline_used): Likewise.
20138 * search.c (current_scope): Adjust for new _CONTEXT macros.
20139 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20141 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20142 (lookup_fnfields_here):Likewise.
20143 (check_final_overrider): Likewise.
20144 (init_vbase_pointers): Likewise.
20145 (virtual_context): Likewise.
20146 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20147 (expand_body): Use decl_function_context, not
20148 hack_decl_function_context.
20149 * tree.c (hack_decl_function_context): Remove.
20150 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20151 DECL_CLASS_CONTEXT.
20152 * typeck2.c (error_not_base_type): Likewise.
20154 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
20156 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20158 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20160 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20162 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
20164 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20166 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
20168 * decl2.c (lang_decode_option): Enable automatic line wrapping.
20170 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
20172 * parse.y (frob_specs): Split out...
20173 (parse_decl): From here.
20174 (fn.def2): Call initial_deferred_type_access_control.
20175 (after_type_component_declarator0): Call frob_specs.
20176 (notype_component_declarator0): Likewise.
20177 * search.c (friend_accessible_p): Nested classes are friends of their
20180 2000-02-10 Mark Mitchell <mark@codesourcery.com>
20182 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20183 used to create an implicit temporary.
20185 * class.c (dfs_modify_vtables): Tweak calculation of functions to
20188 2000-02-08 Nathan Sidwell <nathan@acm.org>
20190 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20191 strip array element qualifiers too.
20193 2000-02-07 Mark Mitchell <mark@codesourcery.com>
20195 * decl.c (store_parm_decls): Don't build cleanups for parameters
20196 while processing_template_decl.
20198 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
20200 * cp-tree.h (struct saved_scope): Add incomplete field.
20201 (namespace_scope_incomplete): New macro.
20202 * decl.c (pushdecl): Use it.
20203 (hack_incomplete_structures): Use it. See through artificial
20205 (mark_saved_scope): Mark it.
20207 Implement access control for nested types.
20208 * search.c (type_access_control): New fn.
20209 (accessible_p): Now we do perform access control for types.
20210 * semantics.c (deferred_type_access_control): New fn.
20211 (initial_deferred_type_access_control): New fn.
20212 (begin_function_definition): Call it. Add lookups parm.
20213 * decl.c (struct binding_level): Add this_class field.
20214 (pushlevel_class): Set it.
20215 (mark_binding_level): Mark it.
20216 (lookup_name_real): Use it. Call type_access_control.
20217 (mark_saved_scope): Mark lookups field.
20218 * cp-tree.h (flagged_type_tree): Add lookups field.
20219 (struct saved_scope): Add lookups field.
20220 (type_lookups): New macro.
20221 * parse.y (declmods): Now <ftype>.
20222 (parse_decl): Add lookups parm. Call
20223 initial_deferred_type_access_control.
20224 (lang_extdef): Clear type_lookups.
20225 (typed_declspecs, declmods, typespec): Set lookups field.
20226 (initdcl): Call deferred_type_access_control.
20227 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20228 component_decl_1, named_parm): Adjust.
20229 * friend.c (is_friend): Nested classes are friends of their
20232 * class.c (currently_open_derived_class): New fn.
20233 * method.c (hack_identifier): Use it.
20235 * lex.c (do_identifier): Remove obsolete code.
20237 * parse.y (typed_typespecs): Propagate new_type_flag properly.
20239 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
20241 * tinfo.h: Remove apostrophes from C++ comment (xgettext
20242 thinks this file is plain C).
20244 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20246 * Makefile.in (call.o): Depend on $(EXPR_H).
20248 * call.c: Include "expr.h".
20250 * class.c (dump_class_hierarchy): Add prototype.
20252 * search.c (dfs_get_pure_virtuals): Likewise.
20254 2000-02-1 Ulrich Drepper <drepper@redhat.com>
20256 * parse.y (simple_stmt): Allow :: token in asm parameter list.
20257 * parse.c: Rebuilt.
20259 2000-01-31 Jim Wilson <wilson@cygnus.com>
20261 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20262 Store it in DECL_FCONTEXT.
20263 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20265 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
20267 * tinfo.h (old abi): #include "tconfig.h".
20268 * tinfo.cc (convert_to_base): Move into old abi section.
20270 2000-01-31 Mark Mitchell <mark@codesourcery.com>
20272 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20273 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20274 (BINFO_PRIMARY_BINFO): New macro.
20275 (BF_DELTA): Rename to ...
20276 (BV_DELTA): ... this.
20277 (BF_VCALL_INDEX): Rename to ...
20278 (BV_VCALL_INDEX): ... this.
20279 (BF_FN): Rename to ...
20281 * class.c (build_vbase_path): Adjust for changes to reverse_path.
20282 (set_rtti_entry): Rename BF_ macros to BV_ variants.
20283 (modify_vtable_entry): Simplify.
20284 (add_virtual_function): Rename BF_ macros to BV_ variants.
20285 (build_vtable_initializer): Likewise.
20286 (get_class_offset_1): Remove.
20287 (dfs_get_class_offset): Likewise.
20288 (get_class_offset): Likewise.
20289 (dfs_find_final_overrider): New function.
20290 (find_final_overrider): Likewise.
20291 (modify_one_vtable): Remove.
20292 (dfs_find_base): New function.
20293 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
20294 find_final_overrider.
20295 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
20297 (dfs_fixup_vtable_deltas): Remove.
20298 (override_one_vtable): Remove.
20299 (merge_overrides): Likewise.
20300 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20301 unreal chilren of virtual bases.
20302 (finish_struct_1): Don't use merge_overrides. Don't use
20303 dfs_fixup_vtable_deltas.
20304 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20307 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20308 Jason Merrill <jason@yorick.cygnus.com>
20310 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20312 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
20314 * exception.cc (__throw_bad_typeid): Add missing std::.
20316 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20318 * cp-tree.h (make_thunk): PROTO -> PARAMS.
20320 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
20322 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20324 Runtime support for new-abi rtti.
20325 * inc/typeinfo (type_info::operator!=): Define in class.
20326 (type_info::before, type_info::name, type_info::operator==,
20327 type_info::operator!=): Define new ABI implementations.
20328 (type_info::is_pointer_p, type_info::is_function_p): Declare
20329 new virtual functions.
20330 (type_info::do_catch, type_info::do_upcast): Likewise.
20332 * tinfo.h (__base_class_info): Define new class.
20333 (__class_type_info): Likewise.
20334 (__si_class_type_info): Likewise.
20335 (__vmi_class_type_info): Likewise.
20336 (__dynamic_cast): Prototype.
20338 * tinfo.cc: Conditionalize old and new rtti mechanisms.
20339 (type_info::is_pointer_p): Define new function.
20340 (type_info::is_function_p): Likewise.
20341 (type_info::do_catch): Likewise.
20342 (type_info::do_upcast): Likewise.
20343 (vtable_prefix): New structure for vtable access.
20344 (adjust_pointer): Define new template function.
20345 (contained_p, public_p, virtual_p, contained_public_p,
20346 contained_nonpublic_p, contained_nonvirtual_p): Define new
20348 (nonvirtual_base_type): New local variable.
20349 (__class_type_info::~__class_type_info): Define.
20350 (__si_class_type_info::~__si_class_type_info): Likewise.
20351 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20352 (__class_type_info::do_catch): Define new function.
20353 (__class_type_info::do_upcast): Likewise.
20354 (__class_type_info::find_public_src): Likewise.
20355 (__class_type_info::do_find_public_src): Likewise.
20356 (__si_class_type_info::do_find_public_src): Likewise.
20357 (__vmi_class_type_info::do_find_public_src): Likewise.
20358 (__class_type_info::do_dyncast): Likewise.
20359 (__si_class_type_info::do_dyncast): Likewise.
20360 (__vmi_class_type_info::do_dyncast): Likewise.
20361 (__class_type_info::do_upcast): Likewise.
20362 (__si_class_type_info::do_upcast): Likewise.
20363 (__vmi_class_type_info::do_upcast): Likewise.
20364 (__dynamic_cast): Likewise.
20366 * tinfo2.cc (__fundamental_type_info): Define new class.
20367 (__pointer_type_info): Likewise.
20368 (__reference_type_info): Likewise.
20369 (__array_type_info): Likewise.
20370 (__function_type_info): Likewise.
20371 (__enum_type_info): Likewise.
20372 (__ptr_to_member_type_info): Likewise.
20373 (__fundamental_type_info::~__fundamental_type_info): Define.
20374 (__pointer_type_info::~__pointer_type_info): Likewise.
20375 (__reference_type_info::~__reference_type_info): Likewise.
20376 (__array_type_info::~__array_type_info): Likewise.
20377 (__function_type_info::~__function_type_info): Likewise.
20378 (__enum_type_info::~__enum_type_info): Likewise.
20379 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20380 (__pointer_type_info::do_catch): Define new function.
20381 (__ptr_to_member_type_info::do_catch): Define new function.
20383 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20384 (__is_pointer): Likewise.
20386 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20388 2000-01-30 Mark Mitchell <mark@codesourcery.com>
20390 * cp/class.c (build_vtable): Rename to build_primary_vtable.
20391 (prepare_fresh_vtable): Rename to build_secondary_vtable.
20392 (make_new_vtable): New function.
20393 (modify_vtable_entry): Handle generation of new vtables correctly.
20394 (modify_one_vtable): Remove unused parameter.
20395 (dfs_fixup_vtable_deltas): Likewise.
20396 (override_one_vtable): Use build_secondary_vtable.
20397 (finish_struct_1): Use build_primary_vtable and
20398 build_secondary_vtable.
20400 2000-01-28 Ulrich Drepper <drepper@redhat.com>
20402 * cp/decl.c: Adjust variable names, comments, help strings.
20404 2000-01-29 Nathan Sidwell <nathan@acm.org>
20406 * new2.cc (operator delete[]): Use operator delete, don't assume
20409 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
20411 * class.c (build_vtbl_initializer): Add argument to
20412 build_vtable_entry call.
20414 2000-01-27 Mark Mitchell <mark@codesourcery.com>
20416 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20417 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20418 (BF_DELTA): New macro.
20419 (BF_VCALL_INDEX): Likewise.
20421 (THUNK_VCALL_OFFSET): Likewise.
20422 (make_thunk): Change prototype.
20423 * class.c (build_vtable_entry): Integrate
20424 build_vtable_entry_for_fn. Handle vcall indices.
20425 (build_vtable_entry_for_fn): Remove.
20426 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
20427 BF_VCALL_INDEX, BF_FN.
20428 (modify_vtable_entry): Integrate common code from
20429 modify_one_vtable and dfs_fixup_vtable_deltas.
20430 (add_virtual_function): Set BF_VCALL_INDEX.
20431 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
20433 (modify_one_vtable): Simplify.
20434 (dfs_fixup_vtable_deltas): Likewise.
20435 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20436 * method.c (make_thunk): Handle vcall indices.
20438 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
20440 Compiler side new abi rtti (not enabled).
20441 * cp-tree.h (new_abi_rtti_p): New macro.
20442 (emit_support_tinfos): Prototype new function.
20443 (tinfo_decl_p): Likewise.
20444 (emit_tinfo_decl): Likwise.
20445 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20447 (doing_runtime): New local static.
20448 (init_rtti_processing): Add new-abi initializer.
20449 (get_tinfo_decl): Add new-abi logic.
20450 (tinfo_from_decl): Likewise.
20451 (build_dynamic_cast_1): Likewise.
20452 (qualifier_flags): New static function.
20453 (tinfo_base_init): Likewise.
20454 (generic_initializer): Likewise.
20455 (ptr_ref_initializer): Likewise.
20456 (ptmd_initializer): Likewise.
20457 (class_hint_flags): Likewise.
20458 (class_initializer): Likewise.
20459 (synthesize_tinfo_var): Likewise.
20460 (create_real_tinfo_var): Likewise.
20461 (create_pseudo_type_info): Likewise.
20462 (get_vmi_pseudo_type_info): Likewise.
20463 (create_tinfo_types): Likewise.
20464 (emit_support_tinfos): New global function.
20465 (tinfo_decl_p): New global predicate.
20466 (emit_tinfo_decl): New global function.
20467 * class.c (set_rtti_entry): Generalize for old and new rtti.
20468 (build_vtbl_initializer): Likewise.
20469 * decl2.c (finish_file): Likewise.
20471 2000-01-27 Jim Wilson <wilson@cygnus.com>
20473 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20474 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20476 2000-01-27 Mike Stump <mrs@wrs.com>
20478 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20481 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
20483 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20485 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
20487 * optimize.c (calls_setjmp_r): Supply new argument
20488 to special_function_p.
20490 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20492 * call.c: PROTO -> PARAMS.
20493 * class.c: Likewise.
20494 * cp-tree.h: Likewise.
20496 * decl.c: Likewise.
20497 * decl.h: Likewise.
20498 * decl2.c: Likewise.
20499 * dump.c: Likewise.
20500 * errfn.c: Likewise.
20501 * error.c: Likewise.
20502 * except.c: Likewise.
20503 * expr.c: Likewise.
20504 * init.c: Likewise.
20505 * input.c: Likewise.
20508 * method.c: Likewise.
20509 * optimize.c: Likewise.
20510 * parse.y: Likewise.
20512 * repo.c: Likewise.
20513 * rtti.c: Likewise.
20514 * search.c: Likewise.
20515 * semantics.c: Likewise.
20516 * spew.c: Likewise.
20517 * tree.c: Likewise.
20518 * typeck.c: Likewise.
20519 * typeck2.c: Likewise.
20520 * xref.c: Likewise.
20522 2000-01-25 Richard Henderson <rth@cygnus.com>
20524 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20526 2000-01-25 Mark Mitchell <mark@codesourcery.com>
20528 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20529 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20530 (struct vcall_offset_data_s): New type.
20531 (dfs_vcall_offset_queue_p): New function.
20532 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20533 (build_vcall_offset_vtbl_entries): Likewise.
20534 (layout_vtable_decl): Likewise.
20535 (num_vfun_entries): Likewise.
20536 (num_extra_vtbl_entries): Add the entries for vcall offsets.
20537 (build_vtbl_initializer): Likewise.
20538 (dfs_finish_vtabls): Use layout_vtable_decl.
20539 (modify_one_vtables): Always duplicate vtables under the new ABI.
20540 (finish_struct_1): Use layout_vtable_decl.
20542 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20544 * decl.c (member_function_or_else): Change third arg from a format
20545 specifier to an `enum overload_flags'. Callers changed.
20547 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
20549 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20550 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20551 build_const_cast, get_delta_difference, check_return_expr): Avoid
20552 ANSI string concatenation usage.
20554 2000-01-24 Mark Mitchell <mark@codesourcery.com>
20556 * class.c (layout_class_type): Put the fields required to make a
20557 class non-empty at the end, not the beginning, of the TYPE_FIELDs
20560 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
20562 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20565 * decl2.c (mark_used): Do instantiate inlines that have been
20566 explicitly instantiated.
20568 2000-01-24 Richard Henderson <rth@cygnus.com>
20570 * call.c (build_over_call): Use expand_tree_builtin.
20571 * typeck.c (build_function_call_real): Likewise.
20572 (build_binary_op_nodefault): Handle unordered compares.
20574 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20576 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20577 cp_tree_index values.
20578 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20579 New global node #defines for them.
20580 * rtti.c (call_void_fn): Replace with ...
20581 (build_runtime_decl): ... new static function.
20582 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20583 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20584 (build_dynamic_cast_1): Always produce correctly typed result.
20585 Explicitly produce type_info addresses. Use dynamic_cast_node.
20586 * exception.cc (__throw_bad_cast): Return `void *'.
20587 (__throw_bad_typeid): Return `const type_info &'.
20589 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20591 * cp-tree.h (get_vtable_decl): Prototype new function.
20592 * class.c (get_vtable_decl): New function. Broken out from ...
20593 (build_vtable): ... here. Use it.
20594 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20595 by get_vtable_decl.
20597 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20599 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20600 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20601 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20602 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20603 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20604 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20605 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20606 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20607 (CPTI_TINFO_VAR_ID): New enumeration.
20608 (__tp_desc_type_node, __access_mode_type_node,
20609 __bltn_desc_type_node, __user_desc_type_node,
20610 __class_desc_type_node, __ptr_desc_type_node,
20611 __attr_desc_type_node, __func_desc_type_node,
20612 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20613 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20614 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20615 enum_desc_type_node, class_desc_type_node,
20616 si_class_desc_type_node, vmi_class_desc_type_node,
20617 ptmd_desc_type_node, base_desc_type_node): New #defines.
20618 (tinfo_fn_id, tinfo_fn_type): Rename to ...
20619 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20620 (tinfo_var_id): New enumeration.
20621 (DECL_TINFO_FN_P): Augment comment.
20622 * decl.c (cp_global_trees): Adjust documentation.
20623 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20624 tinfo_decl_type and tinfo_var_id.
20625 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20626 (build_typeid): Remove unused variable.
20627 (get_tinfo_var): Use tinfo_var_id.
20628 (tinfo_name): New static function.
20629 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20630 (tinfo_from_decl): Likewise.
20631 (get_base_offset): New static function, broken out of
20633 (expand_si_desc): Use tinfo_name.
20634 (expand_class_desc): Likewise. Lose local static variable.
20635 Use base_desc_type_node. Use get_base_offset.
20636 (expand_ptr_desc): Use tinfo_name.
20637 (expand_attr_desc): Likewise.
20638 (expand_generic_desc): Likewise.
20640 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20641 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20643 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20645 * cp-tree.h (__eprintf): Remove declaration.
20646 * tree.c (__eprintf): Remove definition.
20648 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
20649 Mark Mitchell <mark@codesourcery.com>
20651 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20652 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20654 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
20656 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20658 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20660 * cp-tree.h (register_dtor_fn): New function.
20661 * decl.c (destroy_local_static): Rename to ...
20662 (register_dtor_fn): ... this. Give it external linkage.
20663 (expand_static_init): Use it.
20664 * decl2.c (do_static_initialization): Likewise, if using
20666 (do_static_destruction): Check that __cxa_atexit is not in use.
20667 (finish_file): Don't call do_static_destruction if using
20670 * typeck.c (convert_arguments): Restore two-message error
20673 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
20675 Remap dynamic cast hint values to be consistent across ABIs.
20676 * search.c (dynamic_cast_base_recurse): Remap generated value.
20677 (get_dynamic_cast_base_type): Adjust documentation.
20678 * tinfo.h (__user_type_info::dyncast): Likewise.
20679 (__user_type_info::find_public_subobj): Remap BOFF meaning.
20680 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20681 (__class_type_info::do_dyncast): Likewise.
20682 (__class_type_info::do_find_public_subobj): Likewise.
20683 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20685 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20687 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20689 * typeck2.c (incomplete_type_error): Restore previous
20690 cp_error and cp_error_at call sequence.
20692 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
20694 * class.c (dump_class_hierarchy): Make format agree with argument;
20695 cast pointer to unsigned long and print with %lx.
20697 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20699 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20701 * typeck.c (composite_pointer_type, common_type,
20702 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20703 build_function_call_real, convert_arguments,
20704 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20705 build_unary_op, mark_addressable, build_compound_expr,
20706 build_static_cast, build_reinterpret_cast, build_const_cast,
20707 build_c_cast, build_modify_expr, get_delta_difference,
20708 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20709 'ISO C++'. Fusion consecutive calls to diagnostic message routines
20711 * typeck2.c (readonly_error, abstract_virtuals_error,
20712 process_init_constructor, check_for_new_type): Likewise.
20714 2000-01-19 Mark Mitchell <mark@codesourcery.com>
20716 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20719 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
20721 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20722 (build_x_typeid): Likewise.
20723 (get_tinfo_fn): Likewise.
20724 (get_tinfo_fn_unused): Rename to ...
20725 (get_tinfo_decl): ... here.
20726 * rtti.c (build_headof): Replace logic error with assertion.
20727 (get_tinfo_fn_dynamic): Rename to ...
20728 (get_tinfo_decl_dynamic): ... here. Make static. Use
20729 complete_type_or_else.
20730 (build_x_typeid): Move into ...
20731 (build_typeid): ... here. Adjust call to
20732 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20733 throw_bad_typeid expression.
20734 (get_tinfo_fn_unused): Rename to ...
20735 (get_tinfo_decl): ... here. Adjust comment.
20736 (get_tinfo_fn): Delete.
20737 (tinfo_from_decl): New static function.
20738 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20739 (get_typeid): Use complete_type_or_else.
20740 (build_dynamic_cast_1): Adjust calls to
20741 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20742 * parse.y (primary): Adjust call to build_typeid.
20743 * except.c (build_eh_type_type_ref): Adjust call to
20744 get_tinfo_decl. Mark as used.
20745 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20746 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20747 * parse.c: Regenerated.
20749 2000-01-17 Mark Mitchell <mark@codesourcery.com>
20751 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
20752 calling convention.
20753 (resolves_to_fixed_type_p): Document calling convention.
20754 * rtti.c (build_x_typeid): Initialize NONNULL.
20756 * cp-tree.h (build_shared_int_cst): New function.
20757 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20758 * class.c (modify_vtable_entry): Likewise.
20759 (add_virtual_function): Split out code to generated shared
20760 INTEGER_CSTs to build_share_int_cst.
20761 (modify_all_vtables): Handle all the overridden functions here.
20762 Add overridden functions from non-primary virtual bases to the
20764 (finish_struct_1): Adjust call to modify_all_vtables. Add
20765 overridden functions from non-primary bases to the vtable.
20766 * tree.c (build_shared_int_cst): New function.
20768 * cp-tree.h (scratchalloc): Remove.
20769 (build_scratch_list): Likewise.
20770 * call.c (convert_class_to_reference): Replace build_scratch_list
20771 and build_expr_list with build_tree_list.
20772 (add_candidate): Replace scratchalloc with expralloc. Note memory
20774 (build_user_type_conversion_1): Replace build_scratch_list
20775 and build_expr_list with build_tree_list.
20776 (build_new_op): Likewise.
20777 (build_op_delete_call): Likewise.
20778 (convert_like): Likewise.
20779 * cvt.c (ocp_convert): Likewise.
20780 * decl.c (start_decl): Likewise.
20781 (start_function): Likewise.
20782 (finish_destructor_body): Likewise.
20783 (maybe_build_cleanup_1): Likewise.
20784 * decl2.c (reparse_decl_as_expr): Likewise.
20785 * init.c (perform_member_init): Likewise.
20786 (expand_cleanup_for_base): Likewise.
20787 (build_builtin_delete_call): Likewise.
20788 (build_new_1): Likewise.
20789 (build_delete): Likewise.
20790 * method.c (do_build_assign_ref): Likewise.
20791 * parse.y (already_scoped_stmt): Likewise.
20792 (nontrivial_exprlist): Likewise.
20793 (net_initializer): Likewise.
20794 (initlist): Likewise.
20795 * parse.c: Regenerated.
20796 * rtti.c (build_x_typeid): Likewise.
20797 (build_dynamic_cast_1): Likewise.
20798 * typeck.c (build_x_compound_expr): Likewise.
20799 (build_static_cast): Likewise.
20800 (build_modify_expr): Likewise.
20802 * cp-tree.h (DECL_VINDEX): Add documentation.
20803 * class.c (build_vtable_entry): Likewise.
20804 (start_vtable): Add comment.
20805 (add_virtual_function): Replace pending_hard_virtuals with
20806 overridden_virtuals and pending_virtuals with new_virtuals.
20807 Replace redundant assignments with assertions.
20808 (check_for_override): Add comment.
20809 (check_bases_and_members): Replace pending_hard_virtuals with
20810 overridden_virtuals and pending_virtuals with new_virtuals.
20811 (create_vtbl_ptr): Likewise.
20812 (layout_class_type): Likewise.
20813 (finish_struct_1): Likewise. Add comments.
20815 2000-01-16 Mark Mitchell <mark@codesourcery.com>
20817 * class.c (finish_struct_1): Replace redundant code with
20820 * cp-tree.h (flag_new_abi): Move.
20821 (flag_use_cxa_atexit): Likewise.
20822 (flag_honor_std): Likewise.
20823 (flag_rtti): Likewise.
20824 (vbase_offsets_in_vtable_p): Define.
20825 (vptrs_present_everywhere_p): Likewise.
20826 (TYPE_CONTAINS_VPTR_P): Likewise.
20827 (dfs_walk_real): Declare.
20828 * class.c (build_vbase_pointer_fields): Check
20829 vbase_offsets_in_vtable_p.
20830 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20832 (build_vbase_offset_vtbl_entries): Simplify.
20833 (build_vbase_offset_vtbl_entries): Adjust.
20834 (build_vbase_pointer): Add ability to look up vbase offsets in
20836 (start_vtable): New function.
20837 (add_virtual_function): Use it.
20838 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20839 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20840 (build_vtbl_initializer): Take the type of the complete object as
20841 input. Use it to correctly calculate vbase offsets.
20842 (dfs_finish_vtbls): Pass the complete type to
20843 build_vtbl_initializer.
20844 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20845 (create_vtable_ptr): Create a vtable even if there are no
20846 new virtual functions, under the new ABI.
20847 (finish_struct_1): Likewise.
20848 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20849 * decl.c (exapnd_static_init): Remove call to
20850 preserve_initializer.
20851 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20853 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20854 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20855 (construct_virtual_bases): Don't initialize virtual base pointers
20857 (build_aggr_init): Clean up comment.
20858 (expand_aggr_init_1): Likewise.
20859 * rtti.c (expand_class_desc): Store the virtual function table
20860 index where the vbase offset lives in the offset field.
20861 * search.c (dfs_walk_real): Make it global.
20862 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20863 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20865 * tinfo.h (USItype): Make it signed under the new ABI.
20866 * tinfo.cc (convert_to_base): New function. Encapsulate base
20867 conversion logic here.
20868 (__class_type_info::do_upcast): Use it.
20869 (__class_type_info::do_dyncast): Likewise.
20870 (__class_type_info::do_find_public_subobj): Likewise.
20872 * init.c (construct_virtual_bases): Don't look up the addresses of
20873 virtual bases at run-time.
20875 * class.c (build_vbase_pointer): Relocate.
20876 (build_vbase_pointer_fields): Likewise.
20877 (dfs_build_vbase_offset_vtbl_entries): Likewise.
20878 (build_vbase_offset_vtbl_entries): Likewise.
20880 * decl.c (init_decl_processing): Complain if -fnew-abi
20881 -fno-vtable-thunks is used.
20883 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20886 2000-01-15 Mark Mitchell <mark@codesourcery.com>
20888 * cp-tree.h (num_extra_vtbl_entries): New function.
20889 (size_extra_vtbl_entries): Likewise.
20890 (dfs_vtable_path_unmark): Likewise.
20891 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20892 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20893 * class.c (num_extra_vtbl_entries): New function.
20894 (size_extra_vtbl_entries): Likewise.
20895 (dfs_build_vbase_offset_vtbl_entries): New function.
20896 (build_vbase_offset_vtbl_entries): Likewise.
20897 (build_vtbl_initializer): Use it.
20898 (finish_struct_1): Adjust vtable sizes (using
20899 num_extra_vtbl_entries).
20900 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20901 THUNK_DECL is non-NULL before expanding it.
20902 * init.c (expand_virtual_init): Adjust the vtable pointer by
20903 size_extra_vtbl_entries before storing it.
20904 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20905 Handle TREE_LIST parameters here, not in the dfs_* functions.
20906 (dfs_unmarked_real_bases_queue_p): Adjust.
20907 (dfs_marked_real_bases_queue_p): Likewise.
20908 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20909 (dfs_vtable_path_marked_real_bases_queue_p): New function.
20910 (dfs_vtable_path_unmark): Likewise.
20912 2000-01-14 Mark Mitchell <mark@codesourcery.com>
20914 * optimize.c (copy_body_r): Clear the operand three of a
20915 TARGET_EXPR when copying it.
20917 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20919 * method.c (build_decl_overload_real): Check whether we are in ::
20920 before returning __builtin_new/delete.
20922 2000-01-13 Mark Mitchell <mark@codesourcery.com>
20924 * pt.c (tsubst_friend_function): Improve comment.
20925 (instantiate_decl): Avoid crashing when a "nested" function is
20926 instantiated from the top level.
20928 * dump.c (dqeueue_and_dump): Dump
20929 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20931 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20933 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20935 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
20937 * g++spec.c (lang_specific_driver): Add -fnew-abi if
20938 ENABLE_NEW_GXX_ABI defined.
20939 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20940 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20941 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20943 2000-01-12 Mark Mitchell <mark@codesourcery.com>
20945 * decl.c (start_cleanup_fn): Call pushdecl.
20947 * call.c (convert_class_to_reference): Fix typos.
20948 (build_conditional_expr): Handle errors gracefully.
20949 * class.c (push_nested_class): Likewise.
20950 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20951 (DECL_THIS_EXTERN): Use it.
20952 (DECL_THIS_STATIC): Likewise.
20953 * cvt.c (convert_to_void): Handle errors gracefully.
20954 (build_expr_type_conversion): Likewise.
20955 * decl.c (maybe_push_decl): Likewise.
20956 (start_decl_1): Likewise.
20957 (require_complete_types_for_parms): Likewise.
20958 * parse.y (structsp): Likewise.
20959 (base_class): Likewise.
20960 * parse.c: Regenerated.
20961 * pt.c (finish_member_template_decl): Likewise.
20962 * typeck.c (decay_conversion): Likewise.
20964 * cp-tree.h (dfs_skip_vbases): New function.
20965 (find_vbase_instance): Likewise.
20966 * class.c (determine_primary_base): Allow a nearly empty base to
20967 serve as a primary base class under the new ABI.
20968 (get_class_offset_1): Rename to ...
20969 (dfs_get_class_offset): ... this. Simplify. Don't issue error
20971 (get_class_offset): Use it. Issue error messages here.
20972 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20973 find the right copies of virtual bases.
20974 (fixup_vtable_deltas1): Rename to ...
20975 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
20976 bases as primary bases.
20977 (fixup_vtable_deltas): Remove.
20978 (override_one_vtable): Handle virtual bases as primary bases.
20979 (merge_overrides): Likewise.
20980 (finish_struct_1): Likewise.
20981 (dump_class_hierarchy): Dump primary-ness of bases as well.
20982 * search.c (mark_primary_bases): Use a pre-order traversal to
20983 handle primary virtual bases.
20984 (dfs_skip_vbases): New fiunction.
20985 (expand_upcast_fixups): Adjust to handle primary virtual bases.
20986 (fixup_virtual_upcast_offsets): Likewise.
20987 (fixup_all_virtual_upcast_offsets): Likewise.
20988 (dfs_find_vbase_instances): New function.
20989 (find_vbase_instance): Likewise.
20991 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
20993 * lex.c (DIR_SEPARATOR): Delete macro.
20995 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
20997 * decl2.c (lang_decode_option): Handle automatic line wrapping
21000 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21002 * friend.c (do_friend): Don't resolve scopes when processing
21003 template declarations, even if the qualifying scope doesn't
21004 involve template parameters.
21006 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21008 * class.c (dfs_modify_vtables_queue_p): Remove.
21009 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21010 and dfs_marked_real_bases_queue_p instead of
21011 dfs_modify_vtables_queue_p.
21013 * class.c (build_vbase_path): Simplify.
21014 (dfs_propagate_binfo_offsets): New function.
21015 (propagate_binfo_offsets): Use it.
21016 (remove_base_field): Simplify.
21017 (dfs_set_offset_for_vbases): Remove.
21018 (dfs_set_offset_for_shared_vbases): New function.
21019 (dfs_set_offset_for_unshared_vbases): Likewise.
21020 (layout_virtual_bases): Use them.
21021 (layout_basetypes): Don't call propagate_binfo_offsets.
21022 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21025 * class.c (build_base_field): New function, split out from ...
21026 (build_base_fields): ... here. Use it. Allocate primary bases
21027 first, under the new ABI.
21028 (get_vtable_entry): Remove.
21029 (remove_base_field): New function, split out from ...
21030 (remove_base_fields): ... here. Adjust since primary bases come
21031 first under the new ABI.
21033 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21034 (initialize_vtbl_ptrs): New function.
21035 (expand_indirect_vtbls_init): Change prototype.
21036 (convert_pointer_to_vbase): Declare.
21037 * init.c (expand_direct_vtbls_init): Remove.
21038 (dfs_initialize_vtbl_ptrs): New function.
21039 (initialize_vtbl_ptrs): Likewise.
21040 (emit_base_init): Use initialize_vtbl_ptrs.
21041 * search.c (convert_pointer_to_vbase): Make it global.
21042 (expand_indirect_vtbls_init): Remove vtable initialization code.
21043 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21045 * class.c (dfs_finish_vtbls): New function.
21046 (finish_vtbls): Use it.
21047 (dump_class_hierarchy): New function.
21049 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21050 (BINFO_VBASE_PRIMARY_P): New macro.
21051 (BINFO_VIRTUALS): Add to documentation.
21052 (SET_BINFO_PRIMARY_MARKED_P): Remove.
21053 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21054 (dfs_mark_primary_bases_queue_p): Likewise.
21055 (dfs_unmarked_real_bases_queue_p): New function.
21056 (dfs_marked_real_bases_queue_p): Likewise.
21057 * search.c (dfs_mark_primary_bases): Adjust.
21058 (mark_primary_bases): Likewise.
21059 (get_shared_vbase_if_not_primary): New function.
21060 (dfs_unmarked_real_bases_queue_p): Likewise.
21061 (dfs_marked_real_bases_queue_p): Likewise.
21062 (dfs_get_pure_virtuals): Simplify.
21063 (get_pure_virtuals): Likewise.
21065 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21067 * lex.c: Include tm_p.h.
21069 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
21071 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21073 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
21075 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21076 * pt.c (instantiate_decl): Defer comdat templates that might not be
21079 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21080 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21081 (finish_file): Likewise.
21083 * decl2.c (import_export_class): Undo 12/14 change.
21085 * error.c (dump_decl): operator new, not operatornew.
21087 * class.c (field_decl_cmp): A nontype is "greater" than a type.
21088 * search.c (lookup_field_1): Look for the last field with the
21091 2000-01-05 Nathan Sidwell <nathan@acm.org>
21093 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21096 2000-01-05 Nathan Sidwell <nathan@acm.org>
21098 * typeck.c (build_static_cast): Don't strip target qualifiers
21099 when casting from a class.
21101 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21103 * class.c (warn_hidden): Initialize variable `fndecl'.
21105 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
21107 * decl.c (flag_isoc9x): New variable to be able to use code in
21108 c-common.c. For now always zero.
21110 2000-01-03 Mark Mitchell <mark@codesourcery.com>
21112 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21113 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21114 or unshare_base_binfos for virtual bases here.
21115 * search.c (dfs_get_vbase_types): Do it here.
21116 (get_vbase_types): Adjust.
21118 2000-01-02 Mark Mitchell <mark@codesourcery.com>
21120 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21121 (BINFO_PRIMARY_MARKED_P): Use flag 5.
21122 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21123 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21124 (unmark_primary_bases): Remove declaration.
21125 (unmarkedp): Declare.
21126 (dfs_vbase_unmark): Likewise.
21127 * class.c (determine_primary_base): Return immediately if there
21128 are no base classes. Call mark_primary_bases here.
21129 (modify_all_direct_vtables): Remove.
21130 (modify_all_indirect_vtables): Remove.
21131 (dfs_modify_vtables_queue_p): New function.
21132 (dfs_modify_vtables): New function.
21133 (modify_all_vtables): Use them.
21134 (build_base_fields): Build FIELD_DECLs for primary virtual base
21136 (create_vtable_ptr): Don't call determine_primary_base here.
21137 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21138 (dfs_set_offset_for_vbases): ... this.
21139 (layout_virtual_bases): Use it.
21140 (layout_class_type): Call determine_primary_base here.
21141 * search.c (unmarkedp): Make it global.
21142 (shared_marked_p): Simplify.
21143 (shared_unmarked_p): Likewise.
21144 (dfs_primary_bases_queue_p): Remove.
21145 (dfs_unmark_primary_bases): Likewise.
21146 (unmark_primary_bases): Likewise.
21147 (mark_primary_bases): Simplify.
21148 (get_pure_virtuals): Don't call mark_primary_bases here.
21149 (dfs_vbase_unmark): New function.
21150 (get_vbase_types): Simplify.
21152 * class.c (struct base_info): Remove.
21153 (determine_primary_base): Take has_virtual_p rather than a
21154 base_info as input. Don't calculate max_has_virtual.
21155 (finish_struct_bits): Remove max_has_virtual argument.
21156 (create_vtable_ptr): Remove max_has_virtual_p argument.
21157 (layout_virtual_bases): Remove max argument.
21158 (layout_basetypes): Likewise.
21159 (layout_class_type): Remove max_has_virtual_p argument.
21160 (finish_struct_1): Remove max_has_virtual.
21162 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21163 (layout_basetypes): Remove.
21164 * class.c (propagate_binfo_offsets): Moved here from tree.c.
21165 Update to handle primary virtual bases.
21166 (remove_base_fields): New function, split out from
21168 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21169 (layout_virtual_bases): New function, split out from
21170 layout_basetypes. Update to handle primary virtual bases.
21171 (layout_basetypes): Moved here from tree.c. Use
21172 remove_base_fields and layout_virtual_bases.
21173 * search.c (dfs_mark_primary_bases_queue_p): New function.
21174 (mark_primary_bases): Use it.
21175 * tree.c (CEIL): Remove.
21176 (propagate_binfo_offsets): Remove.
21177 (layout_basetypes): Remove.
21179 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21181 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21182 (BINFO_PRIMARY_MARKED_P): New macro.
21183 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21184 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21185 (mark_primary_bases): New function.
21186 (unmark_primary_bases): Likewise.
21187 * search.c (get_abstract_virtuals_1): Remove.
21188 (dfs_mark_primary_bases): New function.
21189 (mark_primary_bases): Likewise.
21190 (dfs_unmark_primary_bases): Likewise.
21191 (unmark_primary_bases): Likewise.
21192 (dfs_get_pure_virtuals): Likewise.
21194 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21196 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21197 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21198 (modify_one_vtable): Adjust.
21199 (fixup_vtable_deltas1): Likewise.
21200 (override_one_vtable): Likewise.
21201 * search.c (get_abstract_virtuals_1): Likewise.
21202 (get_pure_virtuals): Likewise.
21203 (expand_upcast_fixups): Likewise.
21204 * tree.c (debug_binfo): Likewise.
21206 * class.c (build_vtable): Don't return a value. Don't rebuild
21207 vtables for bases that have already been handled.
21208 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21209 already been handled.
21210 (modify_one_vtable): Adjust accordingly.
21211 (fixup_vtable_deltas1): Likewise.
21212 (finish_struct_1): Likewise.
21214 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21216 * call.c (build_new_method_call): Also check destructors.