1 2003-08-04 Roger Sayle <roger@eyesopen.com>
3 * decl.c (cxx_insert_default_attributes): Delete.
4 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
5 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
7 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
10 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
14 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
17 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
20 * cp-tree.def (USING_DECL): Document its type.
21 * class.c (pushclass): If we're entering a template, push any
22 dependent using decls it has.
23 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
25 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
26 (tsubst): Remove USING_DECL checks.
27 (type_dependent_expression_p): Remove USING_DECL case.
28 * semantics.c (finish_member_declaration): A USING_DECL's type
29 indicates whether it is dependent.
31 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
33 * cp-tree.h (pushclass): Remove unneeded parameter.
34 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
35 (push_nested_class): Adjust pushclass call.
36 * pt.c (instantiate_class_template): Likewise.
37 * semantics.c (begin_class_definition): Likewise.
39 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
41 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
43 2003-08-01 Mark Mitchell <mark@codesourcery.com>
46 * decl.c (decls_match): Don't ignore the types of template
50 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
52 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
55 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
57 (check_elaborated_type_specifier): Add allow_template_p
58 parameter. Check tag mismatch and class template.
59 (xref_tag): Add template_header_p parameter. Add assertion
60 that name is an IDENTIFIER_NODE. Remove implicit typename
61 warning. Simplify lookup process if globalize is true.
62 (cxx_init_decl_processing): Adjust call to xref_tag.
63 (xref_tag_from_type): Likewise.
64 * decl2.c (handle_class_head): Likewise.
65 * parser.c (cp_parser_elaborated_type_specifier,
66 cp_parser_class_head): Likewise.
67 * rtti.c (init_rtti_processing, build_dynamic_cast1,
68 tinfo_base_init, emit_support_tinfos): Likewise.
69 * class.c (is_base_of_enclosing_class): Remove.
70 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
71 template template argument.
72 * cp-tree.h (xref_tag): Adjust declaration.
73 (is_base_of_enclosing_class): Remove.
74 * NEWS: Document template template argument change.
76 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
78 * parser.c (cp_parser_init_declarator,
79 cp_paser_member_declaration): Reformat.
80 * pt.c (lookup_template_class, type_unification_real, unify,
81 type_dependent_expression_p): Reformat.
84 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
86 (finish_stmt_expr_expr): Declare.
87 * parser.c (cp_parser_primary_expression): Tell
88 cp_parser_compount_statement that it is a statement expression.
89 (cp_parser_statement, cp_parser_labeled_statement,
90 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
91 in_statement_expr_p parameter.
92 (cp_parser_expression_statement): Likewise. Call
93 finish_stmt_expr_expr for final expression of a statement
95 (cp_parser_for_init_statement,
96 cp_parser_implicitly_scoped_statement,
97 cp_parser_already_scoped_statement, cp_parser_function_definition,
98 cp_parser_try_block, cp_parser_handled): Adjust.
99 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
100 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
101 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
102 * semantics.c (finish_expr_stmt): Do not deal with statement
104 (begin_stmt_expr): Clear last_expr_type.
105 (finish_stmt_expr_expr): New.
106 (finish_stmt_expr): Process the value expression.
108 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
109 compound expr inside the target's initializer.
112 * parser.c (cp_parser_primary_expression): Do not set
113 non-constant-p merely because it is a dependent scope.
116 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
117 * semantics.c (finish_expr_stmt): Do not convert to void in a
120 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
122 * pt.c (coerce_template_parms): Refactor.
123 (fn_type_unification): Increment processing_template_decl when
124 tsubsting an incomplete set of explicit args.
127 * pt.c (instantiate_class_template): Increment
128 processing_template_decl around the tsubst of a template member
130 (tsubst_qualified_id): Assert we do not have a dependent scope.
132 * pt.c (coerce_template_template_parms, lookup_template_class,
133 can_complete_type_without_circularity, instantiate_class_template,
134 tsubst_decl, unify): Reformat.
136 Thu Jul 31 01:07:41 CEST 2003 Jan Hubicka <jh@suse.cz>
138 * decl2.c (maybe_make_one_only): Use mark_referenced.
139 * method.c (use_thunk): Likewsie.
141 Wed Jul 30 19:12:48 CEST 2003 Jan Hubicka <jh@suse.cz>
143 * class.c (build_vtable_entry_ref): Kill.
144 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
145 (build_vfn_ref): Do not call build_vtable_entry_ref.
146 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
147 * cp-tree.h (prepare_assemble_variable): Kill.
148 * cp-decl.c (prepare_assemble_variable): Kill.
150 2003-07-29 Geoffrey Keating <geoffk@apple.com>
152 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
153 of setting valid_pch by hand.
155 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
157 * decl.c (finish_enum): Initialize underlying_type.
159 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
162 * decl.c (add_binding): Add bval local variable.
163 (push_class_level_binding): Likewise. Allow a USING_DECL to be
165 * decl2.c (do_class_using_decl): The type of a using decl is
167 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
168 function call lookup code.
169 * pt.c (tsubst): A USING_DECL will have unknown type.
170 (tsubst_copy_and_build): Allow a using decl.
171 (type_dependent_expression_p): A USING_DECL will make it
173 * semantics.c (finish_member_declaration): Push a dependent using
176 2003-07-28 Mark Mitchell <mark@codesourcery.com>
179 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
180 * semantics.c (finish_id_expression): Call mark_used for all
183 2003-07-28 Mark Mitchell <mark@codesourcery.com>
186 * call.c (standard_conversion): Allow all integral->enumeral
187 conversions, after marking them as bad.
188 * decl.c (finish_enum): Make sure that all enumerators are
189 properly converted to the underlying type.
190 (build_enumerator): Set DECL_CONTEXT for namespace-scope
192 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
195 * Make-lang.in (typeck.o): Depend on convert.h.
198 * call.c: Include convert.h.
199 (convert_arg_to_ellipsis): Use convert_to_real.
200 * class.c: Include convert.h.
201 (build_base_path): Use convert_to_integer.
202 * rtti.c: Include convert.h.
203 (build_headof): Use convert_to_integer.
204 * typeck.c: Include convert.h.
205 (decay_conversion): Use convert_to_integer.
206 (build_unary_op): Use build_nop.
207 (get_delta_difference): Use convert_to_integer.
208 (build_ptrmemfunc): Avoid unncessary conversions.
210 Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz>
212 * decl2.c (mark_member_pointers): Verify that member pointer points to
215 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
217 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
218 (finish_compound_stmt): Remove no scope arg.
219 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
220 end_compound_stmt calls.
221 (expand_static_init, begin_destructor_body, begin_function_body,
222 finish_function_body): Likewise.
223 * decl2.c (start_objects, finish_objects,
224 start_static_storage_duration_function,
225 finish_static_storage_duration_function): Likewise.
226 * init.c (begin_init_stmts, finish_init_stmts,
227 construct_virtual_base, build_vec_init): Likewise.
228 * method.c (do_build_assign_ref, synthesize_method): Likewise.
229 * parser.c (cp_parser_compound_statement,
230 cp_parser_implicitly_scoped_statement,
231 cp_parser_already_scoped_statement): Likewise.
232 * pt.c (tsubst_expr): Likewise.
233 * semantics.c (begin_compound_stmt): No scope arg is a bool.
234 (finish_compound_stmt): Remove no scope arg.
236 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
239 2003-07-27 Mark Mitchell <mark@codesourcery.com>
241 * call.c (standard_conversion): Tweak handling of
242 pointer-to-member types.
243 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
244 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
245 pointer-to-data member types.
247 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
249 * parser.c (cp_parser_type_parameter): Reformat.
250 (cp_parser_parameter_declaration): Deprecate default args where
253 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
257 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
258 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
259 * init.c (begin_init_stmts): Make static. Return is_global
260 value. Always call begin_stmt_expr.
261 (finish_init_stmts): Make static. Add is_global parm. Always
262 building a stmt tree.
263 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
264 (build_vec_init): Likewise. Always building a stmt tree.
265 (expand_default_init): Always building a stmt tree.
266 (get_temp_regvar): Likewise.
267 * semantics.c (begin_global_stmt_expr,
268 finish_global_stmt_expr): Remove.
270 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
272 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
273 (build_x_compound_expr_from_list): Declare.
274 * typeck.c (build_x_compound_expr_from_list): New.
275 (build_x_compound_expr): Adjust.
276 (build_compound_expr): Remove unreachable code. Take two
278 * decl.c (grok_reference_init): Use
279 build_x_compound_expr_from_list.
280 (expand_static_init): Adjust build_compound_expr call.
281 (cxx_maybe_build_cleanup): Likewise.
282 * init.c (perform_member_init): Use
283 build_x_compound_expr_from_list.
284 (build_new_1): Likewise.
285 (build_vec_delete): Adjust build_compound_expr calls.
286 (build_vbase_delete): Likewise.
287 * typeck2.c (store_init_value): Use
288 build_x_compound_expr_from_list.
289 (build_functional_cast): Likewise.
291 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
293 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
294 * decl.c (make_typename_type): Pass it.
295 * pt.c (lookup_template_class): Use it.
296 (resolve_typename_type): Pass it.
297 * semantics.c (finish_template_type): Pass it.
299 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
302 * cp-tree.h (qualified_name_lookup_error): Declare.
303 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
305 (tsubst_expr) <DECL_STMT case>: Likewise.
306 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
307 * semantics.c (qualified_name_lookup_error): New, broken out of ...
308 (finish_id_expression): ... here. Use it.
310 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
312 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
314 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
317 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
318 (tsubst_template_arg): New.
319 (tsubst_template_arg_vector): Rename to ...
320 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
322 (coerce_template_parms): Use tsubst_template_arg for default
324 (tsubst_template_parms): Likewise.
325 (tsubst_aggr_type): Adjust.
326 (tsubst_decl): Likewise.
327 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
328 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
330 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
332 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
333 * error.c: Use the new pretty-printer framework.
335 2003-07-24 Per Bothner <pbothner@apple.com>
337 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
338 which causes errors messages to incorrectly mention included files.
340 2003-07-24 Mark Mitchell <mark@codesourcery.com>
342 * cp-tree.h (convert_to_base_statically): Declare.
343 * call.c (build_special_member_call): Convert INSTANCE to the base
345 * class.c (convert_to_base_statically): New method.
346 * init.c (construct_virtual_base): Use it.
347 * method.c (do_build_assign_ref): Fix typo in comment.
349 2003-07-24 Jason Merrill <jason@redhat.com>
351 * decl.c: Just set truthvalue_* to boolean_*.
353 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
355 * decl.c (reshape_init): Remove unreachable code.
357 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
360 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
362 2003-07-23 Mark Mitchell <mark@codesourcery.com>
365 * cp-tree.h (accessible_base_p): Declare.
366 * call.c (build_over_call): Use it.
367 * search.c (accessible_base_p): New function, split out from ...
368 (lookup_base): ... here.
371 * call.c (build_conditional_expr): Use perform_implicit_conversion
372 and error_operand_p. Robustify.
373 * typeck.c (build_unary_op): Use perform_implicit_conversion.
375 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
378 * parser.c (cp_parser_nested_name_specifier): Reset scope on
380 (cp_parser_elaborated_type_specifier): Likewise.
382 2003-07-22 Mark Mitchell <mark@codesourcery.com>
384 Eliminate use of POINTER_TYPE for pointers-to-members.
385 * call.c (standard_conversion): Rework pointer-to-member handling.
387 (add_builtin_candidate): Likewise.
388 (resolve_scoped_fn_name): Remove.
389 (build_conditional_expr): Rework pointer-to-member handling.
390 (compare_ics): Likewise.
391 * class.c (check_field_decls): Use TYPE_PTR_P.
392 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
394 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
395 (TYPE_PTRMEM_P): Add comment.
396 (TYPE_PTR_P): Simplify.
397 (TYPE_PTROB_P): Correct definition.
398 (TYPE_PTR_TO_MEMBER_P): New macro.
399 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
400 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
401 (resolved_scoped_fn_name): Remove declaration.
402 (build_offset_ref): Change prototype.
403 (resolve_offset_ref): Remove.
404 (comp_target_types): Remove.
405 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
407 (convert_to_reference): Use can_convert.
408 (ocp_convert): Improve error handling. Rework pointer-to-member
410 (perform_qualification_conversions): Rework pointer-to-member
412 * decl.c (build_ptrmem_type): Handle functions too.
413 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
414 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
415 (grokparms): Remove OFFSET_TYPE error message.
416 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
417 * error.c (dump_type_prefix): Likewise.
418 * expr.c (cplus_expand_constant): Use build_nop.
419 * init.c (build_offset_ref): Add address_p parameter. Fold in
420 necessary bits from resolve_offset_ref.
421 (resolve_offset_ref): Remove.
422 * parser.c (cp_parser_postfix_expression): Remove special case
423 code for OFFSET_TYPE.
424 * pt.c (convert_nontype_argument): Rework pointer-to-member
426 (convert_template_argument): Likewise.
428 (invalid_nontype_parm_type_p): Likewise.
429 (dependent_type_p_r): Likewise.
430 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
431 (target_incomplete_p_): Rework pointer-to-member
433 (get_pseudo_ti_init): Likewise.
434 (get_pseudo_ti_desc): Likewise.
435 * semantics.c (finish_qualified_id_expr): Adjust call to
436 build_offset_ref. Remove use of resolve_offset_ref.
437 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
438 * typeck.c (target_type): Use TYPE_PTRMEM_P.
439 (type_unknown_p): Remove obsolete code about the time before
440 non-dependent expressions were handled correctly.
441 (qualify_type_recursive): Remove.
442 (composite_pointer_type_r): New function.
443 (composite_pointer_type): Use it.
444 (merge_types): Remove dead comments.
445 (comp_cv_target_types): Remove.
446 (comp_target_types): Likewise.
447 (comp_target_parms): Likewise.
448 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
449 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
450 (build_binary_op): Do not use of comp_target_types.
451 (pointer_diff): Remove OFFSET_TYPE case.
452 (build_unary_op): Adjust pointer-to-member handling.
453 (unary_complex_lvalue): Likewise.
454 (check_for_casting_away_constness): Add description parameter.
455 (build_static_cast): Pass it.
456 (build_reinterpret_cast): Use check_for_casting_away_constness.
457 (build_const_cast): Adjust pointer-to-member handling.
458 (build_c_cast): Likewise.
459 (convert_for_assignment): Remove OFFSET_TYPE error message.
460 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
461 (comp_ptr_ttypes_reinterpret): Remove.
462 (casts_away_constness_r): Adjust pointer-to-member handling.
463 (casts_away_constness): Liekwise.
464 (strip_all_pointer_quals): Remove.
465 * typeck2.c (digest_init): Adjust pointer-to-member handling.
466 (build_m_component_ref): Likewise.
468 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
470 * lex.c (unqualified_fn_lookup_error): Mention that the error
471 message needs to be kept in synch with the manual.
473 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
476 * decl.c (grokdeclarator): An array member is only a flexible
477 array member if the field itself is the array.
479 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
482 * decl.c (xref_basetypes): Handle error_mark_node.
484 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
486 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
487 * tree.c (lvalue_p_1): Set it.
488 * class.c (check_field): Don't allow non-packed non-POD fields to
490 * call.c (reference_binding): Need a temporary for all bitfield
492 (convert_like_real): Check it is ok to make a temporary here.
494 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
496 * cp-tree.h (hack_identifier): Remove.
497 * method.c (hack_identifier): Remove.
498 * semantics.c (finish_id_expression): Expand hack_identifier
501 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
503 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
504 semantics.c typeck.c: Remove unnecessary casts.
506 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
508 * cp-tree.h (hack_identifier): Remove.
509 * method.c (hack_identifier): Remove.
510 * semantics.c (finish_id_expression): Expand hack_identifier
513 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
515 * cp-tree.h (finish_non_static_data_member): Add object param.
516 * method.c (hack_identifier): Adjust.
517 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
518 again for a FIELD_DECL.
519 * semantics.c (finish_non_static_data_member): Add object
520 parameter. Always save the DECL in the COMPONENT_REF.
521 * call.c (resolve_scoped_fn_name): Adjust.
523 2003-07-17 Zack Weinberg <zack@codesourcery.com>
525 * pt.c (get_bindings): Make definition consistent with
528 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
531 * friend.c (add_friend): Check access for member functions
534 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
537 * typeck.c (build_class_member_access_expr): Improve diagnostic.
539 2003-07-16 Mark Mitchell <mark@codesourcery.com>
542 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
544 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
545 * decl.c (duplicate_decls): Merge
546 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
547 * parser.c (cp_parser_postfix_expression): Adjust call to
548 cp_parser_initializer_list and
549 cp_parser_parenthesized_expression_list.
550 (cp_parser_parenthesized_expression_list): Add non_constant_p.
551 (cp_parser_new_placement): Adjust call to
552 cp_parser_parenthesized_expression_list.
553 (cp_parser_direct_new_declarator): Likewise.
554 (cp_parser_conditional_expression): Remove.
555 (cp_parser_constant_expression): Parse an assignment-expression,
556 not a conditional-expression.
557 (cp_parser_simple_declaration): Resolve expression/declaration
558 ambiguity more quickly.
559 (cp_parser_mem_initializer): Adjust call to
560 cp_parser_parenthesized_expression_list.
561 (cp_parser_init_declarator): Keep track of whether or not the
562 initializer is a constant-expression.
563 (cp_parser_initializer): Add non_constant_p parameter.
564 (cp_parser_initializer_clause): Likewise.
565 (cp_parser_initializer_list): Likewise.
566 (cp_parser_attribute_list): Adjust call to
567 cp_parser_parenthesized_expression_list.
568 (cp_parser_functional_cast): Likewise.
569 * pt.c (tsubst_decl): Copy
570 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
571 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
572 * semantics.c (finish_id_expression): Use
573 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
575 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
577 * lang-options.h: Remove.
579 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
582 * class.c (field_decl_cmp): Remove.
583 (resort_field_decl_cmp): Remove.
584 (resort_sorted_fields): Remove.
585 (add_fields_to_vec): Rename to ...
586 (add_fields_to_record_type): this.
587 (finish_struct_1): Change to be using
588 sorted_fields_type's fields.
589 * cp-tree.h (lang_decl): In lang_decl_u3
590 change sorted_fields to be a pointer to
592 (resort_sorted_fields): Remove prototype.
593 * search.c (lookup_field_1): Change to be using
594 sorted_fields_type's fields.
596 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
599 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
600 is a member of other class.
601 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
602 is a specialization of function template.
604 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
607 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
610 2003-07-15 Mark Mitchell <mark@codesourcery.com>
612 * cp-tree.def (LOOKUP_EXPR): Remove.
613 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
614 (LOOKUP_EXPR_GLOBAL): Remove.
615 (get_bindings): Remove.
616 (is_aggr_type_2): Remove.
617 * call.c (resolved_scoped_fn_name): Remove support for
619 * decl.c (grokfndecl): Likewise.
620 (grokdeclarator): Likewise.
621 * error.c (dump_decl): Likewise.
622 (dump_expr): Likewise.
623 * friend.c (do_friend): Likewise.
624 * init.c (build_offset_ref): Likewise.
625 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
627 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
628 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
630 * pt.c (get_bindings): Give it internal linkage.
631 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
632 (lookup_template_function): Likewise.
633 (for_each_tempalte_parm_r): Likewise.
634 (tsubst_decl): Likewise.
635 (tsubst_qualified_id): Handle template template parameters.
636 (tsubst_copy): Remove support for LOOKUP_EXPR.
637 (tsubst_copy_and_build): Likewise.
638 (most_general_template): Likewise.
639 (value_dependent_expression_p): Likewise.
640 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
642 * semantics.c (perform_koenig_lookup): Do not create
644 (finish_fname): Likewise.
645 (finish_id_expression): Likewise.
646 * tree.c (is_aggr_type_2): Remove.
648 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
651 * typeck.c (check_return_expr): Fix thinko in diagnostic.
653 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
656 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
659 2003-07-14 Mark Mitchell <mark@codesourcery.com>
662 * pt.c (dependent_scope_ref_p): New function.
663 (value_dependent_expression_p): Use it.
664 (type_dependent_expression_p): Likewise.
666 * pt.c (tsubst_friend_function): Use reregister_specialization.
669 * cp-tree.h (lookup_qualified_name): Adjust prototype.
670 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
671 call to is_aggr_type.
672 * parser.c (cp_parser_lookup_name): Adjust call to
673 lookup_qualified_name.
674 * pt.c (tsubst_qualified_id): Likewise.
675 (tsubst_copy_and_build): Likewise.
676 * semantics.c (finish_qualified_id_expr): Deal with erroneous
679 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
682 * call.c (op_error): Properly format REALPART_EXPR and
684 * error.c (dump_expr): Likewise.
686 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
688 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
690 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
693 * call.c (initialize_reference): Improve diagnostic.
695 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
698 * pt.c (more_specialized_class): Add full_args parameter.
699 (most_specialized_class): Adjust calls to more_specialized_class.
700 * cp-tree.h (more_specialized_class): Adjust declaration.
702 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
704 * lex.c (enum tree_node_kind): Delete.
706 2003-07-13 Mark Mitchell <mark@codesourcery.com>
709 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
710 (SET_DECL_SELF_REFERENCE_P): Likewise.
711 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
712 * pt.c (tsubst_decl): Copy it.
713 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
715 * pt.c (reregister_specialization): Fix thinko in previous change.
717 * cp-tree.h (cp_id_kind): New type.
718 (unqualified_name_lookup_error): Change prototype.
719 (unqualified_fn_lookup_error): New function.
720 (do_identifier): Remove.
721 (do_scoped_id): Likewise.
722 (tsubst_copy_and_build): Change prototype.
723 (reregister_specialization): New function.
724 (perform_koenig_lookup): Likewise.
725 (finish_id_expression): Likewise.
726 * call.c (build_method_call): Adjust call to
727 unqualified_name_lookup_error.
728 * decl.c (duplicate_decls): Use reregister_specialization.
729 * lex.c (is_global): Remove.
730 (unqualified_name_lookup_error): Return a value.
731 (do_identifier): Remove.
732 (do_scoped_id): Likewise.
733 (identifier_typedecl_value): Remove.
734 (unqualified_fn_lookup_error): New function.
735 * parser.c (cp_parser_id_kind): Remove.
736 (cp_parser_non_constant_id_expression): Remove.
737 (cp_parser_primary_expression): Use finish_id_expression.
738 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
740 (cp_parser_postfix_expression): Use perform_koenig_lookup.
741 (cp_parser_template_argument): Use cp_id_kind.
742 (cp_parser_fold_non_dependent_expr): Adjust call to
743 tsubst_copy_and_build.
744 * pt.c (unregister_specialization): Rename to ...
745 (reregister_specialization): This.
746 (tsubst_friend_function): Use it.
747 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
748 (tsubst_qualified_id): Likewise.
749 (tsubst_expr): Likewise.
750 (tsubst_copy_and_build): Add function_p parameter. Use
751 finish_id_expression. Introduce RECUR macro.
752 (tsubst_non_call_postfix_expression): New function.
753 (regenerate_decl_from_template): Use reregister_specialization.
754 * semantics.c (perform_koenig_lookup): New function.
755 (finish_id_expression): Likewise.
757 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
759 * pt.c (push_access_scope_real): Remove.
760 (push_access_scope): Move code from push_access_scope_real.
761 (pop_access_scope): Don't check for TEMPLATE_DECL.
762 (instantiate_template): Defer access checking during template
764 (regenerate_decl_from_template): Tidy.
766 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
769 * operators.def: Add definitions for __imag__, __real__.
771 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
774 * parser.c (cp_parser_expression_list): Rename to ...
775 (cp_parser_parenthesized_expression_list): ... here. Add attribute
776 parameter, parse the surounding parentheses.
777 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
778 parameters. Return int.
779 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
780 (cp_parser_postfix_expression): Adjust function call parsing.
781 (cp_parser_new_placement): Adjust.
782 (cp_parser_new_initializer): Likewise.
783 (cp_parser_cast_expression): Likewise.
784 (cp_parser_selection_statement): Likewise.
785 (cp_parser_mem_initializer): Likewise.
786 (cp_parser_asm_definition): Likewise.
787 (cp_parser_init_declarator): Likewise.
788 (cp_parser_declarator): Make
789 cdtor_or_conv_p an int ptr.
790 (cp_parser_direct_declarator): Likewise. Check for a parameter
791 list on cdtors & conv functions.
792 (cp_parser_initializer): Adjust.
793 (cp_parser_member_declaration): Adjust.
794 (cp_parser_attribute_list): Move code into
795 cp_parser_parens_expression_list.
796 (cp_parser_functional_cast): Adjust.
797 * pt.c (type_dependent_expression_p): Erroneous expressions are
800 2003-07-11 Geoffrey Keating <geoffk@apple.com>
802 * decl.c (cp_finish_decl): Handle 'used' attribute.
804 * cp-lang.c (c_reset_state): New dummy routine.
805 * cp-tree.h (finish_file): Move prototype to c-common.h.
806 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
808 2003-07-11 Mark Mitchell <mark@codesourcery.com>
811 * pt.c (tsubst_qualified_id): Implement suggested resolution for
813 (type_dependent_expression_p): Likewise.
815 2003-07-10 Mark Mitchell <mark@codesourcery.com>
817 * typeck.c (build_binary_op): Do not warn about signed
818 vs. unsigned comparisons in the bodies of templates.
821 * parser.c (cp_parser_postfix_expression): Check dependency of
824 2003-07-09 Mark Mitchell <mark@codesourcery.com>
827 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
831 * error.c (decl_to_string): Do not print default argument
834 * cp-tree.h (break_out_calls): Remove declaration.
835 * tree.c (break_out_calls): Remove.
836 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
838 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
841 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
842 * decl2.c (constructor_name_p): Avoid repeated constructor_name
844 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
846 2003-07-09 Mark Mitchell <mark@codesourcery.com>
848 * typeck.c (build_x_unary_op): Take note of the fact that
849 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
852 * parser.c (cp_parser_primary_expression): Preserve the form of
853 qualified expressions in templates, even if they are not
855 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
856 (tsubst_qualified_id): Likewise.
857 * search.c (accessible_p): Treat everything in the body of a
858 template as accessible.
860 2003-07-08 Mark Mitchell <mark@codesourcery.com>
862 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
863 * cp-tree.h (build_call_from_tree): Remove.
864 (build_member_call): Likewise.
865 (dependent_template_arg_p): Remove.
866 (any_dependent_template_arguments_p): New function.
867 (dependent_template_id_p): Likewise.
868 (any_type_dependent_arguments_p): Likewise.
869 (build_non_dependent_expr): Likewise.
870 (build_non_dependent_args): Likewise.
871 (build_x_compound_expr): Adjust prototype.
872 * call.c (build_new_method_call): Handle non-dependent expressions
874 * decl2.c (grok_array_decl): Likewise.
875 (build_offset_ref_call_from_tree): Likewise.
876 (build_call_from_tree): Remove.
877 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
878 (dump_expr): Likewise.
879 * init.c (build_member_call): Remove.
880 * mangle.c (write_expression): Update handling for template-ids.
881 * parser.c (cp_parser_primary_expression): Use
882 any_dependent_template_arguments_p. Update constant-expression
884 (cp_parser_postfix_expression): Use
885 any_type_dependent_arguments_p. Simplify call processing.
886 (cp_parser_unary_expression): Simplify.
887 (cp_parser_expression): Adjust for changes to
888 build_x_compound_expr.
889 (cp_parser_template_argument): Implement standard-conforming
890 parsing of non-type template arguments.
891 (cp_parser_direct_declarator): Use
892 cp_parser_fold_non_dependent_expr.
893 (cp_parser_fold_non_dependent_expr): New function.
894 (cp_parser_next_token_ends_template_argument_p): Likewise.
895 * pt.c (convert_template_argument): Do not call
896 maybe_fold_nontype_arg.
897 (tsubst_baselink): Likewise.
898 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
899 processing work correctly for non-dependent expressions. Adjust
900 handling of COMPOUND_EXPR. Simplify call processing.
901 (value_dependent_expression_p): Deal with functional casts and
902 sizeof/alignof correctly.
903 (type_dependent_expression_p): Handle overloaded functions.
904 (any_type_dependent_arguments_p): New function.
905 (any_dependent_template_arguments_p): Likewise.
906 (dependent_template_p): Treat SCOPE_REFs as dependent.
907 (dependent_template_id_p): Simplify.
908 (build_non_dependent_expr): New function.
909 (build_non_dependent_args): Likewise.
910 * semantics.c (finish_stmt_expr): Don't make dependent
911 statement-expresions have void type.
912 (finish_call_expr): Handle non-dependent expressions
914 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
915 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
916 type size_t, even in templates.
917 (expr_sizeof): Likewise.
918 (finish_class_member_access_expr): Handle non-dependent expressions
920 (build_x_indirect_ref): Likewise.
921 (build_x_binary_op): Likewise.
922 (build_x_unary_op): Likewise.
923 (build_x_conditional_expr): Likewise.
924 (build_x_compound_expr): Likewise.
925 * typeck2.c (build_x_arrow): Likewise.
927 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
929 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
930 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
931 (start_function): Use DECL_ESTIMATED_INSNS.
932 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
934 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
937 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
940 * pt.c (instantiate_class_template): Don't call xref_tag to
941 inject name when the friend class is a specialization.
943 2003-07-07 Mark Mitchell <mark@codesourcery.com>
945 * cp-tree.h (build_scoped_method_call): Remove.
946 (lookup_qualified_name): Remove parameter.
947 (tsubst_copy_and_build): Declare.
948 (finish_qualified_object_call_expr): Remove.
949 (check_accessibility_of_qualified_id): New function.
950 (finish_qualified_id_expr): Likewise.
951 (non_reference): Likewise.
952 (build_expr_from-tree): Remove.
953 * call.c (non_reference): Remove.
954 (build_scoped_method_call): Likewise.
955 (build_method_call): Use error_operand_p. Assert that we are not
956 processing a template.
957 (standard_conversion): Use non_reference.
958 * class.c (build_vtbl_entry_ref): Likewise.
959 (build_vtbl_ref_1): Likewise.
960 * cvt.c (build_expr_type_conversion): Use non_reference.
961 * decl.c (lookup_qualified_name): Remove flags parameter.
962 (grok_op_properties): Use non_reference.
963 * decl2.c (grok_array_decl): Likewise.
964 (build_expr_from_tree): Remove.
965 (build_offset_ref_call_from_tree): Update comment.
966 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
967 * except.c (prepare_eh_types): Use non_reference.
968 (can_convert_eh): Likewise.
969 * init.c (build_dtor_call): Avoid using build_method_call.
970 * mangle.c (write_template_param): Remove misleading comment.
971 * method.c (locate_copy): Use non_reference.
972 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
973 (cp_parser_primary_expression): Do not create SCOPE_REFs is
974 non-dependent contexts.
975 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
976 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
977 build_expr_from_tree.
978 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
979 Use check_accessibility_of_qualified_id.
980 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
981 build_expr_from_tree.
982 (tsubst_baselink): New function.
983 (tsubst_qualified_id): Likewise.
984 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
985 (tsubst_expr): Adjust call to lookup_qualified_name.
986 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
987 handling of CALL_EXPRs.
988 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
989 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
990 * search.c (check_final_overrider): Likewise.
991 * semantics.c (check_accessibility_of_qualified_id): New function.
992 (finish_qualified_object_call_expr): Remove.
993 * typeck.c (target_type): Use non_reference.
994 (cxx_sizeof_or_alignof_type): Likewise.
995 (dubious_conversion_warnings): Likewise.
996 (convert_for_initialization): Likewise.
997 (non_reference): New function.
999 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1001 * decl.c (print_binding_level, print_other_binding_stack,
1002 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1004 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1006 2003-07-07 Andreas Jaeger <aj@suse.de>
1008 * friend.c: Convert to ISO C90 prototypes.
1010 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1012 * cfns.h: Regenerate.
1014 * typeck.c: Convert remaining prototypes to ISO C90.
1015 * search.c: Likewise.
1017 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1018 * semantics.c (expand_or_defer_fn): Likewise
1019 * mangle.c (discriminator_for_string_literal): Likewise.
1020 * g++spec.c (lang_specific_driver): Likewise.
1022 * search.c (lookup_base_r): Remove unused variable.
1024 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1026 * semantics.c: (genrtl_try_block) Adjust emit_line_note
1029 2003-07-07 Andreas Jaeger <aj@suse.de>
1031 * search.c (lookup_base_r): Remove unused variable.
1033 2003-07-06 Michael Chastain <mec@shout.net>
1036 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1037 assigning to input_filename directly.
1039 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
1041 * call.c: Fix comment formatting.
1042 * class.c: Likewise.
1043 * cp-tree.h: Likewise.
1045 * decl2.c: Likewise.
1046 * error.c: Likewise.
1047 * method.c: Likewise.
1048 * name-lookup.c: Likewise.
1049 * parser.c: Likewise.
1052 * search.c: Likewise.
1053 * typeck.c: Likewise.
1055 2003-07-06 Mark Mitchell <mark@codesourcery.com>
1058 * search.c (lookup_base_r): Remove is_non_public and
1059 within_current_scope parameters. Remove other dead code.
1060 (lookup_base): Adjust call to lookup_base_r.
1061 (adjust_result_of_qualified_name_lookup): Improve comment.
1062 * semantics.c (finish_call_expr): Use maybe_dummy_object.
1064 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1066 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1067 LANG_HOOKS_MISSING_ARGUMENT): Override.
1069 2003-07-05 Mark Mitchell <mark@codesourcery.com>
1072 * typeck.c (build_static_cast): Check for reference conversions
1075 2003-07-04 Mark Mitchell <mark@codesourcery.com>
1077 * cp-tree.h (perform_integral_promotions): Declare.
1078 * call.c (build_addr_func): Use decay_conversion.
1079 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
1080 (convert_for_arg_passing): Use perform_integral_promotions.
1081 * cvt.c (build_expr_type_conversion): Use decay_conversion.
1082 (type_promotes_to): Do not return a cv-qualified type.
1083 * decl.c (grok_reference_init): Fix formatting.
1084 (get_atexit_node): Use decay_conversion.
1085 (build_enumerator): Use perform_integral_promotions.
1086 * init.c (build_vec_init): Use decay_conversion.
1087 * semantics.c (finish_expr_stmt): Likewise.
1088 (finish_switch_cond): Use perform_integral_promotions.
1089 * typeck.c (default_conversion): Likewise.
1090 (perform_integral_promotions): New function.
1091 (build_indirect_ref): Use decay_conversion.
1092 (build_array_ref): Use perform_integral_promotions.
1093 (convert_arguments): Use decay_conversion.
1094 (build_unary_op): Use perform_integral_promotions.
1095 (build_c_cast): Use decay_conversion.
1096 (build_modify_expr): Likewise.
1097 (convert_for_initialization): Likewise.
1098 * typeck2.c (build_x_arrow): Likewise.
1100 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
1102 * call.c: Fix comment typos.
1103 * class.c: Likewise.
1104 * cp-tree.h: Likewise.
1106 * decl2.c: Likewise.
1109 * mangle.c: Likewise.
1110 * parser.c: Likewise.
1112 * search.c: Likewise.
1113 * semantics.c: Likewise.
1115 * typeck.c: Likewise.
1117 2003-07-04 Zack Weinberg <zack@codesourcery.com>
1119 * parser.c (cp_lexer_read_token): No need to handle string
1120 constant concatenation.
1122 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1124 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1125 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1126 ATTRIBUTE_GCC_CXXDIAG.
1128 2003-07-03 Mark Mitchell <mark@codesourcery.com>
1130 * call.c (build_addr_func): Handle bound pointers-to-members.
1131 (build_method_call): Do not call resolve_offset_ref.
1132 (implicit_conversion): Likewise.
1133 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1135 (resolve_args): Do not call resolve_offset_ref.
1136 (build_conditional_expr): Likewise.
1137 (build_new_method_call): Likewise.
1138 * cp-tree.def (OFFSET_REF): Update documentation.
1139 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1140 pointers to members to pointers.
1141 (ocp_convert): Do not call resolve_offset_ref.
1142 (convert_to_void): Likewise.
1143 (build_expr_type_conversion): Likewise.
1144 * decl2.c (delete_sanity): Likewise.
1145 * init.c (resolve_offset_ref): Simplify greatly.
1146 (build_vec_delete): Do not call resolve_offset_ref.
1147 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1149 (cp_parser_unary_expression): Use
1150 cp_parser_simple_cast_expression.
1151 (cp_parser_delete_expression): Likewise.
1152 (cp_parser_cast_expression): Likewise.
1153 (cp_parser_pm_expression): Use cp_parser_binary_op.
1154 (cp_parser_simple_cast_expression): New function.
1155 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1156 * semantics.c (finish_increment_expr): Likewise.
1157 (finish_typeof): Likewise.
1158 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1159 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1160 (decay_conversion): Do not call resolve_offset_ref.
1161 (finish_class_member_access_expr): Likewise.
1162 (convert_arguments): Likewise.
1163 (build_x_binary_op): Handle DOTSTAR_EXPR.
1164 (condition_conversion): Do not call resolve_offset_ref.
1165 (unary_complex_lvalue): Likewise.
1166 (build_static_cast): Likewise.
1167 (build_reinterpret_cast): Likewise.
1168 (build_const_cast): Likewise.
1169 (build_c_cast): Likewise.
1170 (build_modify_expr): Likewise.
1171 (convert_for_assignment): Likewise.
1172 (convert_for_initialization): Likewise.
1173 * typeck2.c (build_x_arrow): Likewise.
1174 (build_m_component_ref): Simplify.
1176 * call.c (build_scoped_method_call): Use convert_to_void.
1177 (build_method_call): Likewise.
1178 * class.c (check_field_decls): Remove dead code.
1179 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1180 * decl2.c (grok_array_decl): Remove dead code.
1181 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1182 as pointer-to-member representation.
1183 * init.c (build_offset_ref): Tidy.
1184 (build_vec_delete_1): Use convert_to_void.
1185 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1186 as pointer-to-member representation.
1188 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
1191 * decl.c (grokdeclarator): Return friend decls, not
1193 * decl2.c (grokfield): Alter friend decl check.
1194 * parser.c (struct cp_parser): Document default_arg chain on
1195 unparsed_functions_queue.
1196 (cp_parser_save_default_args): New.
1197 (cp_parser_init_declarator, cp_parser_function_definition,
1198 cp_parser_member_declaration): Call it.
1199 (cp_parser_class_specifier): Remove unused variable. Alter
1200 processing of unparsed_functions_queue.
1202 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1204 * class.c (add_method, check_field_decl): Fix format specifier.
1205 * decl.c (duplicate_decls, pushdecl, check_goto,
1206 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1207 start_enum): Likewise.
1208 * decl2.c (ambiguous_decl): Likewise.
1209 * pt.c (redeclare_class_template): Likewise.
1211 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
1214 * pt.c (type_unification_real): Don't unify exprs of error type.
1215 * tree.c (error_type): Don't die on error_type.
1218 * decl2.c (arg_assoc_class): Don't die on NULL type.
1219 * typeck.c (type_unknown_p): Don't die on untyped expressions.
1221 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1224 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1227 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1229 * error.c (locate_error): %P takes an `int', not a `tree'.
1231 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1233 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1234 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1235 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1238 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1239 (expand_or_defer_fn): Declare.
1240 (lower_function): Declare.
1241 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1242 * decl2.c: Include cgraph.h and varpool.h
1243 (maybe_emit_vtables): Make explicit instantations as needed.
1244 (mark_member_pointers, lower_function): New functions.
1245 (finish_file): Do unit-at-a-time.
1246 * method.c (synthesize_method): Use expand_or_defer_fn.
1247 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1248 * parser.c (cp_parser_function_definition_after_decl): Use
1250 * pt.c (instantiate_decl): Likewise.
1251 * semantics.c: Include cgraph.h
1252 (expand_or_defer_fn): Break out from ...
1253 (expand_body): ... here; deal with unit-at-a-time.
1254 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1255 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1257 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1259 * call.c (resolve_scoped_fn_name): Return error_mark_node for
1262 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1265 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1268 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
1271 * error.c (dump_decl): Handle BIT_NOT_EXPR as
1272 pseudo destructor calls.
1274 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1276 * cp-tree.h (define_label): Replace filename and lineno
1277 arguments with a location_t.
1278 * decl.c (pop_label): Adjust define_label call.
1279 (define_label): Replace filename and lineno arguments with a
1281 * semantics.c (finish_label): Adjust define_label call.
1283 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1286 * decl2.c (grokfield): Do not build NOP_EXPRs around the
1289 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
1291 * Make-lang.in: Update.
1292 * cp-lang.c (c_language): Define.
1293 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1294 * cp-tree.h (cxx_init_options): Remove.
1295 * lex.c: Don't include diagnostic.h.
1296 (cxx_init_options): Remove.
1298 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1301 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1302 tree generated within a template. Use dump_expr to dump an
1305 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1307 * mangle.c (write_expression): Exit gracefully when trying to
1310 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1313 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1314 (value- or type-) dependent expression as DECL_INITIAL is a
1315 valid constant-expression (at parser time).
1317 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1320 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1321 USING_DECL, instead of print_tree_identifier.
1323 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1325 * cp-tree.h (language_to_string): Adjust declaration.
1326 * dump.c (cp_dump_tree): Adjust usage.
1327 * error.c (dump_char): Use output_formatted_scalar. Tidy.
1328 (parm_to_string): Lose unused parameter. Tidy.
1329 (expr_to_string): Likewise.
1330 (code_to_string): Likewise.
1331 (language_to_string): Likewise.
1332 (op_to_string): Likewise.
1333 (assop_to_string): Likewise.
1334 (digit_buffer): Remove.
1335 (dump_type): Format builtin vector type as __vector__.
1337 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1339 * error.c (print_integer): Remove.
1340 (dump_type_suffix): Adjust.
1341 (dump_expr): Likewise.
1343 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1345 * error.c (print_instantiation_partial_context): Take a
1347 (print_instantiation_full_context): Adjust.
1348 (print_instantiation_context): Adjust.
1350 * cp-tree.h (cp_line_of, cp_file_of): Remove.
1351 * error.c (cp_line_of, cp_file_of): Merge into ...
1352 (location_of): ... here. Make static, return a location_t.
1353 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1355 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1358 * call.c (joust): Move warn_conversion check outwards.
1360 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1362 * decl.c (build_typename_type)
1363 * mangle.c (write_template_template_arg)
1364 * parser.c (cp_parser_scope_through_which_access_occurs)
1365 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1366 * repo.c (get_base_filename)
1367 * semantics.c (maybe_convert_cond):
1368 Mark the definition static, matching the forward declaration.
1370 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1373 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1375 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1378 * decl.c (finish_enum): Implement DR377.
1380 * decl.c (cp_finish_decl): Don't make variables with reference
1381 type readonly while they are being initialized.
1383 2003-06-26 Mark Mitchell <mark@codesourcery.com>
1386 * typeck.c (build_static_cast): Avoid returning expressions with
1389 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
1391 * call.c (build_op_delete_call): Use strip_array_call. Correct
1392 error message to say 'delete' or 'delete[]'.
1394 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
1397 * pt.c (check_explicit_specialization): When looking up a
1398 template function from an identifier outside class-scope, bind
1399 it to CP_DECL_CONTEXT.
1401 2003-06-25 Mark Mitchell <mark@codesourcery.com>
1404 * search.c (lookup_base_r): Rely on accessible_p, rather than
1405 trying to emulate that logic here.
1408 * call.c (convert_like): Pass issue_conversion_warnings.
1409 (convert_like_with_context): Likewise.
1410 (convert_like_real): Add issue_conversion_warnings parameter.
1411 (perform_direct_initialization_if_possible): New function.
1412 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
1413 * typeck.c (check_for_casting_away_constness): New function.
1414 (build_static_cast): Rewrite.
1416 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
1418 * call.c (enforce_access): Assert we get a binfo.
1419 (build_op_delete_call): Pass a binfo to
1420 perform_or_defer_access_check.
1421 * class.c (alter_access): Likewise.
1422 * decl.c (make_typename_type): Likewise.
1423 (make_unbound_class_template): Likewise.
1424 * lex.c (do_identifier): Likewise.
1425 * method.c (hack_identifier): Likewise.
1426 * parser.c (cp_parser_lookup_name): Likewise.
1427 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
1429 * semantics.c (finish_non_static_data_member): Likewise.
1430 (perform_or_defer_access_check): Expect a binfo.
1431 * typeck.c (comptypes): Expect types.
1433 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
1434 * friend.c (make_friend_class): Likewise.
1435 * pt.c (check_default_tmpl_args): Likewise.
1436 (lookup_template_class): Likewise.
1438 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
1440 * method.c (thunk_labelno): Move outside ifdef block to make garbage
1443 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
1445 * class.c (build_vtable): Make vtables.
1446 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
1447 * decl2.c (output_vtable_inherit): Rename to ...
1448 (prepare_assemble_variable): ... this one; change interface.
1449 (maybe_emit_vtables): Do not call output_vtable_inherit.
1450 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
1451 * cp-tree.h (prepare_assemble_variable): New.
1453 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
1455 * method.c: add prototype for make_alias_for_thunk.
1456 (thunk_labelno, make_alias_for_thunk): only define
1457 if ASM_OUTPUT_DEF is defined.
1459 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1461 * method.c (thunk_labelno): New variable.
1462 (make_alias_for_thunk): New function.
1463 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
1464 into the same section as the function it is calling.
1465 Include gt-cp-method.h.
1466 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
1467 (cp/method.o): Depend on gt-cp-method.h.
1468 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
1470 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
1472 * decl.c (register_dtor_fn): Mark cleanup as used.
1473 * decl2.c (mark_vtable_entries): Skip nops.
1474 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
1475 (build_dynamic_cast_1): Likewise.
1476 (tinfo_base_init): Likewise.
1477 (emit_tinfo_decl): Likewise.
1479 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1481 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
1484 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1487 * call.c (joust): Warn about choosing conversion sequence only if
1490 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1493 * call.c (op_error): Tidy.
1494 * error.c (dump_expr): Properly format 'T()' when T is an
1497 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1500 * decl.c (grok_op_properties): Warn possible confusing conversion
1501 only if -Wconversion.
1503 2003-06-20 Mark Mitchell <mark@codesourcery.com>
1506 * parser.c (cp_parser_class_head): See through dependent names
1507 when parsing a class-head.
1510 * pt.c (try_class_unification): Correct handling of member class
1513 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
1515 * semantics.c (genrtl_finish_function): Adjust
1516 expand_function_end call.
1518 2003-06-19 Mark Mitchell <mark@codesourcery.com>
1521 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
1523 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
1526 * cp-tree.h (pushdecl_class_level): Change prototype.
1527 (push_class_level_binding): Likewise.
1528 * decl.c (add_binding): Reject duplicate static data members.
1529 (pushdecl_class_level): Return a value indicating whether or not
1530 the binding was valid.
1531 (push_class_level_binding): Likewise.
1532 * semantics.c (finish_member_declaration): Don't keep invalid
1536 * call.c (initialize_reference): Do not use cp_finish_decl to emit
1537 temporary variables.
1538 * cp-tree.h (static_aggregates): Declare.
1539 (pushdecl_top_level_and_finish): Likewise.
1540 * decl.c (pushdecl_top_level_1): New function.
1541 (pushdecl_top_level): Use it.
1542 (pushdecl_top_level_and_finish): New function.
1543 (initialize_local_var): Remove redundant code.
1544 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
1546 * decl.h (static_aggregates): Remove.
1547 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
1548 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
1549 (tinfo_base_init): Likewise.
1551 2003-06-19 Matt Austern <austern@apple.com>
1554 * init.c (build_zero_init): Assert that number of array elements
1555 is an integer constant.
1556 (build_default_init) Don't use build_zero_init for arrays with
1557 variable number of elements.
1559 2003-06-19 Andreas Jaeger <aj@suse.de>
1561 * cp-tree.h: Remove duplicated declarations.
1563 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
1565 * pt.c: Convert to ISO C.
1566 * semantics.c: Convert to ISO C.
1568 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1570 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
1571 at_least_as_qualified_p, more_qualified_p): Return bool.
1572 * typeck.c: ANSIFY function definitions.
1573 (comp_array_types): Take redeclaration bool parameter.
1574 (comptypes): Rearrange STRICT handling.
1575 (at_least_as_qualified_p, more_qualified_p,
1576 comp_cv_qualification): Cache cv quals.
1577 (compparms): Rearrange loop.
1579 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1581 * cp-tree.h (COMPARE_RELAXED): Rename to ...
1582 (COMPARE_DERIVED): ... here. Adjust comment.
1583 (resolve_typename_type_in_current_instantiation): Remove.
1584 (cp_tree_equal, comptypes): Return a bool.
1585 * cvt.c (convert_to_reference): Adjust comptypes call.
1586 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
1587 (resolve_typename_type_in_current_instantiation): Remove.
1588 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
1589 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
1590 calls. Refactor code.
1591 * typeck.c (comp_array_types): Return bool. Lose callback.
1592 parameter. Adjust cp_tree_equal calls.
1593 (comptypes): Return bool. Adjust strict handling. Remove relaxed
1594 enumeration and java type handling. Deal with typename types here.
1595 Adjust recursive and cp_tree_equals calls. Adjust base and derived
1597 (comp_target_types): Remove unreachable code. Adjust
1598 same_or_base_type_p calls.
1599 (ptr_reasonably_similar): Adjust base and derived check.
1601 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
1603 (check_return_expr): Adjust error messages.
1604 * cp-tree.def (SCOPE_REF): Correct comment.
1606 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1608 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1611 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
1613 * optimize.c (dump_function): Form complete flag name by
1614 prefixing 'fdump-' to string returned by dump_flag_name().
1616 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1618 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1621 2003-06-17 Jason Merrill <jason@redhat.com>
1624 * decl.c (grokfndecl): Don't mark a function inline for
1625 -finline-functions if it isn't defined.
1627 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1630 * class.c (handle_using_decl): Robustify.
1633 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1634 * mangle.c (struct globals): Remove internal_mangling_p.
1635 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1636 (write_template_parm): Don't write out the level number.
1637 (conv_type_names): New variable.
1638 (hash_type): New function.
1639 (compare_type): Likewise.
1640 (mangle_conv_op_name_for_type): Don't try to mangle conversion
1642 * search.c (lookup_conversion_operator): New function.
1643 (lookup_fnfields_1): Use it.
1645 2003-06-17 Andreas Jaeger <aj@suse.de>
1647 * except.c: Remove duplicate declaration of push_eh_cleanup.
1649 * call.c: Remove extra declaration of inhibit_warnings.
1651 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1653 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
1654 * mangle.c: Convert to ISO C.
1656 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1658 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1661 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1663 * tree.c: Convert to ISO C.
1665 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
1667 * cp-tree.h: Follow spelling conventions.
1668 * mangle.c: Likewise.
1669 * method.c: Likewise.
1670 * parser.c: Likewise.
1672 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
1674 * decl.c (start_function): Adjust init_function_start call.
1675 * method.c (use_thunk): Likewise.
1676 * semantics.c (genrtl_start_function): Likewise.
1678 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
1680 * Make-lang.in: Remove c-options.o.
1682 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
1684 * lex.c: Convert to ISO C.
1686 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
1687 * init.c: removes use of PARAMS macro. Use ISO style function
1688 declarations. (Not copyright-significant change.)
1690 * rtti.c: Remove PARAMS.
1692 * typeck2.c: Convert to ISO C.
1694 2003-06-12 Mark Mitchell <mark@codesourcery.com>
1697 * typeck.c (build_c_cast): Check that the destination type is
1700 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1703 * cp-tree.h (finish_declarator): Remove.
1704 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1705 erroneous declarations.
1706 * semantics.c (finish_declarator): Remove.
1708 2003-06-11 Roger Sayle <roger@eyesopen.com>
1710 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1711 global static constructor/destructor if it will be empty, i.e.
1712 either doesn't call any ctors/dtors or only calls pure or const
1715 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1717 * mangle.c (tm_p.h): Include it.
1718 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1721 * tree.c (cp_cannot_inline_fn): Check for "inline" before
1724 2003-06-10 Jason Merrill <jason@redhat.com>
1727 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1729 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
1731 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1732 (start_cleanup_cnt): New.
1734 2003-06-10 Mark Mitchell <mark@codesourcery.com>
1737 * cp-tree.h (template_for_substitution): Declare.
1738 * decl2.c (mark_used): Use it when figuring out whether or not a
1740 * pt.c (template_for_substitution): Give it external linkage.
1741 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1744 2003-06-09 Zack Weinberg <zack@codesourcery.com>
1747 * mangle.c (write_real_cst): New function. Implement
1748 ABI-compliant mangling of floating-point literals when
1749 -fabi-version>=2; provide backward compatibility with 3.3 when
1750 -fabi-version=1 (with warning). Clarify commentary.
1751 (write_template_arg_literal): Use write_real_cst.
1753 2003-06-07 Andreas Jaeger <aj@suse.de>
1755 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1757 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
1759 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1760 (LANG_HOOKS_HANDLE_OPTION): Override.
1761 * cp-tree.h (cxx_init_options): Update.
1762 * lex.c (cxx_init_options): Update.
1764 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
1766 * Make-lang.in: Add support for stageprofile and stagefeedback
1768 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
1770 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1772 2003-06-04 Andreas Jaeger <aj@suse.de>
1774 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1776 2003-06-03 Jason Merrill <jason@redhat.com>
1778 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1780 * cp/decl.c (reshape_init): Handle vectors.
1782 * testsuite/g++.dg/init/array10.C: New.
1784 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1787 * pt.c (check_explicit_specialization): Check for 'static'
1790 2003-05-31 Diego Novillo <dnovillo@redhat.com>
1792 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
1793 the operand of a CONSTRUCTOR node.
1795 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1797 * decl.c (cp_binding_level::this_entity): Rename from this_class.
1798 (cxx_scope_descriptor): New function.
1799 (cxx_scope_debug): Likewise.
1800 (push_binding_level): Use it.
1801 (pop_binding_level): Likewise.
1802 (suspend_binding_level): Likewise.
1803 (resume_binding_level): Likewise.
1804 (pushlevel_class): Adjust use of this_class.
1805 (pushtag): Likewise.
1806 (lookup_name_real): Likewise.
1807 (global_scope_name): New variable.
1808 (initialize_predefined_identifiers): Initialize it.
1809 (push_namespace): Use it.
1810 (make_cxx_scope): New function.
1811 (pushlevel): Use it.
1812 (pushlevel_class): Likewise.
1813 (push_binding_level): Simplify. Loose the last two arguments.
1814 (make_binding_level): Remove.
1815 (initial_push__namespace_scope): New function.
1816 (push_namespace): Use it. Simplify.
1817 (cxx_init_decl_processing): Likewise.
1818 (declare_namespace_level): Remove.
1820 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1823 * pt.c (instantiate_decl): Don't use full template arguments if
1824 we are dealing with specializations.
1826 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1828 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
1829 (binding_depth): Unconditionally define.
1830 (is_class_level): Likewise.
1831 (indent): Likewise. Take an indenting parameter.
1832 (push_binding_level): Remove conditional definittion.
1833 (pop_binding_level): Likewise.
1834 (suspend_binding_level): Likewise.
1835 (resume_binding_level): Likewise.
1836 (pushlevel): Likewise.
1837 (pushlevel_class): Likewise.
1838 (poplevel_class): Likewise.
1839 (pop_everything): Likewise.
1841 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1843 * name-lookup.h (global_scope_p): New macro.
1844 * decl.c (pop_binding_level): Use it. Don't refer directly to
1845 global_binding_level.
1846 (suspend_binding_level): Likewise.
1847 (global_bindings_p): Likewise.
1848 (print_other_binding_stack): Likewise.
1849 (print_binding_stack): Likewise.
1850 (maybe_push_to_top_level): Likewise.
1851 (pushdecl_namespace_level): Likewise.
1852 (cxx_init_decl_processing): Likewise.
1853 (start_decl): Likewise.
1854 (cp_finish_decl): Likewise.
1855 (start_function): Likewise.
1856 (global_binding_level): Remove.
1858 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1860 * parser.c (cp_parser_explicit_instantiation): Restore old
1861 access before template instantiation.
1863 2003-05-23 Geoffrey Keating <geoffk@apple.com>
1865 * lang-specs.h: Use -o to specify preprocessor's output file.
1866 Make -no-integrated-cpp work when building PCH files.
1868 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1871 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1872 check for implicitly created typedef to an enum.
1874 2003-05-21 Jason Merrill <jason@redhat.com>
1876 * init.c (build_vec_delete): Copy the address into a temporary
1877 variable before calling build_vec_delete_1.
1878 * decl2.c (delete_sanity): Don't call stabilize_reference.
1880 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
1882 * pt.c (register_specialization): Update the decl's location,
1884 (check_explicit_specialization): Likewise.
1886 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1888 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1890 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
1893 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1894 if the old decl had instantiated DECL_RTL.
1895 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1897 2003-05-19 Matt Austern <austern@apple.com>
1899 * lang-options.h: Document -Wno-invalid-offsetof
1900 * typeck.c (build_class_member_access_expr): Don't complain about
1901 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
1903 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1905 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1906 (binding_entry_make): Make entry->chain NULL after getting an entry.
1907 fix the spelling of chain in a comment.
1908 (binding_table_free): speed up by having temporary variable.
1909 (binding_table_new): set table->chain to be NULL after allocating
1911 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1912 binding->previous to NULL after getting an binding for speed.
1914 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1916 * cp-tree.h (struct lang_type_class): Replace data member tags
1917 with hash-table nested_udts.
1918 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1919 * class.c (unreverse_member_declarations): Don't touch
1921 (pushclass): Use cxx_remember_type_decls.
1922 * decl.c (struct cp_binding_level): Replace data member tags with
1923 hash-table type_decls.
1924 (pop_binding_level): Handle level->type_decls.
1925 (kept_level_p): Adjust.
1926 (poplevel): Remove unused local variable.
1927 (bt_print_entry): New function.
1928 (print_binding_level): Use it.
1929 (push_namespace): Build current_binding_level->type_decls.
1930 (maybe_process_template_type_declaration): Adjust.
1931 (pushtag): Likewise.
1932 (clear_anon_tags): Use binding_table_remove_anonymous_types.
1934 (cxx_remember_type_decls): Rename from storetags. Adjust.
1935 (lookup_tag): Use binding_table_find_anon_type. Tidy.
1936 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
1937 (cxx_init_decl_processing): Build global_binding_level->type_decls.
1938 (store_parm_decls): Remove pointless code.
1939 * name-lookup.c (free_binding_entry): New variable.
1940 (ENTRY_INDEX): New macro.
1941 (struct binding_table_s): New datatype.
1942 (binding_entry_make): New function.
1943 (binding_entry_free): Likewise.
1944 (binding_table_construct): Likewise.
1945 (binding_table_free): Likewise.
1946 (binding_table_new): Likewise.
1947 (binding_table_expand): Likewise.
1948 (binding_table_insert): Likewise.
1949 (binding_table_find): Likewise.
1950 (binding_table_find_anon_type): Likewise.
1951 (binding_table_reverse_maybe_remap): Likewise.
1952 (binding_table_remove_anonymous_types): Likewise.
1953 (binding_table_foreach): Likewise.
1954 * name-lookup.h (binding_table): New type.
1955 (binding_entry): Likewise.
1956 (bt_foreach_proc): Likewise.
1957 (struct binding_entry_s): New datatype.
1958 (SCOPE_DEFAULT_HT_SIZE): New macro.
1959 (CLASS_SCOPE_HT_SIZE): Likewise.
1960 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1961 (NAMESPACE_STD_HT_SIZE): Likewise.
1962 (GLOBAL_SCOPE_HT_SIZE): Likewise.
1963 (binding_table_new): Declare.
1964 (binding_table_free): Likewise.
1965 (binding_table_insert): Likewise.
1966 (binding_table_find_anon_type): Likewise.
1967 (binding_table_reverse_maybe_remap): Likewise.
1968 (binding_table_remove_anonymous_types): Likewise.
1969 (binding_table_foreach): Likewise.
1970 (binding_table_find): Likewise.
1971 (cxx_remember_type_decls): Likewise.
1972 * pt.c (bt_instantiate_type_proc): New function.
1973 (do_type_instantiation): Use it.
1974 * search.c (lookup_field_r): Use binding_table_find.
1976 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1978 * semantics.c (perform_deferred_access_checks): Don't discard
1981 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1983 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1984 libiberty VA_ macros, always use stdarg.
1985 * rtti.c (create_pseudo_type_info): Likewise.
1986 * tree.c (build_min_nt, build_min): Likewise.
1988 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1990 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1991 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1992 collapse multiple function calls into one.
1993 * tree.c (debug_binfo): Likewise.
1995 2003-05-15 Jason Merrill <jason@redhat.com>
1998 * call.c (conditional_conversion): Don't consider implicit
1999 conversions if T2 is a base of T1.
2000 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2001 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2003 * parser.c (cp_parser_primary_expression): Convert a static data
2004 member from reference.
2006 2003-05-15 Mark Mitchell <mark@codesourcery.com>
2008 * call.c (build_op_delete_call): Avoid creating unnecessary types.
2009 * class.c (instantiate_type): Remove tests for tf_no_attributes.
2010 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2011 (COMPARE_NO_ATTRIBUTES): Remove.
2012 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2015 * semantics.c (finish_typeof): Refine type-dependency check.
2017 2003-05-13 Jason Merrill <jason@redhat.com>
2019 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2020 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2022 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2024 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2026 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2028 PR c++/10230, c++/10481
2029 * semantics.c (finish_non_static_data_member): Handle when the
2030 non-static member is not from a base of the current class type.
2032 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2035 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2036 template and has dependent context.
2038 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2040 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2042 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2045 * cp-tree.h (saved_scope): Remove check_access field.
2046 (tsubst_flags_t): Remove tf_parsing.
2047 * decl.c (maybe_push_to_top_level): Don't initialize
2048 scope_chain->check_access.
2049 (make_typename_type, make_unbound_class_template): Don't use
2051 (register_dtor_fn): Use push/pop_deferring_access_checks
2052 instead of scope_chain->check_access.
2053 * method.c (use_thunk): Likewise.
2054 * parser.c (cp_parser_explicit_instantiation
2055 (cp_parser_constructor_declarator_p): Don't call
2056 push/pop_deferring_access_checks here.
2057 (cp_parser_template_argument, cp_parser_class_name): Don't use
2059 (yyparse): Check flag_access_control.
2060 * pt.c (instantiate_class_template): Call
2061 push/pop_deferring_access_checks.
2062 * semantics.c (push_deferring_access_checks): Propagate
2064 (perform_or_defer_access_check): Make sure basetype_path is
2065 a type before comparison.
2066 * call.c (build_op_delete_call, build_over_call): Use
2067 perform_or_defer_access_check.
2068 * class.c (alter_access): Likewise.
2069 * init.c (build_offset_ref): Likewise.
2070 * lex.c (do_identifier): Likewise.
2071 * method.c (hack_identifier): Likewise.
2072 * search.c (lookup_member): Likewise.
2073 * semantics.c (finish_non_static_data_member): Likewise.
2074 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2075 instead of flag_access_control.
2077 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2080 * parser.c (cp_parser_class_name): Remove check_access parameter.
2081 All caller adjusted. Update declaration.
2082 (cp_parser_lookup_name): Likewise.
2083 * semantics.c (push_deferring_access_checks): Change parameter type
2084 to enum deferring_kind. All caller adjusted.
2085 (resume_deferring_access_checks): Adjust to use new enum.
2086 (stop_deferring_access_checks): Likewise.
2087 (perform_or_defer_access_check): Likewise.
2088 * cp-tree.h (deferring_kind): New enum.
2089 (deferred_access): Adjust field type.
2090 (push_deferring_access_checks): Update declaration.
2092 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2094 PR c++/10555, c++/10576
2095 * pt.c (lookup_template_class): Handle class template with
2096 multiple levels of parameters when one of the levels contain
2099 2003-05-08 Jason Merrill <jason@redhat.com>
2101 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2102 expression. Undo some of the recent reorg.
2104 2003-05-07 Richard Henderson <rth@redhat.com>
2107 * cfns.gperf: Comment out POSIX thread cancellation points,
2108 plus abort and raise.
2109 * cfns.h: Regenerate.
2111 2003-05-07 Jason Merrill <jason@redhat.com>
2113 * call.c (build_conditional_expr): Don't assume that the folded
2114 expression has result_type.
2116 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2118 * typeck.c (build_unary_op): Deal with const qualifier in
2119 invalid pointer-to-member earlier.
2121 2003-05-05 Jason Merrill <jason@redhat.com>
2124 * call.c (conditional_conversion): Build an RVALUE_CONV if
2125 we're just changing the cv-quals.
2126 (build_conditional_expr): Don't call convert to change
2129 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2132 * typeck.c (build_unary_op): Don't output const qualifier when
2133 output invalid pointer-to-member diagnostics.
2135 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2137 * decl.c: Fix typos.
2139 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2142 * decl.c (start_function): Use same_type_p to check return type
2145 2003-05-03 Zack Weinberg <zack@codesourcery.com>
2148 * cp/typeck.c (build_x_compound_expr): No need to check
2149 extra_warnings as well as warn_unused_value.
2151 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2153 PR c++/9364, c++/10553, c++/10586
2154 * decl.c (make_typename_type): Don't crash on illegal code.
2156 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
2158 * class.c (finish_struct): Use location_t and input_location
2160 * decl.c (make_label_decl): Likewise.
2161 (use_label): Likewise.
2162 * decl2.c (warn_if_unknown_interface): Likewise.
2163 (start_static_initialization_or_destruction): Likewise.
2164 (generate_ctor_or_dtor_function): Likewise.
2165 (finish_file): Likewise.
2166 * error.c (print_instantiation_full_context): Likewise.
2167 * init.c (create_temporary_var): Likewise.
2168 * method.c (synthesize_method): Likewise.
2169 * parser.c (cp_token): Likewise.
2170 (cp_lexer_set_source_position_from_token): Likewise.
2171 (cp_lexer_get_preprocessor_token): Likewise.
2172 (cp_parser_statement): Likewise.
2173 * pt.c (tsubst_friend_function): Likewise.
2174 (instantiate_class_template): Likewise.
2175 (tsubst_decl): Likewise.
2177 (instantiate_decl): Likewise.
2178 * semantics.c (begin_class_definition): Likewise.
2179 (expand_body): Likewise.
2181 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
2183 * class.c (finish_struct): Rename lineno to input_line.
2184 * decl.c (push_binding_level, pop_binding_level,
2185 suspend_binding_level, resume_binding_level, make_label_decl,
2186 use_label, start_function): Likewise.
2187 * decl2.c (warn_if_unknown_interface,
2188 start_static_initialization_or_destruction,
2189 generate_ctor_or_dtor_function, finish_file): Likewise.
2190 * error.c (cp_line_of, print_instantiation_full_context,
2191 print_instantiation_context): Likewise.
2192 * except.c (check_handlers_1, check_handlers): Likewise.
2193 * init.c (create_temporary_var): Likewise.
2194 * method.c (use_thunk, synthesize_method): Likewise.
2195 * parser.c (cp_lexer_set_source_position_from_token,
2196 cp_lexer_get_preprocessor_token): Likewise.
2197 * pt.c (push_tinst_level, pop_tinst_level,
2198 tsubst_friend_function, instantiate_class_template, tsubst_decl,
2199 tsubst, tsubst_expr, instantiate_decl): Likewise.
2200 * semantics.c (genrtl_try_block, finish_label_stmt,
2201 begin_class_definition, expand_body,
2202 genrtl_finish_function): Likewise.
2203 * tree.c (build_min_nt, build_min): Likewise.
2205 2003-05-01 Mark Mitchell <mark@codesourcery.com>
2207 * decl2.c (comdat_linkage): Don't externalize explicit
2210 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2213 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2216 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
2218 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
2219 (struct lang_identifier): ... to here.
2220 (LANG_ID_FIELD): Remove.
2221 (SET_LANG_ID): Remove.
2222 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2223 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2224 (IDENTIFIER_IMPLICIT_DECL): Likewise.
2225 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2226 (IDENTIFIER_ERROR_LOCUS): Likewise.
2227 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2229 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2232 * pt.c (convert_template_argument): Correct diagnostic.
2234 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2236 PR c++/9432, c++/9528
2237 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2239 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
2241 * decl.c (check_previous_goto_1): Adjust prototype.
2242 (check_previous_goto): Adjust use.
2243 (check_switch_goto): Likewise.
2244 (use_label): Adjust.
2245 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2246 (struct named_label_use_list): Use location_t datatype.
2248 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2251 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2252 that have not yet been written out.
2254 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2257 * class.c (layout_class_type): Mark overlong bitfields as having
2258 the maximum size permitted by their type, after layout.
2261 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2263 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2265 * call.c (build_operator_new_call): Fix typo.
2266 * lang-options.h: Likewise.
2268 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2271 * cp-tree.h (lookup_field_1): Declare it.
2272 * search.c (lookup_field_1): Make it public.
2273 * decl.c (reshape_init): Handle designated initializers.
2275 * decl.c (maybe_commonize_var): Further tweak support for systems
2276 without weak symbols.
2278 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2280 * decl.c (maybe_commonize_var): Fix thinko in last patch.
2282 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2285 * method.c (use_thunk): Decrement immediate_size_expand.
2288 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2289 (DECL_MAYBE_TEMPLATE): Remove.
2290 * class.c (fixed_type_or_null): Avoid infinite recursion.
2292 * decl.c (maybe_commonize_var): Make the code match the comments.
2293 * pt.c (instantiate_decl): Move call to import_export_decl.
2295 2003-04-26 Mark Mitchell <mark@codesourcery.com>
2297 * decl2.c (finish_file): Fix merge botch.
2299 2003-04-25 Mark Mitchell <mark@codesourcery.com>
2301 * decl2.c (finish_file): Don't call import_export_decl for
2302 functions that are not defined.
2303 (handle_class_head): Robustify.
2304 * pt.c (instantiate_decl): Do not call cp_finish_decl for
2305 variables that are not defined.
2307 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
2309 * call.c (print_z_candidates): Fix off by one error.
2311 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
2314 * call.c (joust): Don't warn about conversion ops that are exact
2315 or cv-conversions. Rearrange to avoid multiple type comparisons.
2317 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2320 * call.c (build_cxx_call): Robustify.
2322 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
2324 * Make-lang.in (lex.o): Remove mbchar.h.
2325 * lex.c (MULTIBYTE_CHARS): Lose.
2326 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2329 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2332 * cp-tree.h (duplicate_tag_error): Remove.
2333 * class.c (duplicate_tag_error): Remove.
2334 * semantics.c (begin_class_definition): Return immediately for a
2335 duplicate class definition.
2338 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2340 2003-04-22 Mark Mitchell <mark@codesourcery.com>
2343 * search.c (lookup_fnfields_1): Handle empty slots in the method
2347 * decl.c (check_elaborated_type_specifier): New function, split
2349 (xref_tag): ... here. Use the new function in more places.
2351 * rtti.c (throw_bad_typeid): Use build_cxx_call.
2353 2003-04-21 Mark Mitchell <mark@codesourcery.com>
2355 * call.c (build_over_call): Use build_cxx_call.
2356 (build_cxx_call): New method, split out of build_over_call.
2357 * cp-tree.h (language_function): Add can_throw.
2358 (build_cxx_call): Declare it.
2359 * decl.c (finish_function): If a function does not contain any
2360 calls to functions that can throw an exception, indicate that
2362 * decl2.c (mark_used): Do not defer the instantiation of
2363 functions, if the current function does not throw.
2364 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2365 * pt.c (instantiate_decl): Make sure import_export_decl is called
2366 before emitting things.
2367 * rtti.c (throw_bad_cast): Use build_cxx_call.
2368 (build_dynamic_cast_1): Likewise.
2369 * typeck.c (build_function_call): Likewise.
2371 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
2374 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
2375 expressions. Reverts my 2002-08-08 patch.
2377 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
2380 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2382 * cp/decl2.c (start_static_storage_duration_function): Take count
2383 arg, don't check if it wraps round.
2384 (generate_ctor_or_dtor_function): Add locus arg, use it.
2385 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
2387 (finish_file): Set line numbers to past EOF for synthesized
2390 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2393 * search.c (lookup_field_1): Final scan goes backwards for
2394 types, forwards for non-types.
2396 2003-04-17 Roger Sayle <roger@eyesopen.com>
2399 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
2400 "nothrow" function attributes.
2402 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2405 * pt.c (type_dependent_expression_p): Handle array new.
2407 2003-04-15 Mark Mitchell <mark@codesourcery.com>
2410 * parser.c (cp_parser_primary_expression): Reorganize logic for
2411 dealing with name lookup failures.
2413 2003-04-15 Jason Merrill <jason@redhat.com>
2415 * decl2.c (mark_used): Don't instantiate anything if
2418 2003-04-14 Ziemowit Laski <zlaski@apple.com>
2420 * tree.c (build_cplus_array_type_1): Do not call
2421 uses_template_parms() on a NULL index_type.
2423 2003-04-13 Roger Sayle <roger@eyesopen.com>
2425 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
2427 2003-04-12 Mark Mitchell <mark@codesourcery.com>
2430 * init.c (build_new_1): Reorganize.
2432 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2434 * class.c (initialize_array)
2435 * decl.c (reshape_init)
2436 * decl2.c (build_expr_from_tree)
2437 * init.c (build_zero_init)
2438 * pt.c (tsubst_copy, tsubst_copy_and_build)
2439 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
2440 (ptm_initializer, class_initializer, get_pseudo_ti_init)
2441 * semantics.c (finish_compound_literal)
2442 * typeck.c (build_ptrmemfunc1)
2443 * typeck2.c (store_init_value, process_init_constructor)
2444 (build_functional_cast): Use build_constructor.
2446 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2448 * call.c (print_z_candidates): Use gcc_gettext_width, not
2449 strlen, to determine how much padding to use.
2451 2003-04-10 Zack Weinberg <zack@codesourcery.com>
2453 * decl.c: Update all calls to shadow_warning.
2455 2003-04-10 Mark Mitchell <mark@codesourcery.com>
2457 * class.c (layout_class_type): Correct handling for overlong
2458 bit-fields whose width is the same as an integer type.
2460 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2462 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
2463 * cp-lang.c (cp_tree_size): New function.
2464 (LANG_HOOKS_TREE_SIZE): Override.
2466 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
2467 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
2468 (union lang_tree_node): Remove common and srcloc members.
2469 (build_srcloc_here): Don't prototype.
2470 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
2471 * pt.c (pending_templates): Correct comment.
2472 * tree.c (build_srcloc, build_srcloc_here): Kill.
2474 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2476 * call.c: Include intl.h.
2477 (print_z_candidate): Always use inform; get rid of errfn
2478 argument. Reorganize so that all the strings get picked up
2479 by xgettext. Note obligation of caller to pass first argument
2481 (print_z_candidates): Update to match. Indent second and
2482 successive candidates by strlen() of translated message.
2483 (joust): Restructure ambiguous-conversion pedwarn so that
2484 translators see a complete sentence. Update calls to
2487 * Make-lang.in (cp/call.o): Update dependencies.
2489 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2491 * decl.c (set_current_binding_level): Delete, revert last change.
2492 (current_binding_level): Modify to allow it as as lvalue.
2494 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2496 * name-lookup.c (find_binding): Pass appropriate pointer type to
2497 POP_TIMEVAR_AND_RETURN.
2499 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2501 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
2502 * cp-tree.h: Don't insist on having GNUC.
2504 2003-04-03 Jason Merrill <jason@redhat.com>
2506 * cvt.c (ocp_convert): Only abort if we try to convert an object
2507 of TREE_ADDRESSABLE type.
2509 * class.c (build_vtable): Set DECL_ALIGN here.
2510 (get_vtable_decl): Not here.
2511 (layout_vtable_decl): Or here.
2512 (create_vtable_ptr): Or here.
2513 (layout_class_type): Or here.
2514 (check_bitfield_decl): Don't mess with field alignment.
2516 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2518 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
2519 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
2520 * rtti.c (dfs_class_hint_mark): Likewise.
2522 * decl.c (push_local_name, push_class_level_binding,
2523 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
2524 functions returning void.
2525 * decl2.c (add_using_namespace): Likewise.
2527 * decl.c (print_binding_level, print_other_binding_stack,
2528 print_binding_stack): Cast argument of %p specifier to void*.
2529 * ptree.c (cxx_print_decl): Likewise.
2531 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2532 VAR_FUNCTION_OR_PARM_DECL_CHECK,
2533 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2534 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
2535 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
2537 * decl.c (set_current_binding_level): New macro. Use throughout
2538 when setting the current binding level.
2540 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
2542 * method.c (mangling_flags): Likewise.
2544 * cp-tree.h (lang_type_header): Add __extension__ and use
2545 CHAR_BITFIELD for members.
2547 2003-04-02 Geoffrey Keating <geoffk@apple.com>
2550 * mangle.c: Include gt-cp-mangle.h.
2551 (subst_identifiers): Mark with GTY.
2552 * config-lang.in (gtfiles): Add cp/mangle.c.
2553 * Make-lang.in: (gt-cp-mangle.h): New rule.
2554 (cp/mangle.o): Depends on gt-cp-mangle.h.
2556 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
2558 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
2559 after \$(srcdir)/cp/name-lookup.h.
2560 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
2561 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
2562 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
2563 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2565 2003-03-31 Jason Merrill <jason@redhat.com>
2568 * class.c (check_field_decl): Don't set DECL_ALIGN.
2570 2003-03-30 Mark Mitchell <mark@codesourcery.com>
2573 * decl.c (grokdeclarator): Tidy, slightly.
2574 * search.c (lookup_field_1): Add want_type parameter.
2575 (lookup_field_r): Adjust call to lookup_field_1.
2577 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2579 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
2581 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2583 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
2585 (cxx_scope_find_binding_for_name): Likewise.
2586 * decl.c (find_binding: Move to name-lookup.c.
2587 (binding_for_name): Likewise.
2588 (cxx_scope_find_binding_for_name): Likewise.
2589 (BINDING_LEVEL): Remove.
2590 (push_binding): Tidy.
2591 (push_class_binding): Likewise.
2592 (pop_binding): Likewise.
2593 (poplevel): Likewise.
2594 (poplevel_class): Likewise.
2595 (set_identifier_type_value_with_scope): Likewise.
2596 (push_overloaded_decl): Likewise.
2597 (lookup_tag): Likewise.
2598 (unqualified_namespace_lookup): Likewise.
2599 (lookup_name_current_level): Likewise.
2600 (maybe_inject_for_scope_var): Likewise.
2601 (namespace_binding): Move to name-lookup.c.
2602 (set_namespace_binding): Likewise.
2603 * decl2.c (lookup_using_namespace): Tidy.
2604 (qualified_lookup_using_namespace): Likewise.
2605 (do_toplevel_using_decl): Likewise.
2606 * name-lookup.c: Include "timevar.h"
2607 * name-lookup.h (cxx_scope): Declare.
2608 (struct cxx_binding): Lose member "has_level". Adjust "scope"
2610 (BINDING_SCOPE): Adjust definition.
2611 (BINDING_HAS_LEVEL_P): Remove.
2613 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2615 * name-lookup.c: New file.
2616 * name-lookup.h: Likewise..
2617 * decl.c (push_binding): Adjust use cxx_binding_make.
2618 (free_bindings): Move to name-lookup.c
2619 (pop_binding): Use cxx_binding_free.
2620 (binding_for_name): Tidy.
2621 * cp-tree.h: Include "name-lookup.h"
2622 (cxx_binding_make): Move to name-lookup.h
2623 (cxx_binding_clear): Likewise.
2624 (struct cxx_binding): Likewise.
2625 (LOCAL_BINDING_P): Likewise.
2626 (INHERITED_VALUE_BINDING_P): Likewise.
2627 (BINDING_SCOPE): Likewise.
2628 (BINDING_HAS_LEVEL_P): Likewise.
2629 (BINDING_VALUE): Likewise.
2630 (BINDING_TYPE): Likewise.
2631 * config-lang.in (gtfiles): Add cp/name-lookup.h
2632 * Make-lang.in (cp/name-lookup.o): New rule.
2633 (CXX_OBJS): Add cp/name-lookup.o
2634 (CXX_TREE_H): Add cp/name-lookup.h
2636 2003-03-28 Jason Merrill <jason@redhat.com>
2639 * cvt.c (force_rvalue): New fn.
2640 * call.c (build_conditional_expr): Use it.
2641 * cp-tree.h: Declare it.
2643 2003-03-28 Mike Stump <mrs@apple.com>
2645 * error.c (dump_expr): Add 0x to printed hex numbers to make
2646 output match source code better.
2648 2003-03-28 Mark Mitchell <mark@codesourcery.com>
2651 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2654 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2655 non-existant ssdf_decls array.
2656 (finish_file): Call generator_ctor_or_dtor_function when there are
2657 static constructors or destructors and no other static
2660 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
2663 * decl2.c (finish_file): Don't warn about explicitly instantiated
2666 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2669 * pt.c (lookup_template_class): Only check instantiated args if
2670 they do not contain template parameters.
2672 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2675 * parser.c (cp_parser_function_definition): Set
2676 DECL_INITIALIZED_IN_CLASS for members.
2677 * pt.c (instantiate_decl): Only reduce the template args for
2678 friends that are not defined in class.
2680 2003-03-25 Jason Merrill <jason@redhat.com>
2682 * call.c (print_z_candidate): Change name of first arg to msgid.
2683 (joust): Add comment for translators.
2685 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2687 PR c++/9898, PR c++/383, DR 322
2688 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2689 through reference types on both PARM and ARG.
2691 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2694 * error.c (dump_expr) <BASELINK>: Use dump_expr.
2695 * pt.c (maybe_fold_nontype_args): New function.
2696 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2697 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2698 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2699 maybe_fold_nontype_args.
2701 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2704 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2706 2003-03-23 Mark Mitchell <mark@codesourcery.com>
2709 * typeck.c (cxx_mark_addressable): Adjust call to
2710 gen_mem_addressof or put_var_into_stack.
2712 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
2714 PR c++/9978, c++/9708
2715 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2716 * call.c (add_template_candidate_real): Adjust
2717 instantiate_template call.
2718 * class.c (resolve_address_of_overloaded_function): Likewise.
2719 * decl.c (build_enumerator): Set TREE_CONSTANT.
2720 * pt.c (check_instantiated_args): New.
2721 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2723 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2724 (reduce_template_parm_level): Likewise.
2725 (process_template_parm): Likewise.
2726 (check_explicit_specialization): Adjust instantiate_template call.
2727 (convert_template_argument): Don't check non-type argument here.
2728 (lookup_template_class): Check them here.
2729 (tsubst_friend_function): Adjust instantiate_template call.
2730 (instantiate_template): Add tsubst_flags parameter, use it. Check
2733 2003-03-21 Zack Weinberg <zack@codesourcery.com>
2735 * decl.c: Update calls to shadow_warning.
2737 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
2740 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2741 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2743 2003-03-20 Mark Mitchell <mark@codesourcery.com>
2745 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2747 * cp/pt.c (instantiate_class_template): Fix formatting.
2749 2003-03-14 Matt Austern <austern@apple.com>
2751 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2752 (unemitted_tinfo_decl_p): Remove.
2753 (emit_tinfo_decl): Change declaration to remove unused parameter.
2754 * decl2.c (finish_file): Change tinfo emission to loop through
2755 unemitted_tinfo_decls array instead of looping through all decls.
2756 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2757 unused second parameter.
2758 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2759 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2760 (emit_tinfo_decl): remove unused second parameter, add assertion
2761 that decl hasn't already been emitted.
2763 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
2765 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2766 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2769 2003-03-19 Jason Merrill <jason@redhat.com>
2771 PR c++/8316, c++/9315, c++/10136
2772 * call.c (print_z_candidate): Split out from...
2773 (print_z_candidiates): ...here.
2776 2003-03-17 Roger Sayle <roger@eyesopen.com>
2779 * decl.c (duplicate_decls): Use the new type when prototyping
2780 anticipated decls, even when the types match. This defines the
2781 exception list for the built-in function.
2783 2003-03-17 Jason Merrill <jason@redhat.com>
2786 * typeck.c (build_class_member_access_expr): Compare
2789 2003-03-17 Mark Mitchell <mark@codesourcery.com>
2792 * parser.c (cp_parser_declarator_id): Clear parser->scope.
2794 2003-03-16 Jason Merrill <jason@redhat.com>
2797 * decl.c (finish_function): Only allow the NRVO to use variables
2798 declared at function scope.
2800 2003-03-17 Andreas Jaeger <aj@suse.de>
2802 * Make-lang.in (cp/TAGS): Remove.
2804 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
2807 * cp-tree.h (struct language_function): Add in_base_initializer.
2808 (in_base_initializer): define it.
2809 (expand_member_init): Remove INIT param.
2810 * init.c (expand_member_init): Remove INIT param, return the member.
2811 (emit_mem_initializers): Set in_base_initializer.
2812 * class.c (build_base_path): Check in_base_initializer.
2813 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
2814 * pt.c (tsubst_initializer_list): Likewise.
2816 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2818 * decl.c (binding_for_name): Fix initialization thinko.
2820 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2822 Compile-time improvement: 2/n.
2823 * cp-tree.h (struct cxx_binding): New datatype;
2824 (struct lang_identifier): Use it.
2825 (LOCAL_BINDING_P): Adjust definition.
2826 (INHERITED_VALUE_BINDING_P): Likewise.
2827 (BINDING_SCOPE): Likewise.
2828 (BINDING_HAS_LEVEL_P): Likewise.
2829 (BINDING_VALUE): Likewise.
2830 (BINDING_TYPE): Likewise.
2831 (IDENTIFIER_VALUE): Likewise.
2832 (struct tree_binding): Remove.
2833 (TS_CP_BINDING): Likewise.
2834 ((union lang_tree_node): Remove field "binding".
2835 (cxx_binding_clear): New macro.
2836 (binding_for_name): Adjust return type.
2837 (qualified_lookup_using_namespace): Adjust prototype.
2838 (lookup_using_namespace): Adjust prototype.
2839 (cxx_scope_find_binding_for_name): Declare.
2840 * cp-tree.def: Remove CPLUS_BINDING definition.
2841 * decl.c (push_binding): Adjust local variable type.
2842 (add_binding): Likewise.
2843 (push_class_binding): Likewise.
2844 (pop_binding): Likewise.
2845 (poplevel): Likewise.
2846 (poplevel_class): Likewise.
2847 (free_bindings): Adjust type.
2848 (find_binding): Adjust return type, add a third parameter. Remove
2849 non-useful assertion now that we use static typing.
2850 (cxx_scope_find_binding_for_name): New function.
2851 (binding_for_name): Use it. Adjust local variable type. Simplify.
2852 (namespace_binding): Simplify.
2853 (set_namespace_binding): Likewise.
2854 (set_identifier_type_value_with_scope): Adjust local variable type.
2855 (lookup_tag): Don't type-abuse of local variable 'old'.
2856 (lookup_namespace_name): Likewise. Allocate binding on stack.
2857 (select_decl): Adjust prototype.
2858 (unqualified_namespace_lookup): Allocate binding on stack.
2859 Don't type-abuse of local variable 'val'.
2860 (lookup_name_real): Likewise.
2861 (maybe_inject_for_scope_var): Adjust local variable type.
2862 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2863 (namespace_binding): Adjust logic, simplify.
2864 (BINDING_LEVEL): Adjust definition.
2865 (push_class_level_binding): Adjust local variable type.
2866 (struct cxx_saved_binding): Adjust field 'binding' type.
2867 * decl2.c (ambiguous_decl): Adjust prototype.
2868 (lookup_using_namespace): Adjust local variable type.
2869 (qualified_lookup_using_namespace): Catch type error and correct
2870 ensueing logic error.
2871 (do_nonmember_using_decl): Adjust local variable type. Allocate
2872 temporary cxx_binding on stack.
2873 (do_toplevel_using_decl): Adjust local variable type.
2874 * ptree.c (cxx_print_cxx_binding): New function.
2875 (cxx_print_identifier): Use it.
2876 (cxx_print_xnode): Delete CPLUS_BINDING case label.
2878 2003-03-15 Roger Sayle <roger@eyesopen.com>
2880 * tree.c (count_functions): Fix whitespace.
2882 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
2884 * Make-lang.in: Update.
2886 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2889 * pt.c (maybe_process_partial_specialization): Handle
2890 member class template when enclosing class template is
2891 explicit specialized.
2892 (most_general_template): Stop looking when DECL is already
2895 2003-03-13 Jason Merrill <jason@redhat.com>
2898 * search.c (lookup_conversions): Call complete_type here.
2899 * call.c (implicit_conversion): Not here.
2901 2003-03-13 Mark Mitchell <mark@codesourcery.com>
2903 * decl2.c (do_nonmember_using_decl): Correct handling of
2904 simultaneous type/non-type bindings.
2906 * call.c (initialize_reference): Remove bogus assertion.
2907 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2909 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
2912 * expr.c (cxx_expand_expr): Return const0_rtx for throw
2915 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2918 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2919 to merge old and new declarations.
2921 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2924 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2925 (cp/g++.1): Build it from scratch in the build tree.
2926 (c++.install-man): Depend on it. Install it from the build tree.
2927 (c++.mostlyclean): Clean it.
2929 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2932 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2933 to merge old and new declarations.
2936 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2938 2003-03-11 Jason Merrill <jason@redhat.com>
2941 * search.c (lookup_member): Fix handling of functions in a class
2944 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2947 * call.c (convert_class_to_reference): Adjust usage of
2949 (any_viable): Remove.
2950 (splice_viable): Combine with any_viable.
2951 (print_z_candidates): Avoid printing duplicates.
2952 (build_user_type_conversion_1): Adjust usage of splice_viable.
2953 (build_new_function_call): Likewise.
2954 (build_operator_new_call): Likewise.
2955 (build_object_call): Likewise.
2956 (build_conditional_expr): Likewise.
2957 (build_new_op): Likewise.
2958 (build_new_method_call): Likewise.
2959 (joust): Remove spurious comment.
2960 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2961 * decl2.c (arg_assoc_class): Simplify.
2962 * friend.c (add_friend): Likewise.
2964 2003-03-11 Jason Merrill <jason@redhat.com>
2967 * decl2.c (check_classfn): A member template only matches a
2970 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
2972 * Make-lang.in (CXX_C_OBJS): Update.
2973 * lang-specs.h: Don't define __GNUG__ here.
2975 2003-03-10 Mark Mitchell <mark@codesourcery.com>
2977 * call.c (perform_overload_resolution): New function.
2978 (build_new_function_call): Use it.
2979 (build_operator_new_call): Likewise.
2980 (add_candidates): Add explicit_targs and template_only parameters.
2981 (build_new_op): Adjust accordingly.
2982 * cp-tree.h (build_operator_new_call): New function.
2983 (build_function_call_real): Remove.
2984 (build_function_call_maybe): Likewise.
2985 * init.c (build_new_1): Use build_operator_new_call.
2986 * typeck.c (build_function_call_real): Rename to ...
2987 (build_function_call): ... this.
2989 2003-03-10 Devang Patel <dpatel@apple.com>
2992 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2994 2003-03-10 Jason Merrill <jason@redhat.com>
2997 * decl.c (push_using_directive): Push before recursing.
2999 PR c++/9868, c++/9524
3000 * call.c (resolve_scoped_fn_name): Handle the case of a function
3003 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3004 argument in the pointer-to-member case.
3006 2003-03-09 Mark Mitchell <mark@codesourcery.com>
3009 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3010 pointers to member functions.
3013 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3014 in pointer-to-member-function types.
3016 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3018 * expr.c (cplus_expand_constant): Use C90 prototype style.
3019 (cxx_expand_expr): Likewise.
3021 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3024 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3027 2003-03-08 Geoffrey Keating <geoffk@apple.com>
3029 * lang-specs.h (c++-header): Change .pch to .gch.
3031 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3033 * cp-tree.h (cxx_init): Update prototype.
3034 * lex.c (cxx_init): Similarly.
3036 2003-03-08 Mark Mitchell <mark@codesourcery.com>
3039 * cp-tree.h (begin_mem_initializers): Remove.
3040 * parser.c (cp_parser_mem_initializer_list): Inline it here.
3041 Do not call finish_mem_initializers if not in a constructor.
3042 (cp_parser_class_head): Fix typo in error message.
3043 * semantics.c (begin_mem_initializers): Remove.
3044 * testsuite/g++.dg/parser/constructor1.C: New test.
3047 * call.c (add_function_candidate): Skip builtin fuctions that have
3048 not yet been declared.
3051 * init.c (build_new_1): Correct logic for determining whether or
3052 not to use an array cookie.
3055 * parser.c (cp_parser_postfix_expression): Call
3056 finish_non_static_data_member, even when processing_template_decl.
3059 * cp-tree.h (is_ancestor): New function.
3060 (handle_class_head): Change prototype.
3061 * decl2.c (is_namespace_ancestor): Rename to ...
3062 (namespace_anecestor): ... this.
3063 (set_decl_namespace): Adjust accordingly.
3064 (handle_class_head): Remove unncessary parameters.
3065 * parser.c (cp_parser_class_head): Check that
3066 nested-name-specifiers are used appropriately.
3068 2003-03-07 Mark Mitchell <mark@codesourcery.com>
3070 * call.c (reference_binding): Remove REF_IS_VAR parameter.
3071 (implicit_conversion): Adjust call to reference_binding.
3072 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3073 (initialize_reference): Adjust handling for references bound to
3075 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3077 (real_non_cast_lvalue_p): New method.
3078 * cvt.c (build_up_reference): Adjust use of
3079 make_temporary_var_for_ref_to_temp.
3080 * tree.c (real_non_cast_lvalue_p): New method.
3082 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3084 * except.c (init_exception_processing): Use C90 prototype style.
3085 (cp_protect_cleanup_actions): Likewise.
3086 (prepare_eh_type): Likewise.
3087 (build_eh_type_type): Likewise.
3088 (build_exc_ptr): Likewise.
3089 (do_begin_catch): Likewise.
3090 (dtor_nothrow): Likewise.
3091 (do_end_catch): Likewise.
3092 (push_eh_cleanup): Likewise.
3093 (decl_is_java_type): Likewise.
3094 (choose_personality_routine): Likewise.
3095 (initialize_handler_parm): Likewise.
3096 (expand_start_catch_block): Likewise.
3097 (expand_end_catch_block): Likewise.
3098 (begin_eh_spec_block): Likewise.
3099 (finish_eh_spec_block): Likewise.
3100 (do_allocate_exception): Likewise.
3101 (do_free_exception): Likewise.
3102 (wrap_cleanups_r): Likewise.
3103 (stabilize_throw_expr): Likewise.
3104 (build_throw): Likewise.
3105 (complete_ptr_ref_or_void_ptr_p): Likewise.
3106 (is_admissible_throw_operand): Likewise.
3107 (nothrow_libfn_p): Likewise.
3108 (can_convert_eh): Likewise.
3109 (check_handlers_1): Likewise.
3110 (check_handlers): Likewise.
3112 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3114 * call.c (merge_conversion_sequences): New function.
3115 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3116 (convert_class_to_reference): Correct handling of second
3117 standard conversion sequence in a user-defined conversion
3119 (build_user_type_conversion_1): Use merge_conversion_sequences.
3120 * cp-tree.def: Add comments for CONV nodes.
3121 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3123 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3125 * error.c (init_error): Use C90 prototype style.
3126 (dump_scope): Likewise.
3127 (dump_qualifiers): Likewise.
3128 (dump_template_argument): Likewise.
3129 (dump_template_argument_list): Likewise.
3130 (dump_template_parameter): Likewise.
3131 (dump_template_bindings): Likewise.
3132 (dump_type): Likewise.
3133 (dump_typename): Likewise.
3134 (class_key_or_enum): Likewise.
3135 (dump_aggr_type): Likewise.
3136 (dump_type_prefix): Likewise.
3137 (dump_type_suffix): Likewise.
3138 (dump_global_iord): Likewise.
3139 (dump_simple_decl): Likewise.
3140 (dump_decl): Likewise.
3141 (dump_template_decl): Likewise.
3142 (dump_function_decl): Likewise.
3143 (dump_parameters): Likewise.
3144 (dump_exception_spec): Likewise.
3145 (dump_function_name): Likewise.
3146 (dump_template_parms): Likewise.
3147 (dump_char): Likewise.
3148 (dump_expr_list): Likewise.
3149 (dump_expr): Likewise.
3150 (dump_binary_op): Likewise.
3151 (dump_unary_op): Likewise.
3152 (type_as_string): Likewise.
3153 (expr_as_string): Likewise.
3154 (decl_as_string): Likewise.
3155 (context_as_string): Likewise.
3156 (lang_decl_name): Likewise.
3157 (cp_file_of): Likewise.
3158 (cp_line_of): Likewise.
3159 (decl_to_string): Likewise.
3160 (expr_to_string): Likewise.
3161 (fndecl_to_string): Likewise.
3162 (code_to_string): Likewise.
3163 (language_to_string): Likewise.
3164 (parm_to_string): Likewise.
3165 (op_to_string): Likewise.
3166 (type_to_string): Likewise.
3167 (assop_to_string): Likewise.
3168 (args_to_string): Likewise.
3169 (cv_to_string): Likewise.
3170 (cxx_print_error_function): Likewise.
3171 (cp_diagnostic_starter): Likewise.
3172 (cp_diagnostic_finalizer): Likewise.
3173 (cp_print_error_function): Likewise.
3174 (function_category): Likewise.
3175 (print_instantiation_full_context): Likewise.
3176 (print_instantiation_partial_context): Likewise.
3177 (maybe_print_instantiation_context): Likewise.
3178 (print_instantiation_context): Likewise.
3179 (cp_printer): Likewise.
3180 (print_integer): Likewise.
3181 (print_non_consecutive_character): Likewise.
3182 (locate_error): Likewise.
3184 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3187 * call.c (reference_binding): Add ref_is_var parameter.
3188 (implicit_conversion): Adjust call to reference_binding.
3189 (initialize_reference): Likewise.
3192 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3196 * class.c (get_basefndecls): Use lookup_fnfields_1.
3198 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3201 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3203 (cp_parser_single_declaration): Likewise.
3205 2003-03-05 Jason Merrill <jason@redhat.com>
3208 * call.c (build_conditional_expr): Use convert rather than an
3211 2003-03-02 Matt Austern <austern@apple.com>
3213 * decl.c (cp_binding_level): Add static_decls varray member.
3214 (add_decl_to_level): Add static/inline namespace scope
3215 declarations to static_decls array.
3216 (wrapup_global_for_namespace): Pass static_decls only, instead of
3217 all decls, to wrapup_global_declarations/check_global_declarations.
3218 (push_namespace): Initialize static_decls for ordinary namespaces.
3219 (cxx_init_decl_processing): Initialize static_decls for global
3222 2003-03-05 Mark Mitchell <mark@codesourcery.com>
3224 * class.c (end_of_class): Correct thinko.
3226 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
3228 * config-lang.in: Replace ${libstdcxx_version} by its value.
3230 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3232 * cp-tree.h (cxx_saved_binding): Declare.
3233 (struct saved_scope): Adjust type of field 'old_binding'.
3234 * decl.c (cxx_saved_binding_make): New macro.
3235 (struct cxx_saved_binding): Define.
3236 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
3238 (maybe_push_to_top_level): Adjust local variable type.
3239 (pop_from_top_level): Likewise.
3241 2003-03-04 Tom Tromey <tromey@redhat.com>
3243 * Make-lang.in (c++.tags): New target.
3245 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
3247 * Make-lang.in: Update.
3249 2003-03-03 Jason Merrill <jason@redhat.com>
3251 * decl.c (finish_enum): Do set the type in a template. Simplify.
3252 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3254 2003-03-03 Mark Mitchell <mark@codesourcery.com>
3257 * call.c (convert_class_to_reference): Correct conversion
3259 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3260 (implicit_conversion): Adjust call to reference_binding.
3261 (add_candidate): Change type of candidates parameter.
3262 (add_function_candidate): Likewise.
3263 (add_conv_candidate): Likewise.
3264 (build_builtin_candidate): Likewise.
3265 (add_builtin_candidate): Likewise.
3266 (add_builtin_candidates): Likewise.
3267 (add_template_candidate_real): Likewise.
3268 (add_template_candidate): Likewise.
3269 (add_template_conv_candidate): Likewise.
3270 (build_user_type_conversion_1): Adjust accordingly.
3271 (build_object_call): Likewise.
3272 (build_conditional_expr): Likewise.
3273 (add_candidates): Likewise.
3274 (build_new_op): Likewise.
3275 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
3276 (build_new_method_call): Adjust calls to add_function_candidate.
3277 (make_temporary_var_for_ref_to_temp): New function.
3278 (initialize_reference): Add decl parameter.
3279 * class.c (build_rtti_vtbl_entries): Use build_address and
3281 * cp-tree.h (initialize_reference): Change prototype.
3282 (make_temporary_var_for_ref_to_temp): New function.
3283 (build_type_conversion): Change prototype.
3284 (build_address): New function.
3285 (build_nop): Likewise.
3286 * cvt.c (cp_convert_to_pointer): Adjust call to
3287 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
3289 (convert_to_pointer_force): Use build_nop.
3290 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3291 (convert_to_reference): Adjust call to build_type_conversion.
3292 (ocp_convert): Likewise.
3293 (build_type_conversion): Remove for_sure parameter.
3294 * decl.c (grok_reference_init): Use initialize_reference.
3295 * typeck.c (build_address): New function.
3296 (build_nop): Likewise.
3297 (build_unary_op): Use them.
3298 (build_ptrmemfunc): Tidy slightly.
3299 (convert_for_initialization): Adjust call to
3300 initialize_reference.
3301 * typeck2.c (store_init_value): Remove #if 0'd code.
3303 2003-03-03 Jason Merrill <jason@redhat.com>
3305 * decl.c (start_function): Clear DECL_NUM_STMTS.
3307 * class.c (get_vtable_decl): Use vtbl_type_node.
3308 (build_primary_vtable): Check for it.
3310 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
3312 * decl.c (check_initializer): Check for vector_opaque_p.
3314 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
3316 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3317 invoke an external cpp during compilation.
3319 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3321 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3323 (start_decl): Likewise.
3324 (start_function): Likewise.
3326 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
3328 * Make-lang.in (CXX_C_OBJS): Update.
3330 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3333 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3336 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
3338 * parser.c (cp_parser_init_declarator): Revert opaque
3339 vector_opaque_p change.
3340 Do not include target.h.
3342 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3345 * cp-tree.h (build_zero_init): Add parameter.
3346 * decl.c (cp_finish_decl): Adjust call.
3347 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
3349 (build_default_init): Add nelts parameter. Adjust calls to
3351 (build_new_1): Adjust call to build_default_init.
3352 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3354 2003-02-26 Devang Patel <dpatel@apple.com>
3356 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3357 required. Postpone enum setting for template decls.
3358 (build_enumerator): Delay copying value node until finish_enum
3359 (). Remove #if 0'ed code.
3360 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3361 (tsubst_copy): Add check for enum type.
3363 2003-02-25 Mark Mitchell <mark@codesourcery.com>
3366 * decl2.c (prune_vars_needing_no_initialization): Do not throw
3367 away initializations for DECL_EXTERNAL VAR_DECLs.
3368 (finish_file): Adjust accordingly.
3369 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3371 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3373 * decl.c (add_binding): Time TV_NAME_LOOKUP.
3374 (push_class_binding): Likewise.
3375 (set_namespace_binding): Likewise.
3377 2003-02-24 Mark Mitchell <mark@codesourcery.com>
3380 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
3381 specializations back to the main template.
3382 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
3383 * pt.c (resolve_typename_type): Likewise.
3385 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
3388 * pt.c (tsubst_copy_and_build): For a templated function inside a
3389 scope, process template arguments.
3391 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3394 * typeck2.c (abstract_virtuals_error): Don't check when
3395 TYPE is still template parameter dependent.
3397 2003-02-23 Mark Mitchell <mark@codesourcery.com>
3400 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
3401 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
3402 * pt.c (instantiate_class_template): Don't try to instantiate
3404 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
3406 2003-02-21 Mark Mitchell <mark@codesourcery.com>
3409 * decl.c (grokdeclarator): Do not allow parameters with variably
3412 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
3414 * search.c (grow_bfs_bases): Remove. Fold into ...
3415 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
3418 2003-02-20 Mark Mitchell <mark@codesourcery.com>
3421 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
3422 when the G++ 3.2 ABI prevents correct compilation.
3424 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3426 Change base class access representation. Share virtual base
3428 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
3430 * cp/class.c (build_base_path): Likewise.
3431 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
3432 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
3433 (make_new_vtable): Adjust.
3434 (force_canonical_binfo_r): Delete.
3435 (force_canonical_binfo): Delete.
3436 (mark_primary_virtual_base): Delete.
3437 (dfs_unshared_virtual_bases): Delete.
3438 (mark_primary_bases): Adjust.
3439 (maybe_warn_about_overly_private_class): Adjust.
3440 (dfs_base_derived_from): Delete.
3441 (base_derived_from): Follow the inheritance chain.
3442 (struct find_final_overrider_data): Add vpath member.
3443 (dfs_find_final_overrider): Adjust.
3444 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
3445 (find_final_overrider): Adjust.
3446 (update_vtable_entry_for_fn): Adjust.
3447 (modify_all_vtables): Adjust.
3448 (walk_subobject_offsets): Adjust.
3449 (layout_nonempty_base_or_field): Adjust.
3450 (layout_empty_base): Remove last parameter. Adjust.
3451 (build_base_field): Adjust.
3452 (build_base_fields): Adjust.
3453 (propagate_binfo_offsets): Remove last parameter. Adjust.
3454 (dfs_set_offset_for_unshared_vbases): Delete.
3455 (layout_virtual_bases): Adjust.
3456 (finish_struct_1): Adjust.
3457 (init_class_processing): Don't init access nodes.
3458 (dfs_get_primary_binfo): Delete.
3459 (get_primary_binfo): Adjust.
3460 (dump_class_hierarchy_r): Remove most derived arg, add IGO
3462 (dump_class_hierarchy): Adjust.
3463 (finish_vtbls): Adjust.
3464 (get_original_base): Delete.
3465 (build_vtt_inits): Adjust.
3466 (dfs_build_secondary_vptr_vtt_inits): Adjust.
3467 (dfs_ctor_vtable_bases_queue_p): Adjust.
3468 (build_ctor_vtbl_group): Adjust.
3469 (dfs_accumulate_vtbl_inits): Adjust.
3470 (build_vtbl_initializer): Adjust.
3471 (build_vbase_offset_vtbl_entries): Adjust.
3472 (add_vcall_offset_vtbl_entries_1): Adjust.
3473 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
3474 (access_*_node): Remove.
3475 (CANONICAL_BINFO): Delete.
3476 (BINFO_UNSHARED_MARKED): Remove.
3477 (BINFO_MARKED): Set LANG_FLAG_0 directly.
3478 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
3479 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
3480 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
3482 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
3483 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3484 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
3486 (BINFO_DEPENDENT_BASE_P): New.
3487 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
3489 (markedp, unmarkedp): Adjust.
3490 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
3491 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
3492 find_vbase_instance, binfo_for_vbase): Delete.
3493 (copied_binfo, original_binfo): Declare.
3494 (finish_base_specifier): Add virtual_p arg.
3495 (unshare_base_binfos): Delete.
3496 (copy_base_binfos): Declare.
3497 (reverse_path): Delete.
3498 * cp/decl.c (xref_basetypes): Access and virtuality passed
3499 differently. Don't copy direct base binfos here. Call
3501 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
3502 (initialize_vtbl_ptrs): Adjust.
3503 (expand_member_init): Adjust.
3504 * cp/parser.c (cp_parser_base_specifier): Adjust.
3505 * cp/pt.c (instantiate_class_template): Adjust.
3506 (get_template_base_recursive): Adjust.
3507 * cp/rtti.c (get_pseudo_ti_init): Adjust.
3508 (get_pseudo_ti_desc): Adjust.
3509 * cp/tree.c (unshare_base_binfos): Rename to ...
3510 (copy_base_binfos): ... here, reimplement.
3511 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
3512 (reverse_path): Remove.
3513 * cp/typeck.c (get_delta_difference): Adjust error messages.
3514 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
3515 * cp/search.c (lookup_base_r): Adjust.
3516 (dynamic_cast_base_recurse): Adjust.
3517 (canonical_binfo): Remove.
3518 (dfs_canonical_queue): Remove.
3519 (dfs_assert_unmarked_p): Remove.
3520 (assert_canonical_unmarked): Remove.
3521 (shared_marked_p, shared_unmarked_p): Remove.
3522 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
3523 (dfs_access_in_type): Adjust.
3524 (access_in_type): Adjust.
3525 (dfs_accessible_queue_p): Adjust.
3526 (dfs_accessible_p): Adjust.
3527 (is_subobject_of_p_1, is_subobject_of_p): Remove.
3528 (struct lookup_field_info): Remove from_dep_base_p field.
3529 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
3530 (lookup_field_r): Remove dependent base code.
3531 (lookup_member): Likewise.
3532 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
3533 (dfs_unmarked_real_bases_queue_p): Remove.
3534 (dfs_marked_real_bases_queue_p): Remove.
3535 (dfs_skip_vbases): Remove.
3536 (dfs_get_pure_virtuals): Adjust.
3537 (markedp, unmarkedp): Adjust.
3538 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
3539 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
3540 (dfs_unmark): Adjust.
3541 (dfs_get_vbase_types):Remove.
3542 (dfs_build_inheritance_graph_order): Remove.
3543 (get_vbase_types): Remove
3544 (dfs_find_vbase_instance): Remove.
3545 (find_vbase_instance): Remove.
3546 (dfs_debug_unmarkedp): Adjust.
3547 (dependent_base_p): Remove.
3548 (dfs_push_type_decls): Adjust.
3549 (dfs_push_decls): Adjust.
3550 (dfs_no_overlap_yet): Adjust.
3551 (copied_binfo): New function.
3552 (original_binfo): New function.
3553 (binfo_for_vbase): Remove.
3555 2003-02-18 Zack Weinberg <zack@codesourcery.com>
3557 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
3558 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
3561 2003-02-18 Mark Mitchell <mark@codesourcery.com>
3564 * class.c (layout_class_type): In the 3.2 ABI, take into account
3565 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
3567 2003-02-18 Matt Austern <austern@apple.com>
3569 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
3571 * cp/decl.c (wrapup_globals_for_namespace): Remove special
3572 handling of global namespace.
3574 2003-02-18 Geoffrey Keating <geoffk@apple.com>
3576 * cp-tree.h (rid_to_yy): Delete.
3577 (C_RID_YYCODE): Delete.
3578 (finish_file): Delete redundant declaration.
3580 2003-02-18 Jason Merrill <jason@redhat.com>
3583 * decl.c (reshape_init): Don't mess with initializer labels.
3586 * parser.c (cp_parser_postfix_expression): Set idk properly for
3587 object->scope::member.
3589 2003-02-18 Ben Elliston <bje@redhat.com>
3592 * decl.c (duplicate_decls): Fix typo in comment.
3594 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
3597 * class.c (build_base_field): Mark fields for base classes with
3600 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3603 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3604 CONSTRUCTOR_ELTS only once.
3606 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3609 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3610 (dump_type_suffix): Likewise.
3612 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
3614 * search.c: ANSIfy function declarations and definitions.
3615 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3616 * call.c (build_method_call, resolve_scoped_fn_name,
3617 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3619 * class.c (handle_using_decl): Likewise.
3620 * decl.c (make_typename_type, make_unmound_class_template,
3621 start_decl, compute_array_index_type): Likewise.
3622 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3623 * init.c (expand_member_init, build_member_call): Likewise.
3624 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3625 resolve_typename_type): Likewise.
3626 * typeck.c (lookup_destructor, finish_class_member_access_exprm
3627 build_prememfunc_access_expr): Likewise.
3629 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3631 * decl2.c: Include "timevar.h".
3632 (namespace_ancestor): Time name lookup.
3633 (add_using_namespace): Likewise.
3634 (lookup_using_namespace): Likewise.
3635 (qualified_lookup_using_namespace): Likewise.
3636 (decl_namespace): Likewise.
3637 (lookup_arg_dependent): Likewise.
3638 * lex.c (do_identifier): Likewise.
3639 (do_scoped_id): Likewise.
3640 * pt.c (lookup_template_class): Likewise.
3642 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
3644 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3646 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3648 * decl.c: Include "timevar.h".
3649 (poplevel): Time name lookup.
3650 (find_binding): Likewise.
3651 (push_namespace): Likewise.
3652 (pop_nested_namespace): Likewise.
3653 (store_bindings): Likewise.
3654 (maybe_push_to_top_level): Likewise.
3655 (pop_from_top_level): Likewise.
3656 (push_local_name): Likewise.
3657 (pushtag): Likewise.
3658 (pushdecl): Likewise.
3659 (pushdecl_with_scope): Likewise.
3660 (pushdecl_namespace_level): Likewise.
3661 (pushdecl_top_level): Likewise.
3662 (pushdecl_class_level): Likewise.
3663 (push_class_level_binding): Likewise.
3664 (push_using_decl): Likewise.
3665 (push_using_directive): Likewise.
3666 (push_overloaded_decl): Likewise.
3667 (lookup_label): Likewise.
3668 (define_label): Likewise.
3669 (lookup_tag): Likewise.
3670 (lookup_tag_reverse): Likewise.
3671 (lookup_namespace_name): Likewise.
3672 (select_decl): Likewise.
3673 (unqualified_namespace_lookup): Likewise.
3674 (lookup_name_real): Likewise.
3675 (lookup_name_current_level): Likewise.
3676 (lookup_type_current_level): Likewise.
3677 (maybe_inject_for_scope_var): Likewise.
3678 (xref_tag): Likewise.
3680 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3682 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
3684 * decl.c (build_enumerator): Remove unneeded test.
3686 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
3688 * cp-tree.h (struct lang_type_header): Make all fields unsigned
3691 2003-02-03 Mark Mitchell <mark@codesourcery.com>
3694 * call.c (z_candidate): Add args.
3695 (convert_class_to_reference): Set it.
3696 (implicit_conversion): Tidy.
3697 (add_candidate): Add args parameter.
3698 (add_function_candidate): Adjust call to add_candidate.
3699 (add_conv_candidate): Likewise.
3700 (build_builtin_candidate): Likewise.
3701 (build_user_type_conversion_1): Eliminate wasteful tree_cons
3703 (build_new_function_call): Likewise.
3704 (build_object_call): Likewise.
3705 (add_candidates): New function.
3706 (build_new_op): Use it.
3707 (covert_like_real): Adjust call to build_over_call.
3708 (build_over_call): Remove args parameter.
3709 * operators.def: Add <?= and >?=.
3711 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
3713 * typeck.c (build_indirect_ref): Don't check flag_volatile.
3715 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3718 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3720 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3722 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3723 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3724 (BINFO_LANG_ELTS): New #define.
3725 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3727 2003-01-30 Geoffrey Keating <geoffk@apple.com>
3729 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3731 2003-01-30 Mark Mitchell <mark@codesourcery.com>
3733 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3735 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3736 rather than TYPE_LANG_FLAG_0.
3737 (TYPE_BUILT_IN): Remove.
3738 (TYPE_DEPENDENT_P): New macro.
3739 (TYPE_DEPENDENT_P_VALID): Likewise.
3740 (lang_type_class): Add fields_readonly.
3741 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3742 * pt.c (dependent_type_p_r): New function, split out from ...
3743 (dependent_type_p): ... here. Memoize results.
3744 * search.c (dependent_base_p): Use dependent_type_p, not
3745 uses_template_parms.
3746 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3749 2003-01-29 Mark Mitchell <mark@codesourcery.com>
3751 * call.c (build_field_call): Use build_new_op, not build_opfncall.
3752 (prep_operand): New function.
3753 (build_new_op): Use it. Remove dead code.
3754 * class.c (pushclass): Change "modify" parameter type from int to
3756 (currently_open_class): Use same_type_p, not pointer equality.
3757 (push_nested_class): Adjust calls to pushclass, remove modify
3759 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3760 (pushclass): Change prototype.
3761 (push_nested_class): Likewise.
3762 (grokoptypename): Remove.
3763 (build_opfncall): Remove.
3764 (value_dependent_expression_p): Declare.
3765 (resolve_typename_type): Likewise.
3766 (resolve_typename_type_in_current_instantiation): Likewise.
3767 (enter_scope_of): Remove.
3769 (tsubst_expr): Likewise.
3770 (tsubst_copy): Likewise.
3771 (tsubst_copy_and_build): Likewise.
3772 * decl.c (warn_about_implicit_typename_lookup): Remove.
3773 (finish_case_label): Return error_mark_node for erroneous labels.
3774 (start_decl): Adjust calls to push_nested_class.
3775 (grokfndecl): Call push_scope/pop_scope around call to
3777 (grokdeclarator): Do not call tsubst.
3778 (start_function): Adjust calls to push_nested_class.
3779 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3780 (check_classfn): Use push_scope/pop_scope around type comparisions.
3781 (grokoptypename): Remove.
3782 (push_sscope): Adjust call to push_nested_class.
3783 * error.c (dump_type): Show cv-qualification of typename types.
3784 * init.c (build_member_call): Use build_new_op, not
3786 * method.c (build_opfncall): Remove.
3787 * parser.c (cp_parser): Add allow_non_constant_expression_p and
3788 non_constant_expression_p.
3789 (cp_parser_constant_expression): Adjust prototype.
3790 (cp_parser_resolve_typename_type): Remove.
3791 (cp_parser_non_constant_expression): New function.
3792 (cp_parser_non_constant_id_expression): Likewise.
3793 (cp_parser_new): Set allow_non_constant_expression_p and
3794 non_constant_expression_p.
3795 (cp_parser_primary_expression): Reject `this' and `va_arg' in
3796 constant-expressions. Note that dependent names aren't really
3798 (cp_parser_postfix_expression): Reject conversions to non-integral
3799 types in constant-expressions. Neither are increments or
3801 (cp_parser_unary_expression): Reject increments and decrements in
3802 constant-expressions.
3803 (cp_parser_direct_new_declarator): Adjust call to
3804 cp_parser_constant_expression.
3805 (cp_parser_cast_expression): Reject conversions to non-integral
3806 types in constant-expressions.
3807 (cp_parser_assignment_expression): Rejects assignments in
3808 constant-expressions.
3809 (cp_parser_expression): Reject commas in constant-expressions.
3810 (cp_parser_labeled_statement): Adjust call to
3811 cp_parser_constant_expression.
3812 (cp_parser_direct_declarator): Simplify array bounds, even in
3813 templates, when they are non-dependent. Use
3814 resolve_typename_type, not cp_parser_resolve_typename_type.
3815 (cp_parser_class_head): Use resolve_typename_type, not
3816 cp_parser_resolve_typename_type.
3817 (cp_parser_member_declaration): Adjust call to
3818 cp_parser_constant_expression.
3819 (cp_parser_constant_initializer): Likewise.
3820 (cp_parser_constructor_declarator): Use resolve_typename_type, not
3821 cp_parser_resolve_typename_type.
3822 (cp_parser_late_parsing_default_args): Adjust call to
3824 * pt.c (tsubst): Give it internal linkage.
3825 (tsubst_expr): Likewise.
3826 (tsubst_copy): Likewise.
3827 (tsubst_copy_and_build): Likewise.
3828 (push_access_scope_real): Likewise.
3829 (tsubst_friend_class): Likewise.
3830 (instantiate_class_template): Adjust call to pushclass.
3831 (value_dependent_expression_p): Give it external linkage.
3833 (resolve_typename_type): New function.
3834 * semantics.c (finish_call_expr): Use build_new_op, not
3836 (begin_constructor_declarator): Remove.
3837 (begin_class_definition): Adjust call to pushclass.
3838 (enter_scope_of): Remove.
3839 * typeck.c (comptypes): Resolve typename types as appropriate.
3840 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
3841 (build_x_compound_expr): Likewise.
3842 (build_modify_expr): Likewise.
3843 (build_x_modify_expr): Likewise.
3844 * typeck2.c (build_x_arrow): Likewise.
3846 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
3848 * pt.c (last_pending_template) Declare GTY().
3850 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3853 * parser.c (cp_parser_elaborated_type_specifier): Convert
3854 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
3855 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
3857 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
3860 * pt.c (unify): Don't unify '*T' with 'U C::*'.
3863 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3864 inside a declarator.
3866 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
3868 * class.c (update_vtable_entry_for_fn): Add index parameter.
3869 Generate vcall thunk for covariant overriding from a virtual
3871 (dfs_modify_vtables): Adjust.
3873 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
3876 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3878 (cp_parser_base_specifier): Look for and consume a
3879 TEMPLATE keyword. Replace switch with array index.
3882 * semantics.c (finish_non_static_data_member): Remember the
3883 field's type even in a template.
3886 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3890 * parser.c (cp_parser_cast_expression): Be more tentative.
3892 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3894 * cp-tree.h (flagged_type_tree_s): Remove.
3895 (check_for_new_type): Likewise.
3896 * typeck2.c (check_for_new_type): Likewise.
3898 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
3900 * dump.c: ANSIfy function declarations and definitions.
3902 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
3904 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3907 * init.c (build_new): Set the type of the new-expression, even
3908 when processing_templte_decl.
3911 * parser.c (cp_parser_primary_expression): Improve error message
3912 for templates used in an expression context.
3915 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3916 parse when encountering "typedef".
3918 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3920 * class.c, parser.c: ANSIfy function definitions and declarations.
3922 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3925 * error.c (dump_decl): For an OVERLOAD, just print the name of the
3926 function; it doesn't make sense to try to print its type.
3927 * semantics.c (finish_typeof): Issue errors about invalid uses.
3930 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3932 (cp_parser_expression_statement): Use it.
3933 (cp_parser_explicit_instantiation): Likewise.
3934 * pt.c (do_decl_instantiation): Improve error handling logic.
3936 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3939 * parser.c (cp_parser_using_declaration): Issue error messages
3940 about name resolution failures here.
3943 * class.c (currently_open_derived_class): Use dependent_type_p.
3944 * cp-tree.h (dependent_type_p): New function.
3945 (dependent_template_arg_p): Likewise.
3946 (dependent_template_p): Likewise.
3947 (type_dependent_expression_p): Likewise.
3948 * parser.c (cp_parser_dependent_type_p): Remove.
3949 (cp_parser_value_dependent_type_p): Likewise.
3950 (cp_parser_type_dependent_expression_p): Likewise.
3951 (cp_parser_dependent_template_arg_p): Likewise.
3952 (cp_parser_dependent_template_id_p): Likewise.
3953 (cp_parser_dependent_template_p): Likewise.
3954 (cp_parser_diagnose_invalid_type_name): Replace
3955 cp_parser_dependent_type_p with dependent_type_p, etc.
3956 (cp_parser_primary_expresion): Likewise.
3957 (cp_parser_nested_name_specifier_opt): Likewise.
3958 (cp_parser_postfix_expression): Likewise.
3959 (cp_parser_unary_expression): Likewise.
3960 (cp_parser_template_name): Likewise.
3961 (cp_parser_class_name): Likewise.
3962 (cp_parser_lookup_name): Likewise.
3963 * pt.c (dependent_type_p): New function.
3964 (value_dependent_expression_p): Likewise.
3965 (type_dependent_expression_p): Likewise.
3966 (dependent_template_arg_p): Likewise.
3967 (dependent_template_id_p): Likewise.
3968 (dependent_template_p): Likewise.
3972 * parser.c (cp_parser_simple_declaration): Return quickly when
3973 encountering errors.
3975 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3977 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3979 2003-01-17 Jason Merrill <jason@redhat.com>
3981 PR c++/9167, c++/9358
3982 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3984 2003-01-17 Jason Merrill <jason@redhat.com>
3987 * call.c (build_conditional_expr): Always do lvalue-rvalue
3990 2003-01-17 Mark Mitchell <mark@codesourcery.com>
3993 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3994 * cp-tree.h (BASELINK_BINFO): Adjust.
3995 (BASELINK_FUNCTIONS): Likewise.
3996 (BASELINK_ACCESS_BINFO): Likewise.
3997 (tree_baselink): New structure.
3998 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3999 (lang_tree_node): Add baselink.
4000 * decl.c (cp_tree_node_structure): Add BASELINK case.
4001 * search.c (build_baselink): Adjust.
4002 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
4003 test from TREE_LIST case.
4006 * parser.c (cp_parser_constructor_declarator_p): Do not assume
4007 that a constructor cannot be declared outside of its own class.
4009 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4010 be resolved, neither can the qualified name.
4012 * rtti.c (get_pseudo_ti_desc): Fix thinko.
4014 2003-01-16 Jason Merrill <jason@redhat.com>
4017 * init.c (build_vec_init): Re-add maxindex parm.
4018 (perform_member_init, build_aggr_init): Pass it.
4019 (build_new_1): Pass it. Use an incomplete array type for full_type.
4020 * typeck.c (build_modify_expr): Pass it.
4021 * cp-tree.h: Adjust.
4023 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
4025 * cp-tree.h (tsubst_copy_and_build): New declaration.
4026 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4027 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
4028 (tsubst_copy_and_build): New function.
4030 2003-01-16 Mark Mitchell <mark@codesourcery.com>
4032 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4033 (PARTIAL_INSTANTIATION_P): Remove.
4034 (IMPLICIT_TYPENAME_P): Likewise.
4035 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4036 (build_typename_type): Remove declaration.
4037 (parmlist_is_exprlist): Likewise.
4038 * decl.c (build_typename_type): Make it static, remove third
4040 (push_class_binding): Don't do implicit typename stuff.
4041 (make_typename_type): Likewise.
4042 (lookup_name_real): Likewise.
4043 (grokdeclarator): Don't try to convert declarations into
4044 initializations. Don't do implicit typename stuff.
4045 (parmlist_is_exprlist): Remove.
4046 (xref_basetypes): Simplify.
4047 * decl2.c (grokfield): Don't try to convert declarations into
4049 (build_anon_union_vars): Do this while processing templates, too.
4050 (finish_anon_union): Likewise.
4051 * error.c (dump_type): Remove implicit typename handling.
4052 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4053 (cp_parser_primary_expression): Correct handling of names not
4054 found by unqualified name lookup in templates.
4055 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4056 of types when possible.
4057 (cp_parser_simple_declaration): Complain intelligently about some
4058 invalid declarations.
4059 (cp_parser_member_declaration): Likewise.
4060 (cp_parser_constructor_declarator_p): Don't check when we're in a
4062 * pt.c (instantiate_class_template): Remove
4063 PARTIAL_INSTANTIATION_P gunk.
4064 * search.c (lookup_field_r): Don't build implicit typenames.
4065 (marked_pushdecls_p): Don't enter dependent base types.
4066 (unmarked_pushdecls_p): Likewise.
4067 * semantics.c (begin_class_definition): Remove implicit typename
4070 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
4073 * parser.c (cp_parser_direct_declarator): If accepting either
4074 abstract or named, the name must be an unqualified-id.
4076 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4078 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4080 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4082 * decl2.c (check_classfn): Fix uninitialized warning.
4083 (build_anon_union_vars): Likewise.
4084 * pt.c (tsubst_copy): Likewise.
4086 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
4088 Further conform g++'s __vmi_class_type_info to the C++ ABI
4090 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4092 (class_hint_flags): Likewise.
4094 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4096 * config-lang.in: Add semantics.c to gtfiles.
4097 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4098 (saved_scope): Likewise.
4099 (type_lookups): Remove.
4100 (deferred_access): New structure.
4101 (type_access_control): Remove.
4102 (save_type_access_control): Likewise.
4103 (reset_type_access_control): Likewise.
4104 (decl_type_access_control): Likewise.
4105 (push_deferring_access_checks): Declare.
4106 (resume_deferring_access_checks): Likewise.
4107 (stop_deferring_access_checks): Likewise.
4108 (pop_deferring_access_checks): Likewise.
4109 (get_deferred_access_checks): Likewise.
4110 (pop_to_parent_deferring_access_checks): Likewise.
4111 (perform_deferred_access_checks): Likewise.
4112 (perform_or_defer_access_check): Likewise.
4113 * decl.c (make_typename_type): Use perform_or_defer_access_check.
4114 (make_unbound_class_template): Likewise.
4115 (grokdeclarator): Don't call decl_type_access_control.
4116 * parser.c (cp_parser_context): Remove deferred_access_checks
4117 and deferring_access_checks_p fields.
4118 (cp_parser_context_new): Adjust.
4119 (cp_parser): Remove access_checks_lists.
4120 (cp_parser_defer_access_check): Remove.
4121 (cp_parser_start_deferring_access_checks): Remove.
4122 (cp_parser_stop_deferring_access_checks): Remove.
4123 (cp_parser_perform_deferred_access_checks): Remove.
4124 (cp_parser_nested_name_specifier_opt): Use new deferred access
4126 (cp_parser_simple_declaration): Likewise.
4127 (cp_parser_template_id): Likewise.
4128 (cp_parser_function_definition): Likewise.
4129 (cp_parser_class_specifier): Likewise.
4130 (cp_parser_lookup_name): Likewise.
4131 (cp_parser_single_declaration): Likewise.
4132 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4133 (cp_parser_parse_tentatively): Likewise.
4134 (cp_parser_parse_definitely): Likewise.
4135 (yyparse): Likewise.
4136 (cp_parser_init_declarator): Remove access_checks parameter.
4137 Use new deferred access functions.
4138 (cp_parser_function_definition_from_specifiers_and_declarator):
4140 (cp_parser_class_head): Remove deferring_access_checks_p and
4141 saved_access_checks parameters. Use new deferred access functions.
4142 (cp_parser_member_specification_opt): Don't call
4143 reset_type_access_control.
4144 * search.c (type_access_control): Remove.
4145 * semantics.c: Include "gt-cp-semantics.h".
4146 (deferred_type_access_control): Remove.
4147 (deferred_access_stack): New variable.
4148 (deferred_access_free_list): Likewise.
4149 (push_deferring_access_checks): New function.
4150 (resume_deferring_access_checks): Likewise.
4151 (stop_deferring_access_checks): Likewise.
4152 (pop_deferring_access_checks): Likewise.
4153 (get_deferred_access_checks): Likewise.
4154 (pop_to_parent_deferring_access_checks): Likewise.
4155 (perform_deferred_access_checks): New function, adapted from
4156 cp_parser_perform_deferred_access_checks.
4157 (perform_or_defer_access_check): New function, adapted from
4158 cp_parser_defer_access_check.
4159 (current_type_lookups): Remove.
4160 (deferred_type_access_control): Likewise.
4161 (decl_type_access_control): Likewise.
4162 (save_type_access_control): Likewise.
4163 (reset_type_access_control): Likewise.
4164 (begin_function_definition): Adjust.
4165 (begin_class_definiton): Likewise.
4167 2003-01-13 Jason Merrill <jason@redhat.com>
4170 * class.c (build_base_path): Take the address before calling save_expr.
4172 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4173 all the ambiguous conversions are bad.
4175 * class.c (maybe_warn_about_overly_private_class): Don't stop
4176 searching when we find a nonprivate method.
4178 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4180 2003-01-12 Mark Mitchell <mark@codesourcery.com>
4182 * cp-tree.h (get_arglist_len_in_bytes): Remove.
4185 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4186 typeame types more robustly.
4188 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
4190 * parser.c: Fix comment typos.
4192 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4195 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4196 an object_type which is not a class type.
4198 2003-01-10 Geoffrey Keating <geoffk@apple.com>
4200 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4201 (cp_parser_late_parsing_default_args): Likewise.
4203 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
4205 * cfns.gperf: ANSIfy function declarations.
4206 * cfns.h: Regenerate.
4207 * cp-tree.h: ANSIfy function declarations.
4209 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4211 * cp-tree.h (reparse_absdcl_as_expr): Remove.
4212 (reparse_absdcl_as_casts): Likewise.
4213 (reparse_decl_as_expr): Likewise.
4214 (finish_decl_parsing): Likewise.
4215 * decl2.c (reparse_absdcl_as_expr): Remove.
4216 (reparse_absdcl_as_casts): Likewise.
4217 (repase_decl_as_expr): Likewise.
4218 (finish_decl_parsing): Likewise.
4223 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4225 (cp_parser_nested_name_specifier_opt): Correct the
4226 check_dependency_p false.
4227 (cp_parser_postfix_expression): Fix formatting.
4228 (cp_parser_decl_specifier_seq): Avoid looking for constructor
4229 declarators when possible.
4230 (cp_parser_template_id): Avoid performing name-lookup when
4232 (cp_parser_class_head): Do not count specializations when counting
4233 levels of templates.
4234 (cp_parser_constructor_declarator_p): Return immediately if
4235 there's no chance that the tokens form a constructor declarator.
4236 * rtti.c (throw_bad_typeid): Add comment. Do not return an
4237 expression with reference type.
4238 (get_tinfo_decl_dynamic): Do not return an expression with
4240 (build_typeid): Add comment. Do not return an expression with
4242 * typeck.c (build_class_member_access_expr): Improve handling of
4243 conditionals and comma-expressions as objects.
4245 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4247 * cfns.gperf: ANSIfy function declarations.
4248 * cfns.h: Regenerate.
4249 * cp-tree.h: ANSIfy function declarations.
4250 * parser.c: ANSIfy function declarations & definitions.
4252 * decl.c (bad_specifiers): Fix parameter order error I introduced.
4254 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4256 Merge from pch-branch:
4258 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4260 Merge to tag pch-merge-20030102:
4262 * semantics.c (finish_translation_unit): Don't call finish_file.
4263 * parser.c: Don't include ggc.h.
4264 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4265 read first token here. Don't allow PCH files after the first
4267 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4268 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4269 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4270 (cp_parser_late_parsing_for_member): Don't duplicate call to
4271 cp_lexer_set_source_position_from_token.
4272 (cp_parser_late_parsing_default_args): Likewise.
4273 (yyparse): Call finish_file after clearing the_parser.
4275 2002-12-11 Geoffrey Keating <geoffk@apple.com>
4277 * Make-lang.in: Remove $(GGC_H) from all dependencies.
4278 (CXX_TREE_H): Add $(GGC_H).
4279 * class.c: Don't include ggc.h.
4280 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4281 (method_name_cmp): Likewise.
4282 (resort_data): New variable.
4283 (resort_field_decl_cmp): New.
4284 (resort_method_name_cmp): New.
4285 (resort_sorted_fields): New.
4286 (resort_type_method_vec): New.
4287 (finish_struct_methods): Delete cast.
4288 (finish_struct_1): Delete cast.
4289 * cp-tree.h: Include ggc.h.
4290 (struct lang_type_class): Add reorder attribute to field `methods'.
4291 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4292 (resort_sorted_fields): New prototype.
4293 (resort_type_method_vec): New prototype.
4294 * call.c: Don't include ggc.h.
4296 * decl2.c: Likewise.
4299 * method.c: Likewise.
4300 * optimize.c: Likewise.
4301 * parse.y: Likewise.
4304 * search.c: Likewise.
4305 * semantics.c: Likewise.
4309 * lang-specs.h: Remove comment.
4311 2002-12-03 Geoffrey Keating <geoffk@apple.com>
4313 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4314 (operator_name_info): Mark to be saved for PCH, specify size.
4315 (assignment_operator_name_info): Likewise.
4317 2002-11-19 Geoffrey Keating <geoffk@apple.com>
4319 * decl.c (anon_cnt): Mark to be saved for PCH.
4321 2002-10-25 Geoffrey Keating <geoffk@apple.com>
4323 * lex.c (init_reswords): Delete now-untrue comment.
4324 Allocate ridpointers using GGC.
4326 2002-10-04 Geoffrey Keating <geoffk@apple.com>
4328 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4330 * g++spec.c (lang_specific_driver): Don't include standard
4331 libraries in `added'.
4333 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
4335 * decl2.c (finish_file): Call c_common_write_pch.
4336 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4338 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
4340 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4341 files when using g++.
4342 * lang-specs.h: Handle compiling C++ header files.
4344 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4346 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4348 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4350 * pt.c (push_access_scope_real): Call push_to_top_level for
4351 function in namespace scope.
4352 (pop_access_scope): Call pop_from_top_level for function in
4355 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4357 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4359 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
4361 * Make-lang.in (c++.install-common, c++.install-man,
4362 c++.uninstall): Prepend $(DESTDIR) to destination paths in
4363 all (un)installation commands.
4364 (c++.install-common): Rewrite $(LN) commands to support
4365 DESTDIR with "ln" as well as with "ln -s".
4367 2003-01-08 Jason Merrill <jason@redhat.com>
4369 * parser.c (cp_parser_primary_expression): See through explicitly
4370 scoped ALIAS_DECLs, too.
4372 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
4374 * decl.c: Remove some #if 0 code.
4376 * decl.c: ANSIfy function declarations.
4378 2003-01-07 Mark Mitchell <mark@codesourcery.com>
4380 * parser.c (cp_parser_asm_definition): Correct handling of omitted
4383 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4386 * decl.c (make_typename_type): Check access only when tf_error.
4387 (make_unbound_class_template): Likewise.
4388 * pt.c (saved_access_scope): New variable.
4389 (push_access_scope_real): New function.
4390 (push_access_scope): Likewise.
4391 (pop_access_scope): Likewise.
4392 (tsubst_default_argument): Use them.
4393 (instantiate_template): Likewise.
4394 (regenerate_decl_from_template): Likewise.
4395 (instantiate_decl): Likewise.
4396 (get_mostly_instantiated_function_type): Likewise.
4398 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
4400 * tree.c: Delete bogus #if 0 code.
4402 2003-01-07 Andreas Schwab <schwab@suse.de>
4404 * class.c (layout_class_type): Don't use
4405 PCC_BITFIELD_TYPE_MATTERS if not defined.
4407 2003-01-06 Mark Mitchell <mark@codesourcery.com>
4410 * decl2.c (build_cleanup): Mark the object as used.
4412 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4413 (hash_local_specialization): New function.
4414 (register_local_specialization): Revert 2003-01-05 change.
4415 (instantiate_decl): Use hash_local_specialization when creating
4416 the local_specializations table.
4418 * decl2.c (mark_used): Do not synthesize thunks.
4420 * class.c (layout_class_type): Correct handling of unnamed
4421 bitfields wider than their types.
4424 * parser.c (cp_parser): Remove default_arg_types. Update
4425 documentation for unparsed_functions_queues.
4426 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
4428 (cp_parser_new): Don't set parser->default_arg_types.
4429 (cp_parser_function_definition): Adjust usage of
4430 unparsed_funtions_queues.
4431 (cp_parser_class_specifier): Don't mess with
4432 parser->default_arg_types. Handle default argument processing in
4433 a separate phase from function body processing.
4434 (cp_parser_template_declaration_after_export): Adjust usage of
4435 unparsed_functions_queues.
4436 (cp_parser_late_parsing_for_member): Do not handle default
4439 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
4442 * parser.c (cp_parser_declarator_kind): New enum.
4443 (cp_parser_declarator): Adjust.
4444 (cp_parser_direct_declarator): Adjust. Allow for either named or
4445 abstract declarator. Prefer abstract, if possible. Allow
4446 parenthesized function name.
4447 (cp_parser_condition): Adjust cp_parser_declarator call.
4448 (cp_parser_explicit_instantiation): Likewise.
4449 (cp_parser_init_declarator): Likewise.
4450 (cp_parser_type_id): Likewise.
4451 (cp_parser_function_definition): Likewise.
4452 (cp_parser_member_declaration): Likewise.
4453 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
4454 the tentative parsing.
4455 (cp_parser_exception_declaration): Likewise.
4457 2003-01-05 Mark Mitchell <mark@codesourcery.com>
4459 * parser.c (cp_parser_template_parameter): Adjust call to
4460 cp_parser_parameter_declaration.
4461 (cp_parser_parameter_declaration_list): Likewise.
4462 (cp_parser_parameter_declaration): Replace
4463 greater_than_is_operator_p with template_parm_p parameter. Do not
4464 cache tokens for template default arguments.
4466 * pt.c (retrieve_local_specialization): Use htab_find, not
4467 htab_find_with_hash.
4468 (register_local_specialization): Use htab_find_slot, not
4469 htab_find_slot_with_hash.
4470 (instantiate_decl): Pass a hash function to htab_create.
4472 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4474 * parser.c (cp_parser_binary_expression,
4475 cp_parser_multiplicative_expression,
4476 cp_parser_additive_expression, cp_parser_shift_expression,
4477 cp_parser_relational_expression, cp_parser_equality_expression,
4478 cp_parser_and_expression, cp_parser_exclusive_or_expression,
4479 cp_parser_inclusive_or_expression,
4480 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
4481 cp_parser_binary_expression): Const-ify.
4483 2003-01-04 Mark Mitchell <mark@codesourcery.com>
4485 * method.c (use_thunk): Disable access control while building the
4488 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
4490 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
4493 2003-01-03 Matt Austern <austern@apple.com>
4495 * cp-tree.h (struct lang_type_class): add field for key method
4496 (cp_global_trees): rename dynamic_classes to keyed_classes
4497 (key_method): add definition
4498 * class.c (finish_struct_1): compute class's key method, and add
4499 the class to keyed_classes list if there is no key method.
4500 * decl.c (finish_function): add class to keyed_classes list if we
4501 see a definition of the class's key method.
4502 * pt.c (instantiate_class_template): add template specialization
4503 of a dynamic class to keyed_classes list.
4504 * decl2.c (key_method): remove
4505 (finish_file): iterate only through keyed_classes list when
4506 deciding whether to emit vtables, remove class from its list after
4509 2003-01-02 Jason Merrill <jason@redhat.com>
4511 * call.c (build_conditional_expr): Stabilize lvalues properly.
4512 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
4513 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
4514 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
4516 * call.c (convert_like_real): Call decl_constant_value for an
4517 IDENTITY_CONV even if there are no more conversions.
4519 * cvt.c (build_up_reference): Don't push unnamed temps.
4521 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
4523 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
4524 for a backend struct.
4526 * except.c (wrap_cleanups_r, build_throw): Make
4527 MUST_NOT_THROW_EXPRs void.
4528 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
4530 * init.c (build_vec_delete_1): Pre-evaluate the base address.
4532 * init.c (get_temp_regvar): Simplify logic.
4534 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
4535 our replacement is a decl.
4537 * decl.c (cp_make_fname_decl): Push the decls inside the
4540 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
4543 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
4546 2003-01-03 Graham Stott <graham.stott@btinternet.com>
4548 * parser.c (struct cp_parser): Add access_checks_lists field
4549 (cp_parser_simple_declaration): Use.
4550 (cp_parser_init_declarator): Likewise.
4552 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4554 * parser.c (cp_parser_declaration): Accept the __extension__
4555 keyword before the declaration.
4558 * parser.c (cp_parser_parameter_declaration): Allow attributes to
4559 appear after the declarator.
4561 * call.c (build_new_method_call): Fix typo in message format
4564 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4566 * parser.c (cp_lexer_next_token_is): Declare it inline.
4567 (cp_lexer_set_source_position_from_token): Likewise.
4568 (cp_lexer_debugging_p): Likewise.
4569 (cp_parser_parsing_tentatively): Likewise.
4570 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
4571 to the cp_lexer_peek_token.
4573 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4576 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4578 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
4579 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
4580 cp/repo.c: Fix copyright years.
4582 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
4584 * lex.c: Remove superfluous include of cpplib.h.
4585 (CONSTRAINT): Define without conditions.
4586 (init_cp_pragma): Use c_register_pragma.
4588 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4590 * .cvsignore: Remove.
4592 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
4594 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
4595 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
4596 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
4597 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
4598 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
4600 * lex.h: parse.y is dead, so don't mention it. Also replace the
4601 copyright header with the default GNU copyright header.
4603 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4605 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4606 (lookup_name_namespace_only): Likewise.
4607 (begin_only_namespace_names): Likewise.
4608 (end_only_namespace_names): Likewise.
4609 * decl.c (only_namespace_names): Remove.
4610 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4611 (lookup_name_real): Do not check only_namespace_names.
4612 (lookup_name_namespace_only): Remove.
4613 (begin_only_namespace_names): Likewise.
4614 (end_only_namespace_names): Likewise.
4615 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4616 nested-name-specifiers more gracefully.
4617 (cp_parser_class_or_namespace_name): Avoid looking up namespace
4618 names when they cannot possibly appear.
4619 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4620 (cp_parser_elaborated_type_specifier): Likewise.
4621 (cp_parser_namespace_name): Only look for namespace names.
4622 (cp_parser_lookup_name): Add is_namespace parameter.
4623 (cp_parser_lookup_name_simple): Adjust call to
4624 cp_parser_lookup_name.
4626 * parser.c (cp_parser_dependent_type_p): Fix thinko.
4628 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4630 * .cvsignore: Update.
4632 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
4634 * class.c (modify_vtable_entry): Remove unused variable.
4635 (get_vcall_index): Always expect a non-thunk.
4636 (update_vtable_entry_for_fn): Combine covariant adjustments, when
4637 overriding a thunk. Pass get_vcall_index a non-thunk.
4639 * decl2.c (finish_file): Mark undefined inlines as extern.
4641 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4643 * cp-tree.def (RETURN_INIT): Remove.
4644 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4645 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4646 (note_level_for_for): Remove.
4647 (note_level_for_try): Likewise.
4648 (note_level_for_catch): Likewise.
4649 (finish_named_return_value): Likewise.
4650 (do_pushlevel): Change prototype.
4651 (pending_lang_change): Remove.
4652 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4654 (note_level_for_for): Remove.
4655 (note_level_for_try): Likewise.
4656 (note_level_for_catch): Likewise.
4657 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4658 * parser.c (cp_parser_context_free_list): Make it "deletable".
4659 (cp_parser_template_argument): Remove misleading comment.
4660 * pt.c (tsubst_expr): Remove RETURN_INIT code.
4661 * semantics.c (genrtl_named_return_value): Remove.
4662 (do_pushlevel): Take a scope kind as an argument.
4663 (begin_if_stmt): Adjust.
4664 (begin_while_stmt): Likewise.
4665 (begin_for_stmt): Likewise.
4666 (finish_for_init_stmt): Likewise.
4667 (begin_switch_stmt): Likewise.
4668 (begin_handler): Likewise.
4669 (begin_compound_stmt): Likewise.
4670 (finish_named_return_value): Remove.
4671 (cp_expand_stmt): Remove RETURN_INIT case.
4672 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4674 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4677 * parser.c (cp_parser_direct_declarator): Handle erroneous
4678 parenthesized declarators correctly.
4680 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4682 * cp-tree.h (pending_lang_change): Declare.
4684 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4686 * parser.c (cp_parser_context_free_list): New variable.
4687 (cp_parser_context_new): Use it.
4688 (cp_parser_error): Check return code from
4689 cp_parser_simulate_error.
4690 (cp_parser_simulate_error): Return a value.
4691 (cp_parser_id_expression): Optimize common case.
4692 (cp_parser_class_name): Likewise.
4693 (cp_parser_class_specifier): Adjust call to
4694 cp_parser_late_parsing_default_args.
4695 (cp_parser_lookup_name): Optimize common case.
4696 (cp_parser_late_parsing_for_member): Adjust call to
4697 cp_parser_late_parsing_default_args.
4698 (cp_parser_late_parsing_default_args): Add scope parameter.
4699 (cp_parser_require): Avoid creating the error message unless it's
4701 (cp_parser_parse_definitely): Place free'd contexts on the free
4704 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4706 2002-12-30 David Edelsohn <edelsohn@gnu.org>
4708 * parser.c (cp_parser_parameter_declaration_clause): Treat system
4709 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4711 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4713 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4716 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4720 * Make-lang.in (gt-cp-spew.h): Remove.
4721 * cp-tree.h (do_pending_lang_change): Remove.
4722 (do_identifier): Change prototype.
4723 (finish_id_expr): Remove.
4724 * decl.c (lookup_name_real): Remove yylex variable.
4725 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4726 * lex.c (init_cpp_parse): Remove.
4727 (reduce_cmp): Likewise.
4728 (token_cmp): Likewise.
4730 (lastiddecl): Likewise.
4731 (token_count): Likewise.
4732 (reduce_count): Likewise.
4734 (print_parse_statistics): Likewise.
4735 (do_pending_lang_change): Likewise.
4736 (do_identifier): Remove parsing parameter.
4737 * lex.h (lastiddecl): Remove.
4738 (looking_for_typename): Remove.
4739 (looking_for_template): Likewise.
4740 (pending_lang_change): Likewise.
4742 * semantics.c (finish_id_expr): Remove.
4744 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4747 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4749 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
4750 end, not the C front end.
4752 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
4754 * cp-tree.h (THUNK_TARGET): New macro.
4755 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4756 (finish_thunk): Remove offset parms.
4757 * class.c (find_final_overrider): Look through thunks.
4758 (get_vcall_index): Use THUNK_TARGET.
4759 (update_vtable_entry_for_fn): Look through thunks. Set covariant
4760 fixed offset here. Adjust finish_thunk call.
4761 (build_vtbl_initializer): Adjust finish_thunk calls.
4762 * mangle.c (mangle_call_offset): Remove superfluous if.
4763 (mangle_thunk): Adjust.
4764 * method.c (make_thunk): Adjust.
4765 (finish_thunk): Adjust.
4766 (thunk_adjust): Remove assert.
4767 (use_thunk): Use THUNK_TARGET
4768 * dump1.c (cp_dump_tree): Adjust thunk dumping.
4771 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4772 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4774 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4776 Remove traditional C constructs 4/n.
4777 * decl2.c (grok_method_quals, warn_if_unknown_interface,
4778 grok_x_components, cp_build_parm_decl, build_artificial_parm,
4779 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4780 delete_sanity, check_member_template, check_java_method,
4781 check_classfn, finish_static_data_member_decl, grokfield,
4782 grokbitfield, grokoptypename, grok_function_init,
4783 cplus_decl_attributes, constructor_name, defer_fn,
4784 build_anon_union_vars, finish_anon_union, coerce_new_type,
4785 coerce_delete_type, comdat_linkage, maybe_make_one_only,
4786 key_method, import_export_vtable, import_export_class,
4787 output_vtable_inherit, import_export_decl, import_export_tinfo,
4788 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4789 set_guard, start_objects, finish_objects,
4790 start_static_storage_duration_function,
4791 finish_static_storage_duration_function, get_priority_info,
4792 start_static_initialization_or_destruction,
4793 finish_static_initialization_or_destruction,
4794 do_static_initialization, do_static_destruction,
4795 prune_vars_needing_no_initialization, write_out_vars,
4796 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
4797 add_using_namespace, merge_functions, ambiguous_decl,
4798 lookup_using_namespace, lookup_using_namespace,
4799 qualified_lookup_using_namespace, set_decl_namespace,
4800 decl_namespace, current_decl_namespace, push_decl_namespace,
4801 pop_decl_namespace, push_scope, pop_scope, add_function,
4802 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
4803 lookup_arg_dependent, do_namespace_alias,
4804 validate_nonmember_using_decl, do_nonmember_using_decl,
4805 do_toplevel_using_decl, do_local_using_decl,
4806 do_class_using_decl, do_using_directive, check_default_args,
4807 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
4808 * parser.c (cp_parser_class_head): Use booleanss.
4809 * decl.c (walk_globals, walk_vtables): Likewise.
4810 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
4811 walk_globals): Change return type from 'int' to 'bool'.
4812 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
4813 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
4814 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
4815 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
4816 qualifier_flags, tinfo_base_init, generic_initializer,
4817 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
4818 dfs_class_hint_unmark, class_hint_flags, class_initializer,
4819 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
4820 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
4821 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
4822 * repo.c (repo_compile_flags, repo_template_declared,
4823 repo_template_defined, repo_class_defined, repo_get_id,
4824 repo_template_used, repo_vtable_used, repo_inline_used,
4825 repo_tinfo_used, repo_template_instantiated, extract_string,
4826 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
4827 finish_repo): Likewise.
4828 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
4829 cxx_print_xnode): Likewise..
4830 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
4831 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4832 * cxxfilt.c (demangle_it, print_demangler_list, usage,
4833 standard_symbol_characters, hp_symbol_characters, main, fatal):
4835 (strip_underscore): Change type from 'int' to 'bool'.
4836 (main): Use boolean constants.
4838 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4840 Remove traditional C constructs 3/n.
4841 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
4842 build_up_reference, warn_ref_binding, convert_to_reference,
4843 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
4844 convert_to_void, convert, convert_force, build_type_conversion,
4845 build_expr_type_conversion, type_promotes_to,
4846 perform_qualification_conversions): Use C90 prototyping style.
4847 * decl2.c (grok_array_decl): Use boolean constant.
4848 (delete_sanity): Likewise.
4849 * typeck.c (build_unary_op): Likewise.
4850 * semantics.c (finish_switch_cond): Likewise.
4851 * parser.c (cp_parser_direct_new_declarator): Likewise.
4852 * init.c (build_new): Likewise.
4854 2002-12-27 Mark Mitchell <mark@codesourcery.com>
4856 * Make-lang.in (po-generated): Remove parse.c.
4857 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
4858 ($(srcdir)/cp/parse.h): Remove target.
4859 ($(srcdir)/cp/parse.c): Likewise.
4860 (gt-cp-parse.h): Likewise.
4861 (gt-cp-parser.h): New target.
4862 (c++.distclean): Do not remove parse.output.
4863 (c++.maintainer-clean): Do not remove parse.c or parse.h.
4864 (cp/spew.o): Remove target.
4865 (cp/lex.o): Adjust dependencies.
4866 (cp/pt.o): Likewise.
4867 (cp/parse.o): Likewise.
4868 (cp/TAGS): Do not mention parse.c.
4869 (cp/parser.o): New target.
4870 * NEWS: Mention the new parser.
4871 * call.c (build_scoped_method_call): Simplify.
4872 (build_method_call): Likewise.
4873 (build_new_function_call): Adjust calls to add_function_candidate
4874 and add_template_candidate.
4875 (build_new_op): Improve handling of erroroneous operands.
4876 (convert_default_arg): Remove circular argument processing.
4877 (name_as_c_string): New function.
4878 (build_new_method_call): Use it.
4879 (perform_implicit_conversion): Use error_operand_p.
4880 * class.c (finish_struct_anon): Use constructor_name_p.
4881 (check_field_decls): Likewise.
4882 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4883 (resolve_address_of_overloaded_function): Likewise.
4884 (instantiate_type): Tweak pointer-to-member handling.
4885 (get_primary_binfo): Remove incorrect assertion.
4886 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4887 * cp-tree.h (DEFARG_TOKENS): New macro.
4888 (default_arg): New structure.
4889 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4890 (lang_tree_node): Add default_arg.
4891 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4892 (type_info_ref_type): New macro.
4893 (saved_scope): Make processing_explicit_instantiation a boolean.
4894 (check_access): New field.
4895 (unparsed_text): Remove.
4896 (language_function): Remove unparsed_inlines.
4897 (error_operand_p): New macro.
4898 (lang_decl): Adjust pending_inline_info.
4899 (DEFARG_POINTER): Remove.
4900 (tag_types): Add typenames.
4901 (lookup_ualified_name): Declare.
4902 (lookup_name_real): Likewise.
4903 (shadow_tag): Adjust prototype.
4904 (get_scope_of_declarator): Declare it.
4905 (process_next_inline): Remove it.
4906 (check_for_missing_semicolon): Likewise.
4907 (maybe_get_template_decl_from_type_decl): Declare it.
4908 (finish_label_stmt): Adjust prototype.
4909 (finish_non_static_data_meber): Declare it.
4910 (finish_pseudo_destructor_call_expr): Rename to ...
4911 (finish_pseudo_destructor_expr): ... this.
4912 (finish_compound_literal): Declare it.
4913 (begin_inline_definitions): Remove it.
4914 (init_spew): Remove.
4915 (peekyylex): Likewise.
4916 (arbitrate_lookup): Likewise.
4917 (frob_opname): Likewise.
4918 (maybe_snarf_defarg): Likewise.
4919 (add_defarg_fn): Likewise.
4920 (do_pending_defargs): Likewise.
4921 (done_pending_defargs): Likewise.
4922 (unprocessed_defarg_fn): Likewise.
4923 (replace_defarg): Likewise.
4924 (end_input): Likewise.
4925 (get_overloaded_fn): Likewise.
4926 * cvt.c (convert_to_reference): Improve error handling.
4927 * decl.c (lookup_name_real): Do not declare it static.
4928 (maybe_push_to_top_level): Set check_access.
4929 (identifier_type_value): Adjust call to lookup_name_real.
4930 (lookup_qualified_name): New method.
4931 (lookup_name_real): Remove special-case parsing code.
4932 (lookup_name-nonclass): Adjust call to lookup_name_real.
4933 (lookup_name_namespace_only): Likewise.
4934 (lookup_name): Likewise.
4935 (check_tag_decl): Return the type declared.
4936 (shadow_tag): Likewise.
4937 (register_dtor_fn): Tweak check_access.
4938 (grokfndecl): Use constructor_name_p.
4939 (get_scope_of_declarator): New function.
4940 (grokdeclarator): Obscure tweaks for slightly different declarator
4942 (start_method): Return error_mark_node to indicate failure.
4943 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
4944 * decl2.c (constructor_name_full): Simplify.
4945 (constructor_name): Use it.
4946 (build_expr_from_tree): Adjust for changes to do new parser.
4947 (push_scope): Improve robustness.
4948 (validate_nonmember_using_decl): Process declarations, not names.
4949 (do_class_using_decl): Likewise.
4950 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4952 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4953 * expr.c (cxx_expand_expr): Handle BASELINKs.
4954 * init.c (member_init_ok_or_else): Issue more errors.
4955 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4956 * lex.c: Do not include parse.h.
4957 (yypring): Do not declare.
4959 (make_reference_declarator): Remove error-generating code.
4960 (rid_to_yy): Remove.
4961 (cxx_init): Do not call init_spew.
4963 (check_for_missing_semicolon): Remove.
4964 * lex.h (got_scope): Remove.
4965 (got_object): Remove.
4966 * method.c (hack_identifier): Use finish_non_static_data_member.
4967 (implicitly_declare_fn): Adjust use of constructor_name.
4968 * parser.c: New file.
4969 * pt.c (parse.h): Do not include it.
4970 (maybe_get_template_decl_from_template): Do not declare it.
4971 (finish_member_template_decl): Tweak.
4972 (begin_explicit_instantiation): Adjust for
4973 processing_explicit_instantiation being boolean.
4974 (end_explicit_instantiation): Likewise.
4975 (maybe_process_partial_specialization): Tighten specialization
4977 (retrieve_local_specialization): Adjust ue of hash table.
4978 (eq_local_specializations): New function.
4979 (register_local_specialization): Likewise.
4980 (push_template_decl_real): Remove unnecessary test.
4981 (maybe_get_template_decl_from_type_decl): Don't make it static.
4982 (for_each_template_parm_r): Handle TYPEOF_TYPE.
4983 (tsubst_copy): Use retrieive_local_specialization to handle
4984 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
4985 Handle COMPONENT_REFs with pseudo-destructor-expressions.
4986 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4987 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4988 (unify): Tweak handling of CONST_DECLs.
4989 (regenerate_decl_from_template): Use push_nested_class.
4990 (template_for_substitution): New funciton.
4991 (instantiate_decl): Use it. Register parameters as local
4993 * rtti.c (init_rtti_processing): Set type_info_ref_type.
4994 (build_typeid): Use it.
4995 (get_typeid): Likeise.
4996 * search.c (accessible_p): Use check_access, not
4997 flag_access_control.
4998 (adjust_result_of_qualified_name_lookup): Pay attention to the
5000 * semantics.c (finish_asm_stmt): Adjust error handling.
5001 (finish_label_stmt): Return the statement.
5002 (finish_non_static_data_member): New function.
5003 (finish_class_expr): Handle BASELINKs.
5004 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5005 (finish_object_call_expr): Simplify handling during templates.
5006 (finish_pseudo_destructor_call_expr): Rename to ...
5007 (finish_pseudo_dtor_expr): ... this.
5008 (finish_compound_literal): New function.
5009 (begin_inline_definitions): Remove.
5010 (finish_sizeof): Remove special template handling.
5011 * spew.c: Do not include parse.h.
5012 * tree.c (get_overloaded_fn): Remove.
5013 * typeck.c (build_class_member_access_expr): Handle
5014 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
5015 (lookup_destructor): New function.
5016 (finish_class_member_access_expr): Use it.
5017 (convert_arguments): Simplify.
5018 (build_unary_op): Handle BASELINKs.
5020 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
5023 * decl2.c (mark_used): Defer inline functions.
5024 (finish_file): Merge deferred_fns loops. Check all used
5025 inline functions have a definition.
5026 * method.c (make_thunk): Thunks are not inline.
5028 PR c++/5116, c++/764
5029 * call.c (build_new_op): Make sure template class operands are
5032 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
5035 * cp-tree.h (resolve_scoped_fn_name): Prototype.
5036 * call.c (resolve_scoped_fn_name): New function. Deal with
5037 more template expansion. Broken out of ...
5038 * parse.y (parse_finish_call_expr): ... here. Call it.
5039 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5040 resolve_scoped_fn_name and build_call_from_tree.
5043 * decl.c (duplicate_decls): Templates may be disambiguated by
5047 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5048 conversion operators on failure.
5050 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5052 Remove traditional C constructs 2/n.
5053 * call.c (tourney, build_field_call, equal_functions, joust,
5054 compare_ics, build_over_call, build_java_interface_fn_ref,
5055 convert_like_real, op_error, build_object_call, resolve_args,
5056 build_vfield_ref, check_dtor_name, build_scoped_method_call,
5057 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5058 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5059 standard_conversion, reference_related_p,
5060 reference_compatible_p, convert_class_to_reference,
5061 direct_reference_binding, reference_binding,
5062 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5063 add_template_conv_candidate, any_viable, any_strictly_viable,
5064 build_this, splice_viable, print_z_candidates,
5065 build_user_type_conversion, build_new_function_call,
5066 conditional_conversion, build_conditional_expr, build_new_op,
5067 build_op_delete_call, enforce_access, call_builtin_trap,
5068 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5069 convert_default_arg, type_passed_as, convert_for_arg_passing,
5070 in_charge_arg_for_name, is_properly_derived_from,
5071 maybe_handle_implicit_object, maybe_handle_ref_bind,
5072 source_type, add_warning, can_convert, can_convert_arg,
5073 perform_implicit_conversion, can_convert_arg_bad,
5074 initialize_reference, add_conv_candidate,
5075 add_template_candidate_real, add_template_candidate): Ansify.
5077 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
5080 * cp-tree.h (grokoptypename): Add SCOPE parameter.
5081 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5082 if in a template scope.
5083 * parse.y (unoperator): Return the scope.
5084 (operator_name): Adjust grokoptypename call.
5086 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5088 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5089 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
5090 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5092 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5094 * ChangeLog: Fix a typo.
5095 * class.c: Fix comment typos.
5096 * cp-tree.h: Likewise.
5098 2002-12-18 Jason Merrill <jason@redhat.com>
5100 Handle anonymous unions at the tree level.
5101 C++ ABI change: Mangle anonymous unions using the name of their
5102 first named field (by depth-first search). Should not cause
5103 binary compatibility problems, though, as the compiler previously
5104 didn't emit anything for affected unions.
5105 * cp-tree.def (ALIAS_DECL): New tree code.
5106 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
5107 first field, not the largest.
5108 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
5109 push the decl, and write it out at namespace scope.
5110 * decl.c (lookup_name_real): See through an ALIAS_DECL.
5111 (pushdecl): Add namespace bindings for ALIAS_DECLs.
5112 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5113 of a decl which doesn't have one.
5114 * typeck.c (build_class_member_access_expr): Don't recurse if
5115 we already have the type we want.
5117 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5120 * friend.c (make_friend_class): Allow partial specialization
5121 when declaration is not a template friend.
5123 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5126 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5127 TREE_PROTECTED to created decl nodes.
5129 2002-12-18 Mark Mitchell <mark@codesourcery.com>
5131 * class.c (build_base_field): Do not set DECL_PACKED on the
5134 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
5136 * cp-tree.h (struct tree_srcloc): Use location_t.
5137 (SOURCE_LOCUS): New.
5138 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5140 2002-12-17 Jason Merrill <jason@redhat.com>
5142 * decl.c (finish_function): Also complain about no return in
5144 * semantics.c (finish_return_stmt): Also call check_return_expr in
5146 * typeck.c (check_return_expr): In a template, just remember that we
5149 2002-12-16 Jason Merrill <jason@redhat.com>
5151 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5154 * semantics.c (do_pushlevel): Call pushlevel after adding the
5156 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5157 * parse.y (function_body): Go back to using compstmt.
5158 * decl.c (pushdecl): Skip another level to get to the parms level.
5160 * call.c (build_new_method_call): Use is_dummy_object to determine
5161 whether or not to evaluate the object parameter to a static member
5164 2002-12-14 Jason Merrill <jason@redhat.com>
5166 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5167 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5168 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5169 don't bother with an AGGR_INIT_EXPR.
5170 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5171 just generate a new decl normally. Take return slot parm.
5172 * cp-tree.h: Adjust prototype.
5174 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5177 * cvt.c (convert_to_pointer_force): Don't try comparing against
5180 2002-12-13 Geoffrey Keating <geoffk@apple.com>
5182 * cp-tree.h: Have the multiple-include guards around
5185 2002-12-10 David Edelsohn <edelsohn@gnu.org>
5187 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5189 (snarf_method): Same.
5190 (snarf_defarg): Same.
5192 2002-12-10 Mark Mitchell <mark@codesourcery.com>
5195 * pt.c (tsubst_copy): Handle destructor names more correctly.
5197 2002-12-10 Matt Austern <austern@apple.com>
5199 * cp-tree.h: get rid of needs_virtual_reinit bit.
5201 2002-12-09 Mark Mitchell <mark@codesourcery.com>
5203 * NEWS: Document removal of in-class initialization extension for
5204 static data members of non-arithmetic, non-enumeration type.
5205 * decl.c (check_static_variable_definition): Do not allow that
5207 * decl2.c (grokfield): Do not call digest_init when processing
5210 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5212 * error.c (dump_expr): Fix format specifier warning.
5214 2002-12-04 Geoffrey Keating <geoffk@apple.com>
5216 * class.c (finish_struct_1): Correct comment.
5217 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5219 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5222 * error.c (dump_expr): Don't ever try to dump a non-existent
5225 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
5227 Implement covariant returns.
5228 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5229 (struct lang_decl_flags): Add this_thunk_p flag.
5230 Rename vcall_offset to virtual_offset.
5231 (struct lang_decl): Rename delta to fixed_offset.
5232 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5233 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5234 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5235 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5236 (make_thunk): Add this_adjusting arg.
5237 (finish_thunk): Declare.
5238 (mangle_thunk): Add this_adjusting arg.
5239 * class.c (get_vcall_index): Use base function for lookup.
5240 (update_vtable_entry_for_fn): Generate covariant thunk.
5241 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5242 (build_vtbl_initializer): Use base function for lookup.
5243 Finish covariant thunk here. Adjust thunk generation.
5244 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5245 Adjust thunk dumping.
5246 * mangle.c (mangle_call_offset): New function.
5247 (mangle_thunk): Adjust for covariant thunks.
5248 * method.c (make_thunk): Adjust. Do not set name here.
5249 (finish_thunk): New function. Set name here.
5250 (use_thunk): Generate covariant thunks too.
5251 (thunk_adjust): New function.
5252 * search.c (covariant_return_p): Remove. Fold into ...
5253 (check_final_overrider): ... here. Simplify.
5254 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5256 2002-12-03 Jason Merrill <jason@redhat.com>
5259 * call.c (build_over_call): Check specifically for TARGET_EXPR
5262 PR c++/8461, c++/8625
5263 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5264 (cp_convert_parm_for_inlining): Remove.
5265 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5267 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5268 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5270 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5271 an ambiguous conversion.
5273 2002-12-03 Mark Mitchell <mark@codesourcery.com>
5276 * decl.c (reshape_init): Handle erroneous initializers.
5278 2002-12-02 Mark Mitchell <mark@codesourcery.com>
5281 * spew.c (remove_last_token): Make sure that last_chunk is set
5285 * error.c (dump_expr): Handle character constants with
5288 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5291 * decl.c (grokdeclarator): Require class-key for all friend class.
5292 Output the correct type and context in the error message.
5294 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5297 * pt.c (unify): Use variably_modified_type_p to test validity of
5298 template argument types.
5301 * cp-tree.h (lang_type_class): Add typeinfo_var.
5302 (CLASSTYPE_TYPEINFO_VAR): New macro.
5303 * rtti.c (get_tinfo_decl): Use it.
5306 * init.c (expand_member_init): Always get the main variant of a
5309 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5313 * decl.c (cxx_init_decl_processing): Use size_type_node, not
5315 * decl2.c (coerce_new_type): Likewise.
5316 * except.c (do_allocate_exception): Likewise.
5318 2002-11-30 Zack Weinberg <zack@codesourcery.com>
5320 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5321 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5322 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5323 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5324 typeck2.c: Include coretypes.h and tm.h.
5325 * Make-lang.in: Update dependencies.
5327 2002-11-30 Mark Mitchell <mark@codesourcery.com>
5330 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5331 (check_initializer): Validate the type of the initialized
5332 variable, even if the initializer is absent.
5333 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5336 * typeck.c (convert_for_assignment): Do not use
5337 decl_constant_value on the operand.
5340 * pt.c (instantiate_decl): Handle template friends defined outside
5341 of the class correctly.
5343 2002-11-29 Joe Buck <jbuck@synopsys.com>
5345 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5348 2002-11-29 Mark Mitchell <mark@codesourcery.com>
5350 * class.c (walk_subobject_offsets): Recur on binfos as well as on
5352 (layout_nonempty_base_or_field): Pass it a binfo when processing a
5354 (layout_empty_base): Likewise.
5355 (build_base_field): Likewise.
5357 2002-11-27 Mark Mitchell <mark@codesourcery.com>
5359 * class.c (build_base_field): Make sure we get the canonical base
5360 when descending through primary bases.
5362 2002-11-26 Geoffrey Keating <geoffk@apple.com>
5364 * decl.c (check_initializer): Don't error on initialisation of
5365 a scalar with a brace-enclosed expression.
5367 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
5369 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5370 (template_parms_equal): Remove prototype.
5371 * typeck.c (buuld_indirect_ref): Reformat.
5373 2002-11-25 Jason Merrill <jason@redhat.com>
5375 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
5378 2002-11-25 Mark Mitchell <mark@codesourcery.com>
5380 * tree.c (cp_build_qualified_type_real): Correct handling of
5382 * class.c (walk_subobject_offsets): Fix thinko.
5383 (build_base_field): Record offsets of empty bases in primary
5385 (layout_class_type): Record offsets of empty bases in fields.
5387 * search.c (is_subobject_of_p_1): Fix thinko.
5388 (lookup_field_queue_p): Likewise.
5390 2002-11-24 Mark Mitchell <mark@codesourcery.com>
5392 * class.c (layout_class_type): Reuse tail padding when laying out
5395 2002-11-22 Mark Mitchell <mark@codesourcery.com>
5397 * rtti.c (qualifier_flags): Fix thinko.
5399 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5401 Remove traditional C constructs 1/n.
5402 * cp-tree.h (init_method, set_mangled_name_for_decl,
5403 build_opfncall, hack_identifier, make_thunk, use_thunk,
5404 synthesize_method, implicitly_declare_fn,
5405 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
5406 maybe_clone_body): Remove use of PARAMS.
5408 * method.c (do_build_assign_ref, do_build_copy_constructor,
5409 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
5411 (synthesize_method): Use 'bool' type and constants instead of
5413 (locate_copy): Likewise.
5414 (implicitly_declare_fn): Likewise.
5416 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
5417 Remove old-style declaration.
5418 (maybe_clone_body): Use 'bool' type and constants.
5420 2002-11-21 Glen Nakamura <glen@imodulo.com>
5423 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
5424 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
5425 of the branches of a COND_EXPR.
5427 2002-11-19 Mark Mitchell <mark@codesourcery.com>
5429 * pt.c (for_each_template_parm): Free allocated memory.
5430 * search.c (is_subobject_of_p_1): New function.
5431 (is_subobject_of_p): Avoid walking virtual bases multiple times.
5433 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
5435 * g++spec.c (lang_specific_spec_functions): New.
5437 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5439 * ChangeLog: Follow spelling conventions.
5440 * class.c: Likewise.
5441 * decl2.c: Likewise.
5443 2002-11-14 Zack Weinberg <zack@codesourcery.com>
5445 * search.c (dfs_push_decls): Do not try to reorder elements
5446 3..n of method_vec if method_vec has only two elements.
5447 Reverse order of two tests to avoid accessing unallocated
5450 2002-11-14 Mark Mitchell <mark@codesourcery.com>
5452 * class.c (dfs_find_final_overrider): Adjust so that the most
5453 derived object is a binfo, rather than a class type.
5454 (find_final_overrider): Likewise.
5455 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
5456 (add_vcall_offset): Likewise.
5458 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5461 * pt.c (instantiate_template): Push class scope for member
5463 (get_mostly_instantiated_function_type): Likewise. Don't call
5464 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
5465 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
5466 * mangle.c (write_encoding, write_unqualified_name): Adjust.
5468 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5470 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
5471 vcall offfsets. Split out ...
5472 (add_vcall_offset): ... new function.
5475 * pt.c (for_each_template_parm): Add htab parameter.
5476 (process_partial_specialization): Adjust call.
5477 (push_template_decl_real): Likewise.
5478 (pair_fn_data): Add visited.
5479 (for_each_template_parm_r): Avoid walking duplicates more than
5481 (uses_template_parms): Adjust call to for_each_template_parm.
5483 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5485 * class.c (add_implicitly_declared_members): Put implicitly
5486 declared functions at the end of TYPE_METHODs when -fabi-version
5489 2002-11-05 Geoffrey Keating <geoffk@apple.com>
5491 * decl2.c (finish_file): Correct spelling.
5493 2002-11-03 Mark Mitchell <mark@codesourcery.com>
5495 * call.c (build_special_member_call): Do not try to lookup VTTs by
5497 * class.c (vtbl_init_data): Add generate_vcall_entries.
5498 (get_vtable_decl): Do not look up virtual tables by name.
5499 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
5500 (set_primary_base): Do not set CLASSTYPE_RTTI.
5501 (determine_primary_base): Likewise.
5502 (get_matching_virtual): Remove.
5503 (get_vcall_index): New function.
5504 (update_vtable_entry_for_fn): Do not try to use virtual thunks
5505 when they are not required. Assign vcall indices at this point.
5506 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
5507 Do update dynamic_classes.
5508 (build_vtt): Do not add VTTs to the symbol table.
5509 (build_ctor_vtbl_group): Likewise.
5510 (build_vtbl_initializer): Simplify handling of vcall indices.
5511 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
5512 for the most derived class.
5513 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
5515 * cp-tree.h (dynamic_classes): New macro.
5516 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
5517 (CLASSTYPE_RTTI): Remove.
5518 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
5519 (CLASSTYPE_VCALL_INDICES): New macro.
5520 (CLASSTYPE_VTABLES): Likewise.
5521 (BV_USE_VCALL_INDEX_P): Remove.
5522 (build_vtable_path): Remove.
5523 * decl2.c (finish_vtable_vardecl): Remove.
5524 (key_method): Remove #if 0'd code.
5525 (finish_vtable_vardecl): Rename to ...
5526 (maybe_emit_vtables): ... this.
5527 (finish_file): Use it.
5528 * search.c (look_for_overrides_here): Update comment.
5530 2002-11-01 Zack Weinberg <zack@codesourcery.com>
5533 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
5535 2002-10-30 Jason Merrill <jason@redhat.com>
5538 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
5539 * call.c (convert_for_arg_passing): Set it.
5540 * except.c (stabilize_throw_expr): Recurse for such an arg.
5542 2002-10-31 Mark Mitchell <mark@codesourcery.com>
5544 * cp-tree.h (lang_decl_flags): Remove init_priority.
5545 (lang_decl): Add delta.
5546 (GLOBAL_INIT_PRIORITY): Remove.
5547 (THUNK_DELTA): Revise definition.
5548 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
5549 * dump.c (cp_dump_tree): Don't dump it.
5551 2002-10-30 Mark Mitchell <mark@codesourcery.com>
5554 * typeck2.c (process_init_constructor): Call complete_array_type.
5557 * decl.c (make_typename_type): Issue errors about invalid results.
5559 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5561 Core issue 287, PR c++/7639
5562 * cp-tree.h (lang_type_class): Add decl_list field.
5563 (CLASSTYPE_DECL_LIST): New macro.
5564 (maybe_add_class_template_decl_list): Add declaration.
5565 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
5566 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
5567 (maybe_add_class_template_decl_list): New function.
5568 (add_implicitly_declared_members): Use it.
5569 * decl.c (maybe_process_template_type_declaration): Likewise.
5570 (pushtag): Likewise.
5571 * friend.c (add_friend): Likewise.
5572 (make_friend_class): Likewise.
5573 * semantics.c (finish_member_declaration): Likewise.
5574 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
5575 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
5576 to process members and friends in the order of declaration.
5578 2002-10-29 Mark Mitchell <mark@codesourcery.com>
5581 * decl.c (finish_destructor_body): Create the label to jump to
5582 when returning from a destructor here.
5583 (finish_function_body): Rather than here.
5585 2002-10-25 Zack Weinberg <zack@codesourcery.com>
5588 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
5589 SCOPE_REF is not null before dereferencing it.
5591 2002-10-25 Mark Mitchell <mark@codesourcery.com>
5593 * call.c (build_over_call): Use DECL_CONTEXT, not
5594 DECL_VIRTUAL_CONTEXT.
5595 * class.c (modify_vtable_entry): Don't mess with
5596 DECL_VIRTUAL_CONTEXT.
5597 (set_vindex): Remove.
5598 (set_primary_base): Remove vfuns_p parameter.
5599 (determine_primary_base): Likewise.
5600 (modify_all_vtables): Likewise.
5601 (layout_class_type): Likewise. Adjust calls to other functions
5603 (finish_struct_1): Adjust calls to modified functions. Set
5605 * cp-tree.h (lang_type_class): Remove vsize.
5606 (CLASSTYPE_VSIZE): Remove.
5607 (lang_decl): Remove thunks.
5608 (DECL_THUNKS): Adjust.
5609 (DECL_VIRTUAL_CONTEXT): Remove.
5610 (duplicate_decls): Don't copy it.
5611 * pt.c (build_template_decl): Don't set it.
5612 (tsubst_decl): Likewise.
5613 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5615 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5616 (build_vtable_entry): Remove.
5617 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5618 (lang_decl): Add thunks.
5619 (DECL_THUNKS): New macro.
5620 * decl.c (duplicate_decls): Copy it.
5621 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5622 * semantics.c (emit_associated_thunks): Simplify.
5624 2002-10-24 David Edelsohn <edelsohn@gnu.org>
5627 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5628 lang_type structure exists before accessing field.
5629 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5630 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5631 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5632 * class.c (check_field_decls): Use new macros.
5633 * typeck2.c (process_init_constructor): Remove redundant check for
5634 existence of lang_type structure.
5636 2002-10-24 Mark Mitchell <mark@codesourcery.com>
5638 * class.c (end_of_base): New method.
5639 (end_of_class): Use it. Check indirect virtual bases.
5641 * class.c (check_field_decls): Fix typo.
5643 2002-10-23 Mark Mitchell <mark@codesourcery.com>
5646 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5650 * spew.c (next_token): Do not return an endless stream of
5651 END_OF_SAVED_INPUT tokens.
5652 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5653 the cached token stream.
5654 (snarf_defarg): Likewise.
5656 2002-10-23 Zack Weinberg <zack@codesourcery.com>
5658 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5659 variably_modified_type_p.
5660 * cp-tree.h: Remove prototype of variably_modified_type_p.
5661 * tree.c (variably_modified_type_p): Remove; now implemented
5662 in language-independent code.
5664 2002-10-22 Mark Mitchell <mark@codesourcery.com>
5667 * spew.c (snarf_parenthesized_expression): New function.
5668 (snarf_block): Use it.
5670 2002-10-22 Richard Henderson <rth@redhat.com>
5672 * method.c (use_thunk): Always compute vcall_value; assert that
5673 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
5674 for vcall thunks as well.
5676 2002-10-21 Mark Mitchell <mark@codesourcery.com>
5678 * class.c (empty_base_at_nonzero_offset_p): New function.
5679 (layout_nonempty_base_or_field): Do not check for conflicts when
5680 laying out a virtual base using the GCC 3.2 ABI.
5681 (build_base_field): Correct checking for presence of empty classes
5682 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5684 * class.c (include_empty_classes): Use normalize_rli.
5685 (layout_class_type): Likewise.
5687 * decl.c (reshape_init): Tweak handling of character arrays.
5690 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5691 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5692 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5693 (check_field_decls): Likewise.
5694 (layout_class_type): Likewise.
5695 (finish_struct_1): Initialize it.
5696 (walk_subobject_offsets): Use it to prune searches.
5698 2002-10-20 Mark Mitchell <mark@codesourcery.com>
5700 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5701 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5702 TARGET_ASM_OUTPUT_MI_THUNK in comments.
5704 2002-10-18 Zack Weinberg <zack@codesourcery.com>
5706 * decl.c (start_decl): Point users of the old initialized-
5707 typedef extension at __typeof__.
5709 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5711 * Make-lang.in (method.o): Depend on TARGET_H.
5712 * method.c (target.h): Include it.
5713 (use_thunk): Use target hooks. Use vcall thunks, if available.
5715 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5717 * class.c (base_derived_from): Make sure return value is a bool.
5719 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5721 * class.c (find_final_overrider_data_s): Remove overriding_fn and
5723 (dfs_base_derived_from): New function.
5724 (base_derived_from): Likewise.
5725 (dfs_find_final_overrider): Use base_derived_from.
5726 (find_final_overrider): Adjust.
5728 2002-10-18 Jason Merrill <jason@redhat.com>
5731 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5732 with condition decls in a template.
5734 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
5736 * class.c (add_method): Compare template parms too.
5738 2002-10-17 Mark Mitchell <mark@codesourcery.com>
5741 * class.c (handle_using_decl): Allow the declaration used to be
5742 from an ambiguous base.
5744 * pt.c (convert_template_argument): Revert this change:
5745 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5746 * pt.c (convert_template_argument): Do not fold non-type
5747 template rguments when inside a template.
5749 * init.c (expand_default_init): Handle brace-enclosed initializers
5752 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5754 * mangle.c (write_expression): Correct handling of enumeration
5756 (write_template_arg): Likewise.
5757 * pt.c (convert_template_argument): Do not fold non-type template
5758 arguments when inside a template.
5761 * cvt.c (convert_to_reference): Allow references as the incoming
5764 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5767 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5768 build_qualified_type.
5770 2002-10-15 Richard Henderson <rth@redhat.com>
5772 * error.c (dump_expr): Use real_to_decimal directly, and with
5775 2002-10-15 Mark Mitchell <mark@codesourcery.com>
5777 * decl.c (reshape_init): Fix typo.
5779 * cp-tree.h (operator_name_info_t): Add arity.
5780 * lex.c (init_operators): Initialize it.
5781 * mangle.c (write_conversion_operator_name): New function.
5782 (write_unqualified_name): Use it.
5783 (write_template_args): Accept template arguments as a TREE_LIST.
5784 (write_expression): Adjust handling of qualified names to match
5787 2002-10-15 Jason Merrill <jason@redhat.com>
5789 * call.c (call_builtin_trap): New fn.
5790 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
5791 (build_call): Don't set current_function_returns_abnormally outside
5794 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5796 * class.c (check_field_decls): Remove empty_p parameter. Instead,
5797 clear CLASSTYPE_EMPTY_P.
5798 (build_base_field): Likewise.
5799 (build_base_fields): Likewise.
5800 (check_bases_and_members): Likewise.
5801 (create_vtbl_ptr): Likewise.
5802 (layout_class_type): Likewise. Ensure that empty classes have
5803 size zero when used as base classes in the 3.2 ABI.
5804 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
5805 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
5807 (is_empty_class): Correct definition when using post-3.2 ABI.
5808 * cp-tree.h (lang_type_class): Add empty_p.
5809 (CLASSTYPE_EMPTY_P): New macro.
5811 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
5813 * init.c (build_delete): Do not apply save_expr for arrays.
5814 (build_vec_delete): Likewise.
5816 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5818 * decl.c (layout_var_decl): Call layout_decl even for variables
5819 whose type is an array with unspecified bounds.
5822 * lex.c (do_identifier): Add another option for the parsing
5824 * parse.y (do_id): Use it.
5826 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
5828 PRs C++/6803, C++/7721 and C++/7803
5829 * decl.c (grokdeclarator): Gracefully handle template-name as
5832 2002-10-11 Jason Molenda <jmolenda@apple.com>
5834 * init.c (build_field_list): Provide uses_unions_p with a default
5837 2002-10-11 Mark Mitchell <mark@codesourcery.com>
5840 * cp-tree.h (variably_modified_type_p): New function.
5841 (grokdeclarator) Tighten check for variably modified types as
5843 * pt.c (convert_template_argument): Do not allow variably modified
5844 types as template arguments.
5845 * tree.c (variably_modified_type_p): New function.
5847 * NEWS: Document removal of "new X = ..." extension.
5848 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
5849 brace-enclosed initializers.
5850 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
5851 (initialize_local_var): Remove declaration.
5852 (expand_static_init): Likewise.
5853 * decl.c (next_initializable_field): New function.
5854 (reshape_init): Likewise.
5855 (check_initializer): Use them. Build dynamic initializer for
5856 aggregates here too.
5857 (initialize_local_var): Simplify, and incorporate cleanup
5858 insertion code as well.
5859 (destroy_local_var): Remove.
5860 (cp_finish_decl): Tidy.
5861 (expand_static_init): Fold checks for whether or not a variable
5862 needs initialization into this function. Simplify.
5863 * decl2.c (do_static_initialization): Simplify.
5864 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5865 be done for us automatically.
5866 (expand_default_init): Handle brace-enclosed initializers
5868 (expand_aggr_init_1): Remove RTL-generation code.
5869 (build_vec_init): Remove "new X = ..." support.
5870 * parse.y (new_initializer): Likewise.
5871 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5872 brace-enclosed initializer.
5873 (create_pseudo_type_info): Likewise.
5874 * typeck2.c (store_init_value): Don't try to handle digest_init
5875 being called more than once.
5876 (digest_init): Tidy handling of brace-enclosed initializers.
5878 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5880 * decl.c (typename_hash): Use htab_hash_pointer.
5882 2002-10-10 Jim Wilson <wilson@redhat.com>
5884 * decl.c (duplicate_decls): Don't call decl_attributes.
5886 2002-10-09 Zack Weinberg <zack@codesourcery.com>
5889 * decl.c (start_decl): Unconditionally issue error for
5890 'typedef foo = bar'.
5891 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5892 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5894 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5896 * decl2.c (prune_vtable_vardecl): Delete unused function.
5898 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5901 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5902 procesing template functions.
5903 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5904 type. Call layout_decl.
5905 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5907 2002-10-07 Richard Henderson <rth@redhat.com>
5909 * decl2.c, pt.c: Revert c++/7754 fix.
5911 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5914 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5916 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5919 * pt.c (for_each_template_parm_r): Handle BASELINKs.
5922 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5923 procesing template functions.
5924 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5925 type. Call layout_decl.
5926 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5928 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5931 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5932 template parameters.
5933 (globals): Add entity and need_abi_warning.
5934 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5935 CLASSTYPE_TEMPLATE_INFO.
5936 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
5938 (write_prefix): Handle typename types correctly.
5939 (write_template_prefix): Handle template template parameters
5941 (start_mangling): Add entity parameter.
5942 (finish_mangling): Warn about names whose mangling will change.
5943 (mangle_decl_string): Adjust.
5944 (mangle_type_string): Likewise.
5945 (mangle_special_for_type): Likewise.
5946 (mangle_ctor_vtbl_for_type): Likewise.
5947 (mangle_thunk): Likewise.
5948 (mangle_guard_variable): Likewise.
5949 (mangle_ref_init_variable): Likewise.
5951 2002-10-02 Mark Mitchell <mark@codesourcery.com>
5954 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5955 * cp-tree.h (emit_base_init): Rename to ....
5956 (emit_mem_initializers): ... this.
5957 (expand_member_init): Change prototype.
5958 * init.c (perform_member_init): Compute explicit, rather than
5959 requiring it as a parameter.
5960 (sort_member_init): Rename to ...
5961 (sort_mem_initializers): ... this. Process bases and data members
5963 (sort_base_init): Remove.
5964 (emit_base_init): Rename to ...
5965 (emit_mem_initializers): ... this.
5966 (expand_aggr_vbase_init_1): Remove.
5967 (construct_virtual_bases): Rename to ...
5968 (construct_virtual_base): ... this.
5969 (expand_member_init): Rework handling of base initializers.
5970 * method.c (do_build_copy_constructor): Use
5971 finish_mem_initializers.
5972 * parse.y (member_init): Adjust calls to expand_member_init.
5973 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5974 (tsubst_initializer_list): Use expand_member_init.
5975 * semantics.c (finish_mem_intiailizers): Simplify.
5977 2002-10-02 Matt Austern <austern@apple.com>
5978 * decl.c (walk_vtables_r): Fixed typo that caused result to
5979 never get a nonzero value.
5981 2002-10-02 Roger Sayle <roger@eyesopen.com>
5983 PR optimization/6627
5984 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5985 from here, and move it to tree.h.
5986 * decl.c (cxx_init_decl_processing): If storing the vbit
5987 in function pointers, ensure that force_align_functions_log
5990 2002-10-02 Matt Austern <austern@apple.com>
5992 * class.c (check_field_decls): Changed warning about const member
5993 variables so that it doesn't get issued for a class aggregate.
5995 2002-10-01 Mark Mitchell <mark@codesourcery.com>
5997 * decl.c (cp_finish_decl): Make sure array types are laid out,
5998 even if the array bounds are unknown.
6000 2002-10-01 Steve Ellcey <sje@cup.hp.com>
6002 * class.c (build_vtbl_initializer): Change build_c_cast
6005 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6007 * decl.c (cp_finish_decl): Make sure array types are laid out,
6008 even if the array bounds are unknown.
6010 * decl.c (cp_finish_decl): Correct check for dynamic
6011 initialization of thread-local storage.
6013 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
6015 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6018 2002-09-30 Steve Ellcey <sje@cup.hp.com>
6020 * class.c (build_vtbl_initializer): Add cast.
6021 (add_vcall_offset_vtbl_entries_1):
6022 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6024 2002-09-30 Mark Mitchell <mark@codesourcery.com>
6026 * class.c (walk_subobject_offsets): Correct the calculation of
6027 offsets for virtual bases. Correct the counting of array
6029 (layout_nonempty_base_or_field): Simplify. Correct the
6030 calculation of offsets to be propagated through the binfo
6032 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6033 Add the FIELD_DECL to TYPE_FIELDS.
6034 (build_base_fields): Adjust accordingly.
6035 (layout_virtual_bases): Use build_base_field.
6036 (end_of_class): Return a tree, not an integer.
6037 (warn_about_ambiguous_direct_bases): Rename to ...
6038 (warn_about_ambiguous_bases): ... this.
6039 (include_empty_classes): New function.
6040 (layout_class_type): Create an alternative version of the type to
6041 be used when as a base class type. Do not call
6042 finish_record_layout until we are done laying out the class.
6043 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
6045 (CLASSTYPE_SIZE): Reimplement.
6046 (CLASSTYPE_SIZE_UNIT): Likewise.
6047 (CLASSTYPE_ALIGN): Likweise.
6048 (CLASSTYPE_USER_ALIGN): Likewise.
6049 (CLASSTYPE_AS_BASE): New macro.
6050 (DECL_INITIALIZED_P): Likewise.
6051 (extract_init): Remove prototype.
6052 (build_forced_zero_init): Rename to ...
6053 (build_zero_init): ... this.
6054 (force_store_init_value): Remove.
6055 * decl.c (obscure_complex_init): Remove.
6056 (duplicate_decls): Copy DECL_INITIALIZED_P.
6057 (check_initializer): Do not leave junk in DECL_INITIAL.
6058 (cp_finish_decl): Handle zero-initialization of entities with
6059 static storage duration.
6060 * expr.c (extract_init): Remove.
6061 * init.c (build_forced_zero_init): Remove.
6062 (build_zero_init): New function.
6063 (build_default_init): Use it.
6064 (build_field_list): Skip FIELD_DECLs for base subobjects.
6065 (push_base_cleanups): Likewise.
6066 * method.c (do_build_assign_ref): Likewise.
6067 (synthesize_exception_spec): Likewise.
6068 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6069 (regenerate_decl_from_template): To not set DECL_INITIAL for a
6070 static data member whose initialization took place in its class.
6071 (instantiate_decl): Do not pass an initializer to cp_finish_decl
6073 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6074 (dfs_unuse_fields): Likewise.
6075 * tree.c (pod_type_p): Handle error_mark_node.
6076 (zero_init_p): Likewise.
6077 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6079 * typeck2.c (store_init_value): Remove #if 0'd code.
6080 (force_store_init_value): Remove.
6081 (process_init_constructor): Use build_zero_init.
6083 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
6086 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6088 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
6090 * cp-tree.h: Fix comment typos.
6094 2002-09-25 Mark Mitchell <mark@codesourcery.com>
6096 * cp/class.c (contains_empty_class_p): New method.
6097 (walk_subobject_offsets): Correct computation of field offset.
6098 (layout_empty_base): Correct placement of emtpy base classes.
6099 (layout_class_type): Warn about ABI changes.
6101 2002-09-23 Mark Mitchell <mark@codesourcery.com>
6103 * cp/class.c (layout_virtual_bases): Do not round the size of the
6104 type to a multiple of the alignment before laying out virtual bases.
6105 (layout_class_type): Correct handling of bit-fields that are wider
6106 than their type inside unions. Round the size of the type to a
6107 even number of bytes when computing the size without virtual
6109 * cp/cp-tree.h (abi_version_at_least): New macro.
6111 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
6113 * ChangeLog: Follow spelling conventions.
6114 * ChangeLog.2: Likewise.
6116 * class.c: Likewise.
6117 * cp-tree.h: Likewise.
6120 * decl2.c: Likewise.
6121 * except.c: Likewise.
6122 * friend.c: Likewise.
6123 * g++spec.c: Likewise.
6126 * mangle.c: Likewise.
6127 * method.c: Likewise.
6128 * operators.def: Likewise.
6129 * optimize.c: Likewise.
6132 * search.c: Likewise.
6133 * semantics.c: Likewise.
6136 * typeck.c: Likewise.
6138 2002-09-18 Devang Patel <dpatel@apple.com>
6140 * cp/cp-tree.h: New prototype for walk_vtabls().
6141 * cp/decl.c (walk_vtables_r): New function.
6142 (struct cp_binding_level): Add new members, namespaces,
6143 names_size and vtables.
6144 (add_decl_to_level): Add decl in namespaces or vtables
6145 chain, if conditions match.
6146 (walk_vtables): New function.
6147 (walk_namespaces_r): Travers separate namespace chain
6148 for namespace decls.
6149 (wrapup_globals_for_namespace): Use names_size instead
6151 * cp/decl2.c (finish_file): Use walk_vtables() instead of
6152 walk_globals() to walk vtable decls.
6154 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
6156 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6157 ICE with invalid pointers & references.
6159 2002-09-17 Zack Weinberg <zack@codesourcery.com>
6161 * Make-lang.in: Remove all references to the demangler.
6162 * cxxfilt.c: Moved to binutils.
6164 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6167 * pt.c (tsubst_decl): Remove assert.
6169 Remove DR 295 implementation.
6170 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6171 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6172 about ignoring volatile qualifiers.
6174 * search.c (lookup_member): Correct documentation.
6176 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6178 * cp-tree.h (union lang_tree_node): Add chain_next option.
6180 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6182 * parse.y (parse_finish_call_expr): Check lookup_member result.
6185 * semantic.c (finish_asm_stmt): Fix operand/output_operands
6187 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6189 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
6192 * call.c (build_over_call): Convert this pointer for fns found by
6195 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6197 * ChangeLog: Follow spelling conventions.
6198 * ChangeLog.1: Likewise.
6200 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
6203 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6205 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
6207 * error.c: Fix comment formatting.
6208 * except.c: Likewise.
6210 * friend.c: Likewise.
6211 * g++spec.c: Likewise.
6214 * mangle.c: Likewise.
6215 * method.c: Likewise.
6216 * optimize.c: Likewise.
6219 * search.c: Likewise.
6220 * semantics.c: Likewise.
6223 * typeck.c: Likewise.
6224 * typeck2.c: Likewise.
6226 2002-09-13 Matt Austern <austern@apple.com>
6229 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6230 * cp/call.c: Change call-by-const-reference mechanism to use
6231 non_cast_lvalue_p when deciding whether the create a temporary.
6232 We need a temporary when passing, e.g. (long) x by const ref.
6234 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
6236 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6238 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
6240 * decl.c: Fix comment formatting.
6241 * decl2.c: Likewise.
6243 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
6245 * call.c: Fix comment formatting.
6246 * class.c: Likewise.
6247 * cp-lang.c: Likewise.
6248 * cp-tree.h: Likewise.
6251 2002-09-11 Zack Weinberg <zack@codesourcery.com>
6253 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6254 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6255 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6256 minor adjustments (use version_string, eliminate yet another
6257 duplicate of xmalloc)
6259 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6261 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6263 2002-09-05 Jason Merrill <jason@redhat.com>
6265 * typeck2.c (add_exception_specifier): Only pedwarn for an
6267 (require_complete_eh_spec_types): New fn.
6268 (cxx_incomplete_type_diagnostic): Also support pedwarning.
6269 * typeck.c (complete_type_or_diagnostic): Likewise.
6270 * call.c (build_call): Call require_complete_eh_spec_types.
6271 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6272 on an incomplete type.
6274 2002-09-04 Jakub Jelinek <jakub@redhat.com>
6276 * decl.c (start_cleanup_fn): Clear interface_only before
6277 start_function, restore it afterwards.
6279 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
6281 * cp-tree.h (finish_builtin_type): Remove.
6282 * decl2.c (finish_builtin_type): Move to common code.
6283 * decl.c (build_ptrmemfunc_type): Adjust.
6284 * rtti.c (create_pseudo_type_info): Adjust.
6285 (create_tinfo_types): Adjust.
6287 2002-08-31 Jason Merrill <jason@redhat.com>
6289 * cp-lang.c (cp_expr_size): Allow initialization from a
6292 2002-08-30 Richard Henderson <rth@redhat.com>
6295 * tree.c: Include target.h.
6296 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6298 * Makefile.in (tree.o): Update.
6300 2002-08-27 Mark Mitchell <mark@codesourcery.com>
6302 * class.c (layout_virtual_bases): Warn about bugs in G++ that
6303 result in incorrect object layouts.
6304 (layout_class_type): Likewise.
6306 2002-08-24 Matt Austern <austern@apple.com>
6308 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6310 (real_lvalue_p): Update caller.
6312 (non_cast_lvalue_or_else): New.
6313 * tree.h: Declare it.
6314 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6316 2002-08-22 Mark Mitchell <mark@codesourcery.com>
6318 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6319 and COND_EXPR specially; fix error message output.
6321 2002-08-22 Jason Merrill <jason@redhat.com>
6323 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6324 * semantics.c (nullify_returns_r): Likewise.
6326 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
6329 * typeck.c (finish_class_member_access_expr): Diagnose cases where
6330 name lookup finds nothing.
6332 2002-08-15 Jason Merrill <jason@redhat.com>
6334 * semantics.c (finish_then_clause): Remove redundant assignment.
6335 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6336 extra binding level outside the if/switch statement.
6337 (finish_while_cond, finish_for_cond): Rewrite complex condition
6340 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
6342 * parse.y (sizeof, alignof, typeof): New non-terminals to
6343 increment skip_evaluation. Replace terminals with them and
6344 decrement skip_evaluation at the end of rules using them.
6345 * decl2.c (mark_used): Don't assemble_external if
6346 skipping evaluation.
6348 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
6351 * parse.y (parse_finish_call_expr): Handle incomplete
6352 type used to name a scope.
6354 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
6357 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6358 regression caused by my 2002-08-08 patch.
6360 2002-08-13 Mark Mitchell <mark@codesourcery.com>
6362 * decl.c (pushdecl_class_level): Honor requests to bind names to
6365 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6367 * decl2.c (build_call_from_tree): Fix uninitialized variable.
6368 * parse.y (parse_finish_call_expr): Likewise.
6369 * repo.c (old_args, old_dir, old_main): Const-ify.
6371 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
6373 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6374 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
6375 * optimize.c (maybe_clone_body): Likewise.
6376 * pt.c (tsubst_enum): Likewise.
6377 (lookup_template_class): Likewise.
6378 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
6380 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
6382 * lang-specs.h: Remove -ansi.
6384 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
6386 * tree.c (maybe_dummy_object): Replace // with /* */
6388 2002-08-09 Mark Mitchell <mark@codesourcery.com>
6390 * call.c (standard_conversion): Use build_ptrmem_type.
6391 * cp-tree.h (build_ptrmem_type): New function.
6392 (adjust_result_of_qualified_name_lookup): Likewise.
6393 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
6394 static data members.
6395 (build_ptrmem_type): New function.
6396 (grokdeclarator): Do not use build_offset_type when encountering a
6398 * parse.y (parse_finish_call_expr): Use
6399 adjust_result_of_qualified_name_lookup.
6400 * search.c (adjust_result_of_qualified_name_lookup): New function.
6401 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
6402 accessing OFFSET_TYPEs directly.
6404 2002-08-08 Mike Stump <mrs@apple.com>
6406 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
6407 (type_decays_to): Likewise.
6408 * class.c (find_final_overrider): Likewise.
6409 (maybe_note_name_used_in_class): Likewise.
6410 * decl.c (current_tmpl_spec_kind): Likewise.
6411 (add_binding): Likewise.
6412 (push_class_binding): Likewise.
6413 (duplicate_decls): Likewise.
6414 (layout_var_decl): Likewise.
6415 (grokfndecl): Likewise.
6416 (grokdeclarator): Likewise.
6417 (check_default_argument): Likewise.
6418 * decl2.c (handle_class_head): Likewise.
6419 * error.c (dump_template_decl): Likewise.
6420 * init.c (build_offset_ref): Likewise.
6421 * pt.c (check_specialization_scope): Likewise.
6422 (determine_specialization): Likewise.
6423 (check_explicit_specialization): Likewise.
6424 (maybe_check_template_type): Likewise.
6425 (process_partial_specialization): Likewise.
6426 (check_default_tmpl_args): Likewise.
6427 (push_template_decl_real): Likewise.
6428 (convert_template_argument): Likewise.
6429 (try_class_unification): Likewise.
6430 (get_bindings_real): Likewise.
6431 (do_decl_instantiation): Likewise.
6432 * semantics.c (begin_function_definition): Likewise.
6433 (finish_member_declaration): Likewise.
6434 (check_multiple_declarators): Likewise.
6435 * typeck.c (comp_array_types): Likewise.
6436 (comptypes): Likewise.
6437 (expr_sizeof): Likewise.
6438 (build_binary_op): Likewise.
6439 (dubious_conversion_warnings): Likewise.
6440 (check_return_expr): Likewise.
6442 2002-08-08 Mark Mitchell <mark@codesourcery.com>
6444 * typeck.c (build_class_member_access_expr): Do not return
6445 error_mark_node when no error has occurred.
6447 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6449 * typeck.c (build_component_addr): Remove.
6450 (build_unary_op): Just check it's not a bitfield, and then build
6453 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6455 * class.c (convert_to_base): Correct check for error_mark_node.
6456 (create_vtable_ptr): Remove unused VFUNS_P parm.
6458 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6460 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
6462 2002-08-07 Mark Mitchell <mark@codesourcery.com>
6464 Rework build_component_ref.
6465 * call.c (build_vfield_ref): Do not go through build_component_ref.
6466 (build_field_call): Use build_class_member_access_expr.
6467 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
6468 (build_object_call): Likewise.
6469 * class.c (convert_to_base): New function.
6470 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
6471 (instantiate_type): Handle BASELINKs.
6472 * cp-tree.def (BASELINK): New tree code.
6473 * cp-tree.h (BASELINK_P): Reimplement.
6474 (SET_BASELINK_P): Remove.
6475 (BASELINK_BINFO): Reimplement.
6476 (BASELINK_FUNCTIONS): Likewise.
6477 (BASELINK_ACCESS_BINFO): Likewise.
6478 (BASELINK_OPTYPE): Likewise.
6479 (convert_to_base): New function.
6481 (build_object_ref): Remove.
6482 (build_component_ref_1): Likewise.
6483 (build_component_ref): Likewise.
6484 (build_x_component_ref): Likewise.
6485 (build_class_member_access_expr): New function.
6486 (finish_class_member_access_expr): Likewise.
6487 (build_ptrmemfunc_access_expr): Likewise.
6488 * decl.c (grokdeclarator): Handle BASELINKs.
6489 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
6490 finish_class_member_access_expr.
6491 (arg_assoc): Handle BASELINKs.
6492 (do_class_using_decl): Likewise.
6493 * error.c (dump_decl): Likewise.
6494 (dump_expr): Use build_ptrmemfunc_access_expr.
6495 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
6497 (build_throw): Use BASELINK_FUNCTIONS.
6498 * init.c (perform_member_init): Use
6499 build_class_member_access_expr.
6500 (build_offset_ref): Handle BASELINKs. Use
6501 build_class_member_access_expr.
6502 * method.c (hack_identifier): Likewise.
6503 * parse.y (do_id): Use BASELINK, not TREE_LIST.
6504 (primary): Remove uses of build_object_ref.
6505 * pt.c (lookup_template_function): Handle BASELINKs.
6506 (resolve_overloaded_unification): Likewise.
6507 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
6508 (lookup_field): Use BASELINK, not TREE_LIST.
6509 (lookup_fnfiels): Likewise.
6510 (setup_class_bindings): Likewise.
6511 * semantics.c (finish_object_call_expr): Do not use
6512 build_method_call when we already know what function is being
6514 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
6515 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
6517 (name_p): New function.
6518 * typeck.c (build_object_ref): Remove.
6519 (build_component_ref_1): Likewise.
6520 (build_x_component_ref): Likewise.
6521 (build_class_member_access_expr): New function.
6522 (finish_class_member_access_expr): Likewise.
6523 (build_ptrmemfunc_access_expr): Likewise.
6524 (get_member_function_from_ptrfunc): Use
6525 build_ptrmemfunc_access_expr.
6526 (build_binary_op): Likewise.
6527 (build_unary_op): Likewise.
6528 (build_ptrmemfunc): Likewise.
6529 (pfn_from_ptrmemfunc): Likewise.
6530 * typeck2.c (build_m_component_ref): Adjust comment.
6532 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
6534 * Make-lang.in (CXX_C_OBJS): Update.
6535 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
6536 * cp-tree.h (cxx_decode_option): Remove.
6537 * decl2.c (compare_options, lang_f_options, unsupported_options,
6538 cxx_decode_option): Remove.
6540 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
6542 * typeck.c (build_x_unary_op): Handle pointer-to-member.
6544 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
6546 * class.c: Don't include obstack.h.
6548 * decl2.c: Delete bogus comment.
6549 * error.c: Don't include obstack.h.
6550 * except.c: Likewise.
6551 (dump_type): Correct comment.
6552 * method.c: Don't include obstack.h.
6555 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
6558 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
6559 expressions to pointer-to-data-member of pointer-to-member-functions.
6561 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
6563 * cvt.c (ocp_convert): Delete obsolete code.
6564 * parse.y (permanent_obstack): Delete declaration.
6565 * pt.c (permanent_obstack): Delete declaration.
6566 * repo.c (permanent_obstack): Delete declaration.
6567 (open_repo_file): Use xmalloc instead of permanent_obstack.
6568 (init_repo): Use xstrdup instead of permanent_obstack.
6570 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
6572 * cp-tree.h (VF_DERIVED_VALUE): Remove.
6573 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
6575 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
6578 C++ ABI change - vfunc ordering.
6579 * class.c (add_virtual_function): Remove.
6580 (dfs_modify_all_vtables): Take list of all declared
6581 virtuals. Assign all that are not in primary base.
6582 (check_for_override): Adjust comments.
6583 (create_vtable_ptr): Take single list of virtuals. Build chain
6584 of declared virtuals here.
6585 (layout_class_type): Take single list of virtuals. Adjust.
6586 (finish_struct_1): Keep virtuals on single list. Adjust.
6588 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6590 * init.c (build_member_call): Use build_new_method_call, not
6593 2002-08-02 Krister Walfridsson <cato@df.lth.se>
6595 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
6597 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6599 * call.c (build_method_call): Issue a more helpful error message
6600 about ambiguous method names.
6602 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
6604 * tree.c (build_shared_int_cst): Make cache file scope, and
6607 2002-08-02 Jason Merrill <jason@redhat.com>
6609 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6610 (cp_expr_size): New fn.
6611 * call.c (build_over_call): Lose empty class hackery.
6612 (convert_arg_to_ellipsis): Promote non-POD warning to error.
6613 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6615 * semantics.c (expand_body): Do tree optimization in the function
6618 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
6620 * cp-tree.h: Move all warning and flag declarations to c-common.h.
6621 * decl.c: Move all warning and flag variables to c-common.c.
6622 * decl2.c: Move all warning and flag variables to c-common.c.
6623 * lex.c (flag_digraphs): Remove.
6624 (warn_traditional): Now in c-common.c.
6626 2002-07-31 Mark Mitchell <mark@codesourcery.com>
6628 * call.c (build_field_call): Do not look up the field by name.
6629 (build_method_call): Simplify.
6630 (struct z_candidate): Add access_path and conversion_path. Remove
6632 (convert_class_to_reference): Adjust use of
6633 add_function_candidate.
6634 (add_candidate): Add conversion_path argument.
6635 (add_function_candidate): Use it.
6636 (add_conv_dndidate): Likewise.
6637 (build_builtin_candidate): Likewise.
6638 (add_template_candidate_real): Add conversion_path argument.
6639 (add_template_conv_candidate): Likewise.
6640 (add_template_candidate): Likewise.
6641 (build_user_type_conversion_1): Use it.
6642 (build_new_function_call): Remove name lookup code. Adjust use of
6643 add_template_candidate and add_function_candidate.
6644 (build_new_op): Likewise.
6645 (convert_like_real): Use build_special_member_call.
6646 (build_over_call): Use cand->conversion_path.
6647 (build_special_member_call): New method.
6648 (build_new_method_call): Remove name lookup code.
6649 * cp-tree.def (OFFSET_REF): Update documentation.
6650 (TEMPLATE_ID_EXPR): Likewise.
6651 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6652 (BASELINK_OPTYPE): Likewise.
6653 (build_new_method_call): Adjust prototype.
6654 (build_special_member_call): New method.
6655 (build_baselink): New method.
6656 (build_offset_ref_call_from_tree): Likewise.
6657 (build_call_from_tree): Likewise.
6658 (finish_qualified_call_expr): Remove.
6659 (finish_call_expr): Adjust prototype.
6660 (build_x_function_call): Remove.
6661 * cvt.c (ocp_convert): Use build_special_member_call.
6662 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6663 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6665 (build_offset_ref_call_from_tree): New function.
6666 (build_call_from_tree): Likewise.
6667 * init.c (expand_cleanup): Use build_special_member_call.
6668 (expand_default_init): Likewise.
6669 (build_member_call): Use finish_call_expr.
6670 (build_new_1): Use build_special_member_call.
6671 (push_base_cleanups): Likewise.
6672 * method.c (do_build_assign_ref): Likewise.
6673 * parse.y (template_id): Do not pass a COMPONENT_REF to
6674 lookup_template_function.
6675 (primary): Use parse_finish_call_epxr, not finish_call_expr.
6676 (parse_finish_call_expr): New function.
6677 * pt.c (lookup_template_function): Add assertions.
6678 * search.c (lookup_base): Allow T to be a binfo.
6679 (build_baselink): New function.
6680 (lookup_member): Use it.
6681 * semantics.c (finish_call_expr): Do not do name lookup.
6682 (finish_object_call_expr): Remove #if 0'd code.
6683 (finish_qualified_call_expr): Remove.
6684 * typeck.c (build_x_function_call): Remove.
6685 (build_static_case): Use build_special_member_call.
6686 * typeck2.c (build_functional_cast): Likewise.
6688 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
6690 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6692 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
6694 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6696 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
6698 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6701 2002-07-29 Alan Modra <amodra@bigpond.net.au>
6703 * cp-tree.h: Comment typo fix.
6705 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
6707 * spew.c (space_for_token): Allocate zeroed memory for a new token
6710 2002-07-27 Roger Sayle <roger@eyesopen.com>
6712 * decl.c (builtin_function_1): No need to explicitly mark
6713 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6715 2002-07-27 Roger Sayle <roger@eyesopen.com>
6717 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6719 2002-07-26 Jason Merrill <jason@redhat.com>
6721 * call.c (build_over_call): Likewise.
6722 (cp_convert_parm_for_inlining): New fn.
6723 (convert_for_arg_passing): New fn.
6724 (convert_default_arg, build_over_call): Use it.
6725 (type_passed_as): New fn.
6726 * pt.c (tsubst_decl): Use it.
6727 * decl2.c (cp_build_parm_decl): New fn.
6728 (build_artificial_parm): Use it.
6729 (start_static_storage_duration_function): Likewise.
6730 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6731 (grokparms): Don't mess with DECL_ARG_TYPE.
6732 * typeck.c (convert_arguments): Use convert_for_arg_passing.
6733 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6735 * cp-tree.h: Declare new fns.
6737 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
6739 * cp-tree.h (flag_operator_names): Remove.
6740 * decl2.c (flag_operator_names): Remove.
6741 (lang_f_options): Remove operator-names.
6742 * lex.c (D_OPNAME): Remove.
6743 (reswords): Remove operator names.
6744 (rid_to_yy): Remove operator names.
6745 (init_reswords): No need to handle D_OPNAME.
6746 * spew.c (read_process_identifier): There are no operator
6749 2002-07-26 Jason Merrill <jason@redhat.com>
6751 * dump.c (cp_dump_tree): Call c_dump_tree.
6752 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6754 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6756 * error.c (print_whitespace): Remove.
6757 * g++spec.c (LIBUNWIND): Move.
6758 * mangle.c (mangled_position, write_signed_number): Remove.
6760 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6762 * decl2.c (cxx_decode_option): Similarly.
6764 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
6766 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6767 (cxx_sizeof_or_alignof_type): Take a third argument.
6768 (cxx_sizeof): Adjust definition.
6769 (cxx_alignof): Likewise.
6770 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6771 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6773 (c_sizeof_nowarn): Remove definition.
6774 (build_unary_op): Use cxx_sizeof_nowarn.
6776 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
6778 * tree.c (cp_build_qualified_type_real): When copying
6779 pointer-to-method types, unshare the record that holds
6780 the cached pointer-to-member-function type.
6782 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6784 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6786 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
6789 * typeck.c (cxx_sizeof_or_alignof_type): New function.
6790 (c_sizeof): Remove definition.
6791 (expr_sizeof): Use cxx_sizeof.
6792 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
6793 * decl.c (finish_destructor_body): Use cxx_sizeof.
6794 * semantics.c (finish_alignof): Likewise.
6795 (finish_alignof): Use cxx_alignof.
6796 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
6797 (cxx_sizeof_or_alignof_type): Declare.
6798 (my_friendly_assert): Move to ../c-common.h.
6800 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6802 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
6804 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6806 PR c++/7347, c++/7348
6807 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
6808 * decl.c (make_typename_type): Use it.
6809 (make_unbound_class_template): Likewise.
6810 (lookup_name_real): Don't call type_access_control if scope is
6811 template parameter dependent.
6812 * parse.y (template_arg): Call make_unbound_class_template with
6814 (nest_name_specifier): Call make_typename_type with tf_parsing set.
6815 (typename_sub0): Likewise.
6816 (typename_sub1): Likewise.
6817 (instantiate_decl): Push class scope.
6818 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
6819 for both static variable and member function template.
6820 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
6822 * search.c (type_access_control): Do type access for TEMPLATE_DECL
6825 2002-07-20 Roger Sayle <roger@eyesopen.com>
6827 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
6828 test by using positive_option. Make whitespace consistent.
6830 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
6832 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
6833 members with 'locus'. Adjust use throughout.
6834 (struct feed): Likewise.
6835 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
6837 (snarf_defarg): Use error(), not error_with_file_and_line().
6839 2002-07-19 Chris Demetriou <cgd@broadcom.com>
6841 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
6842 cpp_options is included.
6844 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6846 PR c++/2862, c++/2863
6847 * pt.c (determine_specialization): Compare the length of
6848 TYPE_ARG_TYPES. Tidy.
6850 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6853 * decl.c (duplicate_decls): Don't propagate inlining parameters from
6854 olddecl to newdecl when newdecl is a specialization of the
6855 instantiation olddecl.
6857 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6859 PR c++/4802, c++/5387
6860 * decl.c (make_typename_type): Use enforce_access.
6862 2002-07-17 Scott Snyder <snyder@fnal.gov>
6865 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6867 2002-07-12 Mark Mitchell <mark@codesourcery.com>
6869 * class.c (add_method): Correct handling of conversion operators.
6871 2002-07-11 Mark Mitchell <mark@codesourcery.com>
6874 * class.c (add_method): Simplify.
6876 2002-07-11 Jason Merrill <jason@redhat.com>
6879 * tree.c (cp_copy_res_decl_for_inlining): Also copy
6882 2002-07-10 Graham Stott <graham.stott@btinternet.com>
6884 * pt.c (template_parm_this_level_p, push_template_decl_real):
6885 Pass depth as int pointer.
6887 2002-07-11 Tim Josling <tej@melbpc.org.au>
6889 Remove front end hard coding from gengtype.c.
6891 * config-lang.in (gtfiles): Add files needed for this front end.
6893 2002-07-10 Mark Mitchell <mark@codesourcery.com>
6895 * cp-tree.h (unqualified_name_lookup_error): Declare it.
6896 (begin_function_definition): Adjust prototype.
6897 * lex.c (unqualified_name_lookup_error): New function, split out
6899 (do_identifier): ... here.
6900 * parse.y (parse_begin_function_definition): New function.
6902 * semantics.c (begin_function_definition): Accept decl-specifiers
6903 and attributes as separate parameters.
6905 2002-07-10 Jason Merrill <jason@redhat.com>
6908 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6909 modifying the old one.
6911 2002-07-09 Mark Mitchell <mark@codesourcery.com>
6913 * cp-tree.h (constructor_name_p): Declare it.
6914 (check_template_template_default_arg): Likewise.
6915 * class.c (handle_using_decl): Use constructor_name_p.
6916 * decl.c (grokdeclarator): Likewise.
6917 * decl2.c (constructor_name_p): Define it.
6918 * init.c (build_member_call): Use constructor_name_p.
6919 * parse.y (template_parm): Use check_template_template_default_arg.
6920 * pt.c (check_explicit_specialization): Use constructor_name_p.
6921 * semantics.c (check_template_template_default_arg): New function.
6923 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6925 * pt.c (can_complete_type_without_circularity): Add static to
6926 function definition.
6928 2002-07-08 Mark Mitchell <mark@codesourcery.com>
6930 * cp-tree.h (have_extern_spec): Declare it
6931 * decl.c (have_extern_spec): Define it.
6932 (start_decl): Eliminate use of used_extern_spec.
6933 (start_function): Likewise.
6934 * parse.y (have_extern_spec): Remove declaration.
6935 (used_extern_spec): Likewise.
6936 (frob_specs): Eliminate use of used_extern_spec.
6937 (.hush_warning): Likewise.
6939 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6941 * Make-lang.in (cp/parse.o): Depend on decl.h.
6942 * cp-tree.h (do_decl_instantiation): Change prototype.
6943 * parse.y: Include decl.h.
6944 (parse_decl_instantiation): New function.
6945 (explicit_instantiation): Use it.
6946 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6949 2002-07-07 Roger Sayle <roger@eyesopen.com>
6951 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6952 constructor and destructor tests when passed a TEMPLATE_DECL.
6954 2002-07-05 Jason Merrill <jason@redhat.com>
6956 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6959 PR optimization/7145
6960 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6962 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
6964 Repair damage on weak-impared targets caused by my previous patch.
6965 * cp-tree.h (import_export_tinfo): Add parameter.
6966 * decl2.c (import_export_tinfo): Add parameter, post adjust
6968 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6969 import_export_tinfo.
6971 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6974 * init.c (build_aggr_init): Remove qualifiers of init before calling
6976 (build_vec_init): Flatten multi-dimensional array during cleanup.
6977 (build_vec_delete_1): Abort if the type of each element is array.
6979 2002-07-03 Graham Stott <graham.stott@btinternet.com>
6981 * pt.c (instantiate_class_template): Fix typo.
6983 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6985 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6986 by CVS conflict in my last patch.
6988 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6991 * pt.c (can_complete_type_without_circularity): New function.
6992 (instantiate_class_template): Use it.
6993 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6994 message due to incomplete fields.
6996 2002-07-01 Mark Mitchell <mark@codesourcery.com>
6999 * mangle.c (write_expression): Add mangling for sizeof when
7001 * operators.def: Remove stale comment.
7003 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
7005 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7006 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7007 (tinfo_decl_type): Replace with ...
7008 (type_info_ptr_type): ... this.
7009 (import_export_tinfo): Declare.
7010 (tinfo_decl_p): Rename to ...
7011 (unemitted_tinfo_decl_p): ... this.
7012 * decl2.c (import_export_decl): Break out tinfo handling into ...
7013 (import_export_tinfo): ... here. New function.
7014 (finish_file): Adjust.
7015 * rtti.c (TINFO_REAL_NAME): New macro.
7016 (init_rtti_processing): Create the tinfo types.
7017 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7018 (get_tinfo_decl): Adjust.
7019 (get_tinfo_ptr): New function.
7020 (get_type_id): Use it.
7021 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7022 (ptr_initializer): Use get_tinfo_ptr.
7023 (ptm_initializer): Likewise.
7024 (synthesize_tinfo_var): Break into ...
7025 (get_pseudo_ti_init): ... this. Just create the initializer.
7026 (get_pseudo_ti_desc): .. and this.
7027 (create_real_tinfo_var): Remove.
7028 (create_pseudo_type_info): Don't create the vtable decl here.
7029 (get_vmi_pseudo_type_info): Remove.
7030 (create_tinfo_types): Adjust.
7031 (tinfo_decl_p): Rename to ...
7032 (unemitted_tinfo_decl_p): ... here. Adjust.
7033 (emit_tinfo_decl): Adjust. Create the initializer.
7035 2002-06-27 Mark Mitchell <mark@codesourcery.com>
7038 * pt.c (tsubst_friend_class): Substitute into the context of the
7039 friend before using it.
7041 2002-06-26 Mark Mitchell <mark@codesourcery.com>
7043 * cp-tree.h (xref_tag): Change prototype.
7044 (handle_class_head): Likewise.
7045 (build_x_component_ref): Likewise.
7046 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7047 (xref_tag): Take attributes as a separate parameter.
7048 (xref_tag_from_type): Adjust call to xref_tag.
7049 * decl2.c (build_expr_from_tree): Adjust call to
7050 build_x_component_ref.
7051 (handle_class_head): Take attributes as a separate parameter.
7052 * parse.y (parse_xref_tag): New function.
7053 (parse_handle_class_head): Likewise.
7054 (primary): Use parse_xref_tag.
7055 (class_head_decl): Use parse_handle_class_head.
7056 (class_head_defn): Likewise.
7057 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7058 (build_dynamic_cast_1): Likewise.
7059 (create_pseudo_type_info): Likewise.
7060 (emit_support_tinfos): Likewise.
7061 * typeck.c (build_object_ref): Adjust call to
7062 build_x_component_ref.
7063 (build_x_component_ref): Remove protect parameter.
7065 2002-06-25 Mark Mitchell <mark@codesourcery.com>
7067 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7068 * class.c (handle_using_decl): Likewise.
7069 (instantiate_type): Likewise.
7070 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7071 (xref_basetypes): Change prototype.
7072 (begin_mem_initializers): New function.
7073 (get_overloaded_fn): Likewise.
7074 * decl.c (xref_basetypes): Simplify.
7075 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7076 * init.c (build_offset_ref): Likewise.
7077 * parse.y (base_init): Use begin_mem_initializers().
7078 (structsp): Adjust call to xref_basetypes.
7079 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7080 (instantiate_class_template): Adjust call to xref_basetypes.
7081 * semantics.c (begin_mem_initializers): New function.
7082 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7083 (really_overlaoded_fn): Likewise.
7084 (get_overloaded_fn): New function.'
7085 (get_first_fn): USe BASELINK_FUNCTIONS.
7087 2002-06-24 Mark Mitchell <mark@codesourcery.com>
7089 * cp-tree.h (SCALAR_TYPE_P): New macro.
7090 (check_for_out_of_scope_variable): New function.
7091 (at_class_scope_p): Likewise.
7092 (finish_fname): Likewise.
7093 * class.c (finish_struct): Use at_function_scope_p.
7094 * decl.c (check_for_out_of_scope_variable): New function, split
7095 out from do_identifier.
7096 (finish_enum): Use at_function_scope_p.
7097 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7098 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
7099 (primary): Use at_function_scope_p.
7100 * search.c (at_class_scope_p): New function.
7101 * semantics.c (finish_fname): Likewise.
7102 (check_multiple_declarators): Use at_function_scope_p.
7104 2002-06-23 Mark Mitchell <mark@codesourcery.com>
7106 * parse.y (parse_scoped_id): New function.
7108 * cp-tree.h (do_scoped_id): Adjust declaration.
7109 * lex.c (do_scoped_id): Remove call to yylex.
7110 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7111 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7112 expanding it inline.
7114 2002-06-23 Matt Thomas <matt@3am-software.com>
7116 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7119 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7121 * mangle.c (integer_type_codes): Const-ify.
7123 2002-06-20 Richard Henderson <rth@redhat.com>
7126 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7127 Call put_var_into_stack.
7129 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7131 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7132 array size calculation.
7134 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7137 * pt.c (tsubst_expr): Handle FILE_STMT.
7139 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7142 * pt.c (lookup_template_class): Don't build complete argument of
7143 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7146 2002-06-19 Akim Demaille <akim@epita.fr>
7148 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7150 * spew.c, lex.c: Adjust.
7151 * parse.y (explicit_instantiation): Add empty action to override
7152 the default $$ = $1 where it introduces a type clash.
7154 2002-06-14 Jason Merrill <jason@redhat.com>
7156 * semantics.c (begin_for_stmt): Push the 'for' scope before
7157 adding the FOR_STMT.
7160 * class.c (build_base_field): Set DECL_PACKED.
7161 (layout_class_type): Don't use tail padding of PODs.
7162 * mangle.c (write_unqualified_name): Fix template conversion op
7165 2002-06-16 Richard Henderson <rth@redhat.com>
7168 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7169 after template instantiation.
7171 2002-06-16 Richard Henderson <rth@redhat.com>
7173 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7175 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
7177 * cp-tree.h (compiler_error): Remove declaration.
7178 * lex.c (compiler_error): Remove definition.
7180 2002-06-14 Steve Ellcey <sje@cup.hp.com>
7182 * g++spec.c (LIBUNWIND): New.
7183 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7185 2002-06-13 Jessica Han <jessica@cup.hp.com>
7187 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7188 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7189 (build_vbase_offset_vtbl_entries): Likewise.
7190 * rtti.c (build_headof): Likewise.
7191 (get_tinfo_decl_dynamic): Likewise.
7192 (create_pseudo_type_info): Likewise.
7194 2002-06-12 Stan Shebs <shebs@apple.com>
7196 * mpw-config.in: Remove file, no longer used.
7197 * mpw-make.sed: Ditto.
7199 2002-06-07 Zack Weinberg <zack@codesourcery.com>
7201 * decl2.c: Update call to cpp_handle_option.
7203 2002-06-07 H.J. Lu (hjl@gnu.org)
7205 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7207 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7209 * error.c (cp_error_at): Fix typo.
7211 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
7213 * error.c (cp_diagnostic_starter): Adjust call.
7214 (maybe_print_instantiation_context): Change prototype to take a
7215 'diagnostic_info *'.
7216 (print_instantiation_full_context): Likewise.
7217 (print_instantiation_partial_context): Likewise.
7218 (cp_diagnostic_starter): Likewise.
7219 (cp_diagnostic_finalizer): Likewise.
7220 (cp_print_error_function): Likewise.
7221 (cp_printer): Take a secondary parameter as a 'text_info *'.
7222 Remove output_state savings. Adjust calls.
7224 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7226 * pt.c (inline_parm_levels): Mark for GC.
7228 * mangle.c (start_mangling): Allocate G.substitutions here...
7229 (init_mangle): ... rather than here.
7230 (finish_mangling): Clear the varray pointer when done with it.
7231 * spew.c (yylexstring): Don't use VARRAY_FREE.
7232 * search.c (bfs_walk): Don't use VARRAY_FREE.
7233 * decl2.c (pending_statics): Use gengtype to mark.
7234 (deferred_fns): Likewise.
7235 (ssdf_decls): Likewise.
7236 (init_decl2): Delete.
7237 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7238 (cxx_init_decl_processing): Don't call init_decl2.
7239 (cxx_pop_function_context): Don't use VARRAY_FREE.
7240 * cp-tree.h (struct saved_scope): No need for special marking
7242 (struct language_function): Likewise.
7243 (local_classes): Use gengtype to mark.
7244 (init_decl2): Delete prototype.
7245 * class.c (init_class_processing): Don't use
7246 ggc_add_tree_varray_root.
7247 (build_vtbl_initializer): Don't use VARRAY_FREE.
7249 * decl.c (typename_compare): Don't use same_type_p.
7251 * decl.c: Include hashtab.h instead of hash.h.
7252 (typename_hash): Update to use htab_h.
7253 (typename_compare): Likewise.
7254 (typename_htab): Use gengtype to mark.
7255 (build_typename_type): Update to use htab_h.
7256 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7258 * Make-lang.in (gt-cp-tree.h): New rule.
7259 (cp/tree.o): Depend on gt-cp-tree.h.
7260 * config-lang.in (gtfiles): Add cp/tree.c.
7261 * tree.c: Include gt-cp-tree.h.
7262 (list_hash_table): Use gengtype to mark.
7263 (init_tree): Use gengtype to mark trees.
7265 * Make-lang.in (cp/decl.o): Add debug.h dependency.
7266 * call.c (struct z_candidate): Use gengtype.
7267 (USER_CONV_CAND): Use WRAPPER_ZC.
7268 (convert_class_to_reference): Use build_zc_wrapper.
7269 (build_type_conversion_1): Likewise.
7270 (build_over_call): Use WRAPPER_ZC.
7271 (add_warning): Use build_zc_wrapper.
7272 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7273 * cp-tree.h (struct lang_identifier): Use gengtype.
7274 (struct template_parm_index_s): Likewise.
7275 (struct ptrmem_cst): Likewise.
7276 (struct tree_binding): Likewise.
7277 (struct tree_overload): Likewise.
7278 (struct tree_srcloc): Likewise.
7279 (struct tree_wrapper): Likewise. Also modify to have a pointer
7280 to struct z_candidate rather than void.
7281 (enum cp_tree_node_structure_enum): New.
7282 (union lang_tree_node): New.
7283 (cxx_mark_tree): Delete prototype.
7284 (cp_tree_node_structure): New prototype.
7285 (build_ptr_wrapper): Delete prototype.
7286 (build_int_wrapper): Delete prototype.
7287 (build_zc_wrapper): New prototype.
7288 * decl.c: Include debug.h
7289 (cxx_mark_tree): Delete.
7290 (cp_tree_node_structure): New.
7291 * tree.c (build_ptr_wrapper): Delete.
7292 (build_int_wrapper): Delete.
7293 (build_zc_wrapper): New.
7295 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7296 Correct typo. Patch from k_fukui@highway.ne.jp.
7298 * semantics.c (current_stmt_tree): Update for change to
7299 struct language_function.
7300 (finish_mem_initializers): Likewise.
7301 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7302 * cp-tree.h (struct language_function): Rename from
7303 cp_language_function. Change all uses.
7304 (cp_function_chain): Don't need to cast.
7306 * class.c (duplicate_tag_error): Reset discriminator.
7307 (check_bases_and_members): Update for data structure changes.
7308 * cp-tree.h (struct lang_id2): Use gengtype.
7309 (flagged_type_tree): Likewise.
7310 (SET_LANG_ID): Use GGC on struct lang_id2.
7311 (struct cp_language_function): Use gengtype. Remove field
7312 'x_vcalls_possible_p'.
7313 (current_vcalls_possible_p): Delete.
7314 (struct lang_type_header): New.
7315 (struct lang_type_class): Rename from struct lang_type. Include
7316 struct lang_type_header.
7317 (struct lang_type_ptrmem): New.
7318 (struct lang_type): New.
7319 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
7320 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
7321 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7322 (struct lang_decl_flags): Use gengtype. Add discriminators.
7323 (struct lang_decl): Use gengtype. Add and use discriminators.
7324 Update the macros that reference moved fields.
7325 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
7326 (SET_DECL_THUNK_P): Set discriminator too.
7327 (clear_inline_text_obstack): Delete prototype.
7328 (finish_inline_definitions): Delete prototype.
7329 (mark_pending_inlines): Delete prototype.
7330 (lang_check_failed): New prototype.
7331 * decl.c (struct named_label_use_list): Use gengtype.
7332 (struct named_label_list): Likewise.
7333 (mark_binding_level): Delete.
7334 (mark_named_label_lists): Delete.
7335 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7336 (cxx_init_decl_processing): Use generated marker routine.
7337 (begin_destructor_body): Delete dead set to
7338 current_vcalls_possible_p.
7339 (mark_lang_function): Delete.
7340 (mark_cp_function_context): Delete.
7341 (lang_mark_tree): Use generated marker routines.
7342 * decl2.c (start_objects): Set discriminator when setting
7343 GLOBAL_INIT_PRIORITY.
7344 * lex.c (retrofit_lang_decl): Set discriminators.
7345 (copy_lang_type): Update for changes to lang_type structure.
7346 (cp_make_lang_type): Set discriminator.
7347 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
7348 * search.c: Include ggc.h.
7349 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7350 (finish_inline_definitions): Delete.
7351 * spew.c (struct token): Use gengtype.
7352 (struct token_chunk): New.
7353 (struct unparsed_text): Use gengtype. Store tokens in chunks.
7354 (struct feed): Use gengtype.
7355 (feed_obstack): Delete.
7356 (feed): Mark as GC root.
7357 (pending_inlines): Mark as GC root.
7358 (pending_inlines_tail): Likewise.
7359 (processing_these_inlines): Likewise.
7360 (token_obstack): Make static.
7361 (first_token): Likewise.
7362 (init_spew): Don't initialize deleted things; use gengtype for roots.
7363 (clear_inline_text_obstack): Delete.
7364 (feed_input): Use GC for struct feed. Update for changes to
7365 struct unparsed_text.
7366 (mark_pending_inlines): Delete.
7367 (next_token): Rename from add_token. Change all callers. Update
7368 for changes to struct unparsed_text.
7369 (space_for_token): New.
7370 (remove_last_token): New.
7371 (alloc_unparsed_text): New.
7372 (snarf_block): Take an unparsed_text. Update for changes to struct
7374 (snarf_method): Update for changes to struct unparsed_text.
7375 (snarf_defarg): Update for changes to struct unparsed_text.
7376 * tree.c (lang_check_failed): New.
7378 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
7379 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
7380 (cp/spew.o): Add dependency on gt-<filename>.h.
7381 (cp/decl2.o): Add dependency on gt-<filename>.h.
7382 (cp/call.o): Add dependency on gt-<filename>.h.
7383 (cp/pt.o): Add dependency on gt-<filename>.h.
7384 (cp/repo.o): Add dependency on gt-<filename>.h.
7385 (cp/parse.o): Add dependency on gt-<filename>.h.
7386 * call.c: Use gengtype for roots.
7387 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
7388 decl2.c parse.y pt.c repo.c spew.c.
7389 * cp-tree.h: Use gengtype for roots.
7390 (struct saved_scope): Use GGC, gengtype.
7391 (cp_parse_init): Delete prototype.
7392 (init_pt): Delete prototype.
7393 * decl.c: Use gengtype for roots.
7394 (mark_saved_scope): Delete.
7395 (cxx_init_decl_processing): Don't call deleted initilisation
7397 (signed_size_zero_node): Delete, unused.
7398 * decl.h: Use gengtype for roots.
7399 * decl2.c: Use gengtype for roots.
7400 * lex.h: Use gengtype for roots.
7401 * parse.y: Use gengtype for roots.
7402 (cp_parse_init): Delete.
7403 * pt.c: Use gengtype for roots.
7405 * repo.c: Use gengtype for roots.
7406 * spew.c: Use gengtype for roots.
7408 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
7409 (cp/decl.o): Add dependency on gtype-cp.h.
7410 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
7411 Include gtype-cp.h. Allow for filename changes.
7413 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
7414 (cp/decl.o): Add cp/gt-decl.h dependency.
7415 * config-lang.in (gtfiles): New.
7416 * tree.h: Rename struct binding_level to struct cp_binding_level.
7417 * decl.c: Rename struct binding_level to struct cp_binding_level.
7418 Include cp/gt-decl.h.
7419 (struct cp_binding_level): Use gengtype.
7420 (make_binding_level): Use GGC on struct cp_binding_level.
7421 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
7422 (cxx_init_decl_processing): Mark free_binding_level as
7425 * decl.c (mark_cp_function_context): Update calling sequence.
7427 * decl.c (start_function): Don't free 'struct
7428 cp_language_function'.
7429 (pop_cp_function_context): Likewise.
7430 (save_function_data): Allocate it using GC.
7431 * semantics.c (genrtl_start_function): Don't free 'struct
7432 cp_language_function'.
7434 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
7436 * lang-specs.h: Use cpp_debug_options.
7438 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7440 * mangle.c, tree.c: Include real.h.
7441 * Make-lang.in: Update dependency lists.
7443 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
7445 * lex.c: Don't include c-lex.h.
7446 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
7448 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
7450 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
7452 2002-05-22 Richard Henderson <rth@redhat.com>
7454 * decl.c (obscure_complex_init): Check for VAR_DECL
7455 before using DECL_THREAD_LOCAL.
7457 2002-05-22 Richard Henderson <rth@redhat.com>
7459 * decl.c (check_tag_decl): Handle RID_THREAD.
7460 (obscure_complex_init): Reject run-time init of tls.
7461 (grokvardecl, grokdeclarator): Handle RID_THREAD.
7462 * lex.c (reswords): Add __thread.
7463 (rid_to_yy): Map RID_THREAD to SCSPEC.
7465 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
7467 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
7468 * cp-tree.h (cxx_post_options): Kill.
7469 * cp-lex.c (cxx_post_options): Kill.
7471 2002-05-21 Richard Henderson <rth@redhat.com>
7473 * lex.c (rid_to_yy): Add RID_THREAD.
7475 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
7477 * init.c (build_vec_init): Test for trivial copy-assignment when
7478 copy-assigning arrays.
7480 2002-05-20 Andreas Jaeger <aj@suse.de>
7482 * init.c (build_default_init): Remove unused variable.
7484 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
7486 * call.c (any_strictly_viable): New.
7487 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
7489 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7491 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
7493 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7496 * pt.c (do_decl_instantiation): Don't complain explicit
7497 instantiation after explicit specialization.
7498 (do_type_instantiation): Likewise.
7500 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
7502 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
7504 (complete_type_or_else): ... this. Redefined as macro.
7505 (cxx_incomplete_type_diagnostic): Declare.
7506 (cxx_incomplete_type_error): Define as macro.
7507 * init.c (build_delete): Warn about incomplete types other than
7508 void, and use the built-in operator delete for them.
7509 * typeck.c (complete_type_or_diagnostic): Renamed from
7510 complete_type_or_else. Added warn_only argument, passed to...
7511 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
7512 warnings or errors depending on new warn_only argument. Renamed
7514 (cxx_incomplete_type_error): ... this. New implementation in
7515 terms of cxx_incomplete_type_diagnostic.
7517 2002-05-18 Jason Merrill <jason@redhat.com>
7520 * decl2.c (import_export_decl): If we clear
7521 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
7523 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7526 * pt.c (verify_class_unification): Don't check if PARM is template
7527 parameter dependent. Simplify.
7528 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
7529 parameter dependent expression.
7531 2002-05-14 Jason Merrill <jason@redhat.com>
7533 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
7535 (synthesize_tinfo_var): Take the public decl.
7536 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
7537 (emit_tinfo_decl): Adjust. Call import_export_decl.
7538 * decl2.c (import_export_decl): Simplify tinfo decl handling.
7540 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
7542 * cp-tree.h (struct lang_type): Added non_zero_init.
7543 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
7544 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
7545 * class.c (check_field_decls): Test non_zero_init.
7546 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
7547 zero-to-NULL conversions.
7548 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
7549 type that needs zero-initialization without zeros.
7550 (check_initializer_decl): Compute zero-initializer for types
7551 that require a non-trivial one.
7552 * init.c (build_forced_zero_init): New function.
7553 (build_default_init): Use it.
7554 * tree.c (zero_init_p): New function.
7555 * typeck2.c (force_store_init_value): New function.
7556 (process_init_constructor): Create non-trivial zero-initializers
7557 for array members and class fields.
7559 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
7561 * lang-specs.h: Remove redundant -lang-c++.
7563 2002-05-13 Jason Merrill <jason@redhat.com>
7565 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
7566 (fixed_type_or_null): See through reference vars.
7567 (build_base_path): Vtable contents are constant.
7568 * typeck.c (get_member_function_from_ptrfunc): Likewise.
7570 2002-05-12 Jason Merrill <jason@redhat.com>
7572 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
7575 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
7577 * cp-tree.h (flag_ansi): Remove.
7578 * decl2.c (flag_ansi): Remove.
7579 (cxx_decode_option): Set flag_iso and flag_undef.
7581 2002-05-09 Jason Merrill <jason@redhat.com>
7583 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
7584 Use subtraction rather than a bitmask to get the index.
7585 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
7587 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
7589 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
7591 * Make-lang.in (decl2.o): Update.
7592 * cp-tree.h (warn_multichar): Remove.
7593 * decl2.c: Include c-common.h.
7594 (warn_multichar): Remove.
7596 2002-05-03 Jason Merrill <jason@redhat.com>
7598 * tree.c (build_cplus_array_type): Only const and volatile get
7601 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
7603 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7605 ABI change, returning simple classes from functions.
7606 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7607 TYPE_HAS_TRIVIAL_INIT_REF is false or
7608 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7610 2002-04-30 Jason Merrill <jason@redhat.com>
7613 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7614 anonymous class with a typedef if there are attributes.
7616 2002-04-29 Paul Eggert <eggert@twinsun.com>
7618 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7620 2002-04-29 Jakub Jelinek <jakub@redhat.com>
7623 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7626 2002-04-29 Mark Mitchell <mark@codesourcery.com>
7629 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7630 enter that scope before name lookup.
7633 * method.c (do_build_copy_constructor): Avoid building
7634 cv-qualified reference types.
7636 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
7639 * decl.c (grok_op_properties): Assignment ops don't have to return
7640 by value. operator% should.
7642 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7645 * decl.c (duplicate_decls): Call merge_weak.
7647 2002-04-26 Richard Henderson <rth@redhat.com>
7649 * parse.y (malloced_yyss, malloced_yyvs): New.
7650 (yyoverflow): Re-add. Set them.
7651 (free_parser_stacks): New.
7653 2002-04-26 Mark Mitchell <mark@codesourcery.com>
7656 * method.c (do_build_assign_ref): Pass a derivation to
7657 build_method_call when calling base class assignment operators.
7659 2002-04-26 Richard Henderson <rth@redhat.com>
7661 * parse.y (yyoverflow): Revert.
7663 2002-04-26 Richard Henderson <rth@redhat.com>
7666 * parse.y (string): Remove. Update all uses to use STRING
7667 instead, and not call combine_strings.
7668 * rtti.c (tinfo_name): Use fix_string_type.
7669 * semantics.c (finish_asm_stmt): Don't call combine_strings.
7670 * spew.c (yylexstring): New.
7671 (read_token): Use it.
7673 2002-04-25 Richard Henderson <rth@redhat.com>
7676 * parse.y (yyoverflow): New.
7678 2002-04-25 Jason Merrill <jason@redhat.com>
7681 * search.c (check_final_overrider): No longer static.
7682 * class.c (update_vtable_entry_for_fn): Call it.
7683 * cp-tree.h: Adjust.
7685 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7687 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7688 * cp-tree.h (cxx_set_yydebug): Die.
7689 * lex.c (YYDEBUG): Get from c-lex.h.
7690 (cxx_set_yydebug): Remove.
7691 * parse.y: Include c-lex.h.
7692 (YYDEBUG): Get from c-lex.h.
7694 2002-04-24 Mark Mitchell <mark@codesourcery.com>
7697 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7700 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
7702 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7703 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7705 * cp-tree.h (cp_attribute_table): Rename.
7706 * decl.c (lang_attribute_table): Remove declaration.
7707 (cxx_init_decl_processing): Don't set it.
7708 * tree.c (cp_attribute_table): Rename.
7710 2002-04-24 Jason Merrill <jason@redhat.com>
7713 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7714 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7715 The pedwarn for array assignment is now unconditional.
7716 * tree.c (build_cplus_array_type_1): Still process simple array types
7717 normally in templates.
7720 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7723 2002-04-23 Jakub Jelinek <jakub@redhat.com>
7725 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7726 node with attributes.
7728 2002-2-23 David O'Brien <obrien@FreeBSD.org>
7730 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7731 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7733 2002-04-23 Mark Mitchell <mark@codesourcery.com>
7736 * pt.c (tsubst_friend_class): Handle templates with explicit
7740 * typeck.c (merge_types): Remember the cv-qualification of pointer
7741 types when merging them.
7743 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
7745 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7746 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7747 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7748 cxx_mark_function_context): New.
7749 * decl.c (push_cp_function_context, pop_cp_function_context,
7750 mark_cp_function_context): Rename for consistency.
7751 (cxx_init_decl_processing): Don't set old hooks.
7753 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
7755 * call.c (convert_type_from_ellipsis): Rename, update.
7756 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7757 * cp-tree.h (convert_type_from_ellipsis): Rename.
7758 * decl.c (cxx_init_decl_processing): Don't set hook.
7760 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7762 * call.c (build_new_method_call): Update.
7763 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7764 * cp-tree.h (cxx_incomplete_type_error): New.
7765 * decl.c (grokdeclarator, grokparms): Update.
7766 * decl2.c (check_classfn): Update.
7767 * pt.c (tsubst): Update.
7768 * typeck.c (complete_type_or_else, expr_sizeof,
7769 decay_conversion): Update.
7770 * typeck2.c (incomplete_type_error): Rename.
7771 (add_exception_specifier): Update.
7773 2002-04-18 Jason Merrill <jason@redhat.com>
7776 * search.c (setup_class_bindings): A class template qualifies as a
7779 2002-04-17 Jakub Jelinek <jakub@redhat.com>
7782 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7785 2002-04-16 Mark Mitchell <mark@codesourcery.com>
7787 * init.c (begin_init_stmts): Remove commented out code.
7788 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7789 * semantics.c (begin_gobal_stmt_expr): Adjust call to
7790 expand_start_stmt_expr.
7792 2002-04-15 Mark Mitchell <mark@codesourcery.com>
7794 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
7795 dso_handle itself, to __cxa_atexit.
7797 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7799 * error.c (cxx_print_error_function): Adjust call to macros.
7801 2002-04-14 Jakub Jelinek <jakub@redhat.com>
7803 * class.c (layout_virtual_bases): Do all dsize computation on trees.
7805 2002-04-14 Jason Merrill <jason@redhat.com>
7807 * typeck.c (get_member_function_from_ptrfunc): Don't do
7808 gratuitious division and multiplication on
7809 ptrmemfunc_vbit_in_delta targets.
7811 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7814 * semantics.c (finish_expr_stmt): Remember the type of the
7815 expression before any conversions are performed.
7817 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7820 * call.c (add_template_candidate_real): Do not treat member
7821 templates as copy constructors.
7823 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7825 * decl.c (duplicate_decls): Do not copy the RTL for a variable
7826 declaration if the old variable had an incomplete type and the new
7828 (complete_vars): Do not call layout_decl for completed variables.
7830 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
7832 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
7833 with an explicit one.
7834 (follow_tag_typedef): New.
7835 (lookup_tag): Use it to extract the tag of an explicit typedef.
7836 (xref_tag): Likewise.
7838 2002-04-11 Andrew Haley <aph@redhat.com>
7840 * typeck.c (type_after_usual_arithmetic_conversions):
7841 If two types have the same variant, return immediately.
7842 When two floating-point operands are the same precision:
7843 convert to float if one of the operands is float;
7844 if neither operand is one of the standard types, return the type
7845 of the first operand.
7847 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
7850 * decl.c (make_typename_type): Remove implicit typenameness.
7852 2002-04-09 Jason Merrill <jason@redhat.com>
7854 PR optimization/6189
7855 * semantics.c (genrtl_start_function): Don't free
7856 DECL_SAVED_FUNCTION_DATA for inline functions.
7858 * init.c (build_member_call): For now, don't convert to
7859 intermediate base if it would cause an error.
7861 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
7863 * parse.y (namespace_qualifier, maybe_identifier,
7864 begin_explicit_instantiation, end_explicit_instantiation,
7865 apparent_template_type, .finish_template_type,
7866 do_id, maybe_init, defarg_again, component_decl_1):
7867 Add ending ';', in accordance with POSIX.
7869 2002-04-06 Mark Mitchell <mark@codesourcery.com>
7872 * class.c (layout_class_type): Remember incomplete static
7874 (finish_struct_1): Call complete_vars, not
7875 hack_incomplete_structures.
7876 * cp-tree.h (hack_incomplete_structures): Rename to ...
7877 (complete_vars): ... this.
7878 (struct saved_scope): Remove incomplete.
7879 (namespace_scope_incomplete): Remove.
7880 * decl.c (struct binding_level): Remove incomplete.
7881 (incomplete_vars): New variable.
7882 (mark_binding_level): Don't mark incomplete.
7883 (print_binding_level): Don't print it.
7884 (mark_saved_scope): Don't mark incomplete.
7885 (pushdecl): Use maybe_register_incopmlete_var.
7886 (cxx_init_decl_processing): Register incomplete_vars for GC.
7887 (start_decl_1): Clarify error message.
7888 (hack_incomplete_vars): Remove.
7889 (maybe_register_incomplete_var): New function.
7890 (complete_vars): Likewise.
7892 2002-04-06 Jason Merrill <jason@redhat.com>
7895 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7896 set before checking it.
7899 * init.c (build_member_call): Use build_scoped_ref.
7900 (resolve_offset_ref): Likewise.
7901 * call.c (build_scoped_method_call): Likewise.
7902 * tree.c (maybe_dummy_object): Kludge around current_class_type being
7904 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7905 * cp-tree.h: Adjust.
7907 * init.c (push_base_cleanups): Just use build_scoped_method_call.
7910 * method.c (implicitly_declare_fn): Pass unqualified type to
7911 synthesize_exception_spec.
7913 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
7915 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7916 * cvt.c: Update comment.
7917 * init.c (expand_cleanup_for_base): Update.
7918 * semantics.c (finish_parenthesized_expr): Update.
7919 * typeck.c (cp_truthvalue_conversion): Update.
7921 2002-04-04 Jason Merrill <jason@redhat.com>
7923 * semantics.c (finish_eh_cleanup): New fn.
7924 * cp-tree.h: Add prototype.
7925 * init.c (perform_member_init, expand_cleanup_for_base): Use
7927 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7928 * cp-tree.h: Remove references.
7929 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7930 * dump.c (cp_dump_tree): Likewise.
7931 * pt.c (tsubst_expr): Likewise.
7932 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7933 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7934 * tree.c (cp_statement_code_p): Likewise.
7936 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
7939 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
7943 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7945 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7947 2002-04-03 Richard Henderson <rth@redhat.com>
7949 * cp-lang.c (cxx_warn_unused_global_decl): New.
7950 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7952 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
7954 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7955 * tree.c (init_tree): Don't set hook.
7957 2002-04-03 Roger Sayle <roger@eyesopen.com>
7960 * decl.c (duplicate_decls): Don't mess with assembler names when
7961 redeclaring builtin functions as static.
7963 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7965 * call.c (build_addr_func): Update.
7966 * class.c (resolve_address_of_overloaded_function): Update.
7967 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7968 * cp-tree.h (cxx_mark_addressable): New.
7969 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7970 * decl2.c (build_cleanup): Update.
7971 * except.c (build_throw): Update.
7972 * init.c (resolve_offset_ref): Update.
7973 * pt.c (convert_nontype_argument): Update.
7974 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7975 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7976 unary_complex_lvalue): Update.
7977 (mark_addressable): Rename.
7979 2002-04-01 Roger Sayle <roger@eyesopen.com>
7982 * decl.c (duplicate_decls): Overwrite the RTL when (and only
7983 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
7984 but follow the SET_DECL_RTL idiom used elsewhere in the function.
7986 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7988 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7989 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7990 * decl.c (grokdeclarator): Update.
7991 * mangle.c (write_integer_cst): Update.
7992 * typeck.c (build_binary_op): Update.
7994 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7996 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7997 * lex.c (cxx_init): Don't set hook.
7999 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8001 * Make-lang.in (error.o): Update.
8002 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8003 * cp-tree.h (struct diagnostic_context): Predeclare.
8004 (cxx_print_error_function): New.
8005 * error.c: Include langhooks-def.h.
8006 (lang_print_error_function): Rename. Update.
8007 (init_error): Don't set hook.
8009 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8011 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8013 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8014 * decl.c (finish_enum): Similarly.
8015 * error.c (dump_type): Similarly.
8016 * lex.c (cxx_init): Similarly.
8017 * mangle.c (write_builtin_type): Similarly.
8018 * typeck.c (comptypes): Similarly.
8020 2002-03-28 Roger Sayle <roger@eyesopen.com>
8023 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8024 in the g++ front-end.
8025 (duplicate_decl): Allow redefinition of anticipated built-ins.
8026 Fix inlining problem by over-writing the old DECL_RTL.
8027 (lookup_namespace_name): Fail to find an identifier in the
8028 specified namespace if its still anticipated.
8029 (builtin_function_1): New function split out from builtin_function
8030 to create a builtin in the current namespace with given context.
8031 (builtin_function): Call builtin_function_1 to define the
8032 appropriate builtins in both the std and global namespaces.
8033 (select_decl): Don't test for anticipated decls here.
8034 (unqualified_namespace_lookup): Instead ignore them whilst
8035 searching through scopes and namespaces.
8036 * decl2.c (do_nonmember_using_decl): If a using declaration
8037 specifies an anticipated built-in function, mark it as no longer
8038 anticipated in that scope.
8039 (ambiguous_decl): Avoid resolving to an anticipated decl.
8040 * lex.c (do_scoped_id): Fail to find an identifier in the global
8041 namespace if its still anticipated.
8043 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8045 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8046 * cp-tree.h (cp_make_lang_type): Rename.
8047 * lex.c (cp_make_lang_type): Rename.
8048 (make_aggr_type): Update.
8049 * tree.c (init_tree): Don't set make_lang_type_fn.
8051 2002-03-29 Jakub Jelinek <jakub@redhat.com>
8054 * class.c (finish_struct_1): Update static field's DECL_MODE even
8055 if its type is a variant of t.
8057 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8059 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8060 * cp-tree.h (cxx_insert_default_attributes): New.
8061 * decl.c (insert_default_attributes): Rename.
8063 2002-03-27 Mark Mitchell <mark@codesourcery.com>
8066 * call.c (build_op_delete_call): Allow for the fact the placement
8067 may be a COMPOUND_EXPR.
8069 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8071 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8072 * cp-tree.h (init_cplus_expand): Remove.
8073 (cxx_expand_expr): New.
8074 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8076 (init_cplus_expand): Remove.
8077 * lex.c (cxx_init): Don't call init_cplus_expand.
8079 2002-03-26 Mark Mitchell <mark@codesourcery.com>
8082 * init.c (build_new_1): Allow for the fact the result of
8083 build_function_call may be a COMPOUND_EXPR.
8085 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
8088 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8089 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8090 (dfs_skip_nonprimary_vbases_markedp): Remove.
8091 * search.c (get_shared_vbase_if_not_primary): Remove.
8092 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8093 (dfs_skip_nonprimary_vbases_markedp): Remove.
8094 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8095 (dfs_marked_real_bases_queue_p): Likewise.
8097 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8099 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8100 * cp-tree.h (cxx_mark_tree): New.
8101 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8103 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8105 * cp-tree.h (cxx_maybe_build_cleanup): New.
8106 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8107 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8108 * tree.c (build_target_expr): Update.
8109 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8111 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
8113 * decl2.c (cxx_decode_option): Handle -E.
8114 * lang-specs.h (default_compilers): Preprocess with cc1plus.
8115 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8117 2002-03-23 Jakub Jelinek <jakub@redhat.com>
8120 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8122 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8124 * error.c (dump_type): Be careful about implicit typenames.
8126 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8129 * semantics.c (finish_base_specifier): Handle erronous base
8132 2002-03-22 Zack Weinberg <zack@codesourcery.com>
8134 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8137 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
8139 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8140 an index into the vtable_entry array regardless of
8141 TARGET_PTRMEMFUNC_VBIT_LOCATION.
8143 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
8145 * tree.c (cp_cannot_inline_tree_fn): Same.
8147 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8149 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8150 insert_block, getdecls, global_bindings_p): New.
8152 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
8155 * mangle.c (struct globals) Add internal_mangling_p member.
8156 (write_template_param): Do internal mangling, if needed.
8157 (mangle_conv_op_name_for_type): Request internal mangling.
8159 2002-03-20 Jason Merrill <jason@redhat.com>
8162 * init.c (build_delete): Check access for a member op delete here.
8163 * decl2.c (delete_sanity): Not here.
8165 2002-03-19 Jason Merrill <jason@redhat.com>
8168 * class.c (get_vfield_name): Use the constructor_name.
8170 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8172 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8173 * cp-tree.h (lang_printable_name): Rename.
8174 * error.c (lang_decl_name): Use new hook.
8175 * lex.c (cxx_init): Remove old hook.
8176 * pt.c (tsubst_decl): Use new hook.
8177 * tree.c (lang_printable_name): Rename.
8179 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
8182 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8183 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8184 only after recording the declaration.
8186 2002-03-18 Jason Merrill <jason@redhat.com>
8189 * init.c (resolve_offset_ref): Hand off to build_component_ref.
8191 PR c++/4222, c++/5995
8192 * call.c (build_over_call): Fix empty class logic.
8195 * cp-tree.h (struct saved_scope): Add last_parms field.
8196 * decl.c (maybe_push_to_top_level): Save last_function_parms.
8197 (pop_from_top_level): Restore it.
8200 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
8204 * pt.c (tsubst_friend_function): Use decl_namespace_context.
8206 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8207 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8208 type with a nontrivial destructor.
8210 2002-03-17 Jason Merrill <jason@redhat.com>
8213 * class.c (build_base_path): Virtual base layout is fixed in
8216 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8218 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8219 * parse.y (yyparse): Remove macro.
8221 2002-03-17 Jason Merrill <jason@redhat.com>
8224 * init.c (build_new_1): Pass the right pointer to op delete.
8226 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
8229 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8230 conversion operators go.
8231 (struct lang_decl_flags): Add template_conv_p and unused
8233 (DECL_TEMPLATE_CONV_FN_P): New macro.
8234 * call.c (build_user_type_conversion_1): Don't check second type
8235 conversion of overload set first.
8236 * class.c (add_method): Make sure templated conversion operators
8237 all end up on slot 2.
8238 * lex.c (do_identifier): A conversion operator token might be
8239 satisfied by a templated conversion operator.
8240 * pt.c (check_explicit_specialization): Use
8241 CLASSTYPE_FIRST_CONVERSION_SLOT.
8242 (template_parm_this_level_p): New function.
8243 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8244 * search.c (lookup_fnfields_1): Template conversions will be on
8246 * typeck.c (build_component_ref): Preserve the type of an
8247 conversion operator name on the overload type.
8248 (build_x_function_call): Retrieve the conversion operator name.
8250 2002-03-15 Richard Henderson <rth@redhat.com>
8252 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8254 2002-03-15 Mark Mitchell <mark@codesourcery.com>
8256 * cp-tree.h (CLEANUP_DECL): Remove.
8257 (CLEANUP_EXPR): Likewise.
8258 * decl.c (destroy_local_var): Simplify.
8259 (maybe_build_cleanup): Tidy.
8260 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8261 * semantics.c (cp_expand_stmt): Likewise.
8262 * cp/tree.c (cp_statement_code_p): Likewise.
8264 2002-03-15 Jason Merrill <jason@redhat.com>
8267 * decl.c (duplicate_decls): Use merge_types instead of common_type.
8268 * typeck.c (common_type): Just hand off to
8269 type_after_usual_arithmetic_conversions and
8270 composite_pointer_type.
8271 (merge_types): New fn.
8272 (commonparms): Use it instead of common_type.
8273 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8274 (composite_pointer_type): Also handle attributes.
8275 * cp-tree.h: Declare merge_types.
8277 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8279 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8281 2002-03-14 Richard Henderson <rth@redhat.com>
8283 * decl.c: Include c-pragma.h.
8284 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8285 * Make-lang.in: Update dependencies.
8287 2002-03-14 Jakub Jelinek <jakub@redhat.com>
8290 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8291 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8293 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8295 * mangle.c (write_builtin_type): Handle 128-bit integers even if
8296 they are not a standard integer type.
8298 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8300 * cp-tree.h (init_init_processing): Remove declaration.
8301 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8302 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8304 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8306 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8308 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8310 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8311 cplus_tree_code_name): Delete.
8312 (cxx_init): Don't call add_c_tree_codes, instead set
8313 lang_unsafe_for_reeval. Don't try to copy into the various
8316 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
8319 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8320 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8323 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8325 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
8326 DR209 is now not a defect.
8327 * cp-tree.h (skip_type_access_control): Remove.
8328 * decl.c (grokdeclarator): Do type access control for friend
8330 * semantics.c (decl_type_access_control): Don't reset
8331 current_type_lookups.
8332 (save_type_access_control): Always save the lookups.
8333 (skip_type_access_control): Remove.
8334 (finish_class_definition): Don't change type_lookups.
8336 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8338 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
8340 * typeck.c (build_static_cast): Compare non-qualified types
8341 with pointer to member conversions.
8343 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
8344 Daniel Berlin <dan@dberlin.org>
8346 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8347 (cxx_get_alias_set): Use it.
8349 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8351 * cp-tree.h (stabilize_expr): Prototype.
8353 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
8355 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8356 conditional return void.
8358 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
8360 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8361 * cp-tree.h (cxx_unsave): New.
8362 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8363 (init_tree): Update.
8365 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8367 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8368 explicit sizeof/sizeof.
8369 * decl2.c (cxx_decode_option): Likewise.
8370 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8372 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
8375 * decl.c (lookup_tag): Only reject enum/class mismatch, not
8376 class/union mismatch.
8377 * parse.y (check_class_key): New function.
8378 (structsp): Call it.
8380 2002-03-01 Michael Matz <matz@suse.de>
8382 * typeck.c (cp_pointer_int_sum): Complete inner type which is
8383 used later by size_in_bytes().
8385 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
8387 * cp-tree.h: Require __GNUC__ to be #defined.
8388 (build_init): Add missing prototype.
8390 2002-03-01 Jason Merrill <jason@redhat.com>
8392 * except.c: Don't include decl.h or obstack.h. Do include
8394 (build_throw): Destroy temporaries from the thrown
8395 expression before calling __cxa_throw. Construct a thrown
8396 temporary directly into the exception object.
8397 (stabilize_throw_expr): New function.
8398 (wrap_cleanups_r): New function.
8399 * tree.c (stabilize_expr): New function.
8400 * init.c (build_init): New function.
8401 * Make-lang.in (cp/except.o): Adjust .h deps.
8403 2002-02-28 Jason Merrill <jason@redhat.com>
8405 * search.c (lookup_base_r): Don't clear is_non_public just because
8406 we found a friendly scope.
8408 * decl.c (finish_function): Only warn about missing return
8409 statement with -Wreturn-type.
8411 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
8413 * class.c (build_clone): Update.
8414 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8415 * cp-tree.h (cxx_dup_lang_specific_decl): New.
8416 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
8417 (copy_decl): Update.
8418 * method.c (make_thunk): Update.
8420 2002-02-27 Zack Weinberg <zack@codesourcery.com>
8422 * decl2.c: Delete traditional-mode-related code copied from
8423 the C front end but not used, or used only to permit the
8426 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
8429 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
8432 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8435 * semantics.c (finish_switch_cond): Don't call get_unwidened
8438 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
8441 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
8443 (make_typename_type): Use tsubst_flags_t.
8444 * decl.c (make_typename_type): Adjust. Return non-artificial
8445 TYPE_DECLs, if required.
8446 (grokdeclarator): Simplify CVR qualification handling. Allow bad
8447 qualifiers on typedef types.
8448 * decl2.c (handle_class_head): Adjust make_typename_type call.
8449 * parse.y (nested_name_specifier): Likewise.
8450 (typename_sub0): Likewise.
8451 (typename_sub1): Likewise.
8452 * pt.c (convert_template_argument): Adjust make_typename_type
8454 (tsubst): Adjust cp_build_qualified_type_real calls.
8455 (check_cv_quals_for_unify): Cope with allowing bad qualifications
8456 on template type parms.
8457 (instantiate_decl): Recheck substitutions to give warnings on bad
8459 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
8461 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
8463 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8465 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
8466 unless DECL_ALWAYS_INLINE.
8468 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8470 * typeck.c (cp_pointer_int_sum): Renamed from
8471 pointer_int_sum, call pointer_int_sum.
8473 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8475 * decl.c (duplicate_decls): Return 0 if issued error about
8478 2002-02-19 Jason Merrill <jason@redhat.com>
8480 ABI change: Mangle `void (A::*)() const' as
8481 M1AKFvvE, not MK1AFvvE.
8482 * mangle.c (write_function_type): Write cv-quals for member
8484 (write_pointer_to_member_type): Not here.
8486 2002-02-18 Jason Merrill <jason@redhat.com>
8488 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
8489 (do_decl_instantiation): Likewise.
8491 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
8494 * decl.c (duplicate_decls): Make warning unconditional
8495 if duplicate default argument declarations are present.
8497 2002-02-17 Jakub Jelinek <jakub@redhat.com>
8499 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
8502 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
8504 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
8505 remove incorrect comment. Move #if 0'd code to common path. Use
8506 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
8508 2002-02-13 Jason Merrill <jason@redhat.com>
8510 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
8511 (finish_function): Don't warn if current_function_returns_null.
8513 * typeck2.c (digest_init): Do handle values of vector type.
8515 * typeck2.c (digest_init, process_init_constructor): Treat vectors
8518 2002-02-11 Jason Merrill <jason@redhat.com>
8520 * parse.y (reserved_declspecs): Don't handle attributes.
8521 (reserved_typespecquals): Handle them here.
8522 * Make-lang.in (parse.c): Adjust expected conflicts.
8524 2002-02-08 Jakub Jelinek <jakub@redhat.com>
8526 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
8527 instead of compstmt.
8528 (compstmt_or_stmtexpr): Renamed from compstmt.
8529 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
8531 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8533 Rename instantiate_type_flags to tsubst_flags_t & expand use.
8534 * cp-tree.h (instantiate_type_flags): Rename to ...
8535 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
8536 add tf_warning flag.
8537 (instantiate_type): Adjust prototype.
8538 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
8539 do_type_instantiation, cp_build_qualified_type_real): Likewise.
8540 cp_build_qualified_type: Adjust.
8541 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
8543 * call.c (standard_conversion): Rename itf_* to tf_*.
8544 (reference_binding): Likewise.
8545 (convert_like_real): Likewise.
8546 * cvt.c (cp_convert_to_pointer): Likewise.
8547 (convert_to_reference): Likewise.
8548 * decl.c (lookup_namespace_name): Use tf_* flags.
8549 (make_typename_type): Likewise.
8550 (grokdeclarator): Likewise.
8551 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
8552 (coerce_template_template_parms, convert_template_argument,
8553 coerce_template_parms, maybe_get_template_decl_from_type_decl,
8554 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
8555 instantiate_class_template, tsubst_template_arg_vector,
8556 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
8557 tsubst_decl, tsubst_arg_types, tsubst_function_type,
8558 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
8559 instantiate_template, fn_type_unification,
8560 resolve_overloaded_unification, verify_class_unification,
8561 unify, get_bindings_real, do_type_instantiation,
8562 regenerate_decl_from_template, instantiate_decl,
8563 tsubst_initializer_list, tsubst_enum,
8564 get_mostly_instantiated_function_type,
8565 invalid_nontype_parm_type_p): Likewise.
8566 * tree.c (cp_build_qualified_type_real): Likewise.
8567 * typeck.c (build_binary_op): Rename itf_* to tf_*.
8568 (build_ptrmemfunc): Likewise.
8569 (convert_for_assignment): Likewise.
8571 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8574 * decl.c (grokdeclarator): Allow friend declarations from
8576 * decl2.c (handle_class_head): Don't push into template parm contexts.
8577 * pt.c (push_template_decl_real): Template parm contexts are never
8580 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
8582 * class.c: Include target.h.
8583 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
8584 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
8586 * Make-lang.in: Adjust deps.
8588 2002-02-05 Jason Merrill <jason@redhat.com>
8590 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
8592 2002-02-04 Jakub Jelinek <jakub@redhat.com>
8594 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
8595 (finish_switch_cond): Set SWITCH_TYPE.
8597 2002-02-04 Richard Henderson <rth@redhat.com>
8599 * method.c (use_thunk): Always initialize the block tree. Reindent.
8600 * semantics.c (expand_body): Emit thunks after function, not before.
8602 2002-02-04 Jason Merrill <jason@redhat.com>
8604 * decl.c (start_function): Call cplus_decl_attributes immediately
8605 after grokdeclarator.
8607 * decl.c (start_function): Combine DECL_RESULT handling code.
8609 2002-02-03 Jason Merrill <jason@redhat.com>
8612 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8613 (cp/xref.o): Remove dependencies.
8614 * class.c (finish_struct_1, check_methods): Don't call xref fns.
8615 (finish_struct_1): Likewise.
8616 * friend.c (make_friend_class): Likewise.
8617 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8618 * spew.c (read_process_identifier): Likewise.
8620 2002-02-01 Jason Merrill <jason@redhat.com>
8623 * decl.c (finish_function): Warn about a non-void function with
8624 no return statement and no abnormal exit.
8625 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8626 (current_function_returns_abnormally): New macro.
8627 * call.c (build_call): Set it.
8629 * typeck.c (build_component_ref): Always complain about offsetof
8630 constructs on non-PODs. Only make it an error for members of
8633 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8634 (dump_function_decl): Always dump parms.
8636 * decl2.c (finish_static_data_member_decl): Complain about a local
8637 class with a static data member.
8640 * search.c (lookup_field_1): Don't xref a static data member
8641 just because we looked it up.
8643 2002-01-31 Jason Merrill <jason@redhat.com>
8645 * Make-lang.in (parse.c): Handle .output file.
8648 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8650 * semantics.c (finish_class_definition): Adjust.
8652 Allow attributes in parms and casts.
8653 * parse.y (named_parm): Don't strip attrs.
8654 (declmods): Remove 'attributes' production.
8655 (nonempty_cv_qualifiers): Accept attributes.
8656 (ATTRIBUTE): Give precedence.
8657 * decl.c (groktypename): Handle attributes.
8658 (grokparms): Likewise.
8660 2002-01-29 Jakub Jelinek <jakub@redhat.com>
8662 * decl2.c (cxx_decode_option): Pass 0 as last argument to
8664 * lang-specs.h: Use cpp_unique_options instead of cpp_options
8665 when used together with cc1_options.
8667 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
8670 * typeck2.c (digest_init): Make sure non-array core type is
8672 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8673 constructor, rather than build a new one.
8674 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8675 PURPOSE of constructor elts.
8677 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8679 * Make-lang.in (parse.c): Adjust expected number of
8680 shift-reduce conflicts.
8681 (decl.o): Depend on diagnostic.h.
8682 * decl.c: Include diagnostic.h.
8683 (grokdeclarator): Check for null pointer.
8684 (finish_function): Don't abort when
8685 current_binding_level->parm_flag != 1, if errors have
8686 occurred; throw away the statement tree and extra binding
8687 levels, and continue.
8688 * lex.c (note_list_got_semicolon): Check for null pointer.
8689 * method.c (hack_identifier): Just return error_mark_node if
8690 value is error_mark_node.
8691 * parse.y (primary: TYPEID(type_id)): No need to use
8692 TYPE_MAIN_VARIANT here.
8693 (handler_seq): Accept an empty list of catch clauses and
8694 generate a fake handler block to avoid later crashes.
8695 (ansi_raise_identifier): Accept the error token too.
8696 * semantics.c (begin_class_definition,
8697 finish_class_definition): Check for error_mark_node.
8699 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8701 * typeck2.c (friendly_abort): Delete definition.
8702 * cp-tree.h (friendly_abort): Don't prototype.
8703 (my_friendly_assert): Use fancy_abort.
8705 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8707 * cp-tree.h (my_friendly_abort): Remove.
8709 2002-01-23 Jakub Jelinek <jakub@redhat.com>
8711 * spew.c (pending_inlines, pending_inlines_tail,
8712 processing_these_inlines): Make static.
8713 (mark_pending_inlines): Remove static.
8714 (begin_parsing_inclass_inline): If in function, save pi
8715 for GC to cp_function_chain->unparsed_inlines instead.
8716 (process_next_inline): Likewise.
8717 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8718 (mark_pending_inlines): Add prototype.
8719 * decl.c (spew_debug): Remove unused extern.
8720 (mark_lang_function): Call mark_pending_inlines.
8722 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8724 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8725 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8726 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8727 Change my_fancy_abort() to abort().
8729 2002-01-23 Jason Merrill <jason@redhat.com>
8732 * class.c (fixed_type_or_null): Fix thinko.
8735 * init.c (resolve_offset_ref): Use build_indirect_ref.
8737 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8739 2002-01-22 Jason Merrill <jason@redhat.com>
8741 * parse.y (function_body): Suppress the block for the outermost
8743 * decl.c (pushdecl): Don't try to skip it.
8744 (begin_function_body): Keep the block we create, not the next one.
8745 * init.c (emit_base_init): Don't mess with keep_next_level.
8747 * class.c (build_base_path): Tweak formatting.
8749 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
8751 Fix regression introduced with patch for c++/775
8752 * parse.y (class_head_defn): Check for template specializations
8753 with a different class-key.
8755 2002-01-17 Jason Merrill <jason@redhat.com>
8757 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8758 (begin_function_body): Call them and keep_next_level.
8759 * init.c (emit_base_init): Call keep_next_level.
8760 * semantics.c (setup_vtbl_ptr): Lose.
8761 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8762 (vtbls_set_up_p): Lose.
8763 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8764 * method.c (do_build_copy_constructor): Likewise.
8765 (synthesize_method): Call finish_mem_initializers.
8766 * parse.y (nodecls): Likewise.
8768 * error.c (dump_type_suffix): Print the exception specs before
8770 (dump_function_decl): Here, too.
8772 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8774 2002-01-10 Ira Ruben <ira@apple.com>
8777 * decl.c (start_method): Handle attrlist.
8779 2002-01-10 Jakub Jelinek <jakub@redhat.com>
8781 * decl2.c (max_tinst_depth): Increase default limit to 500.
8783 2002-01-10 Graham Stott <grahams@redhat.com>
8785 * spew.c (YYCHAR): Uppercase macro parameter and add
8788 (NAME): Uppercase macro parameter.
8790 2002-01-09 Graham Stott <grahams@redhat.com>
8792 * decl.h (grokdeclarator): Wrap long line.
8794 * semantics.c (FINISH_COND): Uppercase macro paramaters and
8797 2002-01-08 Graham Stott <grahams@redhat.com>
8799 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
8800 (PALLOC): Uppercase macro parameter and whitespace.
8801 (SALLOC): Uppercase macro parameter.
8802 (SFREE): Uppercase macros parameter, add parenthese and
8804 (STREQL): Uppercase macro parameter and whitespace.
8811 * call.c (convert_like): Add parenthesis and wrap.
8812 (convert_like_with_context): Likewise.
8813 (ICS_RANK): Whitespace.
8814 (NEED_TEMPORARY_P): Remove parenthesis.
8816 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
8818 (VTT_MARKED_BINFO_P): Likewise.
8820 * decl.c (BINDING_LEVEL): Add parenthesis.
8821 (DEF_OPERATOR): Likewise.
8823 * mangle.c (MANGLE_TRACE): Add parenthesis.
8824 (MANGLE_TRACE_TREE): Likewise.
8825 (write_signed_number): Likewise.
8826 (write_unsigned_number): Likewise.
8828 * pt.c (ccat): Uppercase macro parameter.
8831 * search.c (SET_BINFO_ACCESS): Add parenthesis.
8833 2002-01-07 Jason Merrill <jason@redhat.com>
8835 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
8839 * method.c (make_thunk): If !flag_weak, give the thunk the
8841 (use_thunk): Here, too.
8843 2002-01-07 Graham Stott <grahams@redhat.com>
8845 * error.c: Update copyright date.
8846 (print_scope_operator): Add parenthesis.
8847 (print_left_paren): Likewise.
8848 (print_right_paren): Likewise.
8849 (print_left_bracket): Likewise.
8850 (print_right_bracket): Likewise.
8851 (print_template_argument_list_start): Likewise.
8852 (print_template_argument_list_end): Likewise.
8853 (print_non_consecutive_character): Likewise.
8854 (print_tree_identifier): Likewise.
8855 (print_identifier): Likewise.
8856 (NEXT_CODE): Uppercase macro parameter.
8857 (ident_fndecl): Delete unused.
8858 (GLOBAL_THING): Likewise.
8860 2002-01-06 Graham Stott <grahams@redhat.com>
8862 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8863 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8864 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8865 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8866 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8867 (C_IS_RESERVED_WORD): Uppercase macro parameter.
8868 (C_RID_YYCODE) Likewise.
8869 (ptrmem_cst): Use rtx.
8870 (LOCAL_BINDING_P): Add whitespace.
8871 (INHERITED_VALUE_BINDING_P): Likewise.
8872 (BINDING_SCOPE): Wrap long line.
8873 (BINDING_HAS_LEVEL_P): Remove parenthesis.
8874 (BINDING_VALUE): Wrap long line.
8875 (BINDING_TYPE): Whitespace.
8876 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8877 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
8878 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
8879 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8880 (same_type_p): Uppercase macro parameters.
8881 (same_type_ignoring_top_level_qualifiers_p): Likewise.
8882 (OVL_FUNCTION): Wrap long line.
8883 (OVL_CHAIN): Whitespace.
8884 (OVL_CURRENT): Add parenthesis and whitespace.
8885 (OVL_NEXT): Whitespace.
8886 (OVL_USED): Likewise.
8887 (IDENTIFIER_TYPE_VALUE): Likewise.
8888 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8889 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8890 (LANG_ID_FIELD): Whitespace.
8891 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8892 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8893 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8894 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8895 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8896 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8897 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8898 (IDENTIFIER_VIRTUAL_P): Likewise.
8899 (IDENTIFIER_OPNAME_P): Likewise.
8900 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8901 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8902 (C_SET_EXP_ORIGINAL_CODE): Likewise.
8903 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8904 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8905 (IS_AGGR_TYPE): Uppercase macro parameter.
8906 (CLASS_TYPE_P): Likewise.
8907 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8908 (IS_AGGR_TYPE_2): Whitespace.
8909 (TAGGED_TYPE_P): Uppercase macro parameter.
8910 (TYPE_BUILT_IN): Whitespace.
8911 (TYPE_FOR_JAVA): Likewise.
8912 (FUNCTION_ARG_CHAIN): Remove parenthesis.
8913 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8914 (FUNCTION_FIRST_USER_PARAM): Likewise.
8915 (PROMOTES_TO_AGGR_TYPE): Whitespace.
8916 (DERIVED_FROM_P): Add parenthesis and wrap.
8917 (UNIQUELY_DERIVED_FROM_P): Likewise.
8918 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8919 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8920 (CLASSTYPE_USE_TEMPLATE): Whitespace.
8921 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8922 (TYPE_GETS_DELETE): Add parenthesis.
8923 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8924 (TYPE_HAS_ASSIGN_REF): Likewise,
8925 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8926 (TYPE_HAS_INIT_REF): Likewise.
8927 (TYPE_HAS_CONST_INIT_REF): Likewise.
8928 (TYPE_BEING_DEFINED): Likewise.
8929 (TYPE_LANG_SPECIFIC): Likewise.
8930 (CLASSTYPE_RTTI): Likewise.
8931 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8932 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8933 (TYPE_OVERLOADS_ARROW): Likewise.
8934 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8935 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8936 (CLASSTYPE_METHOD_VEC): Likewise.
8937 (CLASSTYPE_MARKED_N): Likewise.
8938 (CLASSTYPE_MARKED): Likewise.
8939 (CLASSTYPE_MARKED2): Likewise.
8940 (CLASSTYPE_MARKED3): Likewise.
8941 (CLASSTYPE_MARKED4): Likewise.
8942 (CLASSTYPE_MARKED5): Likewise.
8943 (CLASSTYPE_MARKED6): Likewise.
8944 (SET_CLASSTYPE_MARKED): Whitespace.
8945 (CLEAR_CLASSTYPE_MARKED): Likewise.
8946 (SET_CLASSTYPE_MARKED2): Likewise.
8947 (CLEAR_CLASSTYPE_MARKED2): Likewise.
8948 (SET_CLASSTYPE_MARKED3): Likewise.
8949 (CLEAR_CLASSTYPE_MARKED3): Likewise.
8950 (SET_CLASSTYPE_MARKED4): Likewise.
8951 (CLEAR_CLASSTYPE_MARKED4): Likewise.
8952 (SET_CLASSTYPE_MARKED5): Likewise.
8953 (CLEAR_CLASSTYPE_MARKED5): Likewise.
8954 (SET_CLASSTYPE_MARKED6): Likewise.
8955 (CLEAR_CLASSTYPE_MARKED6): Likewise.
8956 (CLASSTYPE_TAGS): Likewise.
8957 (CLASSTYPE_VSIZE): Likewise.
8958 (CLASSTYPE_VBASECLASSES): Likewise.
8959 (CANONICAL_BINFO): Add parenthesis.
8960 (CLASSTYPE_SIZE(NODE): Likewise.
8961 (CLASSTYPE_SIZE_UNIT): Likewise.
8962 (CLASSTYPE_ALIGN(NODE): Likewise.
8963 (CLASSTYPE_USER_ALIGN): Likewise.
8964 (TYPE_JAVA_INTERFACE): Likewise.
8965 (CLASSTYPE_PURE_VIRTUALS): Likewise.
8966 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8967 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8968 (CLASSTYPE_HAS_MUTABLE): Likewise.
8969 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8970 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8971 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8972 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8973 (CLASSTYPE_INTERFACE_ONLY): Likewise.
8974 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8975 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8976 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8977 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8978 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8979 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8980 (BINFO_UNSHARED_MARKED): Whitespace.
8981 (BINFO_MARKED): Whitespace and wrap.
8982 (SET_BINFO_MARKED): Likewise.
8983 (CLEAR_BINFO_MARKED): Likewise.
8984 (BINFO_VTABLE_PATH_MARKED): Likewise.
8985 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8986 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8987 (BINFO_SUBVTT_INDEX): Remove parenthesis.
8988 (BINFO_VPTR_INDEX): Likewise.
8989 (BINFO_PRIMARY_BASE_OF): Likewise,
8990 (CLASSTYPE_VFIELDS): Whitespace.
8991 (VF_DERIVED_VALUE): Wrap long line.
8992 (NAMESPACE_LEVEL): Whitespace.
8993 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8994 (DEFARG_POINTER): Whitespace.
8995 (DECL_NEEDED_P): Remove parenthesis.
8996 (DECL_LANGUAGE): Whitespace.
8997 (SET_DECL_LANGUAGE): Add parenthesis.
8998 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8999 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9000 (DECL_IN_AGGR_P): Whitespace.
9001 (DECL_FRIEND_P): Likewise.
9002 (DECL_BEFRIENDING_CLASSES): Likewise.
9003 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9004 (DECL_NONCONVERTING_P): Whitespace.
9005 (DECL_PURE_VIRTUAL_P): Likewise.
9006 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9007 (DECL_PENDING_INLINE_INFO): Whitespace.
9008 (DECL_SORTED_FIELDS): Likewise.
9009 (DECL_DEFERRED_FN): Likewise.
9010 (DECL_TEMPLATE_INFO): Likewise.
9011 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9012 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9013 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9014 (TMPL_ARGS_LEVEL): Likewise.
9015 (SET_TMPL_ARGS_LEVEL): Likewise.
9016 (INNERMOST_TEMPLATE_PARMS): Whitespace.
9017 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9018 (INTEGRAL_CODE_P(CODE): Add parenthesis.
9019 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9020 (TYPE_HAS_CONSTRUCTOR): Whitespace.
9021 (TREE_HAS_CONSTRUCTOR): Likewise.
9022 (TYPE_HAS_DESTRUCTOR): Likewise.
9023 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9024 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9025 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9026 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9027 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9028 (TYPE_PTRMEMFUNC_P): Likewise.
9029 (TYPE_PTRMEMFUNC_FLAG): Likewise.
9030 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9031 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9032 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9033 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9034 (DECL_ACCESS): Whitespace.
9035 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9036 (DECL_GLOBAL_DTOR_P): Likewise.
9037 (GLOBAL_INIT_PRIORITY): Likewise.
9038 (DECL_TEMPLATE_PARMS): Likewise.
9039 (DECL_TEMPLATE_RESULT): Likewise.
9040 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9041 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9042 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9043 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9044 (PRIMARY_TEMPLATE_P): Add parenthesis.
9045 (DECL_USE_TEMPLATE): Whitespace.
9046 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9047 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9048 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9049 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9050 (CALL_DECLARATOR_PARMS): Remove parenthesis.
9051 (CALL_DECLARATOR_QUALS): Likewise.
9052 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9053 (TEMP_NAME_P): Wrap.
9054 (VFIELD_NAME_P): Likewise.
9055 (B_SET): Uppercase macro parameters and add parenthesis.
9058 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9059 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9060 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9061 (same_or_base_type_p): Likewise.
9062 (cp_deprecated): Likewise.
9064 2002-01-05 Richard Henderson <rth@redhat.com>
9066 * semantics.c (expand_body): Revert last change.
9068 2002-01-04 Jason Merrill <jason@redhat.com>
9071 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9074 * class.c (build_vtbl_initializer): Check for a lost primary
9075 before calculating the vtable entry to throw away.
9077 2002-01-02 Jason Merrill <jason@redhat.com>
9079 * semantics.c (expand_body): Call outlining_inline_function when
9080 emitting an inline function out of line.
9082 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9084 PR c++/5116, c++/764 reversion
9085 * call.c (build_new_op): Revert the instantiations. They are
9088 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9091 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9093 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9096 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9097 (tsubst, case POINTER_TYPE): Handle pmfs here.
9098 (tsubst, case OFFSET_TYPE): Check it is not an offset to
9099 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9101 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9104 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9105 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9106 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9108 (tsubst_template_parms): Break up loop statements.
9109 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9110 parm PARM_DECLs don't get promoted.
9112 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9115 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9116 (build_x_function_call): Cope with a COMPONENT_REF containing a
9119 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9122 * pt.c (convert_template_argument): Be more careful determining
9123 when RECORD_TYPE templates are or are not templates.
9125 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9128 * cp-tree.h (handle_class_head): Adjust prototype.
9129 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9130 parameters. Use for all class heads.
9131 * parse.y (named_class_head_sans_basetype, named_class_head,
9132 named_complex_class_head_sans_basetype,
9133 named_class_head_sans_basetype_defn,
9134 unnamed_class_head): Remove.
9135 (class_head, class_head_apparent_template): Recognize class heads
9136 (class_head_decl, class_head_defn): New reductions. Process class
9138 (structsp): Adjust class definition and class declaration
9140 (maybe_base_class_list): Give diagnostic on empty list.
9142 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9145 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9146 single non-static member.
9147 (unary_complex_lvalue): If it cannot be a pointer to member, don't
9148 make it so. Check it is not pointer to reference.
9150 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9153 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9154 are processing a template decl.
9156 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9158 PR c++/5116, c++/764
9159 * call.c (build_new_op): Make sure template class operands are
9160 instantiated. Simplify arglist construction.
9162 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9164 * call.c (build_user_type_conversion_1): Use my_friendly_assert
9165 rather than if ... abort.
9166 * cvt.c (convert_to_reference): Likewise.
9167 * semantics.c (setup_vtbl_ptr): Likewise.
9168 * pt.c (lookup_template_class): Comment typo.
9170 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9173 * pt.c (push_template_decl_real): Make sure DECL has
9176 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9179 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9180 for non-reference fields.
9181 * typeck.c (require_complete_type): Use resolve_offset_ref).
9183 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
9186 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9188 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
9191 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9192 up. Don't stabilize_references when initializing a reference.
9194 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9196 * decl2.c (lang_f_options): Const-ify.
9198 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9200 * config-lang.in (diff_excludes): Remove.
9202 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
9205 * typeck.c (build_function_call_real): Use original function
9206 expression for errors.
9208 2001-12-18 Jason Merrill <jason@redhat.com>
9211 * class.c (add_method): Do compare 'this' quals when trying to match a
9212 used function. Don't defer to another used function.
9214 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9216 * pt.c (instantiate_clone): Remove, fold into ...
9217 (instantiate_template): ... here. Simplify by removing mutual
9219 * typeck2.c (build_m_component_ref): Don't cv qualify the function
9220 pointed to by a pointer to function.
9221 * class.c (delete_duplicate_fields_1): Typo.
9223 2001-12-18 Jason Merrill <jason@redhat.com>
9225 C++ ABI change: destroy value arguments in caller.
9226 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9227 create an extra binding level for the parameters.
9228 * decl.c (store_parm_decls): Don't do parameter cleanups.
9230 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9232 * call.c (build_new_method_call): Use '%#V'.
9233 * error.c (cv_to_string): Use V parameter to determine padding.
9235 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9237 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9238 spellings in messages.
9240 2001-12-17 Zack Weinberg <zack@codesourcery.com>
9242 * cp-tree.h: Delete #defines for cp_error, cp_warning,
9243 cp_pedwarn, and cp_compiler_error.
9244 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9245 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9246 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9247 typeck2.c: Change calls to the above macros to use their
9248 language-independent equivalents: error, warning, pedwarn, and
9249 internal_error respectively.
9251 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
9253 * decl2.c (finish_file): Remove back_end_hook.
9255 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9257 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9258 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9259 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9261 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
9263 * lang-options.h: Use American spelling in messages.
9265 2001-12-13 Jason Merrill <jason@redhat.com>
9267 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9269 Use cleanups to run base and member destructors.
9270 * init.c (push_base_cleanups): New function, split out from...
9271 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
9272 * decl.c (finish_destructor_body): Move vbase destruction code to
9274 (begin_function_body, finish_function_body): New fns.
9275 (finish_function): Move [cd]tor handling and call_poplevel to
9276 finish_function_body.
9277 (pushdecl): Skip the new level.
9278 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9279 (setup_vtbl_ptr): Call push_base_cleanups.
9280 * method.c (synthesize_method): Call {begin,end}_function_body.
9281 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9282 * cp-tree.h: Declare new fns.
9283 * parse.y (function_body, .begin_function_body): New nonterminals.
9284 (fndef, pending_inline, function_try_block): Use function_body.
9285 (ctor_initializer_opt, function_try_block): No longer has a value.
9286 (base_init): Remove .set_base_init token.
9287 (.set_base_init, compstmt_or_error): Remove.
9288 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9290 * optimize.c (maybe_clone_body): Fix parameter updating.
9292 2001-12-12 Jason Merrill <jason@redhat.com>
9294 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9295 * semantics.c (genrtl_start_function): Don't pass
9296 parms_have_cleanups or push an extra binding level.
9297 (genrtl_finish_function): Lose cleanup_label cruft.
9299 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9300 (ctor_label): Remove.
9301 * semantics.c (finish_return_stmt): Lose ctor_label support.
9302 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9303 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9306 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9308 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9310 * decl.c (finish_function): Check VMS_TARGET, not VMS.
9312 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9313 (end_cleanup_fn): And poplevel.
9315 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9316 if we're in a template.
9318 2001-12-12 Jakub Jelinek <jakub@redhat.com>
9320 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9321 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9322 THIS_NAME_P): Delete.
9323 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9324 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9325 with internal naming scheme.
9326 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9328 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
9330 * decl.c (grokdeclarator): Deprecated implicit typename use.
9332 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
9335 * parse.y (frob_specs): Indicate it is a language linkage which
9336 contained the extern.
9337 * decl.c (grokdeclarator): Allow extern language linkage with
9340 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
9343 * decl.c (add_binding): Don't reject duplicate typedefs involving
9344 template parameters.
9346 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
9348 * parse.y, semantics.c: Similarly.
9350 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
9353 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9354 (copy_args_p): Rename to ...
9355 (copy_fn_p): ... here.
9356 (grok_special_member_properties): New function.
9357 (grok_op_properties): Lose VIRTUALP parameter.
9358 (copy_assignment_arg_p): Remove.
9359 * call.c (build_over_call): Use copy_fn_p.
9360 * decl.c (grokfndecl): Reformat. Adjust call to
9362 (copy_args_p): Rename to ...
9363 (copy_fn_p): ... here. Reject template functions. Check for pass
9365 (grok_special_member_properties): Remember special functions.
9366 (grok_ctor_properties): Don't remember them here, just check.
9367 (grok_op_properties): Likewise.
9368 (start_method): Call grok_special_member_properties.
9369 * decl2.c (grokfield): Likewise.
9370 (copy_assignment_arg_p): Remove.
9371 (grok_function_init): Don't remember abstract assignment here.
9372 * pt.c (instantiate_class_template): Call
9373 grok_special_member_properties.
9374 (tsubst_decl): Adjust grok_op_properties call.
9376 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
9378 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
9379 RID_TYPES_COMPATIBLE_P.
9381 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
9383 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
9384 call to build_aggr_init.
9385 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
9387 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
9389 * parse.y: Replace uses of the string non-terminal with STRING.
9390 Don't perform string concatentaion here.
9391 (string): Remove non-terminal.
9392 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
9394 2001-12-05 Jason Merrill <jason@redhat.com>
9396 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
9397 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
9398 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
9399 * pt.c (push_tinst_level): No longer static.
9400 * cp-tree.h: Declare them.
9402 * init.c (resolve_offset_ref): Don't check access for the base
9403 conversion to access a FIELD_DECL.
9405 * cp-tree.h (TYPE_REFFN_P): New macro.
9406 * decl.c (bad_specifiers): Check it, too.
9408 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
9409 on the __*_type_info type if we haven't seen a definition.
9411 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
9413 * decl.c: Include c-common.h.
9414 (shadow_warning): Move to c-common.c.
9416 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9418 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9420 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9422 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
9424 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9427 * init.c (sort_base_init): Allow binfos to be directly specified.
9428 * method.c (do_build_copy_constructor): Explicitly convert to the
9430 (do_build_assign_ref): Likewise.
9432 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
9434 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
9435 declaration and initialization.
9437 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9439 * typeck2.c: Remove leading capital from diagnostic messages, as
9440 per GNU coding standards.
9442 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
9445 * decl.c (xref_basetypes): Handle attributes between
9448 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
9451 * parse.y (named_complex_class_head_sans_basetype): Add new
9453 * Make-lang.in (parse.c): Adjust expected conflict count.
9455 2001-12-03 Jason Merrill <jason@redhat.com>
9457 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
9458 immediate binfos for our virtual bases.
9460 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
9462 * call.c (build_java_interface_fn_ref): Similarly.
9463 * except.c (is_admissible_throw_operand): Similarly.
9464 * init.c (build_java_class_ref): Similarly.
9465 * xref.c (open_xref_file): Similarly.
9467 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9469 * class.c (finish_struct): Remove trailing periods from messages.
9470 * decl.c (check_tag_decl): Similarly.
9471 * lex.c (cxx_set_yydebug): Similarly.
9472 * typeck2.c (friendly_abort): Similarly.
9474 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9477 * cp-tree.h (ovl_member): Remove.
9478 * decl2.c (merge_functions): Handle extern "C" functions
9480 * tree.c (ovl_member): Remove.
9482 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9485 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
9486 FUNCTION_DECL, as input.
9487 (mark_overriders): Remove.
9488 (warn_hidden): Rework for the new ABI.
9490 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9493 * call.c (convert_like_real): Do not build additional temporaries
9494 for rvalues of class type.
9496 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
9498 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
9499 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
9500 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
9501 (DERIVED_FROM_P): Likewise.
9502 (enum base_access): Renumber, add ba_quiet bit mask.
9503 (get_binfo): Remove.
9504 (get_base_distance): Remove.
9505 (binfo_value): Remove.
9506 (ACCESSIBLY_DERIVED_FROM_P): Remove.
9507 * call.c (standard_conversion): Use lookup_base.
9508 * class.c (strictly_overrides): Likewise.
9509 (layout_virtual_bases): Likewise.
9510 (warn_about_ambiguous_direct_bases): Likewise.
9511 (is_base_of_enclosing_class): Likewise.
9512 (add_vcall_offset_vtbl_entries_1): Likewise.
9513 * cvt.c (build_up_reference): Adjust comment.
9514 * init.c (build_member_call): Reformat.
9515 * search.c (get_binfo): Remove.
9516 (get_base_distance_recursive): Remove.
9517 (get_base_distance): Remove.
9518 (lookup_base_r): Tweak.
9519 (lookup_base): Add ba_quiet control. Complete the types here.
9520 (covariant_return_p): Use lookup_base.
9521 * tree.c (binfo_value): Remove.
9522 (maybe_dummy_object): Use lookup_base.
9523 * typeck.c (build_static_cast): Use lookup_base.
9524 (get_delta_difference): Likewise.
9525 * typeck2.c (binfo_or_else): Use lookup_base.
9526 (build_scoped_ref): Add back error_mark_check.
9527 (build_m_component_ref): Use lookup_base.
9529 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9531 * Make-lang.in (c++.generated-manpages): New dummy target.
9533 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9535 * Make-lang.in (cp-lang.o): Depends on c-common.h.
9536 * cp-lang.c (c-common.h): Include.
9537 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
9538 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
9539 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
9541 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
9543 * decl2.c (c_language): Move to c-common.c.
9544 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
9548 2001-11-26 Jason Merrill <jason@redhat.com>
9550 * call.c (joust): Remove COND_EXPR hack.
9552 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
9554 * search.c (lookup_base_r): Declare bk in variable declaration
9557 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
9560 * class.c (build_vbase_pointer): Remove.
9561 (build_vbase_path): Remove.
9562 (build_base_path): New function.
9563 * cp-tree.h (base_access, base_kind): New enumerations.
9564 (build_base_path): Declare.
9565 (convert_pointer_to_real): Remove.
9566 (convert_pointer_to): Remove.
9567 (lookup_base): Declare.
9568 (convert_pointer_to_vbase): Remove.
9569 * call.c (build_scoped_method_call): Use lookup_base &
9570 build_base_path instead of convert_pointer_to_real,
9571 get_base_distance & get_binfo.
9572 (build_over_call): Likewise.
9573 * cvt.c (cp_convert_to_pointer): Likewise.
9574 (convert_to_pointer_force): Likewise.
9575 (build_up_reference): Likewise.
9576 (convert_pointer_to_real): Remove.
9577 (convert_pointer_to): Remove.
9578 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
9579 instead of convert_pointer_to_vbase & build_vbase_path.
9580 (emit_base_init): Use build_base_path instead of
9581 convert_pointer_to_real.
9582 (expand_virtual_init): Lose unrequired conversions.
9583 (resolve_offset_ref): Use lookup_base and build_base_path
9584 instead of convert_pointer_to.
9585 * rtti.c (build_dynamic_cast_1): Use lookup_base &
9586 build_base_path instead of get_base_distance & build_vbase_path.
9587 * search.c (get_vbase_1): Remove.
9588 (get_vbase): Remove.
9589 (convert_pointer_to_vbase): Remove.
9590 (lookup_base_r): New function.
9591 (lookup_base): New function.
9592 * typeck.c (require_complete_type): Use lookup_base &
9593 build_base_path instead of convert_pointer_to.
9594 (build_component_ref): Likewise.
9595 (build_x_function_call): Likewise.
9596 (get_member_function_from_ptrfunc): Likewise.
9597 (build_component_addr): Likewise.
9598 * typeck2.c (build_scoped_ref): Likewise.
9600 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9602 * cp-tree.h (CP_TYPE_QUALS): Removed.
9603 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9604 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9605 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9606 * dump.c (cp_dump_tree): Use void* dump_info argument to match
9607 lang-hooks prototype.
9608 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9609 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9610 CP_TYPE_QUALS changed to cp_type_quals.
9611 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9612 (CXX_C_OBJS): Remove c-dump.o.
9614 2001-11-21 Mark Mitchell <mark@codesourcery.com>
9617 * pt.c (lookup_template_class): Ensure that all specializations
9618 are registered on the list corresponding to the most general
9621 2001-11-20 Mark Mitchell <mark@codesourcery.com>
9623 * call.c (non_reference): Add documentation.
9624 (convert_class_to_reference): Do not strip reference types
9625 from conversion operators.
9626 (maybe_handle_ref_bind): Simplify.
9627 (compare_ics): Correct handling of references.
9629 2001-11-19 John Wilkinson <johnw@research.att.com>
9631 * dump.c (dump_op): New function.
9632 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
9633 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9634 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9636 2001-11-19 Mark Mitchell <mark@codesourcery.com>
9639 * semantics.c (finish_sizeof): Make sure that expression created
9640 while processing a template do not have a type.
9641 (finish_alignof): Likewise.
9642 * typeck.c (c_sizeof): Likewise.
9643 (expr_sizeof): Likewise.
9645 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9647 * lex.c (cxx_finish): Call c_common_finish.
9648 (finish_parse): Remove.
9650 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9652 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9653 when displaying error message about missing array bounds.
9655 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9657 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9659 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9661 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
9663 * cp-tree.h (print_class_statistics): Restore.
9665 2001-11-15 Jason Merrill <jason@redhat.com>
9667 * method.c (use_thunk): Don't emit debugging information for thunks.
9669 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9670 * decl.c (make_typename_type): Handle getting a class template.
9671 * search.c (lookup_field_r): A class template is good enough for
9674 * call.c (convert_like_real): Only use cp_convert for the bad part.
9675 (standard_conversion): Also allow bad int->enum.
9676 * typeck.c (ptr_reasonably_similar): Also allow functions to
9677 interconvert. Pointers to same-size integers are reasonably
9680 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9683 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
9686 * init.c (sort_base_init): Remove unreachable code.
9687 (expand_member_init): Adjust comment to reflect reality. Simplify
9688 and remove unreachable code.
9690 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9692 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9693 (cxx_init): Update prototype.
9694 * decl.c (init_decl_processing): Rename. Move null node init
9695 to its creation time.
9696 * lex.c (cxx_init_options): Update.
9697 (cxx_init): Combine with old init_parse; also call
9698 cxx_init_decl_processing.
9700 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
9702 * decl.c (check_initializer): Try to complete the type of an
9703 array element before checking whether it's complete. Don't
9704 complain about arrays with complete element types but an
9706 (cp_finish_decl): Build the hierarchical constructor before
9707 calling maybe_deduce_size_from_array_init.
9709 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
9711 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9713 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
9716 * parse.y (already_scoped_stmt): Remove.
9717 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9719 2001-11-12 H.J. Lu <hjl@gnu.org>
9721 * cvt.c (ocp_convert): Don't warn the address of a weak
9722 function is always `true'.
9724 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9726 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9727 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9728 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9729 * cp-tree.h (print_class_statistics): Remove.
9730 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9731 cxx_print_identifier, cxx_set_yydebug): New.
9732 * lex.c (set_yydebug): Rename c_set_yydebug.
9733 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9734 lang_print_xnode): Rename.
9735 * tree.c (print_lang_statistics): Rename.
9737 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9739 * class.c (dump_array): Fix format specifier warning.
9741 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9743 * cp-lang.c (LANG_HOOKS_NAME): Override.
9744 (struct lang_hooks): Constify.
9745 * lex.c (cxx_init_options): Update.
9746 (lang_identify): Remove.
9747 * parse.y (language_string): Remove.
9749 2001-11-08 Andreas Franck <afranck@gmx.de>
9751 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9752 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9753 suggested by autoconf.
9754 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9755 (c++.install-common): Use the transformed target alias names.
9757 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9759 * Make-lang.in: Update.
9760 * cp-lang.c: Include langhooks-def.h.
9762 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9764 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9766 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9768 * lex.c (copy_lang_type): Add static prototype.
9770 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9772 * pt.c (unify): Handle SCOPE_REF.
9774 2001-11-01 Jakub Jelinek <jakub@redhat.com>
9776 * tree.c (cp_copy_res_decl_for_inlining): Adjust
9777 DECL_ABSTRACT_ORIGIN for the return variable.
9779 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9781 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9783 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
9785 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9786 semantics.c, spew.c: Fix spelling errors.
9788 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9790 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
9792 2001-10-25 Zack Weinberg <zack@codesourcery.com>
9794 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
9797 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9799 * cp-lang.c (cxx_get_alias_set): New function.
9800 Point LANG_HOOKS_GET_ALIAS_SET to it.
9802 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9804 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
9805 * cp-tree.h (make_unbound_class_template): Prototype new function.
9806 * decl.c (make_unbound_class_template): New function.
9807 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
9808 * error.c (dump_type): Likewise.
9809 * mangle.c (write_type): Likewise.
9810 * parse.y (template_parm): Likewise.
9811 (template_argument): Use make_unbound_class_template.
9812 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
9814 (tsubst_copy): Likewise.
9816 * tree.c (walk_tree): Likewise.
9817 * typeck.c (comptypes): Likewise.
9819 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9821 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
9822 extra calls into fewer ones.
9824 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
9826 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
9827 Warn when merging inline with attribute noinline.
9828 (start_decl, start_function): Warn if inline and attribute
9829 noinline appear in the same declaration.
9831 2001-10-16 H.J. Lu <hjl@gnu.org>
9833 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
9834 for tree checking disabled.
9836 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
9838 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
9839 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
9841 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9843 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
9844 (unify): Only handle MINUS_EXPR specially if the above flag is set
9845 and the subtracted constant is 1. Clear the flag on recursive calls.
9846 Set it when unifying the maximum value in an INTEGER_TYPE's range.
9848 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9850 * decl.c (bad_specifiers): Don't allow exception specifications
9853 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
9855 * cp/lex.c (init_cp_pragma): Similarly.
9857 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9859 * pt.c (lookup_template_class): Build complete template arguments
9860 for BOUND_TEMPLATE_TEMPLATE_PARM.
9862 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9864 * cp-tree.h (TYPE_BINFO): Update comment.
9865 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9866 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9867 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9868 (copy_type): Prototype new function.
9869 * lex.c (copy_lang_decl): Gather tree node statistics.
9870 (copy_lang_type): New function.
9871 (copy_type): Likewise.
9872 (cp_make_lang_type): Create lang_type for
9873 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
9874 and BOUND_TEMPLATE_TEMPLATE_PARM.
9875 * pt.c (tsubst): Use copy_type instead of copy_node.
9876 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9878 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9880 * pt.c (determine_specialization): Ignore functions without
9883 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
9886 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9888 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
9890 * typeck2.c (store_init_value): Don't re-digest a bracketed
9893 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9896 2001-10-11 Richard Henderson <rth@redhat.com>
9898 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9899 of an asm statement.
9900 (build_vtbl_ref_1): Split out from build_vtbl_ref.
9901 (build_vfn_ref): Use it to handle vtable descriptors before
9902 calling build_vtable_entry_ref.
9903 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9905 2001-10-10 Richard Henderson <rth@redhat.com>
9907 * parse.y (asm_operand): Allow named operands.
9908 * semantics.c (finish_asm_stmt): Tweek for changed location
9909 of the operand constraint.
9911 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
9913 * call.c (standard_conversion): Add bad conversion between
9914 integers and pointers.
9915 (convert_like_real): Don't use convert_for_initialization for bad
9916 conversions; complain here and use cp_convert.
9917 (build_over_call): Don't handle bad conversions specially.
9918 (perform_implicit_conversion): Allow bad conversions.
9919 (can_convert_arg_bad): New fn.
9920 * cp-tree.h: Declare it.
9921 * typeck.c (convert_for_assignment): Use it.
9922 (ptr_reasonably_similar): Any target type is similar to void.
9924 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
9926 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9927 (cp/cp-lang.o): New rule.
9928 * cp-tree.h: Declare hooks.
9929 * tree.c: Make hooks non-static.
9930 (init_tree): Don't initialize hooks here.
9931 * lex.c: Likewise. Move definition of lang_hooks to...
9932 * cp-lang.c: ... new file.
9934 2001-10-08 Richard Henderson <rth@redhat.com>
9936 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
9937 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
9939 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9941 * class.c (build_vtable_entry_ref): Const-ify.
9942 * decl.c (predefined_identifier,
9943 initialize_predefined_identifiers): Likewise.
9944 * init.c (build_new_1): Likewise.
9945 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9948 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
9950 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9951 (INSNS_PER_STMT): Likewise.
9952 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9953 (copy_body, initialize_inlined_parameters): Likewise.
9954 (declare_return_variable, inlinable_function_p): Likewise.
9955 (expand_call_inline, expand_calls_inline): Likewise.
9956 (optimize_inline_calls, clone_body): Likewise.
9957 * tree.c (walk_tree): Moved to ../tree-inline.c.
9958 (walk_tree_without_duplicates): Likewise.
9959 (copy_tree_r, remap_save_expr): Likewise.
9961 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
9963 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9964 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9965 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9966 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9967 (flag_inline_trees): Moved declaration to ../tree-inline.h.
9968 (walk_tree): Moved declaration to ../tree-inline.h.
9969 (walk_tree_without_duplicates, copy_tree_r): Likewise.
9970 (remap_save_expr): Likewise.
9971 * decl.c: Include tree-inline.h.
9972 (lang_mark_tree): Don't mark inlined_fns.
9973 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9974 * optimize.c: Include tree-inline.h.
9975 (optimize_inline_calls): Move declaration to ../tree.h, as
9977 (remap_decl): Use language-independent constructs and hooks.
9978 (remap_block, copy_body_r, declare_return_variable): Likewise.
9979 (inlinable_function_p): Likewise. Don't test for
9980 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9981 no longer language-specific.
9982 (optimize_inline_calls): Likewise. Make it non-static. Moved
9983 call of dump_function to...
9984 (optimize_function): Here...
9985 (clone_body): New function, extracted from...
9986 (maybe_clone_body): ... here. Build decl_map locally and pass
9987 it on to clone_body.
9988 * pt.c, semantics.c: Include tree-inline.h.
9990 (cp_walk_subtrees): New language-specific hook for tree inlining.
9991 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9992 cp_is_overload_p, cp_auto_var_in_fn_p,
9993 cp_copy_res_decl_for_inlining): Likewise.
9994 (walk_tree): Move language-specific constructs into...
9995 (cp_walk_subtrees): this new function.
9996 (copy_tree_r): Use language-independent constructs and hooks.
9997 (init_tree): Initialize tree inlining hooks.
9998 (remap_save_expr): Adjust prototype so that the declaration
9999 does not require the definition of splay_tree.
10001 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
10003 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10004 to build the declaration instead of the declaration itself.
10006 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
10008 * decl2.c (cxx_decode_option): Add 'else'.
10010 * spew.c (end_input): No longer static.
10011 * cp-tree.h: Declare it.
10012 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10014 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10016 * call.c (build_over_call), typeck.c (build_function_call_real):
10017 Pass type attributes to check_function_format rather than name or
10018 assembler name. Don't require there to be a name or assembler
10019 name to check formats.
10021 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10023 * decl.c (init_decl_processing): Don't call
10024 init_function_format_info. Initialize lang_attribute_table
10026 (builtin_function): Call decl_attributes.
10027 (insert_default_attributes): New.
10029 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
10031 * decl.c (grokdeclarator): Copy array typedef handling from C
10034 * decl.c (grokdeclarator): Copy too-large array handling from C
10037 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
10039 * config-lang.in (target_libs): Added target-gperf, so that we
10040 don't try to build it if C++ is disabled.
10042 2001-09-23 Zack Weinberg <zack@codesourcery.com>
10044 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10045 (cp/errfn.o): Delete rule.
10046 (cp/error.o): Depend on flags.h.
10047 * errfn.c: Delete file.
10048 * cp-tree.h: Declare warn_deprecated. Remove definitions of
10049 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10050 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10051 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10052 internal_error respectively. Make cp_deprecated into a macro.
10053 Don't define cp_printer typedef or declare cp_printers.
10054 * error.c: Include flags.h.
10055 Delete: struct tree_formatting_info, print_function_argument_list,
10056 print_declaration, print_expression, print_function_declaration,
10057 print_function_parameter, print_type_id, print_cv_qualifier_seq,
10058 print_type_specifier_seq, print_simple_type_specifier,
10059 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10060 print_parameter_declaration_clause, print_exception_specification,
10061 print_nested_name_specifier, and definition of cp_printers.
10062 (locate_error): New function.
10063 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10064 rewritten in terms of locate_error and diagnostic.c.
10065 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10066 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
10067 (init_error): Adjust to match.
10069 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10071 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10073 2001-09-21 Richard Henderson <rth@redhat.com>
10075 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10076 (build_vtbl_initializer): Likewise.
10077 (build_vfn_ref): New.
10078 * cp-tree.h: Declare it.
10079 * call.c (build_over_call): Use it.
10080 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10081 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10083 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
10085 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10087 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
10089 Table-driven attributes.
10090 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10091 * decl2.c (cplus_decl_attributes): Only take one attributes
10093 * cp-tree.c (cplus_decl_attributes): Update prototype.
10094 * class.c (finish_struct), decl.c (start_decl, start_function),
10095 decl2.c (grokfield), friend.c (do_friend), parse.y
10096 (parse_bitfield): Update calls to cplus_decl_attributes.
10097 * decl.c (grokdeclarator): Take a pointer to a single ordinary
10099 * decl.h (grokdeclarator): Update prototype.
10100 * decl2.c (grokfield): Take a single ordinary attribute list.
10101 * friend.c (do_friend): Likewise.
10102 * decl.c (shadow_tag, groktypename, start_decl,
10103 start_handler_parms, grokdeclarator, grokparms, start_function,
10104 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10105 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10106 (process_template_parm, do_decl_instantiation): Pass single
10107 ordinary attribute lists around.
10108 * decl.c (grokdeclarator): Correct handling of nested attributes.
10110 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
10111 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10114 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10115 (cp_attribute_table): Declare.
10116 * decl.c (valid_lang_attribute): Don't define.
10117 (lang_attribute_table): Define.
10118 (init_decl_processing): Initialize lang_attribute_table instead of
10119 valid_lang_attribute.
10120 * tree.c (cp_valid_lang_attribute): Remove.
10121 (handle_java_interface_attribute, handle_com_interface_attribute,
10122 handle_init_priority_attribute): New functions.
10123 (cp_attribute_table): New array.
10124 * decl2.c (import_export_class): Don't use
10125 targetm.valid_type_attribute.
10127 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10129 * Make-lang.in (cp/error.o): Depend on real.h
10130 * error.c: #include "real.h"
10132 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10134 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10135 xmalloc/strcpy/strcat.
10137 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10139 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10141 * pt.c (tsubst_decl): Likewise.
10143 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10145 * decl2.c (lang_f_options): Const-ification.
10146 * lex.c (cplus_tree_code_name): Likewise.
10147 * spew.c (yyerror): Likewise.
10149 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10152 * class.c (force_canonical_binfo_r): Check & move an indirect
10153 primary base first.
10154 (force_canonical_binfo): Check that it's not already
10156 (mark_primary_virtual_base): Remove BINFO parameter.
10157 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10159 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10161 Remove TYPE_NONCOPIED_PARTS.
10162 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10163 CLASSTYPE_PURE_VIRTUALS.
10164 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10165 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10166 (layout_class_type): Don't call fixup_inline_methods here ...
10167 (finish_struct_1): ... call it here.
10169 2001-09-04 Mark Mitchell <mark@codesourcery.com>
10171 * decl.c (duplicate_decls): Remove code deadling with
10173 * decl2.c (finish_file): Likewise.
10174 * pt.c (instantiate_decl): Likewise.
10175 * semantics.c (expand_body): Don't defer local functions if
10176 they wouldn't be deferred for some other reason. Don't
10177 generate RTL for functions that will not be emitted.
10178 (genrtl_start_function): Remove code deadling with
10180 (genrtl_finish_function): Likewise.
10182 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
10185 * call.c (build_over_call): Do not optimize any empty base
10188 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10190 * error.c (dump_template_decl): Output template parameters
10191 together with their specifiers.
10192 Output `class' prefix for template template parameter.
10193 (dump_decl): Fix formatting.
10195 2001-08-30 Kurt Garloff <garloff@suse.de>
10197 * optimize.c (inlinable_function_p): Allow only smaller single
10198 functions. Halve inline limit after reaching recursive limit.
10200 2001-08-30 Joern Rennecke <amylaar@redhat.com>
10201 Jason Merrill <jason_merrill@redhat.com>
10203 * class.c (build_vtable_entry_ref): Subtract in char*, not
10206 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
10208 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10209 (build_cplus_array_type): Use cp_build_qualified_type, not
10210 TYPE_MAIN_VARIANT, to get an unqualified version.
10212 * decl2.c (grok_alignof): Lose.
10213 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10214 * typeck.c (c_alignof): Lose.
10215 * semantics.c (finish_sizeof, finish_alignof): New.
10216 * parse.y: Use them.
10217 * cp-tree.h: Declare them.
10219 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
10221 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10222 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10223 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10225 2001-08-19 Jakub Jelinek <jakub@redhat.com>
10227 * typeck2.c (add_exception_specifier): Only require complete type if
10228 not in processing template declaration.
10230 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10232 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10233 GNU_xref_start_scope and GNU_xref_end_scope.
10235 * tree.c (TYPE_HASH): Moved to ../tree.h.
10237 2001-08-16 Mark Mitchell <mark@codesourcery.com>
10239 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10242 2001-08-14 Richard Henderson <rth@redhat.com>
10244 * class.c, cp-tree.h (build_vfn_ref): Remove.
10245 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10247 2001-08-13 Mark Mitchell <mark@codesourcery.com>
10249 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10250 empty class assignment as having side-effects to avoid
10253 2001-08-13 Zack Weinberg <zackw@panix.com>
10255 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10256 * except.c: Include libfuncs.h.
10258 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10260 * decl.c (grokdeclarator): Clarify diagnostic message.
10262 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10264 * decl2.c (do_nonmember_using_decl): Replace using directive
10265 with using declaration in the error message.
10267 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10269 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10270 criterion to avoid rebuilding expression tree instead of
10271 processing_template_decl.
10273 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10275 Support named return value optimization for inlines, too.
10276 * decl.c (finish_function): Nullify returns here.
10277 * semantics.c (genrtl_start_function): Not here.
10278 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10279 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
10280 Also nullify the CLEANUP_STMT for the nrv.
10281 * cp-tree.h: Declare it.
10282 * optimize.c (declare_return_variable): Replace the nrv with the
10284 * typeck.c (check_return_expr): Be more flexible on alignment check.
10285 Ignore cv-quals when checking for a matching type.
10287 2001-08-09 Richard Henderson <rth@redhat.com>
10289 * decl2.c (finish_objects): Use target hooks instead of
10290 assemble_constructor and assemble_destructor.
10292 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10294 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10296 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
10299 Stop using TYPE_NONCOPIED_PARTS.
10300 * call.c (build_over_call): Be careful when copy constructing
10301 or assigning to an empty class.
10302 * class.c (check_bases_and_members): It has a
10303 COMPLEX_ASSIGN_REF if it has a vptr.
10304 (layout_class_type): Don't add empty class padding to
10305 TYPE_NONCOPIED_PARTS.
10306 (finish_struct_1): Don't add the VFIELD either.
10307 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10310 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10312 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10314 2001-08-06 Richard Henderson <rth@redhat.com>
10316 * decl2.c (finish_objects): Pass a symbol_ref and priority to
10317 assemble_{constructor,destructor}. Remove priority handling.
10319 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10321 Don't allow template-id in using-declaration.
10322 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10323 (do_class_using_decl): Likewise.
10325 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10327 * cp/spew.c (read_token): No need to pop buffers.
10329 2001-08-02 Stan Shebs <shebs@apple.com>
10331 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10332 (fnaddr_from_vtable_entry): Remove decl.
10333 * method.c (use_thunk): Update comment.
10335 2001-08-01 Andrew Cagney <ac131313@redhat.com>
10337 * repo.c (get_base_filename): Change return value to const char
10340 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
10344 * cp-tree.h (flag_honor_std): Remove.
10345 (CPTI_FAKE_STD): Remove.
10346 (std_node): Remove comment about it being NULL.
10347 (fake_std_node): Remove.
10348 * decl.c (in_fake_std): Remove.
10349 (walk_namespaces_r): Remove fake_std_node check.
10350 (push_namespace): Remove in_fake_std code.
10351 (pop_namespace): Likewise.
10352 (lookup_name_real): Remove fake_std_node check.
10353 (init_decl_processing): Always create std_node. Always add
10354 std:: things there.
10355 (builtin_function): Always put non '_' fns in std.
10356 * decl2.c (flag_honor_std): Remove.
10357 (lang_f_options): Remove honor-std.
10358 (unsupported_options): Add honor-std.
10359 (set_decl_namespace): Remove fake_std_node check.
10360 (validate_nonmember_using_decl): Likewise.
10361 (do_using_directive): Likewise.
10362 (handle_class_head): Likewise.
10363 * dump.c (cp_dump_tree): Likewise.
10364 * except.c (init_exception_processing): Adjust.
10365 * init.c (build_member_call): Remove fake_std_node check.
10366 (build_offset_ref): Likewise.
10367 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10368 * rtti.c (init_rtti_processing): Adjust.
10370 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10372 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10373 operand while calling cp_tree_equal.
10375 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10377 The 3.0 ABI no longer has vbase pointer fields.
10378 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
10379 FORMAT_VBASE_NAME): Remove.
10380 * method.c (do_build_copy_constructor): Adjust.
10381 (do_build_assign_ref): Adjust.
10382 * search.c (lookup_field_r): Adjust.
10383 * typeck.c (build_component_ref): Adjust.
10385 The 3.0 ABI always has a vtable pointer at the start of every
10387 * rtti.c (build_headof_sub): Remove.
10388 (build_headof): Adjust.
10389 (get_tinfo_decl_dynamic): No need to check flag_rtti
10391 (create_real_tinfo_var): Explain why we need a hidden name.
10393 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10396 * class.c (update_vtable_entry_for_fn): The fixed adjustment
10397 of a virtual thunk should be from declaring base.
10399 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10401 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
10402 the shared virtual base, so preserving inheritance graph order.
10404 2001-07-30 Andreas Jaeger <aj@suse.de>
10406 * decl2.c: Remove unused var global_temp_name_counter.
10408 2001-07-28 Richard Henderson <rth@redhat.com>
10410 * method.c (pending_inlines): Remove.
10412 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10414 * class.c (mark_primary_virtual_base): Don't adjust base
10416 (dfs_unshared_virtual_bases): Adjust them here.
10417 (mark_primary_bases): Explain why we adjust at the end.
10419 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10421 * class.c (finish_struct_1): When copying the primary base's
10422 VFIELD, make sure we find it is at offset zero.
10424 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10426 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
10427 tsubst_expr for default template arguments.
10429 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10432 * spew.c (yylex): Only copy the token's lineno, if it is
10435 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10438 * call.c (resolve_args): Simplify, call
10439 convert_from_reference.
10440 (build_new_op): Resolve and convert from reference ARG1
10441 earlier. Adjust ARG2 & ARG3 resolve and conversion.
10443 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10445 * decl.c (last_function_parm_tags): Remove.
10446 (current_function_parm_tags): Remove.
10447 (init_decl_processing): Adjust.
10448 (start_function): Adjust.
10449 (store_parm_decls): Adjust.
10452 * decl.c (grokdeclarator): Detect when a function typedef is
10453 declaring a function, and create last_function_parms correctly.
10455 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
10457 * call.c (joust): Only prefer a non-builtin candidate to a builtin
10458 one if they have the same signature.
10460 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
10461 it rather than toplevel_bindings_p. Give it a mangled name if static.
10462 (convert_to_reference): Adjust.
10463 * decl2.c (get_temp_name): Lose.
10464 * mangle.c (mangle_ref_init_variable): New fn.
10465 (mangle_guard_variable): Strip the ref-init header.
10466 * cp-tree.h: Adjust.
10467 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
10469 (grok_reference_init): Always use DECL_INITIAL.
10471 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10474 * call.c (build_conditional_expr): Recheck args after
10476 * cp-tree.h (build_conditional_expr): Move to correct file.
10477 * typeck.c (decay_conversion): Diagnose any unknown types
10479 (build_binary_op): Don't do initial decay or default
10480 conversions on overloaded functions.
10481 (build_static_cast): Don't do a decay conversion here.
10483 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10486 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
10487 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
10489 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10491 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
10492 (create_vtbl_ptr): ... here.
10494 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10496 * class.c (build_vbase_offset_vbtl_entries): Look for
10497 non-primary base of which we are a sub vtable.
10499 2001-07-24 Phil Edwards <pme@sources.redhat.com>
10501 * semantics.c (finish_this_expr): Remove unused code.
10503 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
10505 Simplify rtti, now we've only one ABI.
10506 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10508 (tinfo_decl_id, tinfo_var_id): Remove.
10509 (get_typeid_1): Remove.
10511 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
10512 (typeid_ok_p): New function.
10513 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
10514 (get_tinfo_decl): Remove old abi documentation.
10515 (tinfo_from_decl): Remove.
10516 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
10517 (get_typeid_1): Remove.
10518 (get_base_offset): Remove.
10519 (synthesize_tinfo_var): Absorb get_base_offset.
10520 (create_real_tinfo_var): Don't use tinfo_decl_id.
10522 2001-07-23 Graham Stott <grahams@redhat.com>
10524 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
10525 variable has_two_argument_delete_p.
10527 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
10529 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
10530 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
10531 (CPTI_INDEX_IDENTIFIER): Remove.
10532 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
10533 (delta2_identifier): Remove.
10534 (index_identifier): Remove.
10535 (pfn_or_delta2_identifier): Remove.
10536 (flag_vtable_thunks): Remove.
10537 (VTABLE_DELTA2_NAME): Remove.
10538 (VTABLE_INDEX_NAME): Remove.
10539 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
10540 (vfunc_ptr_type_node): Adjust.
10541 (VTABLE_NAME_PREFIX): Adjust.
10542 (build_vfn_ref): Lose first parameter.
10543 (fixup_all_virtual_upcast_offsets): Remove.
10544 * decl.c (initialize_predefined_identifiers): Remove
10545 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
10546 (init_decl_processing): Remove no-vtable-thunk code.
10547 * decl2.c (flag_vtable_thunks): Remove.
10548 (mark_vtable_entries): Remove no-vtable-thunk code.
10549 * error.c (dump_decl): Remove no-vtable-thunk code.
10550 (dump_expr): Adjust ptr to member function code.
10551 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
10553 * rtti.c (build_headof): Remove no-vtable-thunk code.
10554 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
10555 * search.c (get_base_distance): Remove expand_upcast_fixups case.
10556 (virtual_context) Remove.
10557 (expand_upcast_fixups): Remove.
10558 (fixup_virtual_upcast_offsets): Remove.
10559 (fixup_all_virtual_upcast_offsets): Remove.
10560 * typeck.c (get_member_function_from_ptrfunc): Remove
10561 no-vtable-thunk code.
10562 * call.c (build_over_call): Adjust call to build_vfn_ref.
10563 * class.c (build_vfn_ref): Lose first parameter. Remove
10564 no-vtable-thunk code.
10565 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
10566 (build_vtable_entry): Remove no-vtable-thunk code.
10568 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
10570 Remove old-abi remnants. Remove comments about old abi
10571 behavior. Remove references to 'new-abi' in comments.
10572 * cp-tree.h: Adjust comments.
10573 (vbase_offsets_in_vtable_p): Delete.
10574 (vcall_offsets_in_vtable_p): Delete.
10575 (vptrs_present_everywhere_p): Delete.
10576 (all_overridden_vfuns_in_vtables_p): Delete.
10577 (merge_primary_and_secondary_vtables_p): Delete.
10578 (TYPE_CONTAINS_VPTR_P): Adjust.
10579 (VTT_NAME_PREFIX): Remove.
10580 (CTOR_VTBL_NAME_PREFIX): Remove.
10581 (init_vbase_pointers): Remove.
10582 * class.c: Adjust coments.
10583 (build_vbase_pointer_fields): Delete.
10584 (build_vbase_pointer): Remove old-abi code.
10585 (build_secondary_vtable): Likewise.
10586 (modify_all_vtables): Likewise.
10587 (create_vtable_ptr): Likewise.
10588 (layout_class_type): Likewise.
10589 (finish_struct_1): Likewise.
10590 (finish_vtbls): Likewise.
10591 (dfs_finish_vtbls): Delete.
10592 (build_vbase_offset_vtbl_entries): Remove old-abi code.
10593 * cvt.c: Adjust comments.
10594 * decl.c: Adjust comments.
10595 * decl2.c: Adjust comments.
10596 * init.c: Adjust comments.
10597 (construct_virtual_bases): Remove old-abi code.
10598 * lang-specs.h: Remove -fno-new-abi.
10599 * mangle.c: Adjust comments.
10600 * rtti.c: Adjust comments.
10601 (get_base_offset): Remove old-abi-code.
10602 * search.c: Adjust comments.
10603 (dfs_init_vbase_pointers): Remove.
10604 (dfs_vtable_path_unmark): Remove.
10605 (init_vbase_pointers): Remove.
10606 * semantics.c: Adjust comments.
10607 (emit_associated_thunks): Remove old-abi code.
10608 * typeck.c: Adjust comments.
10610 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
10612 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10615 2001-07-19 Mark Mitchell <mark@codesourcery.com>
10617 * class.c (finish_struct_anon): Forbid nested classes.
10619 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10621 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10622 * optimize.c: Include debug.h.
10623 (maybe_clone_body): Use debug hook.
10624 * semantics.c: Include debug.h.
10625 (expand_body): Use debug hook.
10627 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10629 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10631 2001-07-18 Mark Mitchell <mark@codesourcery.com>
10633 * class.c (type_requires_array_cookie): New function.
10634 (check_methods): Don't try to figure out whether the type needs a
10636 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10637 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10638 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10639 * pt.c (instantiate_class_template): Don't set
10640 TYPE_VEC_DELETE_TAKES_SIZE.
10641 * NEWS: Document ABI changes from GCC 3.0.
10643 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
10644 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10646 * NEWS (Changes in GCC 3.0): Fix typo.
10648 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
10650 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10651 which attributes are to be attached, and a flags argument. Update
10652 call to decl_attributes.
10653 (grokfield): Update call to decl_attributes.
10654 * class.c (finish_struct): Update call to cplus_decl_attributes.
10655 * cp-tree.h (cplus_decl_attributes): Update prototype.
10656 * decl.c (start_decl, grokdeclarator, start_function): Update
10657 calls to decl_attributes and cplus_decl_attributes.
10658 * friend.c (do_friend): Update call to cplus_decl_attributes.
10659 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10661 2001-07-12 Mark Mitchell <mark@codesourcery.com>
10663 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10664 for `register' variables with an asm-specification.
10666 2001-07-11 Mark Mitchell <mark@codesourcery.com>
10668 * semantics.c (finish_asm_stmt): Mark the output operands
10669 to an asm addressable, if necessary.
10671 2001-07-11 Ben Elliston <bje@redhat.com>
10673 * Revert this change -- there is a subtle bug.
10676 * decl.c (finish_enum): New "attributes" argument; pass it to
10677 cplus_decl_attributes. Use a narrower type if the enum is packed.
10678 * cp-tree.h (finish_enum): Adjust prototype.
10679 * parse.y (enum_head): New non-terminal.
10680 (structsp): Use it. Enums now may be preceded or followed by
10681 optional attributes -- pass their chained tree to finish_enum().
10682 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10684 2001-07-10 Mark Mitchell <mark@codesourcery.com>
10686 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10689 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
10691 * semantics.c (cp_expand_stmt): Fix for null
10692 current_function_return_value.
10694 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
10696 * call.c (build_op_delete_call): Initialize fn.
10697 (convert_like_real): Delete conditional.
10698 (joust): Initialize *w and *l.
10699 * class.c: Add prototype for binfo_ctor_vtable.
10700 (get_primary_binfo): Initialize result.
10701 * init.c (build_java_class_ref): Initialize name.
10703 2001-07-09 Erik Rozendaal <dlr@acm.org>
10705 * typeck.c (unary_complex_lvalue): Do not duplicate the
10706 argument to modify, pre-, or post-increment when used as an
10707 lvalue and when the argument has side-effects.
10709 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10711 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10712 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
10713 cplus_decl_attributes even if attrs is NULL.
10714 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10716 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10718 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10719 calls to decl_attributes.
10721 2001-07-06 Ira Ruben <ira@apple.com>
10723 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10724 be DECL_TEMPLATE_RESULT.
10726 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10728 * cp-tree.h (copy_template_template_parm): Rename to ...
10729 (bind_template_template_parm): ... here.
10730 * tree.c (copy_template_template_parm): Rename to ...
10731 (bind_template_template_parm): ... here. Remove the case when
10732 NEWARGS is NULL_TREE.
10733 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10734 BOUND_TEMPLATE_TEMPLATE_PARM.
10735 * pt.c (lookup_template_class): Adjust.
10737 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
10739 * cvt.c (convert_lvalue): New fn.
10740 * cp-tree.h: Declare it.
10741 * method.c (do_build_assign_ref): Use it.
10742 (do_build_copy_constructor): Convert parm to base types
10743 before calling base constructors.
10745 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10746 DECL_USER_ALIGN. Check flag_elide_constructors instead of
10748 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10750 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
10752 * optimize.c (optimize_inline_calls): New function, broken out
10754 (optimize_function): ... here. Call it. Don't inline if it is
10756 (dump_function): Print name of dump flag causing this dump.
10757 * semantics.c (expand_body): Move thunk inline check to
10760 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
10762 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10763 (comptypes): Use target.comp_type_attributes.
10765 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
10767 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10769 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10771 * error.c (lang_print_error_function): Add a `diagnostic_context *'
10774 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10776 * decl2.c (import_export_class): Update.
10778 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10780 * error.c (init_error): Adjust settings.
10782 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10784 * error.c (init_error): Adjust settings.
10786 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
10788 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10789 return pointers to data members by reference rather than by value.
10791 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
10793 Implement the Named Return Value optimization.
10794 * cp-tree.h (struct cp_language_function): Add x_return_value.
10795 (current_function_return_value): Now a macro.
10796 * decl.c: Don't define it.
10797 (define_label, finish_case_label): Don't clear it.
10798 (init_decl_processing): Don't register it with GC.
10799 * semantics.c (genrtl_finish_function): Don't check it for
10800 no_return_label. Copy the RTL from the return value to
10801 current_function_return_value and walk, calling...
10802 (nullify_returns_r): ...this new fn.
10803 * typeck.c (check_return_expr): Set current_function_return_value.
10805 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
10807 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
10808 sharing a ctor vtable with. Merge code for cases 1 and 2.
10809 (binfo_ctor_vtable): New fn.
10810 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
10812 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
10814 * class.c (dfs_find_final_overrider): Fix logic.
10816 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
10817 virtual thunk instead of non-virtual.
10818 (get_matching_virtual): Uncomment.
10820 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
10821 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
10824 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
10826 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
10827 we've not emerged from the hierarchy of RTTI_BINFO on reaching
10828 a non-virtual base.
10830 2001-06-13 Mark Mitchell <mark@codesourcery.com>
10832 * NEWS: Update release number.
10834 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10836 PR c++/3130, c++/3131, c++/3132
10837 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
10838 * class.c (force_canonical_binfo_r): Move
10839 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
10840 virtual bases unless they're primary and what they're primary
10841 too has been moved.
10842 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
10843 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
10844 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
10846 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
10847 (layout_nonempty_base_or_field): Add most derived type
10849 (layout_empty_base): Likewise.
10850 (build_base_field): Likewise.
10851 (build_base_fields): Likewise.
10852 (propagate_binfo_offsets): Add most derived type
10853 parameter. Skip non canonical virtual bases too.
10854 (dfs_set_offset_for_unshared_vbases): Don't skip primary
10855 bases. Do skip canonical bases.
10856 (layout_virtual_bases): Adjust.
10857 (layout_class_type): Adjust.
10858 (dfs_get_primary_binfo): Build list of virtual primary base
10860 (get_primary_binfo): Check that the shared virtual primary
10861 base candidate was found first.
10862 (accumulate_vtbl_inits): Don't do anything for non-vptr
10863 containing binfos. For case 1 primary virtual bases, keep
10864 checking that we've not emerged from the hierarchy of RTTI_BINFO.
10866 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10869 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10870 hierarchy looking for primary bases for a ctor
10871 vtable. Recursively call oneself, if we meet our primary via
10872 this route and haven't met it yet via inheritance graph order.
10874 2001-06-11 Mark Mitchell <mark@codesourcery.com>
10876 * lang-options.h: Emit documentation for -fno-honor-std, not
10879 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
10881 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10882 Don't clobber delta.
10883 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10885 2001-06-10 Mark Mitchell <mark@codesourcery.com>
10886 Gabriel Dos Reis <gdr@codesourcery.com>
10888 * Make-lang.in (cp/call.o): Depend on diagnostic.h
10889 (cp/typeck.o): Depend on diagnostic.h
10890 (cp/typeck2.o): Depend on diagnostic.h
10891 (cp/repo.o): Depend on dignostic.h
10892 * typeck.c: #include diagnostic.h
10893 (convert_for_initialization): Remove extern declaration for
10894 warningcount and errorcount.
10896 * call.c: #include diagnostic.h
10897 (convert_like_real): Remove extern declaration for warnincount and
10900 * repo.c: #include diagnostic.h
10901 * typeck2.c: #include diagnostic.h
10903 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10905 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10906 in previous change.
10908 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10911 * friend.c (do_friend): Use push_decl_namespace for classes at
10914 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10915 Jason Merrill <jason_merrill@redhat.com>
10918 * class.c (build_secondary_vtable): Use assert, rather than an error
10920 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10921 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10922 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10923 Don't set BINFO_VTABLE for a primary virtual base.
10925 2001-06-07 Mark Mitchell <mark@codesourcery.com>
10927 * decl.c (duplicate_decls): Update source position information
10928 when a template function is defined.
10930 2001-06-07 Phil Edwards <pme@sources.redhat.com>
10932 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
10934 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
10937 * decl.c (pushtag): Don't push into a complete type's scope.
10939 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
10941 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10942 (struct lang_decl_flags): Lose generate_with_vtable_p.
10943 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10944 * class.c (copy_virtuals): Adjust.
10945 * decl2.c (mark_vtable_entries): Adjust.
10946 * method.c (make_thunk, build_vtable_entry): Adjust.
10947 * class.c (update_vtable_entry_for_fn): Only look as far as the
10948 first defining class.
10949 (build_vtbl_initializer): Put nothing in the slot for a function only
10950 defined in a lost primary virtual base.
10951 (add_vcall_offset_vtbl_entries_1): Use the same code for
10952 the lost primary case and the normal case.
10953 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10954 (get_vfield_offset, get_derived_offset): Lose.
10955 (dfs_find_final_overrider): Use look_for_overrides_here.
10956 (get_matching_virtual): New fn.
10957 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10958 not BV_VCALL_INDEX.
10959 * search.c (look_for_overrides_here): Split out from...
10960 (look_for_overrides_r): Here.
10962 * class.c (find_final_overrider): Return error_mark_node on error.
10964 * decl2.c (key_method): #if 0 accidental change.
10966 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
10968 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10969 (build_over_call): Likewise.
10970 * decl.c (grokparms): Likewise.
10971 * pt.c (tsubst_decl): Likewise.
10972 * typeck.c (convert_arguments): Likewise.
10974 2001-06-05 Mark Mitchell <mark@codesourcery.com>
10976 * semantics.c (begin_class_definition): Robustify.
10978 * pt.c (instantiate_decl): Tell the repository code about the
10979 clones, not the cloned functions.
10980 * repo.c (repo_template_used): Explicitly instantiate the cloned
10981 function, not the clones.
10983 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10985 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10986 ICS_BAD_FLAG on created conversion.
10987 (compare_ics): Break out rank.
10989 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10991 * decl.c (xref_tag): Remove extraneous %s on dependent name
10994 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10996 * class.c (layout_vtable_decl): Fix off by one error on
10998 (build_vtt): Likewise.
10999 (build_ctor_vtbl_group): Likewise.
11001 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11003 * class.c (maybe_indent_hierarchy): New function.
11004 (dump_class_hierarchy_r): Add flags. Dump extra binfo
11005 information, if enabled. Use maybe_indent_hierarchy. Adjust
11007 (dump_class_hierarchy): Adjust prototype. Adjust output format.
11008 (dump_array, dump_vtable, dump_vtt): New functions.
11009 (finish_struct_1): Adjust hierarchy dumping.
11010 (initialize_vtable): Call dump_vtable.
11011 (build_vtt): Call dump_vtt.
11012 (build_ctor_vtbl_group): Call dump_vtable.
11013 * decl2.c (flag_dump_class_layout): Remove.
11014 (cxx_decode_option): Remove dump translation unit
11015 and dump class hierarchy check. Call dump_switch_p.
11016 (finish_file): Adjust dumping.
11017 (dump.c): Only dump base classes if not TDF_SLIM.
11018 Only dump namespace members if not TDF_SLIM.
11019 * optimize.c (dump_function): New function.
11020 (optimize_function): Call dump_function.
11021 * semantics.c (expand_body): Use dump_enabled_p.
11023 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
11026 Part missed from first commit
11027 * decl2.c (finish_anon_union): Copy context.
11029 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
11032 * optimize.c (remap_decl): Remap anonymous aggregate members too.
11034 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
11037 * semantics.c (expand_body): Don't optimize thunks.
11039 2001-05-25 Sam TH <sam@uchicago.edu>
11041 * cp-tree.h lex.h: Fix header include guards.
11043 2001-05-25 Mark Mitchell <mark@codesourcery.com>
11045 * decl.c (init_decl_processing): Tweak.
11047 2001-05-24 Mark Mitchell <mark@codesourcery.com>
11049 * decl.c (duplicate_decls): Tidy.
11050 (init_decl_processing): Always set flag_no_builtin.
11052 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
11055 * decl2.c (do_local_using_decl): Push the decls, even in a
11058 2001-05-22 Mark Mitchell <mark@codesourcery.com>
11060 * optimize.c (initialize_inlined_parameters): Don't set
11061 TREE_READONLY for a VAR_DECL taking the place of an inlined
11064 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
11066 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11067 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11070 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
11072 * parse.y: Refer to compound literals as such, not as
11073 constructor-expressions.
11075 2001-05-21 Mark Mitchell <mark@codesourcery.com>
11077 * call.c (build_op_delete_call): Ignore exception-specifications
11078 when looking for matching delete operators.
11079 * init.c (build_new_1): Compute whether or not the allocation
11080 function used is a placement allocation function or not, and
11081 communicate this information to build_op_delete_call.
11083 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
11085 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
11086 (build_vtbl_ref): Adjust.
11087 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11088 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11090 (unsupported_options): Correspondingly.
11092 * decl2.c (maybe_make_one_only): Check flag_weak, not
11093 supports_one_only().
11095 * cp-tree.def (START_CATCH_STMT): Lose.
11096 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
11097 * tree.c (cp_statement_code_p): Don't case it.
11098 * semantics.c (cp_expand_stmt): Likewise.
11099 * cp-tree.h (START_CATCH_TYPE): Lose.
11100 (HANDLER_TYPE): New.
11101 * except.c (expand_start_catch_block): Don't start any blocks.
11103 (expand_end_catch_block): Don't end any blocks.
11104 * parse.y (handler): Don't pass anything from finish_handler_parms
11106 * pt.c (tsubst_expr): Likewise.
11107 * semantics.c (begin_handler): Call note_level_for_catch here.
11108 (finish_handler_parms): Don't return anything.
11109 (genrtl_catch_block, begin_catch_block): Lose.
11110 (genrtl_handler): Call expand_start_catch here.
11112 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
11114 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11115 (get_vtable_decl, build_vtt): Not here.
11117 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
11120 * optimize.c (update_cloned_parm): Copy addressability and other
11123 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11125 * pt.c (determine_specialization): Ignore artificial functions.
11127 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
11129 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11130 (C_RID_CODE): Remove.
11131 * lex.c (cxx_init_options): Call set_identifier_size. Update.
11132 (init_parse): Don't do it here.
11134 2001-05-18 Diego Novillo <dnovillo@redhat.com>
11136 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11137 function declaration to avoid stripping the symbol's attributes.
11139 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
11141 * decl.c (pushdecl): Adjust error string.
11142 (xref_tag): Adjust friend class injection warning. Remove the
11143 inherited name from the class shadowed scope.
11145 2001-05-17 Mark Mitchell <mark@codesourcery.com>
11147 * except.c (cp_protect_cleanup_actions): New function.
11148 (init_exception_processing): Don't set protect_cleanup_actions
11149 here. Do set lang_protect_cleanup_actions.
11151 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11153 * spew.c (read_token): Call yyerror on all unexpected tokens.
11155 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11157 * init.c (member_init_ok_or_else): Take a tree rather than
11159 (expand_member_init): Adjust.
11161 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
11163 * decl.c (duplicate_decls): Suppress warning about duplicate
11164 decls if the first decl is a friend.
11166 2001-05-12 Zack Weinberg <zackw@stanford.edu>
11168 * except.c (choose_personality_routine): Export. Add
11169 explanatory comment. Take an enum languages, not a boolean.
11170 (initialize_handler_parm): Adjust to match.
11171 * cp-tree.h: Prototype choose_personality_routine.
11172 * lex.c (handle_pragma_java_exceptions): New function.
11173 (init_cp_pragma): Register #pragma GCC java_exceptions.
11175 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11177 * method.c (build_mangled_C99_name): Remove unused prototype.
11179 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
11181 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11182 * typeck.c (get_member_function_from_ptrfunc,
11183 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11184 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11186 Reverted Geoff Keating's 2001-05-03's patch.
11188 2001-05-11 Ira Ruben <ira@apple.com>
11190 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11192 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
11194 * cp-tree.h (finish_label_expr, lookup_label): Delete.
11195 * parse.y: Update for '&&'; don't issue warning here.
11196 * semantics.c (finish_label_expr): Delete.
11198 2001-05-07 Mark Mitchell <mark@codesourcery.com>
11200 * splay-tree.h (splay_tree_max): New function.
11201 (splay_tree_min): Likewise.
11203 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
11205 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11206 (pfn_vflag_identifier): Define.
11207 Update comment about layout of pointer functions.
11208 (build_ptrmemfunc1): Update prototype.
11209 (expand_ptrmemfunc_cst): Update prototype.
11210 * decl.c (initialize_predefined_identifiers): Initialize
11211 pfn_vflag_identifier.
11212 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11213 an extra field to the type.
11214 * expr.c (cplus_expand_constant): Pass 'flag' between
11215 expand_ptrmemfunc_cst and build_ptrmemfunc1.
11216 * typeck.c (get_member_function_from_ptrfunc): When
11217 FUNCTION_BOUNDARY < 16, look at additional field to determine
11218 if a pointer-to-member is a real pointer or a vtable offset.
11219 (build_ptrmemfunc1): Add new parameter to contain extra field.
11220 (build_ptrmemfunc): Pass the extra field around.
11221 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11222 (pfn_from_ptrmemfunc): Ignore the extra field.
11224 2001-05-03 Mark Mitchell <mark@codesourcery.com>
11226 * cp-tree.h (flag_inline_trees): Update documentation.
11227 * decl.c (init_decl_processing): Adjust handling of
11228 flag_inline_functions and flag_inline_trees to support -O3.
11229 (grokfndecl): Set DECL_INLINE on all functions if that's what
11230 the user requested.
11231 (save_function_data): Clear DECL_INLINE in
11232 current_function_cannot_inline is non-NULL.
11233 * decl2.c (flag_inline_trees): Update documentation.
11235 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
11237 * dump.c (cp_dump_tree, USING_STMT case): New case.
11238 * tree.c (cp_statement_code_p): Add USING_STMT.
11239 * decl2.c (do_using_directive): Add the using directive statement.
11241 * tree.c (walk_tree): Reformat an if block.
11243 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11245 * decl.c (compute_array_index_type): Don't try to do anything with
11246 the indices when processing a template.
11248 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11250 * call.c: NULL_PTR -> NULL.
11251 * class.c: Likewise.
11253 * decl.c: Likewise.
11254 * decl2.c: Likewise.
11255 * except.c: Likewise.
11256 * init.c: Likewise.
11257 * rtti.c: Likewise.
11258 * search.c: Likewise.
11259 * tree.c: Likewise.
11260 * typeck.c: Likewise.
11261 * typeck2.c: Likewise.
11263 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11265 * decl2.c (do_using_directive): Revert previous patch.
11267 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11269 * cp-tree.def (USING_STMT): New statement node.
11270 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11271 * decl2.c (do_using_directive): Add USING_STMT to statement
11272 tree. Don't emit errors when processing template decl.
11273 * pt.c (tsubst_expr, USING_STMT case): New case.
11274 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11276 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11278 * call.c (build_new_op): Convert args from reference here.
11279 (build_conditional_expr): Don't convert here.
11281 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11283 * spew.c (last_token_id): New static variable.
11284 (read_token): Set it here.
11285 (yyerror): Use it here.
11287 2001-04-30 Richard Henderson <rth@redhat.com>
11289 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11290 * decl.c: Likewise.
11292 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11294 * gxxint.texi: Remove.
11295 * Make-lang.in: Remove all traces of gxxint.texi.
11297 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
11299 * decl2.c (start_static_initialization_or_destruction): Correct
11300 logic to handle the -fno-use-cxa-atexit case.
11302 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11304 * optimize.c (update_cloned_parm): New function.
11305 (maybe_clone_body): Use it. Update the `this' parameter too.
11307 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
11309 * decl2.c (unsupported_options): Add new-abi.
11310 * lang-options.h: Remove no longer supported options.
11312 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11314 * except.c (can_convert_eh): Don't check template parms,
11315 typename types etc.
11317 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11319 * optimize.c (maybe_clone_body): Copy parameter names and locations.
11321 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11323 * cp-tree.h (adjust_clone_args): Prototype new function.
11324 * class.c (adjust_clone_args): New function.
11325 * decl.c (start_function): Call it for in charge ctors.
11327 2001-04-26 Mark Mitchell <mark@codesourcery.com>
11329 * method.c (use_thunk): Make sure that thunks really are emitted
11332 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
11334 * mangle.c (write_chars): New macro.
11335 (hwint_to_ascii): New function
11336 (write_number): Use it.
11337 (write_integer_cst): Deal with really big numbers.
11339 2001-04-25 Mark Mitchell <mark@codesourcery.com>
11341 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11344 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
11346 * decl.c (grokdeclarator): Set context of namespace scope
11349 2001-04-24 Zack Weinberg <zackw@stanford.edu>
11351 * cp/optimize.c: Include hashtab.h.
11352 (struct inline_data): Add tree_pruner.
11353 (expand_call_inline, expand_calls_inline): Use it when calling
11355 (optimize_function): Initialize and free tree_pruner.
11357 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11359 Lazy __FUNCTION__ generation.
11360 * cp-tree.def (FUNCTION_NAME): Remove.
11361 * cp-tree.h (function_name_declared_p): Remove.
11362 (cp_fname_init): Prototype.
11363 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11364 don't call declare_function_name. Call start_fname_decls.
11365 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11366 clobber the line number.
11367 (cp_fname_init): New function.
11368 (start_function): Call start_fname_decls.
11369 (finish_function): Call finish_fname_decls.
11370 * lex.c (reswords): Add slots for __FUNCTION__ et al.
11371 (rid_to_yy): Add mappings for __FUNCTION__ et al.
11372 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11373 * parse.y (VAR_FUNC_NAME): New token.
11374 (primary): Add VAR_FUNC_NAME.
11375 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
11377 (tsubst, FUNCTION_NAME case): Remove.
11378 (tsubst_copy, FUNCTION_NAME case): Remove.
11379 (tsubst_expr, DECL_STMT case): Be careful with a
11380 DECL_PRETTY_FUNCTION_P.
11381 (instantiate_decl): Remove function_name_declared_p.
11382 * semantics.c (begin_compound_statement): Don't call
11383 declare_function_name here.
11384 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
11385 (finish_translation_unit): Call finish_fname_decls.
11386 (expand_body): Remove function_name_declared_p.
11387 * typeck2.c (digest_init): Allow any ERROR_MARK.
11389 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11391 * pt.c (tsubst_decl): Use VOID_TYPE_P.
11392 * semantics.c: Fix some typos.
11394 2001-04-23 Phil Edwards <pme@sources.redhat.com>
11396 * cp/decl2.c (flag_honor_std): Always initialize to 1.
11398 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11400 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
11402 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
11404 * except.c (build_throw): Wrap the initialization of the exception
11405 object in a MUST_NOT_THROW_EXPR.
11406 (do_free_exception): #if 0.
11408 2001-04-20 Mark Mitchell <mark@codesourcery.com>
11410 * cp-tree.h (finish_enum): Change prototype.
11411 * decl.c (finish_enum): Reorganize.
11412 * parse.y (structsp): Adjust calls to finish_enum.
11414 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11416 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
11419 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11421 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
11422 (layout_empty_base): Return at end flag.
11423 (build_base_field): Likewise.
11424 (build_base_fields): Likewise.
11425 (layout_virtual_bases): Don't add 1 to eoc value.
11426 (end_of_class): Use full size for empty bases.
11427 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
11428 empty bases. Don't add 1 to eoc value. Only add trailing padding
11429 if we're an empty class with no empty bases.
11430 (dump_class_hierarchy): Dump size and alignment.
11432 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11434 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
11437 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11439 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
11440 is found, look first if name does not match the structure name.
11442 2001-04-19 Mark Mitchell <mark@codesourcery.com>
11444 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
11446 (SET_DECL_LANGUAGE): New macro.
11447 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
11448 (pushdecl): Likewise.
11449 (build_library_fn_1): Likewise.
11450 (build_cp_library_fn): Likewise.
11451 (grokfndecl): Likewise.
11452 (grokvardecl): Mark `extern "C"' variables as having C linkage.
11453 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
11454 * lex.c (retrofit_lang_decl): Likewise.
11455 * mangle.c (mangle_decl_string): Don't mangle the names of
11456 variables declared with C language linkage.
11457 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11459 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
11461 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
11462 flag_access_control from uninitialized storage.
11464 2001-04-15 Mark Mitchell <mark@codesourcery.com>
11466 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
11467 * mangle.c (write_pointer_to_member_type): Fix mangling of
11468 pointers to cv-qualified member function types.
11470 * init.c (build_delete): Create a SAVE_EXPR for the address if
11471 we're going to use it more than once.
11473 2001-04-13 Mark Mitchell <mark@codesourcery.com>
11475 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
11476 (expand_ptremfunc_cst): Change prototype.
11477 (delta2_from_ptrmemfunc): Remove.
11478 * expr.c (cplus_expand_constant): Adjust call to
11479 expand_ptrmemfunc_cst.
11480 * typeck.c (build_ptrmemfunc1): Simplify.
11481 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
11482 results in a constant.
11483 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
11484 (delta2_from_ptrmemfunc): Remove.
11485 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11487 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
11489 * cp-tree.h (decl_namespace_list): New macro.
11490 (struct saved_scope): Add decl_ns_list.
11491 * decl.c (mark_saved_scope): Mark it.
11492 * decl2.c: Lose static decl_namespace_list.
11493 (init_decl2): Don't save it.
11495 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11497 * cp-tree.h (warn_return_type, yylex): Delete redundant
11500 * decl.c (current_class_depth, global_namespace): Likewise.
11502 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
11504 * repo.c (flag_use_repository): Likewise.
11506 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11508 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
11509 set_block, pushdecl, getdecls, gettags, init_decl_processing,
11510 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
11511 lvalue_or_else, print_lang_statistics, comp_target_types,
11512 unsigned_type, signed_type, signed_or_unsigned_type,
11513 build_function_call, mark_addressable, incomplete_type_error):
11514 Delete redundant declarations.
11516 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
11518 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
11519 (TYPE_ANONYMOUS_P): New macro.
11520 (TAGGED_TYPE_P): New macro.
11521 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
11522 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
11523 * tree.c (no_linkage_helper): Likewise.
11524 * semantics.c (begin_class_definition): Likewise.
11525 * pt.c (convert_template_argument): Likewise.
11526 * lex.c (check_for_missing_semicolon): Likewise.
11528 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11530 * class.c (dfs_unshared_virtual_bases): New function.
11531 (mark_primary_bases): Call it.
11532 (check_bases): Ignore virtual bases when determining
11535 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11537 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
11539 2001-04-11 Mark Mitchell <mark@codesourcery.com>
11541 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
11542 cloned function to the clone.
11544 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11546 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
11548 * semantics.c: Include expr.h.
11550 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
11552 * method.c (implicitly_declare_fn): Commonize code for copy ctor
11553 and assignment op. Set TREE_USED for parameter.
11555 2001-04-10 Mark Mitchell <mark@codesourcery.com>
11557 * class.c (find_final_overrider_data): Add `candidates'.
11558 (dfs_find_final_overrider): Don't issue error messages
11560 (find_final_overrider): Issue error messages here.
11561 (build_base_field): Don't warn about amgibuous direct bases here.
11562 (warn_about_ambiguous_direct_bases): New function.
11563 (layout_class_type): Use it.
11565 2001-04-10 Richard Henderson <rth@redhat.com>
11567 * typeck.c (build_array_ref): Push the array reference inside
11568 COMPOUND_EXPR and COND_EXPR.
11570 2001-04-05 Mark Mitchell <mark@codesourcery.com>
11572 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
11573 * decl.c (duplicate_decls): Adjust accordingly.
11574 (maybe_commonize_var): Likewise.
11575 (grokfndecl): Likewise.
11576 (start_function): Likewise.
11577 (start_method): Likewise.
11578 * decl2.c (key_method): Likewise.
11579 (import_export_decl): Likewise.
11580 * method.c (implicitly_declare_fn): Likewise.
11581 * optimize.c (maybe_clone_body): Likewise.
11583 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
11585 * lang-specs.h: Add __DEPRECATED.
11587 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
11589 * search.c (get_dynamic_cast_base_type): When building a new
11590 constant, set its type to ssizetype.
11592 2001-04-04 Jakub Jelinek <jakub@redhat.com>
11594 * optimize.c (expand_call_inline): Only add newly inlined statements
11595 into inlined_stmts.
11597 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11599 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
11600 (OPERATOR_FORMAT): Likewise.
11601 (OPERATOR_TYPENAME_FORMAT): Likewise.
11602 * operators.def: Remove old name-mangling information.
11603 * decl.c (grok_op_properties): Adjust accordingly.
11604 * lex.c (init_operators): Likewise.
11605 * rtti.c (get_tinfo_decl): Issue error messages about types that
11606 have variable size.
11608 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11610 * decl2.c (import_export_decl): Don't call import_export_class
11611 when processing an inline member function.
11612 * semantics.c (expand_body): Call import_export_decl before
11613 emitting inline functions.
11615 2001-03-28 Richard Henderson <rth@redhat.com>
11617 IA-64 ABI Exception Handling:
11618 * cp-tree.def (EH_SPEC_BLOCK): New.
11619 (MUST_NOT_THROW_EXPR): New.
11620 * cp-tree.h: Update changed function declarations.
11621 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11622 (CPTI_CALL_UNEXPECTED): New.
11623 (struct cp_language_function): Rename x_eh_spec_try_block
11624 to x_eh_spec_block.
11625 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11626 * decl.c (current_binding_level): If no current function
11627 bindings, revert to scope_chain.
11628 (initialize_predefined_identifiers): Remove __cp_push_exception.
11629 (store_parm_decls): Use begin_eh_spec_block.
11630 (finish_function): Use finish_eh_spec_block.
11631 (mark_lang_function): Update for name changes.
11632 * decl2.c (finish_file): No mark_all_runtime_matches.
11633 * dump.c (cp_dump_tree): Handle new tree codes.
11634 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11635 * except.c (catch_language_init, catch_language): Remove.
11636 (init_exception_processing): Don't set language code.
11637 Initialize call_unexpected_node, protect_cleanup_actions,
11638 eh_personality_libfunc, lang_eh_runtime_type.
11639 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11640 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11641 (prepare_eh_type): Split out type canonicalizations ...
11642 (build_eh_type_type): ... from here.
11643 (build_eh_type_type_ref): Remove.
11644 (mark_all_runtime_matches): Remove.
11645 (build_exc_ptr): New.
11646 (do_begin_catch, do_end_catch): New.
11647 (do_pop_exception): Remove.
11648 (build_terminate_handler): Remove.
11649 (choose_personality_routine): Split out language choice from ...
11650 (initialize_handler_parm): ... here.
11651 Use MUST_NOT_THROW_EXPR.
11652 (expand_start_catch_block): Use do_begin_catch. Simplify Java
11653 exception object handling.
11654 (expand_start_eh_spec, expand_end_eh_spec): Remove.
11655 (expand_exception_blocks, alloc_eh_object): Remove.
11656 (begin_eh_spec_block, finish_eh_spec_block): New.
11657 (do_allocate_exception, do_free_exception): New.
11658 (expand_throw): Merge into ...
11659 (build_throw): ... here. Update for abi.
11660 * expr.c (cplus_expand_expr): No expand_internal_throw.
11661 Handle MUST_NOT_THROW_EXPR.
11662 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11663 * semantics.c (*) Update for except.h name changes.
11664 (genrtl_try_block): No protect_with_terminate.
11665 (genrtl_eh_spec_block): New.
11666 (genrtl_handler): Don't emit the goto here.
11667 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11668 (genrtl_finish_function): Don't expand_exception_blocks.
11669 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11671 2001-03-28 Richard Henderson <rth@redhat.com>
11673 * decl.c (struct named_label_list): Rename eh_region to
11674 in_try_scope, add in_catch_scope.
11675 (struct binding_level): Rename eh_region to is_try_scope,
11676 add is_catch_scope.
11677 (note_level_for_try): Rename from note_level_for_eh.
11678 (note_level_for_catch): New.
11679 (poplevel): Copy both is_try_scope and is_catch_scope to
11680 the named_label_list struct.
11681 (check_previous_goto_1): Don't check for catch block via
11682 DECL_ARTIFICIAL; use in_try_scope instead.
11683 (check_goto): Likewise.
11684 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11685 * except.c (expand_start_catch_block): Call note_level_for_catch.
11686 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11688 2001-03-27 Richard Henderson <rth@redhat.com>
11690 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11691 exceptions_via_longjmp.
11693 2001-03-27 Phil Edwards <pme@sources.redhat.com>
11695 * pt.c (check_default_tmpl_args): Make error messages clearer.
11697 2001-03-26 Phil Edwards <pme@sources.redhat.com>
11699 * error.c: Also undefine 'A' macro used for cp_printers definition.
11701 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11703 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11705 2001-03-26 Mike Yang <yang@research.att.com>
11706 Mark Mitchell <mark@codesourcery.com>
11708 * dump.c (dump_access): New function.
11709 (cp_dump_tree): Use it. Dump basetype information for class
11712 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11714 * Makefile.in (optimize.o): Depend on params.h.
11715 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11716 (init_decl_processing): Set flag_no_inline when doing
11718 * optimize.c: Include params.h.
11719 (struct inline_data): Improve documentation of FNS. Add
11720 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11721 (INSNS_PER_STMT): New macro.
11722 (remap_block): Use CLONING_P.
11723 (inlinable_function_p): Don't inline big functions.
11724 (expand_call_inline): Keep track of how much inlining we've done.
11725 (optimize_function): Set FIRST_INLINED_FN.
11726 (maybe_clone_body): Set CLONING_P.
11727 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11729 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11730 rest_of_compilation. Clear DECL_RTL for local variables
11732 (clear_decl_rtl): New function.
11734 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
11737 * cp-tree.h (skip_type_access_control,
11738 reset_type_access_control): Prototype.
11739 * decl.c (grokdeclarator): Access of friends is not checked.
11740 * parse.y (component_decl_list): Reset type access control.
11741 * semantics.c (decl_type_access_control): Clear
11742 current_type_lookups.
11743 (save_type_access_control): Don't save if not deferring.
11744 (skip_type_access_control, reset_type_access_control): New
11746 (begin_class_definition): Do type access control for basetypes.
11747 Start deferred access control.
11748 (finish_class_definition): Resume immediate access control if
11749 this is a local class.
11751 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11753 * class.c (add_method): Use memcpy/memmove, not bcopy.
11755 * decl.c (duplicate_decls): Likewise.
11757 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11759 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11762 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11764 * decl.c (local_names): Define.
11765 (push_local_name): New.
11766 (grok_reference_init): Return init if initializing static reference
11767 variable with non-constant instead of emitting it.
11768 Move expand_static_init call to cp_finish_decl.
11769 (layout_var_decl): Call push_local_name.
11770 (maybe_commonize_var): Allow inlining functions even if they have
11771 static local variables, use comdat_linkage for them if flag_weak.
11772 (check_initializer): Call obscure_complex_init if
11773 grok_reference_init returned nonzero.
11774 (save_function_data): Clear x_local_names.
11775 (pop_cp_function_context): Free x_local_names.
11776 (mark_inlined_fns): Remove.
11777 (mark_lang_function): Mark x_local_names.
11778 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11779 Mark inlined_fns as tree, remove call to mark_inlined_fns.
11780 * class.c (alter_access): Ensure DECL_ACCESS is never set if
11781 DECL_DISCRIMINATOR_P.
11782 * cp-tree.h (cp_language_function): Add x_local_names.
11783 (lang_decl_flags): Add discriminator into u2.
11784 (lang_decl_inlined_fns): Remove.
11785 (lang_decl): inlined_fns is now a TREE_VEC.
11786 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11787 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11788 TREE_VEC, not a custom structure.
11789 (optimize_function): Likewise.
11790 * mangle.c (discriminator_for_local_entity): Discriminate among
11791 VAR_DECL local entities.
11792 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
11795 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
11797 Add support for Java interface method calls.
11798 * cp-tree.h (struct lang_type): Add java_interface flag.
11799 (TYPE_JAVA_INTERFACE): New macro.
11800 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
11801 by setting TYPE_JAVA_INTERFACE.
11802 * call.c (java_iface_lookup_fn): New static.
11803 (build_over_call): If calling a method declared in a
11804 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
11805 expression which resolves the function address.
11806 (build_java_interface_fn_ref): New function.
11808 2001-03-22 Richard Henderson <rth@redhat.com>
11810 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
11811 * except.c: Don't include it.
11813 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11814 based on an idea from Joe Buck <jbuck@synopsys.com>
11816 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
11818 (data_def, component_decl): Add reductions to bad_decl.
11820 2001-03-22 Jakub Jelinek <jakub@redhat.com>
11822 * method.c (do_build_assign_ref): Don't use build_modify_expr for
11823 anonymous aggregates, since they don't have assignment operator
11825 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
11826 assignment operators for anonymous structure fields.
11828 2001-03-21 Jason Merrill <jason@redhat.com>
11830 * pt.c (instantiate_decl): Abort if we see a member constant
11831 instantiation that doesn't already have its initializer.
11832 Downgrade explicit instantiation without definition to pedwarn.
11834 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
11835 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
11836 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
11838 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
11839 (pending_vtables): Remove.
11840 * decl2.c (pending_vtables): Remove.
11841 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
11842 CLASSTYPE_VTABLE_NEEDS_WRITING.
11843 (import_export_class): Likewise.
11844 (init_decl2): Don't mark pending_vtables.
11845 * lex.c (handle_pragma_vtable): Just sorry.
11846 * pt.c (instantiate_class_template): Don't mess with
11847 CLASSTYPE_VTABLE_NEEDS_WRITING.
11848 (mark_class_instantiated): Likewise.
11849 * ptree.c (print_lang_type): Don't print it.
11850 * semantics.c (begin_class_definition): Don't set it.
11852 * pt.c (template_tail): Replace with last_pending_template.
11853 (maybe_templates, maybe_template_tail): Remove.
11854 (add_pending_template): Adjust.
11855 (instantiate_pending_templates): Adjust.
11857 * cp-tree.h (struct saved_scope): Remove lang_stack field.
11858 (current_lang_stack): Remove.
11859 * decl.c (maybe_push_to_top_level): Don't initialize it.
11860 (duplicate_decls): Use current_lang_depth.
11861 (xref_basetypes): Likewise.
11862 * class.c (current_lang_depth): New fn.
11863 (push_lang_context): Use more varray functionality.
11864 (pop_lang_context): Likewise.
11866 * error.c (GLOBAL_THING): Always use '__'.
11868 2001-03-21 Mark Mitchell <mark@codesourcery.com>
11870 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11872 * mangle.c (mangle_decl_string): Mangle the names of overloaded
11873 operators, even when they have `extern "C"' linkage.
11875 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11877 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11878 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11879 where it's not necessary.
11880 (add_method): Remove optimization involving comparison of
11881 DECL_ASSEMBLER_NAME.
11882 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11883 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11884 where it's not necessary.
11885 (check_methods): Likewise.
11886 (build_clone): Likewise.
11887 (built_vtt): Likewise.
11888 * cp-tree.h (DECL_NEEDED_P): Likewise.
11889 * decl.c (pushtag): Likewise.
11890 (duplicate_decls): Likewise.
11891 (pushdecl): Likewise.
11892 (builtin_function): Likewise.
11893 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11894 (build_cp_library_fn): Likewise.
11895 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11896 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11897 where it's not necessary.
11898 (make_rtl_for_nonlocal_decl): Likewise.
11899 (cp_finish_decl): Likewise.
11900 (grokfndecl): Likewise.
11901 (grokvardecl): Likewise.
11902 (grokdeclarator): Likewise.
11903 (start_function): Likewise.
11904 (cp_missing_return_ok_p): Likewise.
11905 * decl2.c (grokclassfn): Likewise.
11906 (check_classfn): Likewise.
11907 (finish_static_data_member_decl): Likewise.
11908 (grokfield): Likewise.
11909 * error.c (GLOBAL_IORD_P): Remove.
11910 (dump_global_iord): Improve output.
11911 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11912 * except.c (nothrow_libfn_p): Summarily reject any function not in
11914 * init.c (build_java_class_ref): Don't explicitly set
11915 DECL_ASSEMBLER_NAME after calling mangle_decl.
11916 * mangle.c (mangle_decl_string): Handle extern "C" functions.
11917 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11918 * method.c (set_mangled_name_for_decl): Don't explicitly set
11919 DECL_ASSEMBLER_NAME after calling mangle_decl.
11920 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11921 IDENTIFIER_GLOBAL_VALUE for the thunk.
11922 * pt.c (set_mangled_name_for_template_decl): Remove.
11923 (check_explicit_specialization): Don't use it.
11924 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11925 (tsubst_friend_function): Likewise.
11926 (tsubst_decl): Likewise.
11927 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11928 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11929 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11930 where it's not necessary.
11931 (tinfo_base_init): Likewise.
11932 (create_real_tinfo_var): Likewise.
11933 * search.c (looup_field_1): Likewise.
11934 * semantics.c (finish_named_return_value): Likewise.
11935 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11937 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
11939 Correct semantics restrictions checking in throw-expression.
11940 * except.c (is_admissible_throw_operand): New function.
11941 (build_throw): Use it.
11943 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11945 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11948 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11950 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11951 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11952 * decl.c (duplicate_decls): Likewise.
11953 (builtin_function): Likewise.
11954 (build_library_fn): Likewise.
11955 (build_cp_library_fn): Likewise.
11956 (check_initializer): Likewise.
11957 (cp_finish_decl): Likewise.
11958 * decl2.c (grokfield): Likewise.
11959 (grok_function_init): Remove #if 0'd code.
11960 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11961 * friend.c (do_friend): Likewise.
11962 * init.c (get_temp_regvar): Likewise.
11963 * method.c (make_thunk): Likewise.
11964 * pt.c (tsubst_friend_function): Likewise.
11965 (tsubst_decl): Likewise.
11966 (regenerate_decl_from_template): Likewise.
11967 * semantics.c (genrtl_named_return_value): Likewise.
11968 (expand_body): Likewise.
11969 (genrtl_finish_function): Likewise.
11970 * tree.c (cp_tree_equal): Likewise.
11972 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
11974 * call.c (convert_like_real): Add extra semantics to INNER
11975 parameter. Don't convert to temporary if a user conversion
11976 gives us an lvalue that we're about to bind to a reference.
11977 Set INNER to indicate pending reference binding on recursive
11980 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11982 * cp/lex.c: Delete duplicate pending_lang_change.
11984 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11986 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11988 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11989 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11991 2001-03-09 Zack Weinberg <zackw@stanford.edu>
11993 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11995 2001-03-08 Stan Shebs <shebs@apple.com>
11997 * cp-tree.h (set_identifier_local_value): Remove unused decl.
11999 2001-03-06 Zack Weinberg <zackw@stanford.edu>
12001 * spew.c: Remove references to CPP_OSTRING.
12003 2001-03-06 Andrew Haley <aph@redhat.com>
12005 * typeck.c (convert_arguments): Check that we have an fndecl.
12007 2001-03-05 Andrew Haley <aph@redhat.com>
12009 * typeck.c (convert_arguments): Don't do ellipsis conversion for
12010 __built_in_constant_p.
12012 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12014 * typeck.c (build_static_cast): Allow enum to enum conversions
12017 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12019 * class.c (check_field_decls): Pointers to member do not a
12020 non-pod struct make, as per DR 148.
12022 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12024 * call.c (joust): cp_pedwarn when using gnu extension concerning
12025 worst conversion sequences.
12027 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12029 * decl.c: Replace all uses of 'boolean' with 'bool'.
12031 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12033 * lang-specs.h: Add zero initializer for cpp_spec field to
12034 all array elements that need one. Don't put an #ifdef inside
12035 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12038 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12040 Implement using decls inside template functions.
12041 * decl2.c (validate_nonmember_using_decl): Don't special case
12042 fake_std_node in the global namespace. Don't reject early when
12043 processing a template.
12044 (do_local_using_decl): Add to statement tree. Don't do further
12045 processing when building a template.
12046 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12048 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12050 * decl2.c (do_nonmember_using_decl): Don't complain if we find
12051 same function. Do complain about ambiguating extern "C"
12054 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
12056 Remove floating point and complex type template constant parms.
12057 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12058 COMPLEX_TYPE extensions.
12059 (invalid_nontype_parm_type_p): Likewise.
12061 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
12063 * except.c (call_eh_info): Revert "match_function"'s type.
12065 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
12067 Fix ctor vtable vcall offsets.
12068 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12069 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12070 (get_matching_base): Remove.
12071 (get_original_base): New function.
12072 (build_vtbl_initializer): Initialize vid.rtti_binfo.
12073 Use a virtual thunk for a ctor vtable with an index
12074 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12075 primary base within a constructor vtable. Only set
12076 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12077 when primary base has been lost.
12078 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12080 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
12082 * call.c (joust): Ensure more_specialized()'s argument length
12083 parameter has correct value for constructors.
12085 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
12087 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12089 * decl.c (mark_inlined_fns): Prototype.
12091 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12093 * spew.c (yylex): Correct handling of friends.
12095 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12097 * mangle.c (write_encoding): Pass write_function_type the
12098 FUNCTION_DECL for the function being encoded.
12099 (write_function_type): Pass it along to write_bare_function_type.
12100 (write_bare_function_type): Pass it along to write_method_parms.
12101 (write_method_parms): Don't mangle the compiler-generated
12102 parameters to a constructor or destructor.
12104 2001-02-22 Andreas Jaeger <aj@suse.de>
12106 * optimize.c: Include toplev.h for
12107 note_deferral_of_defined_inline_function prototype.
12109 2001-02-22 Jakub Jelinek <jakub@redhat.com>
12111 * cp-tree.h (struct lang_decl_inlined_fns): New.
12112 (struct lang_decls): Add inlined_fns.
12113 (DECL_INLINED_FNS): New macro.
12114 * optimize.c (struct inline_data): Add inlined_fns.
12115 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12116 (inlinable_function_p): Likewise, fix typo in comment,
12117 function is not inlinable if it already inlined function currently
12119 (expand_call_inline): Add fn to inlined_fns if necessary.
12120 (optimize_function): Initialize inlined_fns.
12121 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12122 * decl.c (mark_inlined_fns): New function.
12123 (lang_mark_tree): Call it.
12125 2001-02-21 Jason Merrill <jason@redhat.com>
12127 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12128 (DECL_UNINLINABLE): Move to middle-end.
12130 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12131 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12132 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12133 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12134 parms and outer BLOCK. note_deferral_of_defined_inline_function.
12136 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12137 second parm of op=.
12139 2001-02-19 Mark Mitchell <mark@codesourcery.com>
12141 * decl2.c (set_decl_namespace): Allow explicit instantiations in
12144 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12146 * optimize.c (expand_call_inline): Don't walk subtrees of type
12149 2001-02-18 Mark Mitchell <mark@codesourcery.com>
12151 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12154 2001-02-18 Jason Merrill <jason@redhat.com>
12156 Do put the VTT parameter in DECL_ARGUMENTS.
12157 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12158 (current_vtt_parm): New macro.
12159 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12160 (DECL_HAS_VTT_PARM_P): New macro.
12161 (DECL_VTT_PARM): Remove.
12162 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12163 * decl.c (duplicate_decls): Only copy the operator code if
12165 (start_function): Set current_vtt_parm.
12166 (lang_mark_tree): Don't mark vtt_parm.
12167 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12168 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
12169 * class.c (build_clone): Maybe remove the VTT parm.
12170 * optimize.c (maybe_clone_body): Set up the VTT parm.
12171 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12172 * call.c (build_over_call): Just allow the VTT arg.
12173 * method.c (make_thunk): Don't set DECL_VTT_PARM.
12174 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12175 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12176 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12177 * error.c (dump_function_decl): Likewise.
12178 * call.c (build_user_type_conversion_1, convert_like_real): Abort
12179 if we try to call a constructor with in-charge or VTT parms.
12180 * method.c (skip_artificial_parms_for): New fn.
12181 * call.c (add_function_candidate, build_over_call): Call it.
12182 * call.c (build_new_method_call): Use current_vtt_parm.
12183 * init.c (expand_virtual_init): Likewise.
12184 * class.c (same_signature_p): No longer static.
12185 * cp-tree.h: Declare it.
12186 * search.c (look_for_overrides_r): Use it.
12188 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12190 * cp-tree.h (new_abi_rtti_p): Remove.
12191 (name_mangling_version): Likewise.
12192 (flag_do_squangling): Likewise.
12193 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12194 * decl.c (grokfndecl): Likewise.
12195 * decl2.c (name_mangling_version): Remove.
12196 (flag_do_squangling): Likewise.
12197 (lang_f_options): Remove `squangle'.
12198 (unsupported_options): Add `squangle'.
12199 (cxx_decode_option): Issue a warning about uses of
12200 -fname-mangling-version.
12201 (finish_file): Remove old ABI support.
12202 * pt.c (check_explicit_specialization): Likewise.
12203 (tsubst_decl): Likewise.
12204 * rtti.c (init_rtti_processing): Likewise.
12205 (build_headof): Likewise.
12206 (get_tinfo_decl_dynamic): Likewise.
12207 (tinfo_from_decl): Likewise.
12208 (build_dynamic_cast_1): Likewise.
12209 (synthesize_tinfo_var): Likewise.
12210 * init.c (build_new): Allow enumeration types for the array-bounds
12211 in a direct-new-declarator.
12213 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12215 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12216 TREE_PROTECTED from the template being specialized.
12218 2001-02-17 Jason Merrill <jason@redhat.com>
12220 * decl2.c (build_artificial_parm): Set TREE_READONLY.
12222 * decl.c (bad_specifiers): Allow throw specs on things with
12223 pointer-to-function or -member-function type.
12224 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12227 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12229 * call.c (check_dtor_name): Handle template names correctly.
12231 2001-02-16 Jason Merrill <jason@redhat.com>
12233 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12234 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12235 * optimize.c (maybe_clone_body): Don't substitute it.
12236 * call.c (build_new_method_call): Check in_chrg instead.
12237 * init.c (expand_virtual_init): Likewise.
12239 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
12241 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12242 class-type introduces at least a type-name.
12244 2001-02-16 Jakub Jelinek <jakub@redhat.com>
12246 * call.c (convert_like_real): Create a temporary for non-lvalue.
12248 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
12250 * cp-tree.h: Fix typos in comments.
12252 2001-02-16 Jason Merrill <jason@redhat.com>
12254 * optimize.c (remap_block): If we're compiling a clone, pass the
12255 new block to insert_block.
12257 2001-02-16 Mark Mitchell <mark@codesourcery.com>
12259 * semantics.c (finish_asm_stmt): Robustify.
12261 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12263 * pt.c (push_template_decl_real): Don't remangle the name of a
12266 2001-02-15 Jim Meyering <meyering@lucent.com>
12268 * Make-lang.in (c++.install-common): Depend on installdirs.
12269 (c++.install-info): Likewise.
12270 (c++.install-man): Likewise.
12272 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12274 * typeck2.c (build_m_component_ref): Robustify.
12276 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
12278 * friend.c (do_friend): Don't take the nested [template] class
12279 into account when deciding whether to warn about the friend
12280 function not referring to a template function.
12282 2001-02-14 Jakub Jelinek <jakub@redhat.com>
12284 * typeck.c (build_unary_op): Clarify error message.
12286 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
12288 * parse.y (component_constructor_declarator): allow optional
12289 parentheses around constructor class name.
12291 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12293 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12295 * init.c (emit_base_init): Remove incorrect comment about
12297 * method.c (make_thunk): Fix comment alignment.
12299 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12301 Kill remnants of this is variable.
12302 * cp-tree.h (flag_this_is_variable): Remove.
12303 * decl2.c (flag_this_is_variable): Remove.
12304 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12305 (build_vbase_path): The path is non-static, even in a cdtor.
12306 (resolves_to_fixed_type_p): Add additional return value.
12307 * search.c (init_vbase_pointers): Adjust.
12308 * tree.c (lvalue_p_1): Adjust.
12309 * typeck.c (mark_addressable): Adjust.
12311 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12313 * pt.c (unify): Don't check cv quals of array types.
12315 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12317 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12318 check whether we already have the type.
12320 2001-02-13 Mark Mitchell <mark@codesourcery.com>
12322 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12323 * call.c (build_op_delete_call): Simplify to remove duplicate
12325 * class.c (clone_function_decl): Don't build the deleting variant
12326 of a non-virtual destructor.
12327 * decl.c (finish_destructor_body): Don't call delete if this is a
12328 non-virtual destructor.
12329 * init.c (build_delete): Explicitly call `operator delete' when
12330 deleting an object with a non-virtual destructor.
12332 2001-02-13 Jason Merrill <jason@redhat.com>
12334 * lang-specs.h: Add more __EXCEPTIONS.
12336 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12338 * typeck2.c (process_init_constructor): Check
12339 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12341 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12343 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12344 Remove spurious information in comment. Allow further
12345 adjustments of REFERENCE_TYPE args.
12347 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12349 * errfn.c (cp_deprecated): Tweak diagnostic text.
12350 * parse.y (new_initializer): Deprecate initializer lists
12353 2001-02-12 Mark Mitchell <mark@codesourcery.com>
12355 Remove old ABI support.
12357 2001-02-11 Mark Mitchell <mark@codesourcery.com>
12359 * decl2.c (flag_vtable_thunks): Always set it to 1.
12360 (flag_new_abi): Likewise.
12361 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12363 * Makefile.in (g++spec.o): Fix typo.
12365 2001-02-09 Jason Merrill <jason@redhat.com>
12367 * lang-specs.h: Restore definition of __EXCEPTIONS.
12369 2001-02-08 Jason Merrill <jason@redhat.com>
12371 * search.c (shared_member_p): New function.
12372 (lookup_field_r): Use it.
12373 * cp-tree.h (SHARED_MEMBER_P): Remove.
12375 * method.c (process_overload_item): Handle template-dependent array
12377 * pt.c (type_unification_real): If we end up with undeduced nontype
12380 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
12383 * typeck2.c (friendly_abort): Don't say anything if we have
12384 earlier errors or sorries.
12386 * decl.c (check_tag_decl): Notice attempts to redefine bool and
12387 wchar_t. Ignore if in_system_header.
12389 * decl.c (maybe_push_cleanup_level): New fn...
12390 (start_decl_1): ...split out from here.
12391 * cvt.c (build_up_reference): Use it.
12392 * cp-tree.h: Declare it.
12394 2001-02-07 Mark Mitchell <mark@codesourcery.com>
12396 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
12399 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
12401 * pt.c (lookup_template_class): Make sure it's a primary
12402 template or template_template_parm when called from the parser.
12403 (instantiate_template_class): Add assertion.
12405 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
12407 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
12408 from error_mark_node.
12410 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
12412 Fix specification and implementation bugs in V3 ABI
12413 construction vtables.
12414 * cp-tree.h (flag_dump_class_layout): New flag.
12415 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
12416 (BINFO_LOST_PRIMARY_P): New flag.
12417 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
12418 (BINFO_PRIMARY_MARKED_P): Rename to ...
12419 (BINFO_PRIMARY_P): ... here.
12420 (binfo_via_virtual): New prototype.
12421 * decl2.c (flag_dump_class_layout): New flag.
12422 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
12423 use `=' as a file name separator.
12424 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
12426 (build_vtbl_address): If this is a virtual primary base, then
12427 get the vtbl of what it is ultimately primary for.
12428 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
12429 for BINFO_PRIMARY_P.
12430 (dfs_skip_nonprimary_vbases_markedp): Likewise.
12431 (get_shared_vbase_if_not_primary): Likewise.
12432 (dfs_get_pure_virtuals): Likewise.
12433 (expand_upcast_fixups): Likewise.
12434 (fixup_virtual_upcast_offsets): Likewise.
12435 (dfs_find_vbase_instance): Likewise.
12436 (find_vbase_instance): Likewise.
12437 (binfo_from_vbase): Adjust comment to reflect reality.
12438 (binfo_via_virtual): New function.
12439 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
12440 for binfo walking during VTT construction.
12441 (dfs_mark_primary_bases): Remove.
12442 (force_canonical_binfo_r): New function.
12443 (force_canonical_binfo): New function.
12444 (mark_primary_virtual_base): New function.
12445 (mark_primary_bases): Walk in inheritance graph order, use
12446 mark_primary_virtual_base.
12447 (determine_primary_base): Use some more intermediate variables.
12448 (dfs_find_final_overrider): Don't check for overriding along a
12450 (dfs_modify_vtables): Walk into primary virtual bases too.
12451 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
12452 (build_base_fields): Likewise.
12453 (dfs_set_offset_for_unshared_vbases): Likewise.
12454 (layout_virtual_bases): Likewise.
12455 (end_of_class): Likewise.
12456 (finish_struct_1): Call dump_class_hierarchy, if requested.
12457 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
12458 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
12459 (dump_class_hierarchy): Add file parameter. Append to file, if
12461 (finish_vtbls): Adjust accumulate_vtbl_inits call.
12462 Use canonical base for virtual bases.
12463 (build_vtt): Add more comments. Adjust build_vtt_inits call.
12464 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
12465 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
12466 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
12468 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
12469 from DATA. We want virtual primary bases and all bases via virtual.
12470 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
12471 virtual base when not a construction vtable.
12472 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
12473 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
12474 Use canonical bases when processing virtual bases.
12475 (accumulate_vtbl_inits): We're interested in any base via a
12477 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
12478 within a construction vtable, determine what is being overridden.
12479 (build_vtbl_initializer): Add more comments
12480 (add_vcall_offset_vtbl_entries_1): Adjust comment.
12481 (build_rtti_vtbl_entries): Check if the base has lost its
12484 2001-02-05 Mark Mitchell <mark@codesourcery.com>
12486 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
12488 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12490 * decl.c (pushdecl): Call abort instead of fatal.
12491 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
12492 * init.c (build_new_1): Likewise.
12493 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
12494 * decl.c (build_typename_type): hash_table_init now returns void.
12495 decl.c (init_decl_processing): Make an error non-fatal.
12497 2001-02-04 Mark Mitchell <mark@codesourcery.com>
12499 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
12501 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
12502 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
12503 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
12504 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
12505 * decl.c (maybe_commonize_var): Use the new name-mangling where
12507 * decl2.c (comdat_linkage): Enhance comments. Make all
12508 compiler-generated things static, if COMDAT is not available.
12509 (get_tinfo_decl): Do not make typeinfo objects that belong in the
12511 (tinfo_base_init): Use the correct mangled name for typeinfo
12512 strings, and push them into the global scope.
12513 (typeinfo_in_lib_p): New function.
12514 (synthesize_tinfo_var): Use it.
12515 (create_real_tinfo_var): Likewise.
12517 2001-02-03 Jakub Jelinek <jakub@redhat.com>
12519 * decl.c (push_class_binding): Use context_for_name_lookup instead
12520 of CP_DECL_CONTEXT.
12521 * search.c (context_for_name_lookup): Remove static. Check for NULL
12522 context in the loop.
12523 * cp-tree.h (context_for_name_lookup): Add prototype.
12525 2001-02-02 Jakub Jelinek <jakub@redhat.com>
12527 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
12528 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
12530 * call.c (convert_class_to_reference, build_user_type_conversion_1,
12531 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
12533 2001-02-02 Mark Mitchell <mark@codesourcery.com>
12535 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
12536 of macros used when compiling g++spec.c.
12537 * g++spec.c (lang_specific_driver): Link with the shared
12540 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
12542 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
12543 make_reference_declarator, make_call_declarator), method.c
12544 (implicitly_declare_fn), parse.y (namespace_using_decl,
12545 notype_unqualified_id, expr_or_declarator, new_type_id,
12546 after_type_declarator, direct_after_type_declarator,
12547 notype_declarator, complex_notype_declarator,
12548 complex_direct_notype_declarator, qualified_id,
12549 notype_qualified_id, overqualified_id, direct_new_declarator,
12550 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
12551 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
12552 instead of build_parse_node.
12554 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12556 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
12557 (minus_one_node): Moved to top level gcc directory. Renamed
12558 to integer_minus_one_node.
12560 * init.c (init_init_processing): Don't set minus_one_node.
12561 (build_vec_init): Use integer_minus_one_node.
12563 * rtti.c (get_tinfo_decl_dynamic): Likewise.
12565 2001-01-28 Jakub Jelinek <jakub@redhat.com>
12567 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
12568 identical and they would be replaced with constant, remove
12569 MODIFY_EXPR from the tree.
12571 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12573 * Make-lang.in: Remove all dependencies on defaults.h.
12574 * call.c: Don't include defaults.h.
12575 * decl.c: Likewise.
12576 * decl2.c: Likewise.
12577 * except.c: Likewise.
12579 * rtti.c: Likewise.
12580 * tree.c: Likewise.
12581 * typeck.c: Likewise.
12583 2001-01-25 Jakub Jelinek <jakub@redhat.com>
12585 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
12586 operators even in "C" linkage.
12587 * method.c (set_mangled_name_for_decl): Likewise.
12588 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
12589 overloaded operators in "C" linkage.
12591 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12593 * pt.c (tsubst_decl): Remove IN_DECL parameter.
12594 (tsubst_arg_types): Check parameter is not void.
12595 (tsubst): Adjust tsubst_decl call.
12597 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12599 * call.c (add_builtin_candidate): Quote std properly, from
12602 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12604 * pt.c (check_explicit_specialization): Clone constructors and
12607 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12609 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12610 indicates anything special about template depth. Make sure we
12611 only count the user visible template classes.
12613 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12615 * call.c (build_conv): Typo in comment.
12616 (add_builtin_candidate): Add more explanation.
12617 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12618 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12619 when we have enumeral types.
12620 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12621 candidates for relops and eqops.
12622 (joust): Simplify control flow. Allow a non-template user
12623 function to hide a builtin.
12625 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
12627 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12628 (more_specialized): Add deduction parameter.
12629 * call.c (joust): Adjust more_specialized call.
12630 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12631 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12632 (get_bindings_order): Remove.
12633 (get_bindings_real): Add DEDUCE parameter.
12634 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12635 REFERENCE_TYPE jig for DEDUCE_ORDER.
12636 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12637 maybe_adjust_types_for_deduction.
12638 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12640 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12641 (check_cv_quals_for_unify): Use new unify qualifier flags.
12642 (unify): Clear new unify qualifier flags.
12643 (get_bindings_real): Add DEDUCE parameter.
12644 (get_bindings): Adjust call to get_bindings_real.
12645 (get_bindings_overload): Likewise.
12646 (most_specialized_instantiation): Adjust call to
12649 2001-01-19 Jason Merrill <jason@redhat.com>
12651 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12653 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12656 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
12658 * decl2.c (arg_assoc_class): Fix double iteration logic.
12660 2001-01-19 Jason Merrill <jason@redhat.com>
12662 * init.c (build_delete): Always call convert_force to strip cv-quals.
12664 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12665 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12666 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12668 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12670 * search.c (get_vbase_1): Count only virtual bases.
12672 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12674 * class.c (duplicate_tag_error): Robustify flag clearing.
12676 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12678 * cp-tree.h (lookup_template_class): Add complain parm.
12679 * decl.c (lookup_namespace_name): Adjust call to
12680 lookup_template_class.
12681 (make_typename_type): Likewise.
12682 * semantics.c (finish_template_type): Likewise.
12683 * pt.c (lookup_template_class): Add complain parm. Adjust.
12684 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12685 (tsubst): Likewise.
12687 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12689 * pt.c (copy_default_args_to_explicit_spec): Preserve
12690 object's CV quals. Reorganize.
12692 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12694 * typeck.c (build_modify_expr): Say `initialization' for
12696 * init.c (build_default_init): Convert to enumeral type, if
12699 2001-01-18 Jakub Jelinek <jakub@redhat.com>
12701 * parse.y (nomods_initdcl0): Properly set things up for
12704 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12706 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12707 (type_unification_real): Set it.
12710 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12712 * decl.c (finish_destructor_body): Convert to vbase pointer here.
12714 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12716 * semantics.c (begin_class_definition): Check we're not inside a
12717 template parm list.
12719 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12721 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12724 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12726 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12727 * call.c (build_over_call): Add comment.
12729 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12731 * cvt.c (ocp_convert): Handle vector type conversion
12732 * typeck2.c (digest_init): Handle vector type initializations
12734 2001-01-16 Phil Edwards <pme@sources.redhat.com>
12736 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
12739 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12741 * pt.c (check_nontype_parm): Rename to ...
12742 (invalid_nontype_parm_type_p): ... here.
12743 (process_template_parm): Adjust.
12744 (convert_template_argument): Adjust.
12746 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12748 * pt.c (check_nontype_parm): New function.
12749 (process_template_parm): Use it.
12750 (convert_template_argument): Use it.
12751 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12754 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
12756 * tree.c: Add defaults.h
12757 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12758 * Make-lang.in (cp/tree.o): Add defaults.h.
12760 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12762 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12764 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12766 * g++.1: Change to be ".so man1/gcc.1".
12768 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12770 * Make-lang.in (c++.info, c++.install-info): Build and install g++
12772 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12773 ($(srcdir)/cp/g++int.info): New target.
12774 * gxxint.texi: Add info directory entry. Use @@ in email address.
12775 * .cvsignore: Update.
12777 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12779 * typeck.c (build_c_cast): Do template processing earlier.
12780 Always pedwarn on array casts.
12782 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12784 * friend.c (make_friend_class): Make sure a templated class is
12785 actually a template.
12787 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12789 * decl2.c (get_guard): Set linkage from guarded decl.
12791 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12793 * call.c (convert_default_arg): Check for unprocessed
12795 * cp-tree.h (replace_defarg): Move to spew.c.
12796 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
12797 spew.c, which is where they really are.
12798 (done_pending_defargs): Declare.
12799 (unprocessed_defarg_fn): Declare.
12800 * decl.c (replace_defarg): Move to spew.c
12801 * parse.y (structsp): Call done_pending_defargs.
12802 * spew.c (defarg_fns): Rearrange list structure.
12803 (defarg_fnsdone): New static variable.
12804 (defarg_depfns): New static variable.
12805 (init_spew): Adjust.
12806 (add_defarg_fn): Store the type in TREE_TYPE.
12807 (do_pending_defargs): Detect and deal with ordering constraints
12809 (done_pending_defargs): New function.
12810 (unprocessed_defarg_fn): New function.
12811 (replace_defarg): Moved from decl.c. Robustify. Don't save
12812 if circularity detected.
12814 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12816 * pt.c (unify): Check array has a domain, before checking
12817 whether it is variable sized.
12819 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12821 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
12822 parameters with pointers to arrays of unknown bound.
12824 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12826 * parse.y (template_parm_header, template_spec_header): New
12827 reductions. Split out from ...
12828 (template_header): ... here. Use them.
12829 (template_template_parm): Use template_parm_header.
12830 * semantics.c (finish_template_template_parm): Add assert.
12832 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12834 * mangle.c (write_builtin_type): Fix thinko.
12836 * pt.c (copy_default_args_to_explicit_spec_1): New function.
12837 (copy_default_args_to_explicit_spec): Likewise.
12838 (check_explicit_specialization): Use it.
12840 * class.c (finish_struct_1): Remove last argument in call to
12841 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12842 * decl.c (builtin_function): Likewise.
12843 (build_cp_library_fn): Likewise.
12844 (check_initializer): Likewise.
12845 (make_rtl_for_nonlocal_decl): Likewise.
12846 (cp_finish_decl): Likewise.
12847 (start_function): Likewise.
12848 * decl2.c (finish_anon_union): Likewise.
12849 * friend.c (do_friend): Likewise.
12850 * init.c (build_java_class_ref): Likewise.
12851 * method.c (make_thunk): Likewise.
12852 * pt.c (tsubst_friend_function): Likewise.
12853 * semantics.c (expand_body): Likewise.
12855 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12857 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
12858 looking at DECL_CLONED_FUNCTION for non-functions.
12860 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12862 * error.c (dump_template_parameter): Use parm to determine how
12863 to print default value.
12865 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12867 * class.c (duplicate_tag_error): Clear more flags.
12869 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12871 * call.c (build_new_method_call): Use binfo_for_vbase.
12873 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
12875 * cp-tree.h (flag_cond_mismatch): Don't declare.
12876 * decl2.c (flag_cond_mismatch): Don't define.
12877 (lang_f_options): Remove cond-mismatch.
12878 (unsupported_options): Add cond-mismatch.
12880 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
12882 * class.c (handle_using_decl): Reject using of constructor name
12883 of sourcing class. Allow injecting of a method with same name as
12884 nested class. Fixup error messages.
12886 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
12888 * decl2.c (lang_decode_option): Handle -Wformat=2.
12890 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12892 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12893 initialized_in_class.
12894 (DECL_DEFINED_IN_CLASS_P): Rename to ...
12895 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12896 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12897 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12898 * pt.c (check_default_tmpl_args): Adjust for
12899 DECL_INITIALIZED_IN_CLASS_P.
12900 (instantiate_class_template): Likewise.
12901 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
12903 * class.c (finish_struct): Constify saved_filename.
12905 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12907 * class.c (duplicate_tag_error): Adjust diagnostic.
12908 (finish_struct): Locally set location to start of struct.
12909 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12911 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12913 * decl.c (struct binding_level): Adjust class_shadowed comments
12914 to reflect reality.
12915 (push_class_level_binding): Adjust comments to reflect reality.
12916 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12917 Don't set TREE_VALUE on the class_shadowed list.
12919 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12921 * decl2.c (acceptable_java_type): Allow references too.
12922 * init.c (build_java_class_ref): When using the new ABI, search
12923 `class$' and have it mangled with `mangle_decl.'
12924 * mangle.c (write_java_integer_type_codes): New function.
12925 (write_builtin_type): Detect and mangle Java integer and real
12928 2001-01-07 Mark Mitchell <mark@codesourcery.com>
12930 * decl2.c (grokfield): Don't accept `asm' specifiers for
12931 non-static data members.
12933 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12935 * expr.c (cplus_expand_expr): Don't reset `target'.
12937 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
12939 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
12941 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12943 * parse.y (template_datadef): Check for error_mark_node.
12945 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12947 * cp-tree.def (DEFAULT_ARG): Make `x' class.
12949 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
12951 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12952 (record_builtin_type): Make non-static.
12953 (flag_short_double): Don't declare.
12954 (init_decl_processing): Remove the creation of many tree nodes now
12955 in c_common_nodes_and_builtins.
12956 (build_void_list_node): New function.
12957 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12958 * cp-tree.h (flag_short_wchar): Don't declare.
12960 2001-01-04 Mark Mitchell <mark@codesourcery.com>
12962 * call.c (build_conv): Don't use build1 for USER_CONV.
12963 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12965 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
12967 * lex.c (lang_init): Call c_common_lang_init.
12969 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12971 * search.c (lookup_fnfields_here): Remove.
12972 (look_for_overrides_r): Use lookup_fnfields_1.
12973 Ignore functions from using declarations.
12975 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12977 Implement exceptions specifiers for implicit member functions.
12978 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12979 * method.c (synthesize_exception_spec): New function.
12980 (locate_dtor, locate_ctor, locate_copy): New functions.
12981 (implicitly_declare_fn): Generate the exception spec too.
12982 * search.c (check_final_overrider): Check artificial functions
12984 * typeck2.c (merge_exception_specifiers): New function.
12986 2001-01-03 Jason Merrill <jason@redhat.com>
12988 * init.c (build_default_init): New fn.
12989 (perform_member_init): Split out from here.
12990 (build_new_1): Use it. Simplify initialization logic.
12991 (build_vec_init): Take an array, rather than a pointer and maxindex.
12992 Speed up simple initializations. Don't clean up if we're assigning.
12993 * cp-tree.h: Adjust.
12994 * decl2.c (do_static_initialization): Remove TREE_VEC case.
12995 * parse.y (new_initializer): Return void_zero_node for ().
12996 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12997 * typeck2.c (digest_init): Only complain about user-written
13000 2000-12-22 Mike Stump <mrs@wrs.com>
13002 * decl2.c: (max_tinst_depth): Increase to 50.
13004 2001-01-02 Mark Mitchell <mark@codesourcery.com>
13006 * class.c (invalidate_class_lookup_cache): Zero the
13007 previous_class_values.
13008 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13010 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13011 * decl.c (free_bindings): New variable.
13012 (push_binding): Don't create a new binding if we have one on the
13014 (pop_binding): Put old bindings on the free list.
13015 (init_decl_processing): Use size_int, not build_int_2.
13016 Register free_bindings as a GC root.
13017 (cp_make_fname_decl): Use size_int, not build_int_2.
13018 (push_inline_template_parms_recursive): Likewise.
13019 (end_template_parm_list): Likewise.
13020 (for_each_template_parm): Do not use walk_tree_without_duplicates.
13021 (tsubst_template_parms): Use size_int, not build_int_2.
13022 (tsubst): Likewise.
13023 * rtti.c (get_vmi_pseudo_type_info): Likewise.
13025 2001-01-02 Richard Henderson <rth@redhat.com>
13027 * parse.y (asm): Set ASM_INPUT_P.
13029 2001-01-02 Jason Merrill <jason@redhat.com>
13031 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13034 * typeck.c (cp_truthvalue_conversion): New fn.
13035 * cvt.c (ocp_convert): Use it.
13037 * cp-tree.h: Lose c-common.c decls.
13039 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13040 * cvt.c (convert_to_void): Use type_unknown_p.
13042 * typeck.c (strip_all_pointer_quals): Also strip quals from
13043 pointer-to-member types.
13045 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
13048 * call.c (build_new_method_call): Do evaluate the object parameter
13049 when accessing a static member.
13050 * typeck.c (build_component_ref): Likewise.
13052 2001-01-02 Andreas Jaeger <aj@suse.de>
13054 * decl.c (cp_missing_noreturn_ok_p): New.
13055 (init_decl_processing): Set lang_missing_noreturn_ok_p.
13057 2000-12-29 Jakub Jelinek <jakub@redhat.com>
13059 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13061 2000-12-29 Mark Mitchell <mark@codesourcery.com>
13063 * class.c (pushclass): Remove #if 0'd code.
13064 * cp-tree.h (overload_template_name): Remove.
13065 * decl.c (store_bindings): Simplify.
13066 (pop_from_top_level): Likewise.
13067 * pt.c (overload_template_name): Remove.
13068 (instantiate_decl): Don't call push_to_top_level if it's not
13071 2000-12-28 Mark Mitchell <mark@codesourcery.com>
13073 * pt.c (register_local_specialization): Don't return a value.
13074 (lookup_template_class): Use move-to-front heuristic when looking
13075 up template instantiations.
13076 (instantiate_decl): Only push_to_top_level when we're actually
13077 going to instantiate the template.
13079 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
13081 * search.c (binfo_for_vtable): Return least derived class, not
13082 most. Handle secondary vtables.
13084 2000-12-22 Jason Merrill <jason@redhat.com>
13086 * pt.c (more_specialized): Don't optimize len==0.
13087 (fn_type_unification): If we're adding the return type, increase len.
13089 * typeck.c (build_binary_op): Fix pmf comparison logic.
13091 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13092 DECL_STATIC_FUNCTION_P.
13094 * semantics.c (genrtl_finish_function): Don't try to jump to
13095 return_label unless it exists.
13097 In partial ordering for a call, ignore parms for which we don't have
13099 * call.c (joust): Pass len to more_specialized.
13100 (add_template_candidate_real): Strip 'this', pass len.
13101 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
13102 (get_bindings_order): New fn. Pass len down.
13103 (get_bindings_real): Strip 'this', pass len.
13104 (fn_type_unification): Likewise.
13105 (type_unification_real): Succeed after checking 'len' args.
13106 (most_specialized_instantiation): Lose explicit_args parm.
13107 * class.c (resolve_address_of_overloaded_function): Strip 'this',
13110 2000-12-21 Jason Merrill <jason@redhat.com>
13112 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13113 DECL_TEMPLATE_RESULT.
13115 * search.c (lookup_field_r): Call lookup_fnfields_1, not
13116 lookup_fnfields_here.
13118 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13120 * call.c (build_object_call): Also allow conversions that return
13121 reference to pointer to function.
13122 (add_conv_candidate): Handle totype being ref to ptr to fn.
13123 (build_field_call): Also allow members of type reference to function.
13124 Lose support for calling pointer to METHOD_TYPE fields.
13126 * error.c (dump_expr): Handle *_CAST_EXPR.
13128 * typeck2.c (build_scoped_ref): Always convert to the naming class.
13130 * tree.c (break_out_cleanups): Lose.
13131 * cp-tree.h: Remove prototype.
13132 * typeck.c (build_component_ref): Don't break_out_cleanups.
13133 (build_compound_expr): Likewise.
13134 * semantics.c (finish_expr_stmt): Likewise.
13136 2000-12-20 Richard Henderson <rth@redhat.com>
13138 * cp-tree.h: Update declarations.
13139 * decl.c (finish_case_label): Return the new stmt node.
13140 * semantics.c (finish_goto_stmt): Likewise.
13141 (finish_expr_stmt, finish_return_stmt): Likewise.
13142 (finish_break_stmt, finish_continue_stmt): Likewise.
13143 (finish_asm_stmt): Likewise.
13144 * parse.y (already_scoped_stmt): Set STMT_LINENO.
13145 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13146 (simple_if, simple_stmt): Return the new stmt node.
13147 (save_lineno): New.
13149 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
13151 * cp-tree.h: Don't declare warn_long_long.
13153 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13155 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13158 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13160 * pt.c (unify): Handle when both ARG and PARM are
13161 BOUND_TEMPLATE_TEMPLATE_PARM.
13163 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13165 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13166 DECL_TEMPLATE_PARM_P.
13168 2000-12-15 Jason Merrill <jason@redhat.com>
13170 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
13172 * init.c (build_new_1): Don't strip quals from type.
13174 * decl.c (pushdecl): Don't check for linkage on a non-decl.
13176 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13178 * call.c (build_new_function_call): Lose space before paren in
13180 (build_new_method_call): Likewise.
13182 * typeck2.c (build_m_component_ref): Propagate quals from datum.
13184 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13186 * pt.c (check_explicit_specialization): Propagate default
13187 function arguments to explicit specializations.
13189 2000-12-13 DJ Delorie <dj@redhat.com>
13191 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13194 2000-12-08 Jason Merrill <jason@redhat.com>
13196 * error.c (dump_function_name): Don't let the user see __comp_ctor.
13198 Clean up copy-initialization in overloading code.
13199 * call.c (build_user_type_conversion_1): Die if we are asked to
13200 convert to the same or a base type.
13201 (implicit_conversion): Avoid doing so. Lose reference binding code.
13202 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13203 direct-initialization. Also do direct-init part of copy-init.
13204 (build_user_type_conversion): Don't provide context to convert_like.
13205 * cvt.c (ocp_convert): build_user_type_conversion will now provide
13206 the constructor call for copy-init.
13208 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13209 instantiation of a member template.
13210 (do_decl_instantiation): Not here.
13212 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13214 * class.c (check_field_decls): Don't special case anonymous
13215 fields in error messages.
13216 (note_name_declared_in_class): Use %D on diagnostic.
13218 * tree.c (pod_type_p): Use strip_array_types.
13219 (cp_valid_lang_attribute): Likewise.
13220 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13221 multiple evaluations.
13222 (cp_has_mutable_p): Use strip_array_types.
13224 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13226 * cp-tree.h (sufficient_parms_p): Declare new function.
13227 * call.c (sufficient_parms_p): New function, broken out of ...
13228 (add_function_candidate): ... here. Use it.
13229 (add_conv_candidate): Use it.
13230 * decl.c (grok_ctor_properties): Use it.
13232 2000-12-07 Jakub Jelinek <jakub@redhat.com>
13234 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13236 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
13238 * decl2.c (lang_decode_option): Handle -Wformat-security.
13240 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13242 * pt.c (verify_class_unification): New function.
13243 (get_class_bindings): Use it.
13244 (try_class_unification): Tidy.
13245 (unify): Handle when argument of a template-id is not
13246 template parameter dependent.
13247 (template_args_equal): Handle when TREE_CODE's do not match.
13249 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
13251 * lang-specs.h (c++): When invoking the stand-alone preprocessor
13252 for -save-temps, pass all relevant -Defines to it, and then don't
13253 pass them to cc1plus.
13255 2000-12-05 Will Cohen <wcohen@redhat.com>
13257 * decl.c (finish_case_label): Cleared
13258 more_cleanups_ok in surrounding function scopes.
13259 (define_label): Likewise.
13261 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13263 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13264 (get_matching_virtual): Remove.
13265 (look_for_overrides): Declare new function.
13266 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13268 * class.c (check_for_override): Move base class iteration code
13269 to look_for_overrides.
13270 * search.c (next_baselink): Remove.
13271 (get_virtuals_named_this): Remove.
13272 (get_virtual_destructor): Remove.
13273 (tree_has_any_destructors_p): Remove.
13274 (struct gvnt_info): Remove.
13275 (check_final_overrider): Remove `virtual' from error messages.
13276 (get_matching_virtuals): Remove. Move functionality to ...
13277 (look_for_overrides): ... here, and ...
13278 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13281 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13283 * typeck.c (get_delta_difference): If via a virtual base,
13285 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13288 2000-12-04 Richard Henderson <rth@redhat.com>
13290 * error.c (dump_tree): Use output_add_string not OB_PUTS.
13292 2000-12-04 Jason Merrill <jason@redhat.com>
13294 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13295 (write_builtin_type): Pass intSI_type_node and the like through
13297 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13298 Pass intSI_type_node and the like through type_for_mode.
13299 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13300 * pt.c (tsubst, unify): Likewise.
13301 * tree.c (walk_tree): Likewise.
13302 * error.c (dump_type): Likewise.
13303 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13305 * Make-lang.in: Tweak top comment for emacs.
13306 (cp/TAGS): Restore.
13308 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13310 * class.c (clone_function_decl): Robustify.
13312 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
13314 * decl.c (store_bindings): Only search in the non modified
13315 old_bindings for duplicates.
13317 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
13319 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13320 TYPE_POLYMORPHIC_P.
13322 * typeck.c (build_static_cast): Remove unused variable.
13324 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13326 * pt.c: Fix typo in comment.
13328 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13330 * decl2.c (warn_format): Remove definition.
13331 (lang_decode_option): Handle -Wformat-nonliteral,
13332 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
13334 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13336 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13337 (init_decl_processing): Don't create string_type_node,
13338 const_string_type_node, wint_type_node, intmax_type_node,
13339 uintmax_type_node, default_function_type, ptrdiff_type_node and
13340 unsigned_ptrdiff_type_node. Adjust position of call to
13341 c_common_nodes_and_builtins.
13342 (identifier_global_value): New function.
13344 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
13346 * call.c (standard_conversion): Reject pointer to member
13347 conversions from ambiguous, inaccessible or virtual bases.
13348 * typeck.c (build_static_cast): Don't check pointers to members
13351 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13353 * method.c (do_build_copy_constructor): Preserve cv
13354 qualifications when accessing source object members.
13355 (do_build_assign_ref): Likewise. Remove separate diagnostics for
13358 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13360 * method.c (do_build_assign_ref): Construct appropriately
13361 CV-qualified base reference. Don't allow const casts in base
13364 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13366 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13367 incomplete return type.
13369 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13371 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13372 * semantics.c (finish_base_specifier): Accept a _TYPE not a
13375 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13377 * spew.c (yyerror): Cope if yylval.ttype is NULL.
13379 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13381 * decl.c (grokdeclarator): Diagnose undefined template contexts.
13383 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13385 * decl.c (grokdeclarator): Do type access control on friend
13388 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13390 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
13391 bison parser ickiness.
13392 * pt.c (tsubst_friend_function): Enter namespace scope when
13393 tsubsting the function name.
13394 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
13396 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13398 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
13399 * cvt.c (cp_convert_to_pointer): Add force parameter.
13400 Allow conversions via virtual base if forced.
13401 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
13402 (ocp_convert): Likewise.
13403 * search.c (binfo_from_vbase): Return the virtual base's binfo.
13404 * typeck.c (get_delta_difference): Adjust handling of virtual
13407 2000-11-26 Mark Mitchell <mark@codesourcery.com>
13409 * tree.c (struct list_hash): Remove.
13410 (list_hash_table): Make it be an htab.
13411 (struct list_proxy): New type.
13412 (list_hash_eq): New function.
13413 (list_hash_pieces): Renamed from ...
13414 (list_hash): ... this.
13415 (list_hash_lookup): Remove.
13416 (list_hash_add): Remove.
13417 (hash_tree_cons): Use the generic hashtable.
13418 (mark_list_hash): Remove.
13419 (init_tree): Create the hashtable.
13421 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
13423 * method.c (build_mangled_C9x_name): Rename to
13424 build_mangled_C99_name. Change C9X references in comments to
13427 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13429 * parse.y (unary_expr): Move VA_ARG from here ...
13430 (primary): ... to here.
13432 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13434 * semantics.c (finish_id_expr): If type is error_mark, return
13437 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
13439 * pt.c (lookup_template_class): Simplify loop exit constructs.
13440 Cope when there is no partial instantiation of a template
13443 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
13445 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
13447 2000-11-22 Mark Mitchell <mark@codesourcery.com>
13449 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
13452 * pt.c (do_decl_instantiate): Explicitly clone constructors and
13453 destructors that haven't already been cloned.
13455 2000-11-20 Richard Henderson <rth@redhat.com>
13457 * parse.y (yyparse_1): Rename the parser entry point.
13459 2000-11-20 Alex Samuel <samuel@codesourcery.com>
13461 * mangle.c (write_name): Use <unscoped-name> for names directly in
13463 (write_unscoped_name): Accept names directly in function scope.
13465 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
13467 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
13468 * parse.y (extdef): Add EXPORT reduction.
13469 * spew.c (yylex): Don't skip export here.
13471 2000-11-19 Mark Mitchell <mark@codesourcery.com>
13473 * decl.c (init_decl_processing): Correct name of pure virtual
13474 function under the new ABI.
13475 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
13476 (throw_bad_typeid): Likewise for bad typeid function.
13478 2000-11-18 Mark Mitchell <mark@codesourcery.com>
13480 * decl.c (grokparms): Don't even function types of `void' type,
13482 * mangle.c (write_type): Don't crash when confronted with the
13485 * decl.c (grokparms): Don't create parameters of `void' type.
13487 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
13489 * lex.c (mark_impl_file_chain): Delete.
13490 (init_parse): Remove call to ggc_add_string_root. No need to
13491 ggc_strdup a string constant. Do not add impl_file_chain to GC
13493 (handle_pragma_implementation): No need to ggc_strdup main_filename.
13495 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13497 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
13499 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13501 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
13502 * decl.c (grokdeclarator): Don't reject void parms here.
13503 (require_complete_types_for_parms): Simplify, use
13504 complete_type_or_else.
13505 (grokparms): Remove bitrot. Remove funcdef parm.
13506 Deal with ellipsis parm lists here.
13507 * semantics.c (finish_parmlist): Don't append void_list_node
13508 here. Set PARMLIST_ELLIPSIS_P.
13510 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13512 * typeck2.c (incomplete_type_error): Reorganize to avoid
13513 excessive diagnostics.
13515 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
13517 * lex.c (struct impl_files, internal_filename): Constify a char *.
13519 2000-11-16 Mark Mitchell <mark@codesourcery.com>
13521 * mangle.c (write_special_name_constructor): Don't generate
13522 assembler junk when confronted with an old-style constructor.
13523 (write_special_name_destructor): Likewise.
13524 (mangle_decl_string): Do it here instead.
13526 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
13528 * call.c (op_error): Make error messages clearer.
13530 2000-11-15 Mark Mitchell <mark@codesourcery.com>
13532 * decl.c (wrapup_globals_for_namespace): Don't mark things
13533 TREE_ASM_WRITTEN when they're not.
13535 2000-11-15 Jason Merrill <jason@redhat.com>
13537 * typeck2.c (friendly_abort): Uncount the error before handing
13538 off to fancy_abort.
13540 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
13542 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
13544 2000-11-14 Mark Mitchell <mark@codesourcery.com>
13546 * class.c (build_vtbl_initializer): Fix typo in comment.
13547 * typeck.c (expr_sizeof): Don't crash on errors.
13549 2000-11-14 Jim Wilson <wilson@redhat.com>
13551 * lang-specs.h: Add %2 after %(cc1_options).
13553 2000-11-14 Richard Henderson <rth@redhat.com>
13555 * typeck.c (c_sizeof): Be strict about casting result value
13556 back to c_size_type_node.
13557 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
13559 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
13561 * typeck.c (build_unary_op): Use boolean_increment from
13562 c-common.c, moving the relevant code there.
13564 2000-11-11 Jason Merrill <jason@redhat.com>
13566 * typeck.c (mark_addressable): Don't call put_var_into_stack.
13568 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
13571 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13573 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
13574 * lex.c (copy_lang_decl): Likewise.
13576 2000-11-09 Mark Mitchell <mark@codesourcery.com>
13578 * dump.c (cp_dump_tree): Don't dump function bodies here.
13580 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
13581 (dump.o): Update dependency list.
13582 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
13583 (flag_dump_translation_unit): Likewise.
13584 (CP_TYPE_QUALS): Adjust definition.
13585 (DECL_C_BIT_FIELD): Remove.
13586 (SET_DECL_C_BIT_FIELD): Likewise.
13587 (CLEAR_DECL_C_BIT_FIELD): Likewise.
13588 (add_maybe_template): Likewise.
13589 (strip_array_types): Likewise.
13590 (dump_node_to_file): Likewise.
13591 (cp_dump_tree): New function.
13592 * decl.c (init_decl_processing): Set lang_dump_tree.
13593 * decl2.c (flag_dump_translation_unit): Remove.
13594 * dump.c: Move most of it to ../c-dump.c.
13595 (cp_dump_tree): New function.
13596 * pt.c (add_maybe_template): Remove.
13597 * typeck.c (strip_array_types): Likewise.
13599 2000-11-07 Eric Christopher <echristo@redhat.com>
13601 * decl.c (init_decl_processing): Change definition of
13602 __wchar_t to wchar_t. Remove artificial declaration of
13604 * lex.c: Change instances of __wchar_t to wchar_t.
13606 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
13608 * lex.c (do_identifier): Don't lookup_name for operators.
13609 * parse.y (operator): Save looking_for_typename.
13610 (unoperator): Restore it.
13611 * spew.c (frob_opname): Use nth_token for lookahead.
13613 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
13615 * decl.c (grok_op_properties): Always use coerce_new_type and
13616 coerce_delete_type.
13617 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13618 exception specification. Tidy up.
13619 (coerce_delete_type): Preserve exception specification. Tidy up.
13621 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
13623 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13624 (push_binding_level), error.c (cp_tree_printer), pt.c
13625 (process_partial_specialization, tsubst_template_arg_vector),
13626 search.c (lookup_member): Use memset () instead of bzero ().
13628 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
13630 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13632 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
13634 * Make-lang.in (c++.distdir): Remove.
13636 2000-11-04 Mark Mitchell <mark@codesourcery.com>
13638 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13639 declarations from different namespaces to be combined.
13641 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
13643 * decl.c: Include tm_p.h.
13645 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
13647 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13649 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
13651 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13652 (build_overload_value), repo.c (open_repo_file), xref.c
13653 (open_xref_file): Use strchr () and strrchr () instead of index ()
13656 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
13658 * call.c (build_over_call): Call fold on the CALL_EXPR.
13660 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
13662 * error.c (dump_template_decl): Separate template hearders with
13665 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
13667 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
13668 TS_* flags with corresponding TFF_*. Adjust prototypes of
13669 functions (which used to take a tree_string_flags) to take an int.
13671 * cp-tree.h (enum tree_string_flags): Remove
13672 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13673 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13674 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13675 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13676 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13677 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13678 (type_as_string, decl_as_string, expr_as_string,
13679 context_as_string): Adjust prototype.
13681 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13682 instead of TS_PLAIN.
13684 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13685 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13688 2000-10-30 Mark Mitchell <mark@codesourcery.com>
13690 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13691 (linkage_kind): New enumeration.
13692 (decl_linkage): New function.
13693 * decl2.c (comdat_linkage): Extend comment.
13694 * error.c (dump_function_decl): Print the arguments used to
13695 instantiate a template, even when not printing the type of the
13697 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13698 not TREE_PUBLIC, to test for external linkage.
13699 * tree.c (decl_linkage): New function.
13701 2000-10-28 Mark Mitchell <mark@codesourcery.com>
13703 * pt.c (instantiate_decl): Always instantiate static data members
13704 initialized in-class.
13706 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
13708 * Make-lang.in: Move all build rules here from Makefile.in,
13709 adapt to new context. Wrap all rules that change the current
13710 directory in parentheses. Expunge all references to $(P).
13711 When one command depends on another and they're run all at
13712 once, use && to separate them, not ;. Add OUTPUT_OPTION to
13713 all object-file generation rules. Delete obsolete variables.
13715 * Makefile.in: Delete.
13716 * config-lang.in: Delete outputs= line.
13718 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
13720 * error.c (dump_function_decl): Print no space between
13721 `ptr-operator' the `type-specifier' of the return type.
13722 (dump_type_prefix): Make sure we put space at the appropriate
13725 2000-10-23 Jason Merrill <jason@redhat.com>
13727 * call.c (equal_functions): Also call decls_match for extern "C" fns.
13729 2000-10-22 Jason Merrill <jason@redhat.com>
13731 * call.c (build_conditional_expr): Use ocp_convert to force
13734 2000-10-22 Mark Mitchell <mark@codesourcery.com>
13736 * call.c (standard_conversion): Use RVALUE_CONVs for all
13737 expressions that satisfy lvalue_p, not just those that satisfy
13740 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13742 * typeck.c (c_sizeof): Return an expression of `size_t' type,
13743 not one with TYPE_IS_SIZETYPE set.
13744 (dubious_conversion_warnings): Remove special-case code.
13746 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
13748 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13749 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13750 (dump_type_prefix): Print vector-of-int as 'int vector'.
13751 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13752 * tree.c (walk_tree): Handle VECTOR_TYPE.
13754 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13756 2000-10-21 Jason Merrill <jason@redhat.com>
13758 * parse.y (operator): Set got_object from got_scope.
13759 Set looking_for_typename.
13760 * decl.c (lookup_name_real): Clear val after setting from_obj.
13761 Reorganize diagnostic.
13763 2000-10-20 Jason Merrill <jason@redhat.com>
13765 * tree.c (walk_tree): Don't walk into default args.
13767 * error.c (dump_expr): Use host_integerp.
13769 2000-10-20 David Edelsohn <edelsohn@gnu.org>
13771 * typeck2.c (abstract_virtuals_error): Use "because" instead of
13772 "since" in error message.
13774 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13776 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13778 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
13780 * decl.c (revert_static_member_fn): Fixed typo.
13782 2000-10-19 Mark Mitchell <mark@codesourcery.com>
13784 * class.c (subobject_offset_fn): New type.
13785 (dfs_record_base_offsets): Remove.
13786 (record_base_offsets): Likewise.
13787 (dfs_search_base_offsets): Likewise.
13788 (record_subobject_offset): New function.
13789 (check_subobject_offset): Likewise.
13790 (walk_subobject_offsets): Likewise.
13791 (record_subobject_offsets): Likewise.
13792 (layout_conflict_p): Reimplement.
13793 (layout_nonempty_base_or_field): Correct handling of type
13794 conflicts during layout.
13795 (layout_empty_base): Likewise.
13796 (build_base_field): Adjust to handle new representation of empty
13798 (build_base_fields): Likewise.
13799 (layout_virtual_bases): Likewise.
13800 (splay_tree_compare_integer_csts): New function.
13801 (layout_class_type): Use a splay_tree, rather than a varray, to
13802 represent the offsets of empty bases.
13804 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
13805 * decl.c (select_decl): Don't return declarations that are
13808 2000-10-18 Mark Mitchell <mark@codesourcery.com>
13810 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
13811 (fake_std_node): New macro.
13812 * decl.c (in_std): Rename to ...
13813 (in_fake_std): ... this.
13814 (flag_no_builtin): Remove.
13815 (flag_no_nonansi_builtin): Likewise.
13816 (walk_namespaces_r): Use fake_std_node.
13817 (push_namespace): Use std_identifier.
13818 (pop_namespace): Use in_fake_std.
13819 (lookup_name_real): Use fake_std_node.
13820 (init_decl_processing): When -fhonor-std, create the `std'
13821 namespace. Don't create a dummy fake_std_node in that case.
13822 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
13823 (builtin_function): Put builtins whose names don't begin
13824 with `_' in the std namespace.
13825 * decl2.c (flag_no_builtin): Remove.
13826 (flag_no_nonansi_builtin): Likewise.
13827 (set_decl_namespace): Use fake_std_node.
13828 (validate_nonmember_using_decl): Likewise.
13829 (do_using_directive): Likewise.
13830 (handle_class_head): Likewise.
13831 * dump.c (dequeue_and_dump): Likewise.
13832 * except.c (init_exception_processing): Use std_identifier.
13833 * init.c (build_member_call): Use fake_std_node.
13834 * rtti.c (init_rtti_processing): Use std_identifier.
13836 2000-10-17 Mark Mitchell <mark@codesourcery.com>
13838 * cp-tree.h (back_end_hook): Remove declaration.
13839 * decl2.c (back_end_hook): Remove definition.
13841 * dump.c (dequeue_and_dump): Dump TREE_USED.
13843 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
13845 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
13847 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13849 * decl.c (WINT_TYPE): Define.
13850 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
13851 c_size_type_node, signed_size_type_node and wint_type_node.
13853 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13855 * decl2.c (warn_missing_format_attribute): New variable.
13856 (lang_decode_option): Decode -Wmissing-format-attribute.
13858 2000-10-16 Mark Mitchell <mark@codesourcery.com>
13860 * typeck.c (qualify_type): Remove.
13861 (composite_pointer_type): Fix handling of conversions to `cv void*'.
13863 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13865 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13867 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13869 * Makefile.in (parse.c, parse.h): Create atomically.
13871 2000-10-12 Mark Mitchell <mark@codesourcery.com>
13873 * class.c (current_obstack): Remove.
13874 * decl.c (ggc_p): Remove.
13875 (start_decl): Don't use decl_tree_cons.
13876 (grokdeclarator): Don't use build_decl_list.
13877 (start_function): Don't use decl_tree_cons.
13878 (finish_function): Don't mess with obstacks.
13879 * decl2.c (grok_x_components): Don't use build_decl_list.
13880 * lex.c (make_call_declarator): Don't call decl_tree_cons.
13881 (implicitly_declare_fn): Don't call build_decl_list.
13882 * parse.y (frob_specs): Don't call build_decl_list or
13884 (expr_or_declarator_intern): Don't call decl_tree_cons.
13885 (primary): Don't call build_decl_list.
13886 (fcast_or_absdcl): Likewise.
13887 (typed_declspecs): Don't call decl_tree_cons.
13888 (reserved_declspecs): Don't call build_decl_list.
13889 (declmods): Likewise.
13890 (reserved_typespecquals): Likewise.
13892 (new_type_id): Likewise.
13893 (cv_qualifiers): Likewise.
13894 (after_type_declarator_intern): Likewise.
13895 (notype_declarator_intern): Likewise.
13896 (absdcl_intern): Likewise.
13897 (named_parm): Likewise.
13898 * pt.c (most_specialized_class): Likewise.
13899 * repo.c (temporary_obstack): Make it a structure, not a pointer.
13900 (init_repo): Initialize it.
13901 * search.c (current_obstack): Remove.
13902 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
13904 2000-10-09 Richard Henderson <rth@cygnus.com>
13906 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13907 (c++ language support bits for libgcc): Remove.
13908 (c++.clean): Remove cplib2.txt cleanup.
13909 * config-lang.in (headers, lib2funcs): Remove.
13911 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13912 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13913 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13914 * inc/new.h, inc/typeinfo: Remove files.
13916 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
13918 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13920 (init_decl_processing): Initialize intmax_type_node and
13923 2000-10-06 Richard Henderson <rth@cygnus.com>
13925 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13926 (original_result_rtx): Remove.
13927 * decl.c (save_function_data): Don't clear x_result_rtx.
13928 (mark_lang_function): Don't mark it either.
13929 * expr.c (fixup_result_decl): Remove.
13930 * semantics.c (genrtl_named_return_value): Frob the return decl
13931 before calling emit_local_var.
13932 (genrtl_finish_function): Don't call fixup_result_decl.
13933 Always emit the jump to return_label.
13935 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
13937 * pt.c (lookup_template_class): Set current access for enum.
13938 (tsubst_enum): Set file & line for enum decl.
13940 * spew.c (yylex): Remove unused variable.
13942 2000-10-05 Richard Henderson <rth@cygnus.com>
13944 * semantics.c (genrtl_finish_function): Don't init or check
13945 can_reach_end; remove noreturn and return value checks.
13947 2000-10-05 Tom Tromey <tromey@cygnus.com>
13949 * init.c (build_java_class_ref): Use `build_static_name' with a
13950 suffix, not a prefix, to build the class object's name.
13952 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13954 * cp-tree.h (access_kind): Fix comment typo.
13955 * decl2.c (grokfield): Fix diagnostic typo.
13956 * semantics.c (finish_template_type): Fix comment typo.
13957 (finish_qualified_object_call_expr): Likewise.
13959 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13961 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
13964 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13966 * spew.c (frob_id): New static function.
13967 (frob_opname): Use it.
13970 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13972 * decl.c (lang_mark_false_label_stack): Remove.
13973 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
13975 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
13977 * gxxint.texi: Use @email for formatting email addresses.
13979 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
13981 * error.c: Remove direct obstack manipulation. Replace with
13982 output_buffer-based formatting. Adjust calls to removed macros.
13983 (obstack_chunk_alloc, obstack_chunk_free): Remove.
13984 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13985 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13987 2000-09-24 Mark Mitchell <mark@codesourcery.com>
13989 * ir.texi: Move to ../c-tree.texi.
13991 2000-09-20 Jason Merrill <jason@redhat.com>
13993 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13995 2000-09-21 Andreas Jaeger <aj@suse.de>
13997 * errfn.c: Move declaration of cp_printer and cp_printers to ...
13998 * cp-tree.h: ... here.
14000 * error.c: Remove declaration of cp_printer.
14002 2000-09-20 Mark Mitchell <mark@codesourcery.com>
14004 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14006 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
14008 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14011 2000-09-18 Mark Mitchell <mark@codesourcery.com>
14013 * decl.c (start_function): Robustify.
14015 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14017 * cp-tree.h (check_function_format): Accept a `status' parameter.
14019 * call.c, typeck.c: Updates calls to `check_function_format'.
14021 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
14023 * decl2.c (handle_class_head): Always push some scope even
14026 2000-09-16 Mark Mitchell <mark@codesourcery.com>
14028 * cp-tree.h (struct cp_language_function): Remove
14029 x_scope_stmt_stack and name_declared.
14030 (current_scope_stmt_stack): Remove.
14031 (function_name_declared_p): New macro.
14032 (struct lang_decl_flags): Use c_lang_decl as a base class.
14034 (struct lang_decl): Replace saved_tree with context.
14035 (DECL_FRIEND_CONTEXT): Adjust accordingly.
14036 (SET_DECL_FRIEND_CONTEXT): Likewise.
14037 (DECL_VIRTUAL_CONTEXT): Likewise.
14038 (DECL_SAVED_TREE): Remove.
14039 (C_DECLARED_LABEL_FLAG): Likewise.
14040 (cplus_expand_expr_stmt): Don't declare.
14041 (add_decl_stmt): Likewise.
14042 (add_scope_stmt): Likewise.
14043 * decl.c (mark_stmt_tree): Remove.
14044 (case_compare): Likewise.
14045 (finish_case_label): Use c_add_case_label.
14046 (init_decl_processing): Set more language-specific hooks.
14047 (build_enumerator): Fix typo in comment.
14048 (cplus_expand_expr_stmt): Remove.
14049 (mark_lang_function): Use mark_c_language_function.
14050 (lang_mark_tree): Use c_mark_lang_decl.
14051 * decl2.c: Change order of inclusion.
14052 * except.c: Likewise.
14053 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
14054 back on c_expand_expr.
14055 * friend.c: Include expr.h.
14056 * init.c: Change order of inclusion.
14057 * Makefile.in: Update dependencies.
14058 * lex.h (free_lang_decl_chain): Remove.
14059 * optimize.c (maybe_clone_body): Use function_name_declared_p.
14060 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14062 (instantiate_decl): Use function_name_declared_p.
14063 * semantics.c (lang_expand_expr_stmt): Remove.
14064 (set_current_function_name_declared): Likewise.
14065 (current_function_name_declared): Likewise.
14066 (begin_compound_stmt): Use function_name_declared_p.
14067 (add_decl_stmt): Remove.
14068 (setup_vtbl_ptr): Use function_name_declared_p.
14069 (add_scope_stmt): Remove.
14070 (current_scope_stmt_stack): New function.
14071 (cp_expand_stmt): Don't handle SCOPE_STMTs.
14072 (expand_body): Use function_name_declared_p.
14073 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14074 * typeck.c: Change order of includes.
14075 (convert_sequence): Remove.
14077 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
14079 * lex.c (reswords): Add _Complex.
14081 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14083 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14085 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
14087 * init.c (begin_init_stmts): Don't use // comments.
14089 2000-09-12 Jason Merrill <jason@redhat.com>
14091 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14092 all non-extern arrays.
14094 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14095 typenames, too. Downgrade complaint to pedwarn.
14096 (xref_tag): Warn about surprising behavior of 'friend struct T'.
14097 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14098 'class This::Inherited'.
14100 2000-09-12 Mark Mitchell <mark@codesourcery.com>
14102 * decl.c (finish_case_label): Given the LABEL_DECL a
14105 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
14107 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14108 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14109 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14110 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14111 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14113 (sorry_for_unsupported_tree, print_scope_operator,
14114 print_left_paren, print_right_paren, print_left_bracket,
14115 print_right_bracket, print_whitespace): Likewise.
14116 (aggr_variety): Rename to class_key_or_enum.
14117 (print_type): Rename to print_type_id.
14118 (print_type_specifier_seq, print_simple_type_specifier,
14119 print_elaborated_type_specifier,
14120 print_rest_of_abstract_declarator,
14121 print_parameter_declaration_clause, print_exception_specification,
14122 print_nested_name_specifier, print_template_id,
14123 typedef_original_name, print_template_argument_list_start,
14124 print_template_argument_list_end): New functions.
14126 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
14128 * ir.texi: Add more documentation.
14130 2000-09-11 Mark Mitchell <mark@codesourcery.com>
14132 * cp-tree.h (struct saved_scope): Remove x_function_parms.
14133 (current_function_parms): Don't define.
14134 (struct cp_language_function): Remove parms_stored.
14135 (current_function_just_assigned_this): Don't define.
14136 (current_function_parms_stored): Likewise.
14137 (static_ctors): Declare.
14138 (static_dtors): Likewise.
14139 (SF_EXPAND): Don't define.
14140 (expand_start_early_try_stmts): Remove declaration.
14141 (store_parm_decls): Likewise.
14142 * decl.c (static_ctors): Don't declare.
14143 (static_dtors): Likewise.
14144 (struct binding_level): Remove this_block.
14145 (poplevel): Remove dead code.
14146 (set_block): Likewise.
14147 (mark_binding_level): Don't mark this_block.
14148 (mark_saved_scope): Don't mark x_function_parms.
14149 (init_decl_processing): Don't add current_function_parms as a GC
14151 (check_function_type): Change prototype.
14152 (start_function): Remove RTL-generation code.
14153 (expand_start_early_try_stmts): Remove.
14154 (store_parm_decls): Give it internal linkage. Remove
14155 RTL-generation code.
14156 (finish_function): Remove RTL-generation code.
14157 * decl2.c (static_ctors): Fix formatting.
14158 (static_dtors): Likewise.
14159 * method.c (use_thunk): Don't call store_parm_decls.
14160 (synthesize_method): Likewise.
14161 * optimize.c (maybe_clone_body): Likewise.
14162 * parse.y (fn.def2): Likewise.
14163 (.set_base_init): Likewise.
14164 (nodecls): Likewise.
14165 * pt.c (instantiate_decl): Likewise.
14166 * rtti.c (synthesize_tinfo_fn): Likewise.
14167 * semantics.c (genrtl_try_block): Simplify.
14168 (expand_body): Use genrtl_start_function and
14169 genrtl_finish_function.
14170 (genrtl_start_function): New function.
14171 (genrtl_finish_function): Likewise.
14173 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14175 * error.c (cp_tree_printer, case 'P'): Append break.
14177 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14179 * cp-tree.h (frob_opname): Declare.
14180 * parse.y (saved_scopes): New static variable.
14181 (cp_parse_init): Adjust.
14182 (do_id): If lastiddecl is NULL, do do_identifier.
14183 (operator): Save scope information.
14184 (unoperator): New reduction. Restore scope information.
14185 (operator_name): Append unoperator. Call frob_opname.
14186 * spew.c (frob_opname): Define.
14188 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
14190 * decl.c, rtti.c: Include defaults.h if not already included.
14191 Don't define the *_TYPE_SIZE macros.
14193 2000-09-09 Mark Mitchell <mark@codesourcery.com>
14195 * cp-tree.h (push_switch): Change prototype.
14196 (check_cp_case_value): Remove declaration.
14197 (decl_constant_value): Likewise.
14198 * decl.c (struct cp_switch): Add switch_stmt and cases.
14199 (case_compare): New function.
14200 (push_switch): Set switch_stmt. Initialize cases.
14201 (pop_switch): Clean up cases.
14202 (define_case_label): Rename to ...
14203 (finish_case_label): ... this. Do semantic analysis for case
14205 (start_function): Correct comment.
14206 * decl2.c (check_cp_case_value): Remove.
14207 * expr.c (do_case): Remove.
14208 * pt.c (tsubst_expr): Adjust call to finish_case_label.
14209 * semantics.c (genrtl_do_poplevel): Remove declaration.
14210 (RECHAIN_STMTS): Remove.
14211 (finish_break_stmt): Use build_break_stmt.
14212 (finish_continue_stmt): Use build_continue_stmt.
14213 (finish_switch_cond): Adjust condition here, rater than in
14214 c_expand_start_case.
14215 (finish_case_label): Remove.
14216 * typeck.c (c_expand_return): Remove.
14217 (c_expand_start_case): Likewise.
14219 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
14221 * ir.texi: Document type nodes.
14223 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14225 * cp-tree.h (init_cp_semantics): Declare.
14226 (genrtl_try_block): Don't declare.
14227 (genrtl_handler): Likewise.
14228 (genrtl_catch_block): Likewise.
14229 (genrtl_ctor_stmt): Likewise.
14230 (genrtl_subobject): Likewise.
14231 (genrtl_do_poplevel): Likewise.
14232 (genrtl_named_return_value): Likewise.
14233 * lex.c (init_parse): Call init_cp_semantics.
14234 * semantics.c (genrtl_try_block): Give it internal linkage.
14235 (genrtl_handler): Likewise.
14236 (genrtl_catch_block): Likewise.
14237 (genrtl_ctor_stmt): Likewise.
14238 (genrtl_subobject): Likewise.
14239 (genrtl_do_poplevel): Likewise.
14240 (genrtl_named_return_value): Likewise.
14241 (lang_expand_stmt): Rename to ...
14242 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
14243 (init_cp_semantics): Define.
14245 * decl.c (initialize_local_var): Remove RTL-generating code.
14246 * semantics.c (genrtl_try_block): Fix formatting.
14248 Move statement-tree facilities from C++ to C front-end.
14249 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14250 (void_zero_node): Remove.
14251 (stmt_tree): Likewise.
14252 (scope_chain): Adjust.
14253 (language_function): Rename to cp_language_function.
14254 (cp_function_chain): Adjust.
14255 (current_stmt_tree): Remove.
14256 (last_tree): Likewise.
14257 (last_expr_type): Likewise.
14258 (struct lang_decl): Adjust.
14259 (STMT_IS_FULL_EXPR_P): Remove.
14260 (add_tree): Remove.
14261 (begin_stmt_tree): Likewise.
14262 (finish_stmt_tree): Likewise.
14263 (walk_tree_fn): Likewise.
14264 (walk_stmt_tree): Likewise.
14265 * class.c (finish_struct): Replace use of add_tree with add_stmt.
14266 * decl.c (mark_stmt_tree): Adjust type.
14267 (init_decl_processing): Don't build void_zero_node.
14268 (initialize_local_var): Adjust usage of current_stmt_tree.
14269 (finish_enum): Use add_stmt, not add_tree.
14270 (save_function_data): Adjust use of language_function.
14271 (finish_constructor_body): Use add_stmt, not add_tree.
14272 (finish_destructor_body): Likewise.
14273 (push_cp_function_context): Adjust use of language_function.
14274 (pop_cp_function_context): Likewise.
14275 (mark_lang_function): Likewise.
14276 (mark_cp_function_context): Likewise.
14277 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14278 (build_vec_init): Likewise.
14279 * semantics.c (SET_LAST_STMT): Remove.
14280 (RECHAIN_STMTS): Don't use it.
14281 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14282 (current_stmt_tree): Define.
14283 (add_tree): Remove.
14284 (finish_goto_stmt): Use add_stmt, not add_tree.
14285 (finish_expr_stmt): Likewise.
14286 (begin_if_stmt): Likewise.
14287 (finish_then_clause): Likewise.
14288 (begin_while_stmt): Likewise.
14289 (begin_do_stmt): Likewise.
14290 (finish_return_stmt): Likewise.
14291 (begin_for_stmt): Likewise.
14292 (finish_break_stmt): Likewise.
14293 (finish_continue_stmt): Likewise.
14294 (begin_switch_stmt): Likewise.
14295 (finish_case_label): Likewise.
14296 (begin_try_block): Likewise.
14297 (begin_function_try_block): Likewise.
14298 (begin_handler): Likewise.
14299 (begin_catch_block): Likewise.
14300 (begin_compound_stmt): Likewise.
14301 (begin_asm_stmt): Likewise.
14302 (finish_asm_stmt): Likewise.
14303 (finish_label_stmt): Likewise.
14304 (add_decl_stmt): Likewise.
14305 (finish_subobject): Likewise.
14306 (finish_decl_cleanup): Likewise.
14307 (finish_named_return_value): Likewise.
14308 (setup_vtbl_ptr): Likewise.
14309 (add_scope_stmt): Likewise.
14310 (finish_stmt_expr): Likewise.
14311 (prune_unused_decls): Remove.
14312 (begin_stmt_tree): Likewise.
14313 (finish_stmt_tree): Likewise.
14314 (prep_stmt): Adjust use of current_stmt_tree.
14315 (lang_expand_stmt): Likewise.
14316 * tree.c (statement_code_p): Remove.
14317 (cp_statement_code_p): New function.
14318 (walk_stmt_tree): Remove.
14319 (init_tree): Set lang_statement_code_p.
14321 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
14323 Integrated preprocessor.
14325 * Make-lang.in, Makefile.in: Remove all references to input.c,
14326 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
14327 * gxx.gperf, hash.h, input.c: Delete.
14328 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14329 initialized properly.
14331 * class.c (fixup_pending_inline): Take a tree, not a
14332 struct pending_inline *. All callers changed.
14333 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14334 RID_PROTECTED entries in ridpointers[] array here.
14335 * decl.c (duplicate_decls): Do not refer to struct
14337 (record_builtin_type, init_decl_processing): Use RID_MAX not
14339 (grokdeclarator): Use C_IS_RESERVED_WORD.
14340 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14342 (grok_x_components): Do not inspect pending_inlines chain.
14344 * cp-tree.h (struct lang_identifier): Add rid_code entry.
14345 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14346 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14347 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14348 TIME_IDENTIFIER_FILEINFO): Kill.
14350 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
14351 single 32-bit word.
14352 * parse.y: Call do_pending_inlines unconditionally.
14353 reinit_parse_for_method is now snarf_method. fn.defpen is no
14354 longer necessary. Remove unnecessary <itype> annotation on
14355 SCOPE. Do not refer to end_of_file or struct pending_inline.
14356 * semantics.c (begin_inline_definitions): Call
14357 do_pending_inlines unconditionally.
14359 * lex.c: Remove all code now shared with C front end.
14360 Initialize cpplib properly if USE_CPPLIB. Put reserved words
14361 into the get_identifier table. Rewrite pragma handling to
14362 work with the registry. Move code to save tokens for later
14363 processing to spew.c.
14365 * spew.c: Rewrite everything in terms of token streams instead
14366 of text. Move routines here from lex.c / input.c as
14367 appropriate. GC-mark trees hanging off the pending inlines
14370 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14372 * NEWS: Mention that the named return value extension has been
14374 * cp-tree.h (original_result_rtx): Define.
14375 (TREE_REFERENCE_EXPR): Remove.
14376 (DECL_VPARENT): Likewise.
14377 (pushdecl_nonclass_level): Likewise.
14378 (store_return_init): Likewise.
14379 (reinit_lang_specific): Likewise.
14380 (genrtl_named_return_value): Change prototype.
14381 * decl.c (original_result_rtx): Remove.
14382 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
14383 Do not generate RTL for local variables here.
14384 (store_return_init): Remove.
14385 * semantics.c (genrtl_named_return_value): Simplify. Fold in
14387 (finish_named_return_value): Adjust accordingly. Warn that this
14388 extension is deprecated.
14389 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
14391 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14393 * pt.c (type_unification_real): Replace switch with if.
14394 (unify): Tsubst non-type parms before comparing.
14396 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14398 * error.c (dump_typename): New function, broken out of ...
14399 (dump_type): ... here. Use it.
14400 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
14402 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14404 * init.c (build_offset_ref): Deal with namespace scoped
14407 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14409 * class.c (resolve_address_of_overloaded_function): Add
14410 explanation message.
14411 * decl.c (define_case_label): Reformat explanation.
14412 * decl2.c (finish_static_data_member_decl): Likewise.
14413 (grokfield): Likewise.
14414 * friend.c (do_friend): Likewise.
14416 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
14418 * tree.c (walk_tree): Expose tail recursion.
14419 (walk_stmt_tree): New function.
14420 * cp-tree.h: Prototype walk_stmt_tree.
14421 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
14422 the BLOCKs directly. If a BLOCK has no variables after
14423 pruning, discard it.
14424 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
14425 restore the line number.
14427 2000-09-05 Mark Mitchell <mark@codesourcery.com>
14429 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
14430 (pt.o): Remove dependency on HTAB_H.
14431 * cp-tree.h: Include hashtab.h.
14432 (walk_tree): Change prototype.
14433 (walk_tree_without_duplicates): New function.
14434 * decl.c (check_default_argument): Use it.
14435 * optimize.c (remap_decl): Adjust calls to walk_tree.
14436 (copy_body): Likewise.
14437 (expand_calls_inline): Likewise.
14438 (calls_setjmp_p): Use walk_tree_without_duplicates.
14439 * pt.c: Don't include hashtab.h.
14440 (for_each_template_parm): Use walk_tree_without_duplicates.
14441 * semantics.c (finish-stmt_tree): Likewise.
14442 (expand_body): Likewise.
14443 * tree.c (walk_tree): Add additional parameter.
14444 (walk_tree_without_duplicates): New function.
14445 (count_trees): Use it.
14446 (verify_stmt_tree): Adjust call to walk_tree.
14447 (find_tree): Use walk_tree_without_duplicates.
14448 (no_linkage_check): Likewise.
14449 (break_out_target_exprs): Adjust call to walk_tree.
14450 (cp_unsave): Likewise.
14452 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14454 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
14455 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14456 * cp-tree.h (TYPE_BINFO): Adjust comment.
14457 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
14458 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14459 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14460 (TYPE_TEMPLATE_INFO): Likewise.
14461 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
14462 * class.c (push_nested_class): Likewise.
14463 * decl.c (lookup_name_real): Likewise.
14464 (grokdeclarator): Likewise.
14465 (grok_op_properties): Likewise.
14466 (xref_tag): Likewise.
14467 (xref_basetypes): Likewise.
14468 * decl2.c (constructor_name_full): Likewise.
14469 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
14470 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14471 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
14472 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14473 (dump_type_suffix): Likewise.
14474 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
14476 (get_aggr_from_typedef): Likewise.
14477 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
14478 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14479 (write_template_parm): Likewise.
14480 (write_template_template_parm): Check tree code instead of
14481 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14482 * method.c (build_overload_nested_name): Add
14483 BOUND_TEMPLATE_TEMPLATE_PARM.
14484 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
14485 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14486 * pt.c (convert_template_argument): Check tree code instead of
14487 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14488 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
14489 (for_each_template_parm): Adjust comment.
14490 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
14491 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14492 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
14493 template_args_equal to compare template template parameter cases.
14494 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14495 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
14497 * tree.c (copy_template_template_parm): Decide whether to create
14498 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
14499 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14500 (copy_tree_r): Likewise.
14501 * typeck.c (comptypes): Likewise. Check tree code instead of
14502 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14504 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
14506 * decl.c (finish_function): Move the code for handling functions
14507 marked with the constructor and destructor attributes inside the
14510 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14512 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
14514 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14516 * pt.c (lookup_template_class): Remove abort.
14517 * tree.c (get_type_decl): Allow error_mark_node.
14519 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14521 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
14524 2000-09-03 Mark Mitchell <mark@codesourcery.com>
14526 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
14529 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14531 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
14532 union tag mismatch error reporting.
14534 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14536 * call.c (build_scoped_method_call): Check it is not a namespace.
14538 2000-08-30 Jason Merrill <jason@redhat.com>
14540 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
14542 * tree.c (bot_manip): Check TREE_CONSTANT rather than
14543 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
14544 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
14546 * decl.c (start_function): Always call make_function_rtl.
14548 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14550 * semantics.c (prune_unused_decls): New function.
14551 (finish_stmt_tree): Call it via walk_tree.
14553 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14555 * class.c (build_secondary_vtable): Constify a char *.
14556 * decl.c (init_decl_processing): Initialize function_id_node,
14557 pretty_function_id_node, and func_id_node.
14558 * input.c (struct input_source): Constify 'str'.
14559 (feed_input): Constify first argument.
14560 * mangle.c (write_identifier): Constify argument.
14561 * pt.c (mangle_class_name_for_template): Constify argument.
14563 2000-08-29 Mark Mitchell <mark@codesourcery.com>
14565 * typeck.c (mark_addressable): Remove code that pokes around in
14568 2000-08-28 Jason Merrill <jason@redhat.com>
14570 * lex.c (file_name_nondirectory): Move to toplev.c.
14572 * cp-tree.h (LOCAL_CLASS_P): New macro.
14573 * class.c (finish_struct_1): Use it.
14575 2000-08-27 Alex Samuel <samuel@codesourcery.com>
14577 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
14578 (write_encoding): Pass another argument to write_name.
14579 (write_name): Add ignore_local_scope parameter. Fix handling of
14581 (write_nested_name): Use write_unqualified_name.
14582 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
14583 (write_template_prefix): Use write_unqualified_name.
14584 (write_component): Remove.
14585 (write_local_name): Add parameter. Use direct local entity to
14586 discriminator calculation.
14587 (write_class_enum_type): Pass another argument to write_name.
14588 (write_template_template_arg): Likewise.
14589 (make_guard_variable): Likewise.
14591 2000-08-27 Jason Merrill <jason@redhat.com>
14593 * decl.c (pushdecl): Matching decls for local externs are found in
14594 the current level. Propagate linkage information from previous
14597 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
14599 * ir.texi (Expressions): Fix typo.
14601 2000-08-25 Greg McGary <greg@mcgary.org>
14603 * tree.c (init_tree): Use ARRAY_SIZE.
14605 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14607 * error.c (cp_tree_printer): Rework.
14609 2000-08-25 Mark Mitchell <mark@codesourcery.com>
14611 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14613 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14614 (cp-demangle.o): Remove target.
14615 (dyn-string.o): Likewise.
14617 * decl.c (grokfndecl): Require that `main' return an `int'.
14618 * mangle.c (write_encoding): Don't mangle return types for
14619 conversion functions.
14621 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14623 * error.c (tree_formatting_info): New data type.
14624 (tree_being_formatted): New macro.
14625 (tree_formatting_flags): Likewise.
14626 (put_whitespace): Likewise.
14627 (print_tree_identifier): Likewise.
14628 (print_identifier): Likewise.
14629 (cp_tree_printer, print_function_argument_list, print_declaration,
14630 print_expression, print_function_declaration,
14631 print_function_parameter, print_type, print_cv_qualifier): New
14633 (init_error): Initialize lang_printer.
14635 2000-08-24 Jason Merrill <jason@redhat.com>
14637 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14638 adjustment necessary.
14640 2000-08-24 Greg McGary <greg@mcgary.org>
14642 * cp-tree.h (MAIN_NAME_P): Remove macro.
14644 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
14646 * error.c (print_instantiation_context): Don't forget to flush the
14649 2000-08-23 Jason Merrill <jason@redhat.com>
14651 * typeck.c (build_ptrmemfunc): Save the input pmf.
14653 * method.c (process_modifiers): Use same_type_p.
14655 2000-08-23 Mark Mitchell <mark@codesourcery.com>
14657 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14658 * mangle.c (write_function_type): Change prototype.
14659 (write_encoding): Don't mangle return types for
14660 constructors or destructors.
14661 (write_type): Adjust call to write_function_type.
14662 * pt.c (instantiate_template): Instantiate alternate entry points
14663 when instantiating the main function.
14665 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14667 * error.c (cp_print_error_function): Don't use embedded '\n' in
14670 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14672 * decl.c (init_decl_processing): Remove bogus initialization.
14673 * error.c (lang_print_error_function): Restore here.
14674 (init_error): Initialize print_error_function.
14676 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14678 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14680 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
14682 * Makefile.in (error.o): Depends on diagnostic.h
14684 * cp-tree.h (problematic_instantiation_changed,
14685 record_last_problematic_instantiation, current_instantiation,
14686 print_instantiation_context): Declare.
14687 (maybe_print_template_context): Remove.
14689 * decl.c (init_decl_processing): Set print_error_function to NULL.
14690 (lang_print_error_function): Remove, since we're using a new
14693 * error.c: #include diagnostic.h
14694 (function_category): New function.
14695 (cp_diagnostic_starter): Likewise.
14696 (cp_diagnostic_finalizer): Likewise.
14697 (cp_print_error_function): Likewise.
14698 (maybe_print_instantiation_context): Likewise.
14699 (print_instantiation_full_context): Likewise.
14700 (print_instantiation_partial_context): Likewise.
14701 (print_instantiation_context): Define.
14702 (init_error): Initialize diagnostic pager and finalizer.
14704 * pt.c (problematic_instantiation_changed): Define.
14705 (record_last_problematic_instantiation): Likewise.
14706 (current_instantiation): Likewise.
14707 (maybe_print_template_context): Remove.
14708 (print_template_context): Likewise.
14709 (current_tinst_level): Make static to reflect Brendan Kehoe's
14710 change of 1995-04-13.
14711 (push_tinst_level): Call print_instantiation_context.
14713 2000-08-21 Nix <nix@esperi.demon.co.uk>
14715 * lang-specs.h: Do not process -o or run the assembler if
14718 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
14720 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14722 * decl2.c (lang_decode_option): Disable gettext attributes for
14725 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
14727 * lex.c (lang_init_options): Default diagnostic message maximum
14728 length to 80, when line-wrapping.
14730 2000-08-20 Mark Mitchell <mark@codesourcery.com>
14732 * class.c (build_vtbl_initializer): Clear the entire
14733 vtbl_init_data. Start keeping track of the functions for which we
14734 have created vcall offsets here.
14735 (dfs_build_vcall_offset_vtbl_entries): Remove.
14736 (build_vcall_offset_vtbl_entries): Reimplement.
14737 (add_vcall_offset_vtbl_entries_r): New function.
14738 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
14739 computing when vcall offsets are necessary.
14741 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14743 * decl.c (member_function_or_else): Use cp_error ... %T.
14744 (grokdeclarator): Likewise.
14745 (start_method): Likewise.
14746 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14748 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14750 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14753 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14755 * cp-tree.h (PTRMEM_OK_P): New macro.
14756 (itf_ptrmem_ok): New enumeration value.
14757 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14758 argument. Diagnose implicit pointer to member.
14759 (instantiate_type): Don't diagnose implicit pointer to member
14760 here. Pass itf_ptrmem_ok if ok. Adjust calls to
14761 resolve_address_of_overloaded_function.
14762 * init.c (build_offset_ref): Set PTRMEM_OK_P.
14763 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14764 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14765 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14766 (build_unary_op): Deal with single non-static member in
14769 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14771 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14773 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14775 * cp-tree.h (enum_name_string): Remove prototype.
14776 (report_case_error): Remove prototype.
14777 * cp/typeck2.c (enum_name_string): Remove.
14778 (report_case_error): Remove.
14779 * error.c (dump_expr): Deal with enum values directly.
14780 Correctly negate integer constant.
14782 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14784 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14785 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14786 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14787 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14788 (__cxa_vec_new): Use __cxa_vec_new2.
14789 (__cxa_vec_delete): Use __cxa_vec_delete2.
14791 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14793 * vec.cc (__cxa_vec_new): Set "C" linkage.
14794 (__cxa_vec_ctor): Likewise.
14795 (__cxa_vec_cctor): Likewise.
14796 (__cxa_vec_dtor): Likewise.
14797 (__cxa_vec_delete): Likewise.
14798 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
14799 (__cxa_vec_ctor): Likewise.
14800 (__cxa_vec_cctor): Likewise.
14801 (__cxa_vec_dtor): Likewise.
14802 (__cxa_vec_delete): Likewise.
14804 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14806 * class.c (instantiate_type): Reinstate local variable
14807 deleted in previous change.
14809 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
14812 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14814 * cp-tree.h (instantiate_type_flags): New enumeration.
14815 (instantiate_type): Change parameter.
14816 * class.c (instantiate_type): Adjust prototype. Adjust.
14817 * call.c (standard_conversion): Adjust instantiate_type call.
14818 (reference_binding): Likewise.
14819 (build_op_delete_call): Likewise.
14820 (convert_like_real): Likewise.
14821 * cvt.c (cp_convert_to_pointer): Likewise.
14822 (convert_to_reference): Likewise.
14823 * pt.c (convert_nontype_argument): Likewise.
14824 * typeck.c (build_binary_op): Likewise.
14825 (build_ptrmemfunc): Likewise.
14826 (convert_for_assignment): Likewise.
14828 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14830 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
14831 (current_aggr): Define.
14832 * decl.c (grokdeclarator): Make sure a friend class is an
14833 elaborated type specifier.
14834 * parse.y (current_aggr): Remove static definition.
14835 (cp_parse_init): Adjust.
14836 (structsp): Clear and restore current_aggr.
14837 (component_decl_list): Clear current_aggr.
14839 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
14840 aggregate tag on the typename's context.
14842 * pt.c (tsubst_friend_class): Return error_mark_node, if
14843 parms becomes NULL.
14844 (instantiate_class_template): Ignore error_mark_node friend types.
14846 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
14848 * cvt.c (warn_ref_binding): New static function, broken out of ...
14849 (convert_to_reference): ... here. Use it.
14851 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14853 * parse.y (template_arg): Add rule for template qualified with
14856 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14858 * decl2.c (add_function): Reorganize.
14859 (arg_assoc): Do not consider function template decls.
14861 2000-08-11 Jason Merrill <jason@redhat.com>
14863 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14866 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14868 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14869 (lookup_nested_tag): Likewise.
14871 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14874 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14876 * parse.y (named_complex_class_head_sans_basetype): Remove
14879 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14881 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14882 explicit TEMPLATE_ID_EXPR args.
14883 (build_expr_from_tree, case CALL_EXPR): Likewise.
14885 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14887 * decl.c (check_tag_decl): Diagnose typename's which don't
14890 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
14892 * init.c (build_aggr_init): Reject bogus array initializers
14895 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14897 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14899 * cp/tinfo.cc (__dynamic_cast): Likewise.
14900 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
14902 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14904 * cvt.c (convert_to_pointer_force): Fix error message when
14905 attempting to cast from ambiguous base.
14907 2000-08-08 Jason Merrill <jason@redhat.com>
14909 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14910 (tsubst_template_arg_vector): Likewise.
14912 * decl2.c (build_anon_union_vars): Choose the largest field; don't
14913 assume that one will be as large as the union.
14915 2000-08-07 Kazu Hirata <kazu@hxi.com>
14917 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14918 * decl.c (pop_labels): Likewise.
14920 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
14922 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14924 (__pointer_to_member_type_info): Likewise.
14925 (__base_class_info): Likewise.
14926 (__class_type_info): Likewise.
14927 (__si_class_type_info): Likewise.
14928 (__vmi_class_type_info): Likewise.
14929 * tinfo.cc (__si_class_type_info::__do_find_public_src):
14930 Changed member names to match specifications.
14931 (__vmi_class_type_info::__do_find_public_src): Likewise.
14932 (__si_class_type_info::__do_dyncast): Likewise.
14933 (__vmi_class_type_info::__do_dyncast): Likewise.
14934 (__si_class_type_info::__do_upcast): Likewise.
14935 (__vmi_class_type_info::__do_upcast): Likewise.
14936 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
14937 (__pbase_type_info::__pointer_catch): Likewise.
14938 (__pointer_type_info::__pointer_catch): Likewise.
14939 (__pointer_to_member_type_info::__pointer_catch): Likewise.
14941 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
14943 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14944 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14945 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
14947 2000-08-04 Mark Mitchell <mark@codesourcery.com>
14949 * cp-tree.h (add_method): Change prototype.
14950 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
14951 Don't double the size of the method vector in the error case.
14952 (handle_using_decl): Adjust call to add_method.
14953 (add_implicitly_declared_members): Likewise.
14954 (clone_function_decl): Likewise.
14955 * decl2.c (check_classfn): Likewise.
14956 * semantics.c (finish_member_declaration): Likewise.
14958 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
14960 * decl.c (flag_isoc94): New variable.
14962 2000-08-02 Jason Merrill <jason@redhat.com>
14964 * pt.c (do_type_instantiation): Add complain parm; don't complain
14965 if called recursively.
14966 * cp-tree.h, parse.y: Adjust.
14968 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
14970 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14971 -Wno-strict-prototypes.
14973 * g++spec.c: Adjust type of second argument to
14974 lang_specific_driver, and update code as necessary.
14976 * cp-tree.h: Don't prototype min_precision here.
14977 (my_friendly_assert): Cast expression to void.
14978 * semantics.c (do_poplevel): Initialize scope_stmts.
14980 2000-08-02 Mark Mitchell <mark@codesourcery.com>
14982 * cp-tree.h (DECL_NEEDED_P): Tweak.
14984 2000-07-28 Jason Merrill <jason@redhat.com>
14986 * lang-specs.h: Use %i in rule for .ii files.
14988 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
14990 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14992 2000-07-30 Mark Mitchell <mark@codesourcery.com>
14994 Allow indirect primary bases.
14995 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
14997 (CLASSTYPE_VFIELD_PARENT): Remove.
14998 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14999 (BINFO_PRIMARY_BINFO): Remove.
15000 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15001 (BINFO_VBASE_PRIMARY_P): Likewise.
15002 (BINFO_PRIMARY_BASE_OF): New macro.
15003 (BINFO_INDIRECT_PRIMARY_P): Likewise.
15004 (get_primary_binfo): New function.
15005 * decl.c (lang_mark_tree): Make lang_type::primary_base.
15006 * class.c (vcall_offset_data_s): Rename to ...
15007 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
15008 and add ctor_vtbl_p.
15009 (get_derived_offset): Use get_primary_binfo.
15010 (dfs_mark_primary_bases): Adjust handling of virtual primary
15012 (mark_primary_bases): Likewise.
15013 (set_primary_base): Take a binfo, not an integer, as a
15014 representation of the primary base.
15015 (indirect_primary_base_p): Remove.
15016 (determine_primary_base): Adjust for indirect primary bases.
15017 (dfs_find_final_overrider): Fix typo in coment.
15018 (update_vtable_entry_for_fn): Use get_primary_binfo.
15019 (layout_nonempty_base_or_field): Tweak.
15020 (build_base_fields): Adjust for new primary base semantics.
15021 (dfs_propagate_binfo_offsets): Remove.
15022 (propagate_binfo_offsets): Rewrite.
15023 (dfs_set_offset_for_shared_vbases): Remove.
15024 (layout_virtual_bases): Don't use it.
15025 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15027 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15028 CLASSTYPE_VFIELD_PARENT.
15029 (dfs_get_primary_binfo): New function.
15030 (get_primary_binfo): Likewise.
15031 (dump_class_hierarchy_r): Tweak printing of primary bases.
15032 (build_vtbl_initializer): Fix typo in comments. Use
15034 (build_vcall_and_vbase_vtbl_entries): Likewise.
15035 (build_vbaes_offset_vtbl_entries): Likewise.
15036 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15037 BV_VCALL_INDEX to handle indirect primary bases.
15038 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15039 (build_rtti_vtbl_entries): Likewise.
15040 * search.c (get_shared_vbase_if_not_primary): Tweak.
15041 (find_vbase_instance): Likewise.
15042 (binfo_for_vtable): Simplify.
15043 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15044 (make_binfo): Make it have 11 entries.
15046 2000-07-30 Alex Samuel <samuel@codesourcery.com>
15048 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15049 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15050 ascertaining primaryness.
15051 (G): Remove template_args.
15052 (decl_is_template_id): New function.
15053 (write_encoding): Use decl_is_template_id.
15054 (write_name): Likewise. Handle type_decls. Get main variant of
15056 (write_nested_name): Likewise.
15057 (write_prefix): Likewise.
15058 (write_template_prefix): Likewise.
15059 (write_special_name_constructor): Remove defunct production from
15061 (write_bare_function_type): Remove comment about absent parameter.
15062 (write_template_template_arg): Add missing grammar production to
15065 2000-07-27 Jason Merrill <jason@redhat.com>
15067 * decl.c (duplicate_decls): If common_type produces a non-typedef
15068 type for a typedef, just use the old type.
15070 2000-07-27 Mark Mitchell <mark@codesourcery.com>
15072 * cp-tree.h (function_depth): Declare.
15073 (verify_stmt_tree): Likewise.
15074 (find_tree): Likewise.
15075 * decl.c (function_depth): Give it external linkage.
15076 * optimize.c (optimize_function): Increment and decrement it.
15077 * tree.c (verify_stmt_tree_r): New function.
15078 (verify_stmt_tree): Likewise.
15079 (find_tree_r): Likewise.
15080 (find_tree): Likewise.
15082 2000-07-27 Jason Merrill <jason@redhat.com>
15084 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15086 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15088 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15090 * decl.c (start_cleanup_fn): Mark the function as `inline'.
15091 * decl2.c (get_guard): Call cp_finish_decl, not
15092 rest_of_decl_compilation, for local guards.
15093 * lex.c (do_identifier): Remove unused variable.
15095 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
15097 * parse.y: Add missing ';'.
15099 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15101 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15104 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15106 Kill strict_prototype. Backwards compatibility only for
15107 non NO_IMPLICIT_EXTERN_C systems.
15108 * cp-tree.h (flag_strict_prototype): Remove.
15109 (strict_prototype): Remove.
15110 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15111 * decl.c (maybe_push_to_top_level): Adjust.
15112 (pop_from_top_level): Adjust.
15113 (decls_match): Only allow sloppy parm matching for ancient
15115 (init_decl_processing): Adjust.
15116 (grokdeclarator): Adjust.
15117 * decl2.c (flag_strict_prototype): Remove.
15118 (strict_prototype): Remove.
15119 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15120 (lang_f_options): Remove "strict-prototype".
15121 (unsupported-options): Add "strict-prototype".
15122 * lex.c (do_identifier): Adjust.
15123 (do_scoped_id): Adjust.
15124 * parse.y (empty_parms): Adjust.
15125 * class.c (push_lang_context): Adjust.
15126 (pop_lang_context): Adjust.
15127 * typeck.c (comp_target_parms): Adjust.
15129 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15131 * decl.c (poplevel): Deal with anonymous variables at for scope.
15132 (maybe_inject_for_scope_var): Likewise.
15134 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
15136 * decl.c: Remove all signal handling code, now done in toplev.c.
15138 2000-07-23 Mark Mitchell <mark@codesourcery.com>
15140 * decl.c (make_rtl_for_nonlocal_decl): Rework.
15142 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15145 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
15147 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15148 Define my_friendly_assert and my_friendly_abort as macros
15149 which may call friendly_abort. Prototype friendly abort, not
15150 my_friendly_abort or my_friendly_assert.
15151 * decl.c (signal_catch): Report the signal caught in the error
15152 message. Call fatal directly.
15153 * typeck2.c (ack, my_friendly_assert): Delete.
15154 (my_friendly_abort): Rename to friendly_abort. Expect file,
15155 line, and function parameters. Report the abort code, then
15156 call fancy_abort. Do not mask an abort if errors have
15159 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
15161 * typeck.c (comp_target_parms): Remove obsolete parameter.
15162 (comp_target_types): Adjust.
15164 2000-07-17 Jason Merrill <jason@redhat.com>
15166 * typeck.c (mark_addressable): Never set TREE_USED.
15167 * call.c (build_call): Don't abort on calls to library functions
15168 that have been declared normally.
15170 * typeck.c (build_binary_op): Fix grammar in warning.
15172 * exception.cc (__eh_free): Fix prototype.
15174 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15176 * decl.c (pushdecl): Handle seeing an OVERLOAD in
15177 IDENTIFIER_NAMESPACE_VALUE.
15179 2000-07-16 Mark Mitchell <mark@codesourcery.com>
15181 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15182 * method.c (use_thunk): Correct handling of vcall offsets.
15184 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
15186 * .cvsignore: parse.h and parse.c have no cp- prefix.
15188 2000-07-13 Mark Mitchell <mark@codesourcery.com>
15190 * .cvsignore: New file.
15192 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
15194 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
15196 2000-07-12 Mark Mitchell <mark@codesourcery.com>
15198 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15200 * parse.h: Likewise.
15202 2000-07-11 Mark Mitchell <mark@codesourcery.com>
15204 * class.c (layout_class_type): Add pointers to virtual bases after
15205 base classes under the old ABI.
15207 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
15209 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15210 (finish_continue_stmt): Likewise.
15211 (begin_for_stmt): Remove call to note_level_for_for.
15212 (finish_goto_stmt): Change call from build_min_nt
15214 (finish_expr_stmt): Likewise.
15215 (begin_if_stmt): Likewise.
15216 (begin_while_stmt): Likewise.
15217 (finish_while_stmt): Likewise.
15218 (finish_return_stmt): Likewise.
15219 (begin_for_stmt): Likewise.
15220 (finish_for_stmt): Likewise.
15221 (finish_break_stmt): Likewise.
15222 (begin_switch_stmt): Likewise.
15223 (finish_case_label): Likewise.
15224 (genrtl_try_block): Likewise.
15225 (begin_try_block): Likewise.
15226 (begin_handler): Likewise.
15227 (begin_compound_stmt): Likewise.
15228 (finish_asm_stmt): Likewise.
15229 (finish_label_stmt): Likewise.
15230 (add_decl_stmt): Likewise.
15231 (finish_subobject): Likewise.
15232 (finish_decl_cleanup): Likewise.
15233 (finish_named_return_value): Likewise.
15234 (setup_vtbl_ptr): Likewise.
15235 (add_scope_stmt): Likewise.
15236 * decl.c (finish_constructor_body): Likewise.
15237 (finish_destructor_body): Likewise.
15238 * optimize.c (copy_body_r): Likewise.
15239 (initialize_inlined_parameters): Likewise.
15240 (declare_return_variable): Likewise.
15241 (expand_call_inline): Likewise.
15243 2000-07-10 Jakub Jelinek <jakub@redhat.com>
15245 * semantics.c (expand_body): Sync interface information
15246 at the end of function body expansion.
15248 2000-07-09 Jason Merrill <jason@redhat.com>
15250 * init.c (build_new_1): Bail early if the call to new fails.
15252 * decl.c (compute_array_index_type): Check specifically for
15253 an INTEGER_CST, not just TREE_CONSTANT.
15255 * decl.c (duplicate_decls): Don't call duplicate_decls on
15256 the DECL_TEMPLATE_RESULT.
15257 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15260 * error.c (dump_template_bindings): Don't crash if we had an
15261 invalid argument list.
15263 * typeck.c (c_expand_start_case): Do narrowing here.
15264 * semantics.c (finish_switch_cond): Not here.
15266 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
15268 * parse.y (asm_clobbers): Do string concatenation.
15270 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15272 * decl.c (pushtag): Don't put local classes in template functions
15273 on the local_classes list.
15275 2000-07-04 Scott Snyder <snyder@fnal.gov>
15277 * decl2.c (get_guard): Add missing return for old ABI local
15280 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15282 * cp-tree.h (char_type_p): New function.
15283 * decl.c (init_decl_processing): Don't initialize
15284 signed_wchar_type_node or unsigned_wchar_type_node.
15285 (complete_array_type): Handle brace-enclosed string-constants.
15286 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15287 * tree.c (char_type_p): New function.
15288 * typeck2.c (digest_init): Use char_type_p.
15290 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15292 * pt.c (tsubst): Don't layout type, if it's error_mark.
15294 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15296 * pt.c (instantiate_pending_templates): Reset template level.
15298 2000-07-05 Jason Merrill <jason@redhat.com>
15300 * call.c (joust): Don't complain about `operator char *()' beating
15301 `operator const char *() const'.
15303 2000-07-04 scott snyder <snyder@fnal.gov>
15304 Jason Merrill <jason@redhat.com>
15306 * repo.c (repo_get_id): Handle the case where a class with virtual
15307 bases has a null TYPE_BINFO_VTABLE.
15309 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
15310 Jason Merrill <jason@redhat.com>
15312 * parse.y (member_init): Just pass in the type.
15313 * init.c (expand_member_init): Handle getting a type.
15315 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15316 Jason Merrill <jason@redhat.com>
15318 * decl.c (finish_function): Warn if a function has no return
15320 Suggested by Andrew Koenig.
15321 * typeck.c (check_return_expr): Do set current_function_returns_value
15322 if we got an error_mark_node.
15324 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15326 * decl2.c (push_decl_namespace): Push the original namespace.
15328 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15330 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15331 * semantics.c (begin_class_definition): Clear it.
15333 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
15335 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15336 (genrtl_expr_stmt): Likewise.
15337 (genrtl_decl_stmt): Likewise.
15338 (genrtl_if_stmt): Likewise.
15339 (genrtl_while_stmt): Likewise.
15340 (genrtl_do_stmt): Likewise.
15341 (genrtl_return_stmt): Likewise.
15342 (genrtl_for_stmt): Likewise.
15343 (genrtl_break_stmt): Likewise.
15344 (genrtl_continue_stmt): Likewise.
15345 (genrtl_scope_stmt): Likewise.
15346 (genrtl_switch_stmt): Likewise.
15347 (genrtl_case_label): Likewise.
15348 (genrtl_begin_compound_stmt): Likewise.
15349 (genrtl_finish_compound_stmt): Likewise.
15350 (genrtl_compound_stmt): Likewise.
15351 (genrtl_asm_stmt): Likewise.
15353 * init.c (begin_init_stmts): Remove call to
15354 genrtl_begin_compound_stmt.
15355 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15357 * semantics.c (lang_expand_stmt): Changed call to
15358 genrtl_compound_stmt to ignore return value.
15360 2000-07-02 Mark Mitchell <mark@codesourcery.com>
15362 * mangle.c (canonicalize_for_substitution): Return the canonical
15365 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15367 * typeck.c (commonparms): Remove obstack manipulations.
15369 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
15371 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15373 * Makefile.in (OBJS): Added ../c-semantics.o.
15374 (OBJDEPS): Likewise.
15376 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
15378 (struct stmt_tree): Added comment.
15379 (current_function_name_declared): Removed.
15380 (stmts_are_full_exprs_p): Likewise.
15381 (genrtl_do_pushlevel): Likewise.
15382 (genrtl_clear_out_block): Likewise.
15383 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
15384 (DECL_ANON_UNION_ELEMS): Likewise.
15385 (emit_local_var): Likewise.
15386 (make_rtl_for_local_static): Likewise.
15387 (do_case): Likewise.
15388 (expand_stmt): Likewise.
15389 (genrtl_decl_cleanup): Likewise.
15390 (c_expand_asm_operands): Likewise.
15391 (c_expand_return): Likewise.
15392 (c_expand_start_case): Likewise.
15394 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
15395 (emit_local_var): Likewise.
15396 (initialize_local_var): Change reference to
15397 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15398 Change reference to stmts_are_full_exprs_p to
15399 current_stmt_tree->stmts_are_full_exprs_p.
15400 (push_cp_function_context): Likewise.
15402 * expect.c (expand_throw): Change reference to
15403 stmts_are_full_exprs_p.
15405 * init.c (build_aggr_init): Change reference to
15406 stmts_are_full_exprs_p.
15407 (build_vec_init): Likewise.
15409 * optimize.c (maybe_clone_body): Change reference to
15410 current_function_name_declared to
15411 cp_function_chain->name_declared.
15413 * pt.c (instantiate_decl): Change reference to
15414 current_function_name_declared to
15415 cp_function_chain->name_declared.
15417 * semantics.c (expand_cond): Moved declaration to c-common.h.
15418 (genrtl_do_pushlevel): Moved to c-semantics.c.
15419 (genrtl_clear_out_block): Likewise.
15420 (genrtl_goto_stmt): Likewise.
15421 (genrtl_expr_stmt): Likewise.
15422 (genrtl_decl_stmt): Likewise.
15423 (gerntl_if_stmt): Likewise.
15424 (genrtl_while_stmt): Likewise.
15425 (genrtl_do_stmt): Likewise.
15426 (genrtl_return_stmt): Likewise.
15427 (genrtl_for_stmt): Likewise.
15428 (genrtl_break_stmt): Likewise.
15429 (genrtl_continue_stmt): Likewise.
15430 (genrtl_scope_stmt): Likewise.
15431 (genrtl_switch_stmt): Likewise.
15432 (genrtl_case_label): Likewise.
15433 (genrtl_begin_compound_stmt): Likewise.
15434 (genrtl_finish_compound_stmt): Likewise.
15435 (genrtl_compound_stmt): Likewise.
15436 (genrtl_asm_stmt): Likewise.
15437 (genrtl_decl_cleanup): Likewise.
15438 (expand_cond): Likewise.
15439 (expand_stmt): Renamed to ...
15440 (lang_expand_stmt): ... this.
15441 (lang_expand_expr_stmt): Initialize.
15442 (set_current_function_name_declared): Likewise.
15443 (stmts_are_full_exprs_p): Likewise.
15444 (current_function_name_declared): Likewise.
15445 (anon_aggr_type_p): Likewise.
15446 (do_poplevel): Change reference to
15447 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15448 Change reference to stmts_are_full_exprs_p to
15449 current_stmt_tree->stmts_are_full_exprs_p.
15450 (add_tree): Likewise.
15451 (finish_expr_stmt): Likewise.
15452 (prep_stmt): Likewise.
15453 (lang_expand_stmt): Likewise.
15454 (begin_compound_stmt): Change reference to
15455 current_function_name_declared to
15456 cp_function_chain->name_declared and call to
15457 current_function_name_declared().
15458 (setup_vtbl_ptr): Likewise.
15459 (genrtl_do_poplevel): Removed.
15461 2000-06-30 Jason Merrill <jason@redhat.com>
15463 * init.c (init_init_processing): Go back to aligning like
15464 double_type_node for old ABI.
15465 (get_cookie_size): Make cookie larger if we get a type that needs
15467 (build_vec_delete): Call it.
15469 * typeck.c (qualify_type_recursive): New fn.
15470 (composite_pointer_type): Use it.
15471 (build_binary_op): Use composite_pointer_type.
15473 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
15474 Jason Merrill <jason@redhat.com>
15476 * typeck.c (check_return_expr): Don't complain about returning
15477 NULL from operator new if -fcheck-new.
15478 * cp-tree.h: Declare flag_check_new here.
15479 * init.c: Not here.
15481 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15483 * mangle.c (find_substitution): Use same_type_p.
15484 (write_encoding): Don't check for substitutions.
15486 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15488 * parse.y (expr_no_comma_rangle): New non-terminal.
15489 (template_parm): Use it for default parameter case.
15490 (template_arg): Use it.
15491 (expr_no_commas): Remove commented out undefined extensions.
15492 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15493 * parse.h, parse.c: Rebuilt.
15495 2000-06-30 Mark Mitchell <mark@codesourcery.com>
15497 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
15498 (finish_asm_stmt): Do it here, instead.
15500 * cp-tree.h (ridpointers): Don't declare.
15501 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
15502 (record_builtin_java_type): Likewise.
15503 (init_decl_processing): Likewise.
15504 * lex.c: Move inclusion of lex.h.
15505 (ridpointers): Don't define.
15506 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
15508 * lex.h (enum rid): Rename to ...
15509 (enum cp_rid): ... this.
15510 (ridpointers): Don't declare.
15511 * parse.y: Move inclusion of lex.h.
15512 * parse.c: Regenerated.
15513 * spew.c: Move inclusion of lex.h.
15515 * cp-tree.h (struct language_function): Remove temp_name_counter.
15516 (temp_name_counter): Remove.
15517 (get_temp_name): Change prototype.
15518 (get_guard): New function.
15519 (get_guard_cond): Likewise.
15520 (set_guard): Likewise.
15521 * cvt.c (build_up_reference): Adjust call to get_temp_name.
15522 * decl.c (expand_static_init): Use get_guard and friends to
15523 implement guard variables.
15524 * decl2.c (get_temp_name): Assume that the variables created are
15526 (get_sentry): Rename to ...
15527 (get_guard): ... this. Implement new ABI guard variables.
15528 (get_guard_bits): New function.
15529 (get_guard_cond): Likewise.
15530 (set_guard): Likewise.
15531 (start_static_initialization_or_destruction): Use them.
15532 (do_static_initialization): Replace sentry with guard throughout.
15533 (do_static_destruction): Likewise.
15534 * init.c (create_temporary_var): Add comment.
15536 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15538 * mangle.c (find_substitution): Use same_type_p.
15539 (write_encoding): Don't check for substitutions.
15541 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15543 * parse.y (expr_no_comma_rangle): New non-terminal.
15544 (template_parm): Use it for default parameter case.
15545 (template_arg): Use it.
15546 (expr_no_commas): Remove commented out undefined extensions.
15547 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15548 * parse.h, parse.c: Rebuilt.
15550 2000-06-29 Mark Mitchell <mark@codesourcery.com>
15552 * cp-tree.h (flag_const_strings): Remove.
15553 (warn_parentheses): Likewise.
15554 (warn_format): Likewise.
15555 (common_type): Likewise.
15556 (default_conversion): Likewise.
15557 (build_binary_op): Likewise.
15558 (cp_build_binary_op): New macro.
15559 * call.c (build_new_op): Use cp_build_binary_op instead of
15561 * class.c (build_vtable_entry_ref): Likewise.
15562 * decl.c (expand_static_init): Likewise.
15563 (compute_array_index_type): Likewise.
15564 (build_enumerator): Likewise.
15565 * decl2.c (delete_sanity): Likewise.
15566 (start_static_initialization_or_destruction): Likewise.
15567 * error.c (dump_type_suffix): Likewise.
15568 * init.c (resolve_offset_ref): Likewise.
15569 (build_new): Likewise.
15570 (build_new_1): Likewise.
15571 (build_vec_delete_1): Likewise.
15572 (build_vec_init): Likewise.
15573 (build_delete): Likewise.
15574 * rtti.c (synthesize_tinfo_fn): Likewise.
15575 (synthesize_tinfo_var): Likewise.
15576 * search.c (expand_upcast_fixups): Likewise.
15577 (fixup_all_virtual_upcast_offsets): Likewise.
15578 * typeck.c (build_array_ref): Likewise.
15579 (get_member_function_from_ptrfunc): Likewise.
15580 (build_binary_op): Add parameter.
15581 (pointer_int_sum): Use cp_build_binary_op.
15582 (pointer_diff): Likewise.
15583 (build_modify_expr): Likewise.
15584 (get_delta_difference): Likewise.
15585 (build_ptrmemfunc): Likewise.
15587 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
15589 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
15590 * decl.c (create_implicit_typedef): Adjust.
15591 * decl2.c (build_artificial_parm): Adjust.
15592 * method.c (implicitly_declare_fn): Adjust.
15593 * pt.c (push_inline_template_parms_recursive): Adjust.
15594 (process_template_parm): Adjust.
15595 (overloaded_template_name): Adjust.
15596 * semantics.c (finish_template_template_parm): Adjust.
15598 2000-06-28 Mark Mitchell <mark@codesourcery.com>
15600 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15601 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
15602 where to emit thunks.
15603 (build_vtt): Adjust call to build_vtt_inits.
15604 (build_vtt_inits): Add parameter to indicate whether or not
15605 sub-VTTs for virtual bases should be included. Adjust handling of
15606 construction vtables.
15607 (get_matching_base): New function.
15608 (dfs_build_vtt_inits): Rename to ...
15609 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15610 construction vtables.
15611 (dfs_fixup_binfo_vtbls): Likewise.
15612 (build_ctor_vtbl_groups): Build construction vtables for virtual
15614 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15615 to build construction vtbls.
15616 (dfs_accumulate_vtbl_inits): Adjust handling of
15617 construction vtables.
15619 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15622 2000-06-27 Mark Mitchell <mark@codesourcery.com>
15624 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15626 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15628 * search.c (hides): Remove.
15629 (is_subobject_of_p): Add most_derived parameter. Use
15631 (lookup_field_queue_p): Adjust.
15632 (lookup_field_r): Adjust.
15634 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15636 * decl2.c (handle_class_head): Bash typedefs to the type's main
15639 2000-06-25 Mark Mitchell <mark@codesourcery.com>
15641 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15642 (begin_global_stmt_expr): ... this.
15643 (genrtl_finish_stmt_expr): Rename to ...
15644 (finish_global_stmt_expr): ... this.
15645 * init.c (begin_init_stmts): Adjust calls.
15646 (finish_init_stmts): Likewise.
15647 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15648 (begin_global_stmt_expr): ... this.
15649 (genrtl_finish_stmt_expr): Rename to ...
15650 (finish_global_stmt_expr): ... this.
15652 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15654 * search.c (lookup_member): Fix typo in comment.
15656 2000-06-24 Jason Merrill <jason@redhat.com>
15658 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15659 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15661 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15663 * parse.y (complex_direct_notype_declarator): Support global_scope.
15664 * Makefile.in: Adjust conflict count.
15666 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15668 * parse.y (template_arg): Convert TEMPLATE_DECL
15669 that is a template template parameter to
15670 TEMPLATE_TEMPLATE_PARM here.
15672 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15673 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15674 (copy_template_template_parm): Adjust prototype.
15675 * decl.c (grokdeclarator): Remove dead code.
15676 * pt.c (process_template_parm): Tidy.
15677 (lookup_template_class): Construct nodes in
15678 copy_template_template_parm.
15679 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15680 lookup_template_class. Use TYPE_TI_TEMPLATE.
15681 * tree.c (copy_template_template_parm): Add NEWARGS
15683 (mapcar): Adjust call to copy_template_template_parm.
15684 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15685 * method.c (build_template_template_parm_names): Change error
15686 code to avoid compilation warning.
15688 * gxxint.texi: Document template template parameter
15691 2000-06-21 Alex Samuel <samuel@codesourcery.com>
15693 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15694 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15695 (cp-demangle.o): New rule.
15696 (dyn-string.o): Likewise.
15697 * inc/cxxabi.h (__cxa_demangle): New declaration.
15699 2000-06-22 Mark Mitchell <mark@codesourcery.com>
15701 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15702 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15703 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
15704 a tree, not an int.
15705 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15706 (make_thunk): Change prototype.
15707 (emit_thunk): Rename to use_thunk.
15708 (mangle_thunk): Change prototype.
15709 * class.c (get_derived_offset): Simplify.
15710 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15711 BV_GENERATE_THUNK_WITH_VTABLE_P.
15712 (build_primary_vtable): Simplify.
15713 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15714 (dfs_find_base): Remove.
15715 (update_vtable_entry_for_fn): Correct bug in finding the base
15716 where a virtual function was first declared. Figure out whether
15717 or not to emit a vcall-thunk with the vtables in which it appears.
15718 Correct logic for deciding whether to use an ordinary thunk, or a
15720 (finish_struct_1): Remove unnecssary code.
15721 (build_vtbl_initializer): Use ssize_int for the running counter of
15723 (build_vtbl_initializer): Only use vcall thunks where necessary.
15724 Mark thunks as needing to be emitted with their vtables, or not.
15725 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15726 indices. Use size_binop.
15727 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15728 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
15730 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15731 (build_vtable_entry): Mark thunks as needing to be emitted with
15732 their vtables, or not.
15733 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15734 * decl2.c (mark_vtable_entries): Use use_thunk instead of
15736 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
15738 * error.c (dump_expr): Use BV_FN.
15739 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15741 * method.c (make_thunk): Likewise.
15742 (emit_thunk): Rename to use_thunk. Allow callers to decide
15743 whether or not to actually emit the thunk. Adjust for changes in
15744 representation of vcall offsets.
15745 * search.c (dfs_get_pure_virtuals): Use BV_FN.
15746 * semantics.c (emit_associated_thunks): New function.
15747 (expand_body): Use it.
15748 * ir.texi: Adjust decriptions of thunks.
15750 2000-06-22 Jason Merrill <jason@redhat.com>
15752 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15753 (tsubst_friend_function): Copy it here.
15755 * decl.c (grok_op_properties): Fix typo.
15757 * decl2.c (delete_sanity): Clarify warning, avoid failure on
15760 * pt.c (check_explicit_specialization): Clarify error.
15762 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15763 an old OVERLOAD when we're declaring a non-function.
15764 (pushdecl, destroy_local_var): Check for error_mark_node.
15765 (warn_extern_redeclared_static): Also bail early if
15766 we're a CONST_DECL.
15767 (push_overloaded_decl): Ignore an old error_mark_node.
15769 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
15771 * call.c (build_x_va_arg): Check if in a template decl.
15772 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15774 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15776 * class.c (push_lang_context): TYPE_NAME gets you to the Java
15778 * decl.c (check_goto): Computed gotos assumed OK.
15780 2000-06-20 Jason Merrill <jason@redhat.com>
15782 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15783 for which we don't need to look for instantiations.
15785 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
15787 * parse.y (program): Always call finish_translation_unit.
15788 * parse.c, parse.h: Rebuilt.
15790 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
15792 * method.c: Don't include hard-reg-set.h.
15794 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15796 * rtti.c (get_base_offset): Cope when vbase field is in a base.
15798 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15800 * call.c (build_conditional_expr): Use VOID_TYPE_P.
15801 * cvt.c (cp_convert_to_pointer): Likewise.
15802 (convert_to_void): Likewise.
15803 * error.c (dump_expr): Likewise.
15804 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
15805 * init.c (build_delete): Likewise.
15806 * method.c (emit_thunk): Likewise.
15807 * optmize.c (declare_return_variable): Likewise.
15808 * rtti.c (get_tinfo_decl_dynamic): Likewise.
15809 (get_typeid): Likewise.
15810 (build_dynamic_cast_1): Likewise.
15811 * typeck.c (composite_pointer_type): Likewise.
15812 (common_type): Likewise.
15813 (build_indirect_ref): Likewise.
15814 (build_binary_op): Likewise.
15815 (build_x_compound_expr): Likewise.
15816 (check_return_expr): Likewise.
15817 * typeck2.c (add_exception_specifier): Likewise.
15819 * mangle.c (write_method_parms): Use direct comparison for end
15822 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
15824 * cp-tree.h (genrtl_try_block): Declare function.
15825 (genrtl_handler): Likewise.
15826 (genrtl_catch_block): Likewise.
15827 (genrtl_ctor_stmt): Likewise.
15828 (genrtl_subobject): Likewise.
15829 (genrtl_decl_cleanup): Likewise.
15830 (genrtl_do_poplevel): Likewise.
15831 (genrtl_do_pushlevel): Likewise.
15832 (genrtl_clear_out_block): Likewise.
15833 (genrtl_goto_stmt): Likewise.
15834 (genrtl_expr_stmt): Likewise.
15835 (genrtl_decl_stmt): Likewise.
15836 (genrtl_if_stmt): Likewise.
15837 (genrtl_while_stmt): Likewise.
15838 (genrtl_do_stmt): Likewise.
15839 (genrtl_return_stmt): Likewise.
15840 (genrtl_for_stmt): Likewise.
15841 (genrtl_break_stmt): Likewise.
15842 (genrtl_continue_stmt): Likewise.
15843 (genrtl_scope_stmt): Likewise.
15844 (genrtl_switch_stmt): Likewise.
15845 (genrtl_case_label): Likewise.
15846 (genrtl_begin_compound_stmt): Likewise.
15847 (genrtl_finish_compound_stmt): Likewise.
15848 (genrtl_compound_stmt): Likewise.
15849 (genrtl_asm_stmt): Likewise.
15850 (genrtl_named_return_value): Likewise.
15851 (genrtl_begin_stmt_expr): Likewise.
15852 (genrtl_finish_stmt_expr): Likewise.
15853 (finish_for_stmt): Removed first argument.
15854 (finish_switch_stmt): Likewise.
15856 * semantics.c (genrtl_try_block): Define function.
15857 (genrtl_handler): Likewise.
15858 (genrtl_catch_block): Likewise.
15859 (genrtl_ctor_stmt): Likewise.
15860 (genrtl_subobject): Likewise.
15861 (genrtl_decl_cleanup): Likewise.
15862 (genrtl_do_poplevel): Likewise.
15863 (genrtl_do_pushlevel): Likewise.
15864 (genrtl_clear_out_block): Likewise.
15865 (genrtl_goto_stmt): Likewise.
15866 (genrtl_expr_stmt): Likewise.
15867 (genrtl_decl_stmt): Likewise.
15868 (genrtl_if_stmt): Likewise.
15869 (genrtl_while_stmt): Likewise.
15870 (genrtl_do_stmt): Likewise.
15871 (genrtl_return_stmt): Likewise.
15872 (genrtl_for_stmt): Likewise.
15873 (genrtl_break_stmt): Likewise.
15874 (genrtl_continue_stmt): Likewise.
15875 (genrtl_scope_stmt): Likewise.
15876 (genrtl_switch_stmt): Likewise.
15877 (genrtl_case_label): Likewise.
15878 (genrtl_begin_compound_stmt): Likewise.
15879 (genrtl_finish_compound_stmt): Likewise.
15880 (genrtl_compound_stmt): Likewise.
15881 (genrtl_asm_stmt): Likewise.
15882 (genrtl_named_return_value): Likewise.
15883 (genrtl_begin_stmt_expr): Likewise.
15884 (genrtl_finish_stmt_expr): Likewise.
15885 (finish_for_stmt): Removed first argument and generate rtl
15887 (finish_switch_stmt): Likewise.
15888 (do_poplevel): Removed generate rtl specific code.
15889 (do_pushlevel): Likewise.
15890 (add_tree): Likewise.
15891 (finish_goto_stmt): Likewise.
15892 (finish_expr_stmt): Likewise.
15893 (begin_if_stmt): Likewise.
15894 (finish_if_stmt_cond): Likewise.
15895 (finish_then_clause): Likewise.
15896 (begin_else_clause): Likewise.
15897 (finish_else_clause): Likewise.
15898 (finish_if_stmt): Likewise.
15899 (clear_out_block): Likewise.
15900 (begin_while_stmt): Likewise.
15901 (finish_while_stmt_cond): Likewise.
15902 (finish_while_stmt): Likewise.
15903 (begin_do_stmt): Likewise.
15904 (finish_do_body): Likewise.
15905 (finish_do_stmt): Likewise.
15906 (finish_return_stmt): Likewise.
15907 (begin_for_stmt): Likewise.
15908 (finish_for_init_stmt): Likewise.
15909 (finish_for_cond): Likewise.
15910 (finish_for_expr): Likewise.
15911 (finish_break_stmt): Likewise.
15912 (finish_continue_stmt): Likewise.
15913 (begin_switch_stmt): Likewise.
15914 (finish_switch_cond): Likewise.
15915 (finish_case_label): Likewise.
15916 (begin_try_block): Likewise.
15917 (begin_function_try_block): Likewise.
15918 (finish_try_block): Likewise.
15919 (finish_cleanup_try_block): Likewise.
15920 (finish_cleanup): Likewise.
15921 (finish_function_try_block): Likewise.
15922 (finish_handler_sequence): Likewise.
15923 (finish_function_handler_sequence): Likewise.
15924 (begin_handler): Likewise.
15925 (finish_handler_parms): Likewise.
15926 (begin_catch_block): Likewise.
15927 (finish_handler): Likewise.
15928 (begin_compound_stmt): Likewise.
15929 (finish_compound_stmt): Likewise.
15930 (finish_asm_stmt): Likewise.
15931 (finish_label_stmt): Likewise.
15932 (finish_label_decl): Likewise.
15933 (finish_subobject): Likewise.
15934 (finish_decl_cleanup): Likewise.
15935 (finish_named_return_value): Likewise.
15936 (begin_stmt_expr): Likewise.
15937 (finish_stmt_expr): Likewise.
15939 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
15940 to call genrtl_expr_stmt when appropriate.
15942 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
15943 begin_compound_expr to call genrtl_begin_stmt_expr and
15944 genrtl_begin_compound_expr when appropriate.
15945 (finish_init_stmts): Changed calls to finish_compound_expr and
15946 finish_stmt_expr to call genrtl_finish_compound_expr and
15947 genrtl_finish_stmt_expr when appropriate.
15948 (expand_default_init): Changed call to finish_expr_stmt to call
15949 genrtl_expr_stmt when appropriate.
15950 (build_vec_init): Likewise.
15952 * parse.y (simple_stmt): Removed first argument from call to
15953 finish_for_stmt. Removed first argument from call to
15954 finish_switch_stmt.
15956 * parse.c: Regenerated.
15958 * pt.c (tsubst_expr): Removed first argument from call to
15959 finish_for_stmt. Removed first argument from call to
15960 finish_switch_stmt.
15962 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
15964 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
15965 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
15967 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
15968 (cplus_tree_code_length[]): Likewise.
15969 (cplus_tree_code_name[]): Likewise.
15970 (init_parse): Added call to add_c_tree_codes. Changed
15971 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
15973 2000-06-16 Mark Mitchell <mark@codesourcery.com>
15975 * cp-tree.h (finish_mem_initializers): Declare.
15976 (count_trees): Likewise.
15977 * parse.y (base_init): Use finish_mem_initializers.
15978 * semantics.c (finish_mem_initializers): New function.
15980 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
15981 the number of trees.
15983 (count_trees): Don't use it.
15985 2000-06-15 Jason Merrill <jason@redhat.com>
15987 * tree.c (count_trees): New debugging function.
15989 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
15990 * init.c (build_member_call): Pull out the name of a DECL.
15992 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
15993 * semantics.c (expand_body): Push to TV_INTEGRATION here.
15994 * optimize.c (optimize_function): Not here.
15995 * pt.c (instantiate_decl): Push to TV_PARSE.
15997 2000-06-15 Mark Mitchell <mark@codesourcery.com>
15999 * cp-tree.h (struct language_function): Remove x_base_init_list
16000 and x_member_init_list.
16001 (current_base_init_list): Remove.
16002 (current_member_init_list): Likewise.
16003 (setup_vtbl_ptr): Change prototype.
16004 (emit_base_init): Likewise.
16005 (expand_member_init): Likewise.
16006 (reinit_parse_for_function): Remove.
16007 * decl.c (save_function_data): Don't clear x_base_init_list and
16008 x_member_init_list.
16009 (mark_language_function): Don't mark them.
16010 * init.c (perform_member_init): Tweak comment.
16011 (sort_member_init): Take the list of initializers as an argument.
16012 (sort_base_init): Likewise.
16013 (emit_base_init): Likewise.
16014 (expand_member_init): Return the initializer. Don't use global
16016 * lex.c (reinit_parse_for_function): Remove.
16017 * method.c (build_template_parm_names): Correct substitution.
16018 (do_build_copy_constructor): Don't use current_member_init_list
16019 and current_base_init_list.
16020 (synthesize_method): Likewise.
16021 * parse.y (base_init): Split mem-initializers into
16022 base-initializers and field-initializers.
16023 (member_init_list): Build up the list here.
16024 (member_init): Return the initializer.
16025 (fn.depfn): Don't use reinit_parse_for_function.
16026 * parse.c: Regenerated.
16027 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16029 (tsubst_expr): Don't use current_member_init_list
16030 and current_base_init_list.
16031 (tsubst_expr_values): Rename to ...
16032 (tsubst_initializer_list): ... this. Use convert_from_reference.
16033 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16034 and current_base_init_list.
16035 (begin_function_definition): Don't call reinit_parse_for_function.
16037 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16039 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16042 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16044 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
16046 * cp-tree.h (IF_COND): Move to c-common.h.
16047 (THEN_CLAUSE): Likewise.
16048 (ELSE_CLAUSE): Likewise.
16049 (WHILE_COND): Likewise.
16050 (WHILE_BODY): Likewise.
16051 (DO_COND): Likewise.
16052 (DO_BODY): Likewise.
16053 (RETURN_EXPR): Likewise.
16054 (EXPR_STMT_EXPR): Likewise.
16055 (FOR_INIT_STMT): Likewise.
16056 (FOR_COND): Likewise.
16057 (FOR_EXPR): Likewise.
16058 (FOR_BODY): Likewise.
16059 (SWITCH_COND): Likewise.
16060 (SWITCH_BODY): Likewise.
16061 (CASE_LOW): Likewise.
16062 (CASE_HIGH): Likewise.
16063 (GOTO_DESTINATION): Likewise.
16064 (COMPOUND_BODY): Likewise.
16065 (ASM_CV_QUAL): Likewise.
16066 (ASM_STRING): Likewise.
16067 (ASM_OUTPUTS): Likewise.
16068 (ASM_INPUTS): Likewise.
16069 (ASM_CLOBBERS): Likewise.
16070 (DECL_STMT_DECL): Likewise.
16071 (STMT_EXPR_STMT): Likewise.
16072 (LABEL_STMT_LABEL): Likewise.
16073 (SCOPE_BEGIN_P): Likewise.
16074 (SCOPE_END_P): Likewise.
16075 (SCOPE_STMT_BLOCK): Likewise.
16076 (SCOPE_NULLIFIED_P): Likewise.
16077 (SCOPE_NO_CLEANUPS_P): Likewise.
16078 (SCOPE_PARTIAL_P): Likewise.
16079 (ASM_VOLATILE_P): Likewise.
16080 (STMT_LINENO): Likewise.
16081 (STMT_LINENO_FOR_FN_P): Likewise.
16083 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16084 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16085 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16086 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16087 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16089 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16091 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16092 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16094 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16095 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16096 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16098 2000-06-14 Mark Mitchell <mark@codesourcery.com>
16100 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16101 * class.c (dfs_find_final_overrider): Set it appropriately.
16102 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16103 avoid unneeded secondary vptrs.
16105 2000-06-13 Jakub Jelinek <jakub@redhat.com>
16107 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16108 (check_bitfield_decl, check_field_decl): Likewise.
16109 (build_vtbl_or_vbase_field, build_base_field): Likewise.
16110 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16111 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16112 (xfer_tag, finish_enum): Likewise.
16113 * decl2.c (finish_builtin_type): Likewise.
16114 * init.c (init_init_processing): Likewise.
16115 * pt.c (instantiate_class_template): Likewise.
16116 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16117 * cp-tree.h (struct lang_type): Add user_align member.
16118 (CLASSTYPE_USER_ALIGN): Define.
16120 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
16122 * Make-lang.in (c++.install-common): Install g++-cross in
16123 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16124 $(target_alias)-g++ and $(target_alias)-c++.
16126 2000-06-12 Mark Mitchell <mark@codesourcery.com>
16128 * class.c (vcall_offset_data_s): Add last_init and fns.
16129 (overrides): Rename to same_signature_p.
16130 (dfs_find_final_overrider): Adjust accordingly.
16131 (mark_overriders): Likewise.
16132 (warn_hidden): Likewise.
16133 (build_vtbl_initializer): Reorganize machinery for building things
16134 at negative offsets.
16135 (build_vcall_and_vbase_vtbl_entries): Likewise.
16136 (build_vbase_offset_vtbl_entries): Likewise.
16137 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16138 offset entries. Do not create two entries for functions with the
16140 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16141 (build_rtti_vtbl_entries): Reorganize machinery for building things
16142 at negative offsets.
16144 * optimize.c (expand_call_inline): Don't recurse into the code
16145 used to initialize the parameters more than once.
16147 2000-06-11 Mark Mitchell <mark@codesourcery.com>
16149 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16150 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16151 (find_substitution): Only use the `Sa' substitution for
16152 std::allocator, not instantiations of it.
16153 (write_template_prefix): Move comment. Only use a TREE_LIST to
16154 represent substitutions for a member template.
16155 (write_array_type): Mangle array dimensions correctly.
16156 * optimize.c (maybe_clone_body): Copy more information from the
16158 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16159 on the regenerated declaration.
16161 2000-06-11 Chip Salzenberg <chip@valinux.com>
16162 Mark Mitchell <mark@codesourcery.com>
16164 * class.c (build_vtable): Clarify comment.
16165 (build_ctor_vtbl_group): Pass the most derived type to
16168 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16170 * decl2.c (compare_options): Don't needlessly cast away const-ness.
16172 2000-06-10 Mark Mitchell <mark@codesourcery.com>
16174 * decl.c (add_binding): Handle duplicate declarations of external
16177 2000-06-09 Chip Salzenberg <chip@valinux.com>
16178 Mark Mitchell <mark@codesourcery.com>
16180 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16182 (write_signed_number): New macro.
16183 (write_unsigned_number): Likewise.
16184 (write_source_name): Use them.
16185 (write_number): Handle signed and unsigned values.
16186 (write_integer_cst): Use tree_int_cst_sgn, and use
16187 write_unsigned_number or write_signed_number as appropriate.
16188 (write_discriminator): Use write_unsigned_number or
16189 write_signed_number as appropriate.
16190 (write_template_arg_literal): Likewise.
16191 (write_array_type): Use tree_low_cst.
16192 (write_template_parm): Use write_unsigned_number or
16193 write_signed_number as appropriate.
16194 (write_substitution): Adjust call to write_number.
16195 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16196 (write_expression): Handle non-type template arguments of
16197 reference type correctly.
16198 (mangle_thunk): Use write_signed_number.
16200 2000-06-09 Chip Salzenberg <chip@valinux.com>
16202 * mangle.c (find_substition): Don't mangle objects with typename
16203 substitutions (e.g. "cin" as "Si").
16205 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
16207 * call.c (add_candidate): Use ggc_alloc_cleared.
16208 * decl.c (lookup_label): Likewise.
16209 * lex.c (retrofit_lang_decl): Likewise.
16211 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
16213 * semantics.c (expand_body): Push to TV_EXPAND.
16214 * optimize.c (optimize_function): Push to TV_INTEGRATION.
16215 * decl.c (start_function): Always call announce_function.
16217 * tinfo2.cc: Just declare abort.
16219 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
16221 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16222 whenever @ is a symbolic name.
16224 2000-06-08 Jakub Jelinek <jakub@redhat.com>
16226 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16228 2000-06-07 Mark Mitchell <mark@codesourcery.com>
16230 * decl.c (pushdecl): Look up functions by DECL_NAME, not
16231 DECL_ASSEMBLER_NAME.
16233 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16235 * decl2.c (c_language): Define.
16237 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
16239 * lex.c (lang_init_options): Tweak.
16241 * decl2.c: Remove #inclusion of diagnostic.h
16242 (lang_decode_option): Move diagnostic formatting options to
16245 * lang-options.h: Remove documentation for diagnostic options.
16247 * Makefile.in (lex.o): Depends upon diagnostic.h
16249 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16251 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16252 the same DECL_RESULT, it's not a redefinition.
16253 * pt.c (tsubst_decl): Remove code to handle illegal
16256 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
16258 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16260 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
16262 * search.c (maybe_suppress_debug_info): Don't check
16263 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16265 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16268 Remember instantiation context in deferred instantiations.
16269 * cp-tree.h (struct tinst_level): Remove.
16270 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16271 * pt.c (current_tinst_level): Now a tree.
16272 (print_template_context, push_tinst_level, pop_tinst_level,
16273 tinst_for_decl): Adjust.
16274 (reopen_tinst_level): New fn.
16275 (init_pt): Register current_tinst_level as a root.
16276 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16277 of the pending templates list.
16278 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
16279 * lex.c (extract_interface_info): Adjust.
16280 * decl2.c (warn_if_unknown_interface): Adjust.
16282 2000-06-05 Mark Mitchell <mark@codesourcery.com>
16284 * class.c (indirect_primary_base_p): New function.
16285 (determine_primary_base): Use it.
16287 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
16289 Update new-abi dynamic cast algorithm.
16290 * tinfo.cc (__class_type_info::__dyncast_result): Add
16291 whole_details. Adjust constructor.
16292 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16293 Avoid unnecessary searching.
16294 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16296 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16298 * decl.c (init_decl_processing): Don't call record_component_aliases.
16299 * tree.c (build_cplus_array_type_1): Likewise.
16301 2000-06-04 Mark Mitchell <mark@codesourcery.com>
16303 * ir.texi: Correct typo.
16304 * mangle.c (write_expression): Handle non-type template arguments
16305 with reference type.
16306 * method.c (build_overload_value): Likewise.
16307 * pt.c (convert_nontype_argument): Explicitly represent conversion
16308 to a reference with an ADDR_EXPR.
16309 (unify): Always unify arguments in left-to-right order.
16311 2000-06-03 Alex Samuel <samuel@codesourcery.com>
16312 Mark Mitchell <mark@codesourcery.com>
16314 * Make-lang.in (CXX_SRCS): Add mangle.c.
16315 * Makefile.in (CXX_OBJS): Add mangle.o.
16316 (mangle.o): New rule.
16318 * class.c (local_classes): New variable.
16319 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16320 (get_vtt_name): Use mangle_vtt_name for new ABI.
16321 (init_class_processing): Initialize local_classes.
16322 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16323 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16324 (std_identifier): New macro.
16325 (DECL_VOLATILE_MEMFUNC_P): New macro.
16326 (DECL_NAMESPACE_STD_P): Likewise.
16327 (local_classes): Declare.
16328 (get_mostly_instantiated_function_type): Declare.
16329 (init_mangle): Declare.
16330 (mangle_decl): Likewise.
16331 (mangle_type_string): Likewise.
16332 (mangle_type): Likewise.
16333 (mangle_typeinfo_for_type): Likewise.
16334 (mangle_typeinfo_string_for_type): Likewise.
16335 (mangle_vtbl_for_type): Likewise.
16336 (mangle_vtt_for_type): Likewise.
16337 (mangle_ctor_vtbl_for_type): Likewise.
16338 (mangle_thunk): Likewise.
16339 (mangle_conv_op_name_for_type): Likewise.
16340 (mangle_guard_variable): Likewise.
16341 * decl.c (pushtag): Keep track of local classes.
16342 (initialize_predefined_identifiers): Initialize std_identifier.
16343 (init_decl_processing): Use std_identifier.
16344 (start_decl): Don't treat instantiations as specializations.
16345 (grokdeclarator): Likewise.
16346 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
16347 name for fully-instantiated templates.
16348 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16349 destructors with the new ABI.
16350 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16351 (grokfield): Use mangle_type for new ABI.
16352 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16353 (get_sentry): Use mangle_guard_variable for new ABI.
16354 (start_static_initialization_or_destruction): Likewise.
16355 * expr.c (extract_aggr_init): Remove.
16356 (extract_scalar_init): Likewise.
16357 (extract_init): Remove #if 0'd code.
16358 * mangle.c: New function.
16359 * method.c (build_mangled_name): Assert not flag_new_abi.
16360 (build_static_name): Likewise.
16361 (build_decl_overload_real): Likewise.
16362 (build_typename_overload): Likewise.
16363 (build_overload_with_type): Likewise.
16364 (build_overload_name): Likewise.
16365 (get_ctor_vtbl_name): Likewise.
16366 (start_squangling): Likewise.
16367 (get_id_2): Likewise.
16368 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16369 (init_method): Call init_mangle for new ABI.
16370 (make_thunk): Call mangle_thunk for new ABI.
16371 * operators.def: Correct new ABI manglings for the `%' operator.
16373 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16374 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
16375 (lookup_template_class): Call mangle_decl for new ABI.
16376 (get_mostly_instantiated_function_type): New function.
16377 (set_mangled_name_for_template_decl): Use it.
16378 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
16379 the new ABI. Use mangle_conv_op_name_for_type for instantiated
16380 conversion op names.
16381 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
16382 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
16383 (tinfo_base_init): Likewise. Mangle typeinfo string name with
16384 mangle_typeinfo_string_for_type.
16386 2000-06-03 Mark Mitchell <mark@codesourcery.com>
16388 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
16389 (INNERMOST_TEMPLATE_ARGS): New macro.
16390 (innermost_args): Remove.
16391 (get_innermost_template_args): New function.
16392 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
16393 * error.c (dump_function_decl): Be caution when using
16394 most_general_template.
16395 * method.c (build_template_parm_names): Use
16396 INNERMOST_TEMPLATE_ARGS.
16397 * pt.c (add_to_template_args): Tidy comment
16398 (get_innermost_template_args): New function.
16399 (check_explicit_specialization): Clear DECL_INITIAL for a new
16401 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
16403 (push_template_decl): Always register specializations of the most
16405 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
16406 (coerce_template_parms): Likewise.
16407 (lookup_template_class): Likewise.
16408 (innermost_args): Remove.
16409 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
16410 (tsubst_decl): Handle tricky specializations. Use
16411 get_innermost_template_args.
16412 (instantiate_template): Simplify handling of partial
16414 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
16415 (most_general_template): Reimplement, in a more straightforward
16417 (regenerate_decl_from_template): Tweak formatting. Use
16418 TMPL_ARGS_DEPTH for clarity.
16419 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
16421 * dump.c (dequeue_and_dump): Dump information about thunks.
16423 2000-06-01 Richard Henderson <rth@cygnus.com>
16425 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
16427 2000-06-01 Richard Henderson <rth@cygnus.com>
16429 * decl2.c (unsupported_options): Fix typo, make const.
16430 (lang_decode_option): Fix bsearch argument order.
16432 2000-06-01 Mark Mitchell <mark@codesourcery.com>
16434 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
16437 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16439 * cp-tree.h (c_get_alias_set): Deleted.
16440 * Makefile.in (decl.o): Include ../expr.h.
16441 * decl.c (expr.h): Include.
16442 (init_decl_processing): Call record_component_aliases for arrays.
16443 (grokdeclarator): Likewise.
16444 Set TREE_ADDRESSABLE for fields that aren't bitfields.
16445 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
16447 2000-05-31 Mark Mitchell <mark@codesourcery.com>
16449 Remove guiding declaration support.
16450 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
16451 (flag_guiding_decls): Remove.
16452 * call.c (build_user_type_conversion_1): Remove support for
16454 (build_new_function_call): Likewise.
16455 (build_new_op): Likewise.
16456 (build_new_method_call): Likewise.
16457 * decl.c (start_function): Likewise.
16458 * friend.c (is_friend): Likewise.
16459 (do_friend): Likewise.
16460 * decl2.c ((flag_dump_translation_unit): Make it const.
16461 (flag_guiding_decls): Remove.
16462 (unsupported_options): New variable
16463 (compare_options): New function.
16464 (lang_decode_option): Use them.
16466 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
16468 * method.c (mangle_expression): Adjust test for legal expression
16471 * pt.c (instantiate_decl): Save and restore the local
16472 specializations list.
16474 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
16476 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
16478 2000-05-30 Mark Mitchell <mark@codesourcery.com>
16480 * call.c (add_template_candidate_real): Handle member template
16481 constructors for classes with virtual bases.
16482 (build_user_type_conversion_1): Use in_charge_arg_for_name.
16483 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
16485 * ir.texi: Update thunk documentation.
16487 * call.c (joust): Fix handling of overloaded builtin operators.
16489 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
16491 * cp-tree.h (DECL_ANTICIPATED): New macro.
16492 Document new use of DECL_LANG_FLAG_7.
16493 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
16494 in the user namespace.
16495 * lex.c (do_identifier): If the identifier's declaration has
16496 DECL_ANTICIPATED on, it has not yet been declared. But do not
16497 replace it with an ordinary implicit declaration.
16499 * tinfo2.cc: Include stdlib.h.
16501 2000-05-29 Mark Mitchell <mark@codesourcery.com>
16503 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
16504 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
16507 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
16509 * decl2.c (lang_decode_option): Use skip_leading_substring instead
16512 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
16514 * operators.def (<?): Duplicated, should have been...
16517 2000-05-27 Alex Samuel <samuel@codesourcery.com>
16518 Mark Mitchell <mark@codesourcery.com>
16520 * cp-tree.h (ansi_opname): Make it a macro.
16521 (ansi_assopname): Likewise.
16522 (struct lang_decl_flags): Add assignment_operator_p.
16523 (struct lang_decl): Add operator_code.
16524 (DECL_VTT_PARM): Adjust.
16525 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
16526 overloaded operator.
16527 (SET_OVERLOADED_OPERATOR_CODE): New macro.
16528 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
16529 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
16530 (opname_tab): Remove.
16531 (assignop_tab): Likewise.
16532 (operator_name_info_t): New type.
16533 (operator_name_info): New variable.
16534 (assignment_operator_name_info): Likewise.
16535 (build_cp_library_fn): Remove declaration.
16536 (push_cp_library_fn): Likewise.
16537 (operator_name_string): Likewise.
16538 (build_decl_overload): Likewise.
16539 * call.c (print_z_candidates): Simplify.
16540 (build_object_call): Adjust usage of ansi_opname. Use
16541 DECL_OVERLOADED_OPERATOR_P.
16542 (op_error): Adjust operator name lookup.
16543 (build_conditional_expr): Adjust usage of ansi_opname.
16544 (build_new_op): Likewise.
16545 (build_op_delete_call): Likewise.
16546 (build_over_call): Likewise.
16547 (joust): Use DECL_OVERLOADED_OPERATOR_P.
16548 * decl.c (duplicate_decls): Copy operator_code.
16549 (init_decl_processing): Adjust parameters to push_cp_library_fn.
16550 (builtin_function): Adjust parameters to build_library_fn_1.
16551 (build_library_fn_1): Accept an overloaded operator code.
16552 (build_library_fn): Pass ERROR_MARK.
16553 (build_cp_library_fn): Accept an overloaded operator code.
16554 (push_cp_library_fn): Likewise.
16555 (grokfndecl): Tweak.
16556 (grokdeclarator): Simplify code to compute names of overloaded
16557 operators. Adjust use of ansi_opname.
16558 (ambi_op_p): Work on tree_codes, not identifiers.
16559 (unary_op_p): Likewise.
16560 (grok_op_properties): Likewise.
16561 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
16562 (lang_mark_tree): Don't try to mark the operator_code.
16563 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
16564 * error.c (dump_decl): Remove special handling for operator
16566 (dump_function_name): Likewise.
16567 (dump_expr): Adjust name lookup of operators.
16568 (op_to_string): Simplify.
16569 (assop_to_string): Likewise.
16570 * init.c (build_new_1): Adjust use of ansi_opname.
16571 * lex.c (opname_tab): Remove.
16572 (assignop_tab): Likewise.
16573 (ansi_opname): Likewise.
16574 (ansi_assopname): Likewise.
16575 (operator_name_string): Likewise.
16576 (reinit_lang_specific): Likewise.
16577 (operator_name_info): New variable.
16578 (assignment_operator_name_info): Likewise.
16579 (init_operators): New function.
16580 (init_parse): Use it.
16581 (do_identifier): Adjust use of ansi_opname.
16582 * method.c (mangle_expression): Don't use ansi_opname for
16584 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
16585 (build_decl_overload): Remove.
16586 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
16587 (do_build_assign_ref): Adjust use of ansi_opname.
16588 (synthesize_method): Likewise.
16589 (implicitly_declare_fn): Likewise.
16590 * operators.def: New file.
16591 * parse.y (operator): Adjust use of ansi_opname.
16592 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
16593 (set_mangled_name_for_template_decl): Don't play games with
16595 (special_function_p): Adjust use of ansi_opname.
16596 * typeck.c (check_return_expr): Likewise.
16597 * Make-lang.in (cc1plus): Depend on operators.def.
16598 * Makefile.in (lex.o): Likewise.
16599 (decl.o): Likewise.
16601 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
16603 * Make-lang.in (cplib2.ready): Eradicate.
16605 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16607 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16608 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16609 (built_min, cp_tree_equal): Likewise.
16611 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16613 * class.c (layout_nonempty_base_or_field): Replace
16614 `record_layout_info' with `record_layout_info_s'.
16616 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
16619 * cp-tree.h (struct language_function): x_named_labels is now
16620 a struct named_label_list*.
16621 * decl.c (struct named_label_use_list): Renamed from...
16622 (struct named_label_list): ...this. New struct.
16623 (push_binding_level): Don't set eh_region.
16624 (note_level_for_eh): New fn.
16625 (pop_label): Take label and old value directly.
16626 (pop_labels): Adjust for new named_labels format.
16627 (lookup_label): Likewise.
16628 (poplevel): Note characteristics of a binding level containing a
16629 named label. Mess with named label lists earlier.
16630 (mark_named_label_lists): New fn.
16631 (mark_lang_function): Call it.
16632 (use_label): New fn, split out from...
16633 (make_label_decl): ...here. Don't call it.
16634 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16635 check_previous_gotos): New fns, split out from...
16636 (define_label): ...here.
16637 (check_switch_goto): New fn.
16638 (define_case_label): Call it.
16639 (check_goto): New fn.
16640 * semantics.c (finish_goto_stmt): Call it and use_label.
16641 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16642 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16644 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16646 * class.c (build_vtable_entry_ref): Correct usage of
16647 get_vtbl_decl_for_binfo.
16649 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16650 * method.c (implicitly_declare_fn): Not here.
16652 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
16654 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16655 (CPTI_PTMD_DESC_TYPE): ... here.
16656 (ptmd_desc_type_node): Rename to ...
16657 (ptm_desc_type_node): ... here.
16658 * decl.c: Likewise.
16659 * rtti.c (ptmd_initializer): Rename to ...
16660 (ptm_initializer): ... here.
16661 (sythesize_tinfo_var): Adjust. Deal with pointer to member
16663 (create_tinfo_types): Adjust.
16665 2000-05-25 Mark Mitchell <mark@codesourcery.com>
16667 Finish implementation of VTTs.
16668 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16669 CPTI_VTT_PARM_IDENTIFIER.
16670 (vtt_parm_identifier): New macro.
16671 (vtt_parm_type): Likewise.
16672 (BINFO_SUBVTT_INDEX): Likewise.
16673 (BINFO_VPTR_INDEX): Likewise.
16674 (struct lang_decl): Add vtt_parm.
16675 (DECL_VTT_PARM): New macro.
16676 (DECL_USE_VTT_PARM): Likewise.
16677 (DECL_NEEDS_VTT_PARM_P): Likewise.
16678 (get_vtt_name): Declare.
16679 (build_artificial_parm): Likewise.
16680 (fixup_all_virtual_upcast_offsets): Likewise.
16681 (expand_indirect_vtbls_init): Remove.
16682 * call.c (build_new_method_call): Pass the vtt to subobject
16683 constructors and destructors.
16684 * class.c (get_vtt_name): Give it external linkage.
16685 (build_clone): Handle the magic VTT parameters for clones.
16686 (clone_function_decl): Fix typo in comment.
16687 (build_vtt): Keep track of the indices in the VTTs where various
16688 entities are stored.
16689 (build_vtt_inits): Likewise.
16690 (dfs_build_vtt_inits): Likewise.
16691 (build_ctor_vtbl_group): Tweak type of construction vtables.
16692 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16693 primary bases, when building construction vtables.
16694 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16695 (initialize_predefined_identifiers): Add vtt_parm_identifier.
16696 (init_decl_processing): Initialize vtt_parm_type.
16697 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16698 (lang_mark_tree): Make vtt_parm.
16699 * decl2.c (build_artificial_parm): New function.
16700 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
16701 (grokclassfn): Use build_artificial_parm.
16702 * init.c (initialize_vtbl_ptrs): Call
16703 fixup_all_virtual_upcast_offsets directly.
16704 (perform_member_init): Use the complete subobject destructor for
16706 (build_vtbl_address): New function.
16707 (expand_virtual_init): Handle VTTs.
16708 * optimize (maybe_clone_body): Likewise.
16709 * search.c (fixup_all_virtual_upcast_offsets): Give it external
16711 (expand_indirect_vtbls_init): Remove.
16712 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16713 * tree.c (make_binfo): Make them bigger.
16715 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16717 * inc/cxxabi.h (__pbase_type_info): Define, based on
16718 __pointer_type_info.
16719 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16720 (__pointer_to_member_type_info): Likewise.
16721 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16722 (__pointer_to_member_type_info::__is_pointer_p): Remove.
16723 (__pointer_type_info::__do_catch): Rename to ...
16724 (__pbase_type_info::__do_catch): ... here. Adjust.
16725 (__pbase_type_info::__pointer_catch): Implement.
16726 (__pointer_type_info::__pointer_catch): Adjust.
16727 (__pointer_to_member_type_info::__pointer_catch): Adjust.
16729 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16731 * tinfo.h (__user_type_info::contained_virtual_p): New
16733 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16735 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16736 diamond shaped hierarchy. Add early out for mixed diamond and
16737 duplicate shaped hierarchy.
16739 2000-05-24 Mark Mitchell <mark@codesourcery.com>
16741 * cp-tree.h (build_delete): Change prototype.
16742 (build_vec_delete): Likewise.
16743 * call.c (build_scoped_method_call): Use special_function_kind
16744 values to indicate the kind of destruction to be done.
16745 (build_method_call): Likewise.
16746 * decl.c (finish_destructor_body): Likewise.
16747 (maybe_build_cleanup_1): Likewise. Rename to ...
16748 (maybe_build_cleanup): ... this.
16749 * decl2.c (delete_sanity): Use special_function_kind
16750 values to indicate the kind of destruction to be done.
16751 (build_cleanup): Likewise.
16752 * init.c (perform_member_init): Likewise.
16753 (build_vec_delete_1): Likewise.
16754 (build_dtor_call): Simplify.
16755 (build_delete): Use special_function_kind
16756 values to indicate the kind of destruction to be done.
16757 (build_vbase_delete): Likewise.
16758 (build_vec_delete): Likewise.
16760 * init.c (sort_member_init): Fix typo in error message generation
16763 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
16765 * semantics.c (begin_class_definition): make the packed
16766 attribute be sensitive to the "-fpack-struct" command line flag
16768 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
16770 Update new-abi upcast algorithm.
16771 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16772 prototype and meaning of return value.
16773 (__si_class_type_info::__do_upcast): Likewise.
16774 (__vmi_class_type_info::__do_upcast): Likewise.
16775 * tinfo.cc (__class_type_info::__upcast_result): Replace
16776 whole2dst with part2dst. Adjust ctor.
16777 (__class_type_info::__do_upcast): Adjust call of worker function.
16778 (__class_type_info::__do_upcast): Adjust.
16779 (__si_class_type_info::__do_upcast): Adjust. Use parent's
16781 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16782 virtual base in diamond hierarchy bug.
16784 2000-05-23 Mark Mitchell <mark@codesourcery.com>
16786 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16787 and bitfield to tinfo_fn_p.
16788 (DECL_TINFO_FN_P): Adjust.
16789 (SET_DECL_TINFO_FN_P): Likewise.
16790 (DECL_MUTABLE_P): Likewise.
16791 (DECL_C_BIT_FIELD): Likewise.
16792 (SET_DECL_C_BIT_FIELD): Likewise.
16793 (CLEAR_DECL_C_BIT_FIELD): Likewise.
16794 (DECL_UNINLINABLE): Likewise.
16795 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
16796 (handle_using_decl): Remove assertion.
16797 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
16798 to build FIELD_DECLs.
16799 (build_base_field): Likewise.
16800 (layout_class_type): Likewise.
16801 * decl.c (init_decl_processing): Likewise.
16802 (build_ptrmemfunc_type): Likewise.
16803 (grokdeclarator): Likewise.
16804 * decl2.c (grok_x_components): Likewise.
16805 * except.c (call_eh_info): Likewise.
16806 * init.c (init_init_processing): Likewise.
16807 * rtti.c (expand_class_desc): Likewise.
16808 (create_pseudo_type_info): Likewise.
16809 (get_vmi_pseudo_type_info): Likewise.
16810 (create_tinfo_types): Likewise.
16811 * ptree.c (print_lang_decl): Adjust.
16812 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
16813 before checking DECL_MUTABLE_P.
16815 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
16816 parameters for template functions.
16817 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
16818 destructors as well as constructors.
16820 2000-05-22 Mark Mitchell <mark@codesourcery.com>
16822 * class.c (build_ctor_vtbl_group): Set inits.
16823 * optimize.c (maybe_clone_body): Set DECL_INLINE and
16824 DECL_THIS_INLINE appropriately for clones.
16826 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
16827 (DECL_CONV_FN_P): Simplify.
16828 (DECL_OPERATOR): Remove.
16829 (language_to_string): Declare.
16830 * decl.c (duplicate_decls): Fix typo in comment.
16831 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
16832 (grok_op_properties): Use DECL_CONV_FN_P instead of
16833 IDENTIFIER_TYPENAME_P.
16834 * dump.c (dequeue_and_dump): Dump the language linkage of
16836 * error.c (language_to_string): Give it external linkage.
16837 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
16838 (implicitly_declare_fn): Set DECL_LANGUAGE.
16839 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
16840 IDENTIFIER_TYPENAME_P.
16841 (tsubst_decl): Likewise.
16842 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
16843 * semantics.c (finish_member_declaration): Don't mark members of
16844 classes declared in an extern "C" region as extern "C".
16846 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16848 * decl2.c (qualified_lookup_using_namespace): Look through
16851 * decl.c (push_using_decl): Return the old decl on namespace level.
16853 2000-05-21 Mark Mitchell <mark@codesourcery.com>
16855 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
16856 (VTT_NAME_PREFIX): New macro.
16857 (CTOR_VTBL_NAME_PREFIX): Likewise.
16858 (get_ctor_vtbl_name): New function.
16859 * class.c (get_vtable_name): Simplify.
16860 (get_vtt_name): New function.
16861 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
16862 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
16863 when a virtual base becomes primary.
16864 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
16866 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
16867 additional parameters.
16868 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
16869 (initialize_array): New function.
16870 (build_vtt): Likewise.
16871 (build_vtt_inits): Likewise.
16872 (dfs_build_vtt_inits): Likewise.
16873 (dfs_fixup_binfo_vtbls): Likewise.
16874 (build_ctor_vtbl_group): Likewise.
16875 (initialize_vtable): Use initialize_array.
16876 (accumulate_vtbl_inits): Reimplement to handle construction
16878 (dfs_accumulate_vtbl_inits): Likewise.
16879 (bulid_vtbl_initializer): Adjust parameter name.
16880 * method.c (build_typename_overload): Remove #if 0'd code.
16881 (get_ctor_vtbl_name): New function.
16882 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
16883 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
16885 * cp-tree.h (struct lang_type): Remove search_slot.
16886 (CLASSTYPE_SEARCH_SLOT): Remove.
16887 (emit_base_init): Change prototype.
16888 (initialize_vtbl_ptrs): Likewise.
16889 (expand_indirect_vtbls_init): Likewise.
16890 (clear_search_slots): Remove.
16891 * decl.c (lang_mark_tree): Don't mark search_slot.
16892 * init.c (initialize_vtbl_ptrs): Simplify.
16893 (emit_base_init): Likewise.
16894 * search.c (struct vbase_info): Document decl_ptr.
16895 (convert_pointer_to_single_level): Remove.
16896 (dfs_find_vbases): Remove.
16897 (dfs_init_base_pointers): Simplify.
16898 (dfs_clear_vbase_slots): Remove.
16899 (dfs_vtable_path_unmark): New function.
16900 (init_vbase_pointers): Simplify.
16901 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
16902 (expand_indirect_vtbls_init): Simplify. Don't call
16903 mark_all_temps_used.
16904 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
16905 initialize_vtbl_ptrs.
16907 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
16909 * except.c: Add static prototypes.
16911 2000-05-20 H.J. Lu <hjl@gnu.org>
16913 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
16915 2000-05-19 Mark Mitchell <mark@codesourcery.com>
16917 Don't create a separate copy of virtual bases for the
16918 CLASSTYPE_VBASECLASSES list.
16919 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
16920 (BINFO_FOR_VBASE): Remove.
16921 (CANONICAL_BINFO): Adjust.
16922 (binfo_for_vbase): New function.
16923 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
16924 instead of BINFO_FOR_VBASE.
16925 (build_vbase_pointer): Likewise.
16926 (build_secondary_vtable): Likewise.
16927 (dfs_mark_primary_bases): Likewise.
16928 (mark_primary_bases): Likewise.
16929 (layout_nonempty_base_or_field): Likewise.
16930 (dfs_set_offset_for_shared_vbases): Likewise.
16931 (dfs_set_offset_for_unshared_vbases): Likewise.
16932 (layout_virtual_bases): Likewise. Adjust for changes to the
16933 CLASSTYPE_VBASECLASSES list.
16934 (dump_class_hierarchy_r): Use binfo_for_vbase
16935 instead of BINFO_FOR_VBASE.
16936 (dump_class_hierarchy): Likewise.
16937 (finish_vtbls): Likewise.
16938 (build_vtbl_initializer): Adjust for changes to the
16939 CLASSTYPE_VBASECLASSES list.
16940 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
16941 * decl.c (finish_destructor_body): Adjust for changes to the
16942 CLASSTYPE_VBASECLASSES list.
16943 * init.c (sort_base_init): Use binfo_for_vbase.
16944 (construct_virtual_bases): Adjust for changes to the
16945 CLASSTYPE_VBASECLASSES list.
16946 (expand_member_init): Use binfo_for_vbase.
16947 (build_vbase_delete): Adjust for changes to the
16948 CLASSTYPE_VBASECLASSES list.
16949 * method.c (do_build_copy_constructor): Likewise.
16950 * rtti.c (get_base_offset): Use binfo_for_vbase.
16951 (expand_class_desc): Remove #if 0'd code.
16952 * search.c (struct vbase_info): Remove vbase_types.
16953 (get_base_distance): Use binfo_for_vbase.
16954 (lookup_field_queue_p): Use CANONICAL_BINFO.
16955 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
16956 (get_pure_virtuals): Adjust for changes to the
16957 CLASSTYPE_VBASECLASSES list.
16958 (dfs_find_vbases): Use binfo_for_vbase.
16959 (dfs_init_vbase_pointers): Likewise.
16960 (init_vbase_pointers): Don't initialize vi.vbase_types.
16961 (virtual_context): Use binfo_for_vbase.
16962 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
16963 CLASSTYPE_VBASECLASSES list.
16964 (expand_indirect_vtbls_init): Simplify.
16965 (dfs_get_vbase_types): Don't replicate virtual bases.
16966 (find_vbase_instance): Use binfo_for_vbase.
16967 (binfo_for_vbase): New function.
16968 * typeck.c (get_delta_difference): Use binfo_for_vbase.
16970 2000-05-17 Mark Mitchell <mark@codesourcery.com>
16972 * decl2.c (finish_anon_union): Generalize error messages to handle
16973 anonymous structures.
16974 * init.c (perform_member_init): Remove `name' parameter.
16975 (build_field_list): New function.
16976 (sort_member_init): Handle anonymous union initialization order
16977 correctly. Check for multiple initializations of the same union.
16978 (emit_base_init): Don't look up fields by name here.
16979 (expand_member_init): Record the result of name lookup for future
16981 * typeck.c (build_component_ref): Fix formatting.
16983 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
16985 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
16986 * typeck.c (build_x_compound_expr): Replace warn_unused with
16989 * decl2.c (lang_decode_option): Update -Wall unused flags by
16990 calling set_Wunused.
16992 2000-05-16 Mark Mitchell <mark@codesourcery.com>
16994 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
16995 * init.c (dfs_vtable_path_unmark): Remove.
16996 * search.c (marked_new_vtable_p): Likewise.
16997 (unmarked_new_vtable_p): Likewise.
16998 (dfs_search_slot_nonempty_p): Likewise.
16999 (dfs_mark): Likewise.
17000 (dfs_vtable_path_unmark): Likewise.
17001 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17002 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17003 (dfs_init_vbase_pointers): Remove special-case new ABI code.
17004 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17005 (init_vbase_pointers): Simplify.
17006 (expand_indirect_vtbls_init): Likewise.
17008 * class.c (copy_virtuals): New function.
17009 (build_primary_table): Use it.
17010 (build_secondary_vtable): Likewise.
17011 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17012 indicate that no vcall offset is required.
17013 (add_virtual_function): Likewise.
17014 (modify_all_vtables): Likewise.
17015 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17016 (dfs_accumulate_vtbl_inits): Likewise.
17017 (build_vtbl_initializer): Make changes to handle construction
17019 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17020 (build_rtti_vtbl_entries): Likewise.
17021 (build_vtable_entries): Handle a NULL vcall_index.
17023 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
17025 * decl2.c (lang_decode_option): Fix thinko.
17027 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
17029 * except.c (check_handlers): New fn.
17030 * cp-tree.h: Declare it.
17031 * semantics.c (finish_handler_sequence): Call it.
17032 (finish_function_handler_sequence): Likewise.
17033 (finish_handler_parms): Set TREE_TYPE on the handler.
17034 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17035 * search.c (get_base_distance_recursive): If protect>1, ignore
17037 (get_base_distance): Don't reduce watch_access.
17039 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
17041 * lex.c: #include diagnostic.h.
17042 (lang_init_options): Set default prefixing rules.
17044 * lang-options.h: Add -fdiagnostics-show-location=.
17046 * decl2.c: #include diagnostic.h.
17047 (lang_decode_option): Handle -fdiagnostics-show-location=.
17049 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
17051 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17052 * vec.cc: Revert my 2000-05-07 change.
17054 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
17056 * class.c (check_field_decls): Complain about non-static data
17057 members with same name as class in class with constructor.
17059 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
17061 * decl.c (grokdeclarator): Allow non-static data members with
17062 same name as class.
17064 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
17066 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17067 and pending_inline.filename. Update prototypes.
17068 * decl.c (define_label): Constify filename parameter.
17069 * decl2.c (warn_if_unknown_interface): Constify local char *.
17070 * input.c Constify input_source.filename. Don't declare
17071 input_filename or lineno. Constify filename parameter to feed_input.
17072 * lex.c (init_parse): Constify parameter and return value.
17073 (cp_pragma_interface, cp_pragma_implementation): Constify
17075 (reinit_parse_for_method, reinit_parse_for_block,
17076 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17077 Constify local char *.
17078 * pt.c: Don't declare lineno or input_filename.
17079 (print_template_context, tsubst_friend_function, tsubst_decl,
17080 tsubst, instantiate_decl): Constify local char *.
17081 * semantics.c (expand_body): Constify local char *.
17082 * tree.c (build_srcloc): Constify filename parameter.
17083 * typeck.c (c_expand_asm_operands): Constify filename
17086 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
17088 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17089 offsetof expansion.
17091 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
17093 * inc/cxxabi.h: Fix typos in comment.
17094 (__base_class_info::__offset): Use a static_cast.
17096 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
17098 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17099 of std::size_t and std::ptrdiff_t respectively.
17100 * tinfo.cc: Likewise.
17101 * vec.cc: Likewise.
17103 2000-05-06 Richard Henderson <rth@cygnus.com>
17105 * typeck.c (build_c_cast): Don't warn integer->pointer size
17106 mismatch for constants.
17108 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
17110 * rtti.c (ptmd_initializer): Set non-public, if class is
17113 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17114 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17115 __cxa_vec_delete): Likewise.
17116 * tinfo.cc (__dynamic_cast): Likewise.
17117 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17118 __cxa_vec_delete): Likewise.
17120 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17122 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17123 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17124 (lang_decl_flags): Add vcall_offset.
17125 (THUNK_VCALL_OFFSET): Use it.
17126 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17127 * method.c (make_thunk): Create the lang_decl here, not in
17129 (emit_thunk): Make generic thunks into ordinary functions once
17130 they have been fed to expand_body.
17131 * semantics.c (expand_body): Set current_function_is_thunk here.
17133 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17135 * class.c (update_vtable_entry_for_fn): Prototype.
17137 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17140 * search.c (dfs_build_inheritance_graph_order): Prototype.
17142 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17144 * cp-tree.h (special_function_kind): Add various kinds of
17146 (special_function_p): New function.
17147 * class.c (overrides): Don't let one kind of destructor override
17149 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17150 whether or not to instantiate a template.
17151 * tree.c (special_function_p): Define.
17153 2000-05-03 Mark Mitchell <mark@codesourcery.com>
17155 * cp-tree.def (THUNK_DECL): Remove.
17156 * cp-tree.h (DECL_THUNK_P): New macro.
17157 (DECL_NON_THUNK_FUNCTION_P): Likewise.
17158 (DECL_EXTERN_C_FUNCTION_P): Likewise.
17159 (SET_DECL_THUNK_P): Likewise.
17160 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17161 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17162 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17163 * decl.c (decls_match): Use DECL_EXTERN_C_P.
17164 (duplicate_decls): Likewise.
17165 (pushdecl): Likewise. Adjust thunk handling.
17166 (grokfndecl): Use DECL_EXTERN_C_P.
17167 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17168 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17169 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17170 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17171 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
17172 DECL_NO_STATIC_CHAIN.
17173 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
17174 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17175 * search.c (covariant_return_p): Remove THUNK_DECL handling.
17178 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17180 * tree.c (walk_tree): Set lineno.
17182 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17184 * exception.cc: Update license notice.
17185 * new.cc: Likewise.
17186 * new1.cc: Likewise.
17187 * new2.cc: Likewise.
17188 * tinfo.cc: Likewise.
17189 * tinfo2.cc: Likewise.
17190 * vec.cc: Likewise.
17191 * inc/cxxabi.h: Likewise.
17192 * inc/exception: Likewise.
17193 * inc/new: Likewise.
17194 * inc/new.h: Likewise.
17195 * inc/typeinfo: Likewise.
17197 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17199 * tree.c (build_target_expr_with_type): If we already have a
17200 TARGET_EXPR, just return it.
17202 * optimize.c (initialize_inlined_parameters): Don't generate an
17203 EXPR_STMT if we can just use DECL_INITIAL.
17204 * decl.c (emit_local_var): Only make the initialization a
17205 full-expression if stmts_are_full_exprs_p.
17207 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17209 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17211 * call.c (standard_conversion): Use it.
17212 (direct_reference_binding): Likewise.
17213 (build_over_call): Likewise.
17214 (is_properly_derived_from): Likewise.
17215 (compare_ics): Likewise.
17216 * class.c (resolves_to_fixed_type_p): Likewise.
17217 * optimize.c (declare_return_variable): Likewise.
17218 * pt.c (is_specialization_of): Likewise.
17220 * typeck.c (comp_target_parms): Likeiwse.
17221 (build_static_cast): Likewise.
17222 (build_reinterpret_cast): Likewise.
17223 (build_const_cast): Likewise.
17224 (comp_ptr_ttypes_real): Likewise.
17225 (comp_ptr_ttypes_const): Likewise.
17226 * typeck2.c (process_init_constructor): Likewise.
17228 2000-04-30 Scott Snyder <snyder@fnal.gov>
17230 * decl.c (finish_destructor_body): Use the base destructor when
17231 destroying virtual bases.
17233 2000-04-30 Mark Mitchell <mark@codesourcery.com>
17235 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17237 * optimize.c (struct inline_data): Add target_exprs field.
17238 (declare_return_variable): When a function returns an aggregate,
17239 use the variable declared in the TARGET_EXPR as the remapped
17241 (expand_call_inline): Update the pending target_exprs stack.
17242 (optimize_function): Initialize the stack.
17244 * decl2.c (finish_file): Fix typo in comment.
17246 * method.c (emit_thunk): Don't try to return a `void' value.
17248 * optimize.c (initialize_inlined_parameters): If the parameter is
17249 addressable, we need to make a new VAR_DECL, even if the
17250 initializer is constant.
17252 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
17254 * decl.c (grok_op_properties): Add an extra check of argtypes.
17256 2000-04-27 Mark Mitchell <mark@codesourcery.com>
17258 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17260 (initialize_inlined_parameters): Try to avoid creating new
17263 2000-04-27 Alex Samuel <samuel@codesourcery.com>
17265 * lex.c (my_get_run_time): Remove.
17266 (init_filename_times): Use get_run_time instead of my_get_run_time.
17267 (check_newline): Likewise.
17268 (dump_time_statistics): Likewise.
17269 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17270 of computing elapsed time explicitly.
17272 2000-04-26 Mark Mitchell <mark@codesourcery.com>
17274 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17275 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17276 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17277 before calling decl_constant_value.
17278 * class.c (check_bitfield_decl): Likewise.
17279 * cvt.c (ocp_convert): Likewise.
17280 (convert): Likewise.
17281 * decl.c (compute_array_index_type): Likewise.
17282 (build_enumerator): Likewise.
17283 * decl2.c (check_cp_case_value): Likewise.
17284 * pt.c (convert_nontype_argument): Likewise.
17285 (tsubst): Likewise.
17286 * typeck.c (decay_conversion): Likewise.
17287 (build_compound_expr): Likewise.
17288 (build_reinterpret_cast): Likewise.
17289 (build_c_cast): Likewise.
17290 (convert_for_assignment): Likewise.
17292 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
17294 * decl.c (finish_function): Don't play games with DECL_INLINE.
17296 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
17298 * ir.texi: Correct typo.
17300 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17302 * decl.c (grokdeclarator): Reject VLAs as members.
17304 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
17306 * call.c (standard_conversion): Accept conversion between
17309 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17311 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
17313 * decl2.c (finish_file): Remove double setup for accounting
17316 2000-04-24 Robert Lipe <robertlipe@usa.net>
17318 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17320 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
17322 * new.cc (set_new_handler): Needs to be in std::.
17324 2000-04-23 Mark Mitchell <mark@codesourcery.com>
17326 * cp-tree.h (lang_decl): Remove pretty_function_p.
17327 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17328 language-specific node.
17329 * decl.c (cp_make_fname_decl): Use build_decl, not
17330 build_lang_decl, to build the variables.
17331 (grokvardecl): Don't call build_lang_decl for local variables in
17333 (grokdeclarator): Don't call build_lang_decl for local type
17334 declarations in templates.
17335 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17336 zero'd memory, rather than calling memset.
17337 * pt.c: Include hashtab.h.
17338 (local_specializations): New variable.
17339 (retrieve_local_specialization): Use it.
17340 (register_local_specialization): Likewise.
17341 (tsubst_decl): Don't assume local variables have
17342 DECL_LANG_SPECIFIC.
17343 (instantiate_decl): Set up local_specializations.
17344 * Makefile.in (HTAB_H): New variable.
17346 2000-04-23 Richard Henderson <rth@cygnus.com>
17348 * typeck.c (c_expand_asm_operands): Restore the original
17349 contents of the output list.
17351 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
17353 * ir.texi: Document complex number representation.
17355 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
17357 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17358 (target_incomplete_p): New function.
17359 (tinfo_base_init): Create comdat NTBS name variable.
17360 (ptr_initializer): Add non_public parameter. Calculate it.
17361 (ptmd_initializer): Likewise.
17362 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17363 (create_real_tinfo_var): Add non_public parameter. Use it.
17364 Push proxy into global namespace.
17365 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17367 * inc/typeinfo (type_info::before, type_info::operator==):
17368 Compare __name addresses.
17370 * tinfo2.cc: Remove new-abi builtins comment.
17372 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
17374 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
17376 * call.c (joust): Exit early if we get the same function, too.
17378 * decl2.c (key_method): Return NULL_TREE for template classes.
17379 (import_export_class): Don't need to check for template classes.
17381 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
17383 * lex.c: Remove references to cccp.c.
17385 2000-04-18 Mark Mitchell <mark@codesourcery.com>
17387 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
17388 volatile_memfunc. Add destructor_attr. Adjust dummy.
17389 (DECL_DESTRUCTOR_P): Use destructor_attr.
17390 (DECL_CONST_MEMFUNC_P): Reimplement.
17391 (DECL_VOLATILE_MEMFUNC_P): Remove.
17392 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
17393 (overrides): Use DECL_DESTRUCTOR_P.
17394 (check_for_override): Likewise.
17395 * decl.c (start_function): Likewise.
17396 * decl2.c (grokfclassfn): Likewise.
17397 (check_classfn): Likewise.
17398 (grok_function_init): Likewise.
17400 2000-04-17 Mark Mitchell <mark@codesourcery.com>
17402 * decl2.c (grokfield): Issue error on illegal data member
17405 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
17407 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
17409 2000-04-16 Mark Mitchell <mark@codesourcery.com>
17411 * class.c (build_vtable_entry): Don't build thunks for type-info
17414 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
17416 * decl.c (decls_match): Allow a redeclaration of a builtin to
17417 specify args while the builtin did not.
17419 2000-04-15 Mark Mitchell <mark@codesourcery.com>
17421 * cp-tree.def (THUNK_DECL): Add to documentation.
17422 * cp-tree.h (flag_huge_objects): Declare.
17423 * class.c (modify_vtable_entry): Tidy.
17424 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
17425 Calculate delta appropriately for the new ABI.
17426 (dfs_modify_vtables): Use it.
17427 (modify_all_vtables): Fix thinko in code to add overriding copies
17428 of functions to primary vtables.
17429 (build_clone): Fix typo in comment.
17430 (clone_function_decl): Correct order of destructors in vtable.
17431 (build_vbase_offset_vtbl_entries): Adjust comment.
17432 (dfs_vcall_offset_queue_p): Remove.
17433 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
17434 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
17435 (build_vtable_entry): Correct check for pure virtual functions.
17436 Don't declare flag_huge_objects.
17437 * decl.c (flag_huge_objects): Remove declaration.
17438 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
17439 Use int_size_in_bytes.
17440 (emit_thunk): Handle vcall offset thunks.
17442 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17444 * decl2.c (parse_time, varconst_time): Delete declarations.
17445 (finish_file): Delete LINENO declaration.
17446 START_TIME and THIS_TIME now long.
17448 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
17450 * class.c (build_base_field): Reformat comment.
17452 * inc/cxxabi.h (stddef.h): Comment inclusion.
17453 (__base_class_info::__offset): Comment shift.
17455 2000-04-12 Mark Mitchell <mark@codesourcery.com>
17457 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
17458 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
17459 (cp_push_exception_identifier): New macro.
17460 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
17461 (DECL_BASE_DESTRUCTOR_P): Likewise.
17462 (DECL_DELETING_DESTRUCTOR_P): Likewise.
17463 (get_vtbl_decl_for_binfo): Fix formatting.
17464 (in_charge_arg_for_name): New macro.
17465 (maybe_build_cleanup_and_delete): Remove declaration.
17466 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
17467 (in_charge_arg_for_name): New function.
17468 (build_new_method_call): Use it. Handle cloned destructors.
17469 (build_clone): Don't make the base constructor virtual.
17470 Automatically defer generated functions.
17471 (clone_function_decl): Handle destructors, too.
17472 (clone_constructors_and_destructors): Likewise.
17473 (create_vtable_ptr): Don't create a vtable entry for a cloned
17475 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
17476 (initialize_predefined_identifiers): Update appropriately.
17477 (finish_destructor_body): Simplify.
17478 (maybe_build_cleanup_and_delete): Remove.
17479 * except.c (expand_throw): Handle new-ABI destructors.
17480 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
17481 (build_dtor_call): New function.
17482 (build_delete): Use it. Simplify.
17483 * optimize.c (maybe_clone_body): Handle destructors.
17484 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
17486 * exception.cc (cleanup_fn): New typedef.
17487 (CALL_CLEANUP): New macro.
17488 (cp_eh_info): Use them.
17489 (__cp_push_exception): Likewise.
17490 (__cp_pop_exception): Likewise.
17492 2000-04-11 Mark Mitchell <mark@codesourcery.com>
17494 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
17495 (complete_dtor_identifier): New macro.
17496 (CLASSTYPE_FIRST_CONVERSION): Remove.
17497 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
17498 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
17499 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
17500 (CLASSTYPE_CONSTRUCTORS): Likewise.
17501 (CLASSTYPE_DESTRUCTORS): Likewise.
17502 (lang_decl): Add cloned_function.
17503 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
17504 (DECL_BASE_CONSTRUCTOR_P): Likewise.
17505 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
17506 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
17507 (DECL_CLONED_FUNCTION_P): Likewise.
17508 (DECL_CLONED_FUNCTION): Likewise.
17509 (clone_function_decl): Declare.
17510 (maybe_clone_body): Likewise.
17511 * call.c (build_user_type_conversion_1): Call complete object
17512 constructors in the new ABI.
17513 (build_new_method_call): Don't add in-charge parameters under the
17515 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
17516 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
17517 CLASSTYPE_DESTRUCTOR_SLOT.
17518 (build_clone): New function.
17519 (clone_function_decl): Likewise.
17520 (clone_constructors_and_destructors): Likewise.
17521 (check_bases_and_members): Use it.
17522 * decl.c (iniitialize_predefined_identifiers): Initialize
17523 complete_dtor_identifier.
17524 (finish_function): Don't add extra code to a clone.
17525 (lang_mark_tree): Mark cloned_function.
17526 * decl2.c (mark_used): Don't bother trying to instantiate things
17528 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
17529 * method.c (set_mangled_name_for_decl): Don't treat clones as
17531 (synthesize_method): Sythesize cloned functions, not the clones.
17532 * optimize.c (inline_data): Update comment on ret_label.
17533 (remap_block): Don't assume DECL_INITIAL exists.
17534 (copy_body_r): Allow ret_label to be NULL.
17535 (maybe_clone_body): Define.
17536 * pt.c (tsubst_decl): Handle clones.
17537 (instantiate_clone): New function.
17538 (instantiate_template): Use it.
17539 (set_mangled_name_for_template_decl): Don't treat clones as
17541 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
17542 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
17543 * semantics.c (expand_body): Clone function bodies as necessary.
17545 * optimize.c (remap_decl): Avoid sharing structure for arrays
17546 whose size is only known at run-time.
17547 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
17549 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
17550 to has_in_charge_parm_p.
17551 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
17552 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
17553 (DECL_COPY_CONSTRUCTOR_P): New macro.
17554 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
17555 (build_user_type_conversion_1): Likewise.
17556 (convert_like_real): Likewise.
17557 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
17558 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
17559 (copy_args_p): Likewise.
17560 (grok_ctor_properties): Likewise.
17561 (start_function): Likewise.
17562 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
17563 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
17564 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
17565 * method.c (do_build_copy_constructor): Use
17566 DECL_HAS_IN_CHARGE_PARM_P.
17567 (synthesize_method): Likewise.
17568 * pt.c (instantiate_template): Remove goto.
17569 * tree.c (build_cplus_method_type): Remove mention of obstacks in
17572 * cp-tre.h (finish_function): Change prototype.
17573 * decl.c (end_cleanup_fn): Adjust caller.
17574 (finish_function): Take only one parameter.
17575 * decl2.c (finish_objects): Adjust caller.
17576 (finish_static_storage_duration_function): Likewise.
17577 * method.c (emit_thunk): Likewise.
17578 * parse.y: Likewise.
17579 * parse.c: Regenerated.
17580 * pt.c (instantiate_decl): Likewise.
17581 * rtti.c (synthesize_tinfo_fn): Likewise.
17582 * semantics.c (expand_body): Likewise.
17584 * cp-tree.h (copy_decl): New function.
17585 * class.c (finish_struct_1): Use it.
17586 * lex.c (copy_decl): Define it.
17587 * pt.c (tsubst_decl): Likewise.
17588 * tree.c (copy_template_template_parm): Likewise.
17590 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
17591 has_nonpublic_assign_ref.
17592 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
17593 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
17594 * class.c (finish_struct_methods): Don't set
17595 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
17596 (interface_only): Don't declare.
17597 (interface_unknown): Likewise.
17599 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17601 * tree.h (HAVE_TEMPLATES): Remove definition.
17602 * lang-options.h (-fthis-is-variable): Remove documentation.
17604 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
17606 * class.c (instantiate_type): Handle object-relative template-id.
17608 * semantics.c (finish_expr_stmt): Call convert_to_void here.
17609 * decl.c (cplus_expand_expr_stmt): Not here.
17611 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17612 Initialize exprtype earlier.
17614 * parse.y (fn.def1): Check for defining types in return types.
17616 * decl.c (check_tag_decl): Notice extra fundamental types.
17617 Diagnose empty decls in classes, too.
17619 * decl.c (grokdeclarator): Don't override an anonymous name if no
17620 declarator was given.
17622 * cvt.c (convert_to_void): Call resolve_offset_ref.
17624 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17626 * decl2.c (decl_namespace): Handle getting a type.
17628 * typeck.c (build_c_cast): Re-enable warning for cast between
17629 pointer and integer of different size.
17631 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
17633 * inc/cxxabi.h (__pointer_type_info): Add restrict and
17635 (__pointer_type_info::__pointer_catch): New virtual function.
17636 (__pointer_to_member_type_info): Derive from
17637 __pointer_type_info. Adjust.
17638 (__pointer_to_member_type_info::__do_catch): Remove.
17639 (__pointer_to_member_type_info::__is_pointer_p): Declare.
17640 (__pointer_to_member_type_info::__pointer_catch): Declare.
17641 * rtti.c (qualifier_flags): Add restrict flag.
17642 (ptmd_initializer): Reorder members.
17643 (create_tinfo_types): Expand comments. Reorder
17644 ptmd_desc_type_node members.
17645 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17647 (__pointer_type_info::__do_catch): Move specific code into
17648 __pointer_catch. Call it.
17649 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17650 specific catch checking. Fix void conversion check.
17651 (__pointer_to_member_type_info::__do_catch): Remove.
17652 (__pointer_to_member_type_info::__pointer_catch): Implement.
17654 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17656 * lex.c (init_parse): Remove traces of classof and headof.
17657 * decl2.c (flag_operator_names): Default to 1.
17658 (lang_decode_option): Do not set it for -ansi.
17660 2000-04-09 Mark Mitchell <mark@codesourcery.com>
17662 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17663 (DECL_MAIN_VARIANT): Remove.
17664 * decl.c (duplicate_decls): Don't set it.
17665 (start_function): Likewise.
17666 (lang_mark_tree): Don't mark it.
17667 * decl2.c (defer_fn): Don't use it.
17668 * lex.c (retrofit_lang_decl): Don't set it.
17669 * pt.c (tsubst_decl): Likewise.
17670 * ptree.c (print_lang_decl): Don't print it.
17671 * typeck.c (mark_addressable): Don't use it.
17673 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17675 * vec.cc: Include <new> and <exception>.
17676 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17677 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17679 (__cxa_vec_delete): Catch dtor exceptions.
17681 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17683 Prepend __ to implementation defined names.
17684 * inc/typeinfo (type_info): Rename _name to __name.
17685 (type_info::type_info): Rename parameter.
17686 (type_info::operator==, type_info::operator!=,
17687 type_info::before): Likewise.
17688 (type_info::is_pointer_p, type_info::is_function_p,
17689 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17692 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17693 (__pointer_type_info::__pointer_type_info): Likewise.
17694 (__pointer_type_info::is_pointer_p,
17695 __pointer_type_info::do_catch): Prepend __. Rename parameters.
17696 (__array_type_info::__array_type_info): Rename parameters.
17697 (__function_type_info::__function_type_info): Likewise.
17698 (__function_type_info::is_function_p): Prepend __.
17699 (__enum_type_info::__enum_type_info): Rename parameters.
17700 (__pointer_to_member_type_info::__pointer_to_member_type_info):
17702 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17704 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17705 (__class_type_info::__class_type_info): Rename parameters.
17706 (__class_type_info::sub_kind): Prepend __. Adjust member names.
17707 (__class_type_info::upcast_result,
17708 __class_type_info::dyncast_result): Prepend __. Move definition
17710 (__class_type_info::do_upcast, __class_type_info::do_catch,
17711 __class_type_info::find_public_src,
17712 __class_type_info::do_dyncast,
17713 __class_type_info::do_find_public_src): Prepend __. Rename
17715 (__si_class_type_info::__si_class_type_info): Rename parameters.
17716 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17717 __si_class_type_info::do_find_public_src): Prepent __. Rename
17719 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17720 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17721 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17723 (__dynamic_cast): Rename parameters.
17724 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17725 type_info::do_catch, type_info::do_upcast): Prepend __.
17726 (contained_p, public_p, virtual_p, contained_public_p,
17727 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17728 (__class_type_info::do_catch,
17729 __class_type_info::do_upcast): Prepend __. Adjust.
17730 (__class_type_info::__upcast_result,
17731 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17733 (__class_type_info::find_public_src): Prepend __. Adjust.
17734 (__class_type_info::do_find_public_src,
17735 __si_class_type_info::do_find_public_src,
17736 __vmi_class_type_info::do_find_public_src): Likewise.
17737 (__class_type_info::do_dyncast,
17738 __si_class_type_info::do_dyncast,
17739 __vmi_class_type_info::do_dyncast): Likewise.
17740 (__class_type_info::do_upcast,
17741 __si_class_type_info::do_upcast,
17742 __vmi_class_type_info::do_upcast): Likewise.
17743 (__dynamic_cast): Adjust.
17744 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17745 (__function_type_info::is_function_p): Likewise.
17746 (__pointer_type_info::do_catch): Likewise. Adjust.
17747 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17748 (__throw_type_match_rtti_2): Adjust.
17749 (__is_pointer): Adjust.
17751 2000-04-08 Mark Mitchell <mark@codesourcery.com>
17753 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17754 (complete_ctor_identifier): New macro.
17755 (special_function_kind): Add sfk_copy_constructor and
17756 sfk_assignment_operator.
17757 (LOOKUP_HAS_IN_CHARGE): Remove.
17758 (cons_up_default_function): Rename to ...
17759 (implicitly_declare_fn): ... this.
17760 * call.c (build_new_method_call): Add in-charge parameters for
17762 * class.c (add_implicitly_declared_members): Change parameter name
17763 from cant_have_assignment to cant_have_const_assignment.
17764 Replace calls to cons_up_default_function to implicitly_declare_fn.
17765 * cvt.c (ocp_convert): Use complete_ctor_identifier.
17766 * decl.c (initialize_predefined_identifiers): Initialize it.
17767 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17768 complex expression.
17769 * init.c (expand_default_init): Don't calculate the in-charge
17771 (build_new_1): Likewise.
17772 * lex.c (cons_up_default_function): Move to method.c.
17773 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17774 (implicitly_declare_fn): New function.
17775 * typeck.c (build_static_cast): Use complete_ctor_identifier.
17776 (build_modify_expr): Likewise.
17777 * typeck2.c (build_functional_cast): Likewise.
17779 Under the new ABI, constructors don't return `this'.
17780 * cp-tree.h (warn_reorder): Declare.
17781 (special_function_kind): New enum.
17782 (global_base_init_list): Remove declaration.
17783 (emit_base_init): Don't return a value.
17784 (check_base_init): Don't declare.
17785 (is_aggr_typedef): Likewise.
17786 * decl.c (check_special_function_return_type): New function.
17787 (return_types): Remove.
17788 (grokdeclarator): Use check_special_function_return_type.
17789 (start_function): Don't initialize ctor_label under the new ABI.
17790 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
17791 * init.c (begin_init_stmts): Move to top of file.
17792 (finish_init_stmts): Likewise.
17793 (warn_reorder): Don't declare.
17794 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
17796 (check_base_init): Remove.
17797 (is_aggr_typedef): Likewise.
17798 (build_new_1): Don't use the return value of a constructor.
17799 * semantics.c (setup_vtbl_ptr): Don't use the return value
17801 * typeck.c (check_return_expr): Don't magically convert return
17802 statements into `return this' in constructors under the new ABI.
17804 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
17805 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
17806 (base_ctor_identifier): New macro.
17807 (base_dtor_identifier): Likewise.
17808 (deleting_dtor_identifier): Likewise.
17809 * decl.c: Don't include obstack.h.
17810 (obstack_chunk_alloc): Don't define.
17811 (obstack_chunk_free): Likewise.
17812 (struct predefined_identifier): New type.
17813 (initialize_predefined_identifiers): New function.
17814 (init_decl_processing): Use it.
17815 (debug_temp_inits): Remove.
17816 (start_method): Don't call preserve_data.
17817 (hack_incomplete_structures): Update comment.
17818 * init.c (init_init_processing): Don't initialize
17820 (build_offset_rf): Remove dead code.
17821 (build_delete): Use CLASSTYPE_N_BASECLASSES.
17822 * search.c (init_search_processing): Don't initialize
17825 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17827 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
17828 some sign_compare warnings.
17830 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17832 Rename abi::__vmi_class_type_info members.
17833 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
17834 base_list, detail_masks members to vmi_flags, vmi_base_count,
17835 vmi_bases and vmi_flags_masks respectively.
17836 (__vmi_class_type_info::vmi_flags_masks): Rename
17837 details_unknown_mask to flags_unknown_mask.
17838 * tinfo.cc (__class_type_info::do_upcast): Adjust.
17839 (__vmi_class_type_info::do_find_public_src): Adjust.
17840 (__vmi_class_type_info::do_dyncast): Adjust.
17841 (__vmi_class_type_info::do_upcast): Adjust.
17843 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17845 * tinfo.cc (convert_to_base): New function.
17846 (get_vbase_offset): Remove. Move into convert_to_base.
17847 (__vmi_class_type_info::do_find_public_src): Adjust.
17848 (__vmi_class_type_info::do_dyncast): Adjust.
17849 (__vmi_class_type_info::do_upcast): Adjust.
17851 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
17853 * tinfo.cc (operator=): Use __builtin_strcmp.
17854 * tinfo2.cc (before): Likewise.
17856 2000-04-06 Mark Mitchell <mark@codesourcery.com>
17858 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
17859 (DECL_SAVED_INLINE): Rename to ...
17860 (DECL_DEFERRED_FN): ... this.
17861 (in_function_p): Remove declaration.
17862 (mark_inline_for_output): Rename to ...
17863 (defer_fn): ... this.
17864 * decl.c (finish_function): Adjust call to mark_inline_for_output.
17865 (in_function_p): Remove definition.
17866 * decl2.c (saved_inlines): Rename to ...
17867 (deferred_fns): ... this.
17868 (saved_inlines_used): Rename to ...
17869 (deferred_fns_used): ... this.
17870 (mark_inline_for_output): Rename to ...
17871 (defer_fn): ... this.
17872 (finish_file): Adjust accordingly.
17873 (init_decl2): Likewise.
17874 * lex.c (cons_up_default_function): Likewise.
17875 * pt.c (mark_decl_instantiated): Likewise.
17876 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
17878 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
17879 * semantics.c (expand_body): Defer more functions.
17881 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17883 * vec.cc: New file.
17884 * Make-lang.in (CXX_LIB2FUNCS): Add it.
17886 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17887 __cxa_vec_delete): Declare.
17889 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17891 * rtti.c (dfs_class_hint_mark): New static function.
17892 (dfs_class_hint_unmark): New static function.
17893 (class_hint_flags): Use them.
17895 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
17897 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
17899 2000-04-05 Mark Mitchell <mark@codesourcery.com>
17901 * cp-tree.h (instantiate_decl): Change prototype.
17902 * decl2.c (mark_used): Adjust call.
17903 * optimize.c (inlinable_function_p): Adjust handling of templates.
17904 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
17905 (do_type_instantiation): Likewise.
17906 (instantiate_decl): Defer more templates.
17907 (instantiate_pending_templates): Adjust logic to handle inline
17910 * Makefile.in (GGC_H): New variable. Use it throughout in place
17913 * call.c: Don't include obstack.h. Include ggc.h.
17914 (obstack_chunk_alloc): Don't define.
17915 (obstack_chunk_free): Likewise.
17916 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
17917 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
17918 (pop_switch): Free it.
17920 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
17922 * dump.c (dequeue_and_dump): Don't try to print the bit_position
17923 if we don't have a DECL_FIELD_OFFSET.
17925 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
17927 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
17928 special_function_p.
17930 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17932 * cfns.gperf (hash, libc_name_p): Prototype.
17934 * rtti.c (build_dynamic_cast_1): Constification.
17936 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
17938 * semantics.c (deferred_type_access_control): Prototype.
17940 2000-04-04 Mark Mitchell <mark@codesourcery.com>
17942 Correct many new ABI issues regarding vbase and vcall offset
17944 * cp-tree.h (BINFO_VTABLE): Document.
17945 (struct lang_type): Tweak formatting.
17946 (BINFO_PRIMARY_BINFO): Add to documentation.
17947 (CLASSTYPE_VSIZE): Fix typo in comment.
17948 (CLASSTYPE_VBASECLASSES): Update documentation.
17949 (BINFO_VBASE_MARKED): Remove.
17950 (SET_BINFO_VBASE_MARKED): Likewise.
17951 (CLEAR_BINFO_VBASE_MARKED): Likewise.
17952 (BINFO_FIELDS_MARKED): Remove.
17953 (SET_BINFO_FIELDS_MARKED): Likewise.
17954 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
17955 (enum access_kind): New enumeration.
17956 (num_extra_vtbl_entries): Remove declaration.
17957 (size_extra_vtbl_entries): Likewise.
17958 (get_vtbl_decl_for_binfo): New function.
17959 (dfs_vbase_unmark): Remove declaration.
17960 (mark_primary_bases): Likewise.
17961 * class.c (SAME_FN): Remove.
17962 (struct vcall_offset_data_s): Move definition.
17963 (build_vbase_pointer): Use `build', not `build_binary_op', to
17964 access the vbase pointer under the new ABI.
17965 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
17966 (build_primary_vtable): Likewise.
17967 (dfs_mark_primary_bases): Move here from search.c.
17968 (mark_primary_bases): Likewise.
17969 (determine_primary_bases): Under the new ABI, don't make a base
17970 class a primary base just because we don't yet have any virtual
17972 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
17973 (num_vfun_entries): Remove.
17974 (dfs_count_virtuals): Likewise.
17975 (num_extra_vtbl_entries): Likewise.
17976 (size_extra_vtbl_entries): Likewise.
17977 (layout_virtual_bases): Iterate in inheritance graph order under
17979 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
17980 indicate that a vfield is present.
17981 (init_class_processing): Initialize access_public_node, etc., from
17983 (get_vtbl_decl_for_binfo): New function.
17984 (dump_class_hierarchy_r): Likewise.
17985 (dump_class_hierarchy): Use it.
17986 (finish_vtbls): Build the vtbls in inheritance graph order.
17987 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17988 (initialize_vtable): Use get_vtbl_decl_for_binfo.
17989 (accumulate_vtbl_inits): Add comments explaining why a pre-order
17991 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
17992 where the vptr points, even for primary vtables.
17993 (build_vtbl_initializer): Adjust handling of vbase and vcall
17995 (build_vcall_and_vbase_vtable_entries): New function.
17996 (dfs_build_vbase_offset_vtbl_entries): Remove.
17997 (build_vbase_offset_vtbl_entries): Reimplement.
17998 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
17999 were already handled in a primary base class vtable.
18000 (build_vcall_offset_vtbl_entries): Adjust.
18001 (build_rtti_vtbl_entries): Adjust.
18002 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18003 * init.c (expand_virtual_init): Simplify.
18004 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18005 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18006 * search.c (BINFO_ACCESS): New macro.
18007 (SET_BINFO_ACCESS): Likewise.
18008 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18009 (access_in_type): Likewise.
18010 (dfs_accessible_p): Likewise.
18011 (protected_accessible_p): Likewise.
18012 (lookup_fnfields_1): Adjust documentation.
18013 (dfs_mark_primary_bases): Move to class.c
18014 (mark_primary_bases): Likewise.
18015 (dfs_vbase_unmark): Remove.
18016 (virtual_context): Use BINFO_FOR_VBASE.
18017 (dfs_get_vbase_types): Simplify.
18018 (dfs_build_inheritance_graph_order): New function.
18019 (get_vbase_types): Use it.
18020 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18022 * tinfo.cc (get_vbase_offset): New function.
18023 (__vmi_class_type_info::do_find_public_src): Use it.
18024 (__vmi_class_type_info::do_dyncast): Likewise.
18025 (__vmi_class_type_info::do_upcast): Likewise.
18027 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
18029 * lang-specs.h: Pass -fno-show-column to the preprocessor.
18031 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
18033 * rtti.c (class_hint_flags): Rename flags.
18034 (class_initializer): Remove flags.
18035 (synthesize_tinfo_var): Combine offset and flags. Add flags
18036 for __vmi_class_type_info.
18037 (create_tinfo_types): Remove flags from __class_type_info and
18038 __si_class_type_info. Merge flags and offset from
18039 base_class_type_info.
18040 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18041 (__base_class_info::is_virtual_p): Adjust.
18042 (__base_class_info::is_public_p): Adjust.
18043 (__base_class_info::offset): New accessor.
18044 (__class_type_info::details): Remove member.
18045 (__class_type_info::__class_type_info): Lose details.
18046 (__class_type_info::detail_masks): Remove.
18047 (__si_class_type_info::__si_class_type_info): Lose details.
18048 (__vmi_class_type_info::details): New member.
18049 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18050 (__vmi_class_type_info::detail_masks): New member.
18051 * tinfo.cc (__class_type_info::do_upcast): Initialize result
18052 with unknown_details_mask.
18053 (__vmi_class_type_info::do_find_public_src): Adjust
18054 (__vmi_class_type_info::do_dyncast): Adjust.
18055 (__vmi_class_type_info::do_upcast): Set result details, if
18057 (__dynamic_cast): Temporarily #if out optimization.
18059 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
18061 * rtti.c (get_tinfo_decl): Mark used.
18062 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18063 mark as dealt with, if we output it.
18065 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18067 * class.c: Reorganize to put virtual function table initialization
18068 machinery at the end of the file.
18070 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
18072 * class.c (finish_struct): Use bitsize_zero_node.
18073 * pt.c (instantiate_class_template): Likewise.
18075 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18077 Put RTTI entries at negative offsets in new ABI.
18078 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18079 vbase offset at index -3, not -1.
18080 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18081 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18082 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18083 (build_rtti_vtbl_entries): New function.
18084 (set_rtti_entry): Remove.
18085 (build_primary_vtable): Don't use it.
18086 (build_secondary_vtable): Likewise.
18087 (start_vtable): Remove.
18088 (first_vfun_index): New function.
18089 (set_vindex): Likewise.
18090 (add_virtual_function): Don't call start_vtable. Do call
18092 (set_primary_base): Rename parameter.
18093 (determine_primary_base): Likewise.
18094 (num_vfun_entries): Don't use skip_rtti_stuff.
18095 (num_extra_vtbl_entries): Include RTTI information.
18096 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18097 (skip_rtti_stuff): Remove.
18098 (dfs_modify_vtables): Don't use it.
18099 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
18100 (layout_nonempty_base_or_field): Update size handling.
18101 (create_vtable_ptr): Tweak.
18102 (layout_class_type): Adjust parameter names.
18103 (finish_struct_1): Simplify.
18104 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18105 (skip_rtti_stuff): Remove.
18106 (first_vfun_index): New function.
18107 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18108 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18109 (marked_vtable_pathp): Declare.
18110 (unmarked_vtable_pathp): Likewise.
18111 * error.c (dump_expr): Use first_vfun_index to calculate vtable
18113 * rtti.c (build_headof): Look for RTTI at negative offsets.
18114 (get_tinfo_decl_dynamic): Likewise.
18115 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18117 (create_pseudo_type_info): Do it here instead. Adjust so that
18118 vptr points at first virtual function.
18119 * search.c (marked_vtable_pathp): Make it global.
18120 (unmarked_vtable_pathp): Likewise.
18121 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18122 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18123 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18124 (get_pure_virtuals): Likewise.
18125 (expand_upcast_fixups): Likewise.
18126 * tree.c (debug_binfo): Likewise.
18127 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18130 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18132 * class.c (check_field_decl): Fix typo.
18133 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18134 (check_methods): Likewise.
18135 (check_field_decls): Likewise.
18136 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18137 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18138 Use DECL_RESULT_FLD, not DECL_RESULT.
18139 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18140 * lex.c (identifier_type): Likewise.
18141 * pt.c (determine_specialization, lookup_template_class): Likewise.
18142 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18143 (resolve_overloaded_unification, more_specialized): Likewise.
18144 * semantics.c (finish_member_declaration): Likewise.
18145 * typeck.c (build_x_function_call): Likewise.
18147 2000-03-26 Mark Mitchell <mark@codesourcery.com>
18149 * class.c (layout_empty_base): Handle empty bases with non-byte
18151 (build_base_field): Likewise.
18152 (layout_virtual_bases): Likewise.
18154 * class.c (finish_struct_1): Fix typo in this change:
18156 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18158 2000-03-25 Mark Mitchell <mark@codesourcery.com>
18160 * decl.c (grokdeclarator): Count partial specializations when
18161 keeping track of how many template classes have been seen.
18163 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18165 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18167 * class.c (build_vbase_pointer_fields): layout_field now place_field.
18168 (get_vfield_offset): Use byte_position.
18169 (set_rtti_entry): Set OFFSET to ssizetype zero.
18170 (get_binfo_offset_as_int): Deleted.
18171 (dfs_record_base_offsets): Use tree_low_cst.
18172 (dfs_search_base_offsets): Likewise.
18173 (layout_nonempty_base_or_field): Reflect changes in RLI format
18174 and call byte_position.
18175 (layout_empty_base): Convert offset to ssizetype.
18176 (build_base_field): use rli_size_unit_so_far.
18177 (dfs_propagate_binfo_offsets): Do computation in proper type.
18178 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18179 (layout_class_type): Reflect changes in RLI names and fields.
18180 (finish_struct_1): Set DECL_FIELD_OFFSET.
18181 * dump.c (dequeue_and_dump): Call bit_position.
18182 * expr.c (cplus_expand_constant): Use byte_position.
18183 * rtti.c (expand_class_desc): Use bitsize_one_node.
18184 * typeck.c (build_component_addr): Use byte_position and don't
18185 special case for zero offset.
18187 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
18189 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18191 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18193 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18196 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18198 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18200 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18201 make_typename_type, check_initializer, cp_finish_decl,
18202 xref_tag): Likewise.
18203 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18204 decl_namespace, arg_assoc_template_arg, arg_assoc,
18205 validate_nonmember_using_decl, do_class_using_decl): Likewise.
18206 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18207 args_to_string): Likewise.
18208 * friend.c (is_friend): Likewise.
18209 * lex.c (note_got_semicolon, note_list_got_semicolon,
18210 is_global): Likewise.
18211 * method.c (build_overload_nested_name, build_overload_value,
18212 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18213 * parse.y (typename_sub, typename_sub1): Likewise.
18214 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18215 process_partial_specialization, convert_template_argument,
18216 template_args_equal, add_pending_template, lookup_template_class,
18217 for_each_template_parm_r, maybe_fold_nontype_arg,
18218 tsubst, instantiate_template, type_unification_real, unify,
18219 instantiate_pending_templates, set_mangled_name_for_template_decl):
18221 * repo.c (repo_get_id, repo_template_used): Likewise.
18222 * search.c (lookup_field_1): Likewise.
18223 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18224 * xref.c (classname): Likewise.
18226 2000-03-22 Mark Mitchell <mark@codesourcery.com>
18228 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18229 (CANONICAL_BINFO): New macro.
18230 (BINFO_NEW_VTABLE_MARKED): Use it.
18231 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18232 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18233 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18235 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18236 (build_secondary_vtable): Likewise.
18237 (dfs_finish_vtbls): Likewise.
18238 (dfs_accumulate_vtbl_inits): Likewise.
18239 (accumulate_vtbl_inits): New function.
18240 (finish_vtbls): Make sure that virtual bases come after
18241 non-virtual bases in the vtable group.
18242 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18243 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18244 * search.c (struct vbase_info): Move definition.
18245 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18246 (unmarked_new_vtable_p): Likewise.
18247 (dfs_mark_vtable_path): Remove.
18248 (dfs_mark_new_vtable): Remove.
18249 (dfs_unmark_new_vtable): Likewise.
18250 (dfs_clear_search_slot): Likewise.
18251 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18252 (dfs_clear_vbase_slots): Likewise.
18253 (init_vbase_pointers): LIkewise.
18255 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
18257 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18258 SIZETYPE to a non-SIZETYPE.
18260 2000-03-21 Mark Mitchell <mark@codesourcery.com>
18262 * class.c (layout_virtual_bases): Adjust names in conditionally
18265 * class.c (record_base_offsets): New function.
18266 (layout_conflict_p): Likewise.
18267 (layout_nonempty_base_or_field): Use it.
18268 (layout_empty_base): New function.
18269 (build_base_field): Use it.
18270 (build_base_fields): Update comment.
18271 (layout_virtual_bases): Fold in a little code form
18272 layout_basetypes. Use layout_empty_base.
18273 (layout_basetypes): Remove.
18274 (end_of_class): New function.
18275 (layout_class_type): Use it. Adjust.
18277 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18278 (fntype_p): Remove.
18279 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18281 (dfs_skip_nonprimary_vbases_markedp): Likewise.
18282 * typeck.c (fntype_p): Remove.
18284 * cp-tree.h (TI_SPEC_INFO): Remove.
18285 (CLASSTYPE_TI_SPEC_INFO): Likewise.
18286 * pt.c (process_partial_specialization): Likewise.
18288 * class.c (build_base_field): Fix thinko in computation of binfo
18291 * tree.c (mark_local_for_remap_p): Mark variables declared in
18292 TARGET_EXPRs as well.
18294 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18296 * typeck.c (require_complete_type, complete_type,
18297 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18298 build_array_ref, convert_arguments, pointer_diff,
18299 build_x_unary_op, build_unary_op, build_c_cast,
18300 build_modify_expr): Use COMPLETE_TYPE_P etc.
18301 * call.c (is_complete, convert_like_real,
18302 build_new_method_call): Likewise.
18303 * class.c (build_vbase_pointer_fields, check_bases,
18304 build_base_field, finish_struct_1, pushclass): Likewise.
18305 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18306 * decl.c (maybe_process_template_type_declaration, pushtag,
18307 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18308 layout_var_decl, check_initializer, cp_finish_decl,
18309 grokdeclarator, require_complete_types_for_parms,
18310 grok_op_properties, xref_tag, xref_basetypes,
18311 check_function_type): Likewise.
18312 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18313 * friend.c (do_friend): Likewise.
18314 * init.c (build_offset_ref): Likewise.
18315 * parse.y (structsp): Likewise.
18316 * pt.c (maybe_process_partial_specialization,
18317 tsubst_friend_function, instantiate_class_template, tsubst,
18318 do_type_instantiation, instantiate_pending_templates): Likewise.
18319 * repo.c (repo_get_id): Likewise.
18320 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18321 synthesize_tinfo_var, emit_support_tinfos): Likewise.
18322 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18323 * semantics.c (begin_class_definition): Likewise.
18324 * tree.c (build_cplus_method_type): Likewise.
18325 * typeck2.c (digest_init, build_functional_cast,
18326 add_exception_specifier): Likewise.
18327 * parse.h, parse.c: Regenerated.
18329 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18331 * inc/cxxabi.h: New header file. Define new-abi entry points.
18332 (__pointer_type_info::target): Rename member to ...
18333 (__pointer_type_info::type): ... here.
18334 (__base_class_info::type): Rename member to ...
18335 (__base_class_info::base): ... here.
18336 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18337 * cp-tree.h (CPTI_ABI): New global tree enumeration.
18338 (abi_node): New global tree node.
18339 * decl.c (abi_node): Document.
18340 (init_decl_processing): Initialize abi_node.
18341 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18342 (get_vmi_pseudo_type_info): Likewise.
18343 (create_tinfo_types): Likewise.
18344 (emit_support_tinfos): Likewise.
18345 * tinfo.h (cxxabi.h): Include for new-abi.
18346 Move rtti class definitions to new header file.
18347 * tinfo.cc (abi): Use the namespace.
18348 (std): Move new abi rtti classes from here ...
18349 (__cxxabiv1): ... to here.
18350 * tinfo2.cc (cxxabi.h): Include for new-abi.
18351 Move rtti class definitions to new header file.
18352 (std): Move new abi rtti classes from here ...
18353 (__cxxabiv1): ... to here.
18354 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18357 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18358 Jason Merrill <jason@casey.cygnus.com>
18360 * method.c (build_overload_int): Use host_integerp.
18362 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18364 * init.c (build_offset_ref): Handle the case of a templated member
18367 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18369 * except.c (expand_exception_blocks): Clear catch_clauses_last.
18371 2000-03-18 Mark Mitchell <mark@codesourcery.com>
18373 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18374 * class.c (check_bitfield_decl): Turn illegal bitfields into
18376 (dfs_propagate_binfo_offsets): Adjust for new size_binop
18378 (dfs_offset_for_unshared_vbases): Likewise.
18379 * cvt.c (cp_convert_to_pointer): Convert NULL to a
18380 pointer-to-member correctly under the new ABI.
18381 * expr.c (cplus_expand_constant): Don't use cp_convert when
18382 turning an offset into a pointer-to-member.
18383 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18384 when dereferencing them under the new ABI.
18385 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
18386 of pointers-to-members under the new ABI.
18388 * class.c (check_bitfield_decl): Remove restriction on really long
18390 (layout_class_type): Implement new ABI handling of bitfields
18391 longer than their types.
18393 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18395 * parse.y (extdefs): Call ggc_collect.
18396 * parse.c: Regenerated.
18398 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
18400 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
18401 (note_name_declared_in_class): Use OVL_CURRENT to get at a
18402 potential overload.
18404 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18406 * class.c (build_vbase_path): Use integer_zerop.
18407 (build_vtable_entry): Use tree_low_cst.
18408 (get_vfield_offset): Use bit_position.
18409 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
18411 (check_bitfield_decl): Set DECL_SIZE using convert.
18412 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
18413 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
18415 (finish_struct_1): Use bit_position.
18416 (dump_class_hierarchy): Use tree_low_cst.
18417 * cp-tree.h (min_precision): Add declaration.
18418 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
18419 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
18420 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
18421 * expr.c (cplus_expand_constant): Use bit_position.
18422 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
18423 * rtti.c (get_base_offset): Use bit_position.
18424 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
18425 host_integerp, and tree_low_cst.
18426 (pointer_int_sum): Use integer_zerop.
18427 (build_component_addr): Use bit_position.
18429 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
18431 * typeck.c (require_complete_type): Don't assume size_zero_node.
18432 (complete_type_or_else): Likewise.
18434 2000-03-16 Steven Grady <grady@digitaldeck.com>
18435 Jason Merrill <jason@casey.cygnus.com>
18437 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
18439 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
18441 * decl2.c (grokfield): Bail out if type is error_mark_node.
18443 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18445 * tinfo2.cc (__ptr_to_member_data): Rename to ...
18446 (__pointer_to_member_data): ... here. Adjust.
18447 * rtti.c (create_tinfo_types): Adjust.
18449 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18451 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
18452 * decl.c (ref_desc_type_node): Undocument.
18453 * rtti.c (ptr_ref_initializer): Rename to ...
18454 (ptr_initializer): ... here. Adjust comments.
18455 (ptmd_initializer): Fix comment thinko.
18456 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
18457 (create_tinfo_types): Remove ref_desc_type_node init.
18458 * tinfo2.cc (__reference_type_info): Remove.
18460 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18462 * decl.c (cp_finish_decl): Remove obsolete comment.
18464 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
18466 2000-03-14 Mark Mitchell <mark@codesourcery.com>
18468 * cp-tree.h: Tweak documentation.
18469 * class.c (build_vbase_pointer_fields): Layout the fields, too.
18470 (avoid_overlap): Remove.
18471 (get_binfo_offset_as_int): New function.
18472 (dfs_serach_base_offsets): Likewise.
18473 (layout_nonempty_base_or_field): Likewise.
18474 (build_base_field): Layout fields here. Avoid placing two objects
18475 of the same type at the same address, under the new ABI.
18476 (build_base_fields): Adjust accordingly.
18477 (create_vtable_ptr): Return the new field, but don't attach it to
18479 (remove_base_field): Remove.
18480 (remove_base_fields): Remove.
18481 (layout_basetypes): Adjust accordingly.
18482 (layout_class_type): Call layout_field for each field, rather than
18483 just making a wholesale call to layout_type.
18485 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
18487 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
18489 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
18491 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
18493 * except.c (dtor_nothrow): New fn.
18494 (do_pop_exception): Use it. Take type parm.
18495 (push_eh_cleanup): Take type parm.
18496 (expand_start_catch_block): Pass it.
18497 (build_eh_type_type_ref): Accept null type.
18499 2000-03-12 Mark Mitchell <mark@codesourcery.com>
18501 * cp-tree.h (revert_static_member_fn): Change prototype.
18502 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
18503 (grok_op_properties): Likewise.
18504 (start_function): Likewise.
18505 (revert_static_member_fn): Simplify.
18506 * pt.c (check_explicit_specialization): Adjust call to
18507 revert_static_member_fn.
18509 2000-03-11 Mark Mitchell <mark@codesourcery.com>
18511 * cp-tree.h (scope_kind): New type.
18512 (tmpl_spec_kind): Likewise.
18513 (declare_pseudo_global_level): Remove.
18514 (pseudo_global_level_p): Rename to template_parm_scope_p.
18515 (pushlevel): Remove declaration.
18516 (begin_scope): New function.
18517 (finish_scope): Likewise.
18518 (current_tmpl_spec_kind): Likewise.
18519 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
18520 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
18521 Add template_spec_p.
18522 (toplevel_bindings_p): Adjust.
18523 (declare_pseudo_global_level): Remove.
18524 (pseudo_global_level_p): Rename to template_parm_scope_p.
18525 (current_tmpl_spec_kind): New function.
18526 (begin_scope): Likewise.
18527 (finish_scope): Likewise.
18528 (maybe_push_to_top_level): Adjust.
18529 (maybe_process_template_type_declaration): Likewise.
18530 (pushtag): Likewise.
18531 (pushdecl_nonclass_level): Likewise.
18532 (lookup_tag): Likewise.
18533 (grokfndecl): Handle member template specializations. Share
18534 constructor and non-constructor code.
18535 * decl2.c (check_classfn): Handle member template specializations.
18536 * pt.c (begin_template_parm_list): Use begin_scope.
18537 (begin_specialization): Likewise.
18538 (end_specialization): Likewise.
18539 (check_explicit_specialization): Use current_tmpl_spec_kind.
18540 Handle member template specializations.
18541 (end_template_decl): Use finish_scope. Remove call to
18543 (push_template_decl_real): Remove bogus error message.
18544 (tsubst_decl): Fix typo in code contained in comment.
18545 (instantiate_template): Handle member template specializations.
18546 (most_general_template): Likewise.
18548 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
18550 * lex.c (whitespace_cr): Compress consecutive calls to warning().
18551 (do_identifier): Ditto for error().
18553 * pt.c (convert_nontype_argument): Ditto for cp_error().
18554 (convert_template_argument): Ditto for cp_pedwarn().
18556 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
18558 * exception.cc (__check_null_eh_spec): New fn.
18559 * except.c (expand_end_eh_spec): Call it if the spec is throw().
18561 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18563 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
18564 * except.c (expand_end_eh_spec): Add the return type.
18565 * rtti.c (throw_bad_cast): Add the parmtypes.
18566 (throw_bad_typeid): Likewise.
18568 * semantics.c (expand_stmt): Only leave out rtl for unused
18569 artificials, and set DECL_IGNORED_P on them as well.
18570 * decl.c (wrapup_globals_for_namespace): Likewise.
18572 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
18574 * decl.c (maybe_commonize_var): Skip all artificial decls.
18575 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
18577 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18579 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
18580 * cp-tree.h: Declare flag_enforce_eh_specs.
18581 * decl.c (store_parm_decls, finish_function): Check it.
18583 C library functions don't throw.
18584 * Makefile.in (cfns.h): New target.
18585 (except.o): Depend on it.
18586 * Make-lang.in (cc1plus): Depend on cfns.gperf.
18587 * cfns.gperf: New file.
18588 * cfns.h: Generated.
18589 * except.c: Include it.
18590 (nothrow_libfn_p): New fn.
18591 * decl.c (grokfndecl): Use it.
18592 * cp-tree.h: Declare it.
18594 * decl.c (push_overloaded_decl_1, auto_function,
18595 define_function): Lose.
18596 (build_library_fn_1): New static fn.
18597 (builtin_function): Use it.
18598 (get_atexit_node): Use build_library_fn_ptr.
18599 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
18600 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
18601 push_void_library_fn, push_throw_library_fn): New fns.
18602 * cp-tree.h: Declare them.
18603 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18604 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18605 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18606 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18607 * rtti.c (build_runtime_decl): Lose.
18608 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18609 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18610 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18612 * call.c (build_call): Remove result_type parm.
18613 Call mark_used on unused artificial fns.
18614 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18616 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
18618 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18620 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18621 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18622 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18623 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18624 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18625 expand_generic_desc): Likewise.
18627 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18629 * exception.cc (__cp_pop_exception): Cleanup the original object.
18631 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18633 * decl.c (grok_op_properties): Merge conversion to void warning
18634 with other silly op warnings.
18636 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
18638 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18639 array CONSTRUCTOR elements. Don't use expr_tree_cons.
18641 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18643 * decl.c (cp_make_fname_decl): New function.
18644 (wrapup_globals_for_namespace): Don't emit unused static vars.
18645 (init_decl_processing): Remove comment about use of
18646 array_domain_type. Set make_fname_decl.
18647 (cp_finish_decl): Remove __FUNCTION__ nadgering.
18648 * semantics.c (begin_compound_stmt): Remove
18649 current_function_name_declared flagging.
18650 (expand_stmt): Don't emit unused local statics.
18651 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18654 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18656 * typeck.c (convert_for_assignment): Don't look at array
18658 * call.c (convert_like_real): Likewise.
18660 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
18662 Add initial support for '\uNNNN' specifier.
18663 * lex.c (read_ucs): New fn.
18664 (readescape, skip_white_space): Call it.
18665 (is_extended_char, is_extended_char_1): New fns.
18666 (utf8_extend_token): New fn, #if 0'd out.
18667 (real_yylex): Treat extended chars like letters.
18669 * search.c (note_debug_info_needed): Walk the bases even if we
18670 weren't deferring the type itself.
18672 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18674 * decl2.c (finish_objects): Constify a char*.
18676 * method.c (emit_thunk): Likewise.
18678 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
18680 * typeck.c (dubious_conversion_warnings): Look through
18683 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18685 * class.c (dfs_modify_vtables): I is now unsigned.
18686 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18687 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18688 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18689 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18690 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18691 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18692 Call integer_all_onesp.
18693 * typeck2.c (process_init_constructor): Use compare_tree_int.
18695 * lang-specs.h (as): Don't call if -syntax-only.
18697 2000-03-06 Mark Mitchell <mark@codesourcery.com>
18699 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18700 RTL_EXPR_HAS_NO_SCOPE after all.
18702 2000-03-05 Mark Mitchell <mark@codesourcery.com>
18704 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18705 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
18706 RTL_EXPR_HAS_NO_SCOPE.
18708 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18711 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18713 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
18715 * call.c (convert_like): Macrofy.
18716 (convert_like_with_context): New macro.
18717 (convert_like_real): Renamed from convert_like. Add calling
18718 context parameters, for diagnostics. Add recursive flag. Call
18719 dubious_conversion_warnings for outer conversion.
18720 (build_user_type_conversion): Use convert_like_with_context.
18721 (build_over_call): Likewise. Don't warn about dubious
18722 conversions here. Adjust convert_default_arg calls.
18723 (convert_default_arg): Add context parameters for diagnostics.
18724 Pass through to convert_like_with_context.
18725 * cp-tree.h (convert_default_arg): Add context parameters.
18726 (dubious_conversion_warnings): Prototype new function.
18727 * typeck.c (convert_arguments): Adjust convert_default_arg call.
18728 (dubious_conversion_warnings): New function, broken
18729 out of convert_for_assignment.
18730 (convert_for_assignment): Adjust.
18732 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
18734 * decl2.c (key_method): Break out from...
18735 (import_export_vtable, import_export_class): ...here.
18737 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18738 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18740 * search.c (note_debug_info_needed, dfs_debug_mark,
18741 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
18742 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18744 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
18746 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18749 2000-03-02 Mark Mitchell <mark@codesourcery.com>
18751 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18752 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18753 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18754 (lang_type): Split gets_new into has_new and has_array_new.
18755 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18756 (TYPE_GETS_NEW): Split into ...
18757 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18758 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18759 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18760 (build_op_new_call): Don't declare.
18761 (build_new_1): Likewise.
18762 * call.c (build_op_new_call): Remove.
18763 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18764 instead of TYPE_NEEDS_DESTRUCTOR.
18765 (finish_struct_bits): Likewise.
18766 (add_implicitly_declared_members): Likewise.
18767 (check_field_decl): Likewise.
18768 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18769 correctly under the new ABI.
18770 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18771 instead of TYPE_NEEDS_DESTRUCTOR.
18772 (initialize_local_var): Likewise.
18773 (destroy_local_var): Likewise.
18774 (cp_finish_decl): Likewise.
18775 (register_dtor_fn): Likewise.
18776 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18777 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
18778 TYPE_VEC_DELETE_TAKES_SIZE here.
18779 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18780 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18781 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18782 (finish_destructor_body): Likewise.
18783 (maybe_build_cleanup_1): Likewise.
18784 * decl2.c (do_static_destruction): Likewise.
18785 * init.c (build_new_1): Make it static.
18786 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18787 (expand_cleanup_for_base): Likewise.
18788 (get_cookie_size): New function.
18789 (build_new_1): Handle array-new cookies correctly under the new
18791 (build_vec_delete_1): Likewise.
18792 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18793 (build_delete): Likewise.
18794 (build_vec_delete): Handle array-new cookies correctly under the new
18796 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18797 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
18798 TYPE_HAS_ARRAY_NEW_OPERATOR.
18799 * ptree.c (print_lang_type): Check them.
18800 * search.c (context_for_name_lookup): Fix typo in comment.
18801 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18802 * tree.c (break_out_cleanups): Likewise.
18803 (build_cplus_array_test_1): Likewise.
18804 (cp_build_qualified_type_real): Likewise.
18805 * typeck.c (complete_type): Likewise.
18807 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
18808 the command-line, not the end.
18810 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
18812 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
18814 2000-03-02 Tom Tromey <tromey@cygnus.com>
18816 * cp-tree.h (build_java_class_ref): Declare.
18817 * init.c (build_java_class_ref): No longer static.
18818 * except.c (expand_throw): Generate a Java-style `throw' if the
18819 thrown object is a "Java" object.
18820 (initialize_handler_parm): Generate a Java-style lookup of
18821 exception info if the caught object is a "Java" object.
18822 (catch_language, catch_language_init): New globals.
18823 (decl_is_java_type): New function.
18824 (expand_start_catch_block): Don't call push_eh_info() or
18825 push_eh_cleanup() when handling a Java-style "catch". Pass Java
18826 class reference to build_catch_block.
18828 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18830 * typeck.c (comptypes): Treat sizetype like its language equivalent.
18832 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
18834 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
18835 to merge reference/pointer code and fix incorrect warnings.
18837 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
18839 * search.c (protected_accessible_p): Use context_for_name_lookup.
18841 * init.c (construct_virtual_bases): Fix thinko.
18842 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
18844 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
18846 * decl.c (current_function_decl): Move to toplev.c.
18848 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
18850 * pt.c (fn_type_unification): Unify return type, whenever
18852 (get_bindings_real): Only pass return type when necessary.
18853 Remove explicit return type check.
18854 * class.c (resolve_address_of_overloaded_function): Pass desired
18855 return type to fn_type_unification.
18857 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18859 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
18861 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
18863 * rtti.c (expand_class_desc): Likewise.
18864 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
18865 (THUNK_VCALL_OFFSET): Likewise.
18866 (THUNK_DELTA): Reflect changes in ../tree.h.
18868 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
18870 * search.c (protected_accessible_p): Also allow the access if
18871 the member is public in DERIVED. Lose TYPE parm.
18872 (friend_accessible_p): Lose TYPE parm.
18873 (accessible_p): Adjust.
18875 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18877 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
18878 on things that are not sizes; ssize_binop deleted.
18879 Call size_diffop when appropriate.
18880 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18881 (build_primary_vtable, build_secondary_vtable): Likewise.
18882 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
18883 Variable I is HOST_WIDE_INT.
18884 (get_vfield_offset): Pass proper types to size_binop.
18885 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
18886 (finish_struct_1): Likewise.
18887 (skip_rtti_stuff): Arg N is now pointer to signed.
18888 (layout_class_type): Use size_zero_node.
18889 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
18890 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
18891 * decl.c (complete_arry_type): Pass proper types to size_binop.
18892 (xref_basetypes): BINFO_OFFSET is sizetype.
18893 * error.c (dump_expr): Don't use size_binop non-sizes.
18894 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
18895 * init.c (construct_virtual_bases): Fix type error.
18896 (build_vec_delete_1): Pass proper type to size_binop and don't
18898 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
18899 * rtti.c (get_base_offset): Pass proper type to size_binop.
18900 * search.c (dfs_find_vbases): Fix type error.
18901 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
18902 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
18903 * tree.c (debug_binfo): Variable N is signed.
18904 Use HOST_WIDE_INT_PRINT_DEC.
18905 * typeck.c (comptypes): sizetype is same as equivalent integer type.
18906 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
18907 size_one_node and size_zero_node.
18908 (c_alignof): Use size_one_node.
18909 (build_component_addr): Pass proper types to size_binop.
18910 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
18912 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
18914 Implement class scope using-declarations for functions.
18915 * class.c (handle_using_decl): Call add_method for used functions.
18916 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
18917 (add_method): Used functions are hidden by local functions.
18918 (check_bases_and_members): Handle using-decls before finalizing
18919 CLASSTYPE_METHOD_VEC.
18920 * call.c (add_function_candidate): Add ctype parm; if nonzero,
18921 override the type of 'this' accordingly.
18922 (add_template_candidate, add_template_candidate_real): Add ctype parm.
18923 (convert_class_to_reference, build_user_type_conversion_1,
18924 build_new_function_call, build_object_call, build_new_op,
18925 build_new_method_call): Pass ctype parm.
18927 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
18929 * call.c (convert_class_to_reference, build_user_type_conversion_1,
18930 build_new_function_call, build_object_call, build_new_op,
18931 build_new_method_call, build_op_delete_call): Don't get basetype_path
18933 * typeck.c (build_component_ref): Likewise.
18934 * init.c (build_offset_ref): Likewise.
18935 (resolve_offset_ref): Don't call enforce_access.
18936 Call build_scoped_ref.
18937 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
18938 would cause an error or if -pedantic.
18939 * class.c (alter_access): Lose binfo parm.
18941 2000-02-26 Mark Mitchell <mark@codesourcery.com>
18943 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
18946 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
18948 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
18949 pseudo_type_info creation into the std namespace
18951 2000-02-26 Mark Mitchell <mark@codesourcery.com>
18953 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
18954 (import_export_class): Remove declaration.
18955 * decl2.c (import_export_class): Make it static.
18956 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
18957 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
18958 EXPR_WITH_FILE_LOCATION.
18959 * lex.c (check_newline): Tweak filename/lineno setting.
18960 * semantics.c (begin_while_stmt): Fix typo in comment.
18962 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18964 * lang-options.h (-fmessage-length=): Add missing option.
18966 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
18968 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
18970 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
18972 2000-02-25 Jim Wilson <wilson@cygnus.com>
18974 * optimize.c (expand_call_inline): Emit the return label before
18975 evaluating the return value.
18977 2000-02-24 Mark Mitchell <mark@codesourcery.com>
18979 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
18980 than duplicating functionality here.
18981 * optimize.c: Include input.h.
18982 (expand_call_inline): Use push_srcloc and pop_srcloc.
18983 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
18984 * parse.c: Regenerated.
18985 * Makefile.in (lex.o): Depend on input.h.
18986 (optimize.o): Likewise.
18988 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
18990 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
18991 function type, rather than ICE.
18993 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
18995 * decl.c (grokdeclarator): Call decl_type_access_control.
18996 * parse.y (parse_end_decl): Don't call decl_type_access_control if
18999 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
19001 * decl.c (decls_match): Remove obsolete static member nadgering.
19003 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19005 * decl.c (grokdeclarator): Change ANSI to ISO.
19006 * lex.c (consume_string, readescape, do_identifier): Likewise.
19007 (parse_float, real_yylex): Likewise.
19008 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19009 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19010 new_type_id, maybe_label_decls, simple_stmt,
19011 for.init.statement): Likewise.
19012 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19013 * semantics.c (finish_named_return_value): Likewise.
19014 * parse.c: Regenerate.
19016 2000-02-21 Mark Mitchell <mark@codesourcery.com>
19018 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19019 (CPTI_CLASS_STAR_TYPE): Remove.
19020 (vtable_index_type): Likewise.
19021 (class_star_type_node): Remove.
19022 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19023 (build_binary_op_nodefault): Remove.
19024 * call.c (build_new_op): Use build_binary_op instead of
19025 build_binary_op_nodefault.
19026 * decl.c (init_decl_processing): Remove class_star_type_node
19027 initialization. Make delta_type_node ptrdiff_type_node under the
19028 new ABI. Initialize vtable_index_type.
19029 (build_ptrmemfunc_type): Build different structures for the new
19031 (build_enumerator): Use build_binary_op instead of
19032 build_binary_op_nodefault.
19033 * method.c (build_overload_value): Mangle pointers-to-members
19034 appropriately under the new ABI.
19035 * typeck.c (build_array_ref): Use build_binary_op instead of
19036 build_binary_op_nodefault.
19037 (get_member_function_from_ptrfunc): Adjust for the new ABI.
19038 (build_binary_op_nodefault): Rename to ...
19039 (build_binary_op): ... this. Remove old version. Adjust for
19040 pointer-to-member comparisons under the new ABI.
19041 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
19042 (build_ptrmemfunc): Adjust for the new ABI.
19043 (expand_ptrmemfunc_cst): Likewise.
19044 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19045 (pfn_from_ptrmemfunc): Adjust for the new ABI.
19047 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
19049 * call.c (build_object_call): Compress consecutive calls to
19051 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19052 (build_op_delete_call): Adjust message formatting.
19054 * class.c (check_bases): Compress consecutive calls to
19056 (finish_struct_anon): Say 'ISO C++'.
19058 * decl.c (start_decl): Same here.
19059 (grok_reference_init): Likewise.
19060 (grokfndecl): Correct message formatting.
19061 (grokfndecl): Improve diagnostic.
19062 (check_static_variable_definition): Likewise. Say 'ISO C++'
19063 (compute_array_index_type): Say 'ISO C++'
19064 (create_array_type_for_decl): Compress consecutive calls to
19066 (grokdeclarator): Say 'ISO C++'
19067 (grok_op_properties): Likewise.
19069 * decl2.c (delete_sanity): Clairify diagnostic.
19070 (check_member_template): Same here.
19071 (grok_function_init): Use consistent terminology.
19073 * expr.c (do_case): Say 'ISO C++'
19075 * friend.c (do_friend): Compress consecutive calls to warning.
19077 2000-02-20 Mark Mitchell <mark@codesourcery.com>
19079 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19080 * class.c (build_secondary_vtable): Reorganize. Don't create a
19081 new vtable under the new ABI.
19082 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19083 computing the size.
19084 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19085 the initializing elements.
19086 (initialize_vtable): New function.
19087 (dfs_finish_vtbls): Use it.
19088 (dfs_accumulate_vtbl_inits): New function.
19089 (finish_vtbls): Merge primary and secondary vtables under the new
19091 (finish_struct_1): Remove redundant call to layout_vtable_decl.
19092 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19095 * class.c (build_vtable): New function, split out from ...
19096 (get_vtable_decl): ... here, and ...
19097 (build_secondary_vtable): ... here.
19099 * pt.c (tsubst_decl): Fix formatting.
19101 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19103 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19104 (avoid_overlap, build_base_field): Likewise.
19105 (build_base_field, build_base_fields, is_empty_class):
19106 Test DECL_SIZE with integer_zero.
19107 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19108 * cp-tree.h (struct lang_type): New field size_unit.
19109 (CLASSTYPE_SIZE_UNIT): New macro.
19110 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19111 (cp_finish_decl): Delete -Wlarger-than processing.
19112 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19113 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19114 * tree.c (make_binfo): binfo vector is one entry longer.
19115 (walk_tree): Walk DECL_SIZE_UNIT.
19117 2000-02-19 Mark Mitchell <mark@codesourcery.com>
19119 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19121 (build_vtable_entry): Don't assume all vtable entries are
19123 (build_vtbl_initializer): Adjust accordingly.
19124 (get_vtable_decl): Fix formatting.
19126 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
19128 * semantics.c (deferred_type_access_control): Walk the entire
19130 (save_type_access_control): Rename from
19131 initial_deferred_type_access_control. Just remember the value.
19132 (decl_type_access_control): New fn.
19133 (begin_function_definition): Use deferred_type_access_control, after
19134 we've started the function. Set type_lookups to error_mark_node.
19135 * parse.y (frob_specs, fn.def1): Adjust.
19136 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19137 (parse_end_decl, parse_bitfield0, parse_method): New fns.
19138 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19139 (after_type_component_declarator0): Likewise.
19140 (after_type_component_declarator): Likewise.
19141 (notype_component_declarator): Likewise.
19142 * cp-tree.h: Adjust.
19144 * decl.c (redeclaration_error_message): Allow redeclaration of
19145 namespace-scope decls.
19147 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
19149 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19151 2000-02-17 Mark Mitchell <mark@codesourcery.com>
19153 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19154 * decl2.c (grokclassfn): Likewise.
19156 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19158 * decl2.c (lang_decode_option): Don't set default message length
19160 * lex.c (lang_init_options): Set it here.
19162 2000-02-16 Mark Mitchell <mark@codesourcery.com>
19164 Make DECL_CONTEXT mean the class in which a member function was
19165 declared, even for a virtual function.
19166 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19167 (DECL_FRIEND_CONTEXT): New macro.
19168 (DECL_REAL_CONTEXT): Remove.
19169 (SET_DECL_FRIEND_CONTEXT): Likewise.
19170 (DECL_VIRTUAL_CONTEXT): Adjust.
19171 (DECL_CLASS_SCOPE_P): Use TYPE_P.
19172 (add_friends): Remove.
19173 (hack_decl_function_context): Likewise.
19174 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19176 (build_over_call): Fix indentation. Use DECL_CONTEXT
19177 instead of DECL_CLASS_CONTEXT.
19178 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19179 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19180 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19181 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19182 (build_base_field): Likewise.
19183 (finish_struct_1): Likewise.
19184 (build_self_reference): Likewise.
19185 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19187 (pushtag): Use decl_function_context, not
19188 hack_decl_function_context.
19189 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19190 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19191 (pushdecl): Remove bogus code.
19192 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19193 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19194 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19195 Use decl_function_context, nothack_decl_function_context.
19196 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19197 (grokdeclarator): Likewise. Use decl_function_context, not
19198 hack_decl_function_context.
19199 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
19200 (start_function): Use DECL_FRIEND_CONTEXT, not
19201 DECL_CLASS_CONTEXT. Use decl_function_context, not
19202 hack_decl_function_context.
19203 (finish_function): Use decl_function_context, not
19204 hack_decl_function_context.
19205 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19206 DECL_CLASS_CONTEXT.
19207 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19208 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19209 (grokfield): Likewise.
19210 (finish_builtin_type): Likewise.
19211 (finish_vtable_vardec): Use decl_function_context, not
19212 hack_decl_function_context.
19213 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19214 (start_static_initialization_or_destruction): Likewise.
19215 (finish_static_initialization_or_destruction): Likewise.
19216 (mark_used): Adjust logic for deciding when to synthesize methods.
19217 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19219 * error.c (dump_function_decl): Use DECL_CONTEXT, not
19220 DECL_CLASS_CONTEXT.
19221 * friend.c (is_friend): Likewise.
19222 (add_friends): Remove.
19223 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19224 * lex.c (begin_definition_of_inclass_inline): Use
19225 decl_function_context, not hack_decl_function_context.
19226 (process_next_inline): Likewise.
19227 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19228 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19229 DECL_CLASSS_CONTEXT.
19230 (hack_identifier): Likewise.
19231 (synthesize_method): Use decl_function_context, not
19232 hack_decl_function_context.
19233 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19235 (is_member_template): Use decl_function_context, not
19236 hack_decl_function_context. Use DECL_CONTEXT, not
19237 DECL_CLASS_CONTEXT.
19238 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19239 DECL_CLASS_CONTEXT.
19240 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19242 (push_template_decl_real): Likewise.
19243 (instantiate_class_template): Don't call add_friends.
19244 (tsubst_default_argument): Use DECL_CONTEXT, not
19246 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19247 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19248 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19249 DECL_CLASS_CONTEXT.
19250 * repo.c (repo_inline_used): Likewise.
19251 * search.c (current_scope): Adjust for new _CONTEXT macros.
19252 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19254 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19255 (lookup_fnfields_here):Likewise.
19256 (check_final_overrider): Likewise.
19257 (init_vbase_pointers): Likewise.
19258 (virtual_context): Likewise.
19259 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19260 (expand_body): Use decl_function_context, not
19261 hack_decl_function_context.
19262 * tree.c (hack_decl_function_context): Remove.
19263 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19264 DECL_CLASS_CONTEXT.
19265 * typeck2.c (error_not_base_type): Likewise.
19267 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
19269 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19271 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19273 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19275 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
19277 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19279 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
19281 * decl2.c (lang_decode_option): Enable automatic line wrapping.
19283 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
19285 * parse.y (frob_specs): Split out...
19286 (parse_decl): From here.
19287 (fn.def2): Call initial_deferred_type_access_control.
19288 (after_type_component_declarator0): Call frob_specs.
19289 (notype_component_declarator0): Likewise.
19290 * search.c (friend_accessible_p): Nested classes are friends of their
19293 2000-02-10 Mark Mitchell <mark@codesourcery.com>
19295 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19296 used to create an implicit temporary.
19298 * class.c (dfs_modify_vtables): Tweak calculation of functions to
19301 2000-02-08 Nathan Sidwell <nathan@acm.org>
19303 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19304 strip array element qualifiers too.
19306 2000-02-07 Mark Mitchell <mark@codesourcery.com>
19308 * decl.c (store_parm_decls): Don't build cleanups for parameters
19309 while processing_template_decl.
19311 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
19313 * cp-tree.h (struct saved_scope): Add incomplete field.
19314 (namespace_scope_incomplete): New macro.
19315 * decl.c (pushdecl): Use it.
19316 (hack_incomplete_structures): Use it. See through artificial
19318 (mark_saved_scope): Mark it.
19320 Implement access control for nested types.
19321 * search.c (type_access_control): New fn.
19322 (accessible_p): Now we do perform access control for types.
19323 * semantics.c (deferred_type_access_control): New fn.
19324 (initial_deferred_type_access_control): New fn.
19325 (begin_function_definition): Call it. Add lookups parm.
19326 * decl.c (struct binding_level): Add this_class field.
19327 (pushlevel_class): Set it.
19328 (mark_binding_level): Mark it.
19329 (lookup_name_real): Use it. Call type_access_control.
19330 (mark_saved_scope): Mark lookups field.
19331 * cp-tree.h (flagged_type_tree): Add lookups field.
19332 (struct saved_scope): Add lookups field.
19333 (type_lookups): New macro.
19334 * parse.y (declmods): Now <ftype>.
19335 (parse_decl): Add lookups parm. Call
19336 initial_deferred_type_access_control.
19337 (lang_extdef): Clear type_lookups.
19338 (typed_declspecs, declmods, typespec): Set lookups field.
19339 (initdcl): Call deferred_type_access_control.
19340 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19341 component_decl_1, named_parm): Adjust.
19342 * friend.c (is_friend): Nested classes are friends of their
19345 * class.c (currently_open_derived_class): New fn.
19346 * method.c (hack_identifier): Use it.
19348 * lex.c (do_identifier): Remove obsolete code.
19350 * parse.y (typed_typespecs): Propagate new_type_flag properly.
19352 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
19354 * tinfo.h: Remove apostrophes from C++ comment (xgettext
19355 thinks this file is plain C).
19357 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19359 * Makefile.in (call.o): Depend on $(EXPR_H).
19361 * call.c: Include "expr.h".
19363 * class.c (dump_class_hierarchy): Add prototype.
19365 * search.c (dfs_get_pure_virtuals): Likewise.
19367 2000-02-1 Ulrich Drepper <drepper@redhat.com>
19369 * parse.y (simple_stmt): Allow :: token in asm parameter list.
19370 * parse.c: Rebuilt.
19372 2000-01-31 Jim Wilson <wilson@cygnus.com>
19374 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
19375 Store it in DECL_FCONTEXT.
19376 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
19378 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
19380 * tinfo.h (old abi): #include "tconfig.h".
19381 * tinfo.cc (convert_to_base): Move into old abi section.
19383 2000-01-31 Mark Mitchell <mark@codesourcery.com>
19385 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
19386 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
19387 (BINFO_PRIMARY_BINFO): New macro.
19388 (BF_DELTA): Rename to ...
19389 (BV_DELTA): ... this.
19390 (BF_VCALL_INDEX): Rename to ...
19391 (BV_VCALL_INDEX): ... this.
19392 (BF_FN): Rename to ...
19394 * class.c (build_vbase_path): Adjust for changes to reverse_path.
19395 (set_rtti_entry): Rename BF_ macros to BV_ variants.
19396 (modify_vtable_entry): Simplify.
19397 (add_virtual_function): Rename BF_ macros to BV_ variants.
19398 (build_vtable_initializer): Likewise.
19399 (get_class_offset_1): Remove.
19400 (dfs_get_class_offset): Likewise.
19401 (get_class_offset): Likewise.
19402 (dfs_find_final_overrider): New function.
19403 (find_final_overrider): Likewise.
19404 (modify_one_vtable): Remove.
19405 (dfs_find_base): New function.
19406 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
19407 find_final_overrider.
19408 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
19410 (dfs_fixup_vtable_deltas): Remove.
19411 (override_one_vtable): Remove.
19412 (merge_overrides): Likewise.
19413 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
19414 unreal chilren of virtual bases.
19415 (finish_struct_1): Don't use merge_overrides. Don't use
19416 dfs_fixup_vtable_deltas.
19417 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
19420 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
19421 Jason Merrill <jason@yorick.cygnus.com>
19423 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
19425 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
19427 * exception.cc (__throw_bad_typeid): Add missing std::.
19429 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19431 * cp-tree.h (make_thunk): PROTO -> PARAMS.
19433 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
19435 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
19437 Runtime support for new-abi rtti.
19438 * inc/typeinfo (type_info::operator!=): Define in class.
19439 (type_info::before, type_info::name, type_info::operator==,
19440 type_info::operator!=): Define new ABI implementations.
19441 (type_info::is_pointer_p, type_info::is_function_p): Declare
19442 new virtual functions.
19443 (type_info::do_catch, type_info::do_upcast): Likewise.
19445 * tinfo.h (__base_class_info): Define new class.
19446 (__class_type_info): Likewise.
19447 (__si_class_type_info): Likewise.
19448 (__vmi_class_type_info): Likewise.
19449 (__dynamic_cast): Prototype.
19451 * tinfo.cc: Conditionalize old and new rtti mechanisms.
19452 (type_info::is_pointer_p): Define new function.
19453 (type_info::is_function_p): Likewise.
19454 (type_info::do_catch): Likewise.
19455 (type_info::do_upcast): Likewise.
19456 (vtable_prefix): New structure for vtable access.
19457 (adjust_pointer): Define new template function.
19458 (contained_p, public_p, virtual_p, contained_public_p,
19459 contained_nonpublic_p, contained_nonvirtual_p): Define new
19461 (nonvirtual_base_type): New local variable.
19462 (__class_type_info::~__class_type_info): Define.
19463 (__si_class_type_info::~__si_class_type_info): Likewise.
19464 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
19465 (__class_type_info::do_catch): Define new function.
19466 (__class_type_info::do_upcast): Likewise.
19467 (__class_type_info::find_public_src): Likewise.
19468 (__class_type_info::do_find_public_src): Likewise.
19469 (__si_class_type_info::do_find_public_src): Likewise.
19470 (__vmi_class_type_info::do_find_public_src): Likewise.
19471 (__class_type_info::do_dyncast): Likewise.
19472 (__si_class_type_info::do_dyncast): Likewise.
19473 (__vmi_class_type_info::do_dyncast): Likewise.
19474 (__class_type_info::do_upcast): Likewise.
19475 (__si_class_type_info::do_upcast): Likewise.
19476 (__vmi_class_type_info::do_upcast): Likewise.
19477 (__dynamic_cast): Likewise.
19479 * tinfo2.cc (__fundamental_type_info): Define new class.
19480 (__pointer_type_info): Likewise.
19481 (__reference_type_info): Likewise.
19482 (__array_type_info): Likewise.
19483 (__function_type_info): Likewise.
19484 (__enum_type_info): Likewise.
19485 (__ptr_to_member_type_info): Likewise.
19486 (__fundamental_type_info::~__fundamental_type_info): Define.
19487 (__pointer_type_info::~__pointer_type_info): Likewise.
19488 (__reference_type_info::~__reference_type_info): Likewise.
19489 (__array_type_info::~__array_type_info): Likewise.
19490 (__function_type_info::~__function_type_info): Likewise.
19491 (__enum_type_info::~__enum_type_info): Likewise.
19492 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
19493 (__pointer_type_info::do_catch): Define new function.
19494 (__ptr_to_member_type_info::do_catch): Define new function.
19496 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
19497 (__is_pointer): Likewise.
19499 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
19501 2000-01-30 Mark Mitchell <mark@codesourcery.com>
19503 * cp/class.c (build_vtable): Rename to build_primary_vtable.
19504 (prepare_fresh_vtable): Rename to build_secondary_vtable.
19505 (make_new_vtable): New function.
19506 (modify_vtable_entry): Handle generation of new vtables correctly.
19507 (modify_one_vtable): Remove unused parameter.
19508 (dfs_fixup_vtable_deltas): Likewise.
19509 (override_one_vtable): Use build_secondary_vtable.
19510 (finish_struct_1): Use build_primary_vtable and
19511 build_secondary_vtable.
19513 2000-01-28 Ulrich Drepper <drepper@redhat.com>
19515 * cp/decl.c: Adjust variable names, comments, help strings.
19517 2000-01-29 Nathan Sidwell <nathan@acm.org>
19519 * new2.cc (operator delete[]): Use operator delete, don't assume
19522 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
19524 * class.c (build_vtbl_initializer): Add argument to
19525 build_vtable_entry call.
19527 2000-01-27 Mark Mitchell <mark@codesourcery.com>
19529 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
19530 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
19531 (BF_DELTA): New macro.
19532 (BF_VCALL_INDEX): Likewise.
19534 (THUNK_VCALL_OFFSET): Likewise.
19535 (make_thunk): Change prototype.
19536 * class.c (build_vtable_entry): Integrate
19537 build_vtable_entry_for_fn. Handle vcall indices.
19538 (build_vtable_entry_for_fn): Remove.
19539 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
19540 BF_VCALL_INDEX, BF_FN.
19541 (modify_vtable_entry): Integrate common code from
19542 modify_one_vtable and dfs_fixup_vtable_deltas.
19543 (add_virtual_function): Set BF_VCALL_INDEX.
19544 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
19546 (modify_one_vtable): Simplify.
19547 (dfs_fixup_vtable_deltas): Likewise.
19548 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
19549 * method.c (make_thunk): Handle vcall indices.
19551 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
19553 Compiler side new abi rtti (not enabled).
19554 * cp-tree.h (new_abi_rtti_p): New macro.
19555 (emit_support_tinfos): Prototype new function.
19556 (tinfo_decl_p): Likewise.
19557 (emit_tinfo_decl): Likwise.
19558 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
19560 (doing_runtime): New local static.
19561 (init_rtti_processing): Add new-abi initializer.
19562 (get_tinfo_decl): Add new-abi logic.
19563 (tinfo_from_decl): Likewise.
19564 (build_dynamic_cast_1): Likewise.
19565 (qualifier_flags): New static function.
19566 (tinfo_base_init): Likewise.
19567 (generic_initializer): Likewise.
19568 (ptr_ref_initializer): Likewise.
19569 (ptmd_initializer): Likewise.
19570 (class_hint_flags): Likewise.
19571 (class_initializer): Likewise.
19572 (synthesize_tinfo_var): Likewise.
19573 (create_real_tinfo_var): Likewise.
19574 (create_pseudo_type_info): Likewise.
19575 (get_vmi_pseudo_type_info): Likewise.
19576 (create_tinfo_types): Likewise.
19577 (emit_support_tinfos): New global function.
19578 (tinfo_decl_p): New global predicate.
19579 (emit_tinfo_decl): New global function.
19580 * class.c (set_rtti_entry): Generalize for old and new rtti.
19581 (build_vtbl_initializer): Likewise.
19582 * decl2.c (finish_file): Likewise.
19584 2000-01-27 Jim Wilson <wilson@cygnus.com>
19586 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
19587 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
19589 2000-01-27 Mike Stump <mrs@wrs.com>
19591 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
19594 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
19596 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
19598 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
19600 * optimize.c (calls_setjmp_r): Supply new argument
19601 to special_function_p.
19603 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19605 * call.c: PROTO -> PARAMS.
19606 * class.c: Likewise.
19607 * cp-tree.h: Likewise.
19609 * decl.c: Likewise.
19610 * decl.h: Likewise.
19611 * decl2.c: Likewise.
19612 * dump.c: Likewise.
19613 * errfn.c: Likewise.
19614 * error.c: Likewise.
19615 * except.c: Likewise.
19616 * expr.c: Likewise.
19617 * init.c: Likewise.
19618 * input.c: Likewise.
19621 * method.c: Likewise.
19622 * optimize.c: Likewise.
19623 * parse.y: Likewise.
19625 * repo.c: Likewise.
19626 * rtti.c: Likewise.
19627 * search.c: Likewise.
19628 * semantics.c: Likewise.
19629 * spew.c: Likewise.
19630 * tree.c: Likewise.
19631 * typeck.c: Likewise.
19632 * typeck2.c: Likewise.
19633 * xref.c: Likewise.
19635 2000-01-25 Richard Henderson <rth@cygnus.com>
19637 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19639 2000-01-25 Mark Mitchell <mark@codesourcery.com>
19641 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19642 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19643 (struct vcall_offset_data_s): New type.
19644 (dfs_vcall_offset_queue_p): New function.
19645 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19646 (build_vcall_offset_vtbl_entries): Likewise.
19647 (layout_vtable_decl): Likewise.
19648 (num_vfun_entries): Likewise.
19649 (num_extra_vtbl_entries): Add the entries for vcall offsets.
19650 (build_vtbl_initializer): Likewise.
19651 (dfs_finish_vtabls): Use layout_vtable_decl.
19652 (modify_one_vtables): Always duplicate vtables under the new ABI.
19653 (finish_struct_1): Use layout_vtable_decl.
19655 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19657 * decl.c (member_function_or_else): Change third arg from a format
19658 specifier to an `enum overload_flags'. Callers changed.
19660 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
19662 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19663 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19664 build_const_cast, get_delta_difference, check_return_expr): Avoid
19665 ANSI string concatenation usage.
19667 2000-01-24 Mark Mitchell <mark@codesourcery.com>
19669 * class.c (layout_class_type): Put the fields required to make a
19670 class non-empty at the end, not the beginning, of the TYPE_FIELDs
19673 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
19675 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19678 * decl2.c (mark_used): Do instantiate inlines that have been
19679 explicitly instantiated.
19681 2000-01-24 Richard Henderson <rth@cygnus.com>
19683 * call.c (build_over_call): Use expand_tree_builtin.
19684 * typeck.c (build_function_call_real): Likewise.
19685 (build_binary_op_nodefault): Handle unordered compares.
19687 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19689 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19690 cp_tree_index values.
19691 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19692 New global node #defines for them.
19693 * rtti.c (call_void_fn): Replace with ...
19694 (build_runtime_decl): ... new static function.
19695 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19696 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19697 (build_dynamic_cast_1): Always produce correctly typed result.
19698 Explicitly produce type_info addresses. Use dynamic_cast_node.
19699 * exception.cc (__throw_bad_cast): Return `void *'.
19700 (__throw_bad_typeid): Return `const type_info &'.
19702 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19704 * cp-tree.h (get_vtable_decl): Prototype new function.
19705 * class.c (get_vtable_decl): New function. Broken out from ...
19706 (build_vtable): ... here. Use it.
19707 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19708 by get_vtable_decl.
19710 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19712 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19713 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19714 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19715 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19716 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19717 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19718 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19719 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19720 (CPTI_TINFO_VAR_ID): New enumeration.
19721 (__tp_desc_type_node, __access_mode_type_node,
19722 __bltn_desc_type_node, __user_desc_type_node,
19723 __class_desc_type_node, __ptr_desc_type_node,
19724 __attr_desc_type_node, __func_desc_type_node,
19725 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19726 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19727 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19728 enum_desc_type_node, class_desc_type_node,
19729 si_class_desc_type_node, vmi_class_desc_type_node,
19730 ptmd_desc_type_node, base_desc_type_node): New #defines.
19731 (tinfo_fn_id, tinfo_fn_type): Rename to ...
19732 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19733 (tinfo_var_id): New enumeration.
19734 (DECL_TINFO_FN_P): Augment comment.
19735 * decl.c (cp_global_trees): Adjust documentation.
19736 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19737 tinfo_decl_type and tinfo_var_id.
19738 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19739 (build_typeid): Remove unused variable.
19740 (get_tinfo_var): Use tinfo_var_id.
19741 (tinfo_name): New static function.
19742 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19743 (tinfo_from_decl): Likewise.
19744 (get_base_offset): New static function, broken out of
19746 (expand_si_desc): Use tinfo_name.
19747 (expand_class_desc): Likewise. Lose local static variable.
19748 Use base_desc_type_node. Use get_base_offset.
19749 (expand_ptr_desc): Use tinfo_name.
19750 (expand_attr_desc): Likewise.
19751 (expand_generic_desc): Likewise.
19753 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19754 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19756 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19758 * cp-tree.h (__eprintf): Remove declaration.
19759 * tree.c (__eprintf): Remove definition.
19761 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
19762 Mark Mitchell <mark@codesourcery.com>
19764 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19765 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19767 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
19769 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19771 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19773 * cp-tree.h (register_dtor_fn): New function.
19774 * decl.c (destroy_local_static): Rename to ...
19775 (register_dtor_fn): ... this. Give it external linkage.
19776 (expand_static_init): Use it.
19777 * decl2.c (do_static_initialization): Likewise, if using
19779 (do_static_destruction): Check that __cxa_atexit is not in use.
19780 (finish_file): Don't call do_static_destruction if using
19783 * typeck.c (convert_arguments): Restore two-message error
19786 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
19788 Remap dynamic cast hint values to be consistent across ABIs.
19789 * search.c (dynamic_cast_base_recurse): Remap generated value.
19790 (get_dynamic_cast_base_type): Adjust documentation.
19791 * tinfo.h (__user_type_info::dyncast): Likewise.
19792 (__user_type_info::find_public_subobj): Remap BOFF meaning.
19793 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
19794 (__class_type_info::do_dyncast): Likewise.
19795 (__class_type_info::do_find_public_subobj): Likewise.
19796 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
19798 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19800 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
19802 * typeck2.c (incomplete_type_error): Restore previous
19803 cp_error and cp_error_at call sequence.
19805 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
19807 * class.c (dump_class_hierarchy): Make format agree with argument;
19808 cast pointer to unsigned long and print with %lx.
19810 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19812 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
19814 * typeck.c (composite_pointer_type, common_type,
19815 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
19816 build_function_call_real, convert_arguments,
19817 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
19818 build_unary_op, mark_addressable, build_compound_expr,
19819 build_static_cast, build_reinterpret_cast, build_const_cast,
19820 build_c_cast, build_modify_expr, get_delta_difference,
19821 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
19822 'ISO C++'. Fusion consecutive calls to diagnostic message routines
19824 * typeck2.c (readonly_error, abstract_virtuals_error,
19825 process_init_constructor, check_for_new_type): Likewise.
19827 2000-01-19 Mark Mitchell <mark@codesourcery.com>
19829 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
19832 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
19834 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
19835 (build_x_typeid): Likewise.
19836 (get_tinfo_fn): Likewise.
19837 (get_tinfo_fn_unused): Rename to ...
19838 (get_tinfo_decl): ... here.
19839 * rtti.c (build_headof): Replace logic error with assertion.
19840 (get_tinfo_fn_dynamic): Rename to ...
19841 (get_tinfo_decl_dynamic): ... here. Make static. Use
19842 complete_type_or_else.
19843 (build_x_typeid): Move into ...
19844 (build_typeid): ... here. Adjust call to
19845 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
19846 throw_bad_typeid expression.
19847 (get_tinfo_fn_unused): Rename to ...
19848 (get_tinfo_decl): ... here. Adjust comment.
19849 (get_tinfo_fn): Delete.
19850 (tinfo_from_decl): New static function.
19851 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
19852 (get_typeid): Use complete_type_or_else.
19853 (build_dynamic_cast_1): Adjust calls to
19854 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
19855 * parse.y (primary): Adjust call to build_typeid.
19856 * except.c (build_eh_type_type_ref): Adjust call to
19857 get_tinfo_decl. Mark as used.
19858 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
19859 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
19860 * parse.c: Regenerated.
19862 2000-01-17 Mark Mitchell <mark@codesourcery.com>
19864 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
19865 calling convention.
19866 (resolves_to_fixed_type_p): Document calling convention.
19867 * rtti.c (build_x_typeid): Initialize NONNULL.
19869 * cp-tree.h (build_shared_int_cst): New function.
19870 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
19871 * class.c (modify_vtable_entry): Likewise.
19872 (add_virtual_function): Split out code to generated shared
19873 INTEGER_CSTs to build_share_int_cst.
19874 (modify_all_vtables): Handle all the overridden functions here.
19875 Add overridden functions from non-primary virtual bases to the
19877 (finish_struct_1): Adjust call to modify_all_vtables. Add
19878 overridden functions from non-primary bases to the vtable.
19879 * tree.c (build_shared_int_cst): New function.
19881 * cp-tree.h (scratchalloc): Remove.
19882 (build_scratch_list): Likewise.
19883 * call.c (convert_class_to_reference): Replace build_scratch_list
19884 and build_expr_list with build_tree_list.
19885 (add_candidate): Replace scratchalloc with expralloc. Note memory
19887 (build_user_type_conversion_1): Replace build_scratch_list
19888 and build_expr_list with build_tree_list.
19889 (build_new_op): Likewise.
19890 (build_op_delete_call): Likewise.
19891 (convert_like): Likewise.
19892 * cvt.c (ocp_convert): Likewise.
19893 * decl.c (start_decl): Likewise.
19894 (start_function): Likewise.
19895 (finish_destructor_body): Likewise.
19896 (maybe_build_cleanup_1): Likewise.
19897 * decl2.c (reparse_decl_as_expr): Likewise.
19898 * init.c (perform_member_init): Likewise.
19899 (expand_cleanup_for_base): Likewise.
19900 (build_builtin_delete_call): Likewise.
19901 (build_new_1): Likewise.
19902 (build_delete): Likewise.
19903 * method.c (do_build_assign_ref): Likewise.
19904 * parse.y (already_scoped_stmt): Likewise.
19905 (nontrivial_exprlist): Likewise.
19906 (net_initializer): Likewise.
19907 (initlist): Likewise.
19908 * parse.c: Regenerated.
19909 * rtti.c (build_x_typeid): Likewise.
19910 (build_dynamic_cast_1): Likewise.
19911 * typeck.c (build_x_compound_expr): Likewise.
19912 (build_static_cast): Likewise.
19913 (build_modify_expr): Likewise.
19915 * cp-tree.h (DECL_VINDEX): Add documentation.
19916 * class.c (build_vtable_entry): Likewise.
19917 (start_vtable): Add comment.
19918 (add_virtual_function): Replace pending_hard_virtuals with
19919 overridden_virtuals and pending_virtuals with new_virtuals.
19920 Replace redundant assignments with assertions.
19921 (check_for_override): Add comment.
19922 (check_bases_and_members): Replace pending_hard_virtuals with
19923 overridden_virtuals and pending_virtuals with new_virtuals.
19924 (create_vtbl_ptr): Likewise.
19925 (layout_class_type): Likewise.
19926 (finish_struct_1): Likewise. Add comments.
19928 2000-01-16 Mark Mitchell <mark@codesourcery.com>
19930 * class.c (finish_struct_1): Replace redundant code with
19933 * cp-tree.h (flag_new_abi): Move.
19934 (flag_use_cxa_atexit): Likewise.
19935 (flag_honor_std): Likewise.
19936 (flag_rtti): Likewise.
19937 (vbase_offsets_in_vtable_p): Define.
19938 (vptrs_present_everywhere_p): Likewise.
19939 (TYPE_CONTAINS_VPTR_P): Likewise.
19940 (dfs_walk_real): Declare.
19941 * class.c (build_vbase_pointer_fields): Check
19942 vbase_offsets_in_vtable_p.
19943 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
19945 (build_vbase_offset_vtbl_entries): Simplify.
19946 (build_vbase_offset_vtbl_entries): Adjust.
19947 (build_vbase_pointer): Add ability to look up vbase offsets in
19949 (start_vtable): New function.
19950 (add_virtual_function): Use it.
19951 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
19952 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
19953 (build_vtbl_initializer): Take the type of the complete object as
19954 input. Use it to correctly calculate vbase offsets.
19955 (dfs_finish_vtbls): Pass the complete type to
19956 build_vtbl_initializer.
19957 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
19958 (create_vtable_ptr): Create a vtable even if there are no
19959 new virtual functions, under the new ABI.
19960 (finish_struct_1): Likewise.
19961 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
19962 * decl.c (exapnd_static_init): Remove call to
19963 preserve_initializer.
19964 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
19966 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
19967 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
19968 (construct_virtual_bases): Don't initialize virtual base pointers
19970 (build_aggr_init): Clean up comment.
19971 (expand_aggr_init_1): Likewise.
19972 * rtti.c (expand_class_desc): Store the virtual function table
19973 index where the vbase offset lives in the offset field.
19974 * search.c (dfs_walk_real): Make it global.
19975 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
19976 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
19978 * tinfo.h (USItype): Make it signed under the new ABI.
19979 * tinfo.cc (convert_to_base): New function. Encapsulate base
19980 conversion logic here.
19981 (__class_type_info::do_upcast): Use it.
19982 (__class_type_info::do_dyncast): Likewise.
19983 (__class_type_info::do_find_public_subobj): Likewise.
19985 * init.c (construct_virtual_bases): Don't look up the addresses of
19986 virtual bases at run-time.
19988 * class.c (build_vbase_pointer): Relocate.
19989 (build_vbase_pointer_fields): Likewise.
19990 (dfs_build_vbase_offset_vtbl_entries): Likewise.
19991 (build_vbase_offset_vtbl_entries): Likewise.
19993 * decl.c (init_decl_processing): Complain if -fnew-abi
19994 -fno-vtable-thunks is used.
19996 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
19999 2000-01-15 Mark Mitchell <mark@codesourcery.com>
20001 * cp-tree.h (num_extra_vtbl_entries): New function.
20002 (size_extra_vtbl_entries): Likewise.
20003 (dfs_vtable_path_unmark): Likewise.
20004 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20005 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20006 * class.c (num_extra_vtbl_entries): New function.
20007 (size_extra_vtbl_entries): Likewise.
20008 (dfs_build_vbase_offset_vtbl_entries): New function.
20009 (build_vbase_offset_vtbl_entries): Likewise.
20010 (build_vtbl_initializer): Use it.
20011 (finish_struct_1): Adjust vtable sizes (using
20012 num_extra_vtbl_entries).
20013 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20014 THUNK_DECL is non-NULL before expanding it.
20015 * init.c (expand_virtual_init): Adjust the vtable pointer by
20016 size_extra_vtbl_entries before storing it.
20017 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20018 Handle TREE_LIST parameters here, not in the dfs_* functions.
20019 (dfs_unmarked_real_bases_queue_p): Adjust.
20020 (dfs_marked_real_bases_queue_p): Likewise.
20021 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20022 (dfs_vtable_path_marked_real_bases_queue_p): New function.
20023 (dfs_vtable_path_unmark): Likewise.
20025 2000-01-14 Mark Mitchell <mark@codesourcery.com>
20027 * optimize.c (copy_body_r): Clear the operand three of a
20028 TARGET_EXPR when copying it.
20030 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20032 * method.c (build_decl_overload_real): Check whether we are in ::
20033 before returning __builtin_new/delete.
20035 2000-01-13 Mark Mitchell <mark@codesourcery.com>
20037 * pt.c (tsubst_friend_function): Improve comment.
20038 (instantiate_decl): Avoid crashing when a "nested" function is
20039 instantiated from the top level.
20041 * dump.c (dqeueue_and_dump): Dump
20042 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20044 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20046 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20048 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
20050 * g++spec.c (lang_specific_driver): Add -fnew-abi if
20051 ENABLE_NEW_GXX_ABI defined.
20052 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20053 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20054 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20056 2000-01-12 Mark Mitchell <mark@codesourcery.com>
20058 * decl.c (start_cleanup_fn): Call pushdecl.
20060 * call.c (convert_class_to_reference): Fix typos.
20061 (build_conditional_expr): Handle errors gracefully.
20062 * class.c (push_nested_class): Likewise.
20063 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20064 (DECL_THIS_EXTERN): Use it.
20065 (DECL_THIS_STATIC): Likewise.
20066 * cvt.c (convert_to_void): Handle errors gracefully.
20067 (build_expr_type_conversion): Likewise.
20068 * decl.c (maybe_push_decl): Likewise.
20069 (start_decl_1): Likewise.
20070 (require_complete_types_for_parms): Likewise.
20071 * parse.y (structsp): Likewise.
20072 (base_class): Likewise.
20073 * parse.c: Regenerated.
20074 * pt.c (finish_member_template_decl): Likewise.
20075 * typeck.c (decay_conversion): Likewise.
20077 * cp-tree.h (dfs_skip_vbases): New function.
20078 (find_vbase_instance): Likewise.
20079 * class.c (determine_primary_base): Allow a nearly empty base to
20080 serve as a primary base class under the new ABI.
20081 (get_class_offset_1): Rename to ...
20082 (dfs_get_class_offset): ... this. Simplify. Don't issue error
20084 (get_class_offset): Use it. Issue error messages here.
20085 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20086 find the right copies of virtual bases.
20087 (fixup_vtable_deltas1): Rename to ...
20088 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
20089 bases as primary bases.
20090 (fixup_vtable_deltas): Remove.
20091 (override_one_vtable): Handle virtual bases as primary bases.
20092 (merge_overrides): Likewise.
20093 (finish_struct_1): Likewise.
20094 (dump_class_hierarchy): Dump primary-ness of bases as well.
20095 * search.c (mark_primary_bases): Use a pre-order traversal to
20096 handle primary virtual bases.
20097 (dfs_skip_vbases): New fiunction.
20098 (expand_upcast_fixups): Adjust to handle primary virtual bases.
20099 (fixup_virtual_upcast_offsets): Likewise.
20100 (fixup_all_virtual_upcast_offsets): Likewise.
20101 (dfs_find_vbase_instances): New function.
20102 (find_vbase_instance): Likewise.
20104 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
20106 * lex.c (DIR_SEPARATOR): Delete macro.
20108 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
20110 * decl2.c (lang_decode_option): Handle automatic line wrapping
20113 2000-01-11 Mark Mitchell <mark@codesourcery.com>
20115 * friend.c (do_friend): Don't resolve scopes when processing
20116 template declarations, even if the qualifying scope doesn't
20117 involve template parameters.
20119 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
20121 * class.c (dfs_modify_vtables_queue_p): Remove.
20122 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20123 and dfs_marked_real_bases_queue_p instead of
20124 dfs_modify_vtables_queue_p.
20126 * class.c (build_vbase_path): Simplify.
20127 (dfs_propagate_binfo_offsets): New function.
20128 (propagate_binfo_offsets): Use it.
20129 (remove_base_field): Simplify.
20130 (dfs_set_offset_for_vbases): Remove.
20131 (dfs_set_offset_for_shared_vbases): New function.
20132 (dfs_set_offset_for_unshared_vbases): Likewise.
20133 (layout_virtual_bases): Use them.
20134 (layout_basetypes): Don't call propagate_binfo_offsets.
20135 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20138 * class.c (build_base_field): New function, split out from ...
20139 (build_base_fields): ... here. Use it. Allocate primary bases
20140 first, under the new ABI.
20141 (get_vtable_entry): Remove.
20142 (remove_base_field): New function, split out from ...
20143 (remove_base_fields): ... here. Adjust since primary bases come
20144 first under the new ABI.
20146 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20147 (initialize_vtbl_ptrs): New function.
20148 (expand_indirect_vtbls_init): Change prototype.
20149 (convert_pointer_to_vbase): Declare.
20150 * init.c (expand_direct_vtbls_init): Remove.
20151 (dfs_initialize_vtbl_ptrs): New function.
20152 (initialize_vtbl_ptrs): Likewise.
20153 (emit_base_init): Use initialize_vtbl_ptrs.
20154 * search.c (convert_pointer_to_vbase): Make it global.
20155 (expand_indirect_vtbls_init): Remove vtable initialization code.
20156 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20158 * class.c (dfs_finish_vtbls): New function.
20159 (finish_vtbls): Use it.
20160 (dump_class_hierarchy): New function.
20162 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20163 (BINFO_VBASE_PRIMARY_P): New macro.
20164 (BINFO_VIRTUALS): Add to documentation.
20165 (SET_BINFO_PRIMARY_MARKED_P): Remove.
20166 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20167 (dfs_mark_primary_bases_queue_p): Likewise.
20168 (dfs_unmarked_real_bases_queue_p): New function.
20169 (dfs_marked_real_bases_queue_p): Likewise.
20170 * search.c (dfs_mark_primary_bases): Adjust.
20171 (mark_primary_bases): Likewise.
20172 (get_shared_vbase_if_not_primary): New function.
20173 (dfs_unmarked_real_bases_queue_p): Likewise.
20174 (dfs_marked_real_bases_queue_p): Likewise.
20175 (dfs_get_pure_virtuals): Simplify.
20176 (get_pure_virtuals): Likewise.
20178 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20180 * lex.c: Include tm_p.h.
20182 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
20184 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20186 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
20188 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20189 * pt.c (instantiate_decl): Defer comdat templates that might not be
20192 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20193 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20194 (finish_file): Likewise.
20196 * decl2.c (import_export_class): Undo 12/14 change.
20198 * error.c (dump_decl): operator new, not operatornew.
20200 * class.c (field_decl_cmp): A nontype is "greater" than a type.
20201 * search.c (lookup_field_1): Look for the last field with the
20204 2000-01-05 Nathan Sidwell <nathan@acm.org>
20206 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20209 2000-01-05 Nathan Sidwell <nathan@acm.org>
20211 * typeck.c (build_static_cast): Don't strip target qualifiers
20212 when casting from a class.
20214 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20216 * class.c (warn_hidden): Initialize variable `fndecl'.
20218 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
20220 * decl.c (flag_isoc9x): New variable to be able to use code in
20221 c-common.c. For now always zero.
20223 2000-01-03 Mark Mitchell <mark@codesourcery.com>
20225 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20226 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20227 or unshare_base_binfos for virtual bases here.
20228 * search.c (dfs_get_vbase_types): Do it here.
20229 (get_vbase_types): Adjust.
20231 2000-01-02 Mark Mitchell <mark@codesourcery.com>
20233 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20234 (BINFO_PRIMARY_MARKED_P): Use flag 5.
20235 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20236 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20237 (unmark_primary_bases): Remove declaration.
20238 (unmarkedp): Declare.
20239 (dfs_vbase_unmark): Likewise.
20240 * class.c (determine_primary_base): Return immediately if there
20241 are no base classes. Call mark_primary_bases here.
20242 (modify_all_direct_vtables): Remove.
20243 (modify_all_indirect_vtables): Remove.
20244 (dfs_modify_vtables_queue_p): New function.
20245 (dfs_modify_vtables): New function.
20246 (modify_all_vtables): Use them.
20247 (build_base_fields): Build FIELD_DECLs for primary virtual base
20249 (create_vtable_ptr): Don't call determine_primary_base here.
20250 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20251 (dfs_set_offset_for_vbases): ... this.
20252 (layout_virtual_bases): Use it.
20253 (layout_class_type): Call determine_primary_base here.
20254 * search.c (unmarkedp): Make it global.
20255 (shared_marked_p): Simplify.
20256 (shared_unmarked_p): Likewise.
20257 (dfs_primary_bases_queue_p): Remove.
20258 (dfs_unmark_primary_bases): Likewise.
20259 (unmark_primary_bases): Likewise.
20260 (mark_primary_bases): Simplify.
20261 (get_pure_virtuals): Don't call mark_primary_bases here.
20262 (dfs_vbase_unmark): New function.
20263 (get_vbase_types): Simplify.
20265 * class.c (struct base_info): Remove.
20266 (determine_primary_base): Take has_virtual_p rather than a
20267 base_info as input. Don't calculate max_has_virtual.
20268 (finish_struct_bits): Remove max_has_virtual argument.
20269 (create_vtable_ptr): Remove max_has_virtual_p argument.
20270 (layout_virtual_bases): Remove max argument.
20271 (layout_basetypes): Likewise.
20272 (layout_class_type): Remove max_has_virtual_p argument.
20273 (finish_struct_1): Remove max_has_virtual.
20275 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20276 (layout_basetypes): Remove.
20277 * class.c (propagate_binfo_offsets): Moved here from tree.c.
20278 Update to handle primary virtual bases.
20279 (remove_base_fields): New function, split out from
20281 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20282 (layout_virtual_bases): New function, split out from
20283 layout_basetypes. Update to handle primary virtual bases.
20284 (layout_basetypes): Moved here from tree.c. Use
20285 remove_base_fields and layout_virtual_bases.
20286 * search.c (dfs_mark_primary_bases_queue_p): New function.
20287 (mark_primary_bases): Use it.
20288 * tree.c (CEIL): Remove.
20289 (propagate_binfo_offsets): Remove.
20290 (layout_basetypes): Remove.
20292 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20294 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20295 (BINFO_PRIMARY_MARKED_P): New macro.
20296 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20297 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20298 (mark_primary_bases): New function.
20299 (unmark_primary_bases): Likewise.
20300 * search.c (get_abstract_virtuals_1): Remove.
20301 (dfs_mark_primary_bases): New function.
20302 (mark_primary_bases): Likewise.
20303 (dfs_unmark_primary_bases): Likewise.
20304 (unmark_primary_bases): Likewise.
20305 (dfs_get_pure_virtuals): Likewise.
20307 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20309 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20310 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20311 (modify_one_vtable): Adjust.
20312 (fixup_vtable_deltas1): Likewise.
20313 (override_one_vtable): Likewise.
20314 * search.c (get_abstract_virtuals_1): Likewise.
20315 (get_pure_virtuals): Likewise.
20316 (expand_upcast_fixups): Likewise.
20317 * tree.c (debug_binfo): Likewise.
20319 * class.c (build_vtable): Don't return a value. Don't rebuild
20320 vtables for bases that have already been handled.
20321 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20322 already been handled.
20323 (modify_one_vtable): Adjust accordingly.
20324 (fixup_vtable_deltas1): Likewise.
20325 (finish_struct_1): Likewise.
20327 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20329 * call.c (build_new_method_call): Also check destructors.