1 Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz>
3 * decl2.c (mark_member_pointers): Verify that member pointer points to
6 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
8 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
9 (finish_compound_stmt): Remove no scope arg.
10 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
11 end_compound_stmt calls.
12 (expand_static_init, begin_destructor_body, begin_function_body,
13 finish_function_body): Likewise.
14 * decl2.c (start_objects, finish_objects,
15 start_static_storage_duration_function,
16 finish_static_storage_duration_function): Likewise.
17 * init.c (begin_init_stmts, finish_init_stmts,
18 construct_virtual_base, build_vec_init): Likewise.
19 * method.c (do_build_assign_ref, synthesize_method): Likewise.
20 * parser.c (cp_parser_compound_statement,
21 cp_parser_implicitly_scoped_statement,
22 cp_parser_already_scoped_statement): Likewise.
23 * pt.c (tsubst_expr): Likewise.
24 * semantics.c (begin_compound_stmt): No scope arg is a bool.
25 (finish_compound_stmt): Remove no scope arg.
27 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
30 2003-07-27 Mark Mitchell <mark@codesourcery.com>
32 * call.c (standard_conversion): Tweak handling of
33 pointer-to-member types.
34 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
35 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
36 pointer-to-data member types.
38 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
40 * parser.c (cp_parser_type_parameter): Reformat.
41 (cp_parser_parameter_declaration): Deprecate default args where
44 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
48 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
49 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
50 * init.c (begin_init_stmts): Make static. Return is_global
51 value. Always call begin_stmt_expr.
52 (finish_init_stmts): Make static. Add is_global parm. Always
54 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
55 (build_vec_init): Likewise. Always building a stmt tree.
56 (expand_default_init): Always building a stmt tree.
57 (get_temp_regvar): Likewise.
58 * semantics.c (begin_global_stmt_expr,
59 finish_global_stmt_expr): Remove.
61 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
63 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
64 (build_x_compound_expr_from_list): Declare.
65 * typeck.c (build_x_compound_expr_from_list): New.
66 (build_x_compound_expr): Adjust.
67 (build_compound_expr): Remove unreachable code. Take two
69 * decl.c (grok_reference_init): Use
70 build_x_compound_expr_from_list.
71 (expand_static_init): Adjust build_compound_expr call.
72 (cxx_maybe_build_cleanup): Likewise.
73 * init.c (perform_member_init): Use
74 build_x_compound_expr_from_list.
75 (build_new_1): Likewise.
76 (build_vec_delete): Adjust build_compound_expr calls.
77 (build_vbase_delete): Likewise.
78 * typeck2.c (store_init_value): Use
79 build_x_compound_expr_from_list.
80 (build_functional_cast): Likewise.
82 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
84 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
85 * decl.c (make_typename_type): Pass it.
86 * pt.c (lookup_template_class): Use it.
87 (resolve_typename_type): Pass it.
88 * semantics.c (finish_template_type): Pass it.
90 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
93 * cp-tree.h (qualified_name_lookup_error): Declare.
94 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
96 (tsubst_expr) <DECL_STMT case>: Likewise.
97 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
98 * semantics.c (qualified_name_lookup_error): New, broken out of ...
99 (finish_id_expression): ... here. Use it.
101 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
103 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
105 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
108 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
109 (tsubst_template_arg): New.
110 (tsubst_template_arg_vector): Rename to ...
111 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
113 (coerce_template_parms): Use tsubst_template_arg for default
115 (tsubst_template_parms): Likewise.
116 (tsubst_aggr_type): Adjust.
117 (tsubst_decl): Likewise.
118 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
119 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
121 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
123 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
124 * error.c: Use the new pretty-printer framework.
126 2003-07-24 Per Bothner <pbothner@apple.com>
128 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
129 which causes errors messages to incorrectly mention included files.
131 2003-07-24 Mark Mitchell <mark@codesourcery.com>
133 * cp-tree.h (convert_to_base_statically): Declare.
134 * call.c (build_special_member_call): Convert INSTANCE to the base
136 * class.c (convert_to_base_statically): New method.
137 * init.c (construct_virtual_base): Use it.
138 * method.c (do_build_assign_ref): Fix typo in comment.
140 2003-07-24 Jason Merrill <jason@redhat.com>
142 * decl.c: Just set truthvalue_* to boolean_*.
144 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
146 * decl.c (reshape_init): Remove unreachable code.
148 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
151 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
153 2003-07-23 Mark Mitchell <mark@codesourcery.com>
156 * cp-tree.h (accessible_base_p): Declare.
157 * call.c (build_over_call): Use it.
158 * search.c (accessible_base_p): New function, split out from ...
159 (lookup_base): ... here.
162 * call.c (build_conditional_expr): Use perform_implicit_conversion
163 and error_operand_p. Robustify.
164 * typeck.c (build_unary_op): Use perform_implicit_conversion.
166 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
169 * parser.c (cp_parser_nested_name_specifier): Reset scope on
171 (cp_parser_elaborated_type_specifier): Likewise.
173 2003-07-22 Mark Mitchell <mark@codesourcery.com>
175 Eliminate use of POINTER_TYPE for pointers-to-members.
176 * call.c (standard_conversion): Rework pointer-to-member handling.
178 (add_builtin_candidate): Likewise.
179 (resolve_scoped_fn_name): Remove.
180 (build_conditional_expr): Rework pointer-to-member handling.
181 (compare_ics): Likewise.
182 * class.c (check_field_decls): Use TYPE_PTR_P.
183 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
185 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
186 (TYPE_PTRMEM_P): Add comment.
187 (TYPE_PTR_P): Simplify.
188 (TYPE_PTROB_P): Correct definition.
189 (TYPE_PTR_TO_MEMBER_P): New macro.
190 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
191 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
192 (resolved_scoped_fn_name): Remove declaration.
193 (build_offset_ref): Change prototype.
194 (resolve_offset_ref): Remove.
195 (comp_target_types): Remove.
196 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
198 (convert_to_reference): Use can_convert.
199 (ocp_convert): Improve error handling. Rework pointer-to-member
201 (perform_qualification_conversions): Rework pointer-to-member
203 * decl.c (build_ptrmem_type): Handle functions too.
204 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
205 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
206 (grokparms): Remove OFFSET_TYPE error message.
207 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
208 * error.c (dump_type_prefix): Likewise.
209 * expr.c (cplus_expand_constant): Use build_nop.
210 * init.c (build_offset_ref): Add address_p parameter. Fold in
211 necessary bits from resolve_offset_ref.
212 (resolve_offset_ref): Remove.
213 * parser.c (cp_parser_postfix_expression): Remove special case
214 code for OFFSET_TYPE.
215 * pt.c (convert_nontype_argument): Rework pointer-to-member
217 (convert_template_argument): Likewise.
219 (invalid_nontype_parm_type_p): Likewise.
220 (dependent_type_p_r): Likewise.
221 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
222 (target_incomplete_p_): Rework pointer-to-member
224 (get_pseudo_ti_init): Likewise.
225 (get_pseudo_ti_desc): Likewise.
226 * semantics.c (finish_qualified_id_expr): Adjust call to
227 build_offset_ref. Remove use of resolve_offset_ref.
228 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
229 * typeck.c (target_type): Use TYPE_PTRMEM_P.
230 (type_unknown_p): Remove obsolete code about the time before
231 non-dependent expressions were handled correctly.
232 (qualify_type_recursive): Remove.
233 (composite_pointer_type_r): New function.
234 (composite_pointer_type): Use it.
235 (merge_types): Remove dead comments.
236 (comp_cv_target_types): Remove.
237 (comp_target_types): Likewise.
238 (comp_target_parms): Likewise.
239 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
240 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
241 (build_binary_op): Do not use of comp_target_types.
242 (pointer_diff): Remove OFFSET_TYPE case.
243 (build_unary_op): Adjust pointer-to-member handling.
244 (unary_complex_lvalue): Likewise.
245 (check_for_casting_away_constness): Add description parameter.
246 (build_static_cast): Pass it.
247 (build_reinterpret_cast): Use check_for_casting_away_constness.
248 (build_const_cast): Adjust pointer-to-member handling.
249 (build_c_cast): Likewise.
250 (convert_for_assignment): Remove OFFSET_TYPE error message.
251 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
252 (comp_ptr_ttypes_reinterpret): Remove.
253 (casts_away_constness_r): Adjust pointer-to-member handling.
254 (casts_away_constness): Liekwise.
255 (strip_all_pointer_quals): Remove.
256 * typeck2.c (digest_init): Adjust pointer-to-member handling.
257 (build_m_component_ref): Likewise.
259 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
261 * lex.c (unqualified_fn_lookup_error): Mention that the error
262 message needs to be kept in synch with the manual.
264 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
267 * decl.c (grokdeclarator): An array member is only a flexible
268 array member if the field itself is the array.
270 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
273 * decl.c (xref_basetypes): Handle error_mark_node.
275 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
277 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
278 * tree.c (lvalue_p_1): Set it.
279 * class.c (check_field): Don't allow non-packed non-POD fields to
281 * call.c (reference_binding): Need a temporary for all bitfield
283 (convert_like_real): Check it is ok to make a temporary here.
285 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
287 * cp-tree.h (hack_identifier): Remove.
288 * method.c (hack_identifier): Remove.
289 * semantics.c (finish_id_expression): Expand hack_identifier
292 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
294 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
295 semantics.c typeck.c: Remove unnecessary casts.
297 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
299 * cp-tree.h (hack_identifier): Remove.
300 * method.c (hack_identifier): Remove.
301 * semantics.c (finish_id_expression): Expand hack_identifier
304 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
306 * cp-tree.h (finish_non_static_data_member): Add object param.
307 * method.c (hack_identifier): Adjust.
308 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
309 again for a FIELD_DECL.
310 * semantics.c (finish_non_static_data_member): Add object
311 parameter. Always save the DECL in the COMPONENT_REF.
312 * call.c (resolve_scoped_fn_name): Adjust.
314 2003-07-17 Zack Weinberg <zack@codesourcery.com>
316 * pt.c (get_bindings): Make definition consistent with
319 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
322 * friend.c (add_friend): Check access for member functions
325 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
328 * typeck.c (build_class_member_access_expr): Improve diagnostic.
330 2003-07-16 Mark Mitchell <mark@codesourcery.com>
333 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
335 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
336 * decl.c (duplicate_decls): Merge
337 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
338 * parser.c (cp_parser_postfix_expression): Adjust call to
339 cp_parser_initializer_list and
340 cp_parser_parenthesized_expression_list.
341 (cp_parser_parenthesized_expression_list): Add non_constant_p.
342 (cp_parser_new_placement): Adjust call to
343 cp_parser_parenthesized_expression_list.
344 (cp_parser_direct_new_declarator): Likewise.
345 (cp_parser_conditional_expression): Remove.
346 (cp_parser_constant_expression): Parse an assignment-expression,
347 not a conditional-expression.
348 (cp_parser_simple_declaration): Resolve expression/declaration
349 ambiguity more quickly.
350 (cp_parser_mem_initializer): Adjust call to
351 cp_parser_parenthesized_expression_list.
352 (cp_parser_init_declarator): Keep track of whether or not the
353 initializer is a constant-expression.
354 (cp_parser_initializer): Add non_constant_p parameter.
355 (cp_parser_initializer_clause): Likewise.
356 (cp_parser_initializer_list): Likewise.
357 (cp_parser_attribute_list): Adjust call to
358 cp_parser_parenthesized_expression_list.
359 (cp_parser_functional_cast): Likewise.
360 * pt.c (tsubst_decl): Copy
361 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
362 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
363 * semantics.c (finish_id_expression): Use
364 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
366 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
368 * lang-options.h: Remove.
370 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
373 * class.c (field_decl_cmp): Remove.
374 (resort_field_decl_cmp): Remove.
375 (resort_sorted_fields): Remove.
376 (add_fields_to_vec): Rename to ...
377 (add_fields_to_record_type): this.
378 (finish_struct_1): Change to be using
379 sorted_fields_type's fields.
380 * cp-tree.h (lang_decl): In lang_decl_u3
381 change sorted_fields to be a pointer to
383 (resort_sorted_fields): Remove prototype.
384 * search.c (lookup_field_1): Change to be using
385 sorted_fields_type's fields.
387 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
390 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
391 is a member of other class.
392 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
393 is a specialization of function template.
395 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
398 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
401 2003-07-15 Mark Mitchell <mark@codesourcery.com>
403 * cp-tree.def (LOOKUP_EXPR): Remove.
404 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
405 (LOOKUP_EXPR_GLOBAL): Remove.
406 (get_bindings): Remove.
407 (is_aggr_type_2): Remove.
408 * call.c (resolved_scoped_fn_name): Remove support for
410 * decl.c (grokfndecl): Likewise.
411 (grokdeclarator): Likewise.
412 * error.c (dump_decl): Likewise.
413 (dump_expr): Likewise.
414 * friend.c (do_friend): Likewise.
415 * init.c (build_offset_ref): Likewise.
416 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
418 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
419 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
421 * pt.c (get_bindings): Give it internal linkage.
422 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
423 (lookup_template_function): Likewise.
424 (for_each_tempalte_parm_r): Likewise.
425 (tsubst_decl): Likewise.
426 (tsubst_qualified_id): Handle template template parameters.
427 (tsubst_copy): Remove support for LOOKUP_EXPR.
428 (tsubst_copy_and_build): Likewise.
429 (most_general_template): Likewise.
430 (value_dependent_expression_p): Likewise.
431 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
433 * semantics.c (perform_koenig_lookup): Do not create
435 (finish_fname): Likewise.
436 (finish_id_expression): Likewise.
437 * tree.c (is_aggr_type_2): Remove.
439 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
442 * typeck.c (check_return_expr): Fix thinko in diagnostic.
444 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
447 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
450 2003-07-14 Mark Mitchell <mark@codesourcery.com>
453 * pt.c (dependent_scope_ref_p): New function.
454 (value_dependent_expression_p): Use it.
455 (type_dependent_expression_p): Likewise.
457 * pt.c (tsubst_friend_function): Use reregister_specialization.
460 * cp-tree.h (lookup_qualified_name): Adjust prototype.
461 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
462 call to is_aggr_type.
463 * parser.c (cp_parser_lookup_name): Adjust call to
464 lookup_qualified_name.
465 * pt.c (tsubst_qualified_id): Likewise.
466 (tsubst_copy_and_build): Likewise.
467 * semantics.c (finish_qualified_id_expr): Deal with erroneous
470 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
473 * call.c (op_error): Properly format REALPART_EXPR and
475 * error.c (dump_expr): Likewise.
477 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
479 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
481 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
484 * call.c (initialize_reference): Improve diagnostic.
486 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
489 * pt.c (more_specialized_class): Add full_args parameter.
490 (most_specialized_class): Adjust calls to more_specialized_class.
491 * cp-tree.h (more_specialized_class): Adjust declaration.
493 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
495 * lex.c (enum tree_node_kind): Delete.
497 2003-07-13 Mark Mitchell <mark@codesourcery.com>
500 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
501 (SET_DECL_SELF_REFERENCE_P): Likewise.
502 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
503 * pt.c (tsubst_decl): Copy it.
504 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
506 * pt.c (reregister_specialization): Fix thinko in previous change.
508 * cp-tree.h (cp_id_kind): New type.
509 (unqualified_name_lookup_error): Change prototype.
510 (unqualified_fn_lookup_error): New function.
511 (do_identifier): Remove.
512 (do_scoped_id): Likewise.
513 (tsubst_copy_and_build): Change prototype.
514 (reregister_specialization): New function.
515 (perform_koenig_lookup): Likewise.
516 (finish_id_expression): Likewise.
517 * call.c (build_method_call): Adjust call to
518 unqualified_name_lookup_error.
519 * decl.c (duplicate_decls): Use reregister_specialization.
520 * lex.c (is_global): Remove.
521 (unqualified_name_lookup_error): Return a value.
522 (do_identifier): Remove.
523 (do_scoped_id): Likewise.
524 (identifier_typedecl_value): Remove.
525 (unqualified_fn_lookup_error): New function.
526 * parser.c (cp_parser_id_kind): Remove.
527 (cp_parser_non_constant_id_expression): Remove.
528 (cp_parser_primary_expression): Use finish_id_expression.
529 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
531 (cp_parser_postfix_expression): Use perform_koenig_lookup.
532 (cp_parser_template_argument): Use cp_id_kind.
533 (cp_parser_fold_non_dependent_expr): Adjust call to
534 tsubst_copy_and_build.
535 * pt.c (unregister_specialization): Rename to ...
536 (reregister_specialization): This.
537 (tsubst_friend_function): Use it.
538 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
539 (tsubst_qualified_id): Likewise.
540 (tsubst_expr): Likewise.
541 (tsubst_copy_and_build): Add function_p parameter. Use
542 finish_id_expression. Introduce RECUR macro.
543 (tsubst_non_call_postfix_expression): New function.
544 (regenerate_decl_from_template): Use reregister_specialization.
545 * semantics.c (perform_koenig_lookup): New function.
546 (finish_id_expression): Likewise.
548 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
550 * pt.c (push_access_scope_real): Remove.
551 (push_access_scope): Move code from push_access_scope_real.
552 (pop_access_scope): Don't check for TEMPLATE_DECL.
553 (instantiate_template): Defer access checking during template
555 (regenerate_decl_from_template): Tidy.
557 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
560 * operators.def: Add definitions for __imag__, __real__.
562 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
565 * parser.c (cp_parser_expression_list): Rename to ...
566 (cp_parser_parenthesized_expression_list): ... here. Add attribute
567 parameter, parse the surounding parentheses.
568 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
569 parameters. Return int.
570 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
571 (cp_parser_postfix_expression): Adjust function call parsing.
572 (cp_parser_new_placement): Adjust.
573 (cp_parser_new_initializer): Likewise.
574 (cp_parser_cast_expression): Likewise.
575 (cp_parser_selection_statement): Likewise.
576 (cp_parser_mem_initializer): Likewise.
577 (cp_parser_asm_definition): Likewise.
578 (cp_parser_init_declarator): Likewise.
579 (cp_parser_declarator): Make
580 cdtor_or_conv_p an int ptr.
581 (cp_parser_direct_declarator): Likewise. Check for a parameter
582 list on cdtors & conv functions.
583 (cp_parser_initializer): Adjust.
584 (cp_parser_member_declaration): Adjust.
585 (cp_parser_attribute_list): Move code into
586 cp_parser_parens_expression_list.
587 (cp_parser_functional_cast): Adjust.
588 * pt.c (type_dependent_expression_p): Erroneous expressions are
591 2003-07-11 Geoffrey Keating <geoffk@apple.com>
593 * decl.c (cp_finish_decl): Handle 'used' attribute.
595 * cp-lang.c (c_reset_state): New dummy routine.
596 * cp-tree.h (finish_file): Move prototype to c-common.h.
597 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
599 2003-07-11 Mark Mitchell <mark@codesourcery.com>
602 * pt.c (tsubst_qualified_id): Implement suggested resolution for
604 (type_dependent_expression_p): Likewise.
606 2003-07-10 Mark Mitchell <mark@codesourcery.com>
608 * typeck.c (build_binary_op): Do not warn about signed
609 vs. unsigned comparisons in the bodies of templates.
612 * parser.c (cp_parser_postfix_expression): Check dependency of
615 2003-07-09 Mark Mitchell <mark@codesourcery.com>
618 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
622 * error.c (decl_to_string): Do not print default argument
625 * cp-tree.h (break_out_calls): Remove declaration.
626 * tree.c (break_out_calls): Remove.
627 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
629 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
632 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
633 * decl2.c (constructor_name_p): Avoid repeated constructor_name
635 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
637 2003-07-09 Mark Mitchell <mark@codesourcery.com>
639 * typeck.c (build_x_unary_op): Take note of the fact that
640 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
643 * parser.c (cp_parser_primary_expression): Preserve the form of
644 qualified expressions in templates, even if they are not
646 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
647 (tsubst_qualified_id): Likewise.
648 * search.c (accessible_p): Treat everything in the body of a
649 template as accessible.
651 2003-07-08 Mark Mitchell <mark@codesourcery.com>
653 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
654 * cp-tree.h (build_call_from_tree): Remove.
655 (build_member_call): Likewise.
656 (dependent_template_arg_p): Remove.
657 (any_dependent_template_arguments_p): New function.
658 (dependent_template_id_p): Likewise.
659 (any_type_dependent_arguments_p): Likewise.
660 (build_non_dependent_expr): Likewise.
661 (build_non_dependent_args): Likewise.
662 (build_x_compound_expr): Adjust prototype.
663 * call.c (build_new_method_call): Handle non-dependent expressions
665 * decl2.c (grok_array_decl): Likewise.
666 (build_offset_ref_call_from_tree): Likewise.
667 (build_call_from_tree): Remove.
668 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
669 (dump_expr): Likewise.
670 * init.c (build_member_call): Remove.
671 * mangle.c (write_expression): Update handling for template-ids.
672 * parser.c (cp_parser_primary_expression): Use
673 any_dependent_template_arguments_p. Update constant-expression
675 (cp_parser_postfix_expression): Use
676 any_type_dependent_arguments_p. Simplify call processing.
677 (cp_parser_unary_expression): Simplify.
678 (cp_parser_expression): Adjust for changes to
679 build_x_compound_expr.
680 (cp_parser_template_argument): Implement standard-conforming
681 parsing of non-type template arguments.
682 (cp_parser_direct_declarator): Use
683 cp_parser_fold_non_dependent_expr.
684 (cp_parser_fold_non_dependent_expr): New function.
685 (cp_parser_next_token_ends_template_argument_p): Likewise.
686 * pt.c (convert_template_argument): Do not call
687 maybe_fold_nontype_arg.
688 (tsubst_baselink): Likewise.
689 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
690 processing work correctly for non-dependent expressions. Adjust
691 handling of COMPOUND_EXPR. Simplify call processing.
692 (value_dependent_expression_p): Deal with functional casts and
693 sizeof/alignof correctly.
694 (type_dependent_expression_p): Handle overloaded functions.
695 (any_type_dependent_arguments_p): New function.
696 (any_dependent_template_arguments_p): Likewise.
697 (dependent_template_p): Treat SCOPE_REFs as dependent.
698 (dependent_template_id_p): Simplify.
699 (build_non_dependent_expr): New function.
700 (build_non_dependent_args): Likewise.
701 * semantics.c (finish_stmt_expr): Don't make dependent
702 statement-expresions have void type.
703 (finish_call_expr): Handle non-dependent expressions
705 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
706 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
707 type size_t, even in templates.
708 (expr_sizeof): Likewise.
709 (finish_class_member_access_expr): Handle non-dependent expressions
711 (build_x_indirect_ref): Likewise.
712 (build_x_binary_op): Likewise.
713 (build_x_unary_op): Likewise.
714 (build_x_conditional_expr): Likewise.
715 (build_x_compound_expr): Likewise.
716 * typeck2.c (build_x_arrow): Likewise.
718 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
720 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
721 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
722 (start_function): Use DECL_ESTIMATED_INSNS.
723 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
725 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
728 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
731 * pt.c (instantiate_class_template): Don't call xref_tag to
732 inject name when the friend class is a specialization.
734 2003-07-07 Mark Mitchell <mark@codesourcery.com>
736 * cp-tree.h (build_scoped_method_call): Remove.
737 (lookup_qualified_name): Remove parameter.
738 (tsubst_copy_and_build): Declare.
739 (finish_qualified_object_call_expr): Remove.
740 (check_accessibility_of_qualified_id): New function.
741 (finish_qualified_id_expr): Likewise.
742 (non_reference): Likewise.
743 (build_expr_from-tree): Remove.
744 * call.c (non_reference): Remove.
745 (build_scoped_method_call): Likewise.
746 (build_method_call): Use error_operand_p. Assert that we are not
747 processing a template.
748 (standard_conversion): Use non_reference.
749 * class.c (build_vtbl_entry_ref): Likewise.
750 (build_vtbl_ref_1): Likewise.
751 * cvt.c (build_expr_type_conversion): Use non_reference.
752 * decl.c (lookup_qualified_name): Remove flags parameter.
753 (grok_op_properties): Use non_reference.
754 * decl2.c (grok_array_decl): Likewise.
755 (build_expr_from_tree): Remove.
756 (build_offset_ref_call_from_tree): Update comment.
757 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
758 * except.c (prepare_eh_types): Use non_reference.
759 (can_convert_eh): Likewise.
760 * init.c (build_dtor_call): Avoid using build_method_call.
761 * mangle.c (write_template_param): Remove misleading comment.
762 * method.c (locate_copy): Use non_reference.
763 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
764 (cp_parser_primary_expression): Do not create SCOPE_REFs is
765 non-dependent contexts.
766 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
767 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
768 build_expr_from_tree.
769 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
770 Use check_accessibility_of_qualified_id.
771 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
772 build_expr_from_tree.
773 (tsubst_baselink): New function.
774 (tsubst_qualified_id): Likewise.
775 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
776 (tsubst_expr): Adjust call to lookup_qualified_name.
777 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
778 handling of CALL_EXPRs.
779 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
780 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
781 * search.c (check_final_overrider): Likewise.
782 * semantics.c (check_accessibility_of_qualified_id): New function.
783 (finish_qualified_object_call_expr): Remove.
784 * typeck.c (target_type): Use non_reference.
785 (cxx_sizeof_or_alignof_type): Likewise.
786 (dubious_conversion_warnings): Likewise.
787 (convert_for_initialization): Likewise.
788 (non_reference): New function.
790 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
792 * decl.c (print_binding_level, print_other_binding_stack,
793 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
795 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
797 2003-07-07 Andreas Jaeger <aj@suse.de>
799 * friend.c: Convert to ISO C90 prototypes.
801 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
803 * cfns.h: Regenerate.
805 * typeck.c: Convert remaining prototypes to ISO C90.
806 * search.c: Likewise.
808 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
809 * semantics.c (expand_or_defer_fn): Likewise
810 * mangle.c (discriminator_for_string_literal): Likewise.
811 * g++spec.c (lang_specific_driver): Likewise.
813 * search.c (lookup_base_r): Remove unused variable.
815 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
817 * semantics.c: (genrtl_try_block) Adjust emit_line_note
820 2003-07-07 Andreas Jaeger <aj@suse.de>
822 * search.c (lookup_base_r): Remove unused variable.
824 2003-07-06 Michael Chastain <mec@shout.net>
827 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
828 assigning to input_filename directly.
830 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
832 * call.c: Fix comment formatting.
834 * cp-tree.h: Likewise.
838 * method.c: Likewise.
839 * name-lookup.c: Likewise.
840 * parser.c: Likewise.
843 * search.c: Likewise.
844 * typeck.c: Likewise.
846 2003-07-06 Mark Mitchell <mark@codesourcery.com>
849 * search.c (lookup_base_r): Remove is_non_public and
850 within_current_scope parameters. Remove other dead code.
851 (lookup_base): Adjust call to lookup_base_r.
852 (adjust_result_of_qualified_name_lookup): Improve comment.
853 * semantics.c (finish_call_expr): Use maybe_dummy_object.
855 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
857 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
858 LANG_HOOKS_MISSING_ARGUMENT): Override.
860 2003-07-05 Mark Mitchell <mark@codesourcery.com>
863 * typeck.c (build_static_cast): Check for reference conversions
866 2003-07-04 Mark Mitchell <mark@codesourcery.com>
868 * cp-tree.h (perform_integral_promotions): Declare.
869 * call.c (build_addr_func): Use decay_conversion.
870 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
871 (convert_for_arg_passing): Use perform_integral_promotions.
872 * cvt.c (build_expr_type_conversion): Use decay_conversion.
873 (type_promotes_to): Do not return a cv-qualified type.
874 * decl.c (grok_reference_init): Fix formatting.
875 (get_atexit_node): Use decay_conversion.
876 (build_enumerator): Use perform_integral_promotions.
877 * init.c (build_vec_init): Use decay_conversion.
878 * semantics.c (finish_expr_stmt): Likewise.
879 (finish_switch_cond): Use perform_integral_promotions.
880 * typeck.c (default_conversion): Likewise.
881 (perform_integral_promotions): New function.
882 (build_indirect_ref): Use decay_conversion.
883 (build_array_ref): Use perform_integral_promotions.
884 (convert_arguments): Use decay_conversion.
885 (build_unary_op): Use perform_integral_promotions.
886 (build_c_cast): Use decay_conversion.
887 (build_modify_expr): Likewise.
888 (convert_for_initialization): Likewise.
889 * typeck2.c (build_x_arrow): Likewise.
891 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
893 * call.c: Fix comment typos.
895 * cp-tree.h: Likewise.
900 * mangle.c: Likewise.
901 * parser.c: Likewise.
903 * search.c: Likewise.
904 * semantics.c: Likewise.
906 * typeck.c: Likewise.
908 2003-07-04 Zack Weinberg <zack@codesourcery.com>
910 * parser.c (cp_lexer_read_token): No need to handle string
911 constant concatenation.
913 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
915 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
916 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
917 ATTRIBUTE_GCC_CXXDIAG.
919 2003-07-03 Mark Mitchell <mark@codesourcery.com>
921 * call.c (build_addr_func): Handle bound pointers-to-members.
922 (build_method_call): Do not call resolve_offset_ref.
923 (implicit_conversion): Likewise.
924 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
926 (resolve_args): Do not call resolve_offset_ref.
927 (build_conditional_expr): Likewise.
928 (build_new_method_call): Likewise.
929 * cp-tree.def (OFFSET_REF): Update documentation.
930 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
931 pointers to members to pointers.
932 (ocp_convert): Do not call resolve_offset_ref.
933 (convert_to_void): Likewise.
934 (build_expr_type_conversion): Likewise.
935 * decl2.c (delete_sanity): Likewise.
936 * init.c (resolve_offset_ref): Simplify greatly.
937 (build_vec_delete): Do not call resolve_offset_ref.
938 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
940 (cp_parser_unary_expression): Use
941 cp_parser_simple_cast_expression.
942 (cp_parser_delete_expression): Likewise.
943 (cp_parser_cast_expression): Likewise.
944 (cp_parser_pm_expression): Use cp_parser_binary_op.
945 (cp_parser_simple_cast_expression): New function.
946 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
947 * semantics.c (finish_increment_expr): Likewise.
948 (finish_typeof): Likewise.
949 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
950 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
951 (decay_conversion): Do not call resolve_offset_ref.
952 (finish_class_member_access_expr): Likewise.
953 (convert_arguments): Likewise.
954 (build_x_binary_op): Handle DOTSTAR_EXPR.
955 (condition_conversion): Do not call resolve_offset_ref.
956 (unary_complex_lvalue): Likewise.
957 (build_static_cast): Likewise.
958 (build_reinterpret_cast): Likewise.
959 (build_const_cast): Likewise.
960 (build_c_cast): Likewise.
961 (build_modify_expr): Likewise.
962 (convert_for_assignment): Likewise.
963 (convert_for_initialization): Likewise.
964 * typeck2.c (build_x_arrow): Likewise.
965 (build_m_component_ref): Simplify.
967 * call.c (build_scoped_method_call): Use convert_to_void.
968 (build_method_call): Likewise.
969 * class.c (check_field_decls): Remove dead code.
970 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
971 * decl2.c (grok_array_decl): Remove dead code.
972 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
973 as pointer-to-member representation.
974 * init.c (build_offset_ref): Tidy.
975 (build_vec_delete_1): Use convert_to_void.
976 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
977 as pointer-to-member representation.
979 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
982 * decl.c (grokdeclarator): Return friend decls, not
984 * decl2.c (grokfield): Alter friend decl check.
985 * parser.c (struct cp_parser): Document default_arg chain on
986 unparsed_functions_queue.
987 (cp_parser_save_default_args): New.
988 (cp_parser_init_declarator, cp_parser_function_definition,
989 cp_parser_member_declaration): Call it.
990 (cp_parser_class_specifier): Remove unused variable. Alter
991 processing of unparsed_functions_queue.
993 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
995 * class.c (add_method, check_field_decl): Fix format specifier.
996 * decl.c (duplicate_decls, pushdecl, check_goto,
997 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
998 start_enum): Likewise.
999 * decl2.c (ambiguous_decl): Likewise.
1000 * pt.c (redeclare_class_template): Likewise.
1002 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
1005 * pt.c (type_unification_real): Don't unify exprs of error type.
1006 * tree.c (error_type): Don't die on error_type.
1009 * decl2.c (arg_assoc_class): Don't die on NULL type.
1010 * typeck.c (type_unknown_p): Don't die on untyped expressions.
1012 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1015 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1018 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1020 * error.c (locate_error): %P takes an `int', not a `tree'.
1022 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1024 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1025 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1026 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1029 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1030 (expand_or_defer_fn): Declare.
1031 (lower_function): Declare.
1032 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1033 * decl2.c: Include cgraph.h and varpool.h
1034 (maybe_emit_vtables): Make explicit instantations as needed.
1035 (mark_member_pointers, lower_function): New functions.
1036 (finish_file): Do unit-at-a-time.
1037 * method.c (synthesize_method): Use expand_or_defer_fn.
1038 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1039 * parser.c (cp_parser_function_definition_after_decl): Use
1041 * pt.c (instantiate_decl): Likewise.
1042 * semantics.c: Include cgraph.h
1043 (expand_or_defer_fn): Break out from ...
1044 (expand_body): ... here; deal with unit-at-a-time.
1045 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1046 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1048 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1050 * call.c (resolve_scoped_fn_name): Return error_mark_node for
1053 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1056 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1059 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
1062 * error.c (dump_decl): Handle BIT_NOT_EXPR as
1063 pseudo destructor calls.
1065 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1067 * cp-tree.h (define_label): Replace filename and lineno
1068 arguments with a location_t.
1069 * decl.c (pop_label): Adjust define_label call.
1070 (define_label): Replace filename and lineno arguments with a
1072 * semantics.c (finish_label): Adjust define_label call.
1074 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1077 * decl2.c (grokfield): Do not build NOP_EXPRs around the
1080 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
1082 * Make-lang.in: Update.
1083 * cp-lang.c (c_language): Define.
1084 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1085 * cp-tree.h (cxx_init_options): Remove.
1086 * lex.c: Don't include diagnostic.h.
1087 (cxx_init_options): Remove.
1089 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1092 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1093 tree generated within a template. Use dump_expr to dump an
1096 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1098 * mangle.c (write_expression): Exit gracefully when trying to
1101 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1104 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1105 (value- or type-) dependent expression as DECL_INITIAL is a
1106 valid constant-expression (at parser time).
1108 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1111 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1112 USING_DECL, instead of print_tree_identifier.
1114 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1116 * cp-tree.h (language_to_string): Adjust declaration.
1117 * dump.c (cp_dump_tree): Adjust usage.
1118 * error.c (dump_char): Use output_formatted_scalar. Tidy.
1119 (parm_to_string): Lose unused parameter. Tidy.
1120 (expr_to_string): Likewise.
1121 (code_to_string): Likewise.
1122 (language_to_string): Likewise.
1123 (op_to_string): Likewise.
1124 (assop_to_string): Likewise.
1125 (digit_buffer): Remove.
1126 (dump_type): Format builtin vector type as __vector__.
1128 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1130 * error.c (print_integer): Remove.
1131 (dump_type_suffix): Adjust.
1132 (dump_expr): Likewise.
1134 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1136 * error.c (print_instantiation_partial_context): Take a
1138 (print_instantiation_full_context): Adjust.
1139 (print_instantiation_context): Adjust.
1141 * cp-tree.h (cp_line_of, cp_file_of): Remove.
1142 * error.c (cp_line_of, cp_file_of): Merge into ...
1143 (location_of): ... here. Make static, return a location_t.
1144 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1146 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1149 * call.c (joust): Move warn_conversion check outwards.
1151 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1153 * decl.c (build_typename_type)
1154 * mangle.c (write_template_template_arg)
1155 * parser.c (cp_parser_scope_through_which_access_occurs)
1156 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1157 * repo.c (get_base_filename)
1158 * semantics.c (maybe_convert_cond):
1159 Mark the definition static, matching the forward declaration.
1161 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1164 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1166 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1169 * decl.c (finish_enum): Implement DR377.
1171 * decl.c (cp_finish_decl): Don't make variables with reference
1172 type readonly while they are being initialized.
1174 2003-06-26 Mark Mitchell <mark@codesourcery.com>
1177 * typeck.c (build_static_cast): Avoid returning expressions with
1180 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
1182 * call.c (build_op_delete_call): Use strip_array_call. Correct
1183 error message to say 'delete' or 'delete[]'.
1185 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
1188 * pt.c (check_explicit_specialization): When looking up a
1189 template function from an identifier outside class-scope, bind
1190 it to CP_DECL_CONTEXT.
1192 2003-06-25 Mark Mitchell <mark@codesourcery.com>
1195 * search.c (lookup_base_r): Rely on accessible_p, rather than
1196 trying to emulate that logic here.
1199 * call.c (convert_like): Pass issue_conversion_warnings.
1200 (convert_like_with_context): Likewise.
1201 (convert_like_real): Add issue_conversion_warnings parameter.
1202 (perform_direct_initialization_if_possible): New function.
1203 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
1204 * typeck.c (check_for_casting_away_constness): New function.
1205 (build_static_cast): Rewrite.
1207 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
1209 * call.c (enforce_access): Assert we get a binfo.
1210 (build_op_delete_call): Pass a binfo to
1211 perform_or_defer_access_check.
1212 * class.c (alter_access): Likewise.
1213 * decl.c (make_typename_type): Likewise.
1214 (make_unbound_class_template): Likewise.
1215 * lex.c (do_identifier): Likewise.
1216 * method.c (hack_identifier): Likewise.
1217 * parser.c (cp_parser_lookup_name): Likewise.
1218 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
1220 * semantics.c (finish_non_static_data_member): Likewise.
1221 (perform_or_defer_access_check): Expect a binfo.
1222 * typeck.c (comptypes): Expect types.
1224 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
1225 * friend.c (make_friend_class): Likewise.
1226 * pt.c (check_default_tmpl_args): Likewise.
1227 (lookup_template_class): Likewise.
1229 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
1231 * method.c (thunk_labelno): Move outside ifdef block to make garbage
1234 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
1236 * class.c (build_vtable): Make vtables.
1237 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
1238 * decl2.c (output_vtable_inherit): Rename to ...
1239 (prepare_assemble_variable): ... this one; change interface.
1240 (maybe_emit_vtables): Do not call output_vtable_inherit.
1241 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
1242 * cp-tree.h (prepare_assemble_variable): New.
1244 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
1246 * method.c: add prototype for make_alias_for_thunk.
1247 (thunk_labelno, make_alias_for_thunk): only define
1248 if ASM_OUTPUT_DEF is defined.
1250 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1252 * method.c (thunk_labelno): New variable.
1253 (make_alias_for_thunk): New function.
1254 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
1255 into the same section as the function it is calling.
1256 Include gt-cp-method.h.
1257 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
1258 (cp/method.o): Depend on gt-cp-method.h.
1259 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
1261 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
1263 * decl.c (register_dtor_fn): Mark cleanup as used.
1264 * decl2.c (mark_vtable_entries): Skip nops.
1265 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
1266 (build_dynamic_cast_1): Likewise.
1267 (tinfo_base_init): Likewise.
1268 (emit_tinfo_decl): Likewise.
1270 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1272 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
1275 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1278 * call.c (joust): Warn about choosing conversion sequence only if
1281 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1284 * call.c (op_error): Tidy.
1285 * error.c (dump_expr): Properly format 'T()' when T is an
1288 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1291 * decl.c (grok_op_properties): Warn possible confusing conversion
1292 only if -Wconversion.
1294 2003-06-20 Mark Mitchell <mark@codesourcery.com>
1297 * parser.c (cp_parser_class_head): See through dependent names
1298 when parsing a class-head.
1301 * pt.c (try_class_unification): Correct handling of member class
1304 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
1306 * semantics.c (genrtl_finish_function): Adjust
1307 expand_function_end call.
1309 2003-06-19 Mark Mitchell <mark@codesourcery.com>
1312 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
1314 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
1317 * cp-tree.h (pushdecl_class_level): Change prototype.
1318 (push_class_level_binding): Likewise.
1319 * decl.c (add_binding): Reject duplicate static data members.
1320 (pushdecl_class_level): Return a value indicating whether or not
1321 the binding was valid.
1322 (push_class_level_binding): Likewise.
1323 * semantics.c (finish_member_declaration): Don't keep invalid
1327 * call.c (initialize_reference): Do not use cp_finish_decl to emit
1328 temporary variables.
1329 * cp-tree.h (static_aggregates): Declare.
1330 (pushdecl_top_level_and_finish): Likewise.
1331 * decl.c (pushdecl_top_level_1): New function.
1332 (pushdecl_top_level): Use it.
1333 (pushdecl_top_level_and_finish): New function.
1334 (initialize_local_var): Remove redundant code.
1335 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
1337 * decl.h (static_aggregates): Remove.
1338 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
1339 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
1340 (tinfo_base_init): Likewise.
1342 2003-06-19 Matt Austern <austern@apple.com>
1345 * init.c (build_zero_init): Assert that number of array elements
1346 is an integer constant.
1347 (build_default_init) Don't use build_zero_init for arrays with
1348 variable number of elements.
1350 2003-06-19 Andreas Jaeger <aj@suse.de>
1352 * cp-tree.h: Remove duplicated declarations.
1354 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
1356 * pt.c: Convert to ISO C.
1357 * semantics.c: Convert to ISO C.
1359 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1361 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
1362 at_least_as_qualified_p, more_qualified_p): Return bool.
1363 * typeck.c: ANSIFY function definitions.
1364 (comp_array_types): Take redeclaration bool parameter.
1365 (comptypes): Rearrange STRICT handling.
1366 (at_least_as_qualified_p, more_qualified_p,
1367 comp_cv_qualification): Cache cv quals.
1368 (compparms): Rearrange loop.
1370 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1372 * cp-tree.h (COMPARE_RELAXED): Rename to ...
1373 (COMPARE_DERIVED): ... here. Adjust comment.
1374 (resolve_typename_type_in_current_instantiation): Remove.
1375 (cp_tree_equal, comptypes): Return a bool.
1376 * cvt.c (convert_to_reference): Adjust comptypes call.
1377 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
1378 (resolve_typename_type_in_current_instantiation): Remove.
1379 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
1380 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
1381 calls. Refactor code.
1382 * typeck.c (comp_array_types): Return bool. Lose callback.
1383 parameter. Adjust cp_tree_equal calls.
1384 (comptypes): Return bool. Adjust strict handling. Remove relaxed
1385 enumeration and java type handling. Deal with typename types here.
1386 Adjust recursive and cp_tree_equals calls. Adjust base and derived
1388 (comp_target_types): Remove unreachable code. Adjust
1389 same_or_base_type_p calls.
1390 (ptr_reasonably_similar): Adjust base and derived check.
1392 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
1394 (check_return_expr): Adjust error messages.
1395 * cp-tree.def (SCOPE_REF): Correct comment.
1397 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1399 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1402 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
1404 * optimize.c (dump_function): Form complete flag name by
1405 prefixing 'fdump-' to string returned by dump_flag_name().
1407 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1409 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1412 2003-06-17 Jason Merrill <jason@redhat.com>
1415 * decl.c (grokfndecl): Don't mark a function inline for
1416 -finline-functions if it isn't defined.
1418 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1421 * class.c (handle_using_decl): Robustify.
1424 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1425 * mangle.c (struct globals): Remove internal_mangling_p.
1426 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1427 (write_template_parm): Don't write out the level number.
1428 (conv_type_names): New variable.
1429 (hash_type): New function.
1430 (compare_type): Likewise.
1431 (mangle_conv_op_name_for_type): Don't try to mangle conversion
1433 * search.c (lookup_conversion_operator): New function.
1434 (lookup_fnfields_1): Use it.
1436 2003-06-17 Andreas Jaeger <aj@suse.de>
1438 * except.c: Remove duplicate declaration of push_eh_cleanup.
1440 * call.c: Remove extra declaration of inhibit_warnings.
1442 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1444 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
1445 * mangle.c: Convert to ISO C.
1447 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1449 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1452 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1454 * tree.c: Convert to ISO C.
1456 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
1458 * cp-tree.h: Follow spelling conventions.
1459 * mangle.c: Likewise.
1460 * method.c: Likewise.
1461 * parser.c: Likewise.
1463 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
1465 * decl.c (start_function): Adjust init_function_start call.
1466 * method.c (use_thunk): Likewise.
1467 * semantics.c (genrtl_start_function): Likewise.
1469 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
1471 * Make-lang.in: Remove c-options.o.
1473 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
1475 * lex.c: Convert to ISO C.
1477 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
1478 * init.c: removes use of PARAMS macro. Use ISO style function
1479 declarations. (Not copyright-significant change.)
1481 * rtti.c: Remove PARAMS.
1483 * typeck2.c: Convert to ISO C.
1485 2003-06-12 Mark Mitchell <mark@codesourcery.com>
1488 * typeck.c (build_c_cast): Check that the destination type is
1491 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1494 * cp-tree.h (finish_declarator): Remove.
1495 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1496 erroneous declarations.
1497 * semantics.c (finish_declarator): Remove.
1499 2003-06-11 Roger Sayle <roger@eyesopen.com>
1501 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1502 global static constructor/destructor if it will be empty, i.e.
1503 either doesn't call any ctors/dtors or only calls pure or const
1506 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1508 * mangle.c (tm_p.h): Include it.
1509 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1512 * tree.c (cp_cannot_inline_fn): Check for "inline" before
1515 2003-06-10 Jason Merrill <jason@redhat.com>
1518 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1520 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
1522 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1523 (start_cleanup_cnt): New.
1525 2003-06-10 Mark Mitchell <mark@codesourcery.com>
1528 * cp-tree.h (template_for_substitution): Declare.
1529 * decl2.c (mark_used): Use it when figuring out whether or not a
1531 * pt.c (template_for_substitution): Give it external linkage.
1532 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1535 2003-06-09 Zack Weinberg <zack@codesourcery.com>
1538 * mangle.c (write_real_cst): New function. Implement
1539 ABI-compliant mangling of floating-point literals when
1540 -fabi-version>=2; provide backward compatibility with 3.3 when
1541 -fabi-version=1 (with warning). Clarify commentary.
1542 (write_template_arg_literal): Use write_real_cst.
1544 2003-06-07 Andreas Jaeger <aj@suse.de>
1546 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1548 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
1550 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1551 (LANG_HOOKS_HANDLE_OPTION): Override.
1552 * cp-tree.h (cxx_init_options): Update.
1553 * lex.c (cxx_init_options): Update.
1555 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
1557 * Make-lang.in: Add support for stageprofile and stagefeedback
1559 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
1561 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1563 2003-06-04 Andreas Jaeger <aj@suse.de>
1565 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1567 2003-06-03 Jason Merrill <jason@redhat.com>
1569 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1571 * cp/decl.c (reshape_init): Handle vectors.
1573 * testsuite/g++.dg/init/array10.C: New.
1575 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1578 * pt.c (check_explicit_specialization): Check for 'static'
1581 2003-05-31 Diego Novillo <dnovillo@redhat.com>
1583 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
1584 the operand of a CONSTRUCTOR node.
1586 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1588 * decl.c (cp_binding_level::this_entity): Rename from this_class.
1589 (cxx_scope_descriptor): New function.
1590 (cxx_scope_debug): Likewise.
1591 (push_binding_level): Use it.
1592 (pop_binding_level): Likewise.
1593 (suspend_binding_level): Likewise.
1594 (resume_binding_level): Likewise.
1595 (pushlevel_class): Adjust use of this_class.
1596 (pushtag): Likewise.
1597 (lookup_name_real): Likewise.
1598 (global_scope_name): New variable.
1599 (initialize_predefined_identifiers): Initialize it.
1600 (push_namespace): Use it.
1601 (make_cxx_scope): New function.
1602 (pushlevel): Use it.
1603 (pushlevel_class): Likewise.
1604 (push_binding_level): Simplify. Loose the last two arguments.
1605 (make_binding_level): Remove.
1606 (initial_push__namespace_scope): New function.
1607 (push_namespace): Use it. Simplify.
1608 (cxx_init_decl_processing): Likewise.
1609 (declare_namespace_level): Remove.
1611 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1614 * pt.c (instantiate_decl): Don't use full template arguments if
1615 we are dealing with specializations.
1617 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1619 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
1620 (binding_depth): Unconditionally define.
1621 (is_class_level): Likewise.
1622 (indent): Likewise. Take an indenting parameter.
1623 (push_binding_level): Remove conditional definittion.
1624 (pop_binding_level): Likewise.
1625 (suspend_binding_level): Likewise.
1626 (resume_binding_level): Likewise.
1627 (pushlevel): Likewise.
1628 (pushlevel_class): Likewise.
1629 (poplevel_class): Likewise.
1630 (pop_everything): Likewise.
1632 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1634 * name-lookup.h (global_scope_p): New macro.
1635 * decl.c (pop_binding_level): Use it. Don't refer directly to
1636 global_binding_level.
1637 (suspend_binding_level): Likewise.
1638 (global_bindings_p): Likewise.
1639 (print_other_binding_stack): Likewise.
1640 (print_binding_stack): Likewise.
1641 (maybe_push_to_top_level): Likewise.
1642 (pushdecl_namespace_level): Likewise.
1643 (cxx_init_decl_processing): Likewise.
1644 (start_decl): Likewise.
1645 (cp_finish_decl): Likewise.
1646 (start_function): Likewise.
1647 (global_binding_level): Remove.
1649 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1651 * parser.c (cp_parser_explicit_instantiation): Restore old
1652 access before template instantiation.
1654 2003-05-23 Geoffrey Keating <geoffk@apple.com>
1656 * lang-specs.h: Use -o to specify preprocessor's output file.
1657 Make -no-integrated-cpp work when building PCH files.
1659 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1662 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1663 check for implicitly created typedef to an enum.
1665 2003-05-21 Jason Merrill <jason@redhat.com>
1667 * init.c (build_vec_delete): Copy the address into a temporary
1668 variable before calling build_vec_delete_1.
1669 * decl2.c (delete_sanity): Don't call stabilize_reference.
1671 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
1673 * pt.c (register_specialization): Update the decl's location,
1675 (check_explicit_specialization): Likewise.
1677 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1679 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1681 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
1684 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1685 if the old decl had instantiated DECL_RTL.
1686 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1688 2003-05-19 Matt Austern <austern@apple.com>
1690 * lang-options.h: Document -Wno-invalid-offsetof
1691 * typeck.c (build_class_member_access_expr): Don't complain about
1692 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
1694 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1696 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1697 (binding_entry_make): Make entry->chain NULL after getting an entry.
1698 fix the spelling of chain in a comment.
1699 (binding_table_free): speed up by having temporary variable.
1700 (binding_table_new): set table->chain to be NULL after allocating
1702 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1703 binding->previous to NULL after getting an binding for speed.
1705 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1707 * cp-tree.h (struct lang_type_class): Replace data member tags
1708 with hash-table nested_udts.
1709 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1710 * class.c (unreverse_member_declarations): Don't touch
1712 (pushclass): Use cxx_remember_type_decls.
1713 * decl.c (struct cp_binding_level): Replace data member tags with
1714 hash-table type_decls.
1715 (pop_binding_level): Handle level->type_decls.
1716 (kept_level_p): Adjust.
1717 (poplevel): Remove unused local variable.
1718 (bt_print_entry): New function.
1719 (print_binding_level): Use it.
1720 (push_namespace): Build current_binding_level->type_decls.
1721 (maybe_process_template_type_declaration): Adjust.
1722 (pushtag): Likewise.
1723 (clear_anon_tags): Use binding_table_remove_anonymous_types.
1725 (cxx_remember_type_decls): Rename from storetags. Adjust.
1726 (lookup_tag): Use binding_table_find_anon_type. Tidy.
1727 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
1728 (cxx_init_decl_processing): Build global_binding_level->type_decls.
1729 (store_parm_decls): Remove pointless code.
1730 * name-lookup.c (free_binding_entry): New variable.
1731 (ENTRY_INDEX): New macro.
1732 (struct binding_table_s): New datatype.
1733 (binding_entry_make): New function.
1734 (binding_entry_free): Likewise.
1735 (binding_table_construct): Likewise.
1736 (binding_table_free): Likewise.
1737 (binding_table_new): Likewise.
1738 (binding_table_expand): Likewise.
1739 (binding_table_insert): Likewise.
1740 (binding_table_find): Likewise.
1741 (binding_table_find_anon_type): Likewise.
1742 (binding_table_reverse_maybe_remap): Likewise.
1743 (binding_table_remove_anonymous_types): Likewise.
1744 (binding_table_foreach): Likewise.
1745 * name-lookup.h (binding_table): New type.
1746 (binding_entry): Likewise.
1747 (bt_foreach_proc): Likewise.
1748 (struct binding_entry_s): New datatype.
1749 (SCOPE_DEFAULT_HT_SIZE): New macro.
1750 (CLASS_SCOPE_HT_SIZE): Likewise.
1751 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1752 (NAMESPACE_STD_HT_SIZE): Likewise.
1753 (GLOBAL_SCOPE_HT_SIZE): Likewise.
1754 (binding_table_new): Declare.
1755 (binding_table_free): Likewise.
1756 (binding_table_insert): Likewise.
1757 (binding_table_find_anon_type): Likewise.
1758 (binding_table_reverse_maybe_remap): Likewise.
1759 (binding_table_remove_anonymous_types): Likewise.
1760 (binding_table_foreach): Likewise.
1761 (binding_table_find): Likewise.
1762 (cxx_remember_type_decls): Likewise.
1763 * pt.c (bt_instantiate_type_proc): New function.
1764 (do_type_instantiation): Use it.
1765 * search.c (lookup_field_r): Use binding_table_find.
1767 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1769 * semantics.c (perform_deferred_access_checks): Don't discard
1772 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1774 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1775 libiberty VA_ macros, always use stdarg.
1776 * rtti.c (create_pseudo_type_info): Likewise.
1777 * tree.c (build_min_nt, build_min): Likewise.
1779 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1781 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1782 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1783 collapse multiple function calls into one.
1784 * tree.c (debug_binfo): Likewise.
1786 2003-05-15 Jason Merrill <jason@redhat.com>
1789 * call.c (conditional_conversion): Don't consider implicit
1790 conversions if T2 is a base of T1.
1791 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
1792 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1794 * parser.c (cp_parser_primary_expression): Convert a static data
1795 member from reference.
1797 2003-05-15 Mark Mitchell <mark@codesourcery.com>
1799 * call.c (build_op_delete_call): Avoid creating unnecessary types.
1800 * class.c (instantiate_type): Remove tests for tf_no_attributes.
1801 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
1802 (COMPARE_NO_ATTRIBUTES): Remove.
1803 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
1806 * semantics.c (finish_typeof): Refine type-dependency check.
1808 2003-05-13 Jason Merrill <jason@redhat.com>
1810 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
1811 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
1813 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1815 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
1817 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1819 PR c++/10230, c++/10481
1820 * semantics.c (finish_non_static_data_member): Handle when the
1821 non-static member is not from a base of the current class type.
1823 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1826 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
1827 template and has dependent context.
1829 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1831 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
1833 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1836 * cp-tree.h (saved_scope): Remove check_access field.
1837 (tsubst_flags_t): Remove tf_parsing.
1838 * decl.c (maybe_push_to_top_level): Don't initialize
1839 scope_chain->check_access.
1840 (make_typename_type, make_unbound_class_template): Don't use
1842 (register_dtor_fn): Use push/pop_deferring_access_checks
1843 instead of scope_chain->check_access.
1844 * method.c (use_thunk): Likewise.
1845 * parser.c (cp_parser_explicit_instantiation
1846 (cp_parser_constructor_declarator_p): Don't call
1847 push/pop_deferring_access_checks here.
1848 (cp_parser_template_argument, cp_parser_class_name): Don't use
1850 (yyparse): Check flag_access_control.
1851 * pt.c (instantiate_class_template): Call
1852 push/pop_deferring_access_checks.
1853 * semantics.c (push_deferring_access_checks): Propagate
1855 (perform_or_defer_access_check): Make sure basetype_path is
1856 a type before comparison.
1857 * call.c (build_op_delete_call, build_over_call): Use
1858 perform_or_defer_access_check.
1859 * class.c (alter_access): Likewise.
1860 * init.c (build_offset_ref): Likewise.
1861 * lex.c (do_identifier): Likewise.
1862 * method.c (hack_identifier): Likewise.
1863 * search.c (lookup_member): Likewise.
1864 * semantics.c (finish_non_static_data_member): Likewise.
1865 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
1866 instead of flag_access_control.
1868 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1871 * parser.c (cp_parser_class_name): Remove check_access parameter.
1872 All caller adjusted. Update declaration.
1873 (cp_parser_lookup_name): Likewise.
1874 * semantics.c (push_deferring_access_checks): Change parameter type
1875 to enum deferring_kind. All caller adjusted.
1876 (resume_deferring_access_checks): Adjust to use new enum.
1877 (stop_deferring_access_checks): Likewise.
1878 (perform_or_defer_access_check): Likewise.
1879 * cp-tree.h (deferring_kind): New enum.
1880 (deferred_access): Adjust field type.
1881 (push_deferring_access_checks): Update declaration.
1883 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1885 PR c++/10555, c++/10576
1886 * pt.c (lookup_template_class): Handle class template with
1887 multiple levels of parameters when one of the levels contain
1890 2003-05-08 Jason Merrill <jason@redhat.com>
1892 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
1893 expression. Undo some of the recent reorg.
1895 2003-05-07 Richard Henderson <rth@redhat.com>
1898 * cfns.gperf: Comment out POSIX thread cancellation points,
1899 plus abort and raise.
1900 * cfns.h: Regenerate.
1902 2003-05-07 Jason Merrill <jason@redhat.com>
1904 * call.c (build_conditional_expr): Don't assume that the folded
1905 expression has result_type.
1907 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1909 * typeck.c (build_unary_op): Deal with const qualifier in
1910 invalid pointer-to-member earlier.
1912 2003-05-05 Jason Merrill <jason@redhat.com>
1915 * call.c (conditional_conversion): Build an RVALUE_CONV if
1916 we're just changing the cv-quals.
1917 (build_conditional_expr): Don't call convert to change
1920 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1923 * typeck.c (build_unary_op): Don't output const qualifier when
1924 output invalid pointer-to-member diagnostics.
1926 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1928 * decl.c: Fix typos.
1930 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1933 * decl.c (start_function): Use same_type_p to check return type
1936 2003-05-03 Zack Weinberg <zack@codesourcery.com>
1939 * cp/typeck.c (build_x_compound_expr): No need to check
1940 extra_warnings as well as warn_unused_value.
1942 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1944 PR c++/9364, c++/10553, c++/10586
1945 * decl.c (make_typename_type): Don't crash on illegal code.
1947 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
1949 * class.c (finish_struct): Use location_t and input_location
1951 * decl.c (make_label_decl): Likewise.
1952 (use_label): Likewise.
1953 * decl2.c (warn_if_unknown_interface): Likewise.
1954 (start_static_initialization_or_destruction): Likewise.
1955 (generate_ctor_or_dtor_function): Likewise.
1956 (finish_file): Likewise.
1957 * error.c (print_instantiation_full_context): Likewise.
1958 * init.c (create_temporary_var): Likewise.
1959 * method.c (synthesize_method): Likewise.
1960 * parser.c (cp_token): Likewise.
1961 (cp_lexer_set_source_position_from_token): Likewise.
1962 (cp_lexer_get_preprocessor_token): Likewise.
1963 (cp_parser_statement): Likewise.
1964 * pt.c (tsubst_friend_function): Likewise.
1965 (instantiate_class_template): Likewise.
1966 (tsubst_decl): Likewise.
1968 (instantiate_decl): Likewise.
1969 * semantics.c (begin_class_definition): Likewise.
1970 (expand_body): Likewise.
1972 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
1974 * class.c (finish_struct): Rename lineno to input_line.
1975 * decl.c (push_binding_level, pop_binding_level,
1976 suspend_binding_level, resume_binding_level, make_label_decl,
1977 use_label, start_function): Likewise.
1978 * decl2.c (warn_if_unknown_interface,
1979 start_static_initialization_or_destruction,
1980 generate_ctor_or_dtor_function, finish_file): Likewise.
1981 * error.c (cp_line_of, print_instantiation_full_context,
1982 print_instantiation_context): Likewise.
1983 * except.c (check_handlers_1, check_handlers): Likewise.
1984 * init.c (create_temporary_var): Likewise.
1985 * method.c (use_thunk, synthesize_method): Likewise.
1986 * parser.c (cp_lexer_set_source_position_from_token,
1987 cp_lexer_get_preprocessor_token): Likewise.
1988 * pt.c (push_tinst_level, pop_tinst_level,
1989 tsubst_friend_function, instantiate_class_template, tsubst_decl,
1990 tsubst, tsubst_expr, instantiate_decl): Likewise.
1991 * semantics.c (genrtl_try_block, finish_label_stmt,
1992 begin_class_definition, expand_body,
1993 genrtl_finish_function): Likewise.
1994 * tree.c (build_min_nt, build_min): Likewise.
1996 2003-05-01 Mark Mitchell <mark@codesourcery.com>
1998 * decl2.c (comdat_linkage): Don't externalize explicit
2001 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2004 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2007 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
2009 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
2010 (struct lang_identifier): ... to here.
2011 (LANG_ID_FIELD): Remove.
2012 (SET_LANG_ID): Remove.
2013 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2014 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2015 (IDENTIFIER_IMPLICIT_DECL): Likewise.
2016 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2017 (IDENTIFIER_ERROR_LOCUS): Likewise.
2018 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2020 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2023 * pt.c (convert_template_argument): Correct diagnostic.
2025 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2027 PR c++/9432, c++/9528
2028 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2030 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
2032 * decl.c (check_previous_goto_1): Adjust prototype.
2033 (check_previous_goto): Adjust use.
2034 (check_switch_goto): Likewise.
2035 (use_label): Adjust.
2036 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2037 (struct named_label_use_list): Use location_t datatype.
2039 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2042 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2043 that have not yet been written out.
2045 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2048 * class.c (layout_class_type): Mark overlong bitfields as having
2049 the maximum size permitted by their type, after layout.
2052 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2054 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2056 * call.c (build_operator_new_call): Fix typo.
2057 * lang-options.h: Likewise.
2059 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2062 * cp-tree.h (lookup_field_1): Declare it.
2063 * search.c (lookup_field_1): Make it public.
2064 * decl.c (reshape_init): Handle designated initializers.
2066 * decl.c (maybe_commonize_var): Further tweak support for systems
2067 without weak symbols.
2069 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2071 * decl.c (maybe_commonize_var): Fix thinko in last patch.
2073 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2076 * method.c (use_thunk): Decrement immediate_size_expand.
2079 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2080 (DECL_MAYBE_TEMPLATE): Remove.
2081 * class.c (fixed_type_or_null): Avoid infinite recursion.
2083 * decl.c (maybe_commonize_var): Make the code match the comments.
2084 * pt.c (instantiate_decl): Move call to import_export_decl.
2086 2003-04-26 Mark Mitchell <mark@codesourcery.com>
2088 * decl2.c (finish_file): Fix merge botch.
2090 2003-04-25 Mark Mitchell <mark@codesourcery.com>
2092 * decl2.c (finish_file): Don't call import_export_decl for
2093 functions that are not defined.
2094 (handle_class_head): Robustify.
2095 * pt.c (instantiate_decl): Do not call cp_finish_decl for
2096 variables that are not defined.
2098 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
2100 * call.c (print_z_candidates): Fix off by one error.
2102 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
2105 * call.c (joust): Don't warn about conversion ops that are exact
2106 or cv-conversions. Rearrange to avoid multiple type comparisons.
2108 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2111 * call.c (build_cxx_call): Robustify.
2113 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
2115 * Make-lang.in (lex.o): Remove mbchar.h.
2116 * lex.c (MULTIBYTE_CHARS): Lose.
2117 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2120 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2123 * cp-tree.h (duplicate_tag_error): Remove.
2124 * class.c (duplicate_tag_error): Remove.
2125 * semantics.c (begin_class_definition): Return immediately for a
2126 duplicate class definition.
2129 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2131 2003-04-22 Mark Mitchell <mark@codesourcery.com>
2134 * search.c (lookup_fnfields_1): Handle empty slots in the method
2138 * decl.c (check_elaborated_type_specifier): New function, split
2140 (xref_tag): ... here. Use the new function in more places.
2142 * rtti.c (throw_bad_typeid): Use build_cxx_call.
2144 2003-04-21 Mark Mitchell <mark@codesourcery.com>
2146 * call.c (build_over_call): Use build_cxx_call.
2147 (build_cxx_call): New method, split out of build_over_call.
2148 * cp-tree.h (language_function): Add can_throw.
2149 (build_cxx_call): Declare it.
2150 * decl.c (finish_function): If a function does not contain any
2151 calls to functions that can throw an exception, indicate that
2153 * decl2.c (mark_used): Do not defer the instantiation of
2154 functions, if the current function does not throw.
2155 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2156 * pt.c (instantiate_decl): Make sure import_export_decl is called
2157 before emitting things.
2158 * rtti.c (throw_bad_cast): Use build_cxx_call.
2159 (build_dynamic_cast_1): Likewise.
2160 * typeck.c (build_function_call): Likewise.
2162 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
2165 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
2166 expressions. Reverts my 2002-08-08 patch.
2168 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
2171 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2173 * cp/decl2.c (start_static_storage_duration_function): Take count
2174 arg, don't check if it wraps round.
2175 (generate_ctor_or_dtor_function): Add locus arg, use it.
2176 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
2178 (finish_file): Set line numbers to past EOF for synthesized
2181 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2184 * search.c (lookup_field_1): Final scan goes backwards for
2185 types, forwards for non-types.
2187 2003-04-17 Roger Sayle <roger@eyesopen.com>
2190 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
2191 "nothrow" function attributes.
2193 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2196 * pt.c (type_dependent_expression_p): Handle array new.
2198 2003-04-15 Mark Mitchell <mark@codesourcery.com>
2201 * parser.c (cp_parser_primary_expression): Reorganize logic for
2202 dealing with name lookup failures.
2204 2003-04-15 Jason Merrill <jason@redhat.com>
2206 * decl2.c (mark_used): Don't instantiate anything if
2209 2003-04-14 Ziemowit Laski <zlaski@apple.com>
2211 * tree.c (build_cplus_array_type_1): Do not call
2212 uses_template_parms() on a NULL index_type.
2214 2003-04-13 Roger Sayle <roger@eyesopen.com>
2216 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
2218 2003-04-12 Mark Mitchell <mark@codesourcery.com>
2221 * init.c (build_new_1): Reorganize.
2223 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2225 * class.c (initialize_array)
2226 * decl.c (reshape_init)
2227 * decl2.c (build_expr_from_tree)
2228 * init.c (build_zero_init)
2229 * pt.c (tsubst_copy, tsubst_copy_and_build)
2230 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
2231 (ptm_initializer, class_initializer, get_pseudo_ti_init)
2232 * semantics.c (finish_compound_literal)
2233 * typeck.c (build_ptrmemfunc1)
2234 * typeck2.c (store_init_value, process_init_constructor)
2235 (build_functional_cast): Use build_constructor.
2237 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2239 * call.c (print_z_candidates): Use gcc_gettext_width, not
2240 strlen, to determine how much padding to use.
2242 2003-04-10 Zack Weinberg <zack@codesourcery.com>
2244 * decl.c: Update all calls to shadow_warning.
2246 2003-04-10 Mark Mitchell <mark@codesourcery.com>
2248 * class.c (layout_class_type): Correct handling for overlong
2249 bit-fields whose width is the same as an integer type.
2251 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2253 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
2254 * cp-lang.c (cp_tree_size): New function.
2255 (LANG_HOOKS_TREE_SIZE): Override.
2257 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
2258 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
2259 (union lang_tree_node): Remove common and srcloc members.
2260 (build_srcloc_here): Don't prototype.
2261 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
2262 * pt.c (pending_templates): Correct comment.
2263 * tree.c (build_srcloc, build_srcloc_here): Kill.
2265 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2267 * call.c: Include intl.h.
2268 (print_z_candidate): Always use inform; get rid of errfn
2269 argument. Reorganize so that all the strings get picked up
2270 by xgettext. Note obligation of caller to pass first argument
2272 (print_z_candidates): Update to match. Indent second and
2273 successive candidates by strlen() of translated message.
2274 (joust): Restructure ambiguous-conversion pedwarn so that
2275 translators see a complete sentence. Update calls to
2278 * Make-lang.in (cp/call.o): Update dependencies.
2280 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2282 * decl.c (set_current_binding_level): Delete, revert last change.
2283 (current_binding_level): Modify to allow it as as lvalue.
2285 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2287 * name-lookup.c (find_binding): Pass appropriate pointer type to
2288 POP_TIMEVAR_AND_RETURN.
2290 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2292 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
2293 * cp-tree.h: Don't insist on having GNUC.
2295 2003-04-03 Jason Merrill <jason@redhat.com>
2297 * cvt.c (ocp_convert): Only abort if we try to convert an object
2298 of TREE_ADDRESSABLE type.
2300 * class.c (build_vtable): Set DECL_ALIGN here.
2301 (get_vtable_decl): Not here.
2302 (layout_vtable_decl): Or here.
2303 (create_vtable_ptr): Or here.
2304 (layout_class_type): Or here.
2305 (check_bitfield_decl): Don't mess with field alignment.
2307 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2309 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
2310 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
2311 * rtti.c (dfs_class_hint_mark): Likewise.
2313 * decl.c (push_local_name, push_class_level_binding,
2314 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
2315 functions returning void.
2316 * decl2.c (add_using_namespace): Likewise.
2318 * decl.c (print_binding_level, print_other_binding_stack,
2319 print_binding_stack): Cast argument of %p specifier to void*.
2320 * ptree.c (cxx_print_decl): Likewise.
2322 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2323 VAR_FUNCTION_OR_PARM_DECL_CHECK,
2324 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2325 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
2326 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
2328 * decl.c (set_current_binding_level): New macro. Use throughout
2329 when setting the current binding level.
2331 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
2333 * method.c (mangling_flags): Likewise.
2335 * cp-tree.h (lang_type_header): Add __extension__ and use
2336 CHAR_BITFIELD for members.
2338 2003-04-02 Geoffrey Keating <geoffk@apple.com>
2341 * mangle.c: Include gt-cp-mangle.h.
2342 (subst_identifiers): Mark with GTY.
2343 * config-lang.in (gtfiles): Add cp/mangle.c.
2344 * Make-lang.in: (gt-cp-mangle.h): New rule.
2345 (cp/mangle.o): Depends on gt-cp-mangle.h.
2347 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
2349 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
2350 after \$(srcdir)/cp/name-lookup.h.
2351 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
2352 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
2353 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
2354 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2356 2003-03-31 Jason Merrill <jason@redhat.com>
2359 * class.c (check_field_decl): Don't set DECL_ALIGN.
2361 2003-03-30 Mark Mitchell <mark@codesourcery.com>
2364 * decl.c (grokdeclarator): Tidy, slightly.
2365 * search.c (lookup_field_1): Add want_type parameter.
2366 (lookup_field_r): Adjust call to lookup_field_1.
2368 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2370 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
2372 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2374 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
2376 (cxx_scope_find_binding_for_name): Likewise.
2377 * decl.c (find_binding: Move to name-lookup.c.
2378 (binding_for_name): Likewise.
2379 (cxx_scope_find_binding_for_name): Likewise.
2380 (BINDING_LEVEL): Remove.
2381 (push_binding): Tidy.
2382 (push_class_binding): Likewise.
2383 (pop_binding): Likewise.
2384 (poplevel): Likewise.
2385 (poplevel_class): Likewise.
2386 (set_identifier_type_value_with_scope): Likewise.
2387 (push_overloaded_decl): Likewise.
2388 (lookup_tag): Likewise.
2389 (unqualified_namespace_lookup): Likewise.
2390 (lookup_name_current_level): Likewise.
2391 (maybe_inject_for_scope_var): Likewise.
2392 (namespace_binding): Move to name-lookup.c.
2393 (set_namespace_binding): Likewise.
2394 * decl2.c (lookup_using_namespace): Tidy.
2395 (qualified_lookup_using_namespace): Likewise.
2396 (do_toplevel_using_decl): Likewise.
2397 * name-lookup.c: Include "timevar.h"
2398 * name-lookup.h (cxx_scope): Declare.
2399 (struct cxx_binding): Lose member "has_level". Adjust "scope"
2401 (BINDING_SCOPE): Adjust definition.
2402 (BINDING_HAS_LEVEL_P): Remove.
2404 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2406 * name-lookup.c: New file.
2407 * name-lookup.h: Likewise..
2408 * decl.c (push_binding): Adjust use cxx_binding_make.
2409 (free_bindings): Move to name-lookup.c
2410 (pop_binding): Use cxx_binding_free.
2411 (binding_for_name): Tidy.
2412 * cp-tree.h: Include "name-lookup.h"
2413 (cxx_binding_make): Move to name-lookup.h
2414 (cxx_binding_clear): Likewise.
2415 (struct cxx_binding): Likewise.
2416 (LOCAL_BINDING_P): Likewise.
2417 (INHERITED_VALUE_BINDING_P): Likewise.
2418 (BINDING_SCOPE): Likewise.
2419 (BINDING_HAS_LEVEL_P): Likewise.
2420 (BINDING_VALUE): Likewise.
2421 (BINDING_TYPE): Likewise.
2422 * config-lang.in (gtfiles): Add cp/name-lookup.h
2423 * Make-lang.in (cp/name-lookup.o): New rule.
2424 (CXX_OBJS): Add cp/name-lookup.o
2425 (CXX_TREE_H): Add cp/name-lookup.h
2427 2003-03-28 Jason Merrill <jason@redhat.com>
2430 * cvt.c (force_rvalue): New fn.
2431 * call.c (build_conditional_expr): Use it.
2432 * cp-tree.h: Declare it.
2434 2003-03-28 Mike Stump <mrs@apple.com>
2436 * error.c (dump_expr): Add 0x to printed hex numbers to make
2437 output match source code better.
2439 2003-03-28 Mark Mitchell <mark@codesourcery.com>
2442 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2445 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2446 non-existant ssdf_decls array.
2447 (finish_file): Call generator_ctor_or_dtor_function when there are
2448 static constructors or destructors and no other static
2451 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
2454 * decl2.c (finish_file): Don't warn about explicitly instantiated
2457 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2460 * pt.c (lookup_template_class): Only check instantiated args if
2461 they do not contain template parameters.
2463 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2466 * parser.c (cp_parser_function_definition): Set
2467 DECL_INITIALIZED_IN_CLASS for members.
2468 * pt.c (instantiate_decl): Only reduce the template args for
2469 friends that are not defined in class.
2471 2003-03-25 Jason Merrill <jason@redhat.com>
2473 * call.c (print_z_candidate): Change name of first arg to msgid.
2474 (joust): Add comment for translators.
2476 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2478 PR c++/9898, PR c++/383, DR 322
2479 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2480 through reference types on both PARM and ARG.
2482 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2485 * error.c (dump_expr) <BASELINK>: Use dump_expr.
2486 * pt.c (maybe_fold_nontype_args): New function.
2487 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2488 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2489 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2490 maybe_fold_nontype_args.
2492 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2495 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2497 2003-03-23 Mark Mitchell <mark@codesourcery.com>
2500 * typeck.c (cxx_mark_addressable): Adjust call to
2501 gen_mem_addressof or put_var_into_stack.
2503 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
2505 PR c++/9978, c++/9708
2506 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2507 * call.c (add_template_candidate_real): Adjust
2508 instantiate_template call.
2509 * class.c (resolve_address_of_overloaded_function): Likewise.
2510 * decl.c (build_enumerator): Set TREE_CONSTANT.
2511 * pt.c (check_instantiated_args): New.
2512 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2514 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2515 (reduce_template_parm_level): Likewise.
2516 (process_template_parm): Likewise.
2517 (check_explicit_specialization): Adjust instantiate_template call.
2518 (convert_template_argument): Don't check non-type argument here.
2519 (lookup_template_class): Check them here.
2520 (tsubst_friend_function): Adjust instantiate_template call.
2521 (instantiate_template): Add tsubst_flags parameter, use it. Check
2524 2003-03-21 Zack Weinberg <zack@codesourcery.com>
2526 * decl.c: Update calls to shadow_warning.
2528 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
2531 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2532 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2534 2003-03-20 Mark Mitchell <mark@codesourcery.com>
2536 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2538 * cp/pt.c (instantiate_class_template): Fix formatting.
2540 2003-03-14 Matt Austern <austern@apple.com>
2542 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2543 (unemitted_tinfo_decl_p): Remove.
2544 (emit_tinfo_decl): Change declaration to remove unused parameter.
2545 * decl2.c (finish_file): Change tinfo emission to loop through
2546 unemitted_tinfo_decls array instead of looping through all decls.
2547 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2548 unused second parameter.
2549 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2550 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2551 (emit_tinfo_decl): remove unused second parameter, add assertion
2552 that decl hasn't already been emitted.
2554 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
2556 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2557 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2560 2003-03-19 Jason Merrill <jason@redhat.com>
2562 PR c++/8316, c++/9315, c++/10136
2563 * call.c (print_z_candidate): Split out from...
2564 (print_z_candidiates): ...here.
2567 2003-03-17 Roger Sayle <roger@eyesopen.com>
2570 * decl.c (duplicate_decls): Use the new type when prototyping
2571 anticipated decls, even when the types match. This defines the
2572 exception list for the built-in function.
2574 2003-03-17 Jason Merrill <jason@redhat.com>
2577 * typeck.c (build_class_member_access_expr): Compare
2580 2003-03-17 Mark Mitchell <mark@codesourcery.com>
2583 * parser.c (cp_parser_declarator_id): Clear parser->scope.
2585 2003-03-16 Jason Merrill <jason@redhat.com>
2588 * decl.c (finish_function): Only allow the NRVO to use variables
2589 declared at function scope.
2591 2003-03-17 Andreas Jaeger <aj@suse.de>
2593 * Make-lang.in (cp/TAGS): Remove.
2595 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
2598 * cp-tree.h (struct language_function): Add in_base_initializer.
2599 (in_base_initializer): define it.
2600 (expand_member_init): Remove INIT param.
2601 * init.c (expand_member_init): Remove INIT param, return the member.
2602 (emit_mem_initializers): Set in_base_initializer.
2603 * class.c (build_base_path): Check in_base_initializer.
2604 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
2605 * pt.c (tsubst_initializer_list): Likewise.
2607 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2609 * decl.c (binding_for_name): Fix initialization thinko.
2611 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2613 Compile-time improvement: 2/n.
2614 * cp-tree.h (struct cxx_binding): New datatype;
2615 (struct lang_identifier): Use it.
2616 (LOCAL_BINDING_P): Adjust definition.
2617 (INHERITED_VALUE_BINDING_P): Likewise.
2618 (BINDING_SCOPE): Likewise.
2619 (BINDING_HAS_LEVEL_P): Likewise.
2620 (BINDING_VALUE): Likewise.
2621 (BINDING_TYPE): Likewise.
2622 (IDENTIFIER_VALUE): Likewise.
2623 (struct tree_binding): Remove.
2624 (TS_CP_BINDING): Likewise.
2625 ((union lang_tree_node): Remove field "binding".
2626 (cxx_binding_clear): New macro.
2627 (binding_for_name): Adjust return type.
2628 (qualified_lookup_using_namespace): Adjust prototype.
2629 (lookup_using_namespace): Adjust prototype.
2630 (cxx_scope_find_binding_for_name): Declare.
2631 * cp-tree.def: Remove CPLUS_BINDING definition.
2632 * decl.c (push_binding): Adjust local variable type.
2633 (add_binding): Likewise.
2634 (push_class_binding): Likewise.
2635 (pop_binding): Likewise.
2636 (poplevel): Likewise.
2637 (poplevel_class): Likewise.
2638 (free_bindings): Adjust type.
2639 (find_binding): Adjust return type, add a third parameter. Remove
2640 non-useful assertion now that we use static typing.
2641 (cxx_scope_find_binding_for_name): New function.
2642 (binding_for_name): Use it. Adjust local variable type. Simplify.
2643 (namespace_binding): Simplify.
2644 (set_namespace_binding): Likewise.
2645 (set_identifier_type_value_with_scope): Adjust local variable type.
2646 (lookup_tag): Don't type-abuse of local variable 'old'.
2647 (lookup_namespace_name): Likewise. Allocate binding on stack.
2648 (select_decl): Adjust prototype.
2649 (unqualified_namespace_lookup): Allocate binding on stack.
2650 Don't type-abuse of local variable 'val'.
2651 (lookup_name_real): Likewise.
2652 (maybe_inject_for_scope_var): Adjust local variable type.
2653 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2654 (namespace_binding): Adjust logic, simplify.
2655 (BINDING_LEVEL): Adjust definition.
2656 (push_class_level_binding): Adjust local variable type.
2657 (struct cxx_saved_binding): Adjust field 'binding' type.
2658 * decl2.c (ambiguous_decl): Adjust prototype.
2659 (lookup_using_namespace): Adjust local variable type.
2660 (qualified_lookup_using_namespace): Catch type error and correct
2661 ensueing logic error.
2662 (do_nonmember_using_decl): Adjust local variable type. Allocate
2663 temporary cxx_binding on stack.
2664 (do_toplevel_using_decl): Adjust local variable type.
2665 * ptree.c (cxx_print_cxx_binding): New function.
2666 (cxx_print_identifier): Use it.
2667 (cxx_print_xnode): Delete CPLUS_BINDING case label.
2669 2003-03-15 Roger Sayle <roger@eyesopen.com>
2671 * tree.c (count_functions): Fix whitespace.
2673 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
2675 * Make-lang.in: Update.
2677 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2680 * pt.c (maybe_process_partial_specialization): Handle
2681 member class template when enclosing class template is
2682 explicit specialized.
2683 (most_general_template): Stop looking when DECL is already
2686 2003-03-13 Jason Merrill <jason@redhat.com>
2689 * search.c (lookup_conversions): Call complete_type here.
2690 * call.c (implicit_conversion): Not here.
2692 2003-03-13 Mark Mitchell <mark@codesourcery.com>
2694 * decl2.c (do_nonmember_using_decl): Correct handling of
2695 simultaneous type/non-type bindings.
2697 * call.c (initialize_reference): Remove bogus assertion.
2698 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2700 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
2703 * expr.c (cxx_expand_expr): Return const0_rtx for throw
2706 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2709 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2710 to merge old and new declarations.
2712 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2715 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2716 (cp/g++.1): Build it from scratch in the build tree.
2717 (c++.install-man): Depend on it. Install it from the build tree.
2718 (c++.mostlyclean): Clean it.
2720 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2723 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2724 to merge old and new declarations.
2727 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2729 2003-03-11 Jason Merrill <jason@redhat.com>
2732 * search.c (lookup_member): Fix handling of functions in a class
2735 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2738 * call.c (convert_class_to_reference): Adjust usage of
2740 (any_viable): Remove.
2741 (splice_viable): Combine with any_viable.
2742 (print_z_candidates): Avoid printing duplicates.
2743 (build_user_type_conversion_1): Adjust usage of splice_viable.
2744 (build_new_function_call): Likewise.
2745 (build_operator_new_call): Likewise.
2746 (build_object_call): Likewise.
2747 (build_conditional_expr): Likewise.
2748 (build_new_op): Likewise.
2749 (build_new_method_call): Likewise.
2750 (joust): Remove spurious comment.
2751 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2752 * decl2.c (arg_assoc_class): Simplify.
2753 * friend.c (add_friend): Likewise.
2755 2003-03-11 Jason Merrill <jason@redhat.com>
2758 * decl2.c (check_classfn): A member template only matches a
2761 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
2763 * Make-lang.in (CXX_C_OBJS): Update.
2764 * lang-specs.h: Don't define __GNUG__ here.
2766 2003-03-10 Mark Mitchell <mark@codesourcery.com>
2768 * call.c (perform_overload_resolution): New function.
2769 (build_new_function_call): Use it.
2770 (build_operator_new_call): Likewise.
2771 (add_candidates): Add explicit_targs and template_only parameters.
2772 (build_new_op): Adjust accordingly.
2773 * cp-tree.h (build_operator_new_call): New function.
2774 (build_function_call_real): Remove.
2775 (build_function_call_maybe): Likewise.
2776 * init.c (build_new_1): Use build_operator_new_call.
2777 * typeck.c (build_function_call_real): Rename to ...
2778 (build_function_call): ... this.
2780 2003-03-10 Devang Patel <dpatel@apple.com>
2783 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2785 2003-03-10 Jason Merrill <jason@redhat.com>
2788 * decl.c (push_using_directive): Push before recursing.
2790 PR c++/9868, c++/9524
2791 * call.c (resolve_scoped_fn_name): Handle the case of a function
2794 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
2795 argument in the pointer-to-member case.
2797 2003-03-09 Mark Mitchell <mark@codesourcery.com>
2800 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
2801 pointers to member functions.
2804 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
2805 in pointer-to-member-function types.
2807 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2809 * expr.c (cplus_expand_constant): Use C90 prototype style.
2810 (cxx_expand_expr): Likewise.
2812 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2815 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
2818 2003-03-08 Geoffrey Keating <geoffk@apple.com>
2820 * lang-specs.h (c++-header): Change .pch to .gch.
2822 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
2824 * cp-tree.h (cxx_init): Update prototype.
2825 * lex.c (cxx_init): Similarly.
2827 2003-03-08 Mark Mitchell <mark@codesourcery.com>
2830 * cp-tree.h (begin_mem_initializers): Remove.
2831 * parser.c (cp_parser_mem_initializer_list): Inline it here.
2832 Do not call finish_mem_initializers if not in a constructor.
2833 (cp_parser_class_head): Fix typo in error message.
2834 * semantics.c (begin_mem_initializers): Remove.
2835 * testsuite/g++.dg/parser/constructor1.C: New test.
2838 * call.c (add_function_candidate): Skip builtin fuctions that have
2839 not yet been declared.
2842 * init.c (build_new_1): Correct logic for determining whether or
2843 not to use an array cookie.
2846 * parser.c (cp_parser_postfix_expression): Call
2847 finish_non_static_data_member, even when processing_template_decl.
2850 * cp-tree.h (is_ancestor): New function.
2851 (handle_class_head): Change prototype.
2852 * decl2.c (is_namespace_ancestor): Rename to ...
2853 (namespace_anecestor): ... this.
2854 (set_decl_namespace): Adjust accordingly.
2855 (handle_class_head): Remove unncessary parameters.
2856 * parser.c (cp_parser_class_head): Check that
2857 nested-name-specifiers are used appropriately.
2859 2003-03-07 Mark Mitchell <mark@codesourcery.com>
2861 * call.c (reference_binding): Remove REF_IS_VAR parameter.
2862 (implicit_conversion): Adjust call to reference_binding.
2863 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
2864 (initialize_reference): Adjust handling for references bound to
2866 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
2868 (real_non_cast_lvalue_p): New method.
2869 * cvt.c (build_up_reference): Adjust use of
2870 make_temporary_var_for_ref_to_temp.
2871 * tree.c (real_non_cast_lvalue_p): New method.
2873 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2875 * except.c (init_exception_processing): Use C90 prototype style.
2876 (cp_protect_cleanup_actions): Likewise.
2877 (prepare_eh_type): Likewise.
2878 (build_eh_type_type): Likewise.
2879 (build_exc_ptr): Likewise.
2880 (do_begin_catch): Likewise.
2881 (dtor_nothrow): Likewise.
2882 (do_end_catch): Likewise.
2883 (push_eh_cleanup): Likewise.
2884 (decl_is_java_type): Likewise.
2885 (choose_personality_routine): Likewise.
2886 (initialize_handler_parm): Likewise.
2887 (expand_start_catch_block): Likewise.
2888 (expand_end_catch_block): Likewise.
2889 (begin_eh_spec_block): Likewise.
2890 (finish_eh_spec_block): Likewise.
2891 (do_allocate_exception): Likewise.
2892 (do_free_exception): Likewise.
2893 (wrap_cleanups_r): Likewise.
2894 (stabilize_throw_expr): Likewise.
2895 (build_throw): Likewise.
2896 (complete_ptr_ref_or_void_ptr_p): Likewise.
2897 (is_admissible_throw_operand): Likewise.
2898 (nothrow_libfn_p): Likewise.
2899 (can_convert_eh): Likewise.
2900 (check_handlers_1): Likewise.
2901 (check_handlers): Likewise.
2903 2003-03-06 Mark Mitchell <mark@codesourcery.com>
2905 * call.c (merge_conversion_sequences): New function.
2906 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
2907 (convert_class_to_reference): Correct handling of second
2908 standard conversion sequence in a user-defined conversion
2910 (build_user_type_conversion_1): Use merge_conversion_sequences.
2911 * cp-tree.def: Add comments for CONV nodes.
2912 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
2914 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2916 * error.c (init_error): Use C90 prototype style.
2917 (dump_scope): Likewise.
2918 (dump_qualifiers): Likewise.
2919 (dump_template_argument): Likewise.
2920 (dump_template_argument_list): Likewise.
2921 (dump_template_parameter): Likewise.
2922 (dump_template_bindings): Likewise.
2923 (dump_type): Likewise.
2924 (dump_typename): Likewise.
2925 (class_key_or_enum): Likewise.
2926 (dump_aggr_type): Likewise.
2927 (dump_type_prefix): Likewise.
2928 (dump_type_suffix): Likewise.
2929 (dump_global_iord): Likewise.
2930 (dump_simple_decl): Likewise.
2931 (dump_decl): Likewise.
2932 (dump_template_decl): Likewise.
2933 (dump_function_decl): Likewise.
2934 (dump_parameters): Likewise.
2935 (dump_exception_spec): Likewise.
2936 (dump_function_name): Likewise.
2937 (dump_template_parms): Likewise.
2938 (dump_char): Likewise.
2939 (dump_expr_list): Likewise.
2940 (dump_expr): Likewise.
2941 (dump_binary_op): Likewise.
2942 (dump_unary_op): Likewise.
2943 (type_as_string): Likewise.
2944 (expr_as_string): Likewise.
2945 (decl_as_string): Likewise.
2946 (context_as_string): Likewise.
2947 (lang_decl_name): Likewise.
2948 (cp_file_of): Likewise.
2949 (cp_line_of): Likewise.
2950 (decl_to_string): Likewise.
2951 (expr_to_string): Likewise.
2952 (fndecl_to_string): Likewise.
2953 (code_to_string): Likewise.
2954 (language_to_string): Likewise.
2955 (parm_to_string): Likewise.
2956 (op_to_string): Likewise.
2957 (type_to_string): Likewise.
2958 (assop_to_string): Likewise.
2959 (args_to_string): Likewise.
2960 (cv_to_string): Likewise.
2961 (cxx_print_error_function): Likewise.
2962 (cp_diagnostic_starter): Likewise.
2963 (cp_diagnostic_finalizer): Likewise.
2964 (cp_print_error_function): Likewise.
2965 (function_category): Likewise.
2966 (print_instantiation_full_context): Likewise.
2967 (print_instantiation_partial_context): Likewise.
2968 (maybe_print_instantiation_context): Likewise.
2969 (print_instantiation_context): Likewise.
2970 (cp_printer): Likewise.
2971 (print_integer): Likewise.
2972 (print_non_consecutive_character): Likewise.
2973 (locate_error): Likewise.
2975 2003-03-06 Mark Mitchell <mark@codesourcery.com>
2978 * call.c (reference_binding): Add ref_is_var parameter.
2979 (implicit_conversion): Adjust call to reference_binding.
2980 (initialize_reference): Likewise.
2983 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
2987 * class.c (get_basefndecls): Use lookup_fnfields_1.
2989 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2992 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
2994 (cp_parser_single_declaration): Likewise.
2996 2003-03-05 Jason Merrill <jason@redhat.com>
2999 * call.c (build_conditional_expr): Use convert rather than an
3002 2003-03-02 Matt Austern <austern@apple.com>
3004 * decl.c (cp_binding_level): Add static_decls varray member.
3005 (add_decl_to_level): Add static/inline namespace scope
3006 declarations to static_decls array.
3007 (wrapup_global_for_namespace): Pass static_decls only, instead of
3008 all decls, to wrapup_global_declarations/check_global_declarations.
3009 (push_namespace): Initialize static_decls for ordinary namespaces.
3010 (cxx_init_decl_processing): Initialize static_decls for global
3013 2003-03-05 Mark Mitchell <mark@codesourcery.com>
3015 * class.c (end_of_class): Correct thinko.
3017 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
3019 * config-lang.in: Replace ${libstdcxx_version} by its value.
3021 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3023 * cp-tree.h (cxx_saved_binding): Declare.
3024 (struct saved_scope): Adjust type of field 'old_binding'.
3025 * decl.c (cxx_saved_binding_make): New macro.
3026 (struct cxx_saved_binding): Define.
3027 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
3029 (maybe_push_to_top_level): Adjust local variable type.
3030 (pop_from_top_level): Likewise.
3032 2003-03-04 Tom Tromey <tromey@redhat.com>
3034 * Make-lang.in (c++.tags): New target.
3036 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
3038 * Make-lang.in: Update.
3040 2003-03-03 Jason Merrill <jason@redhat.com>
3042 * decl.c (finish_enum): Do set the type in a template. Simplify.
3043 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3045 2003-03-03 Mark Mitchell <mark@codesourcery.com>
3048 * call.c (convert_class_to_reference): Correct conversion
3050 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3051 (implicit_conversion): Adjust call to reference_binding.
3052 (add_candidate): Change type of candidates parameter.
3053 (add_function_candidate): Likewise.
3054 (add_conv_candidate): Likewise.
3055 (build_builtin_candidate): Likewise.
3056 (add_builtin_candidate): Likewise.
3057 (add_builtin_candidates): Likewise.
3058 (add_template_candidate_real): Likewise.
3059 (add_template_candidate): Likewise.
3060 (add_template_conv_candidate): Likewise.
3061 (build_user_type_conversion_1): Adjust accordingly.
3062 (build_object_call): Likewise.
3063 (build_conditional_expr): Likewise.
3064 (add_candidates): Likewise.
3065 (build_new_op): Likewise.
3066 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
3067 (build_new_method_call): Adjust calls to add_function_candidate.
3068 (make_temporary_var_for_ref_to_temp): New function.
3069 (initialize_reference): Add decl parameter.
3070 * class.c (build_rtti_vtbl_entries): Use build_address and
3072 * cp-tree.h (initialize_reference): Change prototype.
3073 (make_temporary_var_for_ref_to_temp): New function.
3074 (build_type_conversion): Change prototype.
3075 (build_address): New function.
3076 (build_nop): Likewise.
3077 * cvt.c (cp_convert_to_pointer): Adjust call to
3078 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
3080 (convert_to_pointer_force): Use build_nop.
3081 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3082 (convert_to_reference): Adjust call to build_type_conversion.
3083 (ocp_convert): Likewise.
3084 (build_type_conversion): Remove for_sure parameter.
3085 * decl.c (grok_reference_init): Use initialize_reference.
3086 * typeck.c (build_address): New function.
3087 (build_nop): Likewise.
3088 (build_unary_op): Use them.
3089 (build_ptrmemfunc): Tidy slightly.
3090 (convert_for_initialization): Adjust call to
3091 initialize_reference.
3092 * typeck2.c (store_init_value): Remove #if 0'd code.
3094 2003-03-03 Jason Merrill <jason@redhat.com>
3096 * decl.c (start_function): Clear DECL_NUM_STMTS.
3098 * class.c (get_vtable_decl): Use vtbl_type_node.
3099 (build_primary_vtable): Check for it.
3101 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
3103 * decl.c (check_initializer): Check for vector_opaque_p.
3105 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
3107 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3108 invoke an external cpp during compilation.
3110 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3112 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3114 (start_decl): Likewise.
3115 (start_function): Likewise.
3117 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
3119 * Make-lang.in (CXX_C_OBJS): Update.
3121 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3124 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3127 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
3129 * parser.c (cp_parser_init_declarator): Revert opaque
3130 vector_opaque_p change.
3131 Do not include target.h.
3133 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3136 * cp-tree.h (build_zero_init): Add parameter.
3137 * decl.c (cp_finish_decl): Adjust call.
3138 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
3140 (build_default_init): Add nelts parameter. Adjust calls to
3142 (build_new_1): Adjust call to build_default_init.
3143 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3145 2003-02-26 Devang Patel <dpatel@apple.com>
3147 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3148 required. Postpone enum setting for template decls.
3149 (build_enumerator): Delay copying value node until finish_enum
3150 (). Remove #if 0'ed code.
3151 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3152 (tsubst_copy): Add check for enum type.
3154 2003-02-25 Mark Mitchell <mark@codesourcery.com>
3157 * decl2.c (prune_vars_needing_no_initialization): Do not throw
3158 away initializations for DECL_EXTERNAL VAR_DECLs.
3159 (finish_file): Adjust accordingly.
3160 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3162 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3164 * decl.c (add_binding): Time TV_NAME_LOOKUP.
3165 (push_class_binding): Likewise.
3166 (set_namespace_binding): Likewise.
3168 2003-02-24 Mark Mitchell <mark@codesourcery.com>
3171 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
3172 specializations back to the main template.
3173 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
3174 * pt.c (resolve_typename_type): Likewise.
3176 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
3179 * pt.c (tsubst_copy_and_build): For a templated function inside a
3180 scope, process template arguments.
3182 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3185 * typeck2.c (abstract_virtuals_error): Don't check when
3186 TYPE is still template parameter dependent.
3188 2003-02-23 Mark Mitchell <mark@codesourcery.com>
3191 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
3192 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
3193 * pt.c (instantiate_class_template): Don't try to instantiate
3195 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
3197 2003-02-21 Mark Mitchell <mark@codesourcery.com>
3200 * decl.c (grokdeclarator): Do not allow parameters with variably
3203 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
3205 * search.c (grow_bfs_bases): Remove. Fold into ...
3206 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
3209 2003-02-20 Mark Mitchell <mark@codesourcery.com>
3212 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
3213 when the G++ 3.2 ABI prevents correct compilation.
3215 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3217 Change base class access representation. Share virtual base
3219 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
3221 * cp/class.c (build_base_path): Likewise.
3222 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
3223 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
3224 (make_new_vtable): Adjust.
3225 (force_canonical_binfo_r): Delete.
3226 (force_canonical_binfo): Delete.
3227 (mark_primary_virtual_base): Delete.
3228 (dfs_unshared_virtual_bases): Delete.
3229 (mark_primary_bases): Adjust.
3230 (maybe_warn_about_overly_private_class): Adjust.
3231 (dfs_base_derived_from): Delete.
3232 (base_derived_from): Follow the inheritance chain.
3233 (struct find_final_overrider_data): Add vpath member.
3234 (dfs_find_final_overrider): Adjust.
3235 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
3236 (find_final_overrider): Adjust.
3237 (update_vtable_entry_for_fn): Adjust.
3238 (modify_all_vtables): Adjust.
3239 (walk_subobject_offsets): Adjust.
3240 (layout_nonempty_base_or_field): Adjust.
3241 (layout_empty_base): Remove last parameter. Adjust.
3242 (build_base_field): Adjust.
3243 (build_base_fields): Adjust.
3244 (propagate_binfo_offsets): Remove last parameter. Adjust.
3245 (dfs_set_offset_for_unshared_vbases): Delete.
3246 (layout_virtual_bases): Adjust.
3247 (finish_struct_1): Adjust.
3248 (init_class_processing): Don't init access nodes.
3249 (dfs_get_primary_binfo): Delete.
3250 (get_primary_binfo): Adjust.
3251 (dump_class_hierarchy_r): Remove most derived arg, add IGO
3253 (dump_class_hierarchy): Adjust.
3254 (finish_vtbls): Adjust.
3255 (get_original_base): Delete.
3256 (build_vtt_inits): Adjust.
3257 (dfs_build_secondary_vptr_vtt_inits): Adjust.
3258 (dfs_ctor_vtable_bases_queue_p): Adjust.
3259 (build_ctor_vtbl_group): Adjust.
3260 (dfs_accumulate_vtbl_inits): Adjust.
3261 (build_vtbl_initializer): Adjust.
3262 (build_vbase_offset_vtbl_entries): Adjust.
3263 (add_vcall_offset_vtbl_entries_1): Adjust.
3264 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
3265 (access_*_node): Remove.
3266 (CANONICAL_BINFO): Delete.
3267 (BINFO_UNSHARED_MARKED): Remove.
3268 (BINFO_MARKED): Set LANG_FLAG_0 directly.
3269 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
3270 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
3271 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
3273 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
3274 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3275 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
3277 (BINFO_DEPENDENT_BASE_P): New.
3278 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
3280 (markedp, unmarkedp): Adjust.
3281 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
3282 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
3283 find_vbase_instance, binfo_for_vbase): Delete.
3284 (copied_binfo, original_binfo): Declare.
3285 (finish_base_specifier): Add virtual_p arg.
3286 (unshare_base_binfos): Delete.
3287 (copy_base_binfos): Declare.
3288 (reverse_path): Delete.
3289 * cp/decl.c (xref_basetypes): Access and virtuality passed
3290 differently. Don't copy direct base binfos here. Call
3292 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
3293 (initialize_vtbl_ptrs): Adjust.
3294 (expand_member_init): Adjust.
3295 * cp/parser.c (cp_parser_base_specifier): Adjust.
3296 * cp/pt.c (instantiate_class_template): Adjust.
3297 (get_template_base_recursive): Adjust.
3298 * cp/rtti.c (get_pseudo_ti_init): Adjust.
3299 (get_pseudo_ti_desc): Adjust.
3300 * cp/tree.c (unshare_base_binfos): Rename to ...
3301 (copy_base_binfos): ... here, reimplement.
3302 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
3303 (reverse_path): Remove.
3304 * cp/typeck.c (get_delta_difference): Adjust error messages.
3305 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
3306 * cp/search.c (lookup_base_r): Adjust.
3307 (dynamic_cast_base_recurse): Adjust.
3308 (canonical_binfo): Remove.
3309 (dfs_canonical_queue): Remove.
3310 (dfs_assert_unmarked_p): Remove.
3311 (assert_canonical_unmarked): Remove.
3312 (shared_marked_p, shared_unmarked_p): Remove.
3313 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
3314 (dfs_access_in_type): Adjust.
3315 (access_in_type): Adjust.
3316 (dfs_accessible_queue_p): Adjust.
3317 (dfs_accessible_p): Adjust.
3318 (is_subobject_of_p_1, is_subobject_of_p): Remove.
3319 (struct lookup_field_info): Remove from_dep_base_p field.
3320 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
3321 (lookup_field_r): Remove dependent base code.
3322 (lookup_member): Likewise.
3323 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
3324 (dfs_unmarked_real_bases_queue_p): Remove.
3325 (dfs_marked_real_bases_queue_p): Remove.
3326 (dfs_skip_vbases): Remove.
3327 (dfs_get_pure_virtuals): Adjust.
3328 (markedp, unmarkedp): Adjust.
3329 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
3330 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
3331 (dfs_unmark): Adjust.
3332 (dfs_get_vbase_types):Remove.
3333 (dfs_build_inheritance_graph_order): Remove.
3334 (get_vbase_types): Remove
3335 (dfs_find_vbase_instance): Remove.
3336 (find_vbase_instance): Remove.
3337 (dfs_debug_unmarkedp): Adjust.
3338 (dependent_base_p): Remove.
3339 (dfs_push_type_decls): Adjust.
3340 (dfs_push_decls): Adjust.
3341 (dfs_no_overlap_yet): Adjust.
3342 (copied_binfo): New function.
3343 (original_binfo): New function.
3344 (binfo_for_vbase): Remove.
3346 2003-02-18 Zack Weinberg <zack@codesourcery.com>
3348 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
3349 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
3352 2003-02-18 Mark Mitchell <mark@codesourcery.com>
3355 * class.c (layout_class_type): In the 3.2 ABI, take into account
3356 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
3358 2003-02-18 Matt Austern <austern@apple.com>
3360 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
3362 * cp/decl.c (wrapup_globals_for_namespace): Remove special
3363 handling of global namespace.
3365 2003-02-18 Geoffrey Keating <geoffk@apple.com>
3367 * cp-tree.h (rid_to_yy): Delete.
3368 (C_RID_YYCODE): Delete.
3369 (finish_file): Delete redundant declaration.
3371 2003-02-18 Jason Merrill <jason@redhat.com>
3374 * decl.c (reshape_init): Don't mess with initializer labels.
3377 * parser.c (cp_parser_postfix_expression): Set idk properly for
3378 object->scope::member.
3380 2003-02-18 Ben Elliston <bje@redhat.com>
3383 * decl.c (duplicate_decls): Fix typo in comment.
3385 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
3388 * class.c (build_base_field): Mark fields for base classes with
3391 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3394 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3395 CONSTRUCTOR_ELTS only once.
3397 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3400 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3401 (dump_type_suffix): Likewise.
3403 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
3405 * search.c: ANSIfy function declarations and definitions.
3406 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3407 * call.c (build_method_call, resolve_scoped_fn_name,
3408 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3410 * class.c (handle_using_decl): Likewise.
3411 * decl.c (make_typename_type, make_unmound_class_template,
3412 start_decl, compute_array_index_type): Likewise.
3413 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3414 * init.c (expand_member_init, build_member_call): Likewise.
3415 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3416 resolve_typename_type): Likewise.
3417 * typeck.c (lookup_destructor, finish_class_member_access_exprm
3418 build_prememfunc_access_expr): Likewise.
3420 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3422 * decl2.c: Include "timevar.h".
3423 (namespace_ancestor): Time name lookup.
3424 (add_using_namespace): Likewise.
3425 (lookup_using_namespace): Likewise.
3426 (qualified_lookup_using_namespace): Likewise.
3427 (decl_namespace): Likewise.
3428 (lookup_arg_dependent): Likewise.
3429 * lex.c (do_identifier): Likewise.
3430 (do_scoped_id): Likewise.
3431 * pt.c (lookup_template_class): Likewise.
3433 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
3435 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3437 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3439 * decl.c: Include "timevar.h".
3440 (poplevel): Time name lookup.
3441 (find_binding): Likewise.
3442 (push_namespace): Likewise.
3443 (pop_nested_namespace): Likewise.
3444 (store_bindings): Likewise.
3445 (maybe_push_to_top_level): Likewise.
3446 (pop_from_top_level): Likewise.
3447 (push_local_name): Likewise.
3448 (pushtag): Likewise.
3449 (pushdecl): Likewise.
3450 (pushdecl_with_scope): Likewise.
3451 (pushdecl_namespace_level): Likewise.
3452 (pushdecl_top_level): Likewise.
3453 (pushdecl_class_level): Likewise.
3454 (push_class_level_binding): Likewise.
3455 (push_using_decl): Likewise.
3456 (push_using_directive): Likewise.
3457 (push_overloaded_decl): Likewise.
3458 (lookup_label): Likewise.
3459 (define_label): Likewise.
3460 (lookup_tag): Likewise.
3461 (lookup_tag_reverse): Likewise.
3462 (lookup_namespace_name): Likewise.
3463 (select_decl): Likewise.
3464 (unqualified_namespace_lookup): Likewise.
3465 (lookup_name_real): Likewise.
3466 (lookup_name_current_level): Likewise.
3467 (lookup_type_current_level): Likewise.
3468 (maybe_inject_for_scope_var): Likewise.
3469 (xref_tag): Likewise.
3471 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3473 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
3475 * decl.c (build_enumerator): Remove unneeded test.
3477 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
3479 * cp-tree.h (struct lang_type_header): Make all fields unsigned
3482 2003-02-03 Mark Mitchell <mark@codesourcery.com>
3485 * call.c (z_candidate): Add args.
3486 (convert_class_to_reference): Set it.
3487 (implicit_conversion): Tidy.
3488 (add_candidate): Add args parameter.
3489 (add_function_candidate): Adjust call to add_candidate.
3490 (add_conv_candidate): Likewise.
3491 (build_builtin_candidate): Likewise.
3492 (build_user_type_conversion_1): Eliminate wasteful tree_cons
3494 (build_new_function_call): Likewise.
3495 (build_object_call): Likewise.
3496 (add_candidates): New function.
3497 (build_new_op): Use it.
3498 (covert_like_real): Adjust call to build_over_call.
3499 (build_over_call): Remove args parameter.
3500 * operators.def: Add <?= and >?=.
3502 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
3504 * typeck.c (build_indirect_ref): Don't check flag_volatile.
3506 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3509 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3511 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3513 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3514 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3515 (BINFO_LANG_ELTS): New #define.
3516 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3518 2003-01-30 Geoffrey Keating <geoffk@apple.com>
3520 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3522 2003-01-30 Mark Mitchell <mark@codesourcery.com>
3524 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3526 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3527 rather than TYPE_LANG_FLAG_0.
3528 (TYPE_BUILT_IN): Remove.
3529 (TYPE_DEPENDENT_P): New macro.
3530 (TYPE_DEPENDENT_P_VALID): Likewise.
3531 (lang_type_class): Add fields_readonly.
3532 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3533 * pt.c (dependent_type_p_r): New function, split out from ...
3534 (dependent_type_p): ... here. Memoize results.
3535 * search.c (dependent_base_p): Use dependent_type_p, not
3536 uses_template_parms.
3537 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3540 2003-01-29 Mark Mitchell <mark@codesourcery.com>
3542 * call.c (build_field_call): Use build_new_op, not build_opfncall.
3543 (prep_operand): New function.
3544 (build_new_op): Use it. Remove dead code.
3545 * class.c (pushclass): Change "modify" parameter type from int to
3547 (currently_open_class): Use same_type_p, not pointer equality.
3548 (push_nested_class): Adjust calls to pushclass, remove modify
3550 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3551 (pushclass): Change prototype.
3552 (push_nested_class): Likewise.
3553 (grokoptypename): Remove.
3554 (build_opfncall): Remove.
3555 (value_dependent_expression_p): Declare.
3556 (resolve_typename_type): Likewise.
3557 (resolve_typename_type_in_current_instantiation): Likewise.
3558 (enter_scope_of): Remove.
3560 (tsubst_expr): Likewise.
3561 (tsubst_copy): Likewise.
3562 (tsubst_copy_and_build): Likewise.
3563 * decl.c (warn_about_implicit_typename_lookup): Remove.
3564 (finish_case_label): Return error_mark_node for erroneous labels.
3565 (start_decl): Adjust calls to push_nested_class.
3566 (grokfndecl): Call push_scope/pop_scope around call to
3568 (grokdeclarator): Do not call tsubst.
3569 (start_function): Adjust calls to push_nested_class.
3570 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3571 (check_classfn): Use push_scope/pop_scope around type comparisions.
3572 (grokoptypename): Remove.
3573 (push_sscope): Adjust call to push_nested_class.
3574 * error.c (dump_type): Show cv-qualification of typename types.
3575 * init.c (build_member_call): Use build_new_op, not
3577 * method.c (build_opfncall): Remove.
3578 * parser.c (cp_parser): Add allow_non_constant_expression_p and
3579 non_constant_expression_p.
3580 (cp_parser_constant_expression): Adjust prototype.
3581 (cp_parser_resolve_typename_type): Remove.
3582 (cp_parser_non_constant_expression): New function.
3583 (cp_parser_non_constant_id_expression): Likewise.
3584 (cp_parser_new): Set allow_non_constant_expression_p and
3585 non_constant_expression_p.
3586 (cp_parser_primary_expression): Reject `this' and `va_arg' in
3587 constant-expressions. Note that dependent names aren't really
3589 (cp_parser_postfix_expression): Reject conversions to non-integral
3590 types in constant-expressions. Neither are increments or
3592 (cp_parser_unary_expression): Reject increments and decrements in
3593 constant-expressions.
3594 (cp_parser_direct_new_declarator): Adjust call to
3595 cp_parser_constant_expression.
3596 (cp_parser_cast_expression): Reject conversions to non-integral
3597 types in constant-expressions.
3598 (cp_parser_assignment_expression): Rejects assignments in
3599 constant-expressions.
3600 (cp_parser_expression): Reject commas in constant-expressions.
3601 (cp_parser_labeled_statement): Adjust call to
3602 cp_parser_constant_expression.
3603 (cp_parser_direct_declarator): Simplify array bounds, even in
3604 templates, when they are non-dependent. Use
3605 resolve_typename_type, not cp_parser_resolve_typename_type.
3606 (cp_parser_class_head): Use resolve_typename_type, not
3607 cp_parser_resolve_typename_type.
3608 (cp_parser_member_declaration): Adjust call to
3609 cp_parser_constant_expression.
3610 (cp_parser_constant_initializer): Likewise.
3611 (cp_parser_constructor_declarator): Use resolve_typename_type, not
3612 cp_parser_resolve_typename_type.
3613 (cp_parser_late_parsing_default_args): Adjust call to
3615 * pt.c (tsubst): Give it internal linkage.
3616 (tsubst_expr): Likewise.
3617 (tsubst_copy): Likewise.
3618 (tsubst_copy_and_build): Likewise.
3619 (push_access_scope_real): Likewise.
3620 (tsubst_friend_class): Likewise.
3621 (instantiate_class_template): Adjust call to pushclass.
3622 (value_dependent_expression_p): Give it external linkage.
3624 (resolve_typename_type): New function.
3625 * semantics.c (finish_call_expr): Use build_new_op, not
3627 (begin_constructor_declarator): Remove.
3628 (begin_class_definition): Adjust call to pushclass.
3629 (enter_scope_of): Remove.
3630 * typeck.c (comptypes): Resolve typename types as appropriate.
3631 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
3632 (build_x_compound_expr): Likewise.
3633 (build_modify_expr): Likewise.
3634 (build_x_modify_expr): Likewise.
3635 * typeck2.c (build_x_arrow): Likewise.
3637 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
3639 * pt.c (last_pending_template) Declare GTY().
3641 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3644 * parser.c (cp_parser_elaborated_type_specifier): Convert
3645 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
3646 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
3648 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
3651 * pt.c (unify): Don't unify '*T' with 'U C::*'.
3654 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3655 inside a declarator.
3657 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
3659 * class.c (update_vtable_entry_for_fn): Add index parameter.
3660 Generate vcall thunk for covariant overriding from a virtual
3662 (dfs_modify_vtables): Adjust.
3664 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
3667 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3669 (cp_parser_base_specifier): Look for and consume a
3670 TEMPLATE keyword. Replace switch with array index.
3673 * semantics.c (finish_non_static_data_member): Remember the
3674 field's type even in a template.
3677 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3681 * parser.c (cp_parser_cast_expression): Be more tentative.
3683 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3685 * cp-tree.h (flagged_type_tree_s): Remove.
3686 (check_for_new_type): Likewise.
3687 * typeck2.c (check_for_new_type): Likewise.
3689 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
3691 * dump.c: ANSIfy function declarations and definitions.
3693 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
3695 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3698 * init.c (build_new): Set the type of the new-expression, even
3699 when processing_templte_decl.
3702 * parser.c (cp_parser_primary_expression): Improve error message
3703 for templates used in an expression context.
3706 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3707 parse when encountering "typedef".
3709 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3711 * class.c, parser.c: ANSIfy function definitions and declarations.
3713 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3716 * error.c (dump_decl): For an OVERLOAD, just print the name of the
3717 function; it doesn't make sense to try to print its type.
3718 * semantics.c (finish_typeof): Issue errors about invalid uses.
3721 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3723 (cp_parser_expression_statement): Use it.
3724 (cp_parser_explicit_instantiation): Likewise.
3725 * pt.c (do_decl_instantiation): Improve error handling logic.
3727 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3730 * parser.c (cp_parser_using_declaration): Issue error messages
3731 about name resolution failures here.
3734 * class.c (currently_open_derived_class): Use dependent_type_p.
3735 * cp-tree.h (dependent_type_p): New function.
3736 (dependent_template_arg_p): Likewise.
3737 (dependent_template_p): Likewise.
3738 (type_dependent_expression_p): Likewise.
3739 * parser.c (cp_parser_dependent_type_p): Remove.
3740 (cp_parser_value_dependent_type_p): Likewise.
3741 (cp_parser_type_dependent_expression_p): Likewise.
3742 (cp_parser_dependent_template_arg_p): Likewise.
3743 (cp_parser_dependent_template_id_p): Likewise.
3744 (cp_parser_dependent_template_p): Likewise.
3745 (cp_parser_diagnose_invalid_type_name): Replace
3746 cp_parser_dependent_type_p with dependent_type_p, etc.
3747 (cp_parser_primary_expresion): Likewise.
3748 (cp_parser_nested_name_specifier_opt): Likewise.
3749 (cp_parser_postfix_expression): Likewise.
3750 (cp_parser_unary_expression): Likewise.
3751 (cp_parser_template_name): Likewise.
3752 (cp_parser_class_name): Likewise.
3753 (cp_parser_lookup_name): Likewise.
3754 * pt.c (dependent_type_p): New function.
3755 (value_dependent_expression_p): Likewise.
3756 (type_dependent_expression_p): Likewise.
3757 (dependent_template_arg_p): Likewise.
3758 (dependent_template_id_p): Likewise.
3759 (dependent_template_p): Likewise.
3763 * parser.c (cp_parser_simple_declaration): Return quickly when
3764 encountering errors.
3766 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3768 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3770 2003-01-17 Jason Merrill <jason@redhat.com>
3772 PR c++/9167, c++/9358
3773 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3775 2003-01-17 Jason Merrill <jason@redhat.com>
3778 * call.c (build_conditional_expr): Always do lvalue-rvalue
3781 2003-01-17 Mark Mitchell <mark@codesourcery.com>
3784 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3785 * cp-tree.h (BASELINK_BINFO): Adjust.
3786 (BASELINK_FUNCTIONS): Likewise.
3787 (BASELINK_ACCESS_BINFO): Likewise.
3788 (tree_baselink): New structure.
3789 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3790 (lang_tree_node): Add baselink.
3791 * decl.c (cp_tree_node_structure): Add BASELINK case.
3792 * search.c (build_baselink): Adjust.
3793 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
3794 test from TREE_LIST case.
3797 * parser.c (cp_parser_constructor_declarator_p): Do not assume
3798 that a constructor cannot be declared outside of its own class.
3800 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
3801 be resolved, neither can the qualified name.
3803 * rtti.c (get_pseudo_ti_desc): Fix thinko.
3805 2003-01-16 Jason Merrill <jason@redhat.com>
3808 * init.c (build_vec_init): Re-add maxindex parm.
3809 (perform_member_init, build_aggr_init): Pass it.
3810 (build_new_1): Pass it. Use an incomplete array type for full_type.
3811 * typeck.c (build_modify_expr): Pass it.
3812 * cp-tree.h: Adjust.
3814 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
3816 * cp-tree.h (tsubst_copy_and_build): New declaration.
3817 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
3818 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
3819 (tsubst_copy_and_build): New function.
3821 2003-01-16 Mark Mitchell <mark@codesourcery.com>
3823 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
3824 (PARTIAL_INSTANTIATION_P): Remove.
3825 (IMPLICIT_TYPENAME_P): Likewise.
3826 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
3827 (build_typename_type): Remove declaration.
3828 (parmlist_is_exprlist): Likewise.
3829 * decl.c (build_typename_type): Make it static, remove third
3831 (push_class_binding): Don't do implicit typename stuff.
3832 (make_typename_type): Likewise.
3833 (lookup_name_real): Likewise.
3834 (grokdeclarator): Don't try to convert declarations into
3835 initializations. Don't do implicit typename stuff.
3836 (parmlist_is_exprlist): Remove.
3837 (xref_basetypes): Simplify.
3838 * decl2.c (grokfield): Don't try to convert declarations into
3840 (build_anon_union_vars): Do this while processing templates, too.
3841 (finish_anon_union): Likewise.
3842 * error.c (dump_type): Remove implicit typename handling.
3843 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
3844 (cp_parser_primary_expression): Correct handling of names not
3845 found by unqualified name lookup in templates.
3846 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
3847 of types when possible.
3848 (cp_parser_simple_declaration): Complain intelligently about some
3849 invalid declarations.
3850 (cp_parser_member_declaration): Likewise.
3851 (cp_parser_constructor_declarator_p): Don't check when we're in a
3853 * pt.c (instantiate_class_template): Remove
3854 PARTIAL_INSTANTIATION_P gunk.
3855 * search.c (lookup_field_r): Don't build implicit typenames.
3856 (marked_pushdecls_p): Don't enter dependent base types.
3857 (unmarked_pushdecls_p): Likewise.
3858 * semantics.c (begin_class_definition): Remove implicit typename
3861 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
3864 * parser.c (cp_parser_direct_declarator): If accepting either
3865 abstract or named, the name must be an unqualified-id.
3867 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3869 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
3871 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3873 * decl2.c (check_classfn): Fix uninitialized warning.
3874 (build_anon_union_vars): Likewise.
3875 * pt.c (tsubst_copy): Likewise.
3877 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
3879 Further conform g++'s __vmi_class_type_info to the C++ ABI
3881 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
3883 (class_hint_flags): Likewise.
3885 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3887 * config-lang.in: Add semantics.c to gtfiles.
3888 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
3889 (saved_scope): Likewise.
3890 (type_lookups): Remove.
3891 (deferred_access): New structure.
3892 (type_access_control): Remove.
3893 (save_type_access_control): Likewise.
3894 (reset_type_access_control): Likewise.
3895 (decl_type_access_control): Likewise.
3896 (push_deferring_access_checks): Declare.
3897 (resume_deferring_access_checks): Likewise.
3898 (stop_deferring_access_checks): Likewise.
3899 (pop_deferring_access_checks): Likewise.
3900 (get_deferred_access_checks): Likewise.
3901 (pop_to_parent_deferring_access_checks): Likewise.
3902 (perform_deferred_access_checks): Likewise.
3903 (perform_or_defer_access_check): Likewise.
3904 * decl.c (make_typename_type): Use perform_or_defer_access_check.
3905 (make_unbound_class_template): Likewise.
3906 (grokdeclarator): Don't call decl_type_access_control.
3907 * parser.c (cp_parser_context): Remove deferred_access_checks
3908 and deferring_access_checks_p fields.
3909 (cp_parser_context_new): Adjust.
3910 (cp_parser): Remove access_checks_lists.
3911 (cp_parser_defer_access_check): Remove.
3912 (cp_parser_start_deferring_access_checks): Remove.
3913 (cp_parser_stop_deferring_access_checks): Remove.
3914 (cp_parser_perform_deferred_access_checks): Remove.
3915 (cp_parser_nested_name_specifier_opt): Use new deferred access
3917 (cp_parser_simple_declaration): Likewise.
3918 (cp_parser_template_id): Likewise.
3919 (cp_parser_function_definition): Likewise.
3920 (cp_parser_class_specifier): Likewise.
3921 (cp_parser_lookup_name): Likewise.
3922 (cp_parser_single_declaration): Likewise.
3923 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
3924 (cp_parser_parse_tentatively): Likewise.
3925 (cp_parser_parse_definitely): Likewise.
3926 (yyparse): Likewise.
3927 (cp_parser_init_declarator): Remove access_checks parameter.
3928 Use new deferred access functions.
3929 (cp_parser_function_definition_from_specifiers_and_declarator):
3931 (cp_parser_class_head): Remove deferring_access_checks_p and
3932 saved_access_checks parameters. Use new deferred access functions.
3933 (cp_parser_member_specification_opt): Don't call
3934 reset_type_access_control.
3935 * search.c (type_access_control): Remove.
3936 * semantics.c: Include "gt-cp-semantics.h".
3937 (deferred_type_access_control): Remove.
3938 (deferred_access_stack): New variable.
3939 (deferred_access_free_list): Likewise.
3940 (push_deferring_access_checks): New function.
3941 (resume_deferring_access_checks): Likewise.
3942 (stop_deferring_access_checks): Likewise.
3943 (pop_deferring_access_checks): Likewise.
3944 (get_deferred_access_checks): Likewise.
3945 (pop_to_parent_deferring_access_checks): Likewise.
3946 (perform_deferred_access_checks): New function, adapted from
3947 cp_parser_perform_deferred_access_checks.
3948 (perform_or_defer_access_check): New function, adapted from
3949 cp_parser_defer_access_check.
3950 (current_type_lookups): Remove.
3951 (deferred_type_access_control): Likewise.
3952 (decl_type_access_control): Likewise.
3953 (save_type_access_control): Likewise.
3954 (reset_type_access_control): Likewise.
3955 (begin_function_definition): Adjust.
3956 (begin_class_definiton): Likewise.
3958 2003-01-13 Jason Merrill <jason@redhat.com>
3961 * class.c (build_base_path): Take the address before calling save_expr.
3963 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
3964 all the ambiguous conversions are bad.
3966 * class.c (maybe_warn_about_overly_private_class): Don't stop
3967 searching when we find a nonprivate method.
3969 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
3971 2003-01-12 Mark Mitchell <mark@codesourcery.com>
3973 * cp-tree.h (get_arglist_len_in_bytes): Remove.
3976 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
3977 typeame types more robustly.
3979 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
3981 * parser.c: Fix comment typos.
3983 2003-01-10 Mark Mitchell <mark@codesourcery.com>
3986 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
3987 an object_type which is not a class type.
3989 2003-01-10 Geoffrey Keating <geoffk@apple.com>
3991 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
3992 (cp_parser_late_parsing_default_args): Likewise.
3994 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
3996 * cfns.gperf: ANSIfy function declarations.
3997 * cfns.h: Regenerate.
3998 * cp-tree.h: ANSIfy function declarations.
4000 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4002 * cp-tree.h (reparse_absdcl_as_expr): Remove.
4003 (reparse_absdcl_as_casts): Likewise.
4004 (reparse_decl_as_expr): Likewise.
4005 (finish_decl_parsing): Likewise.
4006 * decl2.c (reparse_absdcl_as_expr): Remove.
4007 (reparse_absdcl_as_casts): Likewise.
4008 (repase_decl_as_expr): Likewise.
4009 (finish_decl_parsing): Likewise.
4014 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4016 (cp_parser_nested_name_specifier_opt): Correct the
4017 check_dependency_p false.
4018 (cp_parser_postfix_expression): Fix formatting.
4019 (cp_parser_decl_specifier_seq): Avoid looking for constructor
4020 declarators when possible.
4021 (cp_parser_template_id): Avoid performing name-lookup when
4023 (cp_parser_class_head): Do not count specializations when counting
4024 levels of templates.
4025 (cp_parser_constructor_declarator_p): Return immediately if
4026 there's no chance that the tokens form a constructor declarator.
4027 * rtti.c (throw_bad_typeid): Add comment. Do not return an
4028 expression with reference type.
4029 (get_tinfo_decl_dynamic): Do not return an expression with
4031 (build_typeid): Add comment. Do not return an expression with
4033 * typeck.c (build_class_member_access_expr): Improve handling of
4034 conditionals and comma-expressions as objects.
4036 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4038 * cfns.gperf: ANSIfy function declarations.
4039 * cfns.h: Regenerate.
4040 * cp-tree.h: ANSIfy function declarations.
4041 * parser.c: ANSIfy function declarations & definitions.
4043 * decl.c (bad_specifiers): Fix parameter order error I introduced.
4045 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4047 Merge from pch-branch:
4049 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4051 Merge to tag pch-merge-20030102:
4053 * semantics.c (finish_translation_unit): Don't call finish_file.
4054 * parser.c: Don't include ggc.h.
4055 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4056 read first token here. Don't allow PCH files after the first
4058 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4059 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4060 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4061 (cp_parser_late_parsing_for_member): Don't duplicate call to
4062 cp_lexer_set_source_position_from_token.
4063 (cp_parser_late_parsing_default_args): Likewise.
4064 (yyparse): Call finish_file after clearing the_parser.
4066 2002-12-11 Geoffrey Keating <geoffk@apple.com>
4068 * Make-lang.in: Remove $(GGC_H) from all dependencies.
4069 (CXX_TREE_H): Add $(GGC_H).
4070 * class.c: Don't include ggc.h.
4071 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4072 (method_name_cmp): Likewise.
4073 (resort_data): New variable.
4074 (resort_field_decl_cmp): New.
4075 (resort_method_name_cmp): New.
4076 (resort_sorted_fields): New.
4077 (resort_type_method_vec): New.
4078 (finish_struct_methods): Delete cast.
4079 (finish_struct_1): Delete cast.
4080 * cp-tree.h: Include ggc.h.
4081 (struct lang_type_class): Add reorder attribute to field `methods'.
4082 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4083 (resort_sorted_fields): New prototype.
4084 (resort_type_method_vec): New prototype.
4085 * call.c: Don't include ggc.h.
4087 * decl2.c: Likewise.
4090 * method.c: Likewise.
4091 * optimize.c: Likewise.
4092 * parse.y: Likewise.
4095 * search.c: Likewise.
4096 * semantics.c: Likewise.
4100 * lang-specs.h: Remove comment.
4102 2002-12-03 Geoffrey Keating <geoffk@apple.com>
4104 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4105 (operator_name_info): Mark to be saved for PCH, specify size.
4106 (assignment_operator_name_info): Likewise.
4108 2002-11-19 Geoffrey Keating <geoffk@apple.com>
4110 * decl.c (anon_cnt): Mark to be saved for PCH.
4112 2002-10-25 Geoffrey Keating <geoffk@apple.com>
4114 * lex.c (init_reswords): Delete now-untrue comment.
4115 Allocate ridpointers using GGC.
4117 2002-10-04 Geoffrey Keating <geoffk@apple.com>
4119 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4121 * g++spec.c (lang_specific_driver): Don't include standard
4122 libraries in `added'.
4124 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
4126 * decl2.c (finish_file): Call c_common_write_pch.
4127 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4129 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
4131 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4132 files when using g++.
4133 * lang-specs.h: Handle compiling C++ header files.
4135 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4137 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4139 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4141 * pt.c (push_access_scope_real): Call push_to_top_level for
4142 function in namespace scope.
4143 (pop_access_scope): Call pop_from_top_level for function in
4146 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4148 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4150 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
4152 * Make-lang.in (c++.install-common, c++.install-man,
4153 c++.uninstall): Prepend $(DESTDIR) to destination paths in
4154 all (un)installation commands.
4155 (c++.install-common): Rewrite $(LN) commands to support
4156 DESTDIR with "ln" as well as with "ln -s".
4158 2003-01-08 Jason Merrill <jason@redhat.com>
4160 * parser.c (cp_parser_primary_expression): See through explicitly
4161 scoped ALIAS_DECLs, too.
4163 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
4165 * decl.c: Remove some #if 0 code.
4167 * decl.c: ANSIfy function declarations.
4169 2003-01-07 Mark Mitchell <mark@codesourcery.com>
4171 * parser.c (cp_parser_asm_definition): Correct handling of omitted
4174 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4177 * decl.c (make_typename_type): Check access only when tf_error.
4178 (make_unbound_class_template): Likewise.
4179 * pt.c (saved_access_scope): New variable.
4180 (push_access_scope_real): New function.
4181 (push_access_scope): Likewise.
4182 (pop_access_scope): Likewise.
4183 (tsubst_default_argument): Use them.
4184 (instantiate_template): Likewise.
4185 (regenerate_decl_from_template): Likewise.
4186 (instantiate_decl): Likewise.
4187 (get_mostly_instantiated_function_type): Likewise.
4189 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
4191 * tree.c: Delete bogus #if 0 code.
4193 2003-01-07 Andreas Schwab <schwab@suse.de>
4195 * class.c (layout_class_type): Don't use
4196 PCC_BITFIELD_TYPE_MATTERS if not defined.
4198 2003-01-06 Mark Mitchell <mark@codesourcery.com>
4201 * decl2.c (build_cleanup): Mark the object as used.
4203 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4204 (hash_local_specialization): New function.
4205 (register_local_specialization): Revert 2003-01-05 change.
4206 (instantiate_decl): Use hash_local_specialization when creating
4207 the local_specializations table.
4209 * decl2.c (mark_used): Do not synthesize thunks.
4211 * class.c (layout_class_type): Correct handling of unnamed
4212 bitfields wider than their types.
4215 * parser.c (cp_parser): Remove default_arg_types. Update
4216 documentation for unparsed_functions_queues.
4217 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
4219 (cp_parser_new): Don't set parser->default_arg_types.
4220 (cp_parser_function_definition): Adjust usage of
4221 unparsed_funtions_queues.
4222 (cp_parser_class_specifier): Don't mess with
4223 parser->default_arg_types. Handle default argument processing in
4224 a separate phase from function body processing.
4225 (cp_parser_template_declaration_after_export): Adjust usage of
4226 unparsed_functions_queues.
4227 (cp_parser_late_parsing_for_member): Do not handle default
4230 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
4233 * parser.c (cp_parser_declarator_kind): New enum.
4234 (cp_parser_declarator): Adjust.
4235 (cp_parser_direct_declarator): Adjust. Allow for either named or
4236 abstract declarator. Prefer abstract, if possible. Allow
4237 parenthesized function name.
4238 (cp_parser_condition): Adjust cp_parser_declarator call.
4239 (cp_parser_explicit_instantiation): Likewise.
4240 (cp_parser_init_declarator): Likewise.
4241 (cp_parser_type_id): Likewise.
4242 (cp_parser_function_definition): Likewise.
4243 (cp_parser_member_declaration): Likewise.
4244 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
4245 the tentative parsing.
4246 (cp_parser_exception_declaration): Likewise.
4248 2003-01-05 Mark Mitchell <mark@codesourcery.com>
4250 * parser.c (cp_parser_template_parameter): Adjust call to
4251 cp_parser_parameter_declaration.
4252 (cp_parser_parameter_declaration_list): Likewise.
4253 (cp_parser_parameter_declaration): Replace
4254 greater_than_is_operator_p with template_parm_p parameter. Do not
4255 cache tokens for template default arguments.
4257 * pt.c (retrieve_local_specialization): Use htab_find, not
4258 htab_find_with_hash.
4259 (register_local_specialization): Use htab_find_slot, not
4260 htab_find_slot_with_hash.
4261 (instantiate_decl): Pass a hash function to htab_create.
4263 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4265 * parser.c (cp_parser_binary_expression,
4266 cp_parser_multiplicative_expression,
4267 cp_parser_additive_expression, cp_parser_shift_expression,
4268 cp_parser_relational_expression, cp_parser_equality_expression,
4269 cp_parser_and_expression, cp_parser_exclusive_or_expression,
4270 cp_parser_inclusive_or_expression,
4271 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
4272 cp_parser_binary_expression): Const-ify.
4274 2003-01-04 Mark Mitchell <mark@codesourcery.com>
4276 * method.c (use_thunk): Disable access control while building the
4279 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
4281 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
4284 2003-01-03 Matt Austern <austern@apple.com>
4286 * cp-tree.h (struct lang_type_class): add field for key method
4287 (cp_global_trees): rename dynamic_classes to keyed_classes
4288 (key_method): add definition
4289 * class.c (finish_struct_1): compute class's key method, and add
4290 the class to keyed_classes list if there is no key method.
4291 * decl.c (finish_function): add class to keyed_classes list if we
4292 see a definition of the class's key method.
4293 * pt.c (instantiate_class_template): add template specialization
4294 of a dynamic class to keyed_classes list.
4295 * decl2.c (key_method): remove
4296 (finish_file): iterate only through keyed_classes list when
4297 deciding whether to emit vtables, remove class from its list after
4300 2003-01-02 Jason Merrill <jason@redhat.com>
4302 * call.c (build_conditional_expr): Stabilize lvalues properly.
4303 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
4304 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
4305 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
4307 * call.c (convert_like_real): Call decl_constant_value for an
4308 IDENTITY_CONV even if there are no more conversions.
4310 * cvt.c (build_up_reference): Don't push unnamed temps.
4312 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
4314 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
4315 for a backend struct.
4317 * except.c (wrap_cleanups_r, build_throw): Make
4318 MUST_NOT_THROW_EXPRs void.
4319 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
4321 * init.c (build_vec_delete_1): Pre-evaluate the base address.
4323 * init.c (get_temp_regvar): Simplify logic.
4325 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
4326 our replacement is a decl.
4328 * decl.c (cp_make_fname_decl): Push the decls inside the
4331 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
4334 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
4337 2003-01-03 Graham Stott <graham.stott@btinternet.com>
4339 * parser.c (struct cp_parser): Add access_checks_lists field
4340 (cp_parser_simple_declaration): Use.
4341 (cp_parser_init_declarator): Likewise.
4343 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4345 * parser.c (cp_parser_declaration): Accept the __extension__
4346 keyword before the declaration.
4349 * parser.c (cp_parser_parameter_declaration): Allow attributes to
4350 appear after the declarator.
4352 * call.c (build_new_method_call): Fix typo in message format
4355 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4357 * parser.c (cp_lexer_next_token_is): Declare it inline.
4358 (cp_lexer_set_source_position_from_token): Likewise.
4359 (cp_lexer_debugging_p): Likewise.
4360 (cp_parser_parsing_tentatively): Likewise.
4361 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
4362 to the cp_lexer_peek_token.
4364 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4367 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4369 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
4370 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
4371 cp/repo.c: Fix copyright years.
4373 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
4375 * lex.c: Remove superfluous include of cpplib.h.
4376 (CONSTRAINT): Define without conditions.
4377 (init_cp_pragma): Use c_register_pragma.
4379 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4381 * .cvsignore: Remove.
4383 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
4385 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
4386 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
4387 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
4388 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
4389 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
4391 * lex.h: parse.y is dead, so don't mention it. Also replace the
4392 copyright header with the default GNU copyright header.
4394 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4396 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4397 (lookup_name_namespace_only): Likewise.
4398 (begin_only_namespace_names): Likewise.
4399 (end_only_namespace_names): Likewise.
4400 * decl.c (only_namespace_names): Remove.
4401 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4402 (lookup_name_real): Do not check only_namespace_names.
4403 (lookup_name_namespace_only): Remove.
4404 (begin_only_namespace_names): Likewise.
4405 (end_only_namespace_names): Likewise.
4406 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4407 nested-name-specifiers more gracefully.
4408 (cp_parser_class_or_namespace_name): Avoid looking up namespace
4409 names when they cannot possibly appear.
4410 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4411 (cp_parser_elaborated_type_specifier): Likewise.
4412 (cp_parser_namespace_name): Only look for namespace names.
4413 (cp_parser_lookup_name): Add is_namespace parameter.
4414 (cp_parser_lookup_name_simple): Adjust call to
4415 cp_parser_lookup_name.
4417 * parser.c (cp_parser_dependent_type_p): Fix thinko.
4419 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4421 * .cvsignore: Update.
4423 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
4425 * class.c (modify_vtable_entry): Remove unused variable.
4426 (get_vcall_index): Always expect a non-thunk.
4427 (update_vtable_entry_for_fn): Combine covariant adjustments, when
4428 overriding a thunk. Pass get_vcall_index a non-thunk.
4430 * decl2.c (finish_file): Mark undefined inlines as extern.
4432 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4434 * cp-tree.def (RETURN_INIT): Remove.
4435 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4436 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4437 (note_level_for_for): Remove.
4438 (note_level_for_try): Likewise.
4439 (note_level_for_catch): Likewise.
4440 (finish_named_return_value): Likewise.
4441 (do_pushlevel): Change prototype.
4442 (pending_lang_change): Remove.
4443 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4445 (note_level_for_for): Remove.
4446 (note_level_for_try): Likewise.
4447 (note_level_for_catch): Likewise.
4448 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4449 * parser.c (cp_parser_context_free_list): Make it "deletable".
4450 (cp_parser_template_argument): Remove misleading comment.
4451 * pt.c (tsubst_expr): Remove RETURN_INIT code.
4452 * semantics.c (genrtl_named_return_value): Remove.
4453 (do_pushlevel): Take a scope kind as an argument.
4454 (begin_if_stmt): Adjust.
4455 (begin_while_stmt): Likewise.
4456 (begin_for_stmt): Likewise.
4457 (finish_for_init_stmt): Likewise.
4458 (begin_switch_stmt): Likewise.
4459 (begin_handler): Likewise.
4460 (begin_compound_stmt): Likewise.
4461 (finish_named_return_value): Remove.
4462 (cp_expand_stmt): Remove RETURN_INIT case.
4463 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4465 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4468 * parser.c (cp_parser_direct_declarator): Handle erroneous
4469 parenthesized declarators correctly.
4471 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4473 * cp-tree.h (pending_lang_change): Declare.
4475 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4477 * parser.c (cp_parser_context_free_list): New variable.
4478 (cp_parser_context_new): Use it.
4479 (cp_parser_error): Check return code from
4480 cp_parser_simulate_error.
4481 (cp_parser_simulate_error): Return a value.
4482 (cp_parser_id_expression): Optimize common case.
4483 (cp_parser_class_name): Likewise.
4484 (cp_parser_class_specifier): Adjust call to
4485 cp_parser_late_parsing_default_args.
4486 (cp_parser_lookup_name): Optimize common case.
4487 (cp_parser_late_parsing_for_member): Adjust call to
4488 cp_parser_late_parsing_default_args.
4489 (cp_parser_late_parsing_default_args): Add scope parameter.
4490 (cp_parser_require): Avoid creating the error message unless it's
4492 (cp_parser_parse_definitely): Place free'd contexts on the free
4495 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4497 2002-12-30 David Edelsohn <edelsohn@gnu.org>
4499 * parser.c (cp_parser_parameter_declaration_clause): Treat system
4500 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4502 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4504 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4507 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4511 * Make-lang.in (gt-cp-spew.h): Remove.
4512 * cp-tree.h (do_pending_lang_change): Remove.
4513 (do_identifier): Change prototype.
4514 (finish_id_expr): Remove.
4515 * decl.c (lookup_name_real): Remove yylex variable.
4516 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4517 * lex.c (init_cpp_parse): Remove.
4518 (reduce_cmp): Likewise.
4519 (token_cmp): Likewise.
4521 (lastiddecl): Likewise.
4522 (token_count): Likewise.
4523 (reduce_count): Likewise.
4525 (print_parse_statistics): Likewise.
4526 (do_pending_lang_change): Likewise.
4527 (do_identifier): Remove parsing parameter.
4528 * lex.h (lastiddecl): Remove.
4529 (looking_for_typename): Remove.
4530 (looking_for_template): Likewise.
4531 (pending_lang_change): Likewise.
4533 * semantics.c (finish_id_expr): Remove.
4535 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4538 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4540 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
4541 end, not the C front end.
4543 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
4545 * cp-tree.h (THUNK_TARGET): New macro.
4546 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4547 (finish_thunk): Remove offset parms.
4548 * class.c (find_final_overrider): Look through thunks.
4549 (get_vcall_index): Use THUNK_TARGET.
4550 (update_vtable_entry_for_fn): Look through thunks. Set covariant
4551 fixed offset here. Adjust finish_thunk call.
4552 (build_vtbl_initializer): Adjust finish_thunk calls.
4553 * mangle.c (mangle_call_offset): Remove superfluous if.
4554 (mangle_thunk): Adjust.
4555 * method.c (make_thunk): Adjust.
4556 (finish_thunk): Adjust.
4557 (thunk_adjust): Remove assert.
4558 (use_thunk): Use THUNK_TARGET
4559 * dump1.c (cp_dump_tree): Adjust thunk dumping.
4562 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4563 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4565 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4567 Remove traditional C constructs 4/n.
4568 * decl2.c (grok_method_quals, warn_if_unknown_interface,
4569 grok_x_components, cp_build_parm_decl, build_artificial_parm,
4570 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4571 delete_sanity, check_member_template, check_java_method,
4572 check_classfn, finish_static_data_member_decl, grokfield,
4573 grokbitfield, grokoptypename, grok_function_init,
4574 cplus_decl_attributes, constructor_name, defer_fn,
4575 build_anon_union_vars, finish_anon_union, coerce_new_type,
4576 coerce_delete_type, comdat_linkage, maybe_make_one_only,
4577 key_method, import_export_vtable, import_export_class,
4578 output_vtable_inherit, import_export_decl, import_export_tinfo,
4579 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4580 set_guard, start_objects, finish_objects,
4581 start_static_storage_duration_function,
4582 finish_static_storage_duration_function, get_priority_info,
4583 start_static_initialization_or_destruction,
4584 finish_static_initialization_or_destruction,
4585 do_static_initialization, do_static_destruction,
4586 prune_vars_needing_no_initialization, write_out_vars,
4587 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
4588 add_using_namespace, merge_functions, ambiguous_decl,
4589 lookup_using_namespace, lookup_using_namespace,
4590 qualified_lookup_using_namespace, set_decl_namespace,
4591 decl_namespace, current_decl_namespace, push_decl_namespace,
4592 pop_decl_namespace, push_scope, pop_scope, add_function,
4593 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
4594 lookup_arg_dependent, do_namespace_alias,
4595 validate_nonmember_using_decl, do_nonmember_using_decl,
4596 do_toplevel_using_decl, do_local_using_decl,
4597 do_class_using_decl, do_using_directive, check_default_args,
4598 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
4599 * parser.c (cp_parser_class_head): Use booleanss.
4600 * decl.c (walk_globals, walk_vtables): Likewise.
4601 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
4602 walk_globals): Change return type from 'int' to 'bool'.
4603 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
4604 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
4605 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
4606 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
4607 qualifier_flags, tinfo_base_init, generic_initializer,
4608 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
4609 dfs_class_hint_unmark, class_hint_flags, class_initializer,
4610 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
4611 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
4612 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
4613 * repo.c (repo_compile_flags, repo_template_declared,
4614 repo_template_defined, repo_class_defined, repo_get_id,
4615 repo_template_used, repo_vtable_used, repo_inline_used,
4616 repo_tinfo_used, repo_template_instantiated, extract_string,
4617 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
4618 finish_repo): Likewise.
4619 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
4620 cxx_print_xnode): Likewise..
4621 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
4622 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4623 * cxxfilt.c (demangle_it, print_demangler_list, usage,
4624 standard_symbol_characters, hp_symbol_characters, main, fatal):
4626 (strip_underscore): Change type from 'int' to 'bool'.
4627 (main): Use boolean constants.
4629 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4631 Remove traditional C constructs 3/n.
4632 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
4633 build_up_reference, warn_ref_binding, convert_to_reference,
4634 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
4635 convert_to_void, convert, convert_force, build_type_conversion,
4636 build_expr_type_conversion, type_promotes_to,
4637 perform_qualification_conversions): Use C90 prototyping style.
4638 * decl2.c (grok_array_decl): Use boolean constant.
4639 (delete_sanity): Likewise.
4640 * typeck.c (build_unary_op): Likewise.
4641 * semantics.c (finish_switch_cond): Likewise.
4642 * parser.c (cp_parser_direct_new_declarator): Likewise.
4643 * init.c (build_new): Likewise.
4645 2002-12-27 Mark Mitchell <mark@codesourcery.com>
4647 * Make-lang.in (po-generated): Remove parse.c.
4648 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
4649 ($(srcdir)/cp/parse.h): Remove target.
4650 ($(srcdir)/cp/parse.c): Likewise.
4651 (gt-cp-parse.h): Likewise.
4652 (gt-cp-parser.h): New target.
4653 (c++.distclean): Do not remove parse.output.
4654 (c++.maintainer-clean): Do not remove parse.c or parse.h.
4655 (cp/spew.o): Remove target.
4656 (cp/lex.o): Adjust dependencies.
4657 (cp/pt.o): Likewise.
4658 (cp/parse.o): Likewise.
4659 (cp/TAGS): Do not mention parse.c.
4660 (cp/parser.o): New target.
4661 * NEWS: Mention the new parser.
4662 * call.c (build_scoped_method_call): Simplify.
4663 (build_method_call): Likewise.
4664 (build_new_function_call): Adjust calls to add_function_candidate
4665 and add_template_candidate.
4666 (build_new_op): Improve handling of erroroneous operands.
4667 (convert_default_arg): Remove circular argument processing.
4668 (name_as_c_string): New function.
4669 (build_new_method_call): Use it.
4670 (perform_implicit_conversion): Use error_operand_p.
4671 * class.c (finish_struct_anon): Use constructor_name_p.
4672 (check_field_decls): Likewise.
4673 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4674 (resolve_address_of_overloaded_function): Likewise.
4675 (instantiate_type): Tweak pointer-to-member handling.
4676 (get_primary_binfo): Remove incorrect assertion.
4677 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4678 * cp-tree.h (DEFARG_TOKENS): New macro.
4679 (default_arg): New structure.
4680 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4681 (lang_tree_node): Add default_arg.
4682 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4683 (type_info_ref_type): New macro.
4684 (saved_scope): Make processing_explicit_instantiation a boolean.
4685 (check_access): New field.
4686 (unparsed_text): Remove.
4687 (language_function): Remove unparsed_inlines.
4688 (error_operand_p): New macro.
4689 (lang_decl): Adjust pending_inline_info.
4690 (DEFARG_POINTER): Remove.
4691 (tag_types): Add typenames.
4692 (lookup_ualified_name): Declare.
4693 (lookup_name_real): Likewise.
4694 (shadow_tag): Adjust prototype.
4695 (get_scope_of_declarator): Declare it.
4696 (process_next_inline): Remove it.
4697 (check_for_missing_semicolon): Likewise.
4698 (maybe_get_template_decl_from_type_decl): Declare it.
4699 (finish_label_stmt): Adjust prototype.
4700 (finish_non_static_data_meber): Declare it.
4701 (finish_pseudo_destructor_call_expr): Rename to ...
4702 (finish_pseudo_destructor_expr): ... this.
4703 (finish_compound_literal): Declare it.
4704 (begin_inline_definitions): Remove it.
4705 (init_spew): Remove.
4706 (peekyylex): Likewise.
4707 (arbitrate_lookup): Likewise.
4708 (frob_opname): Likewise.
4709 (maybe_snarf_defarg): Likewise.
4710 (add_defarg_fn): Likewise.
4711 (do_pending_defargs): Likewise.
4712 (done_pending_defargs): Likewise.
4713 (unprocessed_defarg_fn): Likewise.
4714 (replace_defarg): Likewise.
4715 (end_input): Likewise.
4716 (get_overloaded_fn): Likewise.
4717 * cvt.c (convert_to_reference): Improve error handling.
4718 * decl.c (lookup_name_real): Do not declare it static.
4719 (maybe_push_to_top_level): Set check_access.
4720 (identifier_type_value): Adjust call to lookup_name_real.
4721 (lookup_qualified_name): New method.
4722 (lookup_name_real): Remove special-case parsing code.
4723 (lookup_name-nonclass): Adjust call to lookup_name_real.
4724 (lookup_name_namespace_only): Likewise.
4725 (lookup_name): Likewise.
4726 (check_tag_decl): Return the type declared.
4727 (shadow_tag): Likewise.
4728 (register_dtor_fn): Tweak check_access.
4729 (grokfndecl): Use constructor_name_p.
4730 (get_scope_of_declarator): New function.
4731 (grokdeclarator): Obscure tweaks for slightly different declarator
4733 (start_method): Return error_mark_node to indicate failure.
4734 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
4735 * decl2.c (constructor_name_full): Simplify.
4736 (constructor_name): Use it.
4737 (build_expr_from_tree): Adjust for changes to do new parser.
4738 (push_scope): Improve robustness.
4739 (validate_nonmember_using_decl): Process declarations, not names.
4740 (do_class_using_decl): Likewise.
4741 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4743 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4744 * expr.c (cxx_expand_expr): Handle BASELINKs.
4745 * init.c (member_init_ok_or_else): Issue more errors.
4746 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4747 * lex.c: Do not include parse.h.
4748 (yypring): Do not declare.
4750 (make_reference_declarator): Remove error-generating code.
4751 (rid_to_yy): Remove.
4752 (cxx_init): Do not call init_spew.
4754 (check_for_missing_semicolon): Remove.
4755 * lex.h (got_scope): Remove.
4756 (got_object): Remove.
4757 * method.c (hack_identifier): Use finish_non_static_data_member.
4758 (implicitly_declare_fn): Adjust use of constructor_name.
4759 * parser.c: New file.
4760 * pt.c (parse.h): Do not include it.
4761 (maybe_get_template_decl_from_template): Do not declare it.
4762 (finish_member_template_decl): Tweak.
4763 (begin_explicit_instantiation): Adjust for
4764 processing_explicit_instantiation being boolean.
4765 (end_explicit_instantiation): Likewise.
4766 (maybe_process_partial_specialization): Tighten specialization
4768 (retrieve_local_specialization): Adjust ue of hash table.
4769 (eq_local_specializations): New function.
4770 (register_local_specialization): Likewise.
4771 (push_template_decl_real): Remove unnecessary test.
4772 (maybe_get_template_decl_from_type_decl): Don't make it static.
4773 (for_each_template_parm_r): Handle TYPEOF_TYPE.
4774 (tsubst_copy): Use retrieive_local_specialization to handle
4775 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
4776 Handle COMPONENT_REFs with pseudo-destructor-expressions.
4777 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4778 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4779 (unify): Tweak handling of CONST_DECLs.
4780 (regenerate_decl_from_template): Use push_nested_class.
4781 (template_for_substitution): New funciton.
4782 (instantiate_decl): Use it. Register parameters as local
4784 * rtti.c (init_rtti_processing): Set type_info_ref_type.
4785 (build_typeid): Use it.
4786 (get_typeid): Likeise.
4787 * search.c (accessible_p): Use check_access, not
4788 flag_access_control.
4789 (adjust_result_of_qualified_name_lookup): Pay attention to the
4791 * semantics.c (finish_asm_stmt): Adjust error handling.
4792 (finish_label_stmt): Return the statement.
4793 (finish_non_static_data_member): New function.
4794 (finish_class_expr): Handle BASELINKs.
4795 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
4796 (finish_object_call_expr): Simplify handling during templates.
4797 (finish_pseudo_destructor_call_expr): Rename to ...
4798 (finish_pseudo_dtor_expr): ... this.
4799 (finish_compound_literal): New function.
4800 (begin_inline_definitions): Remove.
4801 (finish_sizeof): Remove special template handling.
4802 * spew.c: Do not include parse.h.
4803 * tree.c (get_overloaded_fn): Remove.
4804 * typeck.c (build_class_member_access_expr): Handle
4805 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
4806 (lookup_destructor): New function.
4807 (finish_class_member_access_expr): Use it.
4808 (convert_arguments): Simplify.
4809 (build_unary_op): Handle BASELINKs.
4811 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
4814 * decl2.c (mark_used): Defer inline functions.
4815 (finish_file): Merge deferred_fns loops. Check all used
4816 inline functions have a definition.
4817 * method.c (make_thunk): Thunks are not inline.
4819 PR c++/5116, c++/764
4820 * call.c (build_new_op): Make sure template class operands are
4823 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
4826 * cp-tree.h (resolve_scoped_fn_name): Prototype.
4827 * call.c (resolve_scoped_fn_name): New function. Deal with
4828 more template expansion. Broken out of ...
4829 * parse.y (parse_finish_call_expr): ... here. Call it.
4830 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
4831 resolve_scoped_fn_name and build_call_from_tree.
4834 * decl.c (duplicate_decls): Templates may be disambiguated by
4838 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
4839 conversion operators on failure.
4841 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4843 Remove traditional C constructs 2/n.
4844 * call.c (tourney, build_field_call, equal_functions, joust,
4845 compare_ics, build_over_call, build_java_interface_fn_ref,
4846 convert_like_real, op_error, build_object_call, resolve_args,
4847 build_vfield_ref, check_dtor_name, build_scoped_method_call,
4848 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
4849 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
4850 standard_conversion, reference_related_p,
4851 reference_compatible_p, convert_class_to_reference,
4852 direct_reference_binding, reference_binding,
4853 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
4854 add_template_conv_candidate, any_viable, any_strictly_viable,
4855 build_this, splice_viable, print_z_candidates,
4856 build_user_type_conversion, build_new_function_call,
4857 conditional_conversion, build_conditional_expr, build_new_op,
4858 build_op_delete_call, enforce_access, call_builtin_trap,
4859 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
4860 convert_default_arg, type_passed_as, convert_for_arg_passing,
4861 in_charge_arg_for_name, is_properly_derived_from,
4862 maybe_handle_implicit_object, maybe_handle_ref_bind,
4863 source_type, add_warning, can_convert, can_convert_arg,
4864 perform_implicit_conversion, can_convert_arg_bad,
4865 initialize_reference, add_conv_candidate,
4866 add_template_candidate_real, add_template_candidate): Ansify.
4868 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
4871 * cp-tree.h (grokoptypename): Add SCOPE parameter.
4872 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
4873 if in a template scope.
4874 * parse.y (unoperator): Return the scope.
4875 (operator_name): Adjust grokoptypename call.
4877 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4879 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
4880 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
4881 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
4883 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4885 * ChangeLog: Fix a typo.
4886 * class.c: Fix comment typos.
4887 * cp-tree.h: Likewise.
4889 2002-12-18 Jason Merrill <jason@redhat.com>
4891 Handle anonymous unions at the tree level.
4892 C++ ABI change: Mangle anonymous unions using the name of their
4893 first named field (by depth-first search). Should not cause
4894 binary compatibility problems, though, as the compiler previously
4895 didn't emit anything for affected unions.
4896 * cp-tree.def (ALIAS_DECL): New tree code.
4897 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
4898 first field, not the largest.
4899 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
4900 push the decl, and write it out at namespace scope.
4901 * decl.c (lookup_name_real): See through an ALIAS_DECL.
4902 (pushdecl): Add namespace bindings for ALIAS_DECLs.
4903 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
4904 of a decl which doesn't have one.
4905 * typeck.c (build_class_member_access_expr): Don't recurse if
4906 we already have the type we want.
4908 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4911 * friend.c (make_friend_class): Allow partial specialization
4912 when declaration is not a template friend.
4914 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4917 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
4918 TREE_PROTECTED to created decl nodes.
4920 2002-12-18 Mark Mitchell <mark@codesourcery.com>
4922 * class.c (build_base_field): Do not set DECL_PACKED on the
4925 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
4927 * cp-tree.h (struct tree_srcloc): Use location_t.
4928 (SOURCE_LOCUS): New.
4929 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
4931 2002-12-17 Jason Merrill <jason@redhat.com>
4933 * decl.c (finish_function): Also complain about no return in
4935 * semantics.c (finish_return_stmt): Also call check_return_expr in
4937 * typeck.c (check_return_expr): In a template, just remember that we
4940 2002-12-16 Jason Merrill <jason@redhat.com>
4942 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
4945 * semantics.c (do_pushlevel): Call pushlevel after adding the
4947 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
4948 * parse.y (function_body): Go back to using compstmt.
4949 * decl.c (pushdecl): Skip another level to get to the parms level.
4951 * call.c (build_new_method_call): Use is_dummy_object to determine
4952 whether or not to evaluate the object parameter to a static member
4955 2002-12-14 Jason Merrill <jason@redhat.com>
4957 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
4958 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4959 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
4960 don't bother with an AGGR_INIT_EXPR.
4961 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
4962 just generate a new decl normally. Take return slot parm.
4963 * cp-tree.h: Adjust prototype.
4965 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4968 * cvt.c (convert_to_pointer_force): Don't try comparing against
4971 2002-12-13 Geoffrey Keating <geoffk@apple.com>
4973 * cp-tree.h: Have the multiple-include guards around
4976 2002-12-10 David Edelsohn <edelsohn@gnu.org>
4978 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
4980 (snarf_method): Same.
4981 (snarf_defarg): Same.
4983 2002-12-10 Mark Mitchell <mark@codesourcery.com>
4986 * pt.c (tsubst_copy): Handle destructor names more correctly.
4988 2002-12-10 Matt Austern <austern@apple.com>
4990 * cp-tree.h: get rid of needs_virtual_reinit bit.
4992 2002-12-09 Mark Mitchell <mark@codesourcery.com>
4994 * NEWS: Document removal of in-class initialization extension for
4995 static data members of non-arithmetic, non-enumeration type.
4996 * decl.c (check_static_variable_definition): Do not allow that
4998 * decl2.c (grokfield): Do not call digest_init when processing
5001 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5003 * error.c (dump_expr): Fix format specifier warning.
5005 2002-12-04 Geoffrey Keating <geoffk@apple.com>
5007 * class.c (finish_struct_1): Correct comment.
5008 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5010 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5013 * error.c (dump_expr): Don't ever try to dump a non-existent
5016 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
5018 Implement covariant returns.
5019 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5020 (struct lang_decl_flags): Add this_thunk_p flag.
5021 Rename vcall_offset to virtual_offset.
5022 (struct lang_decl): Rename delta to fixed_offset.
5023 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5024 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5025 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5026 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5027 (make_thunk): Add this_adjusting arg.
5028 (finish_thunk): Declare.
5029 (mangle_thunk): Add this_adjusting arg.
5030 * class.c (get_vcall_index): Use base function for lookup.
5031 (update_vtable_entry_for_fn): Generate covariant thunk.
5032 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5033 (build_vtbl_initializer): Use base function for lookup.
5034 Finish covariant thunk here. Adjust thunk generation.
5035 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5036 Adjust thunk dumping.
5037 * mangle.c (mangle_call_offset): New function.
5038 (mangle_thunk): Adjust for covariant thunks.
5039 * method.c (make_thunk): Adjust. Do not set name here.
5040 (finish_thunk): New function. Set name here.
5041 (use_thunk): Generate covariant thunks too.
5042 (thunk_adjust): New function.
5043 * search.c (covariant_return_p): Remove. Fold into ...
5044 (check_final_overrider): ... here. Simplify.
5045 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5047 2002-12-03 Jason Merrill <jason@redhat.com>
5050 * call.c (build_over_call): Check specifically for TARGET_EXPR
5053 PR c++/8461, c++/8625
5054 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5055 (cp_convert_parm_for_inlining): Remove.
5056 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5058 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5059 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5061 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5062 an ambiguous conversion.
5064 2002-12-03 Mark Mitchell <mark@codesourcery.com>
5067 * decl.c (reshape_init): Handle erroneous initializers.
5069 2002-12-02 Mark Mitchell <mark@codesourcery.com>
5072 * spew.c (remove_last_token): Make sure that last_chunk is set
5076 * error.c (dump_expr): Handle character constants with
5079 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5082 * decl.c (grokdeclarator): Require class-key for all friend class.
5083 Output the correct type and context in the error message.
5085 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5088 * pt.c (unify): Use variably_modified_type_p to test validity of
5089 template argument types.
5092 * cp-tree.h (lang_type_class): Add typeinfo_var.
5093 (CLASSTYPE_TYPEINFO_VAR): New macro.
5094 * rtti.c (get_tinfo_decl): Use it.
5097 * init.c (expand_member_init): Always get the main variant of a
5100 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5104 * decl.c (cxx_init_decl_processing): Use size_type_node, not
5106 * decl2.c (coerce_new_type): Likewise.
5107 * except.c (do_allocate_exception): Likewise.
5109 2002-11-30 Zack Weinberg <zack@codesourcery.com>
5111 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5112 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5113 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5114 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5115 typeck2.c: Include coretypes.h and tm.h.
5116 * Make-lang.in: Update dependencies.
5118 2002-11-30 Mark Mitchell <mark@codesourcery.com>
5121 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5122 (check_initializer): Validate the type of the initialized
5123 variable, even if the initializer is absent.
5124 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5127 * typeck.c (convert_for_assignment): Do not use
5128 decl_constant_value on the operand.
5131 * pt.c (instantiate_decl): Handle template friends defined outside
5132 of the class correctly.
5134 2002-11-29 Joe Buck <jbuck@synopsys.com>
5136 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5139 2002-11-29 Mark Mitchell <mark@codesourcery.com>
5141 * class.c (walk_subobject_offsets): Recur on binfos as well as on
5143 (layout_nonempty_base_or_field): Pass it a binfo when processing a
5145 (layout_empty_base): Likewise.
5146 (build_base_field): Likewise.
5148 2002-11-27 Mark Mitchell <mark@codesourcery.com>
5150 * class.c (build_base_field): Make sure we get the canonical base
5151 when descending through primary bases.
5153 2002-11-26 Geoffrey Keating <geoffk@apple.com>
5155 * decl.c (check_initializer): Don't error on initialisation of
5156 a scalar with a brace-enclosed expression.
5158 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
5160 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5161 (template_parms_equal): Remove prototype.
5162 * typeck.c (buuld_indirect_ref): Reformat.
5164 2002-11-25 Jason Merrill <jason@redhat.com>
5166 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
5169 2002-11-25 Mark Mitchell <mark@codesourcery.com>
5171 * tree.c (cp_build_qualified_type_real): Correct handling of
5173 * class.c (walk_subobject_offsets): Fix thinko.
5174 (build_base_field): Record offsets of empty bases in primary
5176 (layout_class_type): Record offsets of empty bases in fields.
5178 * search.c (is_subobject_of_p_1): Fix thinko.
5179 (lookup_field_queue_p): Likewise.
5181 2002-11-24 Mark Mitchell <mark@codesourcery.com>
5183 * class.c (layout_class_type): Reuse tail padding when laying out
5186 2002-11-22 Mark Mitchell <mark@codesourcery.com>
5188 * rtti.c (qualifier_flags): Fix thinko.
5190 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5192 Remove traditional C constructs 1/n.
5193 * cp-tree.h (init_method, set_mangled_name_for_decl,
5194 build_opfncall, hack_identifier, make_thunk, use_thunk,
5195 synthesize_method, implicitly_declare_fn,
5196 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
5197 maybe_clone_body): Remove use of PARAMS.
5199 * method.c (do_build_assign_ref, do_build_copy_constructor,
5200 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
5202 (synthesize_method): Use 'bool' type and constants instead of
5204 (locate_copy): Likewise.
5205 (implicitly_declare_fn): Likewise.
5207 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
5208 Remove old-style declaration.
5209 (maybe_clone_body): Use 'bool' type and constants.
5211 2002-11-21 Glen Nakamura <glen@imodulo.com>
5214 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
5215 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
5216 of the branches of a COND_EXPR.
5218 2002-11-19 Mark Mitchell <mark@codesourcery.com>
5220 * pt.c (for_each_template_parm): Free allocated memory.
5221 * search.c (is_subobject_of_p_1): New function.
5222 (is_subobject_of_p): Avoid walking virtual bases multiple times.
5224 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
5226 * g++spec.c (lang_specific_spec_functions): New.
5228 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5230 * ChangeLog: Follow spelling conventions.
5231 * class.c: Likewise.
5232 * decl2.c: Likewise.
5234 2002-11-14 Zack Weinberg <zack@codesourcery.com>
5236 * search.c (dfs_push_decls): Do not try to reorder elements
5237 3..n of method_vec if method_vec has only two elements.
5238 Reverse order of two tests to avoid accessing unallocated
5241 2002-11-14 Mark Mitchell <mark@codesourcery.com>
5243 * class.c (dfs_find_final_overrider): Adjust so that the most
5244 derived object is a binfo, rather than a class type.
5245 (find_final_overrider): Likewise.
5246 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
5247 (add_vcall_offset): Likewise.
5249 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5252 * pt.c (instantiate_template): Push class scope for member
5254 (get_mostly_instantiated_function_type): Likewise. Don't call
5255 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
5256 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
5257 * mangle.c (write_encoding, write_unqualified_name): Adjust.
5259 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5261 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
5262 vcall offfsets. Split out ...
5263 (add_vcall_offset): ... new function.
5266 * pt.c (for_each_template_parm): Add htab parameter.
5267 (process_partial_specialization): Adjust call.
5268 (push_template_decl_real): Likewise.
5269 (pair_fn_data): Add visited.
5270 (for_each_template_parm_r): Avoid walking duplicates more than
5272 (uses_template_parms): Adjust call to for_each_template_parm.
5274 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5276 * class.c (add_implicitly_declared_members): Put implicitly
5277 declared functions at the end of TYPE_METHODs when -fabi-version
5280 2002-11-05 Geoffrey Keating <geoffk@apple.com>
5282 * decl2.c (finish_file): Correct spelling.
5284 2002-11-03 Mark Mitchell <mark@codesourcery.com>
5286 * call.c (build_special_member_call): Do not try to lookup VTTs by
5288 * class.c (vtbl_init_data): Add generate_vcall_entries.
5289 (get_vtable_decl): Do not look up virtual tables by name.
5290 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
5291 (set_primary_base): Do not set CLASSTYPE_RTTI.
5292 (determine_primary_base): Likewise.
5293 (get_matching_virtual): Remove.
5294 (get_vcall_index): New function.
5295 (update_vtable_entry_for_fn): Do not try to use virtual thunks
5296 when they are not required. Assign vcall indices at this point.
5297 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
5298 Do update dynamic_classes.
5299 (build_vtt): Do not add VTTs to the symbol table.
5300 (build_ctor_vtbl_group): Likewise.
5301 (build_vtbl_initializer): Simplify handling of vcall indices.
5302 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
5303 for the most derived class.
5304 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
5306 * cp-tree.h (dynamic_classes): New macro.
5307 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
5308 (CLASSTYPE_RTTI): Remove.
5309 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
5310 (CLASSTYPE_VCALL_INDICES): New macro.
5311 (CLASSTYPE_VTABLES): Likewise.
5312 (BV_USE_VCALL_INDEX_P): Remove.
5313 (build_vtable_path): Remove.
5314 * decl2.c (finish_vtable_vardecl): Remove.
5315 (key_method): Remove #if 0'd code.
5316 (finish_vtable_vardecl): Rename to ...
5317 (maybe_emit_vtables): ... this.
5318 (finish_file): Use it.
5319 * search.c (look_for_overrides_here): Update comment.
5321 2002-11-01 Zack Weinberg <zack@codesourcery.com>
5324 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
5326 2002-10-30 Jason Merrill <jason@redhat.com>
5329 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
5330 * call.c (convert_for_arg_passing): Set it.
5331 * except.c (stabilize_throw_expr): Recurse for such an arg.
5333 2002-10-31 Mark Mitchell <mark@codesourcery.com>
5335 * cp-tree.h (lang_decl_flags): Remove init_priority.
5336 (lang_decl): Add delta.
5337 (GLOBAL_INIT_PRIORITY): Remove.
5338 (THUNK_DELTA): Revise definition.
5339 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
5340 * dump.c (cp_dump_tree): Don't dump it.
5342 2002-10-30 Mark Mitchell <mark@codesourcery.com>
5345 * typeck2.c (process_init_constructor): Call complete_array_type.
5348 * decl.c (make_typename_type): Issue errors about invalid results.
5350 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5352 Core issue 287, PR c++/7639
5353 * cp-tree.h (lang_type_class): Add decl_list field.
5354 (CLASSTYPE_DECL_LIST): New macro.
5355 (maybe_add_class_template_decl_list): Add declaration.
5356 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
5357 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
5358 (maybe_add_class_template_decl_list): New function.
5359 (add_implicitly_declared_members): Use it.
5360 * decl.c (maybe_process_template_type_declaration): Likewise.
5361 (pushtag): Likewise.
5362 * friend.c (add_friend): Likewise.
5363 (make_friend_class): Likewise.
5364 * semantics.c (finish_member_declaration): Likewise.
5365 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
5366 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
5367 to process members and friends in the order of declaration.
5369 2002-10-29 Mark Mitchell <mark@codesourcery.com>
5372 * decl.c (finish_destructor_body): Create the label to jump to
5373 when returning from a destructor here.
5374 (finish_function_body): Rather than here.
5376 2002-10-25 Zack Weinberg <zack@codesourcery.com>
5379 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
5380 SCOPE_REF is not null before dereferencing it.
5382 2002-10-25 Mark Mitchell <mark@codesourcery.com>
5384 * call.c (build_over_call): Use DECL_CONTEXT, not
5385 DECL_VIRTUAL_CONTEXT.
5386 * class.c (modify_vtable_entry): Don't mess with
5387 DECL_VIRTUAL_CONTEXT.
5388 (set_vindex): Remove.
5389 (set_primary_base): Remove vfuns_p parameter.
5390 (determine_primary_base): Likewise.
5391 (modify_all_vtables): Likewise.
5392 (layout_class_type): Likewise. Adjust calls to other functions
5394 (finish_struct_1): Adjust calls to modified functions. Set
5396 * cp-tree.h (lang_type_class): Remove vsize.
5397 (CLASSTYPE_VSIZE): Remove.
5398 (lang_decl): Remove thunks.
5399 (DECL_THUNKS): Adjust.
5400 (DECL_VIRTUAL_CONTEXT): Remove.
5401 (duplicate_decls): Don't copy it.
5402 * pt.c (build_template_decl): Don't set it.
5403 (tsubst_decl): Likewise.
5404 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5406 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5407 (build_vtable_entry): Remove.
5408 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5409 (lang_decl): Add thunks.
5410 (DECL_THUNKS): New macro.
5411 * decl.c (duplicate_decls): Copy it.
5412 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5413 * semantics.c (emit_associated_thunks): Simplify.
5415 2002-10-24 David Edelsohn <edelsohn@gnu.org>
5418 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5419 lang_type structure exists before accessing field.
5420 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5421 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5422 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5423 * class.c (check_field_decls): Use new macros.
5424 * typeck2.c (process_init_constructor): Remove redundant check for
5425 existence of lang_type structure.
5427 2002-10-24 Mark Mitchell <mark@codesourcery.com>
5429 * class.c (end_of_base): New method.
5430 (end_of_class): Use it. Check indirect virtual bases.
5432 * class.c (check_field_decls): Fix typo.
5434 2002-10-23 Mark Mitchell <mark@codesourcery.com>
5437 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5441 * spew.c (next_token): Do not return an endless stream of
5442 END_OF_SAVED_INPUT tokens.
5443 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5444 the cached token stream.
5445 (snarf_defarg): Likewise.
5447 2002-10-23 Zack Weinberg <zack@codesourcery.com>
5449 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5450 variably_modified_type_p.
5451 * cp-tree.h: Remove prototype of variably_modified_type_p.
5452 * tree.c (variably_modified_type_p): Remove; now implemented
5453 in language-independent code.
5455 2002-10-22 Mark Mitchell <mark@codesourcery.com>
5458 * spew.c (snarf_parenthesized_expression): New function.
5459 (snarf_block): Use it.
5461 2002-10-22 Richard Henderson <rth@redhat.com>
5463 * method.c (use_thunk): Always compute vcall_value; assert that
5464 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
5465 for vcall thunks as well.
5467 2002-10-21 Mark Mitchell <mark@codesourcery.com>
5469 * class.c (empty_base_at_nonzero_offset_p): New function.
5470 (layout_nonempty_base_or_field): Do not check for conflicts when
5471 laying out a virtual base using the GCC 3.2 ABI.
5472 (build_base_field): Correct checking for presence of empty classes
5473 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5475 * class.c (include_empty_classes): Use normalize_rli.
5476 (layout_class_type): Likewise.
5478 * decl.c (reshape_init): Tweak handling of character arrays.
5481 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5482 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5483 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5484 (check_field_decls): Likewise.
5485 (layout_class_type): Likewise.
5486 (finish_struct_1): Initialize it.
5487 (walk_subobject_offsets): Use it to prune searches.
5489 2002-10-20 Mark Mitchell <mark@codesourcery.com>
5491 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5492 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5493 TARGET_ASM_OUTPUT_MI_THUNK in comments.
5495 2002-10-18 Zack Weinberg <zack@codesourcery.com>
5497 * decl.c (start_decl): Point users of the old initialized-
5498 typedef extension at __typeof__.
5500 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5502 * Make-lang.in (method.o): Depend on TARGET_H.
5503 * method.c (target.h): Include it.
5504 (use_thunk): Use target hooks. Use vcall thunks, if available.
5506 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5508 * class.c (base_derived_from): Make sure return value is a bool.
5510 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5512 * class.c (find_final_overrider_data_s): Remove overriding_fn and
5514 (dfs_base_derived_from): New function.
5515 (base_derived_from): Likewise.
5516 (dfs_find_final_overrider): Use base_derived_from.
5517 (find_final_overrider): Adjust.
5519 2002-10-18 Jason Merrill <jason@redhat.com>
5522 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5523 with condition decls in a template.
5525 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
5527 * class.c (add_method): Compare template parms too.
5529 2002-10-17 Mark Mitchell <mark@codesourcery.com>
5532 * class.c (handle_using_decl): Allow the declaration used to be
5533 from an ambiguous base.
5535 * pt.c (convert_template_argument): Revert this change:
5536 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5537 * pt.c (convert_template_argument): Do not fold non-type
5538 template rguments when inside a template.
5540 * init.c (expand_default_init): Handle brace-enclosed initializers
5543 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5545 * mangle.c (write_expression): Correct handling of enumeration
5547 (write_template_arg): Likewise.
5548 * pt.c (convert_template_argument): Do not fold non-type template
5549 arguments when inside a template.
5552 * cvt.c (convert_to_reference): Allow references as the incoming
5555 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5558 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5559 build_qualified_type.
5561 2002-10-15 Richard Henderson <rth@redhat.com>
5563 * error.c (dump_expr): Use real_to_decimal directly, and with
5566 2002-10-15 Mark Mitchell <mark@codesourcery.com>
5568 * decl.c (reshape_init): Fix typo.
5570 * cp-tree.h (operator_name_info_t): Add arity.
5571 * lex.c (init_operators): Initialize it.
5572 * mangle.c (write_conversion_operator_name): New function.
5573 (write_unqualified_name): Use it.
5574 (write_template_args): Accept template arguments as a TREE_LIST.
5575 (write_expression): Adjust handling of qualified names to match
5578 2002-10-15 Jason Merrill <jason@redhat.com>
5580 * call.c (call_builtin_trap): New fn.
5581 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
5582 (build_call): Don't set current_function_returns_abnormally outside
5585 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5587 * class.c (check_field_decls): Remove empty_p parameter. Instead,
5588 clear CLASSTYPE_EMPTY_P.
5589 (build_base_field): Likewise.
5590 (build_base_fields): Likewise.
5591 (check_bases_and_members): Likewise.
5592 (create_vtbl_ptr): Likewise.
5593 (layout_class_type): Likewise. Ensure that empty classes have
5594 size zero when used as base classes in the 3.2 ABI.
5595 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
5596 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
5598 (is_empty_class): Correct definition when using post-3.2 ABI.
5599 * cp-tree.h (lang_type_class): Add empty_p.
5600 (CLASSTYPE_EMPTY_P): New macro.
5602 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
5604 * init.c (build_delete): Do not apply save_expr for arrays.
5605 (build_vec_delete): Likewise.
5607 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5609 * decl.c (layout_var_decl): Call layout_decl even for variables
5610 whose type is an array with unspecified bounds.
5613 * lex.c (do_identifier): Add another option for the parsing
5615 * parse.y (do_id): Use it.
5617 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
5619 PRs C++/6803, C++/7721 and C++/7803
5620 * decl.c (grokdeclarator): Gracefully handle template-name as
5623 2002-10-11 Jason Molenda <jmolenda@apple.com>
5625 * init.c (build_field_list): Provide uses_unions_p with a default
5628 2002-10-11 Mark Mitchell <mark@codesourcery.com>
5631 * cp-tree.h (variably_modified_type_p): New function.
5632 (grokdeclarator) Tighten check for variably modified types as
5634 * pt.c (convert_template_argument): Do not allow variably modified
5635 types as template arguments.
5636 * tree.c (variably_modified_type_p): New function.
5638 * NEWS: Document removal of "new X = ..." extension.
5639 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
5640 brace-enclosed initializers.
5641 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
5642 (initialize_local_var): Remove declaration.
5643 (expand_static_init): Likewise.
5644 * decl.c (next_initializable_field): New function.
5645 (reshape_init): Likewise.
5646 (check_initializer): Use them. Build dynamic initializer for
5647 aggregates here too.
5648 (initialize_local_var): Simplify, and incorporate cleanup
5649 insertion code as well.
5650 (destroy_local_var): Remove.
5651 (cp_finish_decl): Tidy.
5652 (expand_static_init): Fold checks for whether or not a variable
5653 needs initialization into this function. Simplify.
5654 * decl2.c (do_static_initialization): Simplify.
5655 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5656 be done for us automatically.
5657 (expand_default_init): Handle brace-enclosed initializers
5659 (expand_aggr_init_1): Remove RTL-generation code.
5660 (build_vec_init): Remove "new X = ..." support.
5661 * parse.y (new_initializer): Likewise.
5662 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5663 brace-enclosed initializer.
5664 (create_pseudo_type_info): Likewise.
5665 * typeck2.c (store_init_value): Don't try to handle digest_init
5666 being called more than once.
5667 (digest_init): Tidy handling of brace-enclosed initializers.
5669 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5671 * decl.c (typename_hash): Use htab_hash_pointer.
5673 2002-10-10 Jim Wilson <wilson@redhat.com>
5675 * decl.c (duplicate_decls): Don't call decl_attributes.
5677 2002-10-09 Zack Weinberg <zack@codesourcery.com>
5680 * decl.c (start_decl): Unconditionally issue error for
5681 'typedef foo = bar'.
5682 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5683 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5685 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5687 * decl2.c (prune_vtable_vardecl): Delete unused function.
5689 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5692 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5693 procesing template functions.
5694 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5695 type. Call layout_decl.
5696 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5698 2002-10-07 Richard Henderson <rth@redhat.com>
5700 * decl2.c, pt.c: Revert c++/7754 fix.
5702 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5705 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5707 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5710 * pt.c (for_each_template_parm_r): Handle BASELINKs.
5713 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5714 procesing template functions.
5715 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5716 type. Call layout_decl.
5717 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5719 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5722 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5723 template parameters.
5724 (globals): Add entity and need_abi_warning.
5725 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5726 CLASSTYPE_TEMPLATE_INFO.
5727 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
5729 (write_prefix): Handle typename types correctly.
5730 (write_template_prefix): Handle template template parameters
5732 (start_mangling): Add entity parameter.
5733 (finish_mangling): Warn about names whose mangling will change.
5734 (mangle_decl_string): Adjust.
5735 (mangle_type_string): Likewise.
5736 (mangle_special_for_type): Likewise.
5737 (mangle_ctor_vtbl_for_type): Likewise.
5738 (mangle_thunk): Likewise.
5739 (mangle_guard_variable): Likewise.
5740 (mangle_ref_init_variable): Likewise.
5742 2002-10-02 Mark Mitchell <mark@codesourcery.com>
5745 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5746 * cp-tree.h (emit_base_init): Rename to ....
5747 (emit_mem_initializers): ... this.
5748 (expand_member_init): Change prototype.
5749 * init.c (perform_member_init): Compute explicit, rather than
5750 requiring it as a parameter.
5751 (sort_member_init): Rename to ...
5752 (sort_mem_initializers): ... this. Process bases and data members
5754 (sort_base_init): Remove.
5755 (emit_base_init): Rename to ...
5756 (emit_mem_initializers): ... this.
5757 (expand_aggr_vbase_init_1): Remove.
5758 (construct_virtual_bases): Rename to ...
5759 (construct_virtual_base): ... this.
5760 (expand_member_init): Rework handling of base initializers.
5761 * method.c (do_build_copy_constructor): Use
5762 finish_mem_initializers.
5763 * parse.y (member_init): Adjust calls to expand_member_init.
5764 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5765 (tsubst_initializer_list): Use expand_member_init.
5766 * semantics.c (finish_mem_intiailizers): Simplify.
5768 2002-10-02 Matt Austern <austern@apple.com>
5769 * decl.c (walk_vtables_r): Fixed typo that caused result to
5770 never get a nonzero value.
5772 2002-10-02 Roger Sayle <roger@eyesopen.com>
5774 PR optimization/6627
5775 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5776 from here, and move it to tree.h.
5777 * decl.c (cxx_init_decl_processing): If storing the vbit
5778 in function pointers, ensure that force_align_functions_log
5781 2002-10-02 Matt Austern <austern@apple.com>
5783 * class.c (check_field_decls): Changed warning about const member
5784 variables so that it doesn't get issued for a class aggregate.
5786 2002-10-01 Mark Mitchell <mark@codesourcery.com>
5788 * decl.c (cp_finish_decl): Make sure array types are laid out,
5789 even if the array bounds are unknown.
5791 2002-10-01 Steve Ellcey <sje@cup.hp.com>
5793 * class.c (build_vtbl_initializer): Change build_c_cast
5796 2002-10-01 Mark Mitchell <mark@codesourcery.com>
5798 * decl.c (cp_finish_decl): Make sure array types are laid out,
5799 even if the array bounds are unknown.
5801 * decl.c (cp_finish_decl): Correct check for dynamic
5802 initialization of thread-local storage.
5804 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
5806 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
5809 2002-09-30 Steve Ellcey <sje@cup.hp.com>
5811 * class.c (build_vtbl_initializer): Add cast.
5812 (add_vcall_offset_vtbl_entries_1):
5813 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
5815 2002-09-30 Mark Mitchell <mark@codesourcery.com>
5817 * class.c (walk_subobject_offsets): Correct the calculation of
5818 offsets for virtual bases. Correct the counting of array
5820 (layout_nonempty_base_or_field): Simplify. Correct the
5821 calculation of offsets to be propagated through the binfo
5823 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
5824 Add the FIELD_DECL to TYPE_FIELDS.
5825 (build_base_fields): Adjust accordingly.
5826 (layout_virtual_bases): Use build_base_field.
5827 (end_of_class): Return a tree, not an integer.
5828 (warn_about_ambiguous_direct_bases): Rename to ...
5829 (warn_about_ambiguous_bases): ... this.
5830 (include_empty_classes): New function.
5831 (layout_class_type): Create an alternative version of the type to
5832 be used when as a base class type. Do not call
5833 finish_record_layout until we are done laying out the class.
5834 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
5836 (CLASSTYPE_SIZE): Reimplement.
5837 (CLASSTYPE_SIZE_UNIT): Likewise.
5838 (CLASSTYPE_ALIGN): Likweise.
5839 (CLASSTYPE_USER_ALIGN): Likewise.
5840 (CLASSTYPE_AS_BASE): New macro.
5841 (DECL_INITIALIZED_P): Likewise.
5842 (extract_init): Remove prototype.
5843 (build_forced_zero_init): Rename to ...
5844 (build_zero_init): ... this.
5845 (force_store_init_value): Remove.
5846 * decl.c (obscure_complex_init): Remove.
5847 (duplicate_decls): Copy DECL_INITIALIZED_P.
5848 (check_initializer): Do not leave junk in DECL_INITIAL.
5849 (cp_finish_decl): Handle zero-initialization of entities with
5850 static storage duration.
5851 * expr.c (extract_init): Remove.
5852 * init.c (build_forced_zero_init): Remove.
5853 (build_zero_init): New function.
5854 (build_default_init): Use it.
5855 (build_field_list): Skip FIELD_DECLs for base subobjects.
5856 (push_base_cleanups): Likewise.
5857 * method.c (do_build_assign_ref): Likewise.
5858 (synthesize_exception_spec): Likewise.
5859 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
5860 (regenerate_decl_from_template): To not set DECL_INITIAL for a
5861 static data member whose initialization took place in its class.
5862 (instantiate_decl): Do not pass an initializer to cp_finish_decl
5864 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
5865 (dfs_unuse_fields): Likewise.
5866 * tree.c (pod_type_p): Handle error_mark_node.
5867 (zero_init_p): Likewise.
5868 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
5870 * typeck2.c (store_init_value): Remove #if 0'd code.
5871 (force_store_init_value): Remove.
5872 (process_init_constructor): Use build_zero_init.
5874 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
5877 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
5879 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
5881 * cp-tree.h: Fix comment typos.
5885 2002-09-25 Mark Mitchell <mark@codesourcery.com>
5887 * cp/class.c (contains_empty_class_p): New method.
5888 (walk_subobject_offsets): Correct computation of field offset.
5889 (layout_empty_base): Correct placement of emtpy base classes.
5890 (layout_class_type): Warn about ABI changes.
5892 2002-09-23 Mark Mitchell <mark@codesourcery.com>
5894 * cp/class.c (layout_virtual_bases): Do not round the size of the
5895 type to a multiple of the alignment before laying out virtual bases.
5896 (layout_class_type): Correct handling of bit-fields that are wider
5897 than their type inside unions. Round the size of the type to a
5898 even number of bytes when computing the size without virtual
5900 * cp/cp-tree.h (abi_version_at_least): New macro.
5902 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
5904 * ChangeLog: Follow spelling conventions.
5905 * ChangeLog.2: Likewise.
5907 * class.c: Likewise.
5908 * cp-tree.h: Likewise.
5911 * decl2.c: Likewise.
5912 * except.c: Likewise.
5913 * friend.c: Likewise.
5914 * g++spec.c: Likewise.
5917 * mangle.c: Likewise.
5918 * method.c: Likewise.
5919 * operators.def: Likewise.
5920 * optimize.c: Likewise.
5923 * search.c: Likewise.
5924 * semantics.c: Likewise.
5927 * typeck.c: Likewise.
5929 2002-09-18 Devang Patel <dpatel@apple.com>
5931 * cp/cp-tree.h: New prototype for walk_vtabls().
5932 * cp/decl.c (walk_vtables_r): New function.
5933 (struct cp_binding_level): Add new members, namespaces,
5934 names_size and vtables.
5935 (add_decl_to_level): Add decl in namespaces or vtables
5936 chain, if conditions match.
5937 (walk_vtables): New function.
5938 (walk_namespaces_r): Travers separate namespace chain
5939 for namespace decls.
5940 (wrapup_globals_for_namespace): Use names_size instead
5942 * cp/decl2.c (finish_file): Use walk_vtables() instead of
5943 walk_globals() to walk vtable decls.
5945 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
5947 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
5948 ICE with invalid pointers & references.
5950 2002-09-17 Zack Weinberg <zack@codesourcery.com>
5952 * Make-lang.in: Remove all references to the demangler.
5953 * cxxfilt.c: Moved to binutils.
5955 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5958 * pt.c (tsubst_decl): Remove assert.
5960 Remove DR 295 implementation.
5961 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
5962 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
5963 about ignoring volatile qualifiers.
5965 * search.c (lookup_member): Correct documentation.
5967 2002-09-16 Geoffrey Keating <geoffk@apple.com>
5969 * cp-tree.h (union lang_tree_node): Add chain_next option.
5971 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5973 * parse.y (parse_finish_call_expr): Check lookup_member result.
5976 * semantic.c (finish_asm_stmt): Fix operand/output_operands
5978 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
5980 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
5983 * call.c (build_over_call): Convert this pointer for fns found by
5986 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
5988 * ChangeLog: Follow spelling conventions.
5989 * ChangeLog.1: Likewise.
5991 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
5994 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
5996 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
5998 * error.c: Fix comment formatting.
5999 * except.c: Likewise.
6001 * friend.c: Likewise.
6002 * g++spec.c: Likewise.
6005 * mangle.c: Likewise.
6006 * method.c: Likewise.
6007 * optimize.c: Likewise.
6010 * search.c: Likewise.
6011 * semantics.c: Likewise.
6014 * typeck.c: Likewise.
6015 * typeck2.c: Likewise.
6017 2002-09-13 Matt Austern <austern@apple.com>
6020 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6021 * cp/call.c: Change call-by-const-reference mechanism to use
6022 non_cast_lvalue_p when deciding whether the create a temporary.
6023 We need a temporary when passing, e.g. (long) x by const ref.
6025 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
6027 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6029 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
6031 * decl.c: Fix comment formatting.
6032 * decl2.c: Likewise.
6034 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
6036 * call.c: Fix comment formatting.
6037 * class.c: Likewise.
6038 * cp-lang.c: Likewise.
6039 * cp-tree.h: Likewise.
6042 2002-09-11 Zack Weinberg <zack@codesourcery.com>
6044 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6045 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6046 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6047 minor adjustments (use version_string, eliminate yet another
6048 duplicate of xmalloc)
6050 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6052 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6054 2002-09-05 Jason Merrill <jason@redhat.com>
6056 * typeck2.c (add_exception_specifier): Only pedwarn for an
6058 (require_complete_eh_spec_types): New fn.
6059 (cxx_incomplete_type_diagnostic): Also support pedwarning.
6060 * typeck.c (complete_type_or_diagnostic): Likewise.
6061 * call.c (build_call): Call require_complete_eh_spec_types.
6062 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6063 on an incomplete type.
6065 2002-09-04 Jakub Jelinek <jakub@redhat.com>
6067 * decl.c (start_cleanup_fn): Clear interface_only before
6068 start_function, restore it afterwards.
6070 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
6072 * cp-tree.h (finish_builtin_type): Remove.
6073 * decl2.c (finish_builtin_type): Move to common code.
6074 * decl.c (build_ptrmemfunc_type): Adjust.
6075 * rtti.c (create_pseudo_type_info): Adjust.
6076 (create_tinfo_types): Adjust.
6078 2002-08-31 Jason Merrill <jason@redhat.com>
6080 * cp-lang.c (cp_expr_size): Allow initialization from a
6083 2002-08-30 Richard Henderson <rth@redhat.com>
6086 * tree.c: Include target.h.
6087 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6089 * Makefile.in (tree.o): Update.
6091 2002-08-27 Mark Mitchell <mark@codesourcery.com>
6093 * class.c (layout_virtual_bases): Warn about bugs in G++ that
6094 result in incorrect object layouts.
6095 (layout_class_type): Likewise.
6097 2002-08-24 Matt Austern <austern@apple.com>
6099 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6101 (real_lvalue_p): Update caller.
6103 (non_cast_lvalue_or_else): New.
6104 * tree.h: Declare it.
6105 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6107 2002-08-22 Mark Mitchell <mark@codesourcery.com>
6109 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6110 and COND_EXPR specially; fix error message output.
6112 2002-08-22 Jason Merrill <jason@redhat.com>
6114 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6115 * semantics.c (nullify_returns_r): Likewise.
6117 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
6120 * typeck.c (finish_class_member_access_expr): Diagnose cases where
6121 name lookup finds nothing.
6123 2002-08-15 Jason Merrill <jason@redhat.com>
6125 * semantics.c (finish_then_clause): Remove redundant assignment.
6126 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6127 extra binding level outside the if/switch statement.
6128 (finish_while_cond, finish_for_cond): Rewrite complex condition
6131 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
6133 * parse.y (sizeof, alignof, typeof): New non-terminals to
6134 increment skip_evaluation. Replace terminals with them and
6135 decrement skip_evaluation at the end of rules using them.
6136 * decl2.c (mark_used): Don't assemble_external if
6137 skipping evaluation.
6139 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
6142 * parse.y (parse_finish_call_expr): Handle incomplete
6143 type used to name a scope.
6145 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
6148 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6149 regression caused by my 2002-08-08 patch.
6151 2002-08-13 Mark Mitchell <mark@codesourcery.com>
6153 * decl.c (pushdecl_class_level): Honor requests to bind names to
6156 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6158 * decl2.c (build_call_from_tree): Fix uninitialized variable.
6159 * parse.y (parse_finish_call_expr): Likewise.
6160 * repo.c (old_args, old_dir, old_main): Const-ify.
6162 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
6164 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6165 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
6166 * optimize.c (maybe_clone_body): Likewise.
6167 * pt.c (tsubst_enum): Likewise.
6168 (lookup_template_class): Likewise.
6169 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
6171 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
6173 * lang-specs.h: Remove -ansi.
6175 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
6177 * tree.c (maybe_dummy_object): Replace // with /* */
6179 2002-08-09 Mark Mitchell <mark@codesourcery.com>
6181 * call.c (standard_conversion): Use build_ptrmem_type.
6182 * cp-tree.h (build_ptrmem_type): New function.
6183 (adjust_result_of_qualified_name_lookup): Likewise.
6184 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
6185 static data members.
6186 (build_ptrmem_type): New function.
6187 (grokdeclarator): Do not use build_offset_type when encountering a
6189 * parse.y (parse_finish_call_expr): Use
6190 adjust_result_of_qualified_name_lookup.
6191 * search.c (adjust_result_of_qualified_name_lookup): New function.
6192 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
6193 accessing OFFSET_TYPEs directly.
6195 2002-08-08 Mike Stump <mrs@apple.com>
6197 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
6198 (type_decays_to): Likewise.
6199 * class.c (find_final_overrider): Likewise.
6200 (maybe_note_name_used_in_class): Likewise.
6201 * decl.c (current_tmpl_spec_kind): Likewise.
6202 (add_binding): Likewise.
6203 (push_class_binding): Likewise.
6204 (duplicate_decls): Likewise.
6205 (layout_var_decl): Likewise.
6206 (grokfndecl): Likewise.
6207 (grokdeclarator): Likewise.
6208 (check_default_argument): Likewise.
6209 * decl2.c (handle_class_head): Likewise.
6210 * error.c (dump_template_decl): Likewise.
6211 * init.c (build_offset_ref): Likewise.
6212 * pt.c (check_specialization_scope): Likewise.
6213 (determine_specialization): Likewise.
6214 (check_explicit_specialization): Likewise.
6215 (maybe_check_template_type): Likewise.
6216 (process_partial_specialization): Likewise.
6217 (check_default_tmpl_args): Likewise.
6218 (push_template_decl_real): Likewise.
6219 (convert_template_argument): Likewise.
6220 (try_class_unification): Likewise.
6221 (get_bindings_real): Likewise.
6222 (do_decl_instantiation): Likewise.
6223 * semantics.c (begin_function_definition): Likewise.
6224 (finish_member_declaration): Likewise.
6225 (check_multiple_declarators): Likewise.
6226 * typeck.c (comp_array_types): Likewise.
6227 (comptypes): Likewise.
6228 (expr_sizeof): Likewise.
6229 (build_binary_op): Likewise.
6230 (dubious_conversion_warnings): Likewise.
6231 (check_return_expr): Likewise.
6233 2002-08-08 Mark Mitchell <mark@codesourcery.com>
6235 * typeck.c (build_class_member_access_expr): Do not return
6236 error_mark_node when no error has occurred.
6238 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6240 * typeck.c (build_component_addr): Remove.
6241 (build_unary_op): Just check it's not a bitfield, and then build
6244 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6246 * class.c (convert_to_base): Correct check for error_mark_node.
6247 (create_vtable_ptr): Remove unused VFUNS_P parm.
6249 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6251 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
6253 2002-08-07 Mark Mitchell <mark@codesourcery.com>
6255 Rework build_component_ref.
6256 * call.c (build_vfield_ref): Do not go through build_component_ref.
6257 (build_field_call): Use build_class_member_access_expr.
6258 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
6259 (build_object_call): Likewise.
6260 * class.c (convert_to_base): New function.
6261 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
6262 (instantiate_type): Handle BASELINKs.
6263 * cp-tree.def (BASELINK): New tree code.
6264 * cp-tree.h (BASELINK_P): Reimplement.
6265 (SET_BASELINK_P): Remove.
6266 (BASELINK_BINFO): Reimplement.
6267 (BASELINK_FUNCTIONS): Likewise.
6268 (BASELINK_ACCESS_BINFO): Likewise.
6269 (BASELINK_OPTYPE): Likewise.
6270 (convert_to_base): New function.
6272 (build_object_ref): Remove.
6273 (build_component_ref_1): Likewise.
6274 (build_component_ref): Likewise.
6275 (build_x_component_ref): Likewise.
6276 (build_class_member_access_expr): New function.
6277 (finish_class_member_access_expr): Likewise.
6278 (build_ptrmemfunc_access_expr): Likewise.
6279 * decl.c (grokdeclarator): Handle BASELINKs.
6280 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
6281 finish_class_member_access_expr.
6282 (arg_assoc): Handle BASELINKs.
6283 (do_class_using_decl): Likewise.
6284 * error.c (dump_decl): Likewise.
6285 (dump_expr): Use build_ptrmemfunc_access_expr.
6286 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
6288 (build_throw): Use BASELINK_FUNCTIONS.
6289 * init.c (perform_member_init): Use
6290 build_class_member_access_expr.
6291 (build_offset_ref): Handle BASELINKs. Use
6292 build_class_member_access_expr.
6293 * method.c (hack_identifier): Likewise.
6294 * parse.y (do_id): Use BASELINK, not TREE_LIST.
6295 (primary): Remove uses of build_object_ref.
6296 * pt.c (lookup_template_function): Handle BASELINKs.
6297 (resolve_overloaded_unification): Likewise.
6298 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
6299 (lookup_field): Use BASELINK, not TREE_LIST.
6300 (lookup_fnfiels): Likewise.
6301 (setup_class_bindings): Likewise.
6302 * semantics.c (finish_object_call_expr): Do not use
6303 build_method_call when we already know what function is being
6305 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
6306 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
6308 (name_p): New function.
6309 * typeck.c (build_object_ref): Remove.
6310 (build_component_ref_1): Likewise.
6311 (build_x_component_ref): Likewise.
6312 (build_class_member_access_expr): New function.
6313 (finish_class_member_access_expr): Likewise.
6314 (build_ptrmemfunc_access_expr): Likewise.
6315 (get_member_function_from_ptrfunc): Use
6316 build_ptrmemfunc_access_expr.
6317 (build_binary_op): Likewise.
6318 (build_unary_op): Likewise.
6319 (build_ptrmemfunc): Likewise.
6320 (pfn_from_ptrmemfunc): Likewise.
6321 * typeck2.c (build_m_component_ref): Adjust comment.
6323 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
6325 * Make-lang.in (CXX_C_OBJS): Update.
6326 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
6327 * cp-tree.h (cxx_decode_option): Remove.
6328 * decl2.c (compare_options, lang_f_options, unsupported_options,
6329 cxx_decode_option): Remove.
6331 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
6333 * typeck.c (build_x_unary_op): Handle pointer-to-member.
6335 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
6337 * class.c: Don't include obstack.h.
6339 * decl2.c: Delete bogus comment.
6340 * error.c: Don't include obstack.h.
6341 * except.c: Likewise.
6342 (dump_type): Correct comment.
6343 * method.c: Don't include obstack.h.
6346 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
6349 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
6350 expressions to pointer-to-data-member of pointer-to-member-functions.
6352 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
6354 * cvt.c (ocp_convert): Delete obsolete code.
6355 * parse.y (permanent_obstack): Delete declaration.
6356 * pt.c (permanent_obstack): Delete declaration.
6357 * repo.c (permanent_obstack): Delete declaration.
6358 (open_repo_file): Use xmalloc instead of permanent_obstack.
6359 (init_repo): Use xstrdup instead of permanent_obstack.
6361 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
6363 * cp-tree.h (VF_DERIVED_VALUE): Remove.
6364 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
6366 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
6369 C++ ABI change - vfunc ordering.
6370 * class.c (add_virtual_function): Remove.
6371 (dfs_modify_all_vtables): Take list of all declared
6372 virtuals. Assign all that are not in primary base.
6373 (check_for_override): Adjust comments.
6374 (create_vtable_ptr): Take single list of virtuals. Build chain
6375 of declared virtuals here.
6376 (layout_class_type): Take single list of virtuals. Adjust.
6377 (finish_struct_1): Keep virtuals on single list. Adjust.
6379 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6381 * init.c (build_member_call): Use build_new_method_call, not
6384 2002-08-02 Krister Walfridsson <cato@df.lth.se>
6386 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
6388 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6390 * call.c (build_method_call): Issue a more helpful error message
6391 about ambiguous method names.
6393 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
6395 * tree.c (build_shared_int_cst): Make cache file scope, and
6398 2002-08-02 Jason Merrill <jason@redhat.com>
6400 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6401 (cp_expr_size): New fn.
6402 * call.c (build_over_call): Lose empty class hackery.
6403 (convert_arg_to_ellipsis): Promote non-POD warning to error.
6404 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6406 * semantics.c (expand_body): Do tree optimization in the function
6409 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
6411 * cp-tree.h: Move all warning and flag declarations to c-common.h.
6412 * decl.c: Move all warning and flag variables to c-common.c.
6413 * decl2.c: Move all warning and flag variables to c-common.c.
6414 * lex.c (flag_digraphs): Remove.
6415 (warn_traditional): Now in c-common.c.
6417 2002-07-31 Mark Mitchell <mark@codesourcery.com>
6419 * call.c (build_field_call): Do not look up the field by name.
6420 (build_method_call): Simplify.
6421 (struct z_candidate): Add access_path and conversion_path. Remove
6423 (convert_class_to_reference): Adjust use of
6424 add_function_candidate.
6425 (add_candidate): Add conversion_path argument.
6426 (add_function_candidate): Use it.
6427 (add_conv_dndidate): Likewise.
6428 (build_builtin_candidate): Likewise.
6429 (add_template_candidate_real): Add conversion_path argument.
6430 (add_template_conv_candidate): Likewise.
6431 (add_template_candidate): Likewise.
6432 (build_user_type_conversion_1): Use it.
6433 (build_new_function_call): Remove name lookup code. Adjust use of
6434 add_template_candidate and add_function_candidate.
6435 (build_new_op): Likewise.
6436 (convert_like_real): Use build_special_member_call.
6437 (build_over_call): Use cand->conversion_path.
6438 (build_special_member_call): New method.
6439 (build_new_method_call): Remove name lookup code.
6440 * cp-tree.def (OFFSET_REF): Update documentation.
6441 (TEMPLATE_ID_EXPR): Likewise.
6442 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6443 (BASELINK_OPTYPE): Likewise.
6444 (build_new_method_call): Adjust prototype.
6445 (build_special_member_call): New method.
6446 (build_baselink): New method.
6447 (build_offset_ref_call_from_tree): Likewise.
6448 (build_call_from_tree): Likewise.
6449 (finish_qualified_call_expr): Remove.
6450 (finish_call_expr): Adjust prototype.
6451 (build_x_function_call): Remove.
6452 * cvt.c (ocp_convert): Use build_special_member_call.
6453 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6454 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6456 (build_offset_ref_call_from_tree): New function.
6457 (build_call_from_tree): Likewise.
6458 * init.c (expand_cleanup): Use build_special_member_call.
6459 (expand_default_init): Likewise.
6460 (build_member_call): Use finish_call_expr.
6461 (build_new_1): Use build_special_member_call.
6462 (push_base_cleanups): Likewise.
6463 * method.c (do_build_assign_ref): Likewise.
6464 * parse.y (template_id): Do not pass a COMPONENT_REF to
6465 lookup_template_function.
6466 (primary): Use parse_finish_call_epxr, not finish_call_expr.
6467 (parse_finish_call_expr): New function.
6468 * pt.c (lookup_template_function): Add assertions.
6469 * search.c (lookup_base): Allow T to be a binfo.
6470 (build_baselink): New function.
6471 (lookup_member): Use it.
6472 * semantics.c (finish_call_expr): Do not do name lookup.
6473 (finish_object_call_expr): Remove #if 0'd code.
6474 (finish_qualified_call_expr): Remove.
6475 * typeck.c (build_x_function_call): Remove.
6476 (build_static_case): Use build_special_member_call.
6477 * typeck2.c (build_functional_cast): Likewise.
6479 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
6481 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6483 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
6485 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6487 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
6489 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6492 2002-07-29 Alan Modra <amodra@bigpond.net.au>
6494 * cp-tree.h: Comment typo fix.
6496 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
6498 * spew.c (space_for_token): Allocate zeroed memory for a new token
6501 2002-07-27 Roger Sayle <roger@eyesopen.com>
6503 * decl.c (builtin_function_1): No need to explicitly mark
6504 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6506 2002-07-27 Roger Sayle <roger@eyesopen.com>
6508 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6510 2002-07-26 Jason Merrill <jason@redhat.com>
6512 * call.c (build_over_call): Likewise.
6513 (cp_convert_parm_for_inlining): New fn.
6514 (convert_for_arg_passing): New fn.
6515 (convert_default_arg, build_over_call): Use it.
6516 (type_passed_as): New fn.
6517 * pt.c (tsubst_decl): Use it.
6518 * decl2.c (cp_build_parm_decl): New fn.
6519 (build_artificial_parm): Use it.
6520 (start_static_storage_duration_function): Likewise.
6521 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6522 (grokparms): Don't mess with DECL_ARG_TYPE.
6523 * typeck.c (convert_arguments): Use convert_for_arg_passing.
6524 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6526 * cp-tree.h: Declare new fns.
6528 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
6530 * cp-tree.h (flag_operator_names): Remove.
6531 * decl2.c (flag_operator_names): Remove.
6532 (lang_f_options): Remove operator-names.
6533 * lex.c (D_OPNAME): Remove.
6534 (reswords): Remove operator names.
6535 (rid_to_yy): Remove operator names.
6536 (init_reswords): No need to handle D_OPNAME.
6537 * spew.c (read_process_identifier): There are no operator
6540 2002-07-26 Jason Merrill <jason@redhat.com>
6542 * dump.c (cp_dump_tree): Call c_dump_tree.
6543 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6545 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6547 * error.c (print_whitespace): Remove.
6548 * g++spec.c (LIBUNWIND): Move.
6549 * mangle.c (mangled_position, write_signed_number): Remove.
6551 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6553 * decl2.c (cxx_decode_option): Similarly.
6555 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
6557 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6558 (cxx_sizeof_or_alignof_type): Take a third argument.
6559 (cxx_sizeof): Adjust definition.
6560 (cxx_alignof): Likewise.
6561 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6562 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6564 (c_sizeof_nowarn): Remove definition.
6565 (build_unary_op): Use cxx_sizeof_nowarn.
6567 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
6569 * tree.c (cp_build_qualified_type_real): When copying
6570 pointer-to-method types, unshare the record that holds
6571 the cached pointer-to-member-function type.
6573 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6575 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6577 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
6580 * typeck.c (cxx_sizeof_or_alignof_type): New function.
6581 (c_sizeof): Remove definition.
6582 (expr_sizeof): Use cxx_sizeof.
6583 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
6584 * decl.c (finish_destructor_body): Use cxx_sizeof.
6585 * semantics.c (finish_alignof): Likewise.
6586 (finish_alignof): Use cxx_alignof.
6587 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
6588 (cxx_sizeof_or_alignof_type): Declare.
6589 (my_friendly_assert): Move to ../c-common.h.
6591 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6593 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
6595 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6597 PR c++/7347, c++/7348
6598 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
6599 * decl.c (make_typename_type): Use it.
6600 (make_unbound_class_template): Likewise.
6601 (lookup_name_real): Don't call type_access_control if scope is
6602 template parameter dependent.
6603 * parse.y (template_arg): Call make_unbound_class_template with
6605 (nest_name_specifier): Call make_typename_type with tf_parsing set.
6606 (typename_sub0): Likewise.
6607 (typename_sub1): Likewise.
6608 (instantiate_decl): Push class scope.
6609 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
6610 for both static variable and member function template.
6611 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
6613 * search.c (type_access_control): Do type access for TEMPLATE_DECL
6616 2002-07-20 Roger Sayle <roger@eyesopen.com>
6618 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
6619 test by using positive_option. Make whitespace consistent.
6621 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
6623 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
6624 members with 'locus'. Adjust use throughout.
6625 (struct feed): Likewise.
6626 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
6628 (snarf_defarg): Use error(), not error_with_file_and_line().
6630 2002-07-19 Chris Demetriou <cgd@broadcom.com>
6632 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
6633 cpp_options is included.
6635 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6637 PR c++/2862, c++/2863
6638 * pt.c (determine_specialization): Compare the length of
6639 TYPE_ARG_TYPES. Tidy.
6641 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6644 * decl.c (duplicate_decls): Don't propagate inlining parameters from
6645 olddecl to newdecl when newdecl is a specialization of the
6646 instantiation olddecl.
6648 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6650 PR c++/4802, c++/5387
6651 * decl.c (make_typename_type): Use enforce_access.
6653 2002-07-17 Scott Snyder <snyder@fnal.gov>
6656 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6658 2002-07-12 Mark Mitchell <mark@codesourcery.com>
6660 * class.c (add_method): Correct handling of conversion operators.
6662 2002-07-11 Mark Mitchell <mark@codesourcery.com>
6665 * class.c (add_method): Simplify.
6667 2002-07-11 Jason Merrill <jason@redhat.com>
6670 * tree.c (cp_copy_res_decl_for_inlining): Also copy
6673 2002-07-10 Graham Stott <graham.stott@btinternet.com>
6675 * pt.c (template_parm_this_level_p, push_template_decl_real):
6676 Pass depth as int pointer.
6678 2002-07-11 Tim Josling <tej@melbpc.org.au>
6680 Remove front end hard coding from gengtype.c.
6682 * config-lang.in (gtfiles): Add files needed for this front end.
6684 2002-07-10 Mark Mitchell <mark@codesourcery.com>
6686 * cp-tree.h (unqualified_name_lookup_error): Declare it.
6687 (begin_function_definition): Adjust prototype.
6688 * lex.c (unqualified_name_lookup_error): New function, split out
6690 (do_identifier): ... here.
6691 * parse.y (parse_begin_function_definition): New function.
6693 * semantics.c (begin_function_definition): Accept decl-specifiers
6694 and attributes as separate parameters.
6696 2002-07-10 Jason Merrill <jason@redhat.com>
6699 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6700 modifying the old one.
6702 2002-07-09 Mark Mitchell <mark@codesourcery.com>
6704 * cp-tree.h (constructor_name_p): Declare it.
6705 (check_template_template_default_arg): Likewise.
6706 * class.c (handle_using_decl): Use constructor_name_p.
6707 * decl.c (grokdeclarator): Likewise.
6708 * decl2.c (constructor_name_p): Define it.
6709 * init.c (build_member_call): Use constructor_name_p.
6710 * parse.y (template_parm): Use check_template_template_default_arg.
6711 * pt.c (check_explicit_specialization): Use constructor_name_p.
6712 * semantics.c (check_template_template_default_arg): New function.
6714 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6716 * pt.c (can_complete_type_without_circularity): Add static to
6717 function definition.
6719 2002-07-08 Mark Mitchell <mark@codesourcery.com>
6721 * cp-tree.h (have_extern_spec): Declare it
6722 * decl.c (have_extern_spec): Define it.
6723 (start_decl): Eliminate use of used_extern_spec.
6724 (start_function): Likewise.
6725 * parse.y (have_extern_spec): Remove declaration.
6726 (used_extern_spec): Likewise.
6727 (frob_specs): Eliminate use of used_extern_spec.
6728 (.hush_warning): Likewise.
6730 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6732 * Make-lang.in (cp/parse.o): Depend on decl.h.
6733 * cp-tree.h (do_decl_instantiation): Change prototype.
6734 * parse.y: Include decl.h.
6735 (parse_decl_instantiation): New function.
6736 (explicit_instantiation): Use it.
6737 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6740 2002-07-07 Roger Sayle <roger@eyesopen.com>
6742 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6743 constructor and destructor tests when passed a TEMPLATE_DECL.
6745 2002-07-05 Jason Merrill <jason@redhat.com>
6747 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6750 PR optimization/7145
6751 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6753 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
6755 Repair damage on weak-impared targets caused by my previous patch.
6756 * cp-tree.h (import_export_tinfo): Add parameter.
6757 * decl2.c (import_export_tinfo): Add parameter, post adjust
6759 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6760 import_export_tinfo.
6762 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6765 * init.c (build_aggr_init): Remove qualifiers of init before calling
6767 (build_vec_init): Flatten multi-dimensional array during cleanup.
6768 (build_vec_delete_1): Abort if the type of each element is array.
6770 2002-07-03 Graham Stott <graham.stott@btinternet.com>
6772 * pt.c (instantiate_class_template): Fix typo.
6774 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6776 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6777 by CVS conflict in my last patch.
6779 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6782 * pt.c (can_complete_type_without_circularity): New function.
6783 (instantiate_class_template): Use it.
6784 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6785 message due to incomplete fields.
6787 2002-07-01 Mark Mitchell <mark@codesourcery.com>
6790 * mangle.c (write_expression): Add mangling for sizeof when
6792 * operators.def: Remove stale comment.
6794 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
6796 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
6797 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
6798 (tinfo_decl_type): Replace with ...
6799 (type_info_ptr_type): ... this.
6800 (import_export_tinfo): Declare.
6801 (tinfo_decl_p): Rename to ...
6802 (unemitted_tinfo_decl_p): ... this.
6803 * decl2.c (import_export_decl): Break out tinfo handling into ...
6804 (import_export_tinfo): ... here. New function.
6805 (finish_file): Adjust.
6806 * rtti.c (TINFO_REAL_NAME): New macro.
6807 (init_rtti_processing): Create the tinfo types.
6808 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
6809 (get_tinfo_decl): Adjust.
6810 (get_tinfo_ptr): New function.
6811 (get_type_id): Use it.
6812 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
6813 (ptr_initializer): Use get_tinfo_ptr.
6814 (ptm_initializer): Likewise.
6815 (synthesize_tinfo_var): Break into ...
6816 (get_pseudo_ti_init): ... this. Just create the initializer.
6817 (get_pseudo_ti_desc): .. and this.
6818 (create_real_tinfo_var): Remove.
6819 (create_pseudo_type_info): Don't create the vtable decl here.
6820 (get_vmi_pseudo_type_info): Remove.
6821 (create_tinfo_types): Adjust.
6822 (tinfo_decl_p): Rename to ...
6823 (unemitted_tinfo_decl_p): ... here. Adjust.
6824 (emit_tinfo_decl): Adjust. Create the initializer.
6826 2002-06-27 Mark Mitchell <mark@codesourcery.com>
6829 * pt.c (tsubst_friend_class): Substitute into the context of the
6830 friend before using it.
6832 2002-06-26 Mark Mitchell <mark@codesourcery.com>
6834 * cp-tree.h (xref_tag): Change prototype.
6835 (handle_class_head): Likewise.
6836 (build_x_component_ref): Likewise.
6837 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
6838 (xref_tag): Take attributes as a separate parameter.
6839 (xref_tag_from_type): Adjust call to xref_tag.
6840 * decl2.c (build_expr_from_tree): Adjust call to
6841 build_x_component_ref.
6842 (handle_class_head): Take attributes as a separate parameter.
6843 * parse.y (parse_xref_tag): New function.
6844 (parse_handle_class_head): Likewise.
6845 (primary): Use parse_xref_tag.
6846 (class_head_decl): Use parse_handle_class_head.
6847 (class_head_defn): Likewise.
6848 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
6849 (build_dynamic_cast_1): Likewise.
6850 (create_pseudo_type_info): Likewise.
6851 (emit_support_tinfos): Likewise.
6852 * typeck.c (build_object_ref): Adjust call to
6853 build_x_component_ref.
6854 (build_x_component_ref): Remove protect parameter.
6856 2002-06-25 Mark Mitchell <mark@codesourcery.com>
6858 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
6859 * class.c (handle_using_decl): Likewise.
6860 (instantiate_type): Likewise.
6861 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
6862 (xref_basetypes): Change prototype.
6863 (begin_mem_initializers): New function.
6864 (get_overloaded_fn): Likewise.
6865 * decl.c (xref_basetypes): Simplify.
6866 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
6867 * init.c (build_offset_ref): Likewise.
6868 * parse.y (base_init): Use begin_mem_initializers().
6869 (structsp): Adjust call to xref_basetypes.
6870 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
6871 (instantiate_class_template): Adjust call to xref_basetypes.
6872 * semantics.c (begin_mem_initializers): New function.
6873 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
6874 (really_overlaoded_fn): Likewise.
6875 (get_overloaded_fn): New function.'
6876 (get_first_fn): USe BASELINK_FUNCTIONS.
6878 2002-06-24 Mark Mitchell <mark@codesourcery.com>
6880 * cp-tree.h (SCALAR_TYPE_P): New macro.
6881 (check_for_out_of_scope_variable): New function.
6882 (at_class_scope_p): Likewise.
6883 (finish_fname): Likewise.
6884 * class.c (finish_struct): Use at_function_scope_p.
6885 * decl.c (check_for_out_of_scope_variable): New function, split
6886 out from do_identifier.
6887 (finish_enum): Use at_function_scope_p.
6888 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
6889 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
6890 (primary): Use at_function_scope_p.
6891 * search.c (at_class_scope_p): New function.
6892 * semantics.c (finish_fname): Likewise.
6893 (check_multiple_declarators): Use at_function_scope_p.
6895 2002-06-23 Mark Mitchell <mark@codesourcery.com>
6897 * parse.y (parse_scoped_id): New function.
6899 * cp-tree.h (do_scoped_id): Adjust declaration.
6900 * lex.c (do_scoped_id): Remove call to yylex.
6901 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
6902 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
6903 expanding it inline.
6905 2002-06-23 Matt Thomas <matt@3am-software.com>
6907 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
6910 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6912 * mangle.c (integer_type_codes): Const-ify.
6914 2002-06-20 Richard Henderson <rth@redhat.com>
6917 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
6918 Call put_var_into_stack.
6920 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6922 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
6923 array size calculation.
6925 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6928 * pt.c (tsubst_expr): Handle FILE_STMT.
6930 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6933 * pt.c (lookup_template_class): Don't build complete argument of
6934 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
6937 2002-06-19 Akim Demaille <akim@epita.fr>
6939 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
6941 * spew.c, lex.c: Adjust.
6942 * parse.y (explicit_instantiation): Add empty action to override
6943 the default $$ = $1 where it introduces a type clash.
6945 2002-06-14 Jason Merrill <jason@redhat.com>
6947 * semantics.c (begin_for_stmt): Push the 'for' scope before
6948 adding the FOR_STMT.
6951 * class.c (build_base_field): Set DECL_PACKED.
6952 (layout_class_type): Don't use tail padding of PODs.
6953 * mangle.c (write_unqualified_name): Fix template conversion op
6956 2002-06-16 Richard Henderson <rth@redhat.com>
6959 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
6960 after template instantiation.
6962 2002-06-16 Richard Henderson <rth@redhat.com>
6964 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
6966 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
6968 * cp-tree.h (compiler_error): Remove declaration.
6969 * lex.c (compiler_error): Remove definition.
6971 2002-06-14 Steve Ellcey <sje@cup.hp.com>
6973 * g++spec.c (LIBUNWIND): New.
6974 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
6976 2002-06-13 Jessica Han <jessica@cup.hp.com>
6978 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
6979 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
6980 (build_vbase_offset_vtbl_entries): Likewise.
6981 * rtti.c (build_headof): Likewise.
6982 (get_tinfo_decl_dynamic): Likewise.
6983 (create_pseudo_type_info): Likewise.
6985 2002-06-12 Stan Shebs <shebs@apple.com>
6987 * mpw-config.in: Remove file, no longer used.
6988 * mpw-make.sed: Ditto.
6990 2002-06-07 Zack Weinberg <zack@codesourcery.com>
6992 * decl2.c: Update call to cpp_handle_option.
6994 2002-06-07 H.J. Lu (hjl@gnu.org)
6996 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
6998 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7000 * error.c (cp_error_at): Fix typo.
7002 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
7004 * error.c (cp_diagnostic_starter): Adjust call.
7005 (maybe_print_instantiation_context): Change prototype to take a
7006 'diagnostic_info *'.
7007 (print_instantiation_full_context): Likewise.
7008 (print_instantiation_partial_context): Likewise.
7009 (cp_diagnostic_starter): Likewise.
7010 (cp_diagnostic_finalizer): Likewise.
7011 (cp_print_error_function): Likewise.
7012 (cp_printer): Take a secondary parameter as a 'text_info *'.
7013 Remove output_state savings. Adjust calls.
7015 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7017 * pt.c (inline_parm_levels): Mark for GC.
7019 * mangle.c (start_mangling): Allocate G.substitutions here...
7020 (init_mangle): ... rather than here.
7021 (finish_mangling): Clear the varray pointer when done with it.
7022 * spew.c (yylexstring): Don't use VARRAY_FREE.
7023 * search.c (bfs_walk): Don't use VARRAY_FREE.
7024 * decl2.c (pending_statics): Use gengtype to mark.
7025 (deferred_fns): Likewise.
7026 (ssdf_decls): Likewise.
7027 (init_decl2): Delete.
7028 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7029 (cxx_init_decl_processing): Don't call init_decl2.
7030 (cxx_pop_function_context): Don't use VARRAY_FREE.
7031 * cp-tree.h (struct saved_scope): No need for special marking
7033 (struct language_function): Likewise.
7034 (local_classes): Use gengtype to mark.
7035 (init_decl2): Delete prototype.
7036 * class.c (init_class_processing): Don't use
7037 ggc_add_tree_varray_root.
7038 (build_vtbl_initializer): Don't use VARRAY_FREE.
7040 * decl.c (typename_compare): Don't use same_type_p.
7042 * decl.c: Include hashtab.h instead of hash.h.
7043 (typename_hash): Update to use htab_h.
7044 (typename_compare): Likewise.
7045 (typename_htab): Use gengtype to mark.
7046 (build_typename_type): Update to use htab_h.
7047 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7049 * Make-lang.in (gt-cp-tree.h): New rule.
7050 (cp/tree.o): Depend on gt-cp-tree.h.
7051 * config-lang.in (gtfiles): Add cp/tree.c.
7052 * tree.c: Include gt-cp-tree.h.
7053 (list_hash_table): Use gengtype to mark.
7054 (init_tree): Use gengtype to mark trees.
7056 * Make-lang.in (cp/decl.o): Add debug.h dependency.
7057 * call.c (struct z_candidate): Use gengtype.
7058 (USER_CONV_CAND): Use WRAPPER_ZC.
7059 (convert_class_to_reference): Use build_zc_wrapper.
7060 (build_type_conversion_1): Likewise.
7061 (build_over_call): Use WRAPPER_ZC.
7062 (add_warning): Use build_zc_wrapper.
7063 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7064 * cp-tree.h (struct lang_identifier): Use gengtype.
7065 (struct template_parm_index_s): Likewise.
7066 (struct ptrmem_cst): Likewise.
7067 (struct tree_binding): Likewise.
7068 (struct tree_overload): Likewise.
7069 (struct tree_srcloc): Likewise.
7070 (struct tree_wrapper): Likewise. Also modify to have a pointer
7071 to struct z_candidate rather than void.
7072 (enum cp_tree_node_structure_enum): New.
7073 (union lang_tree_node): New.
7074 (cxx_mark_tree): Delete prototype.
7075 (cp_tree_node_structure): New prototype.
7076 (build_ptr_wrapper): Delete prototype.
7077 (build_int_wrapper): Delete prototype.
7078 (build_zc_wrapper): New prototype.
7079 * decl.c: Include debug.h
7080 (cxx_mark_tree): Delete.
7081 (cp_tree_node_structure): New.
7082 * tree.c (build_ptr_wrapper): Delete.
7083 (build_int_wrapper): Delete.
7084 (build_zc_wrapper): New.
7086 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7087 Correct typo. Patch from k_fukui@highway.ne.jp.
7089 * semantics.c (current_stmt_tree): Update for change to
7090 struct language_function.
7091 (finish_mem_initializers): Likewise.
7092 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7093 * cp-tree.h (struct language_function): Rename from
7094 cp_language_function. Change all uses.
7095 (cp_function_chain): Don't need to cast.
7097 * class.c (duplicate_tag_error): Reset discriminator.
7098 (check_bases_and_members): Update for data structure changes.
7099 * cp-tree.h (struct lang_id2): Use gengtype.
7100 (flagged_type_tree): Likewise.
7101 (SET_LANG_ID): Use GGC on struct lang_id2.
7102 (struct cp_language_function): Use gengtype. Remove field
7103 'x_vcalls_possible_p'.
7104 (current_vcalls_possible_p): Delete.
7105 (struct lang_type_header): New.
7106 (struct lang_type_class): Rename from struct lang_type. Include
7107 struct lang_type_header.
7108 (struct lang_type_ptrmem): New.
7109 (struct lang_type): New.
7110 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
7111 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
7112 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7113 (struct lang_decl_flags): Use gengtype. Add discriminators.
7114 (struct lang_decl): Use gengtype. Add and use discriminators.
7115 Update the macros that reference moved fields.
7116 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
7117 (SET_DECL_THUNK_P): Set discriminator too.
7118 (clear_inline_text_obstack): Delete prototype.
7119 (finish_inline_definitions): Delete prototype.
7120 (mark_pending_inlines): Delete prototype.
7121 (lang_check_failed): New prototype.
7122 * decl.c (struct named_label_use_list): Use gengtype.
7123 (struct named_label_list): Likewise.
7124 (mark_binding_level): Delete.
7125 (mark_named_label_lists): Delete.
7126 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7127 (cxx_init_decl_processing): Use generated marker routine.
7128 (begin_destructor_body): Delete dead set to
7129 current_vcalls_possible_p.
7130 (mark_lang_function): Delete.
7131 (mark_cp_function_context): Delete.
7132 (lang_mark_tree): Use generated marker routines.
7133 * decl2.c (start_objects): Set discriminator when setting
7134 GLOBAL_INIT_PRIORITY.
7135 * lex.c (retrofit_lang_decl): Set discriminators.
7136 (copy_lang_type): Update for changes to lang_type structure.
7137 (cp_make_lang_type): Set discriminator.
7138 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
7139 * search.c: Include ggc.h.
7140 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7141 (finish_inline_definitions): Delete.
7142 * spew.c (struct token): Use gengtype.
7143 (struct token_chunk): New.
7144 (struct unparsed_text): Use gengtype. Store tokens in chunks.
7145 (struct feed): Use gengtype.
7146 (feed_obstack): Delete.
7147 (feed): Mark as GC root.
7148 (pending_inlines): Mark as GC root.
7149 (pending_inlines_tail): Likewise.
7150 (processing_these_inlines): Likewise.
7151 (token_obstack): Make static.
7152 (first_token): Likewise.
7153 (init_spew): Don't initialize deleted things; use gengtype for roots.
7154 (clear_inline_text_obstack): Delete.
7155 (feed_input): Use GC for struct feed. Update for changes to
7156 struct unparsed_text.
7157 (mark_pending_inlines): Delete.
7158 (next_token): Rename from add_token. Change all callers. Update
7159 for changes to struct unparsed_text.
7160 (space_for_token): New.
7161 (remove_last_token): New.
7162 (alloc_unparsed_text): New.
7163 (snarf_block): Take an unparsed_text. Update for changes to struct
7165 (snarf_method): Update for changes to struct unparsed_text.
7166 (snarf_defarg): Update for changes to struct unparsed_text.
7167 * tree.c (lang_check_failed): New.
7169 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
7170 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
7171 (cp/spew.o): Add dependency on gt-<filename>.h.
7172 (cp/decl2.o): Add dependency on gt-<filename>.h.
7173 (cp/call.o): Add dependency on gt-<filename>.h.
7174 (cp/pt.o): Add dependency on gt-<filename>.h.
7175 (cp/repo.o): Add dependency on gt-<filename>.h.
7176 (cp/parse.o): Add dependency on gt-<filename>.h.
7177 * call.c: Use gengtype for roots.
7178 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
7179 decl2.c parse.y pt.c repo.c spew.c.
7180 * cp-tree.h: Use gengtype for roots.
7181 (struct saved_scope): Use GGC, gengtype.
7182 (cp_parse_init): Delete prototype.
7183 (init_pt): Delete prototype.
7184 * decl.c: Use gengtype for roots.
7185 (mark_saved_scope): Delete.
7186 (cxx_init_decl_processing): Don't call deleted initilisation
7188 (signed_size_zero_node): Delete, unused.
7189 * decl.h: Use gengtype for roots.
7190 * decl2.c: Use gengtype for roots.
7191 * lex.h: Use gengtype for roots.
7192 * parse.y: Use gengtype for roots.
7193 (cp_parse_init): Delete.
7194 * pt.c: Use gengtype for roots.
7196 * repo.c: Use gengtype for roots.
7197 * spew.c: Use gengtype for roots.
7199 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
7200 (cp/decl.o): Add dependency on gtype-cp.h.
7201 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
7202 Include gtype-cp.h. Allow for filename changes.
7204 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
7205 (cp/decl.o): Add cp/gt-decl.h dependency.
7206 * config-lang.in (gtfiles): New.
7207 * tree.h: Rename struct binding_level to struct cp_binding_level.
7208 * decl.c: Rename struct binding_level to struct cp_binding_level.
7209 Include cp/gt-decl.h.
7210 (struct cp_binding_level): Use gengtype.
7211 (make_binding_level): Use GGC on struct cp_binding_level.
7212 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
7213 (cxx_init_decl_processing): Mark free_binding_level as
7216 * decl.c (mark_cp_function_context): Update calling sequence.
7218 * decl.c (start_function): Don't free 'struct
7219 cp_language_function'.
7220 (pop_cp_function_context): Likewise.
7221 (save_function_data): Allocate it using GC.
7222 * semantics.c (genrtl_start_function): Don't free 'struct
7223 cp_language_function'.
7225 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
7227 * lang-specs.h: Use cpp_debug_options.
7229 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7231 * mangle.c, tree.c: Include real.h.
7232 * Make-lang.in: Update dependency lists.
7234 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
7236 * lex.c: Don't include c-lex.h.
7237 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
7239 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
7241 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
7243 2002-05-22 Richard Henderson <rth@redhat.com>
7245 * decl.c (obscure_complex_init): Check for VAR_DECL
7246 before using DECL_THREAD_LOCAL.
7248 2002-05-22 Richard Henderson <rth@redhat.com>
7250 * decl.c (check_tag_decl): Handle RID_THREAD.
7251 (obscure_complex_init): Reject run-time init of tls.
7252 (grokvardecl, grokdeclarator): Handle RID_THREAD.
7253 * lex.c (reswords): Add __thread.
7254 (rid_to_yy): Map RID_THREAD to SCSPEC.
7256 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
7258 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
7259 * cp-tree.h (cxx_post_options): Kill.
7260 * cp-lex.c (cxx_post_options): Kill.
7262 2002-05-21 Richard Henderson <rth@redhat.com>
7264 * lex.c (rid_to_yy): Add RID_THREAD.
7266 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
7268 * init.c (build_vec_init): Test for trivial copy-assignment when
7269 copy-assigning arrays.
7271 2002-05-20 Andreas Jaeger <aj@suse.de>
7273 * init.c (build_default_init): Remove unused variable.
7275 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
7277 * call.c (any_strictly_viable): New.
7278 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
7280 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7282 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
7284 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7287 * pt.c (do_decl_instantiation): Don't complain explicit
7288 instantiation after explicit specialization.
7289 (do_type_instantiation): Likewise.
7291 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
7293 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
7295 (complete_type_or_else): ... this. Redefined as macro.
7296 (cxx_incomplete_type_diagnostic): Declare.
7297 (cxx_incomplete_type_error): Define as macro.
7298 * init.c (build_delete): Warn about incomplete types other than
7299 void, and use the built-in operator delete for them.
7300 * typeck.c (complete_type_or_diagnostic): Renamed from
7301 complete_type_or_else. Added warn_only argument, passed to...
7302 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
7303 warnings or errors depending on new warn_only argument. Renamed
7305 (cxx_incomplete_type_error): ... this. New implementation in
7306 terms of cxx_incomplete_type_diagnostic.
7308 2002-05-18 Jason Merrill <jason@redhat.com>
7311 * decl2.c (import_export_decl): If we clear
7312 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
7314 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7317 * pt.c (verify_class_unification): Don't check if PARM is template
7318 parameter dependent. Simplify.
7319 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
7320 parameter dependent expression.
7322 2002-05-14 Jason Merrill <jason@redhat.com>
7324 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
7326 (synthesize_tinfo_var): Take the public decl.
7327 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
7328 (emit_tinfo_decl): Adjust. Call import_export_decl.
7329 * decl2.c (import_export_decl): Simplify tinfo decl handling.
7331 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
7333 * cp-tree.h (struct lang_type): Added non_zero_init.
7334 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
7335 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
7336 * class.c (check_field_decls): Test non_zero_init.
7337 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
7338 zero-to-NULL conversions.
7339 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
7340 type that needs zero-initialization without zeros.
7341 (check_initializer_decl): Compute zero-initializer for types
7342 that require a non-trivial one.
7343 * init.c (build_forced_zero_init): New function.
7344 (build_default_init): Use it.
7345 * tree.c (zero_init_p): New function.
7346 * typeck2.c (force_store_init_value): New function.
7347 (process_init_constructor): Create non-trivial zero-initializers
7348 for array members and class fields.
7350 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
7352 * lang-specs.h: Remove redundant -lang-c++.
7354 2002-05-13 Jason Merrill <jason@redhat.com>
7356 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
7357 (fixed_type_or_null): See through reference vars.
7358 (build_base_path): Vtable contents are constant.
7359 * typeck.c (get_member_function_from_ptrfunc): Likewise.
7361 2002-05-12 Jason Merrill <jason@redhat.com>
7363 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
7366 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
7368 * cp-tree.h (flag_ansi): Remove.
7369 * decl2.c (flag_ansi): Remove.
7370 (cxx_decode_option): Set flag_iso and flag_undef.
7372 2002-05-09 Jason Merrill <jason@redhat.com>
7374 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
7375 Use subtraction rather than a bitmask to get the index.
7376 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
7378 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
7380 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
7382 * Make-lang.in (decl2.o): Update.
7383 * cp-tree.h (warn_multichar): Remove.
7384 * decl2.c: Include c-common.h.
7385 (warn_multichar): Remove.
7387 2002-05-03 Jason Merrill <jason@redhat.com>
7389 * tree.c (build_cplus_array_type): Only const and volatile get
7392 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
7394 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7396 ABI change, returning simple classes from functions.
7397 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7398 TYPE_HAS_TRIVIAL_INIT_REF is false or
7399 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7401 2002-04-30 Jason Merrill <jason@redhat.com>
7404 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7405 anonymous class with a typedef if there are attributes.
7407 2002-04-29 Paul Eggert <eggert@twinsun.com>
7409 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7411 2002-04-29 Jakub Jelinek <jakub@redhat.com>
7414 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7417 2002-04-29 Mark Mitchell <mark@codesourcery.com>
7420 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7421 enter that scope before name lookup.
7424 * method.c (do_build_copy_constructor): Avoid building
7425 cv-qualified reference types.
7427 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
7430 * decl.c (grok_op_properties): Assignment ops don't have to return
7431 by value. operator% should.
7433 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7436 * decl.c (duplicate_decls): Call merge_weak.
7438 2002-04-26 Richard Henderson <rth@redhat.com>
7440 * parse.y (malloced_yyss, malloced_yyvs): New.
7441 (yyoverflow): Re-add. Set them.
7442 (free_parser_stacks): New.
7444 2002-04-26 Mark Mitchell <mark@codesourcery.com>
7447 * method.c (do_build_assign_ref): Pass a derivation to
7448 build_method_call when calling base class assignment operators.
7450 2002-04-26 Richard Henderson <rth@redhat.com>
7452 * parse.y (yyoverflow): Revert.
7454 2002-04-26 Richard Henderson <rth@redhat.com>
7457 * parse.y (string): Remove. Update all uses to use STRING
7458 instead, and not call combine_strings.
7459 * rtti.c (tinfo_name): Use fix_string_type.
7460 * semantics.c (finish_asm_stmt): Don't call combine_strings.
7461 * spew.c (yylexstring): New.
7462 (read_token): Use it.
7464 2002-04-25 Richard Henderson <rth@redhat.com>
7467 * parse.y (yyoverflow): New.
7469 2002-04-25 Jason Merrill <jason@redhat.com>
7472 * search.c (check_final_overrider): No longer static.
7473 * class.c (update_vtable_entry_for_fn): Call it.
7474 * cp-tree.h: Adjust.
7476 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7478 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7479 * cp-tree.h (cxx_set_yydebug): Die.
7480 * lex.c (YYDEBUG): Get from c-lex.h.
7481 (cxx_set_yydebug): Remove.
7482 * parse.y: Include c-lex.h.
7483 (YYDEBUG): Get from c-lex.h.
7485 2002-04-24 Mark Mitchell <mark@codesourcery.com>
7488 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7491 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
7493 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7494 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7496 * cp-tree.h (cp_attribute_table): Rename.
7497 * decl.c (lang_attribute_table): Remove declaration.
7498 (cxx_init_decl_processing): Don't set it.
7499 * tree.c (cp_attribute_table): Rename.
7501 2002-04-24 Jason Merrill <jason@redhat.com>
7504 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7505 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7506 The pedwarn for array assignment is now unconditional.
7507 * tree.c (build_cplus_array_type_1): Still process simple array types
7508 normally in templates.
7511 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7514 2002-04-23 Jakub Jelinek <jakub@redhat.com>
7516 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7517 node with attributes.
7519 2002-2-23 David O'Brien <obrien@FreeBSD.org>
7521 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7522 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7524 2002-04-23 Mark Mitchell <mark@codesourcery.com>
7527 * pt.c (tsubst_friend_class): Handle templates with explicit
7531 * typeck.c (merge_types): Remember the cv-qualification of pointer
7532 types when merging them.
7534 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
7536 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7537 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7538 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7539 cxx_mark_function_context): New.
7540 * decl.c (push_cp_function_context, pop_cp_function_context,
7541 mark_cp_function_context): Rename for consistency.
7542 (cxx_init_decl_processing): Don't set old hooks.
7544 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
7546 * call.c (convert_type_from_ellipsis): Rename, update.
7547 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7548 * cp-tree.h (convert_type_from_ellipsis): Rename.
7549 * decl.c (cxx_init_decl_processing): Don't set hook.
7551 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7553 * call.c (build_new_method_call): Update.
7554 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7555 * cp-tree.h (cxx_incomplete_type_error): New.
7556 * decl.c (grokdeclarator, grokparms): Update.
7557 * decl2.c (check_classfn): Update.
7558 * pt.c (tsubst): Update.
7559 * typeck.c (complete_type_or_else, expr_sizeof,
7560 decay_conversion): Update.
7561 * typeck2.c (incomplete_type_error): Rename.
7562 (add_exception_specifier): Update.
7564 2002-04-18 Jason Merrill <jason@redhat.com>
7567 * search.c (setup_class_bindings): A class template qualifies as a
7570 2002-04-17 Jakub Jelinek <jakub@redhat.com>
7573 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7576 2002-04-16 Mark Mitchell <mark@codesourcery.com>
7578 * init.c (begin_init_stmts): Remove commented out code.
7579 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7580 * semantics.c (begin_gobal_stmt_expr): Adjust call to
7581 expand_start_stmt_expr.
7583 2002-04-15 Mark Mitchell <mark@codesourcery.com>
7585 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
7586 dso_handle itself, to __cxa_atexit.
7588 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7590 * error.c (cxx_print_error_function): Adjust call to macros.
7592 2002-04-14 Jakub Jelinek <jakub@redhat.com>
7594 * class.c (layout_virtual_bases): Do all dsize computation on trees.
7596 2002-04-14 Jason Merrill <jason@redhat.com>
7598 * typeck.c (get_member_function_from_ptrfunc): Don't do
7599 gratuitious division and multiplication on
7600 ptrmemfunc_vbit_in_delta targets.
7602 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7605 * semantics.c (finish_expr_stmt): Remember the type of the
7606 expression before any conversions are performed.
7608 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7611 * call.c (add_template_candidate_real): Do not treat member
7612 templates as copy constructors.
7614 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7616 * decl.c (duplicate_decls): Do not copy the RTL for a variable
7617 declaration if the old variable had an incomplete type and the new
7619 (complete_vars): Do not call layout_decl for completed variables.
7621 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
7623 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
7624 with an explicit one.
7625 (follow_tag_typedef): New.
7626 (lookup_tag): Use it to extract the tag of an explicit typedef.
7627 (xref_tag): Likewise.
7629 2002-04-11 Andrew Haley <aph@redhat.com>
7631 * typeck.c (type_after_usual_arithmetic_conversions):
7632 If two types have the same variant, return immediately.
7633 When two floating-point operands are the same precision:
7634 convert to float if one of the operands is float;
7635 if neither operand is one of the standard types, return the type
7636 of the first operand.
7638 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
7641 * decl.c (make_typename_type): Remove implicit typenameness.
7643 2002-04-09 Jason Merrill <jason@redhat.com>
7645 PR optimization/6189
7646 * semantics.c (genrtl_start_function): Don't free
7647 DECL_SAVED_FUNCTION_DATA for inline functions.
7649 * init.c (build_member_call): For now, don't convert to
7650 intermediate base if it would cause an error.
7652 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
7654 * parse.y (namespace_qualifier, maybe_identifier,
7655 begin_explicit_instantiation, end_explicit_instantiation,
7656 apparent_template_type, .finish_template_type,
7657 do_id, maybe_init, defarg_again, component_decl_1):
7658 Add ending ';', in accordance with POSIX.
7660 2002-04-06 Mark Mitchell <mark@codesourcery.com>
7663 * class.c (layout_class_type): Remember incomplete static
7665 (finish_struct_1): Call complete_vars, not
7666 hack_incomplete_structures.
7667 * cp-tree.h (hack_incomplete_structures): Rename to ...
7668 (complete_vars): ... this.
7669 (struct saved_scope): Remove incomplete.
7670 (namespace_scope_incomplete): Remove.
7671 * decl.c (struct binding_level): Remove incomplete.
7672 (incomplete_vars): New variable.
7673 (mark_binding_level): Don't mark incomplete.
7674 (print_binding_level): Don't print it.
7675 (mark_saved_scope): Don't mark incomplete.
7676 (pushdecl): Use maybe_register_incopmlete_var.
7677 (cxx_init_decl_processing): Register incomplete_vars for GC.
7678 (start_decl_1): Clarify error message.
7679 (hack_incomplete_vars): Remove.
7680 (maybe_register_incomplete_var): New function.
7681 (complete_vars): Likewise.
7683 2002-04-06 Jason Merrill <jason@redhat.com>
7686 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7687 set before checking it.
7690 * init.c (build_member_call): Use build_scoped_ref.
7691 (resolve_offset_ref): Likewise.
7692 * call.c (build_scoped_method_call): Likewise.
7693 * tree.c (maybe_dummy_object): Kludge around current_class_type being
7695 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7696 * cp-tree.h: Adjust.
7698 * init.c (push_base_cleanups): Just use build_scoped_method_call.
7701 * method.c (implicitly_declare_fn): Pass unqualified type to
7702 synthesize_exception_spec.
7704 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
7706 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7707 * cvt.c: Update comment.
7708 * init.c (expand_cleanup_for_base): Update.
7709 * semantics.c (finish_parenthesized_expr): Update.
7710 * typeck.c (cp_truthvalue_conversion): Update.
7712 2002-04-04 Jason Merrill <jason@redhat.com>
7714 * semantics.c (finish_eh_cleanup): New fn.
7715 * cp-tree.h: Add prototype.
7716 * init.c (perform_member_init, expand_cleanup_for_base): Use
7718 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7719 * cp-tree.h: Remove references.
7720 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7721 * dump.c (cp_dump_tree): Likewise.
7722 * pt.c (tsubst_expr): Likewise.
7723 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7724 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7725 * tree.c (cp_statement_code_p): Likewise.
7727 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
7730 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
7734 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7736 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7738 2002-04-03 Richard Henderson <rth@redhat.com>
7740 * cp-lang.c (cxx_warn_unused_global_decl): New.
7741 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7743 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
7745 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7746 * tree.c (init_tree): Don't set hook.
7748 2002-04-03 Roger Sayle <roger@eyesopen.com>
7751 * decl.c (duplicate_decls): Don't mess with assembler names when
7752 redeclaring builtin functions as static.
7754 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7756 * call.c (build_addr_func): Update.
7757 * class.c (resolve_address_of_overloaded_function): Update.
7758 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7759 * cp-tree.h (cxx_mark_addressable): New.
7760 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7761 * decl2.c (build_cleanup): Update.
7762 * except.c (build_throw): Update.
7763 * init.c (resolve_offset_ref): Update.
7764 * pt.c (convert_nontype_argument): Update.
7765 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7766 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7767 unary_complex_lvalue): Update.
7768 (mark_addressable): Rename.
7770 2002-04-01 Roger Sayle <roger@eyesopen.com>
7773 * decl.c (duplicate_decls): Overwrite the RTL when (and only
7774 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
7775 but follow the SET_DECL_RTL idiom used elsewhere in the function.
7777 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7779 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7780 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7781 * decl.c (grokdeclarator): Update.
7782 * mangle.c (write_integer_cst): Update.
7783 * typeck.c (build_binary_op): Update.
7785 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7787 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7788 * lex.c (cxx_init): Don't set hook.
7790 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7792 * Make-lang.in (error.o): Update.
7793 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7794 * cp-tree.h (struct diagnostic_context): Predeclare.
7795 (cxx_print_error_function): New.
7796 * error.c: Include langhooks-def.h.
7797 (lang_print_error_function): Rename. Update.
7798 (init_error): Don't set hook.
7800 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7802 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
7804 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
7805 * decl.c (finish_enum): Similarly.
7806 * error.c (dump_type): Similarly.
7807 * lex.c (cxx_init): Similarly.
7808 * mangle.c (write_builtin_type): Similarly.
7809 * typeck.c (comptypes): Similarly.
7811 2002-03-28 Roger Sayle <roger@eyesopen.com>
7814 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
7815 in the g++ front-end.
7816 (duplicate_decl): Allow redefinition of anticipated built-ins.
7817 Fix inlining problem by over-writing the old DECL_RTL.
7818 (lookup_namespace_name): Fail to find an identifier in the
7819 specified namespace if its still anticipated.
7820 (builtin_function_1): New function split out from builtin_function
7821 to create a builtin in the current namespace with given context.
7822 (builtin_function): Call builtin_function_1 to define the
7823 appropriate builtins in both the std and global namespaces.
7824 (select_decl): Don't test for anticipated decls here.
7825 (unqualified_namespace_lookup): Instead ignore them whilst
7826 searching through scopes and namespaces.
7827 * decl2.c (do_nonmember_using_decl): If a using declaration
7828 specifies an anticipated built-in function, mark it as no longer
7829 anticipated in that scope.
7830 (ambiguous_decl): Avoid resolving to an anticipated decl.
7831 * lex.c (do_scoped_id): Fail to find an identifier in the global
7832 namespace if its still anticipated.
7834 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7836 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
7837 * cp-tree.h (cp_make_lang_type): Rename.
7838 * lex.c (cp_make_lang_type): Rename.
7839 (make_aggr_type): Update.
7840 * tree.c (init_tree): Don't set make_lang_type_fn.
7842 2002-03-29 Jakub Jelinek <jakub@redhat.com>
7845 * class.c (finish_struct_1): Update static field's DECL_MODE even
7846 if its type is a variant of t.
7848 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7850 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
7851 * cp-tree.h (cxx_insert_default_attributes): New.
7852 * decl.c (insert_default_attributes): Rename.
7854 2002-03-27 Mark Mitchell <mark@codesourcery.com>
7857 * call.c (build_op_delete_call): Allow for the fact the placement
7858 may be a COMPOUND_EXPR.
7860 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7862 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7863 * cp-tree.h (init_cplus_expand): Remove.
7864 (cxx_expand_expr): New.
7865 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
7867 (init_cplus_expand): Remove.
7868 * lex.c (cxx_init): Don't call init_cplus_expand.
7870 2002-03-26 Mark Mitchell <mark@codesourcery.com>
7873 * init.c (build_new_1): Allow for the fact the result of
7874 build_function_call may be a COMPOUND_EXPR.
7876 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
7879 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
7880 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7881 (dfs_skip_nonprimary_vbases_markedp): Remove.
7882 * search.c (get_shared_vbase_if_not_primary): Remove.
7883 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7884 (dfs_skip_nonprimary_vbases_markedp): Remove.
7885 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
7886 (dfs_marked_real_bases_queue_p): Likewise.
7888 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
7890 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7891 * cp-tree.h (cxx_mark_tree): New.
7892 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
7894 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
7896 * cp-tree.h (cxx_maybe_build_cleanup): New.
7897 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
7898 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
7899 * tree.c (build_target_expr): Update.
7900 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
7902 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
7904 * decl2.c (cxx_decode_option): Handle -E.
7905 * lang-specs.h (default_compilers): Preprocess with cc1plus.
7906 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
7908 2002-03-23 Jakub Jelinek <jakub@redhat.com>
7911 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
7913 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7915 * error.c (dump_type): Be careful about implicit typenames.
7917 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7920 * semantics.c (finish_base_specifier): Handle erronous base
7923 2002-03-22 Zack Weinberg <zack@codesourcery.com>
7925 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
7928 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
7930 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
7931 an index into the vtable_entry array regardless of
7932 TARGET_PTRMEMFUNC_VBIT_LOCATION.
7934 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
7936 * tree.c (cp_cannot_inline_tree_fn): Same.
7938 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
7940 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7941 insert_block, getdecls, global_bindings_p): New.
7943 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
7946 * mangle.c (struct globals) Add internal_mangling_p member.
7947 (write_template_param): Do internal mangling, if needed.
7948 (mangle_conv_op_name_for_type): Request internal mangling.
7950 2002-03-20 Jason Merrill <jason@redhat.com>
7953 * init.c (build_delete): Check access for a member op delete here.
7954 * decl2.c (delete_sanity): Not here.
7956 2002-03-19 Jason Merrill <jason@redhat.com>
7959 * class.c (get_vfield_name): Use the constructor_name.
7961 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
7963 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7964 * cp-tree.h (lang_printable_name): Rename.
7965 * error.c (lang_decl_name): Use new hook.
7966 * lex.c (cxx_init): Remove old hook.
7967 * pt.c (tsubst_decl): Use new hook.
7968 * tree.c (lang_printable_name): Rename.
7970 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
7973 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
7974 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
7975 only after recording the declaration.
7977 2002-03-18 Jason Merrill <jason@redhat.com>
7980 * init.c (resolve_offset_ref): Hand off to build_component_ref.
7982 PR c++/4222, c++/5995
7983 * call.c (build_over_call): Fix empty class logic.
7986 * cp-tree.h (struct saved_scope): Add last_parms field.
7987 * decl.c (maybe_push_to_top_level): Save last_function_parms.
7988 (pop_from_top_level): Restore it.
7991 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
7995 * pt.c (tsubst_friend_function): Use decl_namespace_context.
7997 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
7998 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
7999 type with a nontrivial destructor.
8001 2002-03-17 Jason Merrill <jason@redhat.com>
8004 * class.c (build_base_path): Virtual base layout is fixed in
8007 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8009 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8010 * parse.y (yyparse): Remove macro.
8012 2002-03-17 Jason Merrill <jason@redhat.com>
8015 * init.c (build_new_1): Pass the right pointer to op delete.
8017 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
8020 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8021 conversion operators go.
8022 (struct lang_decl_flags): Add template_conv_p and unused
8024 (DECL_TEMPLATE_CONV_FN_P): New macro.
8025 * call.c (build_user_type_conversion_1): Don't check second type
8026 conversion of overload set first.
8027 * class.c (add_method): Make sure templated conversion operators
8028 all end up on slot 2.
8029 * lex.c (do_identifier): A conversion operator token might be
8030 satisfied by a templated conversion operator.
8031 * pt.c (check_explicit_specialization): Use
8032 CLASSTYPE_FIRST_CONVERSION_SLOT.
8033 (template_parm_this_level_p): New function.
8034 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8035 * search.c (lookup_fnfields_1): Template conversions will be on
8037 * typeck.c (build_component_ref): Preserve the type of an
8038 conversion operator name on the overload type.
8039 (build_x_function_call): Retrieve the conversion operator name.
8041 2002-03-15 Richard Henderson <rth@redhat.com>
8043 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8045 2002-03-15 Mark Mitchell <mark@codesourcery.com>
8047 * cp-tree.h (CLEANUP_DECL): Remove.
8048 (CLEANUP_EXPR): Likewise.
8049 * decl.c (destroy_local_var): Simplify.
8050 (maybe_build_cleanup): Tidy.
8051 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8052 * semantics.c (cp_expand_stmt): Likewise.
8053 * cp/tree.c (cp_statement_code_p): Likewise.
8055 2002-03-15 Jason Merrill <jason@redhat.com>
8058 * decl.c (duplicate_decls): Use merge_types instead of common_type.
8059 * typeck.c (common_type): Just hand off to
8060 type_after_usual_arithmetic_conversions and
8061 composite_pointer_type.
8062 (merge_types): New fn.
8063 (commonparms): Use it instead of common_type.
8064 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8065 (composite_pointer_type): Also handle attributes.
8066 * cp-tree.h: Declare merge_types.
8068 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8070 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8072 2002-03-14 Richard Henderson <rth@redhat.com>
8074 * decl.c: Include c-pragma.h.
8075 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8076 * Make-lang.in: Update dependencies.
8078 2002-03-14 Jakub Jelinek <jakub@redhat.com>
8081 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8082 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8084 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8086 * mangle.c (write_builtin_type): Handle 128-bit integers even if
8087 they are not a standard integer type.
8089 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8091 * cp-tree.h (init_init_processing): Remove declaration.
8092 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8093 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8095 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8097 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8099 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8101 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8102 cplus_tree_code_name): Delete.
8103 (cxx_init): Don't call add_c_tree_codes, instead set
8104 lang_unsafe_for_reeval. Don't try to copy into the various
8107 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
8110 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8111 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8114 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8116 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
8117 DR209 is now not a defect.
8118 * cp-tree.h (skip_type_access_control): Remove.
8119 * decl.c (grokdeclarator): Do type access control for friend
8121 * semantics.c (decl_type_access_control): Don't reset
8122 current_type_lookups.
8123 (save_type_access_control): Always save the lookups.
8124 (skip_type_access_control): Remove.
8125 (finish_class_definition): Don't change type_lookups.
8127 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8129 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
8131 * typeck.c (build_static_cast): Compare non-qualified types
8132 with pointer to member conversions.
8134 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
8135 Daniel Berlin <dan@dberlin.org>
8137 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8138 (cxx_get_alias_set): Use it.
8140 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8142 * cp-tree.h (stabilize_expr): Prototype.
8144 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
8146 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8147 conditional return void.
8149 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
8151 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8152 * cp-tree.h (cxx_unsave): New.
8153 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8154 (init_tree): Update.
8156 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8158 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8159 explicit sizeof/sizeof.
8160 * decl2.c (cxx_decode_option): Likewise.
8161 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8163 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
8166 * decl.c (lookup_tag): Only reject enum/class mismatch, not
8167 class/union mismatch.
8168 * parse.y (check_class_key): New function.
8169 (structsp): Call it.
8171 2002-03-01 Michael Matz <matz@suse.de>
8173 * typeck.c (cp_pointer_int_sum): Complete inner type which is
8174 used later by size_in_bytes().
8176 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
8178 * cp-tree.h: Require __GNUC__ to be #defined.
8179 (build_init): Add missing prototype.
8181 2002-03-01 Jason Merrill <jason@redhat.com>
8183 * except.c: Don't include decl.h or obstack.h. Do include
8185 (build_throw): Destroy temporaries from the thrown
8186 expression before calling __cxa_throw. Construct a thrown
8187 temporary directly into the exception object.
8188 (stabilize_throw_expr): New function.
8189 (wrap_cleanups_r): New function.
8190 * tree.c (stabilize_expr): New function.
8191 * init.c (build_init): New function.
8192 * Make-lang.in (cp/except.o): Adjust .h deps.
8194 2002-02-28 Jason Merrill <jason@redhat.com>
8196 * search.c (lookup_base_r): Don't clear is_non_public just because
8197 we found a friendly scope.
8199 * decl.c (finish_function): Only warn about missing return
8200 statement with -Wreturn-type.
8202 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
8204 * class.c (build_clone): Update.
8205 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8206 * cp-tree.h (cxx_dup_lang_specific_decl): New.
8207 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
8208 (copy_decl): Update.
8209 * method.c (make_thunk): Update.
8211 2002-02-27 Zack Weinberg <zack@codesourcery.com>
8213 * decl2.c: Delete traditional-mode-related code copied from
8214 the C front end but not used, or used only to permit the
8217 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
8220 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
8223 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8226 * semantics.c (finish_switch_cond): Don't call get_unwidened
8229 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
8232 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
8234 (make_typename_type): Use tsubst_flags_t.
8235 * decl.c (make_typename_type): Adjust. Return non-artificial
8236 TYPE_DECLs, if required.
8237 (grokdeclarator): Simplify CVR qualification handling. Allow bad
8238 qualifiers on typedef types.
8239 * decl2.c (handle_class_head): Adjust make_typename_type call.
8240 * parse.y (nested_name_specifier): Likewise.
8241 (typename_sub0): Likewise.
8242 (typename_sub1): Likewise.
8243 * pt.c (convert_template_argument): Adjust make_typename_type
8245 (tsubst): Adjust cp_build_qualified_type_real calls.
8246 (check_cv_quals_for_unify): Cope with allowing bad qualifications
8247 on template type parms.
8248 (instantiate_decl): Recheck substitutions to give warnings on bad
8250 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
8252 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
8254 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8256 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
8257 unless DECL_ALWAYS_INLINE.
8259 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8261 * typeck.c (cp_pointer_int_sum): Renamed from
8262 pointer_int_sum, call pointer_int_sum.
8264 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8266 * decl.c (duplicate_decls): Return 0 if issued error about
8269 2002-02-19 Jason Merrill <jason@redhat.com>
8271 ABI change: Mangle `void (A::*)() const' as
8272 M1AKFvvE, not MK1AFvvE.
8273 * mangle.c (write_function_type): Write cv-quals for member
8275 (write_pointer_to_member_type): Not here.
8277 2002-02-18 Jason Merrill <jason@redhat.com>
8279 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
8280 (do_decl_instantiation): Likewise.
8282 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
8285 * decl.c (duplicate_decls): Make warning unconditional
8286 if duplicate default argument declarations are present.
8288 2002-02-17 Jakub Jelinek <jakub@redhat.com>
8290 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
8293 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
8295 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
8296 remove incorrect comment. Move #if 0'd code to common path. Use
8297 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
8299 2002-02-13 Jason Merrill <jason@redhat.com>
8301 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
8302 (finish_function): Don't warn if current_function_returns_null.
8304 * typeck2.c (digest_init): Do handle values of vector type.
8306 * typeck2.c (digest_init, process_init_constructor): Treat vectors
8309 2002-02-11 Jason Merrill <jason@redhat.com>
8311 * parse.y (reserved_declspecs): Don't handle attributes.
8312 (reserved_typespecquals): Handle them here.
8313 * Make-lang.in (parse.c): Adjust expected conflicts.
8315 2002-02-08 Jakub Jelinek <jakub@redhat.com>
8317 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
8318 instead of compstmt.
8319 (compstmt_or_stmtexpr): Renamed from compstmt.
8320 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
8322 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8324 Rename instantiate_type_flags to tsubst_flags_t & expand use.
8325 * cp-tree.h (instantiate_type_flags): Rename to ...
8326 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
8327 add tf_warning flag.
8328 (instantiate_type): Adjust prototype.
8329 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
8330 do_type_instantiation, cp_build_qualified_type_real): Likewise.
8331 cp_build_qualified_type: Adjust.
8332 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
8334 * call.c (standard_conversion): Rename itf_* to tf_*.
8335 (reference_binding): Likewise.
8336 (convert_like_real): Likewise.
8337 * cvt.c (cp_convert_to_pointer): Likewise.
8338 (convert_to_reference): Likewise.
8339 * decl.c (lookup_namespace_name): Use tf_* flags.
8340 (make_typename_type): Likewise.
8341 (grokdeclarator): Likewise.
8342 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
8343 (coerce_template_template_parms, convert_template_argument,
8344 coerce_template_parms, maybe_get_template_decl_from_type_decl,
8345 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
8346 instantiate_class_template, tsubst_template_arg_vector,
8347 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
8348 tsubst_decl, tsubst_arg_types, tsubst_function_type,
8349 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
8350 instantiate_template, fn_type_unification,
8351 resolve_overloaded_unification, verify_class_unification,
8352 unify, get_bindings_real, do_type_instantiation,
8353 regenerate_decl_from_template, instantiate_decl,
8354 tsubst_initializer_list, tsubst_enum,
8355 get_mostly_instantiated_function_type,
8356 invalid_nontype_parm_type_p): Likewise.
8357 * tree.c (cp_build_qualified_type_real): Likewise.
8358 * typeck.c (build_binary_op): Rename itf_* to tf_*.
8359 (build_ptrmemfunc): Likewise.
8360 (convert_for_assignment): Likewise.
8362 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8365 * decl.c (grokdeclarator): Allow friend declarations from
8367 * decl2.c (handle_class_head): Don't push into template parm contexts.
8368 * pt.c (push_template_decl_real): Template parm contexts are never
8371 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
8373 * class.c: Include target.h.
8374 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
8375 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
8377 * Make-lang.in: Adjust deps.
8379 2002-02-05 Jason Merrill <jason@redhat.com>
8381 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
8383 2002-02-04 Jakub Jelinek <jakub@redhat.com>
8385 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
8386 (finish_switch_cond): Set SWITCH_TYPE.
8388 2002-02-04 Richard Henderson <rth@redhat.com>
8390 * method.c (use_thunk): Always initialize the block tree. Reindent.
8391 * semantics.c (expand_body): Emit thunks after function, not before.
8393 2002-02-04 Jason Merrill <jason@redhat.com>
8395 * decl.c (start_function): Call cplus_decl_attributes immediately
8396 after grokdeclarator.
8398 * decl.c (start_function): Combine DECL_RESULT handling code.
8400 2002-02-03 Jason Merrill <jason@redhat.com>
8403 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8404 (cp/xref.o): Remove dependencies.
8405 * class.c (finish_struct_1, check_methods): Don't call xref fns.
8406 (finish_struct_1): Likewise.
8407 * friend.c (make_friend_class): Likewise.
8408 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8409 * spew.c (read_process_identifier): Likewise.
8411 2002-02-01 Jason Merrill <jason@redhat.com>
8414 * decl.c (finish_function): Warn about a non-void function with
8415 no return statement and no abnormal exit.
8416 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8417 (current_function_returns_abnormally): New macro.
8418 * call.c (build_call): Set it.
8420 * typeck.c (build_component_ref): Always complain about offsetof
8421 constructs on non-PODs. Only make it an error for members of
8424 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8425 (dump_function_decl): Always dump parms.
8427 * decl2.c (finish_static_data_member_decl): Complain about a local
8428 class with a static data member.
8431 * search.c (lookup_field_1): Don't xref a static data member
8432 just because we looked it up.
8434 2002-01-31 Jason Merrill <jason@redhat.com>
8436 * Make-lang.in (parse.c): Handle .output file.
8439 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8441 * semantics.c (finish_class_definition): Adjust.
8443 Allow attributes in parms and casts.
8444 * parse.y (named_parm): Don't strip attrs.
8445 (declmods): Remove 'attributes' production.
8446 (nonempty_cv_qualifiers): Accept attributes.
8447 (ATTRIBUTE): Give precedence.
8448 * decl.c (groktypename): Handle attributes.
8449 (grokparms): Likewise.
8451 2002-01-29 Jakub Jelinek <jakub@redhat.com>
8453 * decl2.c (cxx_decode_option): Pass 0 as last argument to
8455 * lang-specs.h: Use cpp_unique_options instead of cpp_options
8456 when used together with cc1_options.
8458 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
8461 * typeck2.c (digest_init): Make sure non-array core type is
8463 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8464 constructor, rather than build a new one.
8465 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8466 PURPOSE of constructor elts.
8468 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8470 * Make-lang.in (parse.c): Adjust expected number of
8471 shift-reduce conflicts.
8472 (decl.o): Depend on diagnostic.h.
8473 * decl.c: Include diagnostic.h.
8474 (grokdeclarator): Check for null pointer.
8475 (finish_function): Don't abort when
8476 current_binding_level->parm_flag != 1, if errors have
8477 occurred; throw away the statement tree and extra binding
8478 levels, and continue.
8479 * lex.c (note_list_got_semicolon): Check for null pointer.
8480 * method.c (hack_identifier): Just return error_mark_node if
8481 value is error_mark_node.
8482 * parse.y (primary: TYPEID(type_id)): No need to use
8483 TYPE_MAIN_VARIANT here.
8484 (handler_seq): Accept an empty list of catch clauses and
8485 generate a fake handler block to avoid later crashes.
8486 (ansi_raise_identifier): Accept the error token too.
8487 * semantics.c (begin_class_definition,
8488 finish_class_definition): Check for error_mark_node.
8490 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8492 * typeck2.c (friendly_abort): Delete definition.
8493 * cp-tree.h (friendly_abort): Don't prototype.
8494 (my_friendly_assert): Use fancy_abort.
8496 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8498 * cp-tree.h (my_friendly_abort): Remove.
8500 2002-01-23 Jakub Jelinek <jakub@redhat.com>
8502 * spew.c (pending_inlines, pending_inlines_tail,
8503 processing_these_inlines): Make static.
8504 (mark_pending_inlines): Remove static.
8505 (begin_parsing_inclass_inline): If in function, save pi
8506 for GC to cp_function_chain->unparsed_inlines instead.
8507 (process_next_inline): Likewise.
8508 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8509 (mark_pending_inlines): Add prototype.
8510 * decl.c (spew_debug): Remove unused extern.
8511 (mark_lang_function): Call mark_pending_inlines.
8513 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8515 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8516 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8517 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8518 Change my_fancy_abort() to abort().
8520 2002-01-23 Jason Merrill <jason@redhat.com>
8523 * class.c (fixed_type_or_null): Fix thinko.
8526 * init.c (resolve_offset_ref): Use build_indirect_ref.
8528 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8530 2002-01-22 Jason Merrill <jason@redhat.com>
8532 * parse.y (function_body): Suppress the block for the outermost
8534 * decl.c (pushdecl): Don't try to skip it.
8535 (begin_function_body): Keep the block we create, not the next one.
8536 * init.c (emit_base_init): Don't mess with keep_next_level.
8538 * class.c (build_base_path): Tweak formatting.
8540 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
8542 Fix regression introduced with patch for c++/775
8543 * parse.y (class_head_defn): Check for template specializations
8544 with a different class-key.
8546 2002-01-17 Jason Merrill <jason@redhat.com>
8548 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8549 (begin_function_body): Call them and keep_next_level.
8550 * init.c (emit_base_init): Call keep_next_level.
8551 * semantics.c (setup_vtbl_ptr): Lose.
8552 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8553 (vtbls_set_up_p): Lose.
8554 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8555 * method.c (do_build_copy_constructor): Likewise.
8556 (synthesize_method): Call finish_mem_initializers.
8557 * parse.y (nodecls): Likewise.
8559 * error.c (dump_type_suffix): Print the exception specs before
8561 (dump_function_decl): Here, too.
8563 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8565 2002-01-10 Ira Ruben <ira@apple.com>
8568 * decl.c (start_method): Handle attrlist.
8570 2002-01-10 Jakub Jelinek <jakub@redhat.com>
8572 * decl2.c (max_tinst_depth): Increase default limit to 500.
8574 2002-01-10 Graham Stott <grahams@redhat.com>
8576 * spew.c (YYCHAR): Uppercase macro parameter and add
8579 (NAME): Uppercase macro parameter.
8581 2002-01-09 Graham Stott <grahams@redhat.com>
8583 * decl.h (grokdeclarator): Wrap long line.
8585 * semantics.c (FINISH_COND): Uppercase macro paramaters and
8588 2002-01-08 Graham Stott <grahams@redhat.com>
8590 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
8591 (PALLOC): Uppercase macro parameter and whitespace.
8592 (SALLOC): Uppercase macro parameter.
8593 (SFREE): Uppercase macros parameter, add parenthese and
8595 (STREQL): Uppercase macro parameter and whitespace.
8602 * call.c (convert_like): Add parenthesis and wrap.
8603 (convert_like_with_context): Likewise.
8604 (ICS_RANK): Whitespace.
8605 (NEED_TEMPORARY_P): Remove parenthesis.
8607 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
8609 (VTT_MARKED_BINFO_P): Likewise.
8611 * decl.c (BINDING_LEVEL): Add parenthesis.
8612 (DEF_OPERATOR): Likewise.
8614 * mangle.c (MANGLE_TRACE): Add parenthesis.
8615 (MANGLE_TRACE_TREE): Likewise.
8616 (write_signed_number): Likewise.
8617 (write_unsigned_number): Likewise.
8619 * pt.c (ccat): Uppercase macro parameter.
8622 * search.c (SET_BINFO_ACCESS): Add parenthesis.
8624 2002-01-07 Jason Merrill <jason@redhat.com>
8626 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
8630 * method.c (make_thunk): If !flag_weak, give the thunk the
8632 (use_thunk): Here, too.
8634 2002-01-07 Graham Stott <grahams@redhat.com>
8636 * error.c: Update copyright date.
8637 (print_scope_operator): Add parenthesis.
8638 (print_left_paren): Likewise.
8639 (print_right_paren): Likewise.
8640 (print_left_bracket): Likewise.
8641 (print_right_bracket): Likewise.
8642 (print_template_argument_list_start): Likewise.
8643 (print_template_argument_list_end): Likewise.
8644 (print_non_consecutive_character): Likewise.
8645 (print_tree_identifier): Likewise.
8646 (print_identifier): Likewise.
8647 (NEXT_CODE): Uppercase macro parameter.
8648 (ident_fndecl): Delete unused.
8649 (GLOBAL_THING): Likewise.
8651 2002-01-06 Graham Stott <grahams@redhat.com>
8653 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8654 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8655 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8656 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8657 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8658 (C_IS_RESERVED_WORD): Uppercase macro parameter.
8659 (C_RID_YYCODE) Likewise.
8660 (ptrmem_cst): Use rtx.
8661 (LOCAL_BINDING_P): Add whitespace.
8662 (INHERITED_VALUE_BINDING_P): Likewise.
8663 (BINDING_SCOPE): Wrap long line.
8664 (BINDING_HAS_LEVEL_P): Remove parenthesis.
8665 (BINDING_VALUE): Wrap long line.
8666 (BINDING_TYPE): Whitespace.
8667 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8668 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
8669 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
8670 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8671 (same_type_p): Uppercase macro parameters.
8672 (same_type_ignoring_top_level_qualifiers_p): Likewise.
8673 (OVL_FUNCTION): Wrap long line.
8674 (OVL_CHAIN): Whitespace.
8675 (OVL_CURRENT): Add parenthesis and whitespace.
8676 (OVL_NEXT): Whitespace.
8677 (OVL_USED): Likewise.
8678 (IDENTIFIER_TYPE_VALUE): Likewise.
8679 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8680 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8681 (LANG_ID_FIELD): Whitespace.
8682 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8683 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8684 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8685 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8686 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8687 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8688 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8689 (IDENTIFIER_VIRTUAL_P): Likewise.
8690 (IDENTIFIER_OPNAME_P): Likewise.
8691 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8692 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8693 (C_SET_EXP_ORIGINAL_CODE): Likewise.
8694 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8695 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8696 (IS_AGGR_TYPE): Uppercase macro parameter.
8697 (CLASS_TYPE_P): Likewise.
8698 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8699 (IS_AGGR_TYPE_2): Whitespace.
8700 (TAGGED_TYPE_P): Uppercase macro parameter.
8701 (TYPE_BUILT_IN): Whitespace.
8702 (TYPE_FOR_JAVA): Likewise.
8703 (FUNCTION_ARG_CHAIN): Remove parenthesis.
8704 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8705 (FUNCTION_FIRST_USER_PARAM): Likewise.
8706 (PROMOTES_TO_AGGR_TYPE): Whitespace.
8707 (DERIVED_FROM_P): Add parenthesis and wrap.
8708 (UNIQUELY_DERIVED_FROM_P): Likewise.
8709 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8710 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8711 (CLASSTYPE_USE_TEMPLATE): Whitespace.
8712 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8713 (TYPE_GETS_DELETE): Add parenthesis.
8714 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8715 (TYPE_HAS_ASSIGN_REF): Likewise,
8716 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8717 (TYPE_HAS_INIT_REF): Likewise.
8718 (TYPE_HAS_CONST_INIT_REF): Likewise.
8719 (TYPE_BEING_DEFINED): Likewise.
8720 (TYPE_LANG_SPECIFIC): Likewise.
8721 (CLASSTYPE_RTTI): Likewise.
8722 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8723 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8724 (TYPE_OVERLOADS_ARROW): Likewise.
8725 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8726 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8727 (CLASSTYPE_METHOD_VEC): Likewise.
8728 (CLASSTYPE_MARKED_N): Likewise.
8729 (CLASSTYPE_MARKED): Likewise.
8730 (CLASSTYPE_MARKED2): Likewise.
8731 (CLASSTYPE_MARKED3): Likewise.
8732 (CLASSTYPE_MARKED4): Likewise.
8733 (CLASSTYPE_MARKED5): Likewise.
8734 (CLASSTYPE_MARKED6): Likewise.
8735 (SET_CLASSTYPE_MARKED): Whitespace.
8736 (CLEAR_CLASSTYPE_MARKED): Likewise.
8737 (SET_CLASSTYPE_MARKED2): Likewise.
8738 (CLEAR_CLASSTYPE_MARKED2): Likewise.
8739 (SET_CLASSTYPE_MARKED3): Likewise.
8740 (CLEAR_CLASSTYPE_MARKED3): Likewise.
8741 (SET_CLASSTYPE_MARKED4): Likewise.
8742 (CLEAR_CLASSTYPE_MARKED4): Likewise.
8743 (SET_CLASSTYPE_MARKED5): Likewise.
8744 (CLEAR_CLASSTYPE_MARKED5): Likewise.
8745 (SET_CLASSTYPE_MARKED6): Likewise.
8746 (CLEAR_CLASSTYPE_MARKED6): Likewise.
8747 (CLASSTYPE_TAGS): Likewise.
8748 (CLASSTYPE_VSIZE): Likewise.
8749 (CLASSTYPE_VBASECLASSES): Likewise.
8750 (CANONICAL_BINFO): Add parenthesis.
8751 (CLASSTYPE_SIZE(NODE): Likewise.
8752 (CLASSTYPE_SIZE_UNIT): Likewise.
8753 (CLASSTYPE_ALIGN(NODE): Likewise.
8754 (CLASSTYPE_USER_ALIGN): Likewise.
8755 (TYPE_JAVA_INTERFACE): Likewise.
8756 (CLASSTYPE_PURE_VIRTUALS): Likewise.
8757 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8758 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8759 (CLASSTYPE_HAS_MUTABLE): Likewise.
8760 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8761 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8762 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8763 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8764 (CLASSTYPE_INTERFACE_ONLY): Likewise.
8765 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8766 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8767 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8768 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8769 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8770 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8771 (BINFO_UNSHARED_MARKED): Whitespace.
8772 (BINFO_MARKED): Whitespace and wrap.
8773 (SET_BINFO_MARKED): Likewise.
8774 (CLEAR_BINFO_MARKED): Likewise.
8775 (BINFO_VTABLE_PATH_MARKED): Likewise.
8776 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8777 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8778 (BINFO_SUBVTT_INDEX): Remove parenthesis.
8779 (BINFO_VPTR_INDEX): Likewise.
8780 (BINFO_PRIMARY_BASE_OF): Likewise,
8781 (CLASSTYPE_VFIELDS): Whitespace.
8782 (VF_DERIVED_VALUE): Wrap long line.
8783 (NAMESPACE_LEVEL): Whitespace.
8784 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8785 (DEFARG_POINTER): Whitespace.
8786 (DECL_NEEDED_P): Remove parenthesis.
8787 (DECL_LANGUAGE): Whitespace.
8788 (SET_DECL_LANGUAGE): Add parenthesis.
8789 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8790 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
8791 (DECL_IN_AGGR_P): Whitespace.
8792 (DECL_FRIEND_P): Likewise.
8793 (DECL_BEFRIENDING_CLASSES): Likewise.
8794 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
8795 (DECL_NONCONVERTING_P): Whitespace.
8796 (DECL_PURE_VIRTUAL_P): Likewise.
8797 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
8798 (DECL_PENDING_INLINE_INFO): Whitespace.
8799 (DECL_SORTED_FIELDS): Likewise.
8800 (DECL_DEFERRED_FN): Likewise.
8801 (DECL_TEMPLATE_INFO): Likewise.
8802 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
8803 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
8804 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
8805 (TMPL_ARGS_LEVEL): Likewise.
8806 (SET_TMPL_ARGS_LEVEL): Likewise.
8807 (INNERMOST_TEMPLATE_PARMS): Whitespace.
8808 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
8809 (INTEGRAL_CODE_P(CODE): Add parenthesis.
8810 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
8811 (TYPE_HAS_CONSTRUCTOR): Whitespace.
8812 (TREE_HAS_CONSTRUCTOR): Likewise.
8813 (TYPE_HAS_DESTRUCTOR): Likewise.
8814 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
8815 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
8816 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
8817 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
8818 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
8819 (TYPE_PTRMEMFUNC_P): Likewise.
8820 (TYPE_PTRMEMFUNC_FLAG): Likewise.
8821 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
8822 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
8823 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
8824 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8825 (DECL_ACCESS): Whitespace.
8826 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
8827 (DECL_GLOBAL_DTOR_P): Likewise.
8828 (GLOBAL_INIT_PRIORITY): Likewise.
8829 (DECL_TEMPLATE_PARMS): Likewise.
8830 (DECL_TEMPLATE_RESULT): Likewise.
8831 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
8832 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
8833 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
8834 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8835 (PRIMARY_TEMPLATE_P): Add parenthesis.
8836 (DECL_USE_TEMPLATE): Whitespace.
8837 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8838 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8839 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8840 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8841 (CALL_DECLARATOR_PARMS): Remove parenthesis.
8842 (CALL_DECLARATOR_QUALS): Likewise.
8843 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
8844 (TEMP_NAME_P): Wrap.
8845 (VFIELD_NAME_P): Likewise.
8846 (B_SET): Uppercase macro parameters and add parenthesis.
8849 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
8850 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
8851 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
8852 (same_or_base_type_p): Likewise.
8853 (cp_deprecated): Likewise.
8855 2002-01-05 Richard Henderson <rth@redhat.com>
8857 * semantics.c (expand_body): Revert last change.
8859 2002-01-04 Jason Merrill <jason@redhat.com>
8862 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
8865 * class.c (build_vtbl_initializer): Check for a lost primary
8866 before calculating the vtable entry to throw away.
8868 2002-01-02 Jason Merrill <jason@redhat.com>
8870 * semantics.c (expand_body): Call outlining_inline_function when
8871 emitting an inline function out of line.
8873 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8875 PR c++/5116, c++/764 reversion
8876 * call.c (build_new_op): Revert the instantiations. They are
8879 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8882 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
8884 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8887 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
8888 (tsubst, case POINTER_TYPE): Handle pmfs here.
8889 (tsubst, case OFFSET_TYPE): Check it is not an offset to
8890 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
8892 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8895 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
8896 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
8897 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
8899 (tsubst_template_parms): Break up loop statements.
8900 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
8901 parm PARM_DECLs don't get promoted.
8903 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8906 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
8907 (build_x_function_call): Cope with a COMPONENT_REF containing a
8910 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8913 * pt.c (convert_template_argument): Be more careful determining
8914 when RECORD_TYPE templates are or are not templates.
8916 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8919 * cp-tree.h (handle_class_head): Adjust prototype.
8920 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
8921 parameters. Use for all class heads.
8922 * parse.y (named_class_head_sans_basetype, named_class_head,
8923 named_complex_class_head_sans_basetype,
8924 named_class_head_sans_basetype_defn,
8925 unnamed_class_head): Remove.
8926 (class_head, class_head_apparent_template): Recognize class heads
8927 (class_head_decl, class_head_defn): New reductions. Process class
8929 (structsp): Adjust class definition and class declaration
8931 (maybe_base_class_list): Give diagnostic on empty list.
8933 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8936 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
8937 single non-static member.
8938 (unary_complex_lvalue): If it cannot be a pointer to member, don't
8939 make it so. Check it is not pointer to reference.
8941 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8944 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
8945 are processing a template decl.
8947 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8949 PR c++/5116, c++/764
8950 * call.c (build_new_op): Make sure template class operands are
8951 instantiated. Simplify arglist construction.
8953 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8955 * call.c (build_user_type_conversion_1): Use my_friendly_assert
8956 rather than if ... abort.
8957 * cvt.c (convert_to_reference): Likewise.
8958 * semantics.c (setup_vtbl_ptr): Likewise.
8959 * pt.c (lookup_template_class): Comment typo.
8961 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8964 * pt.c (push_template_decl_real): Make sure DECL has
8967 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8970 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
8971 for non-reference fields.
8972 * typeck.c (require_complete_type): Use resolve_offset_ref).
8974 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
8977 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
8979 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
8982 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
8983 up. Don't stabilize_references when initializing a reference.
8985 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8987 * decl2.c (lang_f_options): Const-ify.
8989 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8991 * config-lang.in (diff_excludes): Remove.
8993 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
8996 * typeck.c (build_function_call_real): Use original function
8997 expression for errors.
8999 2001-12-18 Jason Merrill <jason@redhat.com>
9002 * class.c (add_method): Do compare 'this' quals when trying to match a
9003 used function. Don't defer to another used function.
9005 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9007 * pt.c (instantiate_clone): Remove, fold into ...
9008 (instantiate_template): ... here. Simplify by removing mutual
9010 * typeck2.c (build_m_component_ref): Don't cv qualify the function
9011 pointed to by a pointer to function.
9012 * class.c (delete_duplicate_fields_1): Typo.
9014 2001-12-18 Jason Merrill <jason@redhat.com>
9016 C++ ABI change: destroy value arguments in caller.
9017 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9018 create an extra binding level for the parameters.
9019 * decl.c (store_parm_decls): Don't do parameter cleanups.
9021 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9023 * call.c (build_new_method_call): Use '%#V'.
9024 * error.c (cv_to_string): Use V parameter to determine padding.
9026 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9028 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9029 spellings in messages.
9031 2001-12-17 Zack Weinberg <zack@codesourcery.com>
9033 * cp-tree.h: Delete #defines for cp_error, cp_warning,
9034 cp_pedwarn, and cp_compiler_error.
9035 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9036 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9037 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9038 typeck2.c: Change calls to the above macros to use their
9039 language-independent equivalents: error, warning, pedwarn, and
9040 internal_error respectively.
9042 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
9044 * decl2.c (finish_file): Remove back_end_hook.
9046 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9048 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9049 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9050 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9052 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
9054 * lang-options.h: Use American spelling in messages.
9056 2001-12-13 Jason Merrill <jason@redhat.com>
9058 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9060 Use cleanups to run base and member destructors.
9061 * init.c (push_base_cleanups): New function, split out from...
9062 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
9063 * decl.c (finish_destructor_body): Move vbase destruction code to
9065 (begin_function_body, finish_function_body): New fns.
9066 (finish_function): Move [cd]tor handling and call_poplevel to
9067 finish_function_body.
9068 (pushdecl): Skip the new level.
9069 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9070 (setup_vtbl_ptr): Call push_base_cleanups.
9071 * method.c (synthesize_method): Call {begin,end}_function_body.
9072 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9073 * cp-tree.h: Declare new fns.
9074 * parse.y (function_body, .begin_function_body): New nonterminals.
9075 (fndef, pending_inline, function_try_block): Use function_body.
9076 (ctor_initializer_opt, function_try_block): No longer has a value.
9077 (base_init): Remove .set_base_init token.
9078 (.set_base_init, compstmt_or_error): Remove.
9079 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9081 * optimize.c (maybe_clone_body): Fix parameter updating.
9083 2001-12-12 Jason Merrill <jason@redhat.com>
9085 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9086 * semantics.c (genrtl_start_function): Don't pass
9087 parms_have_cleanups or push an extra binding level.
9088 (genrtl_finish_function): Lose cleanup_label cruft.
9090 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9091 (ctor_label): Remove.
9092 * semantics.c (finish_return_stmt): Lose ctor_label support.
9093 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9094 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9097 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9099 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9101 * decl.c (finish_function): Check VMS_TARGET, not VMS.
9103 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9104 (end_cleanup_fn): And poplevel.
9106 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9107 if we're in a template.
9109 2001-12-12 Jakub Jelinek <jakub@redhat.com>
9111 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9112 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9113 THIS_NAME_P): Delete.
9114 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9115 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9116 with internal naming scheme.
9117 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9119 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
9121 * decl.c (grokdeclarator): Deprecated implicit typename use.
9123 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
9126 * parse.y (frob_specs): Indicate it is a language linkage which
9127 contained the extern.
9128 * decl.c (grokdeclarator): Allow extern language linkage with
9131 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
9134 * decl.c (add_binding): Don't reject duplicate typedefs involving
9135 template parameters.
9137 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
9139 * parse.y, semantics.c: Similarly.
9141 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
9144 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9145 (copy_args_p): Rename to ...
9146 (copy_fn_p): ... here.
9147 (grok_special_member_properties): New function.
9148 (grok_op_properties): Lose VIRTUALP parameter.
9149 (copy_assignment_arg_p): Remove.
9150 * call.c (build_over_call): Use copy_fn_p.
9151 * decl.c (grokfndecl): Reformat. Adjust call to
9153 (copy_args_p): Rename to ...
9154 (copy_fn_p): ... here. Reject template functions. Check for pass
9156 (grok_special_member_properties): Remember special functions.
9157 (grok_ctor_properties): Don't remember them here, just check.
9158 (grok_op_properties): Likewise.
9159 (start_method): Call grok_special_member_properties.
9160 * decl2.c (grokfield): Likewise.
9161 (copy_assignment_arg_p): Remove.
9162 (grok_function_init): Don't remember abstract assignment here.
9163 * pt.c (instantiate_class_template): Call
9164 grok_special_member_properties.
9165 (tsubst_decl): Adjust grok_op_properties call.
9167 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
9169 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
9170 RID_TYPES_COMPATIBLE_P.
9172 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
9174 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
9175 call to build_aggr_init.
9176 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
9178 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
9180 * parse.y: Replace uses of the string non-terminal with STRING.
9181 Don't perform string concatentaion here.
9182 (string): Remove non-terminal.
9183 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
9185 2001-12-05 Jason Merrill <jason@redhat.com>
9187 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
9188 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
9189 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
9190 * pt.c (push_tinst_level): No longer static.
9191 * cp-tree.h: Declare them.
9193 * init.c (resolve_offset_ref): Don't check access for the base
9194 conversion to access a FIELD_DECL.
9196 * cp-tree.h (TYPE_REFFN_P): New macro.
9197 * decl.c (bad_specifiers): Check it, too.
9199 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
9200 on the __*_type_info type if we haven't seen a definition.
9202 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
9204 * decl.c: Include c-common.h.
9205 (shadow_warning): Move to c-common.c.
9207 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9209 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9211 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9213 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
9215 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9218 * init.c (sort_base_init): Allow binfos to be directly specified.
9219 * method.c (do_build_copy_constructor): Explicitly convert to the
9221 (do_build_assign_ref): Likewise.
9223 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
9225 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
9226 declaration and initialization.
9228 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9230 * typeck2.c: Remove leading capital from diagnostic messages, as
9231 per GNU coding standards.
9233 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
9236 * decl.c (xref_basetypes): Handle attributes between
9239 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
9242 * parse.y (named_complex_class_head_sans_basetype): Add new
9244 * Make-lang.in (parse.c): Adjust expected conflict count.
9246 2001-12-03 Jason Merrill <jason@redhat.com>
9248 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
9249 immediate binfos for our virtual bases.
9251 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
9253 * call.c (build_java_interface_fn_ref): Similarly.
9254 * except.c (is_admissible_throw_operand): Similarly.
9255 * init.c (build_java_class_ref): Similarly.
9256 * xref.c (open_xref_file): Similarly.
9258 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9260 * class.c (finish_struct): Remove trailing periods from messages.
9261 * decl.c (check_tag_decl): Similarly.
9262 * lex.c (cxx_set_yydebug): Similarly.
9263 * typeck2.c (friendly_abort): Similarly.
9265 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9268 * cp-tree.h (ovl_member): Remove.
9269 * decl2.c (merge_functions): Handle extern "C" functions
9271 * tree.c (ovl_member): Remove.
9273 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9276 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
9277 FUNCTION_DECL, as input.
9278 (mark_overriders): Remove.
9279 (warn_hidden): Rework for the new ABI.
9281 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9284 * call.c (convert_like_real): Do not build additional temporaries
9285 for rvalues of class type.
9287 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
9289 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
9290 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
9291 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
9292 (DERIVED_FROM_P): Likewise.
9293 (enum base_access): Renumber, add ba_quiet bit mask.
9294 (get_binfo): Remove.
9295 (get_base_distance): Remove.
9296 (binfo_value): Remove.
9297 (ACCESSIBLY_DERIVED_FROM_P): Remove.
9298 * call.c (standard_conversion): Use lookup_base.
9299 * class.c (strictly_overrides): Likewise.
9300 (layout_virtual_bases): Likewise.
9301 (warn_about_ambiguous_direct_bases): Likewise.
9302 (is_base_of_enclosing_class): Likewise.
9303 (add_vcall_offset_vtbl_entries_1): Likewise.
9304 * cvt.c (build_up_reference): Adjust comment.
9305 * init.c (build_member_call): Reformat.
9306 * search.c (get_binfo): Remove.
9307 (get_base_distance_recursive): Remove.
9308 (get_base_distance): Remove.
9309 (lookup_base_r): Tweak.
9310 (lookup_base): Add ba_quiet control. Complete the types here.
9311 (covariant_return_p): Use lookup_base.
9312 * tree.c (binfo_value): Remove.
9313 (maybe_dummy_object): Use lookup_base.
9314 * typeck.c (build_static_cast): Use lookup_base.
9315 (get_delta_difference): Likewise.
9316 * typeck2.c (binfo_or_else): Use lookup_base.
9317 (build_scoped_ref): Add back error_mark_check.
9318 (build_m_component_ref): Use lookup_base.
9320 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9322 * Make-lang.in (c++.generated-manpages): New dummy target.
9324 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9326 * Make-lang.in (cp-lang.o): Depends on c-common.h.
9327 * cp-lang.c (c-common.h): Include.
9328 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
9329 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
9330 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
9332 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
9334 * decl2.c (c_language): Move to c-common.c.
9335 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
9339 2001-11-26 Jason Merrill <jason@redhat.com>
9341 * call.c (joust): Remove COND_EXPR hack.
9343 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
9345 * search.c (lookup_base_r): Declare bk in variable declaration
9348 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
9351 * class.c (build_vbase_pointer): Remove.
9352 (build_vbase_path): Remove.
9353 (build_base_path): New function.
9354 * cp-tree.h (base_access, base_kind): New enumerations.
9355 (build_base_path): Declare.
9356 (convert_pointer_to_real): Remove.
9357 (convert_pointer_to): Remove.
9358 (lookup_base): Declare.
9359 (convert_pointer_to_vbase): Remove.
9360 * call.c (build_scoped_method_call): Use lookup_base &
9361 build_base_path instead of convert_pointer_to_real,
9362 get_base_distance & get_binfo.
9363 (build_over_call): Likewise.
9364 * cvt.c (cp_convert_to_pointer): Likewise.
9365 (convert_to_pointer_force): Likewise.
9366 (build_up_reference): Likewise.
9367 (convert_pointer_to_real): Remove.
9368 (convert_pointer_to): Remove.
9369 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
9370 instead of convert_pointer_to_vbase & build_vbase_path.
9371 (emit_base_init): Use build_base_path instead of
9372 convert_pointer_to_real.
9373 (expand_virtual_init): Lose unrequired conversions.
9374 (resolve_offset_ref): Use lookup_base and build_base_path
9375 instead of convert_pointer_to.
9376 * rtti.c (build_dynamic_cast_1): Use lookup_base &
9377 build_base_path instead of get_base_distance & build_vbase_path.
9378 * search.c (get_vbase_1): Remove.
9379 (get_vbase): Remove.
9380 (convert_pointer_to_vbase): Remove.
9381 (lookup_base_r): New function.
9382 (lookup_base): New function.
9383 * typeck.c (require_complete_type): Use lookup_base &
9384 build_base_path instead of convert_pointer_to.
9385 (build_component_ref): Likewise.
9386 (build_x_function_call): Likewise.
9387 (get_member_function_from_ptrfunc): Likewise.
9388 (build_component_addr): Likewise.
9389 * typeck2.c (build_scoped_ref): Likewise.
9391 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9393 * cp-tree.h (CP_TYPE_QUALS): Removed.
9394 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9395 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9396 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9397 * dump.c (cp_dump_tree): Use void* dump_info argument to match
9398 lang-hooks prototype.
9399 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9400 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9401 CP_TYPE_QUALS changed to cp_type_quals.
9402 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9403 (CXX_C_OBJS): Remove c-dump.o.
9405 2001-11-21 Mark Mitchell <mark@codesourcery.com>
9408 * pt.c (lookup_template_class): Ensure that all specializations
9409 are registered on the list corresponding to the most general
9412 2001-11-20 Mark Mitchell <mark@codesourcery.com>
9414 * call.c (non_reference): Add documentation.
9415 (convert_class_to_reference): Do not strip reference types
9416 from conversion operators.
9417 (maybe_handle_ref_bind): Simplify.
9418 (compare_ics): Correct handling of references.
9420 2001-11-19 John Wilkinson <johnw@research.att.com>
9422 * dump.c (dump_op): New function.
9423 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
9424 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9425 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9427 2001-11-19 Mark Mitchell <mark@codesourcery.com>
9430 * semantics.c (finish_sizeof): Make sure that expression created
9431 while processing a template do not have a type.
9432 (finish_alignof): Likewise.
9433 * typeck.c (c_sizeof): Likewise.
9434 (expr_sizeof): Likewise.
9436 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9438 * lex.c (cxx_finish): Call c_common_finish.
9439 (finish_parse): Remove.
9441 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9443 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9444 when displaying error message about missing array bounds.
9446 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9448 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9450 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9452 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
9454 * cp-tree.h (print_class_statistics): Restore.
9456 2001-11-15 Jason Merrill <jason@redhat.com>
9458 * method.c (use_thunk): Don't emit debugging information for thunks.
9460 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9461 * decl.c (make_typename_type): Handle getting a class template.
9462 * search.c (lookup_field_r): A class template is good enough for
9465 * call.c (convert_like_real): Only use cp_convert for the bad part.
9466 (standard_conversion): Also allow bad int->enum.
9467 * typeck.c (ptr_reasonably_similar): Also allow functions to
9468 interconvert. Pointers to same-size integers are reasonably
9471 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9474 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
9477 * init.c (sort_base_init): Remove unreachable code.
9478 (expand_member_init): Adjust comment to reflect reality. Simplify
9479 and remove unreachable code.
9481 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9483 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9484 (cxx_init): Update prototype.
9485 * decl.c (init_decl_processing): Rename. Move null node init
9486 to its creation time.
9487 * lex.c (cxx_init_options): Update.
9488 (cxx_init): Combine with old init_parse; also call
9489 cxx_init_decl_processing.
9491 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
9493 * decl.c (check_initializer): Try to complete the type of an
9494 array element before checking whether it's complete. Don't
9495 complain about arrays with complete element types but an
9497 (cp_finish_decl): Build the hierarchical constructor before
9498 calling maybe_deduce_size_from_array_init.
9500 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
9502 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9504 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
9507 * parse.y (already_scoped_stmt): Remove.
9508 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9510 2001-11-12 H.J. Lu <hjl@gnu.org>
9512 * cvt.c (ocp_convert): Don't warn the address of a weak
9513 function is always `true'.
9515 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9517 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9518 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9519 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9520 * cp-tree.h (print_class_statistics): Remove.
9521 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9522 cxx_print_identifier, cxx_set_yydebug): New.
9523 * lex.c (set_yydebug): Rename c_set_yydebug.
9524 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9525 lang_print_xnode): Rename.
9526 * tree.c (print_lang_statistics): Rename.
9528 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9530 * class.c (dump_array): Fix format specifier warning.
9532 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9534 * cp-lang.c (LANG_HOOKS_NAME): Override.
9535 (struct lang_hooks): Constify.
9536 * lex.c (cxx_init_options): Update.
9537 (lang_identify): Remove.
9538 * parse.y (language_string): Remove.
9540 2001-11-08 Andreas Franck <afranck@gmx.de>
9542 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9543 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9544 suggested by autoconf.
9545 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9546 (c++.install-common): Use the transformed target alias names.
9548 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9550 * Make-lang.in: Update.
9551 * cp-lang.c: Include langhooks-def.h.
9553 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9555 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9557 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9559 * lex.c (copy_lang_type): Add static prototype.
9561 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9563 * pt.c (unify): Handle SCOPE_REF.
9565 2001-11-01 Jakub Jelinek <jakub@redhat.com>
9567 * tree.c (cp_copy_res_decl_for_inlining): Adjust
9568 DECL_ABSTRACT_ORIGIN for the return variable.
9570 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9572 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9574 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
9576 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9577 semantics.c, spew.c: Fix spelling errors.
9579 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9581 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
9583 2001-10-25 Zack Weinberg <zack@codesourcery.com>
9585 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
9588 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9590 * cp-lang.c (cxx_get_alias_set): New function.
9591 Point LANG_HOOKS_GET_ALIAS_SET to it.
9593 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9595 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
9596 * cp-tree.h (make_unbound_class_template): Prototype new function.
9597 * decl.c (make_unbound_class_template): New function.
9598 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
9599 * error.c (dump_type): Likewise.
9600 * mangle.c (write_type): Likewise.
9601 * parse.y (template_parm): Likewise.
9602 (template_argument): Use make_unbound_class_template.
9603 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
9605 (tsubst_copy): Likewise.
9607 * tree.c (walk_tree): Likewise.
9608 * typeck.c (comptypes): Likewise.
9610 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9612 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
9613 extra calls into fewer ones.
9615 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
9617 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
9618 Warn when merging inline with attribute noinline.
9619 (start_decl, start_function): Warn if inline and attribute
9620 noinline appear in the same declaration.
9622 2001-10-16 H.J. Lu <hjl@gnu.org>
9624 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
9625 for tree checking disabled.
9627 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
9629 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
9630 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
9632 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9634 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
9635 (unify): Only handle MINUS_EXPR specially if the above flag is set
9636 and the subtracted constant is 1. Clear the flag on recursive calls.
9637 Set it when unifying the maximum value in an INTEGER_TYPE's range.
9639 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9641 * decl.c (bad_specifiers): Don't allow exception specifications
9644 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
9646 * cp/lex.c (init_cp_pragma): Similarly.
9648 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9650 * pt.c (lookup_template_class): Build complete template arguments
9651 for BOUND_TEMPLATE_TEMPLATE_PARM.
9653 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9655 * cp-tree.h (TYPE_BINFO): Update comment.
9656 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9657 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9658 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9659 (copy_type): Prototype new function.
9660 * lex.c (copy_lang_decl): Gather tree node statistics.
9661 (copy_lang_type): New function.
9662 (copy_type): Likewise.
9663 (cp_make_lang_type): Create lang_type for
9664 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
9665 and BOUND_TEMPLATE_TEMPLATE_PARM.
9666 * pt.c (tsubst): Use copy_type instead of copy_node.
9667 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9669 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9671 * pt.c (determine_specialization): Ignore functions without
9674 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
9677 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9679 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
9681 * typeck2.c (store_init_value): Don't re-digest a bracketed
9684 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9687 2001-10-11 Richard Henderson <rth@redhat.com>
9689 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9690 of an asm statement.
9691 (build_vtbl_ref_1): Split out from build_vtbl_ref.
9692 (build_vfn_ref): Use it to handle vtable descriptors before
9693 calling build_vtable_entry_ref.
9694 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9696 2001-10-10 Richard Henderson <rth@redhat.com>
9698 * parse.y (asm_operand): Allow named operands.
9699 * semantics.c (finish_asm_stmt): Tweek for changed location
9700 of the operand constraint.
9702 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
9704 * call.c (standard_conversion): Add bad conversion between
9705 integers and pointers.
9706 (convert_like_real): Don't use convert_for_initialization for bad
9707 conversions; complain here and use cp_convert.
9708 (build_over_call): Don't handle bad conversions specially.
9709 (perform_implicit_conversion): Allow bad conversions.
9710 (can_convert_arg_bad): New fn.
9711 * cp-tree.h: Declare it.
9712 * typeck.c (convert_for_assignment): Use it.
9713 (ptr_reasonably_similar): Any target type is similar to void.
9715 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
9717 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9718 (cp/cp-lang.o): New rule.
9719 * cp-tree.h: Declare hooks.
9720 * tree.c: Make hooks non-static.
9721 (init_tree): Don't initialize hooks here.
9722 * lex.c: Likewise. Move definition of lang_hooks to...
9723 * cp-lang.c: ... new file.
9725 2001-10-08 Richard Henderson <rth@redhat.com>
9727 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
9728 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
9730 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9732 * class.c (build_vtable_entry_ref): Const-ify.
9733 * decl.c (predefined_identifier,
9734 initialize_predefined_identifiers): Likewise.
9735 * init.c (build_new_1): Likewise.
9736 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9739 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
9741 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9742 (INSNS_PER_STMT): Likewise.
9743 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9744 (copy_body, initialize_inlined_parameters): Likewise.
9745 (declare_return_variable, inlinable_function_p): Likewise.
9746 (expand_call_inline, expand_calls_inline): Likewise.
9747 (optimize_inline_calls, clone_body): Likewise.
9748 * tree.c (walk_tree): Moved to ../tree-inline.c.
9749 (walk_tree_without_duplicates): Likewise.
9750 (copy_tree_r, remap_save_expr): Likewise.
9752 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
9754 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9755 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9756 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9757 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9758 (flag_inline_trees): Moved declaration to ../tree-inline.h.
9759 (walk_tree): Moved declaration to ../tree-inline.h.
9760 (walk_tree_without_duplicates, copy_tree_r): Likewise.
9761 (remap_save_expr): Likewise.
9762 * decl.c: Include tree-inline.h.
9763 (lang_mark_tree): Don't mark inlined_fns.
9764 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9765 * optimize.c: Include tree-inline.h.
9766 (optimize_inline_calls): Move declaration to ../tree.h, as
9768 (remap_decl): Use language-independent constructs and hooks.
9769 (remap_block, copy_body_r, declare_return_variable): Likewise.
9770 (inlinable_function_p): Likewise. Don't test for
9771 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9772 no longer language-specific.
9773 (optimize_inline_calls): Likewise. Make it non-static. Moved
9774 call of dump_function to...
9775 (optimize_function): Here...
9776 (clone_body): New function, extracted from...
9777 (maybe_clone_body): ... here. Build decl_map locally and pass
9778 it on to clone_body.
9779 * pt.c, semantics.c: Include tree-inline.h.
9781 (cp_walk_subtrees): New language-specific hook for tree inlining.
9782 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9783 cp_is_overload_p, cp_auto_var_in_fn_p,
9784 cp_copy_res_decl_for_inlining): Likewise.
9785 (walk_tree): Move language-specific constructs into...
9786 (cp_walk_subtrees): this new function.
9787 (copy_tree_r): Use language-independent constructs and hooks.
9788 (init_tree): Initialize tree inlining hooks.
9789 (remap_save_expr): Adjust prototype so that the declaration
9790 does not require the definition of splay_tree.
9792 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
9794 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
9795 to build the declaration instead of the declaration itself.
9797 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
9799 * decl2.c (cxx_decode_option): Add 'else'.
9801 * spew.c (end_input): No longer static.
9802 * cp-tree.h: Declare it.
9803 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
9805 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9807 * call.c (build_over_call), typeck.c (build_function_call_real):
9808 Pass type attributes to check_function_format rather than name or
9809 assembler name. Don't require there to be a name or assembler
9810 name to check formats.
9812 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9814 * decl.c (init_decl_processing): Don't call
9815 init_function_format_info. Initialize lang_attribute_table
9817 (builtin_function): Call decl_attributes.
9818 (insert_default_attributes): New.
9820 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
9822 * decl.c (grokdeclarator): Copy array typedef handling from C
9825 * decl.c (grokdeclarator): Copy too-large array handling from C
9828 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
9830 * config-lang.in (target_libs): Added target-gperf, so that we
9831 don't try to build it if C++ is disabled.
9833 2001-09-23 Zack Weinberg <zack@codesourcery.com>
9835 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
9836 (cp/errfn.o): Delete rule.
9837 (cp/error.o): Depend on flags.h.
9838 * errfn.c: Delete file.
9839 * cp-tree.h: Declare warn_deprecated. Remove definitions of
9840 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
9841 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
9842 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
9843 internal_error respectively. Make cp_deprecated into a macro.
9844 Don't define cp_printer typedef or declare cp_printers.
9845 * error.c: Include flags.h.
9846 Delete: struct tree_formatting_info, print_function_argument_list,
9847 print_declaration, print_expression, print_function_declaration,
9848 print_function_parameter, print_type_id, print_cv_qualifier_seq,
9849 print_type_specifier_seq, print_simple_type_specifier,
9850 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
9851 print_parameter_declaration_clause, print_exception_specification,
9852 print_nested_name_specifier, and definition of cp_printers.
9853 (locate_error): New function.
9854 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
9855 rewritten in terms of locate_error and diagnostic.c.
9856 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
9857 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
9858 (init_error): Adjust to match.
9860 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9862 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
9864 2001-09-21 Richard Henderson <rth@redhat.com>
9866 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
9867 (build_vtbl_initializer): Likewise.
9868 (build_vfn_ref): New.
9869 * cp-tree.h: Declare it.
9870 * call.c (build_over_call): Use it.
9871 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
9872 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
9874 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
9876 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
9878 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
9880 Table-driven attributes.
9881 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
9882 * decl2.c (cplus_decl_attributes): Only take one attributes
9884 * cp-tree.c (cplus_decl_attributes): Update prototype.
9885 * class.c (finish_struct), decl.c (start_decl, start_function),
9886 decl2.c (grokfield), friend.c (do_friend), parse.y
9887 (parse_bitfield): Update calls to cplus_decl_attributes.
9888 * decl.c (grokdeclarator): Take a pointer to a single ordinary
9890 * decl.h (grokdeclarator): Update prototype.
9891 * decl2.c (grokfield): Take a single ordinary attribute list.
9892 * friend.c (do_friend): Likewise.
9893 * decl.c (shadow_tag, groktypename, start_decl,
9894 start_handler_parms, grokdeclarator, grokparms, start_function,
9895 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
9896 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
9897 (process_template_parm, do_decl_instantiation): Pass single
9898 ordinary attribute lists around.
9899 * decl.c (grokdeclarator): Correct handling of nested attributes.
9901 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9902 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9905 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
9906 (cp_attribute_table): Declare.
9907 * decl.c (valid_lang_attribute): Don't define.
9908 (lang_attribute_table): Define.
9909 (init_decl_processing): Initialize lang_attribute_table instead of
9910 valid_lang_attribute.
9911 * tree.c (cp_valid_lang_attribute): Remove.
9912 (handle_java_interface_attribute, handle_com_interface_attribute,
9913 handle_init_priority_attribute): New functions.
9914 (cp_attribute_table): New array.
9915 * decl2.c (import_export_class): Don't use
9916 targetm.valid_type_attribute.
9918 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9920 * Make-lang.in (cp/error.o): Depend on real.h
9921 * error.c: #include "real.h"
9923 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9925 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
9926 xmalloc/strcpy/strcat.
9928 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9930 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
9932 * pt.c (tsubst_decl): Likewise.
9934 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9936 * decl2.c (lang_f_options): Const-ification.
9937 * lex.c (cplus_tree_code_name): Likewise.
9938 * spew.c (yyerror): Likewise.
9940 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9943 * class.c (force_canonical_binfo_r): Check & move an indirect
9945 (force_canonical_binfo): Check that it's not already
9947 (mark_primary_virtual_base): Remove BINFO parameter.
9948 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
9950 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9952 Remove TYPE_NONCOPIED_PARTS.
9953 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
9954 CLASSTYPE_PURE_VIRTUALS.
9955 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
9956 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
9957 (layout_class_type): Don't call fixup_inline_methods here ...
9958 (finish_struct_1): ... call it here.
9960 2001-09-04 Mark Mitchell <mark@codesourcery.com>
9962 * decl.c (duplicate_decls): Remove code deadling with
9964 * decl2.c (finish_file): Likewise.
9965 * pt.c (instantiate_decl): Likewise.
9966 * semantics.c (expand_body): Don't defer local functions if
9967 they wouldn't be deferred for some other reason. Don't
9968 generate RTL for functions that will not be emitted.
9969 (genrtl_start_function): Remove code deadling with
9971 (genrtl_finish_function): Likewise.
9973 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
9976 * call.c (build_over_call): Do not optimize any empty base
9979 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9981 * error.c (dump_template_decl): Output template parameters
9982 together with their specifiers.
9983 Output `class' prefix for template template parameter.
9984 (dump_decl): Fix formatting.
9986 2001-08-30 Kurt Garloff <garloff@suse.de>
9988 * optimize.c (inlinable_function_p): Allow only smaller single
9989 functions. Halve inline limit after reaching recursive limit.
9991 2001-08-30 Joern Rennecke <amylaar@redhat.com>
9992 Jason Merrill <jason_merrill@redhat.com>
9994 * class.c (build_vtable_entry_ref): Subtract in char*, not
9997 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
9999 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10000 (build_cplus_array_type): Use cp_build_qualified_type, not
10001 TYPE_MAIN_VARIANT, to get an unqualified version.
10003 * decl2.c (grok_alignof): Lose.
10004 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10005 * typeck.c (c_alignof): Lose.
10006 * semantics.c (finish_sizeof, finish_alignof): New.
10007 * parse.y: Use them.
10008 * cp-tree.h: Declare them.
10010 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
10012 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10013 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10014 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10016 2001-08-19 Jakub Jelinek <jakub@redhat.com>
10018 * typeck2.c (add_exception_specifier): Only require complete type if
10019 not in processing template declaration.
10021 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10023 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10024 GNU_xref_start_scope and GNU_xref_end_scope.
10026 * tree.c (TYPE_HASH): Moved to ../tree.h.
10028 2001-08-16 Mark Mitchell <mark@codesourcery.com>
10030 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10033 2001-08-14 Richard Henderson <rth@redhat.com>
10035 * class.c, cp-tree.h (build_vfn_ref): Remove.
10036 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10038 2001-08-13 Mark Mitchell <mark@codesourcery.com>
10040 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10041 empty class assignment as having side-effects to avoid
10044 2001-08-13 Zack Weinberg <zackw@panix.com>
10046 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10047 * except.c: Include libfuncs.h.
10049 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10051 * decl.c (grokdeclarator): Clarify diagnostic message.
10053 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10055 * decl2.c (do_nonmember_using_decl): Replace using directive
10056 with using declaration in the error message.
10058 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10060 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10061 criterion to avoid rebuilding expression tree instead of
10062 processing_template_decl.
10064 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10066 Support named return value optimization for inlines, too.
10067 * decl.c (finish_function): Nullify returns here.
10068 * semantics.c (genrtl_start_function): Not here.
10069 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10070 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
10071 Also nullify the CLEANUP_STMT for the nrv.
10072 * cp-tree.h: Declare it.
10073 * optimize.c (declare_return_variable): Replace the nrv with the
10075 * typeck.c (check_return_expr): Be more flexible on alignment check.
10076 Ignore cv-quals when checking for a matching type.
10078 2001-08-09 Richard Henderson <rth@redhat.com>
10080 * decl2.c (finish_objects): Use target hooks instead of
10081 assemble_constructor and assemble_destructor.
10083 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10085 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10087 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
10090 Stop using TYPE_NONCOPIED_PARTS.
10091 * call.c (build_over_call): Be careful when copy constructing
10092 or assigning to an empty class.
10093 * class.c (check_bases_and_members): It has a
10094 COMPLEX_ASSIGN_REF if it has a vptr.
10095 (layout_class_type): Don't add empty class padding to
10096 TYPE_NONCOPIED_PARTS.
10097 (finish_struct_1): Don't add the VFIELD either.
10098 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10101 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10103 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10105 2001-08-06 Richard Henderson <rth@redhat.com>
10107 * decl2.c (finish_objects): Pass a symbol_ref and priority to
10108 assemble_{constructor,destructor}. Remove priority handling.
10110 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10112 Don't allow template-id in using-declaration.
10113 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10114 (do_class_using_decl): Likewise.
10116 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10118 * cp/spew.c (read_token): No need to pop buffers.
10120 2001-08-02 Stan Shebs <shebs@apple.com>
10122 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10123 (fnaddr_from_vtable_entry): Remove decl.
10124 * method.c (use_thunk): Update comment.
10126 2001-08-01 Andrew Cagney <ac131313@redhat.com>
10128 * repo.c (get_base_filename): Change return value to const char
10131 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
10135 * cp-tree.h (flag_honor_std): Remove.
10136 (CPTI_FAKE_STD): Remove.
10137 (std_node): Remove comment about it being NULL.
10138 (fake_std_node): Remove.
10139 * decl.c (in_fake_std): Remove.
10140 (walk_namespaces_r): Remove fake_std_node check.
10141 (push_namespace): Remove in_fake_std code.
10142 (pop_namespace): Likewise.
10143 (lookup_name_real): Remove fake_std_node check.
10144 (init_decl_processing): Always create std_node. Always add
10145 std:: things there.
10146 (builtin_function): Always put non '_' fns in std.
10147 * decl2.c (flag_honor_std): Remove.
10148 (lang_f_options): Remove honor-std.
10149 (unsupported_options): Add honor-std.
10150 (set_decl_namespace): Remove fake_std_node check.
10151 (validate_nonmember_using_decl): Likewise.
10152 (do_using_directive): Likewise.
10153 (handle_class_head): Likewise.
10154 * dump.c (cp_dump_tree): Likewise.
10155 * except.c (init_exception_processing): Adjust.
10156 * init.c (build_member_call): Remove fake_std_node check.
10157 (build_offset_ref): Likewise.
10158 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10159 * rtti.c (init_rtti_processing): Adjust.
10161 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10163 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10164 operand while calling cp_tree_equal.
10166 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10168 The 3.0 ABI no longer has vbase pointer fields.
10169 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
10170 FORMAT_VBASE_NAME): Remove.
10171 * method.c (do_build_copy_constructor): Adjust.
10172 (do_build_assign_ref): Adjust.
10173 * search.c (lookup_field_r): Adjust.
10174 * typeck.c (build_component_ref): Adjust.
10176 The 3.0 ABI always has a vtable pointer at the start of every
10178 * rtti.c (build_headof_sub): Remove.
10179 (build_headof): Adjust.
10180 (get_tinfo_decl_dynamic): No need to check flag_rtti
10182 (create_real_tinfo_var): Explain why we need a hidden name.
10184 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10187 * class.c (update_vtable_entry_for_fn): The fixed adjustment
10188 of a virtual thunk should be from declaring base.
10190 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10192 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
10193 the shared virtual base, so preserving inheritance graph order.
10195 2001-07-30 Andreas Jaeger <aj@suse.de>
10197 * decl2.c: Remove unused var global_temp_name_counter.
10199 2001-07-28 Richard Henderson <rth@redhat.com>
10201 * method.c (pending_inlines): Remove.
10203 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10205 * class.c (mark_primary_virtual_base): Don't adjust base
10207 (dfs_unshared_virtual_bases): Adjust them here.
10208 (mark_primary_bases): Explain why we adjust at the end.
10210 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10212 * class.c (finish_struct_1): When copying the primary base's
10213 VFIELD, make sure we find it is at offset zero.
10215 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10217 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
10218 tsubst_expr for default template arguments.
10220 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10223 * spew.c (yylex): Only copy the token's lineno, if it is
10226 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10229 * call.c (resolve_args): Simplify, call
10230 convert_from_reference.
10231 (build_new_op): Resolve and convert from reference ARG1
10232 earlier. Adjust ARG2 & ARG3 resolve and conversion.
10234 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10236 * decl.c (last_function_parm_tags): Remove.
10237 (current_function_parm_tags): Remove.
10238 (init_decl_processing): Adjust.
10239 (start_function): Adjust.
10240 (store_parm_decls): Adjust.
10243 * decl.c (grokdeclarator): Detect when a function typedef is
10244 declaring a function, and create last_function_parms correctly.
10246 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
10248 * call.c (joust): Only prefer a non-builtin candidate to a builtin
10249 one if they have the same signature.
10251 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
10252 it rather than toplevel_bindings_p. Give it a mangled name if static.
10253 (convert_to_reference): Adjust.
10254 * decl2.c (get_temp_name): Lose.
10255 * mangle.c (mangle_ref_init_variable): New fn.
10256 (mangle_guard_variable): Strip the ref-init header.
10257 * cp-tree.h: Adjust.
10258 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
10260 (grok_reference_init): Always use DECL_INITIAL.
10262 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10265 * call.c (build_conditional_expr): Recheck args after
10267 * cp-tree.h (build_conditional_expr): Move to correct file.
10268 * typeck.c (decay_conversion): Diagnose any unknown types
10270 (build_binary_op): Don't do initial decay or default
10271 conversions on overloaded functions.
10272 (build_static_cast): Don't do a decay conversion here.
10274 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10277 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
10278 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
10280 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10282 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
10283 (create_vtbl_ptr): ... here.
10285 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10287 * class.c (build_vbase_offset_vbtl_entries): Look for
10288 non-primary base of which we are a sub vtable.
10290 2001-07-24 Phil Edwards <pme@sources.redhat.com>
10292 * semantics.c (finish_this_expr): Remove unused code.
10294 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
10296 Simplify rtti, now we've only one ABI.
10297 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10299 (tinfo_decl_id, tinfo_var_id): Remove.
10300 (get_typeid_1): Remove.
10302 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
10303 (typeid_ok_p): New function.
10304 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
10305 (get_tinfo_decl): Remove old abi documentation.
10306 (tinfo_from_decl): Remove.
10307 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
10308 (get_typeid_1): Remove.
10309 (get_base_offset): Remove.
10310 (synthesize_tinfo_var): Absorb get_base_offset.
10311 (create_real_tinfo_var): Don't use tinfo_decl_id.
10313 2001-07-23 Graham Stott <grahams@redhat.com>
10315 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
10316 variable has_two_argument_delete_p.
10318 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
10320 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
10321 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
10322 (CPTI_INDEX_IDENTIFIER): Remove.
10323 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
10324 (delta2_identifier): Remove.
10325 (index_identifier): Remove.
10326 (pfn_or_delta2_identifier): Remove.
10327 (flag_vtable_thunks): Remove.
10328 (VTABLE_DELTA2_NAME): Remove.
10329 (VTABLE_INDEX_NAME): Remove.
10330 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
10331 (vfunc_ptr_type_node): Adjust.
10332 (VTABLE_NAME_PREFIX): Adjust.
10333 (build_vfn_ref): Lose first parameter.
10334 (fixup_all_virtual_upcast_offsets): Remove.
10335 * decl.c (initialize_predefined_identifiers): Remove
10336 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
10337 (init_decl_processing): Remove no-vtable-thunk code.
10338 * decl2.c (flag_vtable_thunks): Remove.
10339 (mark_vtable_entries): Remove no-vtable-thunk code.
10340 * error.c (dump_decl): Remove no-vtable-thunk code.
10341 (dump_expr): Adjust ptr to member function code.
10342 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
10344 * rtti.c (build_headof): Remove no-vtable-thunk code.
10345 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
10346 * search.c (get_base_distance): Remove expand_upcast_fixups case.
10347 (virtual_context) Remove.
10348 (expand_upcast_fixups): Remove.
10349 (fixup_virtual_upcast_offsets): Remove.
10350 (fixup_all_virtual_upcast_offsets): Remove.
10351 * typeck.c (get_member_function_from_ptrfunc): Remove
10352 no-vtable-thunk code.
10353 * call.c (build_over_call): Adjust call to build_vfn_ref.
10354 * class.c (build_vfn_ref): Lose first parameter. Remove
10355 no-vtable-thunk code.
10356 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
10357 (build_vtable_entry): Remove no-vtable-thunk code.
10359 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
10361 Remove old-abi remnants. Remove comments about old abi
10362 behavior. Remove references to 'new-abi' in comments.
10363 * cp-tree.h: Adjust comments.
10364 (vbase_offsets_in_vtable_p): Delete.
10365 (vcall_offsets_in_vtable_p): Delete.
10366 (vptrs_present_everywhere_p): Delete.
10367 (all_overridden_vfuns_in_vtables_p): Delete.
10368 (merge_primary_and_secondary_vtables_p): Delete.
10369 (TYPE_CONTAINS_VPTR_P): Adjust.
10370 (VTT_NAME_PREFIX): Remove.
10371 (CTOR_VTBL_NAME_PREFIX): Remove.
10372 (init_vbase_pointers): Remove.
10373 * class.c: Adjust coments.
10374 (build_vbase_pointer_fields): Delete.
10375 (build_vbase_pointer): Remove old-abi code.
10376 (build_secondary_vtable): Likewise.
10377 (modify_all_vtables): Likewise.
10378 (create_vtable_ptr): Likewise.
10379 (layout_class_type): Likewise.
10380 (finish_struct_1): Likewise.
10381 (finish_vtbls): Likewise.
10382 (dfs_finish_vtbls): Delete.
10383 (build_vbase_offset_vtbl_entries): Remove old-abi code.
10384 * cvt.c: Adjust comments.
10385 * decl.c: Adjust comments.
10386 * decl2.c: Adjust comments.
10387 * init.c: Adjust comments.
10388 (construct_virtual_bases): Remove old-abi code.
10389 * lang-specs.h: Remove -fno-new-abi.
10390 * mangle.c: Adjust comments.
10391 * rtti.c: Adjust comments.
10392 (get_base_offset): Remove old-abi-code.
10393 * search.c: Adjust comments.
10394 (dfs_init_vbase_pointers): Remove.
10395 (dfs_vtable_path_unmark): Remove.
10396 (init_vbase_pointers): Remove.
10397 * semantics.c: Adjust comments.
10398 (emit_associated_thunks): Remove old-abi code.
10399 * typeck.c: Adjust comments.
10401 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
10403 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10406 2001-07-19 Mark Mitchell <mark@codesourcery.com>
10408 * class.c (finish_struct_anon): Forbid nested classes.
10410 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10412 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10413 * optimize.c: Include debug.h.
10414 (maybe_clone_body): Use debug hook.
10415 * semantics.c: Include debug.h.
10416 (expand_body): Use debug hook.
10418 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10420 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10422 2001-07-18 Mark Mitchell <mark@codesourcery.com>
10424 * class.c (type_requires_array_cookie): New function.
10425 (check_methods): Don't try to figure out whether the type needs a
10427 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10428 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10429 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10430 * pt.c (instantiate_class_template): Don't set
10431 TYPE_VEC_DELETE_TAKES_SIZE.
10432 * NEWS: Document ABI changes from GCC 3.0.
10434 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
10435 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10437 * NEWS (Changes in GCC 3.0): Fix typo.
10439 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
10441 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10442 which attributes are to be attached, and a flags argument. Update
10443 call to decl_attributes.
10444 (grokfield): Update call to decl_attributes.
10445 * class.c (finish_struct): Update call to cplus_decl_attributes.
10446 * cp-tree.h (cplus_decl_attributes): Update prototype.
10447 * decl.c (start_decl, grokdeclarator, start_function): Update
10448 calls to decl_attributes and cplus_decl_attributes.
10449 * friend.c (do_friend): Update call to cplus_decl_attributes.
10450 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10452 2001-07-12 Mark Mitchell <mark@codesourcery.com>
10454 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10455 for `register' variables with an asm-specification.
10457 2001-07-11 Mark Mitchell <mark@codesourcery.com>
10459 * semantics.c (finish_asm_stmt): Mark the output operands
10460 to an asm addressable, if necessary.
10462 2001-07-11 Ben Elliston <bje@redhat.com>
10464 * Revert this change -- there is a subtle bug.
10467 * decl.c (finish_enum): New "attributes" argument; pass it to
10468 cplus_decl_attributes. Use a narrower type if the enum is packed.
10469 * cp-tree.h (finish_enum): Adjust prototype.
10470 * parse.y (enum_head): New non-terminal.
10471 (structsp): Use it. Enums now may be preceded or followed by
10472 optional attributes -- pass their chained tree to finish_enum().
10473 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10475 2001-07-10 Mark Mitchell <mark@codesourcery.com>
10477 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10480 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
10482 * semantics.c (cp_expand_stmt): Fix for null
10483 current_function_return_value.
10485 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
10487 * call.c (build_op_delete_call): Initialize fn.
10488 (convert_like_real): Delete conditional.
10489 (joust): Initialize *w and *l.
10490 * class.c: Add prototype for binfo_ctor_vtable.
10491 (get_primary_binfo): Initialize result.
10492 * init.c (build_java_class_ref): Initialize name.
10494 2001-07-09 Erik Rozendaal <dlr@acm.org>
10496 * typeck.c (unary_complex_lvalue): Do not duplicate the
10497 argument to modify, pre-, or post-increment when used as an
10498 lvalue and when the argument has side-effects.
10500 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10502 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10503 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
10504 cplus_decl_attributes even if attrs is NULL.
10505 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10507 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10509 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10510 calls to decl_attributes.
10512 2001-07-06 Ira Ruben <ira@apple.com>
10514 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10515 be DECL_TEMPLATE_RESULT.
10517 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10519 * cp-tree.h (copy_template_template_parm): Rename to ...
10520 (bind_template_template_parm): ... here.
10521 * tree.c (copy_template_template_parm): Rename to ...
10522 (bind_template_template_parm): ... here. Remove the case when
10523 NEWARGS is NULL_TREE.
10524 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10525 BOUND_TEMPLATE_TEMPLATE_PARM.
10526 * pt.c (lookup_template_class): Adjust.
10528 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
10530 * cvt.c (convert_lvalue): New fn.
10531 * cp-tree.h: Declare it.
10532 * method.c (do_build_assign_ref): Use it.
10533 (do_build_copy_constructor): Convert parm to base types
10534 before calling base constructors.
10536 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10537 DECL_USER_ALIGN. Check flag_elide_constructors instead of
10539 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10541 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
10543 * optimize.c (optimize_inline_calls): New function, broken out
10545 (optimize_function): ... here. Call it. Don't inline if it is
10547 (dump_function): Print name of dump flag causing this dump.
10548 * semantics.c (expand_body): Move thunk inline check to
10551 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
10553 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10554 (comptypes): Use target.comp_type_attributes.
10556 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
10558 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10560 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10562 * error.c (lang_print_error_function): Add a `diagnostic_context *'
10565 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10567 * decl2.c (import_export_class): Update.
10569 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10571 * error.c (init_error): Adjust settings.
10573 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10575 * error.c (init_error): Adjust settings.
10577 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
10579 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10580 return pointers to data members by reference rather than by value.
10582 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
10584 Implement the Named Return Value optimization.
10585 * cp-tree.h (struct cp_language_function): Add x_return_value.
10586 (current_function_return_value): Now a macro.
10587 * decl.c: Don't define it.
10588 (define_label, finish_case_label): Don't clear it.
10589 (init_decl_processing): Don't register it with GC.
10590 * semantics.c (genrtl_finish_function): Don't check it for
10591 no_return_label. Copy the RTL from the return value to
10592 current_function_return_value and walk, calling...
10593 (nullify_returns_r): ...this new fn.
10594 * typeck.c (check_return_expr): Set current_function_return_value.
10596 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
10598 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
10599 sharing a ctor vtable with. Merge code for cases 1 and 2.
10600 (binfo_ctor_vtable): New fn.
10601 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
10603 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
10605 * class.c (dfs_find_final_overrider): Fix logic.
10607 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
10608 virtual thunk instead of non-virtual.
10609 (get_matching_virtual): Uncomment.
10611 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
10612 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
10615 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
10617 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
10618 we've not emerged from the hierarchy of RTTI_BINFO on reaching
10619 a non-virtual base.
10621 2001-06-13 Mark Mitchell <mark@codesourcery.com>
10623 * NEWS: Update release number.
10625 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10627 PR c++/3130, c++/3131, c++/3132
10628 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
10629 * class.c (force_canonical_binfo_r): Move
10630 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
10631 virtual bases unless they're primary and what they're primary
10632 too has been moved.
10633 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
10634 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
10635 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
10637 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
10638 (layout_nonempty_base_or_field): Add most derived type
10640 (layout_empty_base): Likewise.
10641 (build_base_field): Likewise.
10642 (build_base_fields): Likewise.
10643 (propagate_binfo_offsets): Add most derived type
10644 parameter. Skip non canonical virtual bases too.
10645 (dfs_set_offset_for_unshared_vbases): Don't skip primary
10646 bases. Do skip canonical bases.
10647 (layout_virtual_bases): Adjust.
10648 (layout_class_type): Adjust.
10649 (dfs_get_primary_binfo): Build list of virtual primary base
10651 (get_primary_binfo): Check that the shared virtual primary
10652 base candidate was found first.
10653 (accumulate_vtbl_inits): Don't do anything for non-vptr
10654 containing binfos. For case 1 primary virtual bases, keep
10655 checking that we've not emerged from the hierarchy of RTTI_BINFO.
10657 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10660 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10661 hierarchy looking for primary bases for a ctor
10662 vtable. Recursively call oneself, if we meet our primary via
10663 this route and haven't met it yet via inheritance graph order.
10665 2001-06-11 Mark Mitchell <mark@codesourcery.com>
10667 * lang-options.h: Emit documentation for -fno-honor-std, not
10670 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
10672 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10673 Don't clobber delta.
10674 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10676 2001-06-10 Mark Mitchell <mark@codesourcery.com>
10677 Gabriel Dos Reis <gdr@codesourcery.com>
10679 * Make-lang.in (cp/call.o): Depend on diagnostic.h
10680 (cp/typeck.o): Depend on diagnostic.h
10681 (cp/typeck2.o): Depend on diagnostic.h
10682 (cp/repo.o): Depend on dignostic.h
10683 * typeck.c: #include diagnostic.h
10684 (convert_for_initialization): Remove extern declaration for
10685 warningcount and errorcount.
10687 * call.c: #include diagnostic.h
10688 (convert_like_real): Remove extern declaration for warnincount and
10691 * repo.c: #include diagnostic.h
10692 * typeck2.c: #include diagnostic.h
10694 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10696 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10697 in previous change.
10699 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10702 * friend.c (do_friend): Use push_decl_namespace for classes at
10705 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10706 Jason Merrill <jason_merrill@redhat.com>
10709 * class.c (build_secondary_vtable): Use assert, rather than an error
10711 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10712 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10713 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10714 Don't set BINFO_VTABLE for a primary virtual base.
10716 2001-06-07 Mark Mitchell <mark@codesourcery.com>
10718 * decl.c (duplicate_decls): Update source position information
10719 when a template function is defined.
10721 2001-06-07 Phil Edwards <pme@sources.redhat.com>
10723 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
10725 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
10728 * decl.c (pushtag): Don't push into a complete type's scope.
10730 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
10732 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10733 (struct lang_decl_flags): Lose generate_with_vtable_p.
10734 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10735 * class.c (copy_virtuals): Adjust.
10736 * decl2.c (mark_vtable_entries): Adjust.
10737 * method.c (make_thunk, build_vtable_entry): Adjust.
10738 * class.c (update_vtable_entry_for_fn): Only look as far as the
10739 first defining class.
10740 (build_vtbl_initializer): Put nothing in the slot for a function only
10741 defined in a lost primary virtual base.
10742 (add_vcall_offset_vtbl_entries_1): Use the same code for
10743 the lost primary case and the normal case.
10744 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10745 (get_vfield_offset, get_derived_offset): Lose.
10746 (dfs_find_final_overrider): Use look_for_overrides_here.
10747 (get_matching_virtual): New fn.
10748 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10749 not BV_VCALL_INDEX.
10750 * search.c (look_for_overrides_here): Split out from...
10751 (look_for_overrides_r): Here.
10753 * class.c (find_final_overrider): Return error_mark_node on error.
10755 * decl2.c (key_method): #if 0 accidental change.
10757 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
10759 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10760 (build_over_call): Likewise.
10761 * decl.c (grokparms): Likewise.
10762 * pt.c (tsubst_decl): Likewise.
10763 * typeck.c (convert_arguments): Likewise.
10765 2001-06-05 Mark Mitchell <mark@codesourcery.com>
10767 * semantics.c (begin_class_definition): Robustify.
10769 * pt.c (instantiate_decl): Tell the repository code about the
10770 clones, not the cloned functions.
10771 * repo.c (repo_template_used): Explicitly instantiate the cloned
10772 function, not the clones.
10774 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10776 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10777 ICS_BAD_FLAG on created conversion.
10778 (compare_ics): Break out rank.
10780 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10782 * decl.c (xref_tag): Remove extraneous %s on dependent name
10785 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10787 * class.c (layout_vtable_decl): Fix off by one error on
10789 (build_vtt): Likewise.
10790 (build_ctor_vtbl_group): Likewise.
10792 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10794 * class.c (maybe_indent_hierarchy): New function.
10795 (dump_class_hierarchy_r): Add flags. Dump extra binfo
10796 information, if enabled. Use maybe_indent_hierarchy. Adjust
10798 (dump_class_hierarchy): Adjust prototype. Adjust output format.
10799 (dump_array, dump_vtable, dump_vtt): New functions.
10800 (finish_struct_1): Adjust hierarchy dumping.
10801 (initialize_vtable): Call dump_vtable.
10802 (build_vtt): Call dump_vtt.
10803 (build_ctor_vtbl_group): Call dump_vtable.
10804 * decl2.c (flag_dump_class_layout): Remove.
10805 (cxx_decode_option): Remove dump translation unit
10806 and dump class hierarchy check. Call dump_switch_p.
10807 (finish_file): Adjust dumping.
10808 (dump.c): Only dump base classes if not TDF_SLIM.
10809 Only dump namespace members if not TDF_SLIM.
10810 * optimize.c (dump_function): New function.
10811 (optimize_function): Call dump_function.
10812 * semantics.c (expand_body): Use dump_enabled_p.
10814 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
10817 Part missed from first commit
10818 * decl2.c (finish_anon_union): Copy context.
10820 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
10823 * optimize.c (remap_decl): Remap anonymous aggregate members too.
10825 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
10828 * semantics.c (expand_body): Don't optimize thunks.
10830 2001-05-25 Sam TH <sam@uchicago.edu>
10832 * cp-tree.h lex.h: Fix header include guards.
10834 2001-05-25 Mark Mitchell <mark@codesourcery.com>
10836 * decl.c (init_decl_processing): Tweak.
10838 2001-05-24 Mark Mitchell <mark@codesourcery.com>
10840 * decl.c (duplicate_decls): Tidy.
10841 (init_decl_processing): Always set flag_no_builtin.
10843 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
10846 * decl2.c (do_local_using_decl): Push the decls, even in a
10849 2001-05-22 Mark Mitchell <mark@codesourcery.com>
10851 * optimize.c (initialize_inlined_parameters): Don't set
10852 TREE_READONLY for a VAR_DECL taking the place of an inlined
10855 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
10857 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
10858 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
10861 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
10863 * parse.y: Refer to compound literals as such, not as
10864 constructor-expressions.
10866 2001-05-21 Mark Mitchell <mark@codesourcery.com>
10868 * call.c (build_op_delete_call): Ignore exception-specifications
10869 when looking for matching delete operators.
10870 * init.c (build_new_1): Compute whether or not the allocation
10871 function used is a placement allocation function or not, and
10872 communicate this information to build_op_delete_call.
10874 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
10876 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
10877 (build_vtbl_ref): Adjust.
10878 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
10879 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
10881 (unsupported_options): Correspondingly.
10883 * decl2.c (maybe_make_one_only): Check flag_weak, not
10884 supports_one_only().
10886 * cp-tree.def (START_CATCH_STMT): Lose.
10887 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
10888 * tree.c (cp_statement_code_p): Don't case it.
10889 * semantics.c (cp_expand_stmt): Likewise.
10890 * cp-tree.h (START_CATCH_TYPE): Lose.
10891 (HANDLER_TYPE): New.
10892 * except.c (expand_start_catch_block): Don't start any blocks.
10894 (expand_end_catch_block): Don't end any blocks.
10895 * parse.y (handler): Don't pass anything from finish_handler_parms
10897 * pt.c (tsubst_expr): Likewise.
10898 * semantics.c (begin_handler): Call note_level_for_catch here.
10899 (finish_handler_parms): Don't return anything.
10900 (genrtl_catch_block, begin_catch_block): Lose.
10901 (genrtl_handler): Call expand_start_catch here.
10903 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
10905 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
10906 (get_vtable_decl, build_vtt): Not here.
10908 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
10911 * optimize.c (update_cloned_parm): Copy addressability and other
10914 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10916 * pt.c (determine_specialization): Ignore artificial functions.
10918 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
10920 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
10921 (C_RID_CODE): Remove.
10922 * lex.c (cxx_init_options): Call set_identifier_size. Update.
10923 (init_parse): Don't do it here.
10925 2001-05-18 Diego Novillo <dnovillo@redhat.com>
10927 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
10928 function declaration to avoid stripping the symbol's attributes.
10930 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
10932 * decl.c (pushdecl): Adjust error string.
10933 (xref_tag): Adjust friend class injection warning. Remove the
10934 inherited name from the class shadowed scope.
10936 2001-05-17 Mark Mitchell <mark@codesourcery.com>
10938 * except.c (cp_protect_cleanup_actions): New function.
10939 (init_exception_processing): Don't set protect_cleanup_actions
10940 here. Do set lang_protect_cleanup_actions.
10942 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10944 * spew.c (read_token): Call yyerror on all unexpected tokens.
10946 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10948 * init.c (member_init_ok_or_else): Take a tree rather than
10950 (expand_member_init): Adjust.
10952 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
10954 * decl.c (duplicate_decls): Suppress warning about duplicate
10955 decls if the first decl is a friend.
10957 2001-05-12 Zack Weinberg <zackw@stanford.edu>
10959 * except.c (choose_personality_routine): Export. Add
10960 explanatory comment. Take an enum languages, not a boolean.
10961 (initialize_handler_parm): Adjust to match.
10962 * cp-tree.h: Prototype choose_personality_routine.
10963 * lex.c (handle_pragma_java_exceptions): New function.
10964 (init_cp_pragma): Register #pragma GCC java_exceptions.
10966 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10968 * method.c (build_mangled_C99_name): Remove unused prototype.
10970 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
10972 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
10973 * typeck.c (get_member_function_from_ptrfunc,
10974 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
10975 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
10977 Reverted Geoff Keating's 2001-05-03's patch.
10979 2001-05-11 Ira Ruben <ira@apple.com>
10981 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
10983 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
10985 * cp-tree.h (finish_label_expr, lookup_label): Delete.
10986 * parse.y: Update for '&&'; don't issue warning here.
10987 * semantics.c (finish_label_expr): Delete.
10989 2001-05-07 Mark Mitchell <mark@codesourcery.com>
10991 * splay-tree.h (splay_tree_max): New function.
10992 (splay_tree_min): Likewise.
10994 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
10996 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
10997 (pfn_vflag_identifier): Define.
10998 Update comment about layout of pointer functions.
10999 (build_ptrmemfunc1): Update prototype.
11000 (expand_ptrmemfunc_cst): Update prototype.
11001 * decl.c (initialize_predefined_identifiers): Initialize
11002 pfn_vflag_identifier.
11003 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11004 an extra field to the type.
11005 * expr.c (cplus_expand_constant): Pass 'flag' between
11006 expand_ptrmemfunc_cst and build_ptrmemfunc1.
11007 * typeck.c (get_member_function_from_ptrfunc): When
11008 FUNCTION_BOUNDARY < 16, look at additional field to determine
11009 if a pointer-to-member is a real pointer or a vtable offset.
11010 (build_ptrmemfunc1): Add new parameter to contain extra field.
11011 (build_ptrmemfunc): Pass the extra field around.
11012 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11013 (pfn_from_ptrmemfunc): Ignore the extra field.
11015 2001-05-03 Mark Mitchell <mark@codesourcery.com>
11017 * cp-tree.h (flag_inline_trees): Update documentation.
11018 * decl.c (init_decl_processing): Adjust handling of
11019 flag_inline_functions and flag_inline_trees to support -O3.
11020 (grokfndecl): Set DECL_INLINE on all functions if that's what
11021 the user requested.
11022 (save_function_data): Clear DECL_INLINE in
11023 current_function_cannot_inline is non-NULL.
11024 * decl2.c (flag_inline_trees): Update documentation.
11026 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
11028 * dump.c (cp_dump_tree, USING_STMT case): New case.
11029 * tree.c (cp_statement_code_p): Add USING_STMT.
11030 * decl2.c (do_using_directive): Add the using directive statement.
11032 * tree.c (walk_tree): Reformat an if block.
11034 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11036 * decl.c (compute_array_index_type): Don't try to do anything with
11037 the indices when processing a template.
11039 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11041 * call.c: NULL_PTR -> NULL.
11042 * class.c: Likewise.
11044 * decl.c: Likewise.
11045 * decl2.c: Likewise.
11046 * except.c: Likewise.
11047 * init.c: Likewise.
11048 * rtti.c: Likewise.
11049 * search.c: Likewise.
11050 * tree.c: Likewise.
11051 * typeck.c: Likewise.
11052 * typeck2.c: Likewise.
11054 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11056 * decl2.c (do_using_directive): Revert previous patch.
11058 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11060 * cp-tree.def (USING_STMT): New statement node.
11061 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11062 * decl2.c (do_using_directive): Add USING_STMT to statement
11063 tree. Don't emit errors when processing template decl.
11064 * pt.c (tsubst_expr, USING_STMT case): New case.
11065 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11067 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11069 * call.c (build_new_op): Convert args from reference here.
11070 (build_conditional_expr): Don't convert here.
11072 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11074 * spew.c (last_token_id): New static variable.
11075 (read_token): Set it here.
11076 (yyerror): Use it here.
11078 2001-04-30 Richard Henderson <rth@redhat.com>
11080 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11081 * decl.c: Likewise.
11083 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11085 * gxxint.texi: Remove.
11086 * Make-lang.in: Remove all traces of gxxint.texi.
11088 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
11090 * decl2.c (start_static_initialization_or_destruction): Correct
11091 logic to handle the -fno-use-cxa-atexit case.
11093 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11095 * optimize.c (update_cloned_parm): New function.
11096 (maybe_clone_body): Use it. Update the `this' parameter too.
11098 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
11100 * decl2.c (unsupported_options): Add new-abi.
11101 * lang-options.h: Remove no longer supported options.
11103 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11105 * except.c (can_convert_eh): Don't check template parms,
11106 typename types etc.
11108 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11110 * optimize.c (maybe_clone_body): Copy parameter names and locations.
11112 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11114 * cp-tree.h (adjust_clone_args): Prototype new function.
11115 * class.c (adjust_clone_args): New function.
11116 * decl.c (start_function): Call it for in charge ctors.
11118 2001-04-26 Mark Mitchell <mark@codesourcery.com>
11120 * method.c (use_thunk): Make sure that thunks really are emitted
11123 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
11125 * mangle.c (write_chars): New macro.
11126 (hwint_to_ascii): New function
11127 (write_number): Use it.
11128 (write_integer_cst): Deal with really big numbers.
11130 2001-04-25 Mark Mitchell <mark@codesourcery.com>
11132 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11135 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
11137 * decl.c (grokdeclarator): Set context of namespace scope
11140 2001-04-24 Zack Weinberg <zackw@stanford.edu>
11142 * cp/optimize.c: Include hashtab.h.
11143 (struct inline_data): Add tree_pruner.
11144 (expand_call_inline, expand_calls_inline): Use it when calling
11146 (optimize_function): Initialize and free tree_pruner.
11148 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11150 Lazy __FUNCTION__ generation.
11151 * cp-tree.def (FUNCTION_NAME): Remove.
11152 * cp-tree.h (function_name_declared_p): Remove.
11153 (cp_fname_init): Prototype.
11154 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11155 don't call declare_function_name. Call start_fname_decls.
11156 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11157 clobber the line number.
11158 (cp_fname_init): New function.
11159 (start_function): Call start_fname_decls.
11160 (finish_function): Call finish_fname_decls.
11161 * lex.c (reswords): Add slots for __FUNCTION__ et al.
11162 (rid_to_yy): Add mappings for __FUNCTION__ et al.
11163 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11164 * parse.y (VAR_FUNC_NAME): New token.
11165 (primary): Add VAR_FUNC_NAME.
11166 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
11168 (tsubst, FUNCTION_NAME case): Remove.
11169 (tsubst_copy, FUNCTION_NAME case): Remove.
11170 (tsubst_expr, DECL_STMT case): Be careful with a
11171 DECL_PRETTY_FUNCTION_P.
11172 (instantiate_decl): Remove function_name_declared_p.
11173 * semantics.c (begin_compound_statement): Don't call
11174 declare_function_name here.
11175 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
11176 (finish_translation_unit): Call finish_fname_decls.
11177 (expand_body): Remove function_name_declared_p.
11178 * typeck2.c (digest_init): Allow any ERROR_MARK.
11180 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11182 * pt.c (tsubst_decl): Use VOID_TYPE_P.
11183 * semantics.c: Fix some typos.
11185 2001-04-23 Phil Edwards <pme@sources.redhat.com>
11187 * cp/decl2.c (flag_honor_std): Always initialize to 1.
11189 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11191 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
11193 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
11195 * except.c (build_throw): Wrap the initialization of the exception
11196 object in a MUST_NOT_THROW_EXPR.
11197 (do_free_exception): #if 0.
11199 2001-04-20 Mark Mitchell <mark@codesourcery.com>
11201 * cp-tree.h (finish_enum): Change prototype.
11202 * decl.c (finish_enum): Reorganize.
11203 * parse.y (structsp): Adjust calls to finish_enum.
11205 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11207 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
11210 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11212 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
11213 (layout_empty_base): Return at end flag.
11214 (build_base_field): Likewise.
11215 (build_base_fields): Likewise.
11216 (layout_virtual_bases): Don't add 1 to eoc value.
11217 (end_of_class): Use full size for empty bases.
11218 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
11219 empty bases. Don't add 1 to eoc value. Only add trailing padding
11220 if we're an empty class with no empty bases.
11221 (dump_class_hierarchy): Dump size and alignment.
11223 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11225 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
11228 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11230 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
11231 is found, look first if name does not match the structure name.
11233 2001-04-19 Mark Mitchell <mark@codesourcery.com>
11235 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
11237 (SET_DECL_LANGUAGE): New macro.
11238 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
11239 (pushdecl): Likewise.
11240 (build_library_fn_1): Likewise.
11241 (build_cp_library_fn): Likewise.
11242 (grokfndecl): Likewise.
11243 (grokvardecl): Mark `extern "C"' variables as having C linkage.
11244 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
11245 * lex.c (retrofit_lang_decl): Likewise.
11246 * mangle.c (mangle_decl_string): Don't mangle the names of
11247 variables declared with C language linkage.
11248 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11250 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
11252 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
11253 flag_access_control from uninitialized storage.
11255 2001-04-15 Mark Mitchell <mark@codesourcery.com>
11257 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
11258 * mangle.c (write_pointer_to_member_type): Fix mangling of
11259 pointers to cv-qualified member function types.
11261 * init.c (build_delete): Create a SAVE_EXPR for the address if
11262 we're going to use it more than once.
11264 2001-04-13 Mark Mitchell <mark@codesourcery.com>
11266 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
11267 (expand_ptremfunc_cst): Change prototype.
11268 (delta2_from_ptrmemfunc): Remove.
11269 * expr.c (cplus_expand_constant): Adjust call to
11270 expand_ptrmemfunc_cst.
11271 * typeck.c (build_ptrmemfunc1): Simplify.
11272 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
11273 results in a constant.
11274 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
11275 (delta2_from_ptrmemfunc): Remove.
11276 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11278 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
11280 * cp-tree.h (decl_namespace_list): New macro.
11281 (struct saved_scope): Add decl_ns_list.
11282 * decl.c (mark_saved_scope): Mark it.
11283 * decl2.c: Lose static decl_namespace_list.
11284 (init_decl2): Don't save it.
11286 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11288 * cp-tree.h (warn_return_type, yylex): Delete redundant
11291 * decl.c (current_class_depth, global_namespace): Likewise.
11293 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
11295 * repo.c (flag_use_repository): Likewise.
11297 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11299 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
11300 set_block, pushdecl, getdecls, gettags, init_decl_processing,
11301 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
11302 lvalue_or_else, print_lang_statistics, comp_target_types,
11303 unsigned_type, signed_type, signed_or_unsigned_type,
11304 build_function_call, mark_addressable, incomplete_type_error):
11305 Delete redundant declarations.
11307 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
11309 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
11310 (TYPE_ANONYMOUS_P): New macro.
11311 (TAGGED_TYPE_P): New macro.
11312 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
11313 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
11314 * tree.c (no_linkage_helper): Likewise.
11315 * semantics.c (begin_class_definition): Likewise.
11316 * pt.c (convert_template_argument): Likewise.
11317 * lex.c (check_for_missing_semicolon): Likewise.
11319 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11321 * class.c (dfs_unshared_virtual_bases): New function.
11322 (mark_primary_bases): Call it.
11323 (check_bases): Ignore virtual bases when determining
11326 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11328 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
11330 2001-04-11 Mark Mitchell <mark@codesourcery.com>
11332 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
11333 cloned function to the clone.
11335 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11337 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
11339 * semantics.c: Include expr.h.
11341 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
11343 * method.c (implicitly_declare_fn): Commonize code for copy ctor
11344 and assignment op. Set TREE_USED for parameter.
11346 2001-04-10 Mark Mitchell <mark@codesourcery.com>
11348 * class.c (find_final_overrider_data): Add `candidates'.
11349 (dfs_find_final_overrider): Don't issue error messages
11351 (find_final_overrider): Issue error messages here.
11352 (build_base_field): Don't warn about amgibuous direct bases here.
11353 (warn_about_ambiguous_direct_bases): New function.
11354 (layout_class_type): Use it.
11356 2001-04-10 Richard Henderson <rth@redhat.com>
11358 * typeck.c (build_array_ref): Push the array reference inside
11359 COMPOUND_EXPR and COND_EXPR.
11361 2001-04-05 Mark Mitchell <mark@codesourcery.com>
11363 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
11364 * decl.c (duplicate_decls): Adjust accordingly.
11365 (maybe_commonize_var): Likewise.
11366 (grokfndecl): Likewise.
11367 (start_function): Likewise.
11368 (start_method): Likewise.
11369 * decl2.c (key_method): Likewise.
11370 (import_export_decl): Likewise.
11371 * method.c (implicitly_declare_fn): Likewise.
11372 * optimize.c (maybe_clone_body): Likewise.
11374 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
11376 * lang-specs.h: Add __DEPRECATED.
11378 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
11380 * search.c (get_dynamic_cast_base_type): When building a new
11381 constant, set its type to ssizetype.
11383 2001-04-04 Jakub Jelinek <jakub@redhat.com>
11385 * optimize.c (expand_call_inline): Only add newly inlined statements
11386 into inlined_stmts.
11388 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11390 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
11391 (OPERATOR_FORMAT): Likewise.
11392 (OPERATOR_TYPENAME_FORMAT): Likewise.
11393 * operators.def: Remove old name-mangling information.
11394 * decl.c (grok_op_properties): Adjust accordingly.
11395 * lex.c (init_operators): Likewise.
11396 * rtti.c (get_tinfo_decl): Issue error messages about types that
11397 have variable size.
11399 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11401 * decl2.c (import_export_decl): Don't call import_export_class
11402 when processing an inline member function.
11403 * semantics.c (expand_body): Call import_export_decl before
11404 emitting inline functions.
11406 2001-03-28 Richard Henderson <rth@redhat.com>
11408 IA-64 ABI Exception Handling:
11409 * cp-tree.def (EH_SPEC_BLOCK): New.
11410 (MUST_NOT_THROW_EXPR): New.
11411 * cp-tree.h: Update changed function declarations.
11412 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11413 (CPTI_CALL_UNEXPECTED): New.
11414 (struct cp_language_function): Rename x_eh_spec_try_block
11415 to x_eh_spec_block.
11416 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11417 * decl.c (current_binding_level): If no current function
11418 bindings, revert to scope_chain.
11419 (initialize_predefined_identifiers): Remove __cp_push_exception.
11420 (store_parm_decls): Use begin_eh_spec_block.
11421 (finish_function): Use finish_eh_spec_block.
11422 (mark_lang_function): Update for name changes.
11423 * decl2.c (finish_file): No mark_all_runtime_matches.
11424 * dump.c (cp_dump_tree): Handle new tree codes.
11425 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11426 * except.c (catch_language_init, catch_language): Remove.
11427 (init_exception_processing): Don't set language code.
11428 Initialize call_unexpected_node, protect_cleanup_actions,
11429 eh_personality_libfunc, lang_eh_runtime_type.
11430 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11431 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11432 (prepare_eh_type): Split out type canonicalizations ...
11433 (build_eh_type_type): ... from here.
11434 (build_eh_type_type_ref): Remove.
11435 (mark_all_runtime_matches): Remove.
11436 (build_exc_ptr): New.
11437 (do_begin_catch, do_end_catch): New.
11438 (do_pop_exception): Remove.
11439 (build_terminate_handler): Remove.
11440 (choose_personality_routine): Split out language choice from ...
11441 (initialize_handler_parm): ... here.
11442 Use MUST_NOT_THROW_EXPR.
11443 (expand_start_catch_block): Use do_begin_catch. Simplify Java
11444 exception object handling.
11445 (expand_start_eh_spec, expand_end_eh_spec): Remove.
11446 (expand_exception_blocks, alloc_eh_object): Remove.
11447 (begin_eh_spec_block, finish_eh_spec_block): New.
11448 (do_allocate_exception, do_free_exception): New.
11449 (expand_throw): Merge into ...
11450 (build_throw): ... here. Update for abi.
11451 * expr.c (cplus_expand_expr): No expand_internal_throw.
11452 Handle MUST_NOT_THROW_EXPR.
11453 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11454 * semantics.c (*) Update for except.h name changes.
11455 (genrtl_try_block): No protect_with_terminate.
11456 (genrtl_eh_spec_block): New.
11457 (genrtl_handler): Don't emit the goto here.
11458 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11459 (genrtl_finish_function): Don't expand_exception_blocks.
11460 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11462 2001-03-28 Richard Henderson <rth@redhat.com>
11464 * decl.c (struct named_label_list): Rename eh_region to
11465 in_try_scope, add in_catch_scope.
11466 (struct binding_level): Rename eh_region to is_try_scope,
11467 add is_catch_scope.
11468 (note_level_for_try): Rename from note_level_for_eh.
11469 (note_level_for_catch): New.
11470 (poplevel): Copy both is_try_scope and is_catch_scope to
11471 the named_label_list struct.
11472 (check_previous_goto_1): Don't check for catch block via
11473 DECL_ARTIFICIAL; use in_try_scope instead.
11474 (check_goto): Likewise.
11475 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11476 * except.c (expand_start_catch_block): Call note_level_for_catch.
11477 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11479 2001-03-27 Richard Henderson <rth@redhat.com>
11481 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11482 exceptions_via_longjmp.
11484 2001-03-27 Phil Edwards <pme@sources.redhat.com>
11486 * pt.c (check_default_tmpl_args): Make error messages clearer.
11488 2001-03-26 Phil Edwards <pme@sources.redhat.com>
11490 * error.c: Also undefine 'A' macro used for cp_printers definition.
11492 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11494 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11496 2001-03-26 Mike Yang <yang@research.att.com>
11497 Mark Mitchell <mark@codesourcery.com>
11499 * dump.c (dump_access): New function.
11500 (cp_dump_tree): Use it. Dump basetype information for class
11503 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11505 * Makefile.in (optimize.o): Depend on params.h.
11506 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11507 (init_decl_processing): Set flag_no_inline when doing
11509 * optimize.c: Include params.h.
11510 (struct inline_data): Improve documentation of FNS. Add
11511 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11512 (INSNS_PER_STMT): New macro.
11513 (remap_block): Use CLONING_P.
11514 (inlinable_function_p): Don't inline big functions.
11515 (expand_call_inline): Keep track of how much inlining we've done.
11516 (optimize_function): Set FIRST_INLINED_FN.
11517 (maybe_clone_body): Set CLONING_P.
11518 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11520 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11521 rest_of_compilation. Clear DECL_RTL for local variables
11523 (clear_decl_rtl): New function.
11525 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
11528 * cp-tree.h (skip_type_access_control,
11529 reset_type_access_control): Prototype.
11530 * decl.c (grokdeclarator): Access of friends is not checked.
11531 * parse.y (component_decl_list): Reset type access control.
11532 * semantics.c (decl_type_access_control): Clear
11533 current_type_lookups.
11534 (save_type_access_control): Don't save if not deferring.
11535 (skip_type_access_control, reset_type_access_control): New
11537 (begin_class_definition): Do type access control for basetypes.
11538 Start deferred access control.
11539 (finish_class_definition): Resume immediate access control if
11540 this is a local class.
11542 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11544 * class.c (add_method): Use memcpy/memmove, not bcopy.
11546 * decl.c (duplicate_decls): Likewise.
11548 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11550 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11553 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11555 * decl.c (local_names): Define.
11556 (push_local_name): New.
11557 (grok_reference_init): Return init if initializing static reference
11558 variable with non-constant instead of emitting it.
11559 Move expand_static_init call to cp_finish_decl.
11560 (layout_var_decl): Call push_local_name.
11561 (maybe_commonize_var): Allow inlining functions even if they have
11562 static local variables, use comdat_linkage for them if flag_weak.
11563 (check_initializer): Call obscure_complex_init if
11564 grok_reference_init returned nonzero.
11565 (save_function_data): Clear x_local_names.
11566 (pop_cp_function_context): Free x_local_names.
11567 (mark_inlined_fns): Remove.
11568 (mark_lang_function): Mark x_local_names.
11569 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11570 Mark inlined_fns as tree, remove call to mark_inlined_fns.
11571 * class.c (alter_access): Ensure DECL_ACCESS is never set if
11572 DECL_DISCRIMINATOR_P.
11573 * cp-tree.h (cp_language_function): Add x_local_names.
11574 (lang_decl_flags): Add discriminator into u2.
11575 (lang_decl_inlined_fns): Remove.
11576 (lang_decl): inlined_fns is now a TREE_VEC.
11577 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11578 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11579 TREE_VEC, not a custom structure.
11580 (optimize_function): Likewise.
11581 * mangle.c (discriminator_for_local_entity): Discriminate among
11582 VAR_DECL local entities.
11583 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
11586 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
11588 Add support for Java interface method calls.
11589 * cp-tree.h (struct lang_type): Add java_interface flag.
11590 (TYPE_JAVA_INTERFACE): New macro.
11591 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
11592 by setting TYPE_JAVA_INTERFACE.
11593 * call.c (java_iface_lookup_fn): New static.
11594 (build_over_call): If calling a method declared in a
11595 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
11596 expression which resolves the function address.
11597 (build_java_interface_fn_ref): New function.
11599 2001-03-22 Richard Henderson <rth@redhat.com>
11601 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
11602 * except.c: Don't include it.
11604 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11605 based on an idea from Joe Buck <jbuck@synopsys.com>
11607 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
11609 (data_def, component_decl): Add reductions to bad_decl.
11611 2001-03-22 Jakub Jelinek <jakub@redhat.com>
11613 * method.c (do_build_assign_ref): Don't use build_modify_expr for
11614 anonymous aggregates, since they don't have assignment operator
11616 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
11617 assignment operators for anonymous structure fields.
11619 2001-03-21 Jason Merrill <jason@redhat.com>
11621 * pt.c (instantiate_decl): Abort if we see a member constant
11622 instantiation that doesn't already have its initializer.
11623 Downgrade explicit instantiation without definition to pedwarn.
11625 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
11626 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
11627 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
11629 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
11630 (pending_vtables): Remove.
11631 * decl2.c (pending_vtables): Remove.
11632 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
11633 CLASSTYPE_VTABLE_NEEDS_WRITING.
11634 (import_export_class): Likewise.
11635 (init_decl2): Don't mark pending_vtables.
11636 * lex.c (handle_pragma_vtable): Just sorry.
11637 * pt.c (instantiate_class_template): Don't mess with
11638 CLASSTYPE_VTABLE_NEEDS_WRITING.
11639 (mark_class_instantiated): Likewise.
11640 * ptree.c (print_lang_type): Don't print it.
11641 * semantics.c (begin_class_definition): Don't set it.
11643 * pt.c (template_tail): Replace with last_pending_template.
11644 (maybe_templates, maybe_template_tail): Remove.
11645 (add_pending_template): Adjust.
11646 (instantiate_pending_templates): Adjust.
11648 * cp-tree.h (struct saved_scope): Remove lang_stack field.
11649 (current_lang_stack): Remove.
11650 * decl.c (maybe_push_to_top_level): Don't initialize it.
11651 (duplicate_decls): Use current_lang_depth.
11652 (xref_basetypes): Likewise.
11653 * class.c (current_lang_depth): New fn.
11654 (push_lang_context): Use more varray functionality.
11655 (pop_lang_context): Likewise.
11657 * error.c (GLOBAL_THING): Always use '__'.
11659 2001-03-21 Mark Mitchell <mark@codesourcery.com>
11661 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11663 * mangle.c (mangle_decl_string): Mangle the names of overloaded
11664 operators, even when they have `extern "C"' linkage.
11666 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11668 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11669 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11670 where it's not necessary.
11671 (add_method): Remove optimization involving comparison of
11672 DECL_ASSEMBLER_NAME.
11673 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11674 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11675 where it's not necessary.
11676 (check_methods): Likewise.
11677 (build_clone): Likewise.
11678 (built_vtt): Likewise.
11679 * cp-tree.h (DECL_NEEDED_P): Likewise.
11680 * decl.c (pushtag): Likewise.
11681 (duplicate_decls): Likewise.
11682 (pushdecl): Likewise.
11683 (builtin_function): Likewise.
11684 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11685 (build_cp_library_fn): Likewise.
11686 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11687 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11688 where it's not necessary.
11689 (make_rtl_for_nonlocal_decl): Likewise.
11690 (cp_finish_decl): Likewise.
11691 (grokfndecl): Likewise.
11692 (grokvardecl): Likewise.
11693 (grokdeclarator): Likewise.
11694 (start_function): Likewise.
11695 (cp_missing_return_ok_p): Likewise.
11696 * decl2.c (grokclassfn): Likewise.
11697 (check_classfn): Likewise.
11698 (finish_static_data_member_decl): Likewise.
11699 (grokfield): Likewise.
11700 * error.c (GLOBAL_IORD_P): Remove.
11701 (dump_global_iord): Improve output.
11702 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11703 * except.c (nothrow_libfn_p): Summarily reject any function not in
11705 * init.c (build_java_class_ref): Don't explicitly set
11706 DECL_ASSEMBLER_NAME after calling mangle_decl.
11707 * mangle.c (mangle_decl_string): Handle extern "C" functions.
11708 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11709 * method.c (set_mangled_name_for_decl): Don't explicitly set
11710 DECL_ASSEMBLER_NAME after calling mangle_decl.
11711 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11712 IDENTIFIER_GLOBAL_VALUE for the thunk.
11713 * pt.c (set_mangled_name_for_template_decl): Remove.
11714 (check_explicit_specialization): Don't use it.
11715 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11716 (tsubst_friend_function): Likewise.
11717 (tsubst_decl): Likewise.
11718 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11719 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11720 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11721 where it's not necessary.
11722 (tinfo_base_init): Likewise.
11723 (create_real_tinfo_var): Likewise.
11724 * search.c (looup_field_1): Likewise.
11725 * semantics.c (finish_named_return_value): Likewise.
11726 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11728 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
11730 Correct semantics restrictions checking in throw-expression.
11731 * except.c (is_admissible_throw_operand): New function.
11732 (build_throw): Use it.
11734 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11736 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11739 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11741 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11742 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11743 * decl.c (duplicate_decls): Likewise.
11744 (builtin_function): Likewise.
11745 (build_library_fn): Likewise.
11746 (build_cp_library_fn): Likewise.
11747 (check_initializer): Likewise.
11748 (cp_finish_decl): Likewise.
11749 * decl2.c (grokfield): Likewise.
11750 (grok_function_init): Remove #if 0'd code.
11751 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11752 * friend.c (do_friend): Likewise.
11753 * init.c (get_temp_regvar): Likewise.
11754 * method.c (make_thunk): Likewise.
11755 * pt.c (tsubst_friend_function): Likewise.
11756 (tsubst_decl): Likewise.
11757 (regenerate_decl_from_template): Likewise.
11758 * semantics.c (genrtl_named_return_value): Likewise.
11759 (expand_body): Likewise.
11760 (genrtl_finish_function): Likewise.
11761 * tree.c (cp_tree_equal): Likewise.
11763 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
11765 * call.c (convert_like_real): Add extra semantics to INNER
11766 parameter. Don't convert to temporary if a user conversion
11767 gives us an lvalue that we're about to bind to a reference.
11768 Set INNER to indicate pending reference binding on recursive
11771 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11773 * cp/lex.c: Delete duplicate pending_lang_change.
11775 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11777 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11779 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11780 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11782 2001-03-09 Zack Weinberg <zackw@stanford.edu>
11784 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11786 2001-03-08 Stan Shebs <shebs@apple.com>
11788 * cp-tree.h (set_identifier_local_value): Remove unused decl.
11790 2001-03-06 Zack Weinberg <zackw@stanford.edu>
11792 * spew.c: Remove references to CPP_OSTRING.
11794 2001-03-06 Andrew Haley <aph@redhat.com>
11796 * typeck.c (convert_arguments): Check that we have an fndecl.
11798 2001-03-05 Andrew Haley <aph@redhat.com>
11800 * typeck.c (convert_arguments): Don't do ellipsis conversion for
11801 __built_in_constant_p.
11803 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11805 * typeck.c (build_static_cast): Allow enum to enum conversions
11808 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11810 * class.c (check_field_decls): Pointers to member do not a
11811 non-pod struct make, as per DR 148.
11813 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11815 * call.c (joust): cp_pedwarn when using gnu extension concerning
11816 worst conversion sequences.
11818 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11820 * decl.c: Replace all uses of 'boolean' with 'bool'.
11822 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11824 * lang-specs.h: Add zero initializer for cpp_spec field to
11825 all array elements that need one. Don't put an #ifdef inside
11826 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
11829 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11831 Implement using decls inside template functions.
11832 * decl2.c (validate_nonmember_using_decl): Don't special case
11833 fake_std_node in the global namespace. Don't reject early when
11834 processing a template.
11835 (do_local_using_decl): Add to statement tree. Don't do further
11836 processing when building a template.
11837 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
11839 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11841 * decl2.c (do_nonmember_using_decl): Don't complain if we find
11842 same function. Do complain about ambiguating extern "C"
11845 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
11847 Remove floating point and complex type template constant parms.
11848 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
11849 COMPLEX_TYPE extensions.
11850 (invalid_nontype_parm_type_p): Likewise.
11852 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
11854 * except.c (call_eh_info): Revert "match_function"'s type.
11856 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
11858 Fix ctor vtable vcall offsets.
11859 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
11860 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
11861 (get_matching_base): Remove.
11862 (get_original_base): New function.
11863 (build_vtbl_initializer): Initialize vid.rtti_binfo.
11864 Use a virtual thunk for a ctor vtable with an index
11865 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
11866 primary base within a constructor vtable. Only set
11867 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
11868 when primary base has been lost.
11869 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
11871 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
11873 * call.c (joust): Ensure more_specialized()'s argument length
11874 parameter has correct value for constructors.
11876 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
11878 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11880 * decl.c (mark_inlined_fns): Prototype.
11882 2001-02-22 Mark Mitchell <mark@codesourcery.com>
11884 * spew.c (yylex): Correct handling of friends.
11886 2001-02-22 Mark Mitchell <mark@codesourcery.com>
11888 * mangle.c (write_encoding): Pass write_function_type the
11889 FUNCTION_DECL for the function being encoded.
11890 (write_function_type): Pass it along to write_bare_function_type.
11891 (write_bare_function_type): Pass it along to write_method_parms.
11892 (write_method_parms): Don't mangle the compiler-generated
11893 parameters to a constructor or destructor.
11895 2001-02-22 Andreas Jaeger <aj@suse.de>
11897 * optimize.c: Include toplev.h for
11898 note_deferral_of_defined_inline_function prototype.
11900 2001-02-22 Jakub Jelinek <jakub@redhat.com>
11902 * cp-tree.h (struct lang_decl_inlined_fns): New.
11903 (struct lang_decls): Add inlined_fns.
11904 (DECL_INLINED_FNS): New macro.
11905 * optimize.c (struct inline_data): Add inlined_fns.
11906 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
11907 (inlinable_function_p): Likewise, fix typo in comment,
11908 function is not inlinable if it already inlined function currently
11910 (expand_call_inline): Add fn to inlined_fns if necessary.
11911 (optimize_function): Initialize inlined_fns.
11912 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
11913 * decl.c (mark_inlined_fns): New function.
11914 (lang_mark_tree): Call it.
11916 2001-02-21 Jason Merrill <jason@redhat.com>
11918 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
11919 (DECL_UNINLINABLE): Move to middle-end.
11921 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
11922 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
11923 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
11924 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
11925 parms and outer BLOCK. note_deferral_of_defined_inline_function.
11927 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
11928 second parm of op=.
11930 2001-02-19 Mark Mitchell <mark@codesourcery.com>
11932 * decl2.c (set_decl_namespace): Allow explicit instantiations in
11935 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11937 * optimize.c (expand_call_inline): Don't walk subtrees of type
11940 2001-02-18 Mark Mitchell <mark@codesourcery.com>
11942 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
11945 2001-02-18 Jason Merrill <jason@redhat.com>
11947 Do put the VTT parameter in DECL_ARGUMENTS.
11948 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
11949 (current_vtt_parm): New macro.
11950 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
11951 (DECL_HAS_VTT_PARM_P): New macro.
11952 (DECL_VTT_PARM): Remove.
11953 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
11954 * decl.c (duplicate_decls): Only copy the operator code if
11956 (start_function): Set current_vtt_parm.
11957 (lang_mark_tree): Don't mark vtt_parm.
11958 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
11959 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
11960 * class.c (build_clone): Maybe remove the VTT parm.
11961 * optimize.c (maybe_clone_body): Set up the VTT parm.
11962 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
11963 * call.c (build_over_call): Just allow the VTT arg.
11964 * method.c (make_thunk): Don't set DECL_VTT_PARM.
11965 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
11966 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
11967 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
11968 * error.c (dump_function_decl): Likewise.
11969 * call.c (build_user_type_conversion_1, convert_like_real): Abort
11970 if we try to call a constructor with in-charge or VTT parms.
11971 * method.c (skip_artificial_parms_for): New fn.
11972 * call.c (add_function_candidate, build_over_call): Call it.
11973 * call.c (build_new_method_call): Use current_vtt_parm.
11974 * init.c (expand_virtual_init): Likewise.
11975 * class.c (same_signature_p): No longer static.
11976 * cp-tree.h: Declare it.
11977 * search.c (look_for_overrides_r): Use it.
11979 2001-02-17 Mark Mitchell <mark@codesourcery.com>
11981 * cp-tree.h (new_abi_rtti_p): Remove.
11982 (name_mangling_version): Likewise.
11983 (flag_do_squangling): Likewise.
11984 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
11985 * decl.c (grokfndecl): Likewise.
11986 * decl2.c (name_mangling_version): Remove.
11987 (flag_do_squangling): Likewise.
11988 (lang_f_options): Remove `squangle'.
11989 (unsupported_options): Add `squangle'.
11990 (cxx_decode_option): Issue a warning about uses of
11991 -fname-mangling-version.
11992 (finish_file): Remove old ABI support.
11993 * pt.c (check_explicit_specialization): Likewise.
11994 (tsubst_decl): Likewise.
11995 * rtti.c (init_rtti_processing): Likewise.
11996 (build_headof): Likewise.
11997 (get_tinfo_decl_dynamic): Likewise.
11998 (tinfo_from_decl): Likewise.
11999 (build_dynamic_cast_1): Likewise.
12000 (synthesize_tinfo_var): Likewise.
12001 * init.c (build_new): Allow enumeration types for the array-bounds
12002 in a direct-new-declarator.
12004 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12006 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12007 TREE_PROTECTED from the template being specialized.
12009 2001-02-17 Jason Merrill <jason@redhat.com>
12011 * decl2.c (build_artificial_parm): Set TREE_READONLY.
12013 * decl.c (bad_specifiers): Allow throw specs on things with
12014 pointer-to-function or -member-function type.
12015 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12018 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12020 * call.c (check_dtor_name): Handle template names correctly.
12022 2001-02-16 Jason Merrill <jason@redhat.com>
12024 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12025 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12026 * optimize.c (maybe_clone_body): Don't substitute it.
12027 * call.c (build_new_method_call): Check in_chrg instead.
12028 * init.c (expand_virtual_init): Likewise.
12030 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
12032 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12033 class-type introduces at least a type-name.
12035 2001-02-16 Jakub Jelinek <jakub@redhat.com>
12037 * call.c (convert_like_real): Create a temporary for non-lvalue.
12039 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
12041 * cp-tree.h: Fix typos in comments.
12043 2001-02-16 Jason Merrill <jason@redhat.com>
12045 * optimize.c (remap_block): If we're compiling a clone, pass the
12046 new block to insert_block.
12048 2001-02-16 Mark Mitchell <mark@codesourcery.com>
12050 * semantics.c (finish_asm_stmt): Robustify.
12052 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12054 * pt.c (push_template_decl_real): Don't remangle the name of a
12057 2001-02-15 Jim Meyering <meyering@lucent.com>
12059 * Make-lang.in (c++.install-common): Depend on installdirs.
12060 (c++.install-info): Likewise.
12061 (c++.install-man): Likewise.
12063 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12065 * typeck2.c (build_m_component_ref): Robustify.
12067 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
12069 * friend.c (do_friend): Don't take the nested [template] class
12070 into account when deciding whether to warn about the friend
12071 function not referring to a template function.
12073 2001-02-14 Jakub Jelinek <jakub@redhat.com>
12075 * typeck.c (build_unary_op): Clarify error message.
12077 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
12079 * parse.y (component_constructor_declarator): allow optional
12080 parentheses around constructor class name.
12082 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12084 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12086 * init.c (emit_base_init): Remove incorrect comment about
12088 * method.c (make_thunk): Fix comment alignment.
12090 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12092 Kill remnants of this is variable.
12093 * cp-tree.h (flag_this_is_variable): Remove.
12094 * decl2.c (flag_this_is_variable): Remove.
12095 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12096 (build_vbase_path): The path is non-static, even in a cdtor.
12097 (resolves_to_fixed_type_p): Add additional return value.
12098 * search.c (init_vbase_pointers): Adjust.
12099 * tree.c (lvalue_p_1): Adjust.
12100 * typeck.c (mark_addressable): Adjust.
12102 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12104 * pt.c (unify): Don't check cv quals of array types.
12106 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12108 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12109 check whether we already have the type.
12111 2001-02-13 Mark Mitchell <mark@codesourcery.com>
12113 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12114 * call.c (build_op_delete_call): Simplify to remove duplicate
12116 * class.c (clone_function_decl): Don't build the deleting variant
12117 of a non-virtual destructor.
12118 * decl.c (finish_destructor_body): Don't call delete if this is a
12119 non-virtual destructor.
12120 * init.c (build_delete): Explicitly call `operator delete' when
12121 deleting an object with a non-virtual destructor.
12123 2001-02-13 Jason Merrill <jason@redhat.com>
12125 * lang-specs.h: Add more __EXCEPTIONS.
12127 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12129 * typeck2.c (process_init_constructor): Check
12130 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12132 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12134 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12135 Remove spurious information in comment. Allow further
12136 adjustments of REFERENCE_TYPE args.
12138 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12140 * errfn.c (cp_deprecated): Tweak diagnostic text.
12141 * parse.y (new_initializer): Deprecate initializer lists
12144 2001-02-12 Mark Mitchell <mark@codesourcery.com>
12146 Remove old ABI support.
12148 2001-02-11 Mark Mitchell <mark@codesourcery.com>
12150 * decl2.c (flag_vtable_thunks): Always set it to 1.
12151 (flag_new_abi): Likewise.
12152 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12154 * Makefile.in (g++spec.o): Fix typo.
12156 2001-02-09 Jason Merrill <jason@redhat.com>
12158 * lang-specs.h: Restore definition of __EXCEPTIONS.
12160 2001-02-08 Jason Merrill <jason@redhat.com>
12162 * search.c (shared_member_p): New function.
12163 (lookup_field_r): Use it.
12164 * cp-tree.h (SHARED_MEMBER_P): Remove.
12166 * method.c (process_overload_item): Handle template-dependent array
12168 * pt.c (type_unification_real): If we end up with undeduced nontype
12171 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
12174 * typeck2.c (friendly_abort): Don't say anything if we have
12175 earlier errors or sorries.
12177 * decl.c (check_tag_decl): Notice attempts to redefine bool and
12178 wchar_t. Ignore if in_system_header.
12180 * decl.c (maybe_push_cleanup_level): New fn...
12181 (start_decl_1): ...split out from here.
12182 * cvt.c (build_up_reference): Use it.
12183 * cp-tree.h: Declare it.
12185 2001-02-07 Mark Mitchell <mark@codesourcery.com>
12187 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
12190 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
12192 * pt.c (lookup_template_class): Make sure it's a primary
12193 template or template_template_parm when called from the parser.
12194 (instantiate_template_class): Add assertion.
12196 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
12198 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
12199 from error_mark_node.
12201 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
12203 Fix specification and implementation bugs in V3 ABI
12204 construction vtables.
12205 * cp-tree.h (flag_dump_class_layout): New flag.
12206 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
12207 (BINFO_LOST_PRIMARY_P): New flag.
12208 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
12209 (BINFO_PRIMARY_MARKED_P): Rename to ...
12210 (BINFO_PRIMARY_P): ... here.
12211 (binfo_via_virtual): New prototype.
12212 * decl2.c (flag_dump_class_layout): New flag.
12213 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
12214 use `=' as a file name separator.
12215 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
12217 (build_vtbl_address): If this is a virtual primary base, then
12218 get the vtbl of what it is ultimately primary for.
12219 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
12220 for BINFO_PRIMARY_P.
12221 (dfs_skip_nonprimary_vbases_markedp): Likewise.
12222 (get_shared_vbase_if_not_primary): Likewise.
12223 (dfs_get_pure_virtuals): Likewise.
12224 (expand_upcast_fixups): Likewise.
12225 (fixup_virtual_upcast_offsets): Likewise.
12226 (dfs_find_vbase_instance): Likewise.
12227 (find_vbase_instance): Likewise.
12228 (binfo_from_vbase): Adjust comment to reflect reality.
12229 (binfo_via_virtual): New function.
12230 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
12231 for binfo walking during VTT construction.
12232 (dfs_mark_primary_bases): Remove.
12233 (force_canonical_binfo_r): New function.
12234 (force_canonical_binfo): New function.
12235 (mark_primary_virtual_base): New function.
12236 (mark_primary_bases): Walk in inheritance graph order, use
12237 mark_primary_virtual_base.
12238 (determine_primary_base): Use some more intermediate variables.
12239 (dfs_find_final_overrider): Don't check for overriding along a
12241 (dfs_modify_vtables): Walk into primary virtual bases too.
12242 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
12243 (build_base_fields): Likewise.
12244 (dfs_set_offset_for_unshared_vbases): Likewise.
12245 (layout_virtual_bases): Likewise.
12246 (end_of_class): Likewise.
12247 (finish_struct_1): Call dump_class_hierarchy, if requested.
12248 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
12249 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
12250 (dump_class_hierarchy): Add file parameter. Append to file, if
12252 (finish_vtbls): Adjust accumulate_vtbl_inits call.
12253 Use canonical base for virtual bases.
12254 (build_vtt): Add more comments. Adjust build_vtt_inits call.
12255 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
12256 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
12257 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
12259 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
12260 from DATA. We want virtual primary bases and all bases via virtual.
12261 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
12262 virtual base when not a construction vtable.
12263 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
12264 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
12265 Use canonical bases when processing virtual bases.
12266 (accumulate_vtbl_inits): We're interested in any base via a
12268 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
12269 within a construction vtable, determine what is being overridden.
12270 (build_vtbl_initializer): Add more comments
12271 (add_vcall_offset_vtbl_entries_1): Adjust comment.
12272 (build_rtti_vtbl_entries): Check if the base has lost its
12275 2001-02-05 Mark Mitchell <mark@codesourcery.com>
12277 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
12279 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12281 * decl.c (pushdecl): Call abort instead of fatal.
12282 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
12283 * init.c (build_new_1): Likewise.
12284 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
12285 * decl.c (build_typename_type): hash_table_init now returns void.
12286 decl.c (init_decl_processing): Make an error non-fatal.
12288 2001-02-04 Mark Mitchell <mark@codesourcery.com>
12290 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
12292 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
12293 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
12294 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
12295 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
12296 * decl.c (maybe_commonize_var): Use the new name-mangling where
12298 * decl2.c (comdat_linkage): Enhance comments. Make all
12299 compiler-generated things static, if COMDAT is not available.
12300 (get_tinfo_decl): Do not make typeinfo objects that belong in the
12302 (tinfo_base_init): Use the correct mangled name for typeinfo
12303 strings, and push them into the global scope.
12304 (typeinfo_in_lib_p): New function.
12305 (synthesize_tinfo_var): Use it.
12306 (create_real_tinfo_var): Likewise.
12308 2001-02-03 Jakub Jelinek <jakub@redhat.com>
12310 * decl.c (push_class_binding): Use context_for_name_lookup instead
12311 of CP_DECL_CONTEXT.
12312 * search.c (context_for_name_lookup): Remove static. Check for NULL
12313 context in the loop.
12314 * cp-tree.h (context_for_name_lookup): Add prototype.
12316 2001-02-02 Jakub Jelinek <jakub@redhat.com>
12318 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
12319 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
12321 * call.c (convert_class_to_reference, build_user_type_conversion_1,
12322 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
12324 2001-02-02 Mark Mitchell <mark@codesourcery.com>
12326 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
12327 of macros used when compiling g++spec.c.
12328 * g++spec.c (lang_specific_driver): Link with the shared
12331 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
12333 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
12334 make_reference_declarator, make_call_declarator), method.c
12335 (implicitly_declare_fn), parse.y (namespace_using_decl,
12336 notype_unqualified_id, expr_or_declarator, new_type_id,
12337 after_type_declarator, direct_after_type_declarator,
12338 notype_declarator, complex_notype_declarator,
12339 complex_direct_notype_declarator, qualified_id,
12340 notype_qualified_id, overqualified_id, direct_new_declarator,
12341 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
12342 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
12343 instead of build_parse_node.
12345 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12347 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
12348 (minus_one_node): Moved to top level gcc directory. Renamed
12349 to integer_minus_one_node.
12351 * init.c (init_init_processing): Don't set minus_one_node.
12352 (build_vec_init): Use integer_minus_one_node.
12354 * rtti.c (get_tinfo_decl_dynamic): Likewise.
12356 2001-01-28 Jakub Jelinek <jakub@redhat.com>
12358 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
12359 identical and they would be replaced with constant, remove
12360 MODIFY_EXPR from the tree.
12362 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12364 * Make-lang.in: Remove all dependencies on defaults.h.
12365 * call.c: Don't include defaults.h.
12366 * decl.c: Likewise.
12367 * decl2.c: Likewise.
12368 * except.c: Likewise.
12370 * rtti.c: Likewise.
12371 * tree.c: Likewise.
12372 * typeck.c: Likewise.
12374 2001-01-25 Jakub Jelinek <jakub@redhat.com>
12376 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
12377 operators even in "C" linkage.
12378 * method.c (set_mangled_name_for_decl): Likewise.
12379 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
12380 overloaded operators in "C" linkage.
12382 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12384 * pt.c (tsubst_decl): Remove IN_DECL parameter.
12385 (tsubst_arg_types): Check parameter is not void.
12386 (tsubst): Adjust tsubst_decl call.
12388 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12390 * call.c (add_builtin_candidate): Quote std properly, from
12393 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12395 * pt.c (check_explicit_specialization): Clone constructors and
12398 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12400 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12401 indicates anything special about template depth. Make sure we
12402 only count the user visible template classes.
12404 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12406 * call.c (build_conv): Typo in comment.
12407 (add_builtin_candidate): Add more explanation.
12408 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12409 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12410 when we have enumeral types.
12411 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12412 candidates for relops and eqops.
12413 (joust): Simplify control flow. Allow a non-template user
12414 function to hide a builtin.
12416 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
12418 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12419 (more_specialized): Add deduction parameter.
12420 * call.c (joust): Adjust more_specialized call.
12421 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12422 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12423 (get_bindings_order): Remove.
12424 (get_bindings_real): Add DEDUCE parameter.
12425 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12426 REFERENCE_TYPE jig for DEDUCE_ORDER.
12427 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12428 maybe_adjust_types_for_deduction.
12429 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12431 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12432 (check_cv_quals_for_unify): Use new unify qualifier flags.
12433 (unify): Clear new unify qualifier flags.
12434 (get_bindings_real): Add DEDUCE parameter.
12435 (get_bindings): Adjust call to get_bindings_real.
12436 (get_bindings_overload): Likewise.
12437 (most_specialized_instantiation): Adjust call to
12440 2001-01-19 Jason Merrill <jason@redhat.com>
12442 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12444 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12447 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
12449 * decl2.c (arg_assoc_class): Fix double iteration logic.
12451 2001-01-19 Jason Merrill <jason@redhat.com>
12453 * init.c (build_delete): Always call convert_force to strip cv-quals.
12455 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12456 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12457 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12459 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12461 * search.c (get_vbase_1): Count only virtual bases.
12463 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12465 * class.c (duplicate_tag_error): Robustify flag clearing.
12467 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12469 * cp-tree.h (lookup_template_class): Add complain parm.
12470 * decl.c (lookup_namespace_name): Adjust call to
12471 lookup_template_class.
12472 (make_typename_type): Likewise.
12473 * semantics.c (finish_template_type): Likewise.
12474 * pt.c (lookup_template_class): Add complain parm. Adjust.
12475 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12476 (tsubst): Likewise.
12478 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12480 * pt.c (copy_default_args_to_explicit_spec): Preserve
12481 object's CV quals. Reorganize.
12483 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12485 * typeck.c (build_modify_expr): Say `initialization' for
12487 * init.c (build_default_init): Convert to enumeral type, if
12490 2001-01-18 Jakub Jelinek <jakub@redhat.com>
12492 * parse.y (nomods_initdcl0): Properly set things up for
12495 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12497 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12498 (type_unification_real): Set it.
12501 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12503 * decl.c (finish_destructor_body): Convert to vbase pointer here.
12505 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12507 * semantics.c (begin_class_definition): Check we're not inside a
12508 template parm list.
12510 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12512 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12515 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12517 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12518 * call.c (build_over_call): Add comment.
12520 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12522 * cvt.c (ocp_convert): Handle vector type conversion
12523 * typeck2.c (digest_init): Handle vector type initializations
12525 2001-01-16 Phil Edwards <pme@sources.redhat.com>
12527 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
12530 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12532 * pt.c (check_nontype_parm): Rename to ...
12533 (invalid_nontype_parm_type_p): ... here.
12534 (process_template_parm): Adjust.
12535 (convert_template_argument): Adjust.
12537 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12539 * pt.c (check_nontype_parm): New function.
12540 (process_template_parm): Use it.
12541 (convert_template_argument): Use it.
12542 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12545 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
12547 * tree.c: Add defaults.h
12548 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12549 * Make-lang.in (cp/tree.o): Add defaults.h.
12551 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12553 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12555 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12557 * g++.1: Change to be ".so man1/gcc.1".
12559 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12561 * Make-lang.in (c++.info, c++.install-info): Build and install g++
12563 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12564 ($(srcdir)/cp/g++int.info): New target.
12565 * gxxint.texi: Add info directory entry. Use @@ in email address.
12566 * .cvsignore: Update.
12568 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12570 * typeck.c (build_c_cast): Do template processing earlier.
12571 Always pedwarn on array casts.
12573 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12575 * friend.c (make_friend_class): Make sure a templated class is
12576 actually a template.
12578 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12580 * decl2.c (get_guard): Set linkage from guarded decl.
12582 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12584 * call.c (convert_default_arg): Check for unprocessed
12586 * cp-tree.h (replace_defarg): Move to spew.c.
12587 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
12588 spew.c, which is where they really are.
12589 (done_pending_defargs): Declare.
12590 (unprocessed_defarg_fn): Declare.
12591 * decl.c (replace_defarg): Move to spew.c
12592 * parse.y (structsp): Call done_pending_defargs.
12593 * spew.c (defarg_fns): Rearrange list structure.
12594 (defarg_fnsdone): New static variable.
12595 (defarg_depfns): New static variable.
12596 (init_spew): Adjust.
12597 (add_defarg_fn): Store the type in TREE_TYPE.
12598 (do_pending_defargs): Detect and deal with ordering constraints
12600 (done_pending_defargs): New function.
12601 (unprocessed_defarg_fn): New function.
12602 (replace_defarg): Moved from decl.c. Robustify. Don't save
12603 if circularity detected.
12605 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12607 * pt.c (unify): Check array has a domain, before checking
12608 whether it is variable sized.
12610 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12612 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
12613 parameters with pointers to arrays of unknown bound.
12615 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12617 * parse.y (template_parm_header, template_spec_header): New
12618 reductions. Split out from ...
12619 (template_header): ... here. Use them.
12620 (template_template_parm): Use template_parm_header.
12621 * semantics.c (finish_template_template_parm): Add assert.
12623 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12625 * mangle.c (write_builtin_type): Fix thinko.
12627 * pt.c (copy_default_args_to_explicit_spec_1): New function.
12628 (copy_default_args_to_explicit_spec): Likewise.
12629 (check_explicit_specialization): Use it.
12631 * class.c (finish_struct_1): Remove last argument in call to
12632 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12633 * decl.c (builtin_function): Likewise.
12634 (build_cp_library_fn): Likewise.
12635 (check_initializer): Likewise.
12636 (make_rtl_for_nonlocal_decl): Likewise.
12637 (cp_finish_decl): Likewise.
12638 (start_function): Likewise.
12639 * decl2.c (finish_anon_union): Likewise.
12640 * friend.c (do_friend): Likewise.
12641 * init.c (build_java_class_ref): Likewise.
12642 * method.c (make_thunk): Likewise.
12643 * pt.c (tsubst_friend_function): Likewise.
12644 * semantics.c (expand_body): Likewise.
12646 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12648 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
12649 looking at DECL_CLONED_FUNCTION for non-functions.
12651 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12653 * error.c (dump_template_parameter): Use parm to determine how
12654 to print default value.
12656 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12658 * class.c (duplicate_tag_error): Clear more flags.
12660 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12662 * call.c (build_new_method_call): Use binfo_for_vbase.
12664 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
12666 * cp-tree.h (flag_cond_mismatch): Don't declare.
12667 * decl2.c (flag_cond_mismatch): Don't define.
12668 (lang_f_options): Remove cond-mismatch.
12669 (unsupported_options): Add cond-mismatch.
12671 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
12673 * class.c (handle_using_decl): Reject using of constructor name
12674 of sourcing class. Allow injecting of a method with same name as
12675 nested class. Fixup error messages.
12677 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
12679 * decl2.c (lang_decode_option): Handle -Wformat=2.
12681 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12683 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12684 initialized_in_class.
12685 (DECL_DEFINED_IN_CLASS_P): Rename to ...
12686 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12687 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12688 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12689 * pt.c (check_default_tmpl_args): Adjust for
12690 DECL_INITIALIZED_IN_CLASS_P.
12691 (instantiate_class_template): Likewise.
12692 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
12694 * class.c (finish_struct): Constify saved_filename.
12696 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12698 * class.c (duplicate_tag_error): Adjust diagnostic.
12699 (finish_struct): Locally set location to start of struct.
12700 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12702 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12704 * decl.c (struct binding_level): Adjust class_shadowed comments
12705 to reflect reality.
12706 (push_class_level_binding): Adjust comments to reflect reality.
12707 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12708 Don't set TREE_VALUE on the class_shadowed list.
12710 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12712 * decl2.c (acceptable_java_type): Allow references too.
12713 * init.c (build_java_class_ref): When using the new ABI, search
12714 `class$' and have it mangled with `mangle_decl.'
12715 * mangle.c (write_java_integer_type_codes): New function.
12716 (write_builtin_type): Detect and mangle Java integer and real
12719 2001-01-07 Mark Mitchell <mark@codesourcery.com>
12721 * decl2.c (grokfield): Don't accept `asm' specifiers for
12722 non-static data members.
12724 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12726 * expr.c (cplus_expand_expr): Don't reset `target'.
12728 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
12730 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
12732 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12734 * parse.y (template_datadef): Check for error_mark_node.
12736 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12738 * cp-tree.def (DEFAULT_ARG): Make `x' class.
12740 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
12742 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12743 (record_builtin_type): Make non-static.
12744 (flag_short_double): Don't declare.
12745 (init_decl_processing): Remove the creation of many tree nodes now
12746 in c_common_nodes_and_builtins.
12747 (build_void_list_node): New function.
12748 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12749 * cp-tree.h (flag_short_wchar): Don't declare.
12751 2001-01-04 Mark Mitchell <mark@codesourcery.com>
12753 * call.c (build_conv): Don't use build1 for USER_CONV.
12754 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12756 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
12758 * lex.c (lang_init): Call c_common_lang_init.
12760 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12762 * search.c (lookup_fnfields_here): Remove.
12763 (look_for_overrides_r): Use lookup_fnfields_1.
12764 Ignore functions from using declarations.
12766 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12768 Implement exceptions specifiers for implicit member functions.
12769 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12770 * method.c (synthesize_exception_spec): New function.
12771 (locate_dtor, locate_ctor, locate_copy): New functions.
12772 (implicitly_declare_fn): Generate the exception spec too.
12773 * search.c (check_final_overrider): Check artificial functions
12775 * typeck2.c (merge_exception_specifiers): New function.
12777 2001-01-03 Jason Merrill <jason@redhat.com>
12779 * init.c (build_default_init): New fn.
12780 (perform_member_init): Split out from here.
12781 (build_new_1): Use it. Simplify initialization logic.
12782 (build_vec_init): Take an array, rather than a pointer and maxindex.
12783 Speed up simple initializations. Don't clean up if we're assigning.
12784 * cp-tree.h: Adjust.
12785 * decl2.c (do_static_initialization): Remove TREE_VEC case.
12786 * parse.y (new_initializer): Return void_zero_node for ().
12787 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12788 * typeck2.c (digest_init): Only complain about user-written
12791 2000-12-22 Mike Stump <mrs@wrs.com>
12793 * decl2.c: (max_tinst_depth): Increase to 50.
12795 2001-01-02 Mark Mitchell <mark@codesourcery.com>
12797 * class.c (invalidate_class_lookup_cache): Zero the
12798 previous_class_values.
12799 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
12801 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
12802 * decl.c (free_bindings): New variable.
12803 (push_binding): Don't create a new binding if we have one on the
12805 (pop_binding): Put old bindings on the free list.
12806 (init_decl_processing): Use size_int, not build_int_2.
12807 Register free_bindings as a GC root.
12808 (cp_make_fname_decl): Use size_int, not build_int_2.
12809 (push_inline_template_parms_recursive): Likewise.
12810 (end_template_parm_list): Likewise.
12811 (for_each_template_parm): Do not use walk_tree_without_duplicates.
12812 (tsubst_template_parms): Use size_int, not build_int_2.
12813 (tsubst): Likewise.
12814 * rtti.c (get_vmi_pseudo_type_info): Likewise.
12816 2001-01-02 Richard Henderson <rth@redhat.com>
12818 * parse.y (asm): Set ASM_INPUT_P.
12820 2001-01-02 Jason Merrill <jason@redhat.com>
12822 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
12825 * typeck.c (cp_truthvalue_conversion): New fn.
12826 * cvt.c (ocp_convert): Use it.
12828 * cp-tree.h: Lose c-common.c decls.
12830 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
12831 * cvt.c (convert_to_void): Use type_unknown_p.
12833 * typeck.c (strip_all_pointer_quals): Also strip quals from
12834 pointer-to-member types.
12836 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
12839 * call.c (build_new_method_call): Do evaluate the object parameter
12840 when accessing a static member.
12841 * typeck.c (build_component_ref): Likewise.
12843 2001-01-02 Andreas Jaeger <aj@suse.de>
12845 * decl.c (cp_missing_noreturn_ok_p): New.
12846 (init_decl_processing): Set lang_missing_noreturn_ok_p.
12848 2000-12-29 Jakub Jelinek <jakub@redhat.com>
12850 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
12852 2000-12-29 Mark Mitchell <mark@codesourcery.com>
12854 * class.c (pushclass): Remove #if 0'd code.
12855 * cp-tree.h (overload_template_name): Remove.
12856 * decl.c (store_bindings): Simplify.
12857 (pop_from_top_level): Likewise.
12858 * pt.c (overload_template_name): Remove.
12859 (instantiate_decl): Don't call push_to_top_level if it's not
12862 2000-12-28 Mark Mitchell <mark@codesourcery.com>
12864 * pt.c (register_local_specialization): Don't return a value.
12865 (lookup_template_class): Use move-to-front heuristic when looking
12866 up template instantiations.
12867 (instantiate_decl): Only push_to_top_level when we're actually
12868 going to instantiate the template.
12870 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
12872 * search.c (binfo_for_vtable): Return least derived class, not
12873 most. Handle secondary vtables.
12875 2000-12-22 Jason Merrill <jason@redhat.com>
12877 * pt.c (more_specialized): Don't optimize len==0.
12878 (fn_type_unification): If we're adding the return type, increase len.
12880 * typeck.c (build_binary_op): Fix pmf comparison logic.
12882 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
12883 DECL_STATIC_FUNCTION_P.
12885 * semantics.c (genrtl_finish_function): Don't try to jump to
12886 return_label unless it exists.
12888 In partial ordering for a call, ignore parms for which we don't have
12890 * call.c (joust): Pass len to more_specialized.
12891 (add_template_candidate_real): Strip 'this', pass len.
12892 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
12893 (get_bindings_order): New fn. Pass len down.
12894 (get_bindings_real): Strip 'this', pass len.
12895 (fn_type_unification): Likewise.
12896 (type_unification_real): Succeed after checking 'len' args.
12897 (most_specialized_instantiation): Lose explicit_args parm.
12898 * class.c (resolve_address_of_overloaded_function): Strip 'this',
12901 2000-12-21 Jason Merrill <jason@redhat.com>
12903 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
12904 DECL_TEMPLATE_RESULT.
12906 * search.c (lookup_field_r): Call lookup_fnfields_1, not
12907 lookup_fnfields_here.
12909 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
12911 * call.c (build_object_call): Also allow conversions that return
12912 reference to pointer to function.
12913 (add_conv_candidate): Handle totype being ref to ptr to fn.
12914 (build_field_call): Also allow members of type reference to function.
12915 Lose support for calling pointer to METHOD_TYPE fields.
12917 * error.c (dump_expr): Handle *_CAST_EXPR.
12919 * typeck2.c (build_scoped_ref): Always convert to the naming class.
12921 * tree.c (break_out_cleanups): Lose.
12922 * cp-tree.h: Remove prototype.
12923 * typeck.c (build_component_ref): Don't break_out_cleanups.
12924 (build_compound_expr): Likewise.
12925 * semantics.c (finish_expr_stmt): Likewise.
12927 2000-12-20 Richard Henderson <rth@redhat.com>
12929 * cp-tree.h: Update declarations.
12930 * decl.c (finish_case_label): Return the new stmt node.
12931 * semantics.c (finish_goto_stmt): Likewise.
12932 (finish_expr_stmt, finish_return_stmt): Likewise.
12933 (finish_break_stmt, finish_continue_stmt): Likewise.
12934 (finish_asm_stmt): Likewise.
12935 * parse.y (already_scoped_stmt): Set STMT_LINENO.
12936 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
12937 (simple_if, simple_stmt): Return the new stmt node.
12938 (save_lineno): New.
12940 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
12942 * cp-tree.h: Don't declare warn_long_long.
12944 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12946 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
12949 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12951 * pt.c (unify): Handle when both ARG and PARM are
12952 BOUND_TEMPLATE_TEMPLATE_PARM.
12954 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12956 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
12957 DECL_TEMPLATE_PARM_P.
12959 2000-12-15 Jason Merrill <jason@redhat.com>
12961 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
12963 * init.c (build_new_1): Don't strip quals from type.
12965 * decl.c (pushdecl): Don't check for linkage on a non-decl.
12967 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
12969 * call.c (build_new_function_call): Lose space before paren in
12971 (build_new_method_call): Likewise.
12973 * typeck2.c (build_m_component_ref): Propagate quals from datum.
12975 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12977 * pt.c (check_explicit_specialization): Propagate default
12978 function arguments to explicit specializations.
12980 2000-12-13 DJ Delorie <dj@redhat.com>
12982 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
12985 2000-12-08 Jason Merrill <jason@redhat.com>
12987 * error.c (dump_function_name): Don't let the user see __comp_ctor.
12989 Clean up copy-initialization in overloading code.
12990 * call.c (build_user_type_conversion_1): Die if we are asked to
12991 convert to the same or a base type.
12992 (implicit_conversion): Avoid doing so. Lose reference binding code.
12993 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
12994 direct-initialization. Also do direct-init part of copy-init.
12995 (build_user_type_conversion): Don't provide context to convert_like.
12996 * cvt.c (ocp_convert): build_user_type_conversion will now provide
12997 the constructor call for copy-init.
12999 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13000 instantiation of a member template.
13001 (do_decl_instantiation): Not here.
13003 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13005 * class.c (check_field_decls): Don't special case anonymous
13006 fields in error messages.
13007 (note_name_declared_in_class): Use %D on diagnostic.
13009 * tree.c (pod_type_p): Use strip_array_types.
13010 (cp_valid_lang_attribute): Likewise.
13011 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13012 multiple evaluations.
13013 (cp_has_mutable_p): Use strip_array_types.
13015 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13017 * cp-tree.h (sufficient_parms_p): Declare new function.
13018 * call.c (sufficient_parms_p): New function, broken out of ...
13019 (add_function_candidate): ... here. Use it.
13020 (add_conv_candidate): Use it.
13021 * decl.c (grok_ctor_properties): Use it.
13023 2000-12-07 Jakub Jelinek <jakub@redhat.com>
13025 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13027 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
13029 * decl2.c (lang_decode_option): Handle -Wformat-security.
13031 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13033 * pt.c (verify_class_unification): New function.
13034 (get_class_bindings): Use it.
13035 (try_class_unification): Tidy.
13036 (unify): Handle when argument of a template-id is not
13037 template parameter dependent.
13038 (template_args_equal): Handle when TREE_CODE's do not match.
13040 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
13042 * lang-specs.h (c++): When invoking the stand-alone preprocessor
13043 for -save-temps, pass all relevant -Defines to it, and then don't
13044 pass them to cc1plus.
13046 2000-12-05 Will Cohen <wcohen@redhat.com>
13048 * decl.c (finish_case_label): Cleared
13049 more_cleanups_ok in surrounding function scopes.
13050 (define_label): Likewise.
13052 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13054 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13055 (get_matching_virtual): Remove.
13056 (look_for_overrides): Declare new function.
13057 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13059 * class.c (check_for_override): Move base class iteration code
13060 to look_for_overrides.
13061 * search.c (next_baselink): Remove.
13062 (get_virtuals_named_this): Remove.
13063 (get_virtual_destructor): Remove.
13064 (tree_has_any_destructors_p): Remove.
13065 (struct gvnt_info): Remove.
13066 (check_final_overrider): Remove `virtual' from error messages.
13067 (get_matching_virtuals): Remove. Move functionality to ...
13068 (look_for_overrides): ... here, and ...
13069 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13072 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13074 * typeck.c (get_delta_difference): If via a virtual base,
13076 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13079 2000-12-04 Richard Henderson <rth@redhat.com>
13081 * error.c (dump_tree): Use output_add_string not OB_PUTS.
13083 2000-12-04 Jason Merrill <jason@redhat.com>
13085 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13086 (write_builtin_type): Pass intSI_type_node and the like through
13088 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13089 Pass intSI_type_node and the like through type_for_mode.
13090 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13091 * pt.c (tsubst, unify): Likewise.
13092 * tree.c (walk_tree): Likewise.
13093 * error.c (dump_type): Likewise.
13094 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13096 * Make-lang.in: Tweak top comment for emacs.
13097 (cp/TAGS): Restore.
13099 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13101 * class.c (clone_function_decl): Robustify.
13103 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
13105 * decl.c (store_bindings): Only search in the non modified
13106 old_bindings for duplicates.
13108 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
13110 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13111 TYPE_POLYMORPHIC_P.
13113 * typeck.c (build_static_cast): Remove unused variable.
13115 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13117 * pt.c: Fix typo in comment.
13119 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13121 * decl2.c (warn_format): Remove definition.
13122 (lang_decode_option): Handle -Wformat-nonliteral,
13123 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
13125 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13127 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13128 (init_decl_processing): Don't create string_type_node,
13129 const_string_type_node, wint_type_node, intmax_type_node,
13130 uintmax_type_node, default_function_type, ptrdiff_type_node and
13131 unsigned_ptrdiff_type_node. Adjust position of call to
13132 c_common_nodes_and_builtins.
13133 (identifier_global_value): New function.
13135 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
13137 * call.c (standard_conversion): Reject pointer to member
13138 conversions from ambiguous, inaccessible or virtual bases.
13139 * typeck.c (build_static_cast): Don't check pointers to members
13142 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13144 * method.c (do_build_copy_constructor): Preserve cv
13145 qualifications when accessing source object members.
13146 (do_build_assign_ref): Likewise. Remove separate diagnostics for
13149 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13151 * method.c (do_build_assign_ref): Construct appropriately
13152 CV-qualified base reference. Don't allow const casts in base
13155 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13157 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13158 incomplete return type.
13160 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13162 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13163 * semantics.c (finish_base_specifier): Accept a _TYPE not a
13166 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13168 * spew.c (yyerror): Cope if yylval.ttype is NULL.
13170 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13172 * decl.c (grokdeclarator): Diagnose undefined template contexts.
13174 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13176 * decl.c (grokdeclarator): Do type access control on friend
13179 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13181 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
13182 bison parser ickiness.
13183 * pt.c (tsubst_friend_function): Enter namespace scope when
13184 tsubsting the function name.
13185 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
13187 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13189 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
13190 * cvt.c (cp_convert_to_pointer): Add force parameter.
13191 Allow conversions via virtual base if forced.
13192 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
13193 (ocp_convert): Likewise.
13194 * search.c (binfo_from_vbase): Return the virtual base's binfo.
13195 * typeck.c (get_delta_difference): Adjust handling of virtual
13198 2000-11-26 Mark Mitchell <mark@codesourcery.com>
13200 * tree.c (struct list_hash): Remove.
13201 (list_hash_table): Make it be an htab.
13202 (struct list_proxy): New type.
13203 (list_hash_eq): New function.
13204 (list_hash_pieces): Renamed from ...
13205 (list_hash): ... this.
13206 (list_hash_lookup): Remove.
13207 (list_hash_add): Remove.
13208 (hash_tree_cons): Use the generic hashtable.
13209 (mark_list_hash): Remove.
13210 (init_tree): Create the hashtable.
13212 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
13214 * method.c (build_mangled_C9x_name): Rename to
13215 build_mangled_C99_name. Change C9X references in comments to
13218 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13220 * parse.y (unary_expr): Move VA_ARG from here ...
13221 (primary): ... to here.
13223 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13225 * semantics.c (finish_id_expr): If type is error_mark, return
13228 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
13230 * pt.c (lookup_template_class): Simplify loop exit constructs.
13231 Cope when there is no partial instantiation of a template
13234 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
13236 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
13238 2000-11-22 Mark Mitchell <mark@codesourcery.com>
13240 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
13243 * pt.c (do_decl_instantiate): Explicitly clone constructors and
13244 destructors that haven't already been cloned.
13246 2000-11-20 Richard Henderson <rth@redhat.com>
13248 * parse.y (yyparse_1): Rename the parser entry point.
13250 2000-11-20 Alex Samuel <samuel@codesourcery.com>
13252 * mangle.c (write_name): Use <unscoped-name> for names directly in
13254 (write_unscoped_name): Accept names directly in function scope.
13256 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
13258 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
13259 * parse.y (extdef): Add EXPORT reduction.
13260 * spew.c (yylex): Don't skip export here.
13262 2000-11-19 Mark Mitchell <mark@codesourcery.com>
13264 * decl.c (init_decl_processing): Correct name of pure virtual
13265 function under the new ABI.
13266 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
13267 (throw_bad_typeid): Likewise for bad typeid function.
13269 2000-11-18 Mark Mitchell <mark@codesourcery.com>
13271 * decl.c (grokparms): Don't even function types of `void' type,
13273 * mangle.c (write_type): Don't crash when confronted with the
13276 * decl.c (grokparms): Don't create parameters of `void' type.
13278 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
13280 * lex.c (mark_impl_file_chain): Delete.
13281 (init_parse): Remove call to ggc_add_string_root. No need to
13282 ggc_strdup a string constant. Do not add impl_file_chain to GC
13284 (handle_pragma_implementation): No need to ggc_strdup main_filename.
13286 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13288 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
13290 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13292 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
13293 * decl.c (grokdeclarator): Don't reject void parms here.
13294 (require_complete_types_for_parms): Simplify, use
13295 complete_type_or_else.
13296 (grokparms): Remove bitrot. Remove funcdef parm.
13297 Deal with ellipsis parm lists here.
13298 * semantics.c (finish_parmlist): Don't append void_list_node
13299 here. Set PARMLIST_ELLIPSIS_P.
13301 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13303 * typeck2.c (incomplete_type_error): Reorganize to avoid
13304 excessive diagnostics.
13306 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
13308 * lex.c (struct impl_files, internal_filename): Constify a char *.
13310 2000-11-16 Mark Mitchell <mark@codesourcery.com>
13312 * mangle.c (write_special_name_constructor): Don't generate
13313 assembler junk when confronted with an old-style constructor.
13314 (write_special_name_destructor): Likewise.
13315 (mangle_decl_string): Do it here instead.
13317 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
13319 * call.c (op_error): Make error messages clearer.
13321 2000-11-15 Mark Mitchell <mark@codesourcery.com>
13323 * decl.c (wrapup_globals_for_namespace): Don't mark things
13324 TREE_ASM_WRITTEN when they're not.
13326 2000-11-15 Jason Merrill <jason@redhat.com>
13328 * typeck2.c (friendly_abort): Uncount the error before handing
13329 off to fancy_abort.
13331 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
13333 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
13335 2000-11-14 Mark Mitchell <mark@codesourcery.com>
13337 * class.c (build_vtbl_initializer): Fix typo in comment.
13338 * typeck.c (expr_sizeof): Don't crash on errors.
13340 2000-11-14 Jim Wilson <wilson@redhat.com>
13342 * lang-specs.h: Add %2 after %(cc1_options).
13344 2000-11-14 Richard Henderson <rth@redhat.com>
13346 * typeck.c (c_sizeof): Be strict about casting result value
13347 back to c_size_type_node.
13348 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
13350 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
13352 * typeck.c (build_unary_op): Use boolean_increment from
13353 c-common.c, moving the relevant code there.
13355 2000-11-11 Jason Merrill <jason@redhat.com>
13357 * typeck.c (mark_addressable): Don't call put_var_into_stack.
13359 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
13362 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13364 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
13365 * lex.c (copy_lang_decl): Likewise.
13367 2000-11-09 Mark Mitchell <mark@codesourcery.com>
13369 * dump.c (cp_dump_tree): Don't dump function bodies here.
13371 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
13372 (dump.o): Update dependency list.
13373 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
13374 (flag_dump_translation_unit): Likewise.
13375 (CP_TYPE_QUALS): Adjust definition.
13376 (DECL_C_BIT_FIELD): Remove.
13377 (SET_DECL_C_BIT_FIELD): Likewise.
13378 (CLEAR_DECL_C_BIT_FIELD): Likewise.
13379 (add_maybe_template): Likewise.
13380 (strip_array_types): Likewise.
13381 (dump_node_to_file): Likewise.
13382 (cp_dump_tree): New function.
13383 * decl.c (init_decl_processing): Set lang_dump_tree.
13384 * decl2.c (flag_dump_translation_unit): Remove.
13385 * dump.c: Move most of it to ../c-dump.c.
13386 (cp_dump_tree): New function.
13387 * pt.c (add_maybe_template): Remove.
13388 * typeck.c (strip_array_types): Likewise.
13390 2000-11-07 Eric Christopher <echristo@redhat.com>
13392 * decl.c (init_decl_processing): Change definition of
13393 __wchar_t to wchar_t. Remove artificial declaration of
13395 * lex.c: Change instances of __wchar_t to wchar_t.
13397 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
13399 * lex.c (do_identifier): Don't lookup_name for operators.
13400 * parse.y (operator): Save looking_for_typename.
13401 (unoperator): Restore it.
13402 * spew.c (frob_opname): Use nth_token for lookahead.
13404 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
13406 * decl.c (grok_op_properties): Always use coerce_new_type and
13407 coerce_delete_type.
13408 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13409 exception specification. Tidy up.
13410 (coerce_delete_type): Preserve exception specification. Tidy up.
13412 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
13414 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13415 (push_binding_level), error.c (cp_tree_printer), pt.c
13416 (process_partial_specialization, tsubst_template_arg_vector),
13417 search.c (lookup_member): Use memset () instead of bzero ().
13419 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
13421 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13423 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
13425 * Make-lang.in (c++.distdir): Remove.
13427 2000-11-04 Mark Mitchell <mark@codesourcery.com>
13429 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13430 declarations from different namespaces to be combined.
13432 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
13434 * decl.c: Include tm_p.h.
13436 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
13438 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13440 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
13442 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13443 (build_overload_value), repo.c (open_repo_file), xref.c
13444 (open_xref_file): Use strchr () and strrchr () instead of index ()
13447 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
13449 * call.c (build_over_call): Call fold on the CALL_EXPR.
13451 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
13453 * error.c (dump_template_decl): Separate template hearders with
13456 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
13458 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
13459 TS_* flags with corresponding TFF_*. Adjust prototypes of
13460 functions (which used to take a tree_string_flags) to take an int.
13462 * cp-tree.h (enum tree_string_flags): Remove
13463 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13464 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13465 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13466 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13467 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13468 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13469 (type_as_string, decl_as_string, expr_as_string,
13470 context_as_string): Adjust prototype.
13472 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13473 instead of TS_PLAIN.
13475 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13476 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13479 2000-10-30 Mark Mitchell <mark@codesourcery.com>
13481 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13482 (linkage_kind): New enumeration.
13483 (decl_linkage): New function.
13484 * decl2.c (comdat_linkage): Extend comment.
13485 * error.c (dump_function_decl): Print the arguments used to
13486 instantiate a template, even when not printing the type of the
13488 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13489 not TREE_PUBLIC, to test for external linkage.
13490 * tree.c (decl_linkage): New function.
13492 2000-10-28 Mark Mitchell <mark@codesourcery.com>
13494 * pt.c (instantiate_decl): Always instantiate static data members
13495 initialized in-class.
13497 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
13499 * Make-lang.in: Move all build rules here from Makefile.in,
13500 adapt to new context. Wrap all rules that change the current
13501 directory in parentheses. Expunge all references to $(P).
13502 When one command depends on another and they're run all at
13503 once, use && to separate them, not ;. Add OUTPUT_OPTION to
13504 all object-file generation rules. Delete obsolete variables.
13506 * Makefile.in: Delete.
13507 * config-lang.in: Delete outputs= line.
13509 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
13511 * error.c (dump_function_decl): Print no space between
13512 `ptr-operator' the `type-specifier' of the return type.
13513 (dump_type_prefix): Make sure we put space at the appropriate
13516 2000-10-23 Jason Merrill <jason@redhat.com>
13518 * call.c (equal_functions): Also call decls_match for extern "C" fns.
13520 2000-10-22 Jason Merrill <jason@redhat.com>
13522 * call.c (build_conditional_expr): Use ocp_convert to force
13525 2000-10-22 Mark Mitchell <mark@codesourcery.com>
13527 * call.c (standard_conversion): Use RVALUE_CONVs for all
13528 expressions that satisfy lvalue_p, not just those that satisfy
13531 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13533 * typeck.c (c_sizeof): Return an expression of `size_t' type,
13534 not one with TYPE_IS_SIZETYPE set.
13535 (dubious_conversion_warnings): Remove special-case code.
13537 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
13539 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13540 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13541 (dump_type_prefix): Print vector-of-int as 'int vector'.
13542 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13543 * tree.c (walk_tree): Handle VECTOR_TYPE.
13545 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13547 2000-10-21 Jason Merrill <jason@redhat.com>
13549 * parse.y (operator): Set got_object from got_scope.
13550 Set looking_for_typename.
13551 * decl.c (lookup_name_real): Clear val after setting from_obj.
13552 Reorganize diagnostic.
13554 2000-10-20 Jason Merrill <jason@redhat.com>
13556 * tree.c (walk_tree): Don't walk into default args.
13558 * error.c (dump_expr): Use host_integerp.
13560 2000-10-20 David Edelsohn <edelsohn@gnu.org>
13562 * typeck2.c (abstract_virtuals_error): Use "because" instead of
13563 "since" in error message.
13565 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13567 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13569 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
13571 * decl.c (revert_static_member_fn): Fixed typo.
13573 2000-10-19 Mark Mitchell <mark@codesourcery.com>
13575 * class.c (subobject_offset_fn): New type.
13576 (dfs_record_base_offsets): Remove.
13577 (record_base_offsets): Likewise.
13578 (dfs_search_base_offsets): Likewise.
13579 (record_subobject_offset): New function.
13580 (check_subobject_offset): Likewise.
13581 (walk_subobject_offsets): Likewise.
13582 (record_subobject_offsets): Likewise.
13583 (layout_conflict_p): Reimplement.
13584 (layout_nonempty_base_or_field): Correct handling of type
13585 conflicts during layout.
13586 (layout_empty_base): Likewise.
13587 (build_base_field): Adjust to handle new representation of empty
13589 (build_base_fields): Likewise.
13590 (layout_virtual_bases): Likewise.
13591 (splay_tree_compare_integer_csts): New function.
13592 (layout_class_type): Use a splay_tree, rather than a varray, to
13593 represent the offsets of empty bases.
13595 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
13596 * decl.c (select_decl): Don't return declarations that are
13599 2000-10-18 Mark Mitchell <mark@codesourcery.com>
13601 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
13602 (fake_std_node): New macro.
13603 * decl.c (in_std): Rename to ...
13604 (in_fake_std): ... this.
13605 (flag_no_builtin): Remove.
13606 (flag_no_nonansi_builtin): Likewise.
13607 (walk_namespaces_r): Use fake_std_node.
13608 (push_namespace): Use std_identifier.
13609 (pop_namespace): Use in_fake_std.
13610 (lookup_name_real): Use fake_std_node.
13611 (init_decl_processing): When -fhonor-std, create the `std'
13612 namespace. Don't create a dummy fake_std_node in that case.
13613 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
13614 (builtin_function): Put builtins whose names don't begin
13615 with `_' in the std namespace.
13616 * decl2.c (flag_no_builtin): Remove.
13617 (flag_no_nonansi_builtin): Likewise.
13618 (set_decl_namespace): Use fake_std_node.
13619 (validate_nonmember_using_decl): Likewise.
13620 (do_using_directive): Likewise.
13621 (handle_class_head): Likewise.
13622 * dump.c (dequeue_and_dump): Likewise.
13623 * except.c (init_exception_processing): Use std_identifier.
13624 * init.c (build_member_call): Use fake_std_node.
13625 * rtti.c (init_rtti_processing): Use std_identifier.
13627 2000-10-17 Mark Mitchell <mark@codesourcery.com>
13629 * cp-tree.h (back_end_hook): Remove declaration.
13630 * decl2.c (back_end_hook): Remove definition.
13632 * dump.c (dequeue_and_dump): Dump TREE_USED.
13634 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
13636 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
13638 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13640 * decl.c (WINT_TYPE): Define.
13641 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
13642 c_size_type_node, signed_size_type_node and wint_type_node.
13644 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13646 * decl2.c (warn_missing_format_attribute): New variable.
13647 (lang_decode_option): Decode -Wmissing-format-attribute.
13649 2000-10-16 Mark Mitchell <mark@codesourcery.com>
13651 * typeck.c (qualify_type): Remove.
13652 (composite_pointer_type): Fix handling of conversions to `cv void*'.
13654 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13656 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13658 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13660 * Makefile.in (parse.c, parse.h): Create atomically.
13662 2000-10-12 Mark Mitchell <mark@codesourcery.com>
13664 * class.c (current_obstack): Remove.
13665 * decl.c (ggc_p): Remove.
13666 (start_decl): Don't use decl_tree_cons.
13667 (grokdeclarator): Don't use build_decl_list.
13668 (start_function): Don't use decl_tree_cons.
13669 (finish_function): Don't mess with obstacks.
13670 * decl2.c (grok_x_components): Don't use build_decl_list.
13671 * lex.c (make_call_declarator): Don't call decl_tree_cons.
13672 (implicitly_declare_fn): Don't call build_decl_list.
13673 * parse.y (frob_specs): Don't call build_decl_list or
13675 (expr_or_declarator_intern): Don't call decl_tree_cons.
13676 (primary): Don't call build_decl_list.
13677 (fcast_or_absdcl): Likewise.
13678 (typed_declspecs): Don't call decl_tree_cons.
13679 (reserved_declspecs): Don't call build_decl_list.
13680 (declmods): Likewise.
13681 (reserved_typespecquals): Likewise.
13683 (new_type_id): Likewise.
13684 (cv_qualifiers): Likewise.
13685 (after_type_declarator_intern): Likewise.
13686 (notype_declarator_intern): Likewise.
13687 (absdcl_intern): Likewise.
13688 (named_parm): Likewise.
13689 * pt.c (most_specialized_class): Likewise.
13690 * repo.c (temporary_obstack): Make it a structure, not a pointer.
13691 (init_repo): Initialize it.
13692 * search.c (current_obstack): Remove.
13693 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
13695 2000-10-09 Richard Henderson <rth@cygnus.com>
13697 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13698 (c++ language support bits for libgcc): Remove.
13699 (c++.clean): Remove cplib2.txt cleanup.
13700 * config-lang.in (headers, lib2funcs): Remove.
13702 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13703 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13704 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13705 * inc/new.h, inc/typeinfo: Remove files.
13707 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
13709 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13711 (init_decl_processing): Initialize intmax_type_node and
13714 2000-10-06 Richard Henderson <rth@cygnus.com>
13716 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13717 (original_result_rtx): Remove.
13718 * decl.c (save_function_data): Don't clear x_result_rtx.
13719 (mark_lang_function): Don't mark it either.
13720 * expr.c (fixup_result_decl): Remove.
13721 * semantics.c (genrtl_named_return_value): Frob the return decl
13722 before calling emit_local_var.
13723 (genrtl_finish_function): Don't call fixup_result_decl.
13724 Always emit the jump to return_label.
13726 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
13728 * pt.c (lookup_template_class): Set current access for enum.
13729 (tsubst_enum): Set file & line for enum decl.
13731 * spew.c (yylex): Remove unused variable.
13733 2000-10-05 Richard Henderson <rth@cygnus.com>
13735 * semantics.c (genrtl_finish_function): Don't init or check
13736 can_reach_end; remove noreturn and return value checks.
13738 2000-10-05 Tom Tromey <tromey@cygnus.com>
13740 * init.c (build_java_class_ref): Use `build_static_name' with a
13741 suffix, not a prefix, to build the class object's name.
13743 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13745 * cp-tree.h (access_kind): Fix comment typo.
13746 * decl2.c (grokfield): Fix diagnostic typo.
13747 * semantics.c (finish_template_type): Fix comment typo.
13748 (finish_qualified_object_call_expr): Likewise.
13750 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13752 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
13755 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13757 * spew.c (frob_id): New static function.
13758 (frob_opname): Use it.
13761 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13763 * decl.c (lang_mark_false_label_stack): Remove.
13764 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
13766 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
13768 * gxxint.texi: Use @email for formatting email addresses.
13770 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
13772 * error.c: Remove direct obstack manipulation. Replace with
13773 output_buffer-based formatting. Adjust calls to removed macros.
13774 (obstack_chunk_alloc, obstack_chunk_free): Remove.
13775 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13776 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13778 2000-09-24 Mark Mitchell <mark@codesourcery.com>
13780 * ir.texi: Move to ../c-tree.texi.
13782 2000-09-20 Jason Merrill <jason@redhat.com>
13784 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13786 2000-09-21 Andreas Jaeger <aj@suse.de>
13788 * errfn.c: Move declaration of cp_printer and cp_printers to ...
13789 * cp-tree.h: ... here.
13791 * error.c: Remove declaration of cp_printer.
13793 2000-09-20 Mark Mitchell <mark@codesourcery.com>
13795 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
13797 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
13799 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
13802 2000-09-18 Mark Mitchell <mark@codesourcery.com>
13804 * decl.c (start_function): Robustify.
13806 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13808 * cp-tree.h (check_function_format): Accept a `status' parameter.
13810 * call.c, typeck.c: Updates calls to `check_function_format'.
13812 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
13814 * decl2.c (handle_class_head): Always push some scope even
13817 2000-09-16 Mark Mitchell <mark@codesourcery.com>
13819 * cp-tree.h (struct cp_language_function): Remove
13820 x_scope_stmt_stack and name_declared.
13821 (current_scope_stmt_stack): Remove.
13822 (function_name_declared_p): New macro.
13823 (struct lang_decl_flags): Use c_lang_decl as a base class.
13825 (struct lang_decl): Replace saved_tree with context.
13826 (DECL_FRIEND_CONTEXT): Adjust accordingly.
13827 (SET_DECL_FRIEND_CONTEXT): Likewise.
13828 (DECL_VIRTUAL_CONTEXT): Likewise.
13829 (DECL_SAVED_TREE): Remove.
13830 (C_DECLARED_LABEL_FLAG): Likewise.
13831 (cplus_expand_expr_stmt): Don't declare.
13832 (add_decl_stmt): Likewise.
13833 (add_scope_stmt): Likewise.
13834 * decl.c (mark_stmt_tree): Remove.
13835 (case_compare): Likewise.
13836 (finish_case_label): Use c_add_case_label.
13837 (init_decl_processing): Set more language-specific hooks.
13838 (build_enumerator): Fix typo in comment.
13839 (cplus_expand_expr_stmt): Remove.
13840 (mark_lang_function): Use mark_c_language_function.
13841 (lang_mark_tree): Use c_mark_lang_decl.
13842 * decl2.c: Change order of inclusion.
13843 * except.c: Likewise.
13844 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
13845 back on c_expand_expr.
13846 * friend.c: Include expr.h.
13847 * init.c: Change order of inclusion.
13848 * Makefile.in: Update dependencies.
13849 * lex.h (free_lang_decl_chain): Remove.
13850 * optimize.c (maybe_clone_body): Use function_name_declared_p.
13851 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
13853 (instantiate_decl): Use function_name_declared_p.
13854 * semantics.c (lang_expand_expr_stmt): Remove.
13855 (set_current_function_name_declared): Likewise.
13856 (current_function_name_declared): Likewise.
13857 (begin_compound_stmt): Use function_name_declared_p.
13858 (add_decl_stmt): Remove.
13859 (setup_vtbl_ptr): Use function_name_declared_p.
13860 (add_scope_stmt): Remove.
13861 (current_scope_stmt_stack): New function.
13862 (cp_expand_stmt): Don't handle SCOPE_STMTs.
13863 (expand_body): Use function_name_declared_p.
13864 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
13865 * typeck.c: Change order of includes.
13866 (convert_sequence): Remove.
13868 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
13870 * lex.c (reswords): Add _Complex.
13872 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13874 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
13876 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
13878 * init.c (begin_init_stmts): Don't use // comments.
13880 2000-09-12 Jason Merrill <jason@redhat.com>
13882 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
13883 all non-extern arrays.
13885 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
13886 typenames, too. Downgrade complaint to pedwarn.
13887 (xref_tag): Warn about surprising behavior of 'friend struct T'.
13888 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
13889 'class This::Inherited'.
13891 2000-09-12 Mark Mitchell <mark@codesourcery.com>
13893 * decl.c (finish_case_label): Given the LABEL_DECL a
13896 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
13898 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
13899 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
13900 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13901 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13902 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
13904 (sorry_for_unsupported_tree, print_scope_operator,
13905 print_left_paren, print_right_paren, print_left_bracket,
13906 print_right_bracket, print_whitespace): Likewise.
13907 (aggr_variety): Rename to class_key_or_enum.
13908 (print_type): Rename to print_type_id.
13909 (print_type_specifier_seq, print_simple_type_specifier,
13910 print_elaborated_type_specifier,
13911 print_rest_of_abstract_declarator,
13912 print_parameter_declaration_clause, print_exception_specification,
13913 print_nested_name_specifier, print_template_id,
13914 typedef_original_name, print_template_argument_list_start,
13915 print_template_argument_list_end): New functions.
13917 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
13919 * ir.texi: Add more documentation.
13921 2000-09-11 Mark Mitchell <mark@codesourcery.com>
13923 * cp-tree.h (struct saved_scope): Remove x_function_parms.
13924 (current_function_parms): Don't define.
13925 (struct cp_language_function): Remove parms_stored.
13926 (current_function_just_assigned_this): Don't define.
13927 (current_function_parms_stored): Likewise.
13928 (static_ctors): Declare.
13929 (static_dtors): Likewise.
13930 (SF_EXPAND): Don't define.
13931 (expand_start_early_try_stmts): Remove declaration.
13932 (store_parm_decls): Likewise.
13933 * decl.c (static_ctors): Don't declare.
13934 (static_dtors): Likewise.
13935 (struct binding_level): Remove this_block.
13936 (poplevel): Remove dead code.
13937 (set_block): Likewise.
13938 (mark_binding_level): Don't mark this_block.
13939 (mark_saved_scope): Don't mark x_function_parms.
13940 (init_decl_processing): Don't add current_function_parms as a GC
13942 (check_function_type): Change prototype.
13943 (start_function): Remove RTL-generation code.
13944 (expand_start_early_try_stmts): Remove.
13945 (store_parm_decls): Give it internal linkage. Remove
13946 RTL-generation code.
13947 (finish_function): Remove RTL-generation code.
13948 * decl2.c (static_ctors): Fix formatting.
13949 (static_dtors): Likewise.
13950 * method.c (use_thunk): Don't call store_parm_decls.
13951 (synthesize_method): Likewise.
13952 * optimize.c (maybe_clone_body): Likewise.
13953 * parse.y (fn.def2): Likewise.
13954 (.set_base_init): Likewise.
13955 (nodecls): Likewise.
13956 * pt.c (instantiate_decl): Likewise.
13957 * rtti.c (synthesize_tinfo_fn): Likewise.
13958 * semantics.c (genrtl_try_block): Simplify.
13959 (expand_body): Use genrtl_start_function and
13960 genrtl_finish_function.
13961 (genrtl_start_function): New function.
13962 (genrtl_finish_function): Likewise.
13964 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13966 * error.c (cp_tree_printer, case 'P'): Append break.
13968 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13970 * cp-tree.h (frob_opname): Declare.
13971 * parse.y (saved_scopes): New static variable.
13972 (cp_parse_init): Adjust.
13973 (do_id): If lastiddecl is NULL, do do_identifier.
13974 (operator): Save scope information.
13975 (unoperator): New reduction. Restore scope information.
13976 (operator_name): Append unoperator. Call frob_opname.
13977 * spew.c (frob_opname): Define.
13979 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13981 * decl.c, rtti.c: Include defaults.h if not already included.
13982 Don't define the *_TYPE_SIZE macros.
13984 2000-09-09 Mark Mitchell <mark@codesourcery.com>
13986 * cp-tree.h (push_switch): Change prototype.
13987 (check_cp_case_value): Remove declaration.
13988 (decl_constant_value): Likewise.
13989 * decl.c (struct cp_switch): Add switch_stmt and cases.
13990 (case_compare): New function.
13991 (push_switch): Set switch_stmt. Initialize cases.
13992 (pop_switch): Clean up cases.
13993 (define_case_label): Rename to ...
13994 (finish_case_label): ... this. Do semantic analysis for case
13996 (start_function): Correct comment.
13997 * decl2.c (check_cp_case_value): Remove.
13998 * expr.c (do_case): Remove.
13999 * pt.c (tsubst_expr): Adjust call to finish_case_label.
14000 * semantics.c (genrtl_do_poplevel): Remove declaration.
14001 (RECHAIN_STMTS): Remove.
14002 (finish_break_stmt): Use build_break_stmt.
14003 (finish_continue_stmt): Use build_continue_stmt.
14004 (finish_switch_cond): Adjust condition here, rater than in
14005 c_expand_start_case.
14006 (finish_case_label): Remove.
14007 * typeck.c (c_expand_return): Remove.
14008 (c_expand_start_case): Likewise.
14010 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
14012 * ir.texi: Document type nodes.
14014 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14016 * cp-tree.h (init_cp_semantics): Declare.
14017 (genrtl_try_block): Don't declare.
14018 (genrtl_handler): Likewise.
14019 (genrtl_catch_block): Likewise.
14020 (genrtl_ctor_stmt): Likewise.
14021 (genrtl_subobject): Likewise.
14022 (genrtl_do_poplevel): Likewise.
14023 (genrtl_named_return_value): Likewise.
14024 * lex.c (init_parse): Call init_cp_semantics.
14025 * semantics.c (genrtl_try_block): Give it internal linkage.
14026 (genrtl_handler): Likewise.
14027 (genrtl_catch_block): Likewise.
14028 (genrtl_ctor_stmt): Likewise.
14029 (genrtl_subobject): Likewise.
14030 (genrtl_do_poplevel): Likewise.
14031 (genrtl_named_return_value): Likewise.
14032 (lang_expand_stmt): Rename to ...
14033 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
14034 (init_cp_semantics): Define.
14036 * decl.c (initialize_local_var): Remove RTL-generating code.
14037 * semantics.c (genrtl_try_block): Fix formatting.
14039 Move statement-tree facilities from C++ to C front-end.
14040 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14041 (void_zero_node): Remove.
14042 (stmt_tree): Likewise.
14043 (scope_chain): Adjust.
14044 (language_function): Rename to cp_language_function.
14045 (cp_function_chain): Adjust.
14046 (current_stmt_tree): Remove.
14047 (last_tree): Likewise.
14048 (last_expr_type): Likewise.
14049 (struct lang_decl): Adjust.
14050 (STMT_IS_FULL_EXPR_P): Remove.
14051 (add_tree): Remove.
14052 (begin_stmt_tree): Likewise.
14053 (finish_stmt_tree): Likewise.
14054 (walk_tree_fn): Likewise.
14055 (walk_stmt_tree): Likewise.
14056 * class.c (finish_struct): Replace use of add_tree with add_stmt.
14057 * decl.c (mark_stmt_tree): Adjust type.
14058 (init_decl_processing): Don't build void_zero_node.
14059 (initialize_local_var): Adjust usage of current_stmt_tree.
14060 (finish_enum): Use add_stmt, not add_tree.
14061 (save_function_data): Adjust use of language_function.
14062 (finish_constructor_body): Use add_stmt, not add_tree.
14063 (finish_destructor_body): Likewise.
14064 (push_cp_function_context): Adjust use of language_function.
14065 (pop_cp_function_context): Likewise.
14066 (mark_lang_function): Likewise.
14067 (mark_cp_function_context): Likewise.
14068 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14069 (build_vec_init): Likewise.
14070 * semantics.c (SET_LAST_STMT): Remove.
14071 (RECHAIN_STMTS): Don't use it.
14072 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14073 (current_stmt_tree): Define.
14074 (add_tree): Remove.
14075 (finish_goto_stmt): Use add_stmt, not add_tree.
14076 (finish_expr_stmt): Likewise.
14077 (begin_if_stmt): Likewise.
14078 (finish_then_clause): Likewise.
14079 (begin_while_stmt): Likewise.
14080 (begin_do_stmt): Likewise.
14081 (finish_return_stmt): Likewise.
14082 (begin_for_stmt): Likewise.
14083 (finish_break_stmt): Likewise.
14084 (finish_continue_stmt): Likewise.
14085 (begin_switch_stmt): Likewise.
14086 (finish_case_label): Likewise.
14087 (begin_try_block): Likewise.
14088 (begin_function_try_block): Likewise.
14089 (begin_handler): Likewise.
14090 (begin_catch_block): Likewise.
14091 (begin_compound_stmt): Likewise.
14092 (begin_asm_stmt): Likewise.
14093 (finish_asm_stmt): Likewise.
14094 (finish_label_stmt): Likewise.
14095 (add_decl_stmt): Likewise.
14096 (finish_subobject): Likewise.
14097 (finish_decl_cleanup): Likewise.
14098 (finish_named_return_value): Likewise.
14099 (setup_vtbl_ptr): Likewise.
14100 (add_scope_stmt): Likewise.
14101 (finish_stmt_expr): Likewise.
14102 (prune_unused_decls): Remove.
14103 (begin_stmt_tree): Likewise.
14104 (finish_stmt_tree): Likewise.
14105 (prep_stmt): Adjust use of current_stmt_tree.
14106 (lang_expand_stmt): Likewise.
14107 * tree.c (statement_code_p): Remove.
14108 (cp_statement_code_p): New function.
14109 (walk_stmt_tree): Remove.
14110 (init_tree): Set lang_statement_code_p.
14112 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
14114 Integrated preprocessor.
14116 * Make-lang.in, Makefile.in: Remove all references to input.c,
14117 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
14118 * gxx.gperf, hash.h, input.c: Delete.
14119 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14120 initialized properly.
14122 * class.c (fixup_pending_inline): Take a tree, not a
14123 struct pending_inline *. All callers changed.
14124 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14125 RID_PROTECTED entries in ridpointers[] array here.
14126 * decl.c (duplicate_decls): Do not refer to struct
14128 (record_builtin_type, init_decl_processing): Use RID_MAX not
14130 (grokdeclarator): Use C_IS_RESERVED_WORD.
14131 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14133 (grok_x_components): Do not inspect pending_inlines chain.
14135 * cp-tree.h (struct lang_identifier): Add rid_code entry.
14136 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14137 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14138 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14139 TIME_IDENTIFIER_FILEINFO): Kill.
14141 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
14142 single 32-bit word.
14143 * parse.y: Call do_pending_inlines unconditionally.
14144 reinit_parse_for_method is now snarf_method. fn.defpen is no
14145 longer necessary. Remove unnecessary <itype> annotation on
14146 SCOPE. Do not refer to end_of_file or struct pending_inline.
14147 * semantics.c (begin_inline_definitions): Call
14148 do_pending_inlines unconditionally.
14150 * lex.c: Remove all code now shared with C front end.
14151 Initialize cpplib properly if USE_CPPLIB. Put reserved words
14152 into the get_identifier table. Rewrite pragma handling to
14153 work with the registry. Move code to save tokens for later
14154 processing to spew.c.
14156 * spew.c: Rewrite everything in terms of token streams instead
14157 of text. Move routines here from lex.c / input.c as
14158 appropriate. GC-mark trees hanging off the pending inlines
14161 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14163 * NEWS: Mention that the named return value extension has been
14165 * cp-tree.h (original_result_rtx): Define.
14166 (TREE_REFERENCE_EXPR): Remove.
14167 (DECL_VPARENT): Likewise.
14168 (pushdecl_nonclass_level): Likewise.
14169 (store_return_init): Likewise.
14170 (reinit_lang_specific): Likewise.
14171 (genrtl_named_return_value): Change prototype.
14172 * decl.c (original_result_rtx): Remove.
14173 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
14174 Do not generate RTL for local variables here.
14175 (store_return_init): Remove.
14176 * semantics.c (genrtl_named_return_value): Simplify. Fold in
14178 (finish_named_return_value): Adjust accordingly. Warn that this
14179 extension is deprecated.
14180 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
14182 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14184 * pt.c (type_unification_real): Replace switch with if.
14185 (unify): Tsubst non-type parms before comparing.
14187 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14189 * error.c (dump_typename): New function, broken out of ...
14190 (dump_type): ... here. Use it.
14191 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
14193 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14195 * init.c (build_offset_ref): Deal with namespace scoped
14198 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14200 * class.c (resolve_address_of_overloaded_function): Add
14201 explanation message.
14202 * decl.c (define_case_label): Reformat explanation.
14203 * decl2.c (finish_static_data_member_decl): Likewise.
14204 (grokfield): Likewise.
14205 * friend.c (do_friend): Likewise.
14207 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
14209 * tree.c (walk_tree): Expose tail recursion.
14210 (walk_stmt_tree): New function.
14211 * cp-tree.h: Prototype walk_stmt_tree.
14212 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
14213 the BLOCKs directly. If a BLOCK has no variables after
14214 pruning, discard it.
14215 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
14216 restore the line number.
14218 2000-09-05 Mark Mitchell <mark@codesourcery.com>
14220 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
14221 (pt.o): Remove dependency on HTAB_H.
14222 * cp-tree.h: Include hashtab.h.
14223 (walk_tree): Change prototype.
14224 (walk_tree_without_duplicates): New function.
14225 * decl.c (check_default_argument): Use it.
14226 * optimize.c (remap_decl): Adjust calls to walk_tree.
14227 (copy_body): Likewise.
14228 (expand_calls_inline): Likewise.
14229 (calls_setjmp_p): Use walk_tree_without_duplicates.
14230 * pt.c: Don't include hashtab.h.
14231 (for_each_template_parm): Use walk_tree_without_duplicates.
14232 * semantics.c (finish-stmt_tree): Likewise.
14233 (expand_body): Likewise.
14234 * tree.c (walk_tree): Add additional parameter.
14235 (walk_tree_without_duplicates): New function.
14236 (count_trees): Use it.
14237 (verify_stmt_tree): Adjust call to walk_tree.
14238 (find_tree): Use walk_tree_without_duplicates.
14239 (no_linkage_check): Likewise.
14240 (break_out_target_exprs): Adjust call to walk_tree.
14241 (cp_unsave): Likewise.
14243 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14245 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
14246 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14247 * cp-tree.h (TYPE_BINFO): Adjust comment.
14248 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
14249 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14250 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14251 (TYPE_TEMPLATE_INFO): Likewise.
14252 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
14253 * class.c (push_nested_class): Likewise.
14254 * decl.c (lookup_name_real): Likewise.
14255 (grokdeclarator): Likewise.
14256 (grok_op_properties): Likewise.
14257 (xref_tag): Likewise.
14258 (xref_basetypes): Likewise.
14259 * decl2.c (constructor_name_full): Likewise.
14260 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
14261 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14262 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
14263 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14264 (dump_type_suffix): Likewise.
14265 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
14267 (get_aggr_from_typedef): Likewise.
14268 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
14269 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14270 (write_template_parm): Likewise.
14271 (write_template_template_parm): Check tree code instead of
14272 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14273 * method.c (build_overload_nested_name): Add
14274 BOUND_TEMPLATE_TEMPLATE_PARM.
14275 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
14276 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14277 * pt.c (convert_template_argument): Check tree code instead of
14278 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14279 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
14280 (for_each_template_parm): Adjust comment.
14281 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
14282 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14283 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
14284 template_args_equal to compare template template parameter cases.
14285 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14286 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
14288 * tree.c (copy_template_template_parm): Decide whether to create
14289 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
14290 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14291 (copy_tree_r): Likewise.
14292 * typeck.c (comptypes): Likewise. Check tree code instead of
14293 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14295 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
14297 * decl.c (finish_function): Move the code for handling functions
14298 marked with the constructor and destructor attributes inside the
14301 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14303 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
14305 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14307 * pt.c (lookup_template_class): Remove abort.
14308 * tree.c (get_type_decl): Allow error_mark_node.
14310 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14312 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
14315 2000-09-03 Mark Mitchell <mark@codesourcery.com>
14317 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
14320 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14322 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
14323 union tag mismatch error reporting.
14325 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14327 * call.c (build_scoped_method_call): Check it is not a namespace.
14329 2000-08-30 Jason Merrill <jason@redhat.com>
14331 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
14333 * tree.c (bot_manip): Check TREE_CONSTANT rather than
14334 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
14335 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
14337 * decl.c (start_function): Always call make_function_rtl.
14339 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14341 * semantics.c (prune_unused_decls): New function.
14342 (finish_stmt_tree): Call it via walk_tree.
14344 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14346 * class.c (build_secondary_vtable): Constify a char *.
14347 * decl.c (init_decl_processing): Initialize function_id_node,
14348 pretty_function_id_node, and func_id_node.
14349 * input.c (struct input_source): Constify 'str'.
14350 (feed_input): Constify first argument.
14351 * mangle.c (write_identifier): Constify argument.
14352 * pt.c (mangle_class_name_for_template): Constify argument.
14354 2000-08-29 Mark Mitchell <mark@codesourcery.com>
14356 * typeck.c (mark_addressable): Remove code that pokes around in
14359 2000-08-28 Jason Merrill <jason@redhat.com>
14361 * lex.c (file_name_nondirectory): Move to toplev.c.
14363 * cp-tree.h (LOCAL_CLASS_P): New macro.
14364 * class.c (finish_struct_1): Use it.
14366 2000-08-27 Alex Samuel <samuel@codesourcery.com>
14368 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
14369 (write_encoding): Pass another argument to write_name.
14370 (write_name): Add ignore_local_scope parameter. Fix handling of
14372 (write_nested_name): Use write_unqualified_name.
14373 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
14374 (write_template_prefix): Use write_unqualified_name.
14375 (write_component): Remove.
14376 (write_local_name): Add parameter. Use direct local entity to
14377 discriminator calculation.
14378 (write_class_enum_type): Pass another argument to write_name.
14379 (write_template_template_arg): Likewise.
14380 (make_guard_variable): Likewise.
14382 2000-08-27 Jason Merrill <jason@redhat.com>
14384 * decl.c (pushdecl): Matching decls for local externs are found in
14385 the current level. Propagate linkage information from previous
14388 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
14390 * ir.texi (Expressions): Fix typo.
14392 2000-08-25 Greg McGary <greg@mcgary.org>
14394 * tree.c (init_tree): Use ARRAY_SIZE.
14396 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14398 * error.c (cp_tree_printer): Rework.
14400 2000-08-25 Mark Mitchell <mark@codesourcery.com>
14402 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14404 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14405 (cp-demangle.o): Remove target.
14406 (dyn-string.o): Likewise.
14408 * decl.c (grokfndecl): Require that `main' return an `int'.
14409 * mangle.c (write_encoding): Don't mangle return types for
14410 conversion functions.
14412 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14414 * error.c (tree_formatting_info): New data type.
14415 (tree_being_formatted): New macro.
14416 (tree_formatting_flags): Likewise.
14417 (put_whitespace): Likewise.
14418 (print_tree_identifier): Likewise.
14419 (print_identifier): Likewise.
14420 (cp_tree_printer, print_function_argument_list, print_declaration,
14421 print_expression, print_function_declaration,
14422 print_function_parameter, print_type, print_cv_qualifier): New
14424 (init_error): Initialize lang_printer.
14426 2000-08-24 Jason Merrill <jason@redhat.com>
14428 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14429 adjustment necessary.
14431 2000-08-24 Greg McGary <greg@mcgary.org>
14433 * cp-tree.h (MAIN_NAME_P): Remove macro.
14435 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
14437 * error.c (print_instantiation_context): Don't forget to flush the
14440 2000-08-23 Jason Merrill <jason@redhat.com>
14442 * typeck.c (build_ptrmemfunc): Save the input pmf.
14444 * method.c (process_modifiers): Use same_type_p.
14446 2000-08-23 Mark Mitchell <mark@codesourcery.com>
14448 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14449 * mangle.c (write_function_type): Change prototype.
14450 (write_encoding): Don't mangle return types for
14451 constructors or destructors.
14452 (write_type): Adjust call to write_function_type.
14453 * pt.c (instantiate_template): Instantiate alternate entry points
14454 when instantiating the main function.
14456 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14458 * error.c (cp_print_error_function): Don't use embedded '\n' in
14461 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14463 * decl.c (init_decl_processing): Remove bogus initialization.
14464 * error.c (lang_print_error_function): Restore here.
14465 (init_error): Initialize print_error_function.
14467 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14469 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14471 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
14473 * Makefile.in (error.o): Depends on diagnostic.h
14475 * cp-tree.h (problematic_instantiation_changed,
14476 record_last_problematic_instantiation, current_instantiation,
14477 print_instantiation_context): Declare.
14478 (maybe_print_template_context): Remove.
14480 * decl.c (init_decl_processing): Set print_error_function to NULL.
14481 (lang_print_error_function): Remove, since we're using a new
14484 * error.c: #include diagnostic.h
14485 (function_category): New function.
14486 (cp_diagnostic_starter): Likewise.
14487 (cp_diagnostic_finalizer): Likewise.
14488 (cp_print_error_function): Likewise.
14489 (maybe_print_instantiation_context): Likewise.
14490 (print_instantiation_full_context): Likewise.
14491 (print_instantiation_partial_context): Likewise.
14492 (print_instantiation_context): Define.
14493 (init_error): Initialize diagnostic pager and finalizer.
14495 * pt.c (problematic_instantiation_changed): Define.
14496 (record_last_problematic_instantiation): Likewise.
14497 (current_instantiation): Likewise.
14498 (maybe_print_template_context): Remove.
14499 (print_template_context): Likewise.
14500 (current_tinst_level): Make static to reflect Brendan Kehoe's
14501 change of 1995-04-13.
14502 (push_tinst_level): Call print_instantiation_context.
14504 2000-08-21 Nix <nix@esperi.demon.co.uk>
14506 * lang-specs.h: Do not process -o or run the assembler if
14509 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
14511 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14513 * decl2.c (lang_decode_option): Disable gettext attributes for
14516 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
14518 * lex.c (lang_init_options): Default diagnostic message maximum
14519 length to 80, when line-wrapping.
14521 2000-08-20 Mark Mitchell <mark@codesourcery.com>
14523 * class.c (build_vtbl_initializer): Clear the entire
14524 vtbl_init_data. Start keeping track of the functions for which we
14525 have created vcall offsets here.
14526 (dfs_build_vcall_offset_vtbl_entries): Remove.
14527 (build_vcall_offset_vtbl_entries): Reimplement.
14528 (add_vcall_offset_vtbl_entries_r): New function.
14529 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
14530 computing when vcall offsets are necessary.
14532 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14534 * decl.c (member_function_or_else): Use cp_error ... %T.
14535 (grokdeclarator): Likewise.
14536 (start_method): Likewise.
14537 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14539 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14541 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14544 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14546 * cp-tree.h (PTRMEM_OK_P): New macro.
14547 (itf_ptrmem_ok): New enumeration value.
14548 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14549 argument. Diagnose implicit pointer to member.
14550 (instantiate_type): Don't diagnose implicit pointer to member
14551 here. Pass itf_ptrmem_ok if ok. Adjust calls to
14552 resolve_address_of_overloaded_function.
14553 * init.c (build_offset_ref): Set PTRMEM_OK_P.
14554 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14555 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14556 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14557 (build_unary_op): Deal with single non-static member in
14560 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14562 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14564 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14566 * cp-tree.h (enum_name_string): Remove prototype.
14567 (report_case_error): Remove prototype.
14568 * cp/typeck2.c (enum_name_string): Remove.
14569 (report_case_error): Remove.
14570 * error.c (dump_expr): Deal with enum values directly.
14571 Correctly negate integer constant.
14573 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14575 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14576 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14577 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14578 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14579 (__cxa_vec_new): Use __cxa_vec_new2.
14580 (__cxa_vec_delete): Use __cxa_vec_delete2.
14582 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14584 * vec.cc (__cxa_vec_new): Set "C" linkage.
14585 (__cxa_vec_ctor): Likewise.
14586 (__cxa_vec_cctor): Likewise.
14587 (__cxa_vec_dtor): Likewise.
14588 (__cxa_vec_delete): Likewise.
14589 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
14590 (__cxa_vec_ctor): Likewise.
14591 (__cxa_vec_cctor): Likewise.
14592 (__cxa_vec_dtor): Likewise.
14593 (__cxa_vec_delete): Likewise.
14595 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14597 * class.c (instantiate_type): Reinstate local variable
14598 deleted in previous change.
14600 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
14603 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14605 * cp-tree.h (instantiate_type_flags): New enumeration.
14606 (instantiate_type): Change parameter.
14607 * class.c (instantiate_type): Adjust prototype. Adjust.
14608 * call.c (standard_conversion): Adjust instantiate_type call.
14609 (reference_binding): Likewise.
14610 (build_op_delete_call): Likewise.
14611 (convert_like_real): Likewise.
14612 * cvt.c (cp_convert_to_pointer): Likewise.
14613 (convert_to_reference): Likewise.
14614 * pt.c (convert_nontype_argument): Likewise.
14615 * typeck.c (build_binary_op): Likewise.
14616 (build_ptrmemfunc): Likewise.
14617 (convert_for_assignment): Likewise.
14619 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14621 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
14622 (current_aggr): Define.
14623 * decl.c (grokdeclarator): Make sure a friend class is an
14624 elaborated type specifier.
14625 * parse.y (current_aggr): Remove static definition.
14626 (cp_parse_init): Adjust.
14627 (structsp): Clear and restore current_aggr.
14628 (component_decl_list): Clear current_aggr.
14630 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
14631 aggregate tag on the typename's context.
14633 * pt.c (tsubst_friend_class): Return error_mark_node, if
14634 parms becomes NULL.
14635 (instantiate_class_template): Ignore error_mark_node friend types.
14637 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
14639 * cvt.c (warn_ref_binding): New static function, broken out of ...
14640 (convert_to_reference): ... here. Use it.
14642 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14644 * parse.y (template_arg): Add rule for template qualified with
14647 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14649 * decl2.c (add_function): Reorganize.
14650 (arg_assoc): Do not consider function template decls.
14652 2000-08-11 Jason Merrill <jason@redhat.com>
14654 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14657 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14659 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14660 (lookup_nested_tag): Likewise.
14662 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14665 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14667 * parse.y (named_complex_class_head_sans_basetype): Remove
14670 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14672 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14673 explicit TEMPLATE_ID_EXPR args.
14674 (build_expr_from_tree, case CALL_EXPR): Likewise.
14676 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14678 * decl.c (check_tag_decl): Diagnose typename's which don't
14681 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
14683 * init.c (build_aggr_init): Reject bogus array initializers
14686 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14688 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14690 * cp/tinfo.cc (__dynamic_cast): Likewise.
14691 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
14693 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14695 * cvt.c (convert_to_pointer_force): Fix error message when
14696 attempting to cast from ambiguous base.
14698 2000-08-08 Jason Merrill <jason@redhat.com>
14700 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14701 (tsubst_template_arg_vector): Likewise.
14703 * decl2.c (build_anon_union_vars): Choose the largest field; don't
14704 assume that one will be as large as the union.
14706 2000-08-07 Kazu Hirata <kazu@hxi.com>
14708 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14709 * decl.c (pop_labels): Likewise.
14711 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
14713 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14715 (__pointer_to_member_type_info): Likewise.
14716 (__base_class_info): Likewise.
14717 (__class_type_info): Likewise.
14718 (__si_class_type_info): Likewise.
14719 (__vmi_class_type_info): Likewise.
14720 * tinfo.cc (__si_class_type_info::__do_find_public_src):
14721 Changed member names to match specifications.
14722 (__vmi_class_type_info::__do_find_public_src): Likewise.
14723 (__si_class_type_info::__do_dyncast): Likewise.
14724 (__vmi_class_type_info::__do_dyncast): Likewise.
14725 (__si_class_type_info::__do_upcast): Likewise.
14726 (__vmi_class_type_info::__do_upcast): Likewise.
14727 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
14728 (__pbase_type_info::__pointer_catch): Likewise.
14729 (__pointer_type_info::__pointer_catch): Likewise.
14730 (__pointer_to_member_type_info::__pointer_catch): Likewise.
14732 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
14734 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14735 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14736 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
14738 2000-08-04 Mark Mitchell <mark@codesourcery.com>
14740 * cp-tree.h (add_method): Change prototype.
14741 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
14742 Don't double the size of the method vector in the error case.
14743 (handle_using_decl): Adjust call to add_method.
14744 (add_implicitly_declared_members): Likewise.
14745 (clone_function_decl): Likewise.
14746 * decl2.c (check_classfn): Likewise.
14747 * semantics.c (finish_member_declaration): Likewise.
14749 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
14751 * decl.c (flag_isoc94): New variable.
14753 2000-08-02 Jason Merrill <jason@redhat.com>
14755 * pt.c (do_type_instantiation): Add complain parm; don't complain
14756 if called recursively.
14757 * cp-tree.h, parse.y: Adjust.
14759 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
14761 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14762 -Wno-strict-prototypes.
14764 * g++spec.c: Adjust type of second argument to
14765 lang_specific_driver, and update code as necessary.
14767 * cp-tree.h: Don't prototype min_precision here.
14768 (my_friendly_assert): Cast expression to void.
14769 * semantics.c (do_poplevel): Initialize scope_stmts.
14771 2000-08-02 Mark Mitchell <mark@codesourcery.com>
14773 * cp-tree.h (DECL_NEEDED_P): Tweak.
14775 2000-07-28 Jason Merrill <jason@redhat.com>
14777 * lang-specs.h: Use %i in rule for .ii files.
14779 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
14781 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14783 2000-07-30 Mark Mitchell <mark@codesourcery.com>
14785 Allow indirect primary bases.
14786 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
14788 (CLASSTYPE_VFIELD_PARENT): Remove.
14789 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14790 (BINFO_PRIMARY_BINFO): Remove.
14791 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
14792 (BINFO_VBASE_PRIMARY_P): Likewise.
14793 (BINFO_PRIMARY_BASE_OF): New macro.
14794 (BINFO_INDIRECT_PRIMARY_P): Likewise.
14795 (get_primary_binfo): New function.
14796 * decl.c (lang_mark_tree): Make lang_type::primary_base.
14797 * class.c (vcall_offset_data_s): Rename to ...
14798 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
14799 and add ctor_vtbl_p.
14800 (get_derived_offset): Use get_primary_binfo.
14801 (dfs_mark_primary_bases): Adjust handling of virtual primary
14803 (mark_primary_bases): Likewise.
14804 (set_primary_base): Take a binfo, not an integer, as a
14805 representation of the primary base.
14806 (indirect_primary_base_p): Remove.
14807 (determine_primary_base): Adjust for indirect primary bases.
14808 (dfs_find_final_overrider): Fix typo in coment.
14809 (update_vtable_entry_for_fn): Use get_primary_binfo.
14810 (layout_nonempty_base_or_field): Tweak.
14811 (build_base_fields): Adjust for new primary base semantics.
14812 (dfs_propagate_binfo_offsets): Remove.
14813 (propagate_binfo_offsets): Rewrite.
14814 (dfs_set_offset_for_shared_vbases): Remove.
14815 (layout_virtual_bases): Don't use it.
14816 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
14818 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
14819 CLASSTYPE_VFIELD_PARENT.
14820 (dfs_get_primary_binfo): New function.
14821 (get_primary_binfo): Likewise.
14822 (dump_class_hierarchy_r): Tweak printing of primary bases.
14823 (build_vtbl_initializer): Fix typo in comments. Use
14825 (build_vcall_and_vbase_vtbl_entries): Likewise.
14826 (build_vbaes_offset_vtbl_entries): Likewise.
14827 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
14828 BV_VCALL_INDEX to handle indirect primary bases.
14829 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
14830 (build_rtti_vtbl_entries): Likewise.
14831 * search.c (get_shared_vbase_if_not_primary): Tweak.
14832 (find_vbase_instance): Likewise.
14833 (binfo_for_vtable): Simplify.
14834 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
14835 (make_binfo): Make it have 11 entries.
14837 2000-07-30 Alex Samuel <samuel@codesourcery.com>
14839 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
14840 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
14841 ascertaining primaryness.
14842 (G): Remove template_args.
14843 (decl_is_template_id): New function.
14844 (write_encoding): Use decl_is_template_id.
14845 (write_name): Likewise. Handle type_decls. Get main variant of
14847 (write_nested_name): Likewise.
14848 (write_prefix): Likewise.
14849 (write_template_prefix): Likewise.
14850 (write_special_name_constructor): Remove defunct production from
14852 (write_bare_function_type): Remove comment about absent parameter.
14853 (write_template_template_arg): Add missing grammar production to
14856 2000-07-27 Jason Merrill <jason@redhat.com>
14858 * decl.c (duplicate_decls): If common_type produces a non-typedef
14859 type for a typedef, just use the old type.
14861 2000-07-27 Mark Mitchell <mark@codesourcery.com>
14863 * cp-tree.h (function_depth): Declare.
14864 (verify_stmt_tree): Likewise.
14865 (find_tree): Likewise.
14866 * decl.c (function_depth): Give it external linkage.
14867 * optimize.c (optimize_function): Increment and decrement it.
14868 * tree.c (verify_stmt_tree_r): New function.
14869 (verify_stmt_tree): Likewise.
14870 (find_tree_r): Likewise.
14871 (find_tree): Likewise.
14873 2000-07-27 Jason Merrill <jason@redhat.com>
14875 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
14877 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
14879 2000-07-26 Mark Mitchell <mark@codesourcery.com>
14881 * decl.c (start_cleanup_fn): Mark the function as `inline'.
14882 * decl2.c (get_guard): Call cp_finish_decl, not
14883 rest_of_decl_compilation, for local guards.
14884 * lex.c (do_identifier): Remove unused variable.
14886 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
14888 * parse.y: Add missing ';'.
14890 2000-07-26 Mark Mitchell <mark@codesourcery.com>
14892 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
14895 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14897 Kill strict_prototype. Backwards compatibility only for
14898 non NO_IMPLICIT_EXTERN_C systems.
14899 * cp-tree.h (flag_strict_prototype): Remove.
14900 (strict_prototype): Remove.
14901 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14902 * decl.c (maybe_push_to_top_level): Adjust.
14903 (pop_from_top_level): Adjust.
14904 (decls_match): Only allow sloppy parm matching for ancient
14906 (init_decl_processing): Adjust.
14907 (grokdeclarator): Adjust.
14908 * decl2.c (flag_strict_prototype): Remove.
14909 (strict_prototype): Remove.
14910 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14911 (lang_f_options): Remove "strict-prototype".
14912 (unsupported-options): Add "strict-prototype".
14913 * lex.c (do_identifier): Adjust.
14914 (do_scoped_id): Adjust.
14915 * parse.y (empty_parms): Adjust.
14916 * class.c (push_lang_context): Adjust.
14917 (pop_lang_context): Adjust.
14918 * typeck.c (comp_target_parms): Adjust.
14920 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14922 * decl.c (poplevel): Deal with anonymous variables at for scope.
14923 (maybe_inject_for_scope_var): Likewise.
14925 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
14927 * decl.c: Remove all signal handling code, now done in toplev.c.
14929 2000-07-23 Mark Mitchell <mark@codesourcery.com>
14931 * decl.c (make_rtl_for_nonlocal_decl): Rework.
14933 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
14936 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
14938 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
14939 Define my_friendly_assert and my_friendly_abort as macros
14940 which may call friendly_abort. Prototype friendly abort, not
14941 my_friendly_abort or my_friendly_assert.
14942 * decl.c (signal_catch): Report the signal caught in the error
14943 message. Call fatal directly.
14944 * typeck2.c (ack, my_friendly_assert): Delete.
14945 (my_friendly_abort): Rename to friendly_abort. Expect file,
14946 line, and function parameters. Report the abort code, then
14947 call fancy_abort. Do not mask an abort if errors have
14950 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
14952 * typeck.c (comp_target_parms): Remove obsolete parameter.
14953 (comp_target_types): Adjust.
14955 2000-07-17 Jason Merrill <jason@redhat.com>
14957 * typeck.c (mark_addressable): Never set TREE_USED.
14958 * call.c (build_call): Don't abort on calls to library functions
14959 that have been declared normally.
14961 * typeck.c (build_binary_op): Fix grammar in warning.
14963 * exception.cc (__eh_free): Fix prototype.
14965 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
14967 * decl.c (pushdecl): Handle seeing an OVERLOAD in
14968 IDENTIFIER_NAMESPACE_VALUE.
14970 2000-07-16 Mark Mitchell <mark@codesourcery.com>
14972 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
14973 * method.c (use_thunk): Correct handling of vcall offsets.
14975 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
14977 * .cvsignore: parse.h and parse.c have no cp- prefix.
14979 2000-07-13 Mark Mitchell <mark@codesourcery.com>
14981 * .cvsignore: New file.
14983 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
14985 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
14987 2000-07-12 Mark Mitchell <mark@codesourcery.com>
14989 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
14991 * parse.h: Likewise.
14993 2000-07-11 Mark Mitchell <mark@codesourcery.com>
14995 * class.c (layout_class_type): Add pointers to virtual bases after
14996 base classes under the old ABI.
14998 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
15000 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15001 (finish_continue_stmt): Likewise.
15002 (begin_for_stmt): Remove call to note_level_for_for.
15003 (finish_goto_stmt): Change call from build_min_nt
15005 (finish_expr_stmt): Likewise.
15006 (begin_if_stmt): Likewise.
15007 (begin_while_stmt): Likewise.
15008 (finish_while_stmt): Likewise.
15009 (finish_return_stmt): Likewise.
15010 (begin_for_stmt): Likewise.
15011 (finish_for_stmt): Likewise.
15012 (finish_break_stmt): Likewise.
15013 (begin_switch_stmt): Likewise.
15014 (finish_case_label): Likewise.
15015 (genrtl_try_block): Likewise.
15016 (begin_try_block): Likewise.
15017 (begin_handler): Likewise.
15018 (begin_compound_stmt): Likewise.
15019 (finish_asm_stmt): Likewise.
15020 (finish_label_stmt): Likewise.
15021 (add_decl_stmt): Likewise.
15022 (finish_subobject): Likewise.
15023 (finish_decl_cleanup): Likewise.
15024 (finish_named_return_value): Likewise.
15025 (setup_vtbl_ptr): Likewise.
15026 (add_scope_stmt): Likewise.
15027 * decl.c (finish_constructor_body): Likewise.
15028 (finish_destructor_body): Likewise.
15029 * optimize.c (copy_body_r): Likewise.
15030 (initialize_inlined_parameters): Likewise.
15031 (declare_return_variable): Likewise.
15032 (expand_call_inline): Likewise.
15034 2000-07-10 Jakub Jelinek <jakub@redhat.com>
15036 * semantics.c (expand_body): Sync interface information
15037 at the end of function body expansion.
15039 2000-07-09 Jason Merrill <jason@redhat.com>
15041 * init.c (build_new_1): Bail early if the call to new fails.
15043 * decl.c (compute_array_index_type): Check specifically for
15044 an INTEGER_CST, not just TREE_CONSTANT.
15046 * decl.c (duplicate_decls): Don't call duplicate_decls on
15047 the DECL_TEMPLATE_RESULT.
15048 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15051 * error.c (dump_template_bindings): Don't crash if we had an
15052 invalid argument list.
15054 * typeck.c (c_expand_start_case): Do narrowing here.
15055 * semantics.c (finish_switch_cond): Not here.
15057 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
15059 * parse.y (asm_clobbers): Do string concatenation.
15061 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15063 * decl.c (pushtag): Don't put local classes in template functions
15064 on the local_classes list.
15066 2000-07-04 Scott Snyder <snyder@fnal.gov>
15068 * decl2.c (get_guard): Add missing return for old ABI local
15071 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15073 * cp-tree.h (char_type_p): New function.
15074 * decl.c (init_decl_processing): Don't initialize
15075 signed_wchar_type_node or unsigned_wchar_type_node.
15076 (complete_array_type): Handle brace-enclosed string-constants.
15077 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15078 * tree.c (char_type_p): New function.
15079 * typeck2.c (digest_init): Use char_type_p.
15081 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15083 * pt.c (tsubst): Don't layout type, if it's error_mark.
15085 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15087 * pt.c (instantiate_pending_templates): Reset template level.
15089 2000-07-05 Jason Merrill <jason@redhat.com>
15091 * call.c (joust): Don't complain about `operator char *()' beating
15092 `operator const char *() const'.
15094 2000-07-04 scott snyder <snyder@fnal.gov>
15095 Jason Merrill <jason@redhat.com>
15097 * repo.c (repo_get_id): Handle the case where a class with virtual
15098 bases has a null TYPE_BINFO_VTABLE.
15100 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
15101 Jason Merrill <jason@redhat.com>
15103 * parse.y (member_init): Just pass in the type.
15104 * init.c (expand_member_init): Handle getting a type.
15106 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15107 Jason Merrill <jason@redhat.com>
15109 * decl.c (finish_function): Warn if a function has no return
15111 Suggested by Andrew Koenig.
15112 * typeck.c (check_return_expr): Do set current_function_returns_value
15113 if we got an error_mark_node.
15115 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15117 * decl2.c (push_decl_namespace): Push the original namespace.
15119 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15121 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15122 * semantics.c (begin_class_definition): Clear it.
15124 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
15126 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15127 (genrtl_expr_stmt): Likewise.
15128 (genrtl_decl_stmt): Likewise.
15129 (genrtl_if_stmt): Likewise.
15130 (genrtl_while_stmt): Likewise.
15131 (genrtl_do_stmt): Likewise.
15132 (genrtl_return_stmt): Likewise.
15133 (genrtl_for_stmt): Likewise.
15134 (genrtl_break_stmt): Likewise.
15135 (genrtl_continue_stmt): Likewise.
15136 (genrtl_scope_stmt): Likewise.
15137 (genrtl_switch_stmt): Likewise.
15138 (genrtl_case_label): Likewise.
15139 (genrtl_begin_compound_stmt): Likewise.
15140 (genrtl_finish_compound_stmt): Likewise.
15141 (genrtl_compound_stmt): Likewise.
15142 (genrtl_asm_stmt): Likewise.
15144 * init.c (begin_init_stmts): Remove call to
15145 genrtl_begin_compound_stmt.
15146 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15148 * semantics.c (lang_expand_stmt): Changed call to
15149 genrtl_compound_stmt to ignore return value.
15151 2000-07-02 Mark Mitchell <mark@codesourcery.com>
15153 * mangle.c (canonicalize_for_substitution): Return the canonical
15156 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15158 * typeck.c (commonparms): Remove obstack manipulations.
15160 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
15162 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15164 * Makefile.in (OBJS): Added ../c-semantics.o.
15165 (OBJDEPS): Likewise.
15167 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
15169 (struct stmt_tree): Added comment.
15170 (current_function_name_declared): Removed.
15171 (stmts_are_full_exprs_p): Likewise.
15172 (genrtl_do_pushlevel): Likewise.
15173 (genrtl_clear_out_block): Likewise.
15174 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
15175 (DECL_ANON_UNION_ELEMS): Likewise.
15176 (emit_local_var): Likewise.
15177 (make_rtl_for_local_static): Likewise.
15178 (do_case): Likewise.
15179 (expand_stmt): Likewise.
15180 (genrtl_decl_cleanup): Likewise.
15181 (c_expand_asm_operands): Likewise.
15182 (c_expand_return): Likewise.
15183 (c_expand_start_case): Likewise.
15185 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
15186 (emit_local_var): Likewise.
15187 (initialize_local_var): Change reference to
15188 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15189 Change reference to stmts_are_full_exprs_p to
15190 current_stmt_tree->stmts_are_full_exprs_p.
15191 (push_cp_function_context): Likewise.
15193 * expect.c (expand_throw): Change reference to
15194 stmts_are_full_exprs_p.
15196 * init.c (build_aggr_init): Change reference to
15197 stmts_are_full_exprs_p.
15198 (build_vec_init): Likewise.
15200 * optimize.c (maybe_clone_body): Change reference to
15201 current_function_name_declared to
15202 cp_function_chain->name_declared.
15204 * pt.c (instantiate_decl): Change reference to
15205 current_function_name_declared to
15206 cp_function_chain->name_declared.
15208 * semantics.c (expand_cond): Moved declaration to c-common.h.
15209 (genrtl_do_pushlevel): Moved to c-semantics.c.
15210 (genrtl_clear_out_block): Likewise.
15211 (genrtl_goto_stmt): Likewise.
15212 (genrtl_expr_stmt): Likewise.
15213 (genrtl_decl_stmt): Likewise.
15214 (gerntl_if_stmt): Likewise.
15215 (genrtl_while_stmt): Likewise.
15216 (genrtl_do_stmt): Likewise.
15217 (genrtl_return_stmt): Likewise.
15218 (genrtl_for_stmt): Likewise.
15219 (genrtl_break_stmt): Likewise.
15220 (genrtl_continue_stmt): Likewise.
15221 (genrtl_scope_stmt): Likewise.
15222 (genrtl_switch_stmt): Likewise.
15223 (genrtl_case_label): Likewise.
15224 (genrtl_begin_compound_stmt): Likewise.
15225 (genrtl_finish_compound_stmt): Likewise.
15226 (genrtl_compound_stmt): Likewise.
15227 (genrtl_asm_stmt): Likewise.
15228 (genrtl_decl_cleanup): Likewise.
15229 (expand_cond): Likewise.
15230 (expand_stmt): Renamed to ...
15231 (lang_expand_stmt): ... this.
15232 (lang_expand_expr_stmt): Initialize.
15233 (set_current_function_name_declared): Likewise.
15234 (stmts_are_full_exprs_p): Likewise.
15235 (current_function_name_declared): Likewise.
15236 (anon_aggr_type_p): Likewise.
15237 (do_poplevel): Change reference to
15238 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15239 Change reference to stmts_are_full_exprs_p to
15240 current_stmt_tree->stmts_are_full_exprs_p.
15241 (add_tree): Likewise.
15242 (finish_expr_stmt): Likewise.
15243 (prep_stmt): Likewise.
15244 (lang_expand_stmt): Likewise.
15245 (begin_compound_stmt): Change reference to
15246 current_function_name_declared to
15247 cp_function_chain->name_declared and call to
15248 current_function_name_declared().
15249 (setup_vtbl_ptr): Likewise.
15250 (genrtl_do_poplevel): Removed.
15252 2000-06-30 Jason Merrill <jason@redhat.com>
15254 * init.c (init_init_processing): Go back to aligning like
15255 double_type_node for old ABI.
15256 (get_cookie_size): Make cookie larger if we get a type that needs
15258 (build_vec_delete): Call it.
15260 * typeck.c (qualify_type_recursive): New fn.
15261 (composite_pointer_type): Use it.
15262 (build_binary_op): Use composite_pointer_type.
15264 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
15265 Jason Merrill <jason@redhat.com>
15267 * typeck.c (check_return_expr): Don't complain about returning
15268 NULL from operator new if -fcheck-new.
15269 * cp-tree.h: Declare flag_check_new here.
15270 * init.c: Not here.
15272 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15274 * mangle.c (find_substitution): Use same_type_p.
15275 (write_encoding): Don't check for substitutions.
15277 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15279 * parse.y (expr_no_comma_rangle): New non-terminal.
15280 (template_parm): Use it for default parameter case.
15281 (template_arg): Use it.
15282 (expr_no_commas): Remove commented out undefined extensions.
15283 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15284 * parse.h, parse.c: Rebuilt.
15286 2000-06-30 Mark Mitchell <mark@codesourcery.com>
15288 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
15289 (finish_asm_stmt): Do it here, instead.
15291 * cp-tree.h (ridpointers): Don't declare.
15292 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
15293 (record_builtin_java_type): Likewise.
15294 (init_decl_processing): Likewise.
15295 * lex.c: Move inclusion of lex.h.
15296 (ridpointers): Don't define.
15297 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
15299 * lex.h (enum rid): Rename to ...
15300 (enum cp_rid): ... this.
15301 (ridpointers): Don't declare.
15302 * parse.y: Move inclusion of lex.h.
15303 * parse.c: Regenerated.
15304 * spew.c: Move inclusion of lex.h.
15306 * cp-tree.h (struct language_function): Remove temp_name_counter.
15307 (temp_name_counter): Remove.
15308 (get_temp_name): Change prototype.
15309 (get_guard): New function.
15310 (get_guard_cond): Likewise.
15311 (set_guard): Likewise.
15312 * cvt.c (build_up_reference): Adjust call to get_temp_name.
15313 * decl.c (expand_static_init): Use get_guard and friends to
15314 implement guard variables.
15315 * decl2.c (get_temp_name): Assume that the variables created are
15317 (get_sentry): Rename to ...
15318 (get_guard): ... this. Implement new ABI guard variables.
15319 (get_guard_bits): New function.
15320 (get_guard_cond): Likewise.
15321 (set_guard): Likewise.
15322 (start_static_initialization_or_destruction): Use them.
15323 (do_static_initialization): Replace sentry with guard throughout.
15324 (do_static_destruction): Likewise.
15325 * init.c (create_temporary_var): Add comment.
15327 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15329 * mangle.c (find_substitution): Use same_type_p.
15330 (write_encoding): Don't check for substitutions.
15332 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15334 * parse.y (expr_no_comma_rangle): New non-terminal.
15335 (template_parm): Use it for default parameter case.
15336 (template_arg): Use it.
15337 (expr_no_commas): Remove commented out undefined extensions.
15338 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15339 * parse.h, parse.c: Rebuilt.
15341 2000-06-29 Mark Mitchell <mark@codesourcery.com>
15343 * cp-tree.h (flag_const_strings): Remove.
15344 (warn_parentheses): Likewise.
15345 (warn_format): Likewise.
15346 (common_type): Likewise.
15347 (default_conversion): Likewise.
15348 (build_binary_op): Likewise.
15349 (cp_build_binary_op): New macro.
15350 * call.c (build_new_op): Use cp_build_binary_op instead of
15352 * class.c (build_vtable_entry_ref): Likewise.
15353 * decl.c (expand_static_init): Likewise.
15354 (compute_array_index_type): Likewise.
15355 (build_enumerator): Likewise.
15356 * decl2.c (delete_sanity): Likewise.
15357 (start_static_initialization_or_destruction): Likewise.
15358 * error.c (dump_type_suffix): Likewise.
15359 * init.c (resolve_offset_ref): Likewise.
15360 (build_new): Likewise.
15361 (build_new_1): Likewise.
15362 (build_vec_delete_1): Likewise.
15363 (build_vec_init): Likewise.
15364 (build_delete): Likewise.
15365 * rtti.c (synthesize_tinfo_fn): Likewise.
15366 (synthesize_tinfo_var): Likewise.
15367 * search.c (expand_upcast_fixups): Likewise.
15368 (fixup_all_virtual_upcast_offsets): Likewise.
15369 * typeck.c (build_array_ref): Likewise.
15370 (get_member_function_from_ptrfunc): Likewise.
15371 (build_binary_op): Add parameter.
15372 (pointer_int_sum): Use cp_build_binary_op.
15373 (pointer_diff): Likewise.
15374 (build_modify_expr): Likewise.
15375 (get_delta_difference): Likewise.
15376 (build_ptrmemfunc): Likewise.
15378 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
15380 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
15381 * decl.c (create_implicit_typedef): Adjust.
15382 * decl2.c (build_artificial_parm): Adjust.
15383 * method.c (implicitly_declare_fn): Adjust.
15384 * pt.c (push_inline_template_parms_recursive): Adjust.
15385 (process_template_parm): Adjust.
15386 (overloaded_template_name): Adjust.
15387 * semantics.c (finish_template_template_parm): Adjust.
15389 2000-06-28 Mark Mitchell <mark@codesourcery.com>
15391 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15392 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
15393 where to emit thunks.
15394 (build_vtt): Adjust call to build_vtt_inits.
15395 (build_vtt_inits): Add parameter to indicate whether or not
15396 sub-VTTs for virtual bases should be included. Adjust handling of
15397 construction vtables.
15398 (get_matching_base): New function.
15399 (dfs_build_vtt_inits): Rename to ...
15400 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15401 construction vtables.
15402 (dfs_fixup_binfo_vtbls): Likewise.
15403 (build_ctor_vtbl_groups): Build construction vtables for virtual
15405 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15406 to build construction vtbls.
15407 (dfs_accumulate_vtbl_inits): Adjust handling of
15408 construction vtables.
15410 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15413 2000-06-27 Mark Mitchell <mark@codesourcery.com>
15415 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15417 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15419 * search.c (hides): Remove.
15420 (is_subobject_of_p): Add most_derived parameter. Use
15422 (lookup_field_queue_p): Adjust.
15423 (lookup_field_r): Adjust.
15425 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15427 * decl2.c (handle_class_head): Bash typedefs to the type's main
15430 2000-06-25 Mark Mitchell <mark@codesourcery.com>
15432 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15433 (begin_global_stmt_expr): ... this.
15434 (genrtl_finish_stmt_expr): Rename to ...
15435 (finish_global_stmt_expr): ... this.
15436 * init.c (begin_init_stmts): Adjust calls.
15437 (finish_init_stmts): Likewise.
15438 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15439 (begin_global_stmt_expr): ... this.
15440 (genrtl_finish_stmt_expr): Rename to ...
15441 (finish_global_stmt_expr): ... this.
15443 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15445 * search.c (lookup_member): Fix typo in comment.
15447 2000-06-24 Jason Merrill <jason@redhat.com>
15449 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15450 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15452 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15454 * parse.y (complex_direct_notype_declarator): Support global_scope.
15455 * Makefile.in: Adjust conflict count.
15457 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15459 * parse.y (template_arg): Convert TEMPLATE_DECL
15460 that is a template template parameter to
15461 TEMPLATE_TEMPLATE_PARM here.
15463 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15464 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15465 (copy_template_template_parm): Adjust prototype.
15466 * decl.c (grokdeclarator): Remove dead code.
15467 * pt.c (process_template_parm): Tidy.
15468 (lookup_template_class): Construct nodes in
15469 copy_template_template_parm.
15470 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15471 lookup_template_class. Use TYPE_TI_TEMPLATE.
15472 * tree.c (copy_template_template_parm): Add NEWARGS
15474 (mapcar): Adjust call to copy_template_template_parm.
15475 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15476 * method.c (build_template_template_parm_names): Change error
15477 code to avoid compilation warning.
15479 * gxxint.texi: Document template template parameter
15482 2000-06-21 Alex Samuel <samuel@codesourcery.com>
15484 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15485 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15486 (cp-demangle.o): New rule.
15487 (dyn-string.o): Likewise.
15488 * inc/cxxabi.h (__cxa_demangle): New declaration.
15490 2000-06-22 Mark Mitchell <mark@codesourcery.com>
15492 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15493 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15494 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
15495 a tree, not an int.
15496 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15497 (make_thunk): Change prototype.
15498 (emit_thunk): Rename to use_thunk.
15499 (mangle_thunk): Change prototype.
15500 * class.c (get_derived_offset): Simplify.
15501 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15502 BV_GENERATE_THUNK_WITH_VTABLE_P.
15503 (build_primary_vtable): Simplify.
15504 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15505 (dfs_find_base): Remove.
15506 (update_vtable_entry_for_fn): Correct bug in finding the base
15507 where a virtual function was first declared. Figure out whether
15508 or not to emit a vcall-thunk with the vtables in which it appears.
15509 Correct logic for deciding whether to use an ordinary thunk, or a
15511 (finish_struct_1): Remove unnecssary code.
15512 (build_vtbl_initializer): Use ssize_int for the running counter of
15514 (build_vtbl_initializer): Only use vcall thunks where necessary.
15515 Mark thunks as needing to be emitted with their vtables, or not.
15516 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15517 indices. Use size_binop.
15518 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15519 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
15521 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15522 (build_vtable_entry): Mark thunks as needing to be emitted with
15523 their vtables, or not.
15524 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15525 * decl2.c (mark_vtable_entries): Use use_thunk instead of
15527 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
15529 * error.c (dump_expr): Use BV_FN.
15530 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15532 * method.c (make_thunk): Likewise.
15533 (emit_thunk): Rename to use_thunk. Allow callers to decide
15534 whether or not to actually emit the thunk. Adjust for changes in
15535 representation of vcall offsets.
15536 * search.c (dfs_get_pure_virtuals): Use BV_FN.
15537 * semantics.c (emit_associated_thunks): New function.
15538 (expand_body): Use it.
15539 * ir.texi: Adjust decriptions of thunks.
15541 2000-06-22 Jason Merrill <jason@redhat.com>
15543 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15544 (tsubst_friend_function): Copy it here.
15546 * decl.c (grok_op_properties): Fix typo.
15548 * decl2.c (delete_sanity): Clarify warning, avoid failure on
15551 * pt.c (check_explicit_specialization): Clarify error.
15553 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15554 an old OVERLOAD when we're declaring a non-function.
15555 (pushdecl, destroy_local_var): Check for error_mark_node.
15556 (warn_extern_redeclared_static): Also bail early if
15557 we're a CONST_DECL.
15558 (push_overloaded_decl): Ignore an old error_mark_node.
15560 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
15562 * call.c (build_x_va_arg): Check if in a template decl.
15563 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15565 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15567 * class.c (push_lang_context): TYPE_NAME gets you to the Java
15569 * decl.c (check_goto): Computed gotos assumed OK.
15571 2000-06-20 Jason Merrill <jason@redhat.com>
15573 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15574 for which we don't need to look for instantiations.
15576 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
15578 * parse.y (program): Always call finish_translation_unit.
15579 * parse.c, parse.h: Rebuilt.
15581 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
15583 * method.c: Don't include hard-reg-set.h.
15585 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15587 * rtti.c (get_base_offset): Cope when vbase field is in a base.
15589 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15591 * call.c (build_conditional_expr): Use VOID_TYPE_P.
15592 * cvt.c (cp_convert_to_pointer): Likewise.
15593 (convert_to_void): Likewise.
15594 * error.c (dump_expr): Likewise.
15595 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
15596 * init.c (build_delete): Likewise.
15597 * method.c (emit_thunk): Likewise.
15598 * optmize.c (declare_return_variable): Likewise.
15599 * rtti.c (get_tinfo_decl_dynamic): Likewise.
15600 (get_typeid): Likewise.
15601 (build_dynamic_cast_1): Likewise.
15602 * typeck.c (composite_pointer_type): Likewise.
15603 (common_type): Likewise.
15604 (build_indirect_ref): Likewise.
15605 (build_binary_op): Likewise.
15606 (build_x_compound_expr): Likewise.
15607 (check_return_expr): Likewise.
15608 * typeck2.c (add_exception_specifier): Likewise.
15610 * mangle.c (write_method_parms): Use direct comparison for end
15613 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
15615 * cp-tree.h (genrtl_try_block): Declare function.
15616 (genrtl_handler): Likewise.
15617 (genrtl_catch_block): Likewise.
15618 (genrtl_ctor_stmt): Likewise.
15619 (genrtl_subobject): Likewise.
15620 (genrtl_decl_cleanup): Likewise.
15621 (genrtl_do_poplevel): Likewise.
15622 (genrtl_do_pushlevel): Likewise.
15623 (genrtl_clear_out_block): Likewise.
15624 (genrtl_goto_stmt): Likewise.
15625 (genrtl_expr_stmt): Likewise.
15626 (genrtl_decl_stmt): Likewise.
15627 (genrtl_if_stmt): Likewise.
15628 (genrtl_while_stmt): Likewise.
15629 (genrtl_do_stmt): Likewise.
15630 (genrtl_return_stmt): Likewise.
15631 (genrtl_for_stmt): Likewise.
15632 (genrtl_break_stmt): Likewise.
15633 (genrtl_continue_stmt): Likewise.
15634 (genrtl_scope_stmt): Likewise.
15635 (genrtl_switch_stmt): Likewise.
15636 (genrtl_case_label): Likewise.
15637 (genrtl_begin_compound_stmt): Likewise.
15638 (genrtl_finish_compound_stmt): Likewise.
15639 (genrtl_compound_stmt): Likewise.
15640 (genrtl_asm_stmt): Likewise.
15641 (genrtl_named_return_value): Likewise.
15642 (genrtl_begin_stmt_expr): Likewise.
15643 (genrtl_finish_stmt_expr): Likewise.
15644 (finish_for_stmt): Removed first argument.
15645 (finish_switch_stmt): Likewise.
15647 * semantics.c (genrtl_try_block): Define function.
15648 (genrtl_handler): Likewise.
15649 (genrtl_catch_block): Likewise.
15650 (genrtl_ctor_stmt): Likewise.
15651 (genrtl_subobject): Likewise.
15652 (genrtl_decl_cleanup): Likewise.
15653 (genrtl_do_poplevel): Likewise.
15654 (genrtl_do_pushlevel): Likewise.
15655 (genrtl_clear_out_block): Likewise.
15656 (genrtl_goto_stmt): Likewise.
15657 (genrtl_expr_stmt): Likewise.
15658 (genrtl_decl_stmt): Likewise.
15659 (genrtl_if_stmt): Likewise.
15660 (genrtl_while_stmt): Likewise.
15661 (genrtl_do_stmt): Likewise.
15662 (genrtl_return_stmt): Likewise.
15663 (genrtl_for_stmt): Likewise.
15664 (genrtl_break_stmt): Likewise.
15665 (genrtl_continue_stmt): Likewise.
15666 (genrtl_scope_stmt): Likewise.
15667 (genrtl_switch_stmt): Likewise.
15668 (genrtl_case_label): Likewise.
15669 (genrtl_begin_compound_stmt): Likewise.
15670 (genrtl_finish_compound_stmt): Likewise.
15671 (genrtl_compound_stmt): Likewise.
15672 (genrtl_asm_stmt): Likewise.
15673 (genrtl_named_return_value): Likewise.
15674 (genrtl_begin_stmt_expr): Likewise.
15675 (genrtl_finish_stmt_expr): Likewise.
15676 (finish_for_stmt): Removed first argument and generate rtl
15678 (finish_switch_stmt): Likewise.
15679 (do_poplevel): Removed generate rtl specific code.
15680 (do_pushlevel): Likewise.
15681 (add_tree): Likewise.
15682 (finish_goto_stmt): Likewise.
15683 (finish_expr_stmt): Likewise.
15684 (begin_if_stmt): Likewise.
15685 (finish_if_stmt_cond): Likewise.
15686 (finish_then_clause): Likewise.
15687 (begin_else_clause): Likewise.
15688 (finish_else_clause): Likewise.
15689 (finish_if_stmt): Likewise.
15690 (clear_out_block): Likewise.
15691 (begin_while_stmt): Likewise.
15692 (finish_while_stmt_cond): Likewise.
15693 (finish_while_stmt): Likewise.
15694 (begin_do_stmt): Likewise.
15695 (finish_do_body): Likewise.
15696 (finish_do_stmt): Likewise.
15697 (finish_return_stmt): Likewise.
15698 (begin_for_stmt): Likewise.
15699 (finish_for_init_stmt): Likewise.
15700 (finish_for_cond): Likewise.
15701 (finish_for_expr): Likewise.
15702 (finish_break_stmt): Likewise.
15703 (finish_continue_stmt): Likewise.
15704 (begin_switch_stmt): Likewise.
15705 (finish_switch_cond): Likewise.
15706 (finish_case_label): Likewise.
15707 (begin_try_block): Likewise.
15708 (begin_function_try_block): Likewise.
15709 (finish_try_block): Likewise.
15710 (finish_cleanup_try_block): Likewise.
15711 (finish_cleanup): Likewise.
15712 (finish_function_try_block): Likewise.
15713 (finish_handler_sequence): Likewise.
15714 (finish_function_handler_sequence): Likewise.
15715 (begin_handler): Likewise.
15716 (finish_handler_parms): Likewise.
15717 (begin_catch_block): Likewise.
15718 (finish_handler): Likewise.
15719 (begin_compound_stmt): Likewise.
15720 (finish_compound_stmt): Likewise.
15721 (finish_asm_stmt): Likewise.
15722 (finish_label_stmt): Likewise.
15723 (finish_label_decl): Likewise.
15724 (finish_subobject): Likewise.
15725 (finish_decl_cleanup): Likewise.
15726 (finish_named_return_value): Likewise.
15727 (begin_stmt_expr): Likewise.
15728 (finish_stmt_expr): Likewise.
15730 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
15731 to call genrtl_expr_stmt when appropriate.
15733 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
15734 begin_compound_expr to call genrtl_begin_stmt_expr and
15735 genrtl_begin_compound_expr when appropriate.
15736 (finish_init_stmts): Changed calls to finish_compound_expr and
15737 finish_stmt_expr to call genrtl_finish_compound_expr and
15738 genrtl_finish_stmt_expr when appropriate.
15739 (expand_default_init): Changed call to finish_expr_stmt to call
15740 genrtl_expr_stmt when appropriate.
15741 (build_vec_init): Likewise.
15743 * parse.y (simple_stmt): Removed first argument from call to
15744 finish_for_stmt. Removed first argument from call to
15745 finish_switch_stmt.
15747 * parse.c: Regenerated.
15749 * pt.c (tsubst_expr): Removed first argument from call to
15750 finish_for_stmt. Removed first argument from call to
15751 finish_switch_stmt.
15753 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
15755 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
15756 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
15758 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
15759 (cplus_tree_code_length[]): Likewise.
15760 (cplus_tree_code_name[]): Likewise.
15761 (init_parse): Added call to add_c_tree_codes. Changed
15762 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
15764 2000-06-16 Mark Mitchell <mark@codesourcery.com>
15766 * cp-tree.h (finish_mem_initializers): Declare.
15767 (count_trees): Likewise.
15768 * parse.y (base_init): Use finish_mem_initializers.
15769 * semantics.c (finish_mem_initializers): New function.
15771 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
15772 the number of trees.
15774 (count_trees): Don't use it.
15776 2000-06-15 Jason Merrill <jason@redhat.com>
15778 * tree.c (count_trees): New debugging function.
15780 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
15781 * init.c (build_member_call): Pull out the name of a DECL.
15783 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
15784 * semantics.c (expand_body): Push to TV_INTEGRATION here.
15785 * optimize.c (optimize_function): Not here.
15786 * pt.c (instantiate_decl): Push to TV_PARSE.
15788 2000-06-15 Mark Mitchell <mark@codesourcery.com>
15790 * cp-tree.h (struct language_function): Remove x_base_init_list
15791 and x_member_init_list.
15792 (current_base_init_list): Remove.
15793 (current_member_init_list): Likewise.
15794 (setup_vtbl_ptr): Change prototype.
15795 (emit_base_init): Likewise.
15796 (expand_member_init): Likewise.
15797 (reinit_parse_for_function): Remove.
15798 * decl.c (save_function_data): Don't clear x_base_init_list and
15799 x_member_init_list.
15800 (mark_language_function): Don't mark them.
15801 * init.c (perform_member_init): Tweak comment.
15802 (sort_member_init): Take the list of initializers as an argument.
15803 (sort_base_init): Likewise.
15804 (emit_base_init): Likewise.
15805 (expand_member_init): Return the initializer. Don't use global
15807 * lex.c (reinit_parse_for_function): Remove.
15808 * method.c (build_template_parm_names): Correct substitution.
15809 (do_build_copy_constructor): Don't use current_member_init_list
15810 and current_base_init_list.
15811 (synthesize_method): Likewise.
15812 * parse.y (base_init): Split mem-initializers into
15813 base-initializers and field-initializers.
15814 (member_init_list): Build up the list here.
15815 (member_init): Return the initializer.
15816 (fn.depfn): Don't use reinit_parse_for_function.
15817 * parse.c: Regenerated.
15818 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
15820 (tsubst_expr): Don't use current_member_init_list
15821 and current_base_init_list.
15822 (tsubst_expr_values): Rename to ...
15823 (tsubst_initializer_list): ... this. Use convert_from_reference.
15824 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
15825 and current_base_init_list.
15826 (begin_function_definition): Don't call reinit_parse_for_function.
15828 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
15830 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
15833 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
15835 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
15837 * cp-tree.h (IF_COND): Move to c-common.h.
15838 (THEN_CLAUSE): Likewise.
15839 (ELSE_CLAUSE): Likewise.
15840 (WHILE_COND): Likewise.
15841 (WHILE_BODY): Likewise.
15842 (DO_COND): Likewise.
15843 (DO_BODY): Likewise.
15844 (RETURN_EXPR): Likewise.
15845 (EXPR_STMT_EXPR): Likewise.
15846 (FOR_INIT_STMT): Likewise.
15847 (FOR_COND): Likewise.
15848 (FOR_EXPR): Likewise.
15849 (FOR_BODY): Likewise.
15850 (SWITCH_COND): Likewise.
15851 (SWITCH_BODY): Likewise.
15852 (CASE_LOW): Likewise.
15853 (CASE_HIGH): Likewise.
15854 (GOTO_DESTINATION): Likewise.
15855 (COMPOUND_BODY): Likewise.
15856 (ASM_CV_QUAL): Likewise.
15857 (ASM_STRING): Likewise.
15858 (ASM_OUTPUTS): Likewise.
15859 (ASM_INPUTS): Likewise.
15860 (ASM_CLOBBERS): Likewise.
15861 (DECL_STMT_DECL): Likewise.
15862 (STMT_EXPR_STMT): Likewise.
15863 (LABEL_STMT_LABEL): Likewise.
15864 (SCOPE_BEGIN_P): Likewise.
15865 (SCOPE_END_P): Likewise.
15866 (SCOPE_STMT_BLOCK): Likewise.
15867 (SCOPE_NULLIFIED_P): Likewise.
15868 (SCOPE_NO_CLEANUPS_P): Likewise.
15869 (SCOPE_PARTIAL_P): Likewise.
15870 (ASM_VOLATILE_P): Likewise.
15871 (STMT_LINENO): Likewise.
15872 (STMT_LINENO_FOR_FN_P): Likewise.
15874 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
15875 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
15876 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
15877 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
15878 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
15880 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
15882 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
15883 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
15885 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
15886 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
15887 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
15889 2000-06-14 Mark Mitchell <mark@codesourcery.com>
15891 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
15892 * class.c (dfs_find_final_overrider): Set it appropriately.
15893 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
15894 avoid unneeded secondary vptrs.
15896 2000-06-13 Jakub Jelinek <jakub@redhat.com>
15898 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
15899 (check_bitfield_decl, check_field_decl): Likewise.
15900 (build_vtbl_or_vbase_field, build_base_field): Likewise.
15901 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
15902 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
15903 (xfer_tag, finish_enum): Likewise.
15904 * decl2.c (finish_builtin_type): Likewise.
15905 * init.c (init_init_processing): Likewise.
15906 * pt.c (instantiate_class_template): Likewise.
15907 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
15908 * cp-tree.h (struct lang_type): Add user_align member.
15909 (CLASSTYPE_USER_ALIGN): Define.
15911 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
15913 * Make-lang.in (c++.install-common): Install g++-cross in
15914 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
15915 $(target_alias)-g++ and $(target_alias)-c++.
15917 2000-06-12 Mark Mitchell <mark@codesourcery.com>
15919 * class.c (vcall_offset_data_s): Add last_init and fns.
15920 (overrides): Rename to same_signature_p.
15921 (dfs_find_final_overrider): Adjust accordingly.
15922 (mark_overriders): Likewise.
15923 (warn_hidden): Likewise.
15924 (build_vtbl_initializer): Reorganize machinery for building things
15925 at negative offsets.
15926 (build_vcall_and_vbase_vtbl_entries): Likewise.
15927 (build_vbase_offset_vtbl_entries): Likewise.
15928 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
15929 offset entries. Do not create two entries for functions with the
15931 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
15932 (build_rtti_vtbl_entries): Reorganize machinery for building things
15933 at negative offsets.
15935 * optimize.c (expand_call_inline): Don't recurse into the code
15936 used to initialize the parameters more than once.
15938 2000-06-11 Mark Mitchell <mark@codesourcery.com>
15940 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
15941 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
15942 (find_substitution): Only use the `Sa' substitution for
15943 std::allocator, not instantiations of it.
15944 (write_template_prefix): Move comment. Only use a TREE_LIST to
15945 represent substitutions for a member template.
15946 (write_array_type): Mangle array dimensions correctly.
15947 * optimize.c (maybe_clone_body): Copy more information from the
15949 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
15950 on the regenerated declaration.
15952 2000-06-11 Chip Salzenberg <chip@valinux.com>
15953 Mark Mitchell <mark@codesourcery.com>
15955 * class.c (build_vtable): Clarify comment.
15956 (build_ctor_vtbl_group): Pass the most derived type to
15959 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15961 * decl2.c (compare_options): Don't needlessly cast away const-ness.
15963 2000-06-10 Mark Mitchell <mark@codesourcery.com>
15965 * decl.c (add_binding): Handle duplicate declarations of external
15968 2000-06-09 Chip Salzenberg <chip@valinux.com>
15969 Mark Mitchell <mark@codesourcery.com>
15971 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
15973 (write_signed_number): New macro.
15974 (write_unsigned_number): Likewise.
15975 (write_source_name): Use them.
15976 (write_number): Handle signed and unsigned values.
15977 (write_integer_cst): Use tree_int_cst_sgn, and use
15978 write_unsigned_number or write_signed_number as appropriate.
15979 (write_discriminator): Use write_unsigned_number or
15980 write_signed_number as appropriate.
15981 (write_template_arg_literal): Likewise.
15982 (write_array_type): Use tree_low_cst.
15983 (write_template_parm): Use write_unsigned_number or
15984 write_signed_number as appropriate.
15985 (write_substitution): Adjust call to write_number.
15986 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
15987 (write_expression): Handle non-type template arguments of
15988 reference type correctly.
15989 (mangle_thunk): Use write_signed_number.
15991 2000-06-09 Chip Salzenberg <chip@valinux.com>
15993 * mangle.c (find_substition): Don't mangle objects with typename
15994 substitutions (e.g. "cin" as "Si").
15996 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
15998 * call.c (add_candidate): Use ggc_alloc_cleared.
15999 * decl.c (lookup_label): Likewise.
16000 * lex.c (retrofit_lang_decl): Likewise.
16002 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
16004 * semantics.c (expand_body): Push to TV_EXPAND.
16005 * optimize.c (optimize_function): Push to TV_INTEGRATION.
16006 * decl.c (start_function): Always call announce_function.
16008 * tinfo2.cc: Just declare abort.
16010 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
16012 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16013 whenever @ is a symbolic name.
16015 2000-06-08 Jakub Jelinek <jakub@redhat.com>
16017 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16019 2000-06-07 Mark Mitchell <mark@codesourcery.com>
16021 * decl.c (pushdecl): Look up functions by DECL_NAME, not
16022 DECL_ASSEMBLER_NAME.
16024 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16026 * decl2.c (c_language): Define.
16028 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
16030 * lex.c (lang_init_options): Tweak.
16032 * decl2.c: Remove #inclusion of diagnostic.h
16033 (lang_decode_option): Move diagnostic formatting options to
16036 * lang-options.h: Remove documentation for diagnostic options.
16038 * Makefile.in (lex.o): Depends upon diagnostic.h
16040 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16042 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16043 the same DECL_RESULT, it's not a redefinition.
16044 * pt.c (tsubst_decl): Remove code to handle illegal
16047 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
16049 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16051 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
16053 * search.c (maybe_suppress_debug_info): Don't check
16054 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16056 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16059 Remember instantiation context in deferred instantiations.
16060 * cp-tree.h (struct tinst_level): Remove.
16061 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16062 * pt.c (current_tinst_level): Now a tree.
16063 (print_template_context, push_tinst_level, pop_tinst_level,
16064 tinst_for_decl): Adjust.
16065 (reopen_tinst_level): New fn.
16066 (init_pt): Register current_tinst_level as a root.
16067 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16068 of the pending templates list.
16069 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
16070 * lex.c (extract_interface_info): Adjust.
16071 * decl2.c (warn_if_unknown_interface): Adjust.
16073 2000-06-05 Mark Mitchell <mark@codesourcery.com>
16075 * class.c (indirect_primary_base_p): New function.
16076 (determine_primary_base): Use it.
16078 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
16080 Update new-abi dynamic cast algorithm.
16081 * tinfo.cc (__class_type_info::__dyncast_result): Add
16082 whole_details. Adjust constructor.
16083 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16084 Avoid unnecessary searching.
16085 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16087 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16089 * decl.c (init_decl_processing): Don't call record_component_aliases.
16090 * tree.c (build_cplus_array_type_1): Likewise.
16092 2000-06-04 Mark Mitchell <mark@codesourcery.com>
16094 * ir.texi: Correct typo.
16095 * mangle.c (write_expression): Handle non-type template arguments
16096 with reference type.
16097 * method.c (build_overload_value): Likewise.
16098 * pt.c (convert_nontype_argument): Explicitly represent conversion
16099 to a reference with an ADDR_EXPR.
16100 (unify): Always unify arguments in left-to-right order.
16102 2000-06-03 Alex Samuel <samuel@codesourcery.com>
16103 Mark Mitchell <mark@codesourcery.com>
16105 * Make-lang.in (CXX_SRCS): Add mangle.c.
16106 * Makefile.in (CXX_OBJS): Add mangle.o.
16107 (mangle.o): New rule.
16109 * class.c (local_classes): New variable.
16110 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16111 (get_vtt_name): Use mangle_vtt_name for new ABI.
16112 (init_class_processing): Initialize local_classes.
16113 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16114 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16115 (std_identifier): New macro.
16116 (DECL_VOLATILE_MEMFUNC_P): New macro.
16117 (DECL_NAMESPACE_STD_P): Likewise.
16118 (local_classes): Declare.
16119 (get_mostly_instantiated_function_type): Declare.
16120 (init_mangle): Declare.
16121 (mangle_decl): Likewise.
16122 (mangle_type_string): Likewise.
16123 (mangle_type): Likewise.
16124 (mangle_typeinfo_for_type): Likewise.
16125 (mangle_typeinfo_string_for_type): Likewise.
16126 (mangle_vtbl_for_type): Likewise.
16127 (mangle_vtt_for_type): Likewise.
16128 (mangle_ctor_vtbl_for_type): Likewise.
16129 (mangle_thunk): Likewise.
16130 (mangle_conv_op_name_for_type): Likewise.
16131 (mangle_guard_variable): Likewise.
16132 * decl.c (pushtag): Keep track of local classes.
16133 (initialize_predefined_identifiers): Initialize std_identifier.
16134 (init_decl_processing): Use std_identifier.
16135 (start_decl): Don't treat instantiations as specializations.
16136 (grokdeclarator): Likewise.
16137 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
16138 name for fully-instantiated templates.
16139 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16140 destructors with the new ABI.
16141 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16142 (grokfield): Use mangle_type for new ABI.
16143 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16144 (get_sentry): Use mangle_guard_variable for new ABI.
16145 (start_static_initialization_or_destruction): Likewise.
16146 * expr.c (extract_aggr_init): Remove.
16147 (extract_scalar_init): Likewise.
16148 (extract_init): Remove #if 0'd code.
16149 * mangle.c: New function.
16150 * method.c (build_mangled_name): Assert not flag_new_abi.
16151 (build_static_name): Likewise.
16152 (build_decl_overload_real): Likewise.
16153 (build_typename_overload): Likewise.
16154 (build_overload_with_type): Likewise.
16155 (build_overload_name): Likewise.
16156 (get_ctor_vtbl_name): Likewise.
16157 (start_squangling): Likewise.
16158 (get_id_2): Likewise.
16159 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16160 (init_method): Call init_mangle for new ABI.
16161 (make_thunk): Call mangle_thunk for new ABI.
16162 * operators.def: Correct new ABI manglings for the `%' operator.
16164 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16165 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
16166 (lookup_template_class): Call mangle_decl for new ABI.
16167 (get_mostly_instantiated_function_type): New function.
16168 (set_mangled_name_for_template_decl): Use it.
16169 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
16170 the new ABI. Use mangle_conv_op_name_for_type for instantiated
16171 conversion op names.
16172 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
16173 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
16174 (tinfo_base_init): Likewise. Mangle typeinfo string name with
16175 mangle_typeinfo_string_for_type.
16177 2000-06-03 Mark Mitchell <mark@codesourcery.com>
16179 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
16180 (INNERMOST_TEMPLATE_ARGS): New macro.
16181 (innermost_args): Remove.
16182 (get_innermost_template_args): New function.
16183 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
16184 * error.c (dump_function_decl): Be caution when using
16185 most_general_template.
16186 * method.c (build_template_parm_names): Use
16187 INNERMOST_TEMPLATE_ARGS.
16188 * pt.c (add_to_template_args): Tidy comment
16189 (get_innermost_template_args): New function.
16190 (check_explicit_specialization): Clear DECL_INITIAL for a new
16192 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
16194 (push_template_decl): Always register specializations of the most
16196 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
16197 (coerce_template_parms): Likewise.
16198 (lookup_template_class): Likewise.
16199 (innermost_args): Remove.
16200 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
16201 (tsubst_decl): Handle tricky specializations. Use
16202 get_innermost_template_args.
16203 (instantiate_template): Simplify handling of partial
16205 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
16206 (most_general_template): Reimplement, in a more straightforward
16208 (regenerate_decl_from_template): Tweak formatting. Use
16209 TMPL_ARGS_DEPTH for clarity.
16210 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
16212 * dump.c (dequeue_and_dump): Dump information about thunks.
16214 2000-06-01 Richard Henderson <rth@cygnus.com>
16216 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
16218 2000-06-01 Richard Henderson <rth@cygnus.com>
16220 * decl2.c (unsupported_options): Fix typo, make const.
16221 (lang_decode_option): Fix bsearch argument order.
16223 2000-06-01 Mark Mitchell <mark@codesourcery.com>
16225 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
16228 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16230 * cp-tree.h (c_get_alias_set): Deleted.
16231 * Makefile.in (decl.o): Include ../expr.h.
16232 * decl.c (expr.h): Include.
16233 (init_decl_processing): Call record_component_aliases for arrays.
16234 (grokdeclarator): Likewise.
16235 Set TREE_ADDRESSABLE for fields that aren't bitfields.
16236 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
16238 2000-05-31 Mark Mitchell <mark@codesourcery.com>
16240 Remove guiding declaration support.
16241 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
16242 (flag_guiding_decls): Remove.
16243 * call.c (build_user_type_conversion_1): Remove support for
16245 (build_new_function_call): Likewise.
16246 (build_new_op): Likewise.
16247 (build_new_method_call): Likewise.
16248 * decl.c (start_function): Likewise.
16249 * friend.c (is_friend): Likewise.
16250 (do_friend): Likewise.
16251 * decl2.c ((flag_dump_translation_unit): Make it const.
16252 (flag_guiding_decls): Remove.
16253 (unsupported_options): New variable
16254 (compare_options): New function.
16255 (lang_decode_option): Use them.
16257 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
16259 * method.c (mangle_expression): Adjust test for legal expression
16262 * pt.c (instantiate_decl): Save and restore the local
16263 specializations list.
16265 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
16267 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
16269 2000-05-30 Mark Mitchell <mark@codesourcery.com>
16271 * call.c (add_template_candidate_real): Handle member template
16272 constructors for classes with virtual bases.
16273 (build_user_type_conversion_1): Use in_charge_arg_for_name.
16274 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
16276 * ir.texi: Update thunk documentation.
16278 * call.c (joust): Fix handling of overloaded builtin operators.
16280 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
16282 * cp-tree.h (DECL_ANTICIPATED): New macro.
16283 Document new use of DECL_LANG_FLAG_7.
16284 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
16285 in the user namespace.
16286 * lex.c (do_identifier): If the identifier's declaration has
16287 DECL_ANTICIPATED on, it has not yet been declared. But do not
16288 replace it with an ordinary implicit declaration.
16290 * tinfo2.cc: Include stdlib.h.
16292 2000-05-29 Mark Mitchell <mark@codesourcery.com>
16294 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
16295 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
16298 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
16300 * decl2.c (lang_decode_option): Use skip_leading_substring instead
16303 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
16305 * operators.def (<?): Duplicated, should have been...
16308 2000-05-27 Alex Samuel <samuel@codesourcery.com>
16309 Mark Mitchell <mark@codesourcery.com>
16311 * cp-tree.h (ansi_opname): Make it a macro.
16312 (ansi_assopname): Likewise.
16313 (struct lang_decl_flags): Add assignment_operator_p.
16314 (struct lang_decl): Add operator_code.
16315 (DECL_VTT_PARM): Adjust.
16316 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
16317 overloaded operator.
16318 (SET_OVERLOADED_OPERATOR_CODE): New macro.
16319 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
16320 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
16321 (opname_tab): Remove.
16322 (assignop_tab): Likewise.
16323 (operator_name_info_t): New type.
16324 (operator_name_info): New variable.
16325 (assignment_operator_name_info): Likewise.
16326 (build_cp_library_fn): Remove declaration.
16327 (push_cp_library_fn): Likewise.
16328 (operator_name_string): Likewise.
16329 (build_decl_overload): Likewise.
16330 * call.c (print_z_candidates): Simplify.
16331 (build_object_call): Adjust usage of ansi_opname. Use
16332 DECL_OVERLOADED_OPERATOR_P.
16333 (op_error): Adjust operator name lookup.
16334 (build_conditional_expr): Adjust usage of ansi_opname.
16335 (build_new_op): Likewise.
16336 (build_op_delete_call): Likewise.
16337 (build_over_call): Likewise.
16338 (joust): Use DECL_OVERLOADED_OPERATOR_P.
16339 * decl.c (duplicate_decls): Copy operator_code.
16340 (init_decl_processing): Adjust parameters to push_cp_library_fn.
16341 (builtin_function): Adjust parameters to build_library_fn_1.
16342 (build_library_fn_1): Accept an overloaded operator code.
16343 (build_library_fn): Pass ERROR_MARK.
16344 (build_cp_library_fn): Accept an overloaded operator code.
16345 (push_cp_library_fn): Likewise.
16346 (grokfndecl): Tweak.
16347 (grokdeclarator): Simplify code to compute names of overloaded
16348 operators. Adjust use of ansi_opname.
16349 (ambi_op_p): Work on tree_codes, not identifiers.
16350 (unary_op_p): Likewise.
16351 (grok_op_properties): Likewise.
16352 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
16353 (lang_mark_tree): Don't try to mark the operator_code.
16354 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
16355 * error.c (dump_decl): Remove special handling for operator
16357 (dump_function_name): Likewise.
16358 (dump_expr): Adjust name lookup of operators.
16359 (op_to_string): Simplify.
16360 (assop_to_string): Likewise.
16361 * init.c (build_new_1): Adjust use of ansi_opname.
16362 * lex.c (opname_tab): Remove.
16363 (assignop_tab): Likewise.
16364 (ansi_opname): Likewise.
16365 (ansi_assopname): Likewise.
16366 (operator_name_string): Likewise.
16367 (reinit_lang_specific): Likewise.
16368 (operator_name_info): New variable.
16369 (assignment_operator_name_info): Likewise.
16370 (init_operators): New function.
16371 (init_parse): Use it.
16372 (do_identifier): Adjust use of ansi_opname.
16373 * method.c (mangle_expression): Don't use ansi_opname for
16375 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
16376 (build_decl_overload): Remove.
16377 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
16378 (do_build_assign_ref): Adjust use of ansi_opname.
16379 (synthesize_method): Likewise.
16380 (implicitly_declare_fn): Likewise.
16381 * operators.def: New file.
16382 * parse.y (operator): Adjust use of ansi_opname.
16383 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
16384 (set_mangled_name_for_template_decl): Don't play games with
16386 (special_function_p): Adjust use of ansi_opname.
16387 * typeck.c (check_return_expr): Likewise.
16388 * Make-lang.in (cc1plus): Depend on operators.def.
16389 * Makefile.in (lex.o): Likewise.
16390 (decl.o): Likewise.
16392 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
16394 * Make-lang.in (cplib2.ready): Eradicate.
16396 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16398 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16399 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16400 (built_min, cp_tree_equal): Likewise.
16402 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16404 * class.c (layout_nonempty_base_or_field): Replace
16405 `record_layout_info' with `record_layout_info_s'.
16407 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
16410 * cp-tree.h (struct language_function): x_named_labels is now
16411 a struct named_label_list*.
16412 * decl.c (struct named_label_use_list): Renamed from...
16413 (struct named_label_list): ...this. New struct.
16414 (push_binding_level): Don't set eh_region.
16415 (note_level_for_eh): New fn.
16416 (pop_label): Take label and old value directly.
16417 (pop_labels): Adjust for new named_labels format.
16418 (lookup_label): Likewise.
16419 (poplevel): Note characteristics of a binding level containing a
16420 named label. Mess with named label lists earlier.
16421 (mark_named_label_lists): New fn.
16422 (mark_lang_function): Call it.
16423 (use_label): New fn, split out from...
16424 (make_label_decl): ...here. Don't call it.
16425 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16426 check_previous_gotos): New fns, split out from...
16427 (define_label): ...here.
16428 (check_switch_goto): New fn.
16429 (define_case_label): Call it.
16430 (check_goto): New fn.
16431 * semantics.c (finish_goto_stmt): Call it and use_label.
16432 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16433 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16435 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16437 * class.c (build_vtable_entry_ref): Correct usage of
16438 get_vtbl_decl_for_binfo.
16440 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16441 * method.c (implicitly_declare_fn): Not here.
16443 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
16445 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16446 (CPTI_PTMD_DESC_TYPE): ... here.
16447 (ptmd_desc_type_node): Rename to ...
16448 (ptm_desc_type_node): ... here.
16449 * decl.c: Likewise.
16450 * rtti.c (ptmd_initializer): Rename to ...
16451 (ptm_initializer): ... here.
16452 (sythesize_tinfo_var): Adjust. Deal with pointer to member
16454 (create_tinfo_types): Adjust.
16456 2000-05-25 Mark Mitchell <mark@codesourcery.com>
16458 Finish implementation of VTTs.
16459 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16460 CPTI_VTT_PARM_IDENTIFIER.
16461 (vtt_parm_identifier): New macro.
16462 (vtt_parm_type): Likewise.
16463 (BINFO_SUBVTT_INDEX): Likewise.
16464 (BINFO_VPTR_INDEX): Likewise.
16465 (struct lang_decl): Add vtt_parm.
16466 (DECL_VTT_PARM): New macro.
16467 (DECL_USE_VTT_PARM): Likewise.
16468 (DECL_NEEDS_VTT_PARM_P): Likewise.
16469 (get_vtt_name): Declare.
16470 (build_artificial_parm): Likewise.
16471 (fixup_all_virtual_upcast_offsets): Likewise.
16472 (expand_indirect_vtbls_init): Remove.
16473 * call.c (build_new_method_call): Pass the vtt to subobject
16474 constructors and destructors.
16475 * class.c (get_vtt_name): Give it external linkage.
16476 (build_clone): Handle the magic VTT parameters for clones.
16477 (clone_function_decl): Fix typo in comment.
16478 (build_vtt): Keep track of the indices in the VTTs where various
16479 entities are stored.
16480 (build_vtt_inits): Likewise.
16481 (dfs_build_vtt_inits): Likewise.
16482 (build_ctor_vtbl_group): Tweak type of construction vtables.
16483 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16484 primary bases, when building construction vtables.
16485 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16486 (initialize_predefined_identifiers): Add vtt_parm_identifier.
16487 (init_decl_processing): Initialize vtt_parm_type.
16488 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16489 (lang_mark_tree): Make vtt_parm.
16490 * decl2.c (build_artificial_parm): New function.
16491 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
16492 (grokclassfn): Use build_artificial_parm.
16493 * init.c (initialize_vtbl_ptrs): Call
16494 fixup_all_virtual_upcast_offsets directly.
16495 (perform_member_init): Use the complete subobject destructor for
16497 (build_vtbl_address): New function.
16498 (expand_virtual_init): Handle VTTs.
16499 * optimize (maybe_clone_body): Likewise.
16500 * search.c (fixup_all_virtual_upcast_offsets): Give it external
16502 (expand_indirect_vtbls_init): Remove.
16503 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16504 * tree.c (make_binfo): Make them bigger.
16506 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16508 * inc/cxxabi.h (__pbase_type_info): Define, based on
16509 __pointer_type_info.
16510 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16511 (__pointer_to_member_type_info): Likewise.
16512 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16513 (__pointer_to_member_type_info::__is_pointer_p): Remove.
16514 (__pointer_type_info::__do_catch): Rename to ...
16515 (__pbase_type_info::__do_catch): ... here. Adjust.
16516 (__pbase_type_info::__pointer_catch): Implement.
16517 (__pointer_type_info::__pointer_catch): Adjust.
16518 (__pointer_to_member_type_info::__pointer_catch): Adjust.
16520 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16522 * tinfo.h (__user_type_info::contained_virtual_p): New
16524 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16526 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16527 diamond shaped hierarchy. Add early out for mixed diamond and
16528 duplicate shaped hierarchy.
16530 2000-05-24 Mark Mitchell <mark@codesourcery.com>
16532 * cp-tree.h (build_delete): Change prototype.
16533 (build_vec_delete): Likewise.
16534 * call.c (build_scoped_method_call): Use special_function_kind
16535 values to indicate the kind of destruction to be done.
16536 (build_method_call): Likewise.
16537 * decl.c (finish_destructor_body): Likewise.
16538 (maybe_build_cleanup_1): Likewise. Rename to ...
16539 (maybe_build_cleanup): ... this.
16540 * decl2.c (delete_sanity): Use special_function_kind
16541 values to indicate the kind of destruction to be done.
16542 (build_cleanup): Likewise.
16543 * init.c (perform_member_init): Likewise.
16544 (build_vec_delete_1): Likewise.
16545 (build_dtor_call): Simplify.
16546 (build_delete): Use special_function_kind
16547 values to indicate the kind of destruction to be done.
16548 (build_vbase_delete): Likewise.
16549 (build_vec_delete): Likewise.
16551 * init.c (sort_member_init): Fix typo in error message generation
16554 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
16556 * semantics.c (begin_class_definition): make the packed
16557 attribute be sensitive to the "-fpack-struct" command line flag
16559 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
16561 Update new-abi upcast algorithm.
16562 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16563 prototype and meaning of return value.
16564 (__si_class_type_info::__do_upcast): Likewise.
16565 (__vmi_class_type_info::__do_upcast): Likewise.
16566 * tinfo.cc (__class_type_info::__upcast_result): Replace
16567 whole2dst with part2dst. Adjust ctor.
16568 (__class_type_info::__do_upcast): Adjust call of worker function.
16569 (__class_type_info::__do_upcast): Adjust.
16570 (__si_class_type_info::__do_upcast): Adjust. Use parent's
16572 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16573 virtual base in diamond hierarchy bug.
16575 2000-05-23 Mark Mitchell <mark@codesourcery.com>
16577 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16578 and bitfield to tinfo_fn_p.
16579 (DECL_TINFO_FN_P): Adjust.
16580 (SET_DECL_TINFO_FN_P): Likewise.
16581 (DECL_MUTABLE_P): Likewise.
16582 (DECL_C_BIT_FIELD): Likewise.
16583 (SET_DECL_C_BIT_FIELD): Likewise.
16584 (CLEAR_DECL_C_BIT_FIELD): Likewise.
16585 (DECL_UNINLINABLE): Likewise.
16586 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
16587 (handle_using_decl): Remove assertion.
16588 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
16589 to build FIELD_DECLs.
16590 (build_base_field): Likewise.
16591 (layout_class_type): Likewise.
16592 * decl.c (init_decl_processing): Likewise.
16593 (build_ptrmemfunc_type): Likewise.
16594 (grokdeclarator): Likewise.
16595 * decl2.c (grok_x_components): Likewise.
16596 * except.c (call_eh_info): Likewise.
16597 * init.c (init_init_processing): Likewise.
16598 * rtti.c (expand_class_desc): Likewise.
16599 (create_pseudo_type_info): Likewise.
16600 (get_vmi_pseudo_type_info): Likewise.
16601 (create_tinfo_types): Likewise.
16602 * ptree.c (print_lang_decl): Adjust.
16603 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
16604 before checking DECL_MUTABLE_P.
16606 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
16607 parameters for template functions.
16608 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
16609 destructors as well as constructors.
16611 2000-05-22 Mark Mitchell <mark@codesourcery.com>
16613 * class.c (build_ctor_vtbl_group): Set inits.
16614 * optimize.c (maybe_clone_body): Set DECL_INLINE and
16615 DECL_THIS_INLINE appropriately for clones.
16617 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
16618 (DECL_CONV_FN_P): Simplify.
16619 (DECL_OPERATOR): Remove.
16620 (language_to_string): Declare.
16621 * decl.c (duplicate_decls): Fix typo in comment.
16622 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
16623 (grok_op_properties): Use DECL_CONV_FN_P instead of
16624 IDENTIFIER_TYPENAME_P.
16625 * dump.c (dequeue_and_dump): Dump the language linkage of
16627 * error.c (language_to_string): Give it external linkage.
16628 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
16629 (implicitly_declare_fn): Set DECL_LANGUAGE.
16630 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
16631 IDENTIFIER_TYPENAME_P.
16632 (tsubst_decl): Likewise.
16633 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
16634 * semantics.c (finish_member_declaration): Don't mark members of
16635 classes declared in an extern "C" region as extern "C".
16637 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16639 * decl2.c (qualified_lookup_using_namespace): Look through
16642 * decl.c (push_using_decl): Return the old decl on namespace level.
16644 2000-05-21 Mark Mitchell <mark@codesourcery.com>
16646 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
16647 (VTT_NAME_PREFIX): New macro.
16648 (CTOR_VTBL_NAME_PREFIX): Likewise.
16649 (get_ctor_vtbl_name): New function.
16650 * class.c (get_vtable_name): Simplify.
16651 (get_vtt_name): New function.
16652 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
16653 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
16654 when a virtual base becomes primary.
16655 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
16657 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
16658 additional parameters.
16659 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
16660 (initialize_array): New function.
16661 (build_vtt): Likewise.
16662 (build_vtt_inits): Likewise.
16663 (dfs_build_vtt_inits): Likewise.
16664 (dfs_fixup_binfo_vtbls): Likewise.
16665 (build_ctor_vtbl_group): Likewise.
16666 (initialize_vtable): Use initialize_array.
16667 (accumulate_vtbl_inits): Reimplement to handle construction
16669 (dfs_accumulate_vtbl_inits): Likewise.
16670 (bulid_vtbl_initializer): Adjust parameter name.
16671 * method.c (build_typename_overload): Remove #if 0'd code.
16672 (get_ctor_vtbl_name): New function.
16673 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
16674 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
16676 * cp-tree.h (struct lang_type): Remove search_slot.
16677 (CLASSTYPE_SEARCH_SLOT): Remove.
16678 (emit_base_init): Change prototype.
16679 (initialize_vtbl_ptrs): Likewise.
16680 (expand_indirect_vtbls_init): Likewise.
16681 (clear_search_slots): Remove.
16682 * decl.c (lang_mark_tree): Don't mark search_slot.
16683 * init.c (initialize_vtbl_ptrs): Simplify.
16684 (emit_base_init): Likewise.
16685 * search.c (struct vbase_info): Document decl_ptr.
16686 (convert_pointer_to_single_level): Remove.
16687 (dfs_find_vbases): Remove.
16688 (dfs_init_base_pointers): Simplify.
16689 (dfs_clear_vbase_slots): Remove.
16690 (dfs_vtable_path_unmark): New function.
16691 (init_vbase_pointers): Simplify.
16692 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
16693 (expand_indirect_vtbls_init): Simplify. Don't call
16694 mark_all_temps_used.
16695 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
16696 initialize_vtbl_ptrs.
16698 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
16700 * except.c: Add static prototypes.
16702 2000-05-20 H.J. Lu <hjl@gnu.org>
16704 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
16706 2000-05-19 Mark Mitchell <mark@codesourcery.com>
16708 Don't create a separate copy of virtual bases for the
16709 CLASSTYPE_VBASECLASSES list.
16710 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
16711 (BINFO_FOR_VBASE): Remove.
16712 (CANONICAL_BINFO): Adjust.
16713 (binfo_for_vbase): New function.
16714 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
16715 instead of BINFO_FOR_VBASE.
16716 (build_vbase_pointer): Likewise.
16717 (build_secondary_vtable): Likewise.
16718 (dfs_mark_primary_bases): Likewise.
16719 (mark_primary_bases): Likewise.
16720 (layout_nonempty_base_or_field): Likewise.
16721 (dfs_set_offset_for_shared_vbases): Likewise.
16722 (dfs_set_offset_for_unshared_vbases): Likewise.
16723 (layout_virtual_bases): Likewise. Adjust for changes to the
16724 CLASSTYPE_VBASECLASSES list.
16725 (dump_class_hierarchy_r): Use binfo_for_vbase
16726 instead of BINFO_FOR_VBASE.
16727 (dump_class_hierarchy): Likewise.
16728 (finish_vtbls): Likewise.
16729 (build_vtbl_initializer): Adjust for changes to the
16730 CLASSTYPE_VBASECLASSES list.
16731 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
16732 * decl.c (finish_destructor_body): Adjust for changes to the
16733 CLASSTYPE_VBASECLASSES list.
16734 * init.c (sort_base_init): Use binfo_for_vbase.
16735 (construct_virtual_bases): Adjust for changes to the
16736 CLASSTYPE_VBASECLASSES list.
16737 (expand_member_init): Use binfo_for_vbase.
16738 (build_vbase_delete): Adjust for changes to the
16739 CLASSTYPE_VBASECLASSES list.
16740 * method.c (do_build_copy_constructor): Likewise.
16741 * rtti.c (get_base_offset): Use binfo_for_vbase.
16742 (expand_class_desc): Remove #if 0'd code.
16743 * search.c (struct vbase_info): Remove vbase_types.
16744 (get_base_distance): Use binfo_for_vbase.
16745 (lookup_field_queue_p): Use CANONICAL_BINFO.
16746 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
16747 (get_pure_virtuals): Adjust for changes to the
16748 CLASSTYPE_VBASECLASSES list.
16749 (dfs_find_vbases): Use binfo_for_vbase.
16750 (dfs_init_vbase_pointers): Likewise.
16751 (init_vbase_pointers): Don't initialize vi.vbase_types.
16752 (virtual_context): Use binfo_for_vbase.
16753 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
16754 CLASSTYPE_VBASECLASSES list.
16755 (expand_indirect_vtbls_init): Simplify.
16756 (dfs_get_vbase_types): Don't replicate virtual bases.
16757 (find_vbase_instance): Use binfo_for_vbase.
16758 (binfo_for_vbase): New function.
16759 * typeck.c (get_delta_difference): Use binfo_for_vbase.
16761 2000-05-17 Mark Mitchell <mark@codesourcery.com>
16763 * decl2.c (finish_anon_union): Generalize error messages to handle
16764 anonymous structures.
16765 * init.c (perform_member_init): Remove `name' parameter.
16766 (build_field_list): New function.
16767 (sort_member_init): Handle anonymous union initialization order
16768 correctly. Check for multiple initializations of the same union.
16769 (emit_base_init): Don't look up fields by name here.
16770 (expand_member_init): Record the result of name lookup for future
16772 * typeck.c (build_component_ref): Fix formatting.
16774 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
16776 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
16777 * typeck.c (build_x_compound_expr): Replace warn_unused with
16780 * decl2.c (lang_decode_option): Update -Wall unused flags by
16781 calling set_Wunused.
16783 2000-05-16 Mark Mitchell <mark@codesourcery.com>
16785 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
16786 * init.c (dfs_vtable_path_unmark): Remove.
16787 * search.c (marked_new_vtable_p): Likewise.
16788 (unmarked_new_vtable_p): Likewise.
16789 (dfs_search_slot_nonempty_p): Likewise.
16790 (dfs_mark): Likewise.
16791 (dfs_vtable_path_unmark): Likewise.
16792 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
16793 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
16794 (dfs_init_vbase_pointers): Remove special-case new ABI code.
16795 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
16796 (init_vbase_pointers): Simplify.
16797 (expand_indirect_vtbls_init): Likewise.
16799 * class.c (copy_virtuals): New function.
16800 (build_primary_table): Use it.
16801 (build_secondary_vtable): Likewise.
16802 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
16803 indicate that no vcall offset is required.
16804 (add_virtual_function): Likewise.
16805 (modify_all_vtables): Likewise.
16806 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16807 (dfs_accumulate_vtbl_inits): Likewise.
16808 (build_vtbl_initializer): Make changes to handle construction
16810 (dfs_build_vcall_offset_vtbl_entries): Likewise.
16811 (build_rtti_vtbl_entries): Likewise.
16812 (build_vtable_entries): Handle a NULL vcall_index.
16814 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
16816 * decl2.c (lang_decode_option): Fix thinko.
16818 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
16820 * except.c (check_handlers): New fn.
16821 * cp-tree.h: Declare it.
16822 * semantics.c (finish_handler_sequence): Call it.
16823 (finish_function_handler_sequence): Likewise.
16824 (finish_handler_parms): Set TREE_TYPE on the handler.
16825 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
16826 * search.c (get_base_distance_recursive): If protect>1, ignore
16828 (get_base_distance): Don't reduce watch_access.
16830 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
16832 * lex.c: #include diagnostic.h.
16833 (lang_init_options): Set default prefixing rules.
16835 * lang-options.h: Add -fdiagnostics-show-location=.
16837 * decl2.c: #include diagnostic.h.
16838 (lang_decode_option): Handle -fdiagnostics-show-location=.
16840 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
16842 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
16843 * vec.cc: Revert my 2000-05-07 change.
16845 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
16847 * class.c (check_field_decls): Complain about non-static data
16848 members with same name as class in class with constructor.
16850 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
16852 * decl.c (grokdeclarator): Allow non-static data members with
16853 same name as class.
16855 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
16857 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
16858 and pending_inline.filename. Update prototypes.
16859 * decl.c (define_label): Constify filename parameter.
16860 * decl2.c (warn_if_unknown_interface): Constify local char *.
16861 * input.c Constify input_source.filename. Don't declare
16862 input_filename or lineno. Constify filename parameter to feed_input.
16863 * lex.c (init_parse): Constify parameter and return value.
16864 (cp_pragma_interface, cp_pragma_implementation): Constify
16866 (reinit_parse_for_method, reinit_parse_for_block,
16867 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
16868 Constify local char *.
16869 * pt.c: Don't declare lineno or input_filename.
16870 (print_template_context, tsubst_friend_function, tsubst_decl,
16871 tsubst, instantiate_decl): Constify local char *.
16872 * semantics.c (expand_body): Constify local char *.
16873 * tree.c (build_srcloc): Constify filename parameter.
16874 * typeck.c (c_expand_asm_operands): Constify filename
16877 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
16879 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
16880 offsetof expansion.
16882 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
16884 * inc/cxxabi.h: Fix typos in comment.
16885 (__base_class_info::__offset): Use a static_cast.
16887 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
16889 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
16890 of std::size_t and std::ptrdiff_t respectively.
16891 * tinfo.cc: Likewise.
16892 * vec.cc: Likewise.
16894 2000-05-06 Richard Henderson <rth@cygnus.com>
16896 * typeck.c (build_c_cast): Don't warn integer->pointer size
16897 mismatch for constants.
16899 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
16901 * rtti.c (ptmd_initializer): Set non-public, if class is
16904 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
16905 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16906 __cxa_vec_delete): Likewise.
16907 * tinfo.cc (__dynamic_cast): Likewise.
16908 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16909 __cxa_vec_delete): Likewise.
16911 2000-05-04 Mark Mitchell <mark@codesourcery.com>
16913 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
16914 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
16915 (lang_decl_flags): Add vcall_offset.
16916 (THUNK_VCALL_OFFSET): Use it.
16917 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
16918 * method.c (make_thunk): Create the lang_decl here, not in
16920 (emit_thunk): Make generic thunks into ordinary functions once
16921 they have been fed to expand_body.
16922 * semantics.c (expand_body): Set current_function_is_thunk here.
16924 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16926 * class.c (update_vtable_entry_for_fn): Prototype.
16928 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
16931 * search.c (dfs_build_inheritance_graph_order): Prototype.
16933 2000-05-04 Mark Mitchell <mark@codesourcery.com>
16935 * cp-tree.h (special_function_kind): Add various kinds of
16937 (special_function_p): New function.
16938 * class.c (overrides): Don't let one kind of destructor override
16940 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
16941 whether or not to instantiate a template.
16942 * tree.c (special_function_p): Define.
16944 2000-05-03 Mark Mitchell <mark@codesourcery.com>
16946 * cp-tree.def (THUNK_DECL): Remove.
16947 * cp-tree.h (DECL_THUNK_P): New macro.
16948 (DECL_NON_THUNK_FUNCTION_P): Likewise.
16949 (DECL_EXTERN_C_FUNCTION_P): Likewise.
16950 (SET_DECL_THUNK_P): Likewise.
16951 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
16952 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
16953 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
16954 * decl.c (decls_match): Use DECL_EXTERN_C_P.
16955 (duplicate_decls): Likewise.
16956 (pushdecl): Likewise. Adjust thunk handling.
16957 (grokfndecl): Use DECL_EXTERN_C_P.
16958 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
16959 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
16960 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
16961 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
16962 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
16963 DECL_NO_STATIC_CHAIN.
16964 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
16965 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
16966 * search.c (covariant_return_p): Remove THUNK_DECL handling.
16969 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
16971 * tree.c (walk_tree): Set lineno.
16973 2000-05-01 Mark Mitchell <mark@codesourcery.com>
16975 * exception.cc: Update license notice.
16976 * new.cc: Likewise.
16977 * new1.cc: Likewise.
16978 * new2.cc: Likewise.
16979 * tinfo.cc: Likewise.
16980 * tinfo2.cc: Likewise.
16981 * vec.cc: Likewise.
16982 * inc/cxxabi.h: Likewise.
16983 * inc/exception: Likewise.
16984 * inc/new: Likewise.
16985 * inc/new.h: Likewise.
16986 * inc/typeinfo: Likewise.
16988 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
16990 * tree.c (build_target_expr_with_type): If we already have a
16991 TARGET_EXPR, just return it.
16993 * optimize.c (initialize_inlined_parameters): Don't generate an
16994 EXPR_STMT if we can just use DECL_INITIAL.
16995 * decl.c (emit_local_var): Only make the initialization a
16996 full-expression if stmts_are_full_exprs_p.
16998 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17000 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17002 * call.c (standard_conversion): Use it.
17003 (direct_reference_binding): Likewise.
17004 (build_over_call): Likewise.
17005 (is_properly_derived_from): Likewise.
17006 (compare_ics): Likewise.
17007 * class.c (resolves_to_fixed_type_p): Likewise.
17008 * optimize.c (declare_return_variable): Likewise.
17009 * pt.c (is_specialization_of): Likewise.
17011 * typeck.c (comp_target_parms): Likeiwse.
17012 (build_static_cast): Likewise.
17013 (build_reinterpret_cast): Likewise.
17014 (build_const_cast): Likewise.
17015 (comp_ptr_ttypes_real): Likewise.
17016 (comp_ptr_ttypes_const): Likewise.
17017 * typeck2.c (process_init_constructor): Likewise.
17019 2000-04-30 Scott Snyder <snyder@fnal.gov>
17021 * decl.c (finish_destructor_body): Use the base destructor when
17022 destroying virtual bases.
17024 2000-04-30 Mark Mitchell <mark@codesourcery.com>
17026 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17028 * optimize.c (struct inline_data): Add target_exprs field.
17029 (declare_return_variable): When a function returns an aggregate,
17030 use the variable declared in the TARGET_EXPR as the remapped
17032 (expand_call_inline): Update the pending target_exprs stack.
17033 (optimize_function): Initialize the stack.
17035 * decl2.c (finish_file): Fix typo in comment.
17037 * method.c (emit_thunk): Don't try to return a `void' value.
17039 * optimize.c (initialize_inlined_parameters): If the parameter is
17040 addressable, we need to make a new VAR_DECL, even if the
17041 initializer is constant.
17043 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
17045 * decl.c (grok_op_properties): Add an extra check of argtypes.
17047 2000-04-27 Mark Mitchell <mark@codesourcery.com>
17049 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17051 (initialize_inlined_parameters): Try to avoid creating new
17054 2000-04-27 Alex Samuel <samuel@codesourcery.com>
17056 * lex.c (my_get_run_time): Remove.
17057 (init_filename_times): Use get_run_time instead of my_get_run_time.
17058 (check_newline): Likewise.
17059 (dump_time_statistics): Likewise.
17060 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17061 of computing elapsed time explicitly.
17063 2000-04-26 Mark Mitchell <mark@codesourcery.com>
17065 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17066 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17067 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17068 before calling decl_constant_value.
17069 * class.c (check_bitfield_decl): Likewise.
17070 * cvt.c (ocp_convert): Likewise.
17071 (convert): Likewise.
17072 * decl.c (compute_array_index_type): Likewise.
17073 (build_enumerator): Likewise.
17074 * decl2.c (check_cp_case_value): Likewise.
17075 * pt.c (convert_nontype_argument): Likewise.
17076 (tsubst): Likewise.
17077 * typeck.c (decay_conversion): Likewise.
17078 (build_compound_expr): Likewise.
17079 (build_reinterpret_cast): Likewise.
17080 (build_c_cast): Likewise.
17081 (convert_for_assignment): Likewise.
17083 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
17085 * decl.c (finish_function): Don't play games with DECL_INLINE.
17087 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
17089 * ir.texi: Correct typo.
17091 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17093 * decl.c (grokdeclarator): Reject VLAs as members.
17095 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
17097 * call.c (standard_conversion): Accept conversion between
17100 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17102 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
17104 * decl2.c (finish_file): Remove double setup for accounting
17107 2000-04-24 Robert Lipe <robertlipe@usa.net>
17109 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17111 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
17113 * new.cc (set_new_handler): Needs to be in std::.
17115 2000-04-23 Mark Mitchell <mark@codesourcery.com>
17117 * cp-tree.h (lang_decl): Remove pretty_function_p.
17118 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17119 language-specific node.
17120 * decl.c (cp_make_fname_decl): Use build_decl, not
17121 build_lang_decl, to build the variables.
17122 (grokvardecl): Don't call build_lang_decl for local variables in
17124 (grokdeclarator): Don't call build_lang_decl for local type
17125 declarations in templates.
17126 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17127 zero'd memory, rather than calling memset.
17128 * pt.c: Include hashtab.h.
17129 (local_specializations): New variable.
17130 (retrieve_local_specialization): Use it.
17131 (register_local_specialization): Likewise.
17132 (tsubst_decl): Don't assume local variables have
17133 DECL_LANG_SPECIFIC.
17134 (instantiate_decl): Set up local_specializations.
17135 * Makefile.in (HTAB_H): New variable.
17137 2000-04-23 Richard Henderson <rth@cygnus.com>
17139 * typeck.c (c_expand_asm_operands): Restore the original
17140 contents of the output list.
17142 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
17144 * ir.texi: Document complex number representation.
17146 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
17148 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17149 (target_incomplete_p): New function.
17150 (tinfo_base_init): Create comdat NTBS name variable.
17151 (ptr_initializer): Add non_public parameter. Calculate it.
17152 (ptmd_initializer): Likewise.
17153 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17154 (create_real_tinfo_var): Add non_public parameter. Use it.
17155 Push proxy into global namespace.
17156 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17158 * inc/typeinfo (type_info::before, type_info::operator==):
17159 Compare __name addresses.
17161 * tinfo2.cc: Remove new-abi builtins comment.
17163 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
17165 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
17167 * call.c (joust): Exit early if we get the same function, too.
17169 * decl2.c (key_method): Return NULL_TREE for template classes.
17170 (import_export_class): Don't need to check for template classes.
17172 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
17174 * lex.c: Remove references to cccp.c.
17176 2000-04-18 Mark Mitchell <mark@codesourcery.com>
17178 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
17179 volatile_memfunc. Add destructor_attr. Adjust dummy.
17180 (DECL_DESTRUCTOR_P): Use destructor_attr.
17181 (DECL_CONST_MEMFUNC_P): Reimplement.
17182 (DECL_VOLATILE_MEMFUNC_P): Remove.
17183 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
17184 (overrides): Use DECL_DESTRUCTOR_P.
17185 (check_for_override): Likewise.
17186 * decl.c (start_function): Likewise.
17187 * decl2.c (grokfclassfn): Likewise.
17188 (check_classfn): Likewise.
17189 (grok_function_init): Likewise.
17191 2000-04-17 Mark Mitchell <mark@codesourcery.com>
17193 * decl2.c (grokfield): Issue error on illegal data member
17196 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
17198 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
17200 2000-04-16 Mark Mitchell <mark@codesourcery.com>
17202 * class.c (build_vtable_entry): Don't build thunks for type-info
17205 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
17207 * decl.c (decls_match): Allow a redeclaration of a builtin to
17208 specify args while the builtin did not.
17210 2000-04-15 Mark Mitchell <mark@codesourcery.com>
17212 * cp-tree.def (THUNK_DECL): Add to documentation.
17213 * cp-tree.h (flag_huge_objects): Declare.
17214 * class.c (modify_vtable_entry): Tidy.
17215 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
17216 Calculate delta appropriately for the new ABI.
17217 (dfs_modify_vtables): Use it.
17218 (modify_all_vtables): Fix thinko in code to add overriding copies
17219 of functions to primary vtables.
17220 (build_clone): Fix typo in comment.
17221 (clone_function_decl): Correct order of destructors in vtable.
17222 (build_vbase_offset_vtbl_entries): Adjust comment.
17223 (dfs_vcall_offset_queue_p): Remove.
17224 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
17225 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
17226 (build_vtable_entry): Correct check for pure virtual functions.
17227 Don't declare flag_huge_objects.
17228 * decl.c (flag_huge_objects): Remove declaration.
17229 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
17230 Use int_size_in_bytes.
17231 (emit_thunk): Handle vcall offset thunks.
17233 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17235 * decl2.c (parse_time, varconst_time): Delete declarations.
17236 (finish_file): Delete LINENO declaration.
17237 START_TIME and THIS_TIME now long.
17239 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
17241 * class.c (build_base_field): Reformat comment.
17243 * inc/cxxabi.h (stddef.h): Comment inclusion.
17244 (__base_class_info::__offset): Comment shift.
17246 2000-04-12 Mark Mitchell <mark@codesourcery.com>
17248 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
17249 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
17250 (cp_push_exception_identifier): New macro.
17251 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
17252 (DECL_BASE_DESTRUCTOR_P): Likewise.
17253 (DECL_DELETING_DESTRUCTOR_P): Likewise.
17254 (get_vtbl_decl_for_binfo): Fix formatting.
17255 (in_charge_arg_for_name): New macro.
17256 (maybe_build_cleanup_and_delete): Remove declaration.
17257 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
17258 (in_charge_arg_for_name): New function.
17259 (build_new_method_call): Use it. Handle cloned destructors.
17260 (build_clone): Don't make the base constructor virtual.
17261 Automatically defer generated functions.
17262 (clone_function_decl): Handle destructors, too.
17263 (clone_constructors_and_destructors): Likewise.
17264 (create_vtable_ptr): Don't create a vtable entry for a cloned
17266 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
17267 (initialize_predefined_identifiers): Update appropriately.
17268 (finish_destructor_body): Simplify.
17269 (maybe_build_cleanup_and_delete): Remove.
17270 * except.c (expand_throw): Handle new-ABI destructors.
17271 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
17272 (build_dtor_call): New function.
17273 (build_delete): Use it. Simplify.
17274 * optimize.c (maybe_clone_body): Handle destructors.
17275 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
17277 * exception.cc (cleanup_fn): New typedef.
17278 (CALL_CLEANUP): New macro.
17279 (cp_eh_info): Use them.
17280 (__cp_push_exception): Likewise.
17281 (__cp_pop_exception): Likewise.
17283 2000-04-11 Mark Mitchell <mark@codesourcery.com>
17285 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
17286 (complete_dtor_identifier): New macro.
17287 (CLASSTYPE_FIRST_CONVERSION): Remove.
17288 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
17289 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
17290 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
17291 (CLASSTYPE_CONSTRUCTORS): Likewise.
17292 (CLASSTYPE_DESTRUCTORS): Likewise.
17293 (lang_decl): Add cloned_function.
17294 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
17295 (DECL_BASE_CONSTRUCTOR_P): Likewise.
17296 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
17297 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
17298 (DECL_CLONED_FUNCTION_P): Likewise.
17299 (DECL_CLONED_FUNCTION): Likewise.
17300 (clone_function_decl): Declare.
17301 (maybe_clone_body): Likewise.
17302 * call.c (build_user_type_conversion_1): Call complete object
17303 constructors in the new ABI.
17304 (build_new_method_call): Don't add in-charge parameters under the
17306 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
17307 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
17308 CLASSTYPE_DESTRUCTOR_SLOT.
17309 (build_clone): New function.
17310 (clone_function_decl): Likewise.
17311 (clone_constructors_and_destructors): Likewise.
17312 (check_bases_and_members): Use it.
17313 * decl.c (iniitialize_predefined_identifiers): Initialize
17314 complete_dtor_identifier.
17315 (finish_function): Don't add extra code to a clone.
17316 (lang_mark_tree): Mark cloned_function.
17317 * decl2.c (mark_used): Don't bother trying to instantiate things
17319 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
17320 * method.c (set_mangled_name_for_decl): Don't treat clones as
17322 (synthesize_method): Sythesize cloned functions, not the clones.
17323 * optimize.c (inline_data): Update comment on ret_label.
17324 (remap_block): Don't assume DECL_INITIAL exists.
17325 (copy_body_r): Allow ret_label to be NULL.
17326 (maybe_clone_body): Define.
17327 * pt.c (tsubst_decl): Handle clones.
17328 (instantiate_clone): New function.
17329 (instantiate_template): Use it.
17330 (set_mangled_name_for_template_decl): Don't treat clones as
17332 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
17333 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
17334 * semantics.c (expand_body): Clone function bodies as necessary.
17336 * optimize.c (remap_decl): Avoid sharing structure for arrays
17337 whose size is only known at run-time.
17338 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
17340 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
17341 to has_in_charge_parm_p.
17342 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
17343 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
17344 (DECL_COPY_CONSTRUCTOR_P): New macro.
17345 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
17346 (build_user_type_conversion_1): Likewise.
17347 (convert_like_real): Likewise.
17348 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
17349 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
17350 (copy_args_p): Likewise.
17351 (grok_ctor_properties): Likewise.
17352 (start_function): Likewise.
17353 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
17354 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
17355 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
17356 * method.c (do_build_copy_constructor): Use
17357 DECL_HAS_IN_CHARGE_PARM_P.
17358 (synthesize_method): Likewise.
17359 * pt.c (instantiate_template): Remove goto.
17360 * tree.c (build_cplus_method_type): Remove mention of obstacks in
17363 * cp-tre.h (finish_function): Change prototype.
17364 * decl.c (end_cleanup_fn): Adjust caller.
17365 (finish_function): Take only one parameter.
17366 * decl2.c (finish_objects): Adjust caller.
17367 (finish_static_storage_duration_function): Likewise.
17368 * method.c (emit_thunk): Likewise.
17369 * parse.y: Likewise.
17370 * parse.c: Regenerated.
17371 * pt.c (instantiate_decl): Likewise.
17372 * rtti.c (synthesize_tinfo_fn): Likewise.
17373 * semantics.c (expand_body): Likewise.
17375 * cp-tree.h (copy_decl): New function.
17376 * class.c (finish_struct_1): Use it.
17377 * lex.c (copy_decl): Define it.
17378 * pt.c (tsubst_decl): Likewise.
17379 * tree.c (copy_template_template_parm): Likewise.
17381 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
17382 has_nonpublic_assign_ref.
17383 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
17384 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
17385 * class.c (finish_struct_methods): Don't set
17386 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
17387 (interface_only): Don't declare.
17388 (interface_unknown): Likewise.
17390 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17392 * tree.h (HAVE_TEMPLATES): Remove definition.
17393 * lang-options.h (-fthis-is-variable): Remove documentation.
17395 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
17397 * class.c (instantiate_type): Handle object-relative template-id.
17399 * semantics.c (finish_expr_stmt): Call convert_to_void here.
17400 * decl.c (cplus_expand_expr_stmt): Not here.
17402 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17403 Initialize exprtype earlier.
17405 * parse.y (fn.def1): Check for defining types in return types.
17407 * decl.c (check_tag_decl): Notice extra fundamental types.
17408 Diagnose empty decls in classes, too.
17410 * decl.c (grokdeclarator): Don't override an anonymous name if no
17411 declarator was given.
17413 * cvt.c (convert_to_void): Call resolve_offset_ref.
17415 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17417 * decl2.c (decl_namespace): Handle getting a type.
17419 * typeck.c (build_c_cast): Re-enable warning for cast between
17420 pointer and integer of different size.
17422 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
17424 * inc/cxxabi.h (__pointer_type_info): Add restrict and
17426 (__pointer_type_info::__pointer_catch): New virtual function.
17427 (__pointer_to_member_type_info): Derive from
17428 __pointer_type_info. Adjust.
17429 (__pointer_to_member_type_info::__do_catch): Remove.
17430 (__pointer_to_member_type_info::__is_pointer_p): Declare.
17431 (__pointer_to_member_type_info::__pointer_catch): Declare.
17432 * rtti.c (qualifier_flags): Add restrict flag.
17433 (ptmd_initializer): Reorder members.
17434 (create_tinfo_types): Expand comments. Reorder
17435 ptmd_desc_type_node members.
17436 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17438 (__pointer_type_info::__do_catch): Move specific code into
17439 __pointer_catch. Call it.
17440 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17441 specific catch checking. Fix void conversion check.
17442 (__pointer_to_member_type_info::__do_catch): Remove.
17443 (__pointer_to_member_type_info::__pointer_catch): Implement.
17445 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17447 * lex.c (init_parse): Remove traces of classof and headof.
17448 * decl2.c (flag_operator_names): Default to 1.
17449 (lang_decode_option): Do not set it for -ansi.
17451 2000-04-09 Mark Mitchell <mark@codesourcery.com>
17453 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17454 (DECL_MAIN_VARIANT): Remove.
17455 * decl.c (duplicate_decls): Don't set it.
17456 (start_function): Likewise.
17457 (lang_mark_tree): Don't mark it.
17458 * decl2.c (defer_fn): Don't use it.
17459 * lex.c (retrofit_lang_decl): Don't set it.
17460 * pt.c (tsubst_decl): Likewise.
17461 * ptree.c (print_lang_decl): Don't print it.
17462 * typeck.c (mark_addressable): Don't use it.
17464 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17466 * vec.cc: Include <new> and <exception>.
17467 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17468 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17470 (__cxa_vec_delete): Catch dtor exceptions.
17472 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17474 Prepend __ to implementation defined names.
17475 * inc/typeinfo (type_info): Rename _name to __name.
17476 (type_info::type_info): Rename parameter.
17477 (type_info::operator==, type_info::operator!=,
17478 type_info::before): Likewise.
17479 (type_info::is_pointer_p, type_info::is_function_p,
17480 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17483 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17484 (__pointer_type_info::__pointer_type_info): Likewise.
17485 (__pointer_type_info::is_pointer_p,
17486 __pointer_type_info::do_catch): Prepend __. Rename parameters.
17487 (__array_type_info::__array_type_info): Rename parameters.
17488 (__function_type_info::__function_type_info): Likewise.
17489 (__function_type_info::is_function_p): Prepend __.
17490 (__enum_type_info::__enum_type_info): Rename parameters.
17491 (__pointer_to_member_type_info::__pointer_to_member_type_info):
17493 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17495 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17496 (__class_type_info::__class_type_info): Rename parameters.
17497 (__class_type_info::sub_kind): Prepend __. Adjust member names.
17498 (__class_type_info::upcast_result,
17499 __class_type_info::dyncast_result): Prepend __. Move definition
17501 (__class_type_info::do_upcast, __class_type_info::do_catch,
17502 __class_type_info::find_public_src,
17503 __class_type_info::do_dyncast,
17504 __class_type_info::do_find_public_src): Prepend __. Rename
17506 (__si_class_type_info::__si_class_type_info): Rename parameters.
17507 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17508 __si_class_type_info::do_find_public_src): Prepent __. Rename
17510 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17511 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17512 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17514 (__dynamic_cast): Rename parameters.
17515 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17516 type_info::do_catch, type_info::do_upcast): Prepend __.
17517 (contained_p, public_p, virtual_p, contained_public_p,
17518 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17519 (__class_type_info::do_catch,
17520 __class_type_info::do_upcast): Prepend __. Adjust.
17521 (__class_type_info::__upcast_result,
17522 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17524 (__class_type_info::find_public_src): Prepend __. Adjust.
17525 (__class_type_info::do_find_public_src,
17526 __si_class_type_info::do_find_public_src,
17527 __vmi_class_type_info::do_find_public_src): Likewise.
17528 (__class_type_info::do_dyncast,
17529 __si_class_type_info::do_dyncast,
17530 __vmi_class_type_info::do_dyncast): Likewise.
17531 (__class_type_info::do_upcast,
17532 __si_class_type_info::do_upcast,
17533 __vmi_class_type_info::do_upcast): Likewise.
17534 (__dynamic_cast): Adjust.
17535 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17536 (__function_type_info::is_function_p): Likewise.
17537 (__pointer_type_info::do_catch): Likewise. Adjust.
17538 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17539 (__throw_type_match_rtti_2): Adjust.
17540 (__is_pointer): Adjust.
17542 2000-04-08 Mark Mitchell <mark@codesourcery.com>
17544 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17545 (complete_ctor_identifier): New macro.
17546 (special_function_kind): Add sfk_copy_constructor and
17547 sfk_assignment_operator.
17548 (LOOKUP_HAS_IN_CHARGE): Remove.
17549 (cons_up_default_function): Rename to ...
17550 (implicitly_declare_fn): ... this.
17551 * call.c (build_new_method_call): Add in-charge parameters for
17553 * class.c (add_implicitly_declared_members): Change parameter name
17554 from cant_have_assignment to cant_have_const_assignment.
17555 Replace calls to cons_up_default_function to implicitly_declare_fn.
17556 * cvt.c (ocp_convert): Use complete_ctor_identifier.
17557 * decl.c (initialize_predefined_identifiers): Initialize it.
17558 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17559 complex expression.
17560 * init.c (expand_default_init): Don't calculate the in-charge
17562 (build_new_1): Likewise.
17563 * lex.c (cons_up_default_function): Move to method.c.
17564 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17565 (implicitly_declare_fn): New function.
17566 * typeck.c (build_static_cast): Use complete_ctor_identifier.
17567 (build_modify_expr): Likewise.
17568 * typeck2.c (build_functional_cast): Likewise.
17570 Under the new ABI, constructors don't return `this'.
17571 * cp-tree.h (warn_reorder): Declare.
17572 (special_function_kind): New enum.
17573 (global_base_init_list): Remove declaration.
17574 (emit_base_init): Don't return a value.
17575 (check_base_init): Don't declare.
17576 (is_aggr_typedef): Likewise.
17577 * decl.c (check_special_function_return_type): New function.
17578 (return_types): Remove.
17579 (grokdeclarator): Use check_special_function_return_type.
17580 (start_function): Don't initialize ctor_label under the new ABI.
17581 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
17582 * init.c (begin_init_stmts): Move to top of file.
17583 (finish_init_stmts): Likewise.
17584 (warn_reorder): Don't declare.
17585 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
17587 (check_base_init): Remove.
17588 (is_aggr_typedef): Likewise.
17589 (build_new_1): Don't use the return value of a constructor.
17590 * semantics.c (setup_vtbl_ptr): Don't use the return value
17592 * typeck.c (check_return_expr): Don't magically convert return
17593 statements into `return this' in constructors under the new ABI.
17595 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
17596 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
17597 (base_ctor_identifier): New macro.
17598 (base_dtor_identifier): Likewise.
17599 (deleting_dtor_identifier): Likewise.
17600 * decl.c: Don't include obstack.h.
17601 (obstack_chunk_alloc): Don't define.
17602 (obstack_chunk_free): Likewise.
17603 (struct predefined_identifier): New type.
17604 (initialize_predefined_identifiers): New function.
17605 (init_decl_processing): Use it.
17606 (debug_temp_inits): Remove.
17607 (start_method): Don't call preserve_data.
17608 (hack_incomplete_structures): Update comment.
17609 * init.c (init_init_processing): Don't initialize
17611 (build_offset_rf): Remove dead code.
17612 (build_delete): Use CLASSTYPE_N_BASECLASSES.
17613 * search.c (init_search_processing): Don't initialize
17616 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17618 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
17619 some sign_compare warnings.
17621 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17623 Rename abi::__vmi_class_type_info members.
17624 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
17625 base_list, detail_masks members to vmi_flags, vmi_base_count,
17626 vmi_bases and vmi_flags_masks respectively.
17627 (__vmi_class_type_info::vmi_flags_masks): Rename
17628 details_unknown_mask to flags_unknown_mask.
17629 * tinfo.cc (__class_type_info::do_upcast): Adjust.
17630 (__vmi_class_type_info::do_find_public_src): Adjust.
17631 (__vmi_class_type_info::do_dyncast): Adjust.
17632 (__vmi_class_type_info::do_upcast): Adjust.
17634 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17636 * tinfo.cc (convert_to_base): New function.
17637 (get_vbase_offset): Remove. Move into convert_to_base.
17638 (__vmi_class_type_info::do_find_public_src): Adjust.
17639 (__vmi_class_type_info::do_dyncast): Adjust.
17640 (__vmi_class_type_info::do_upcast): Adjust.
17642 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
17644 * tinfo.cc (operator=): Use __builtin_strcmp.
17645 * tinfo2.cc (before): Likewise.
17647 2000-04-06 Mark Mitchell <mark@codesourcery.com>
17649 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
17650 (DECL_SAVED_INLINE): Rename to ...
17651 (DECL_DEFERRED_FN): ... this.
17652 (in_function_p): Remove declaration.
17653 (mark_inline_for_output): Rename to ...
17654 (defer_fn): ... this.
17655 * decl.c (finish_function): Adjust call to mark_inline_for_output.
17656 (in_function_p): Remove definition.
17657 * decl2.c (saved_inlines): Rename to ...
17658 (deferred_fns): ... this.
17659 (saved_inlines_used): Rename to ...
17660 (deferred_fns_used): ... this.
17661 (mark_inline_for_output): Rename to ...
17662 (defer_fn): ... this.
17663 (finish_file): Adjust accordingly.
17664 (init_decl2): Likewise.
17665 * lex.c (cons_up_default_function): Likewise.
17666 * pt.c (mark_decl_instantiated): Likewise.
17667 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
17669 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
17670 * semantics.c (expand_body): Defer more functions.
17672 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17674 * vec.cc: New file.
17675 * Make-lang.in (CXX_LIB2FUNCS): Add it.
17677 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17678 __cxa_vec_delete): Declare.
17680 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17682 * rtti.c (dfs_class_hint_mark): New static function.
17683 (dfs_class_hint_unmark): New static function.
17684 (class_hint_flags): Use them.
17686 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
17688 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
17690 2000-04-05 Mark Mitchell <mark@codesourcery.com>
17692 * cp-tree.h (instantiate_decl): Change prototype.
17693 * decl2.c (mark_used): Adjust call.
17694 * optimize.c (inlinable_function_p): Adjust handling of templates.
17695 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
17696 (do_type_instantiation): Likewise.
17697 (instantiate_decl): Defer more templates.
17698 (instantiate_pending_templates): Adjust logic to handle inline
17701 * Makefile.in (GGC_H): New variable. Use it throughout in place
17704 * call.c: Don't include obstack.h. Include ggc.h.
17705 (obstack_chunk_alloc): Don't define.
17706 (obstack_chunk_free): Likewise.
17707 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
17708 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
17709 (pop_switch): Free it.
17711 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
17713 * dump.c (dequeue_and_dump): Don't try to print the bit_position
17714 if we don't have a DECL_FIELD_OFFSET.
17716 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
17718 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
17719 special_function_p.
17721 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17723 * cfns.gperf (hash, libc_name_p): Prototype.
17725 * rtti.c (build_dynamic_cast_1): Constification.
17727 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
17729 * semantics.c (deferred_type_access_control): Prototype.
17731 2000-04-04 Mark Mitchell <mark@codesourcery.com>
17733 Correct many new ABI issues regarding vbase and vcall offset
17735 * cp-tree.h (BINFO_VTABLE): Document.
17736 (struct lang_type): Tweak formatting.
17737 (BINFO_PRIMARY_BINFO): Add to documentation.
17738 (CLASSTYPE_VSIZE): Fix typo in comment.
17739 (CLASSTYPE_VBASECLASSES): Update documentation.
17740 (BINFO_VBASE_MARKED): Remove.
17741 (SET_BINFO_VBASE_MARKED): Likewise.
17742 (CLEAR_BINFO_VBASE_MARKED): Likewise.
17743 (BINFO_FIELDS_MARKED): Remove.
17744 (SET_BINFO_FIELDS_MARKED): Likewise.
17745 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
17746 (enum access_kind): New enumeration.
17747 (num_extra_vtbl_entries): Remove declaration.
17748 (size_extra_vtbl_entries): Likewise.
17749 (get_vtbl_decl_for_binfo): New function.
17750 (dfs_vbase_unmark): Remove declaration.
17751 (mark_primary_bases): Likewise.
17752 * class.c (SAME_FN): Remove.
17753 (struct vcall_offset_data_s): Move definition.
17754 (build_vbase_pointer): Use `build', not `build_binary_op', to
17755 access the vbase pointer under the new ABI.
17756 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
17757 (build_primary_vtable): Likewise.
17758 (dfs_mark_primary_bases): Move here from search.c.
17759 (mark_primary_bases): Likewise.
17760 (determine_primary_bases): Under the new ABI, don't make a base
17761 class a primary base just because we don't yet have any virtual
17763 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
17764 (num_vfun_entries): Remove.
17765 (dfs_count_virtuals): Likewise.
17766 (num_extra_vtbl_entries): Likewise.
17767 (size_extra_vtbl_entries): Likewise.
17768 (layout_virtual_bases): Iterate in inheritance graph order under
17770 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
17771 indicate that a vfield is present.
17772 (init_class_processing): Initialize access_public_node, etc., from
17774 (get_vtbl_decl_for_binfo): New function.
17775 (dump_class_hierarchy_r): Likewise.
17776 (dump_class_hierarchy): Use it.
17777 (finish_vtbls): Build the vtbls in inheritance graph order.
17778 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17779 (initialize_vtable): Use get_vtbl_decl_for_binfo.
17780 (accumulate_vtbl_inits): Add comments explaining why a pre-order
17782 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
17783 where the vptr points, even for primary vtables.
17784 (build_vtbl_initializer): Adjust handling of vbase and vcall
17786 (build_vcall_and_vbase_vtable_entries): New function.
17787 (dfs_build_vbase_offset_vtbl_entries): Remove.
17788 (build_vbase_offset_vtbl_entries): Reimplement.
17789 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
17790 were already handled in a primary base class vtable.
17791 (build_vcall_offset_vtbl_entries): Adjust.
17792 (build_rtti_vtbl_entries): Adjust.
17793 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
17794 * init.c (expand_virtual_init): Simplify.
17795 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
17796 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
17797 * search.c (BINFO_ACCESS): New macro.
17798 (SET_BINFO_ACCESS): Likewise.
17799 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
17800 (access_in_type): Likewise.
17801 (dfs_accessible_p): Likewise.
17802 (protected_accessible_p): Likewise.
17803 (lookup_fnfields_1): Adjust documentation.
17804 (dfs_mark_primary_bases): Move to class.c
17805 (mark_primary_bases): Likewise.
17806 (dfs_vbase_unmark): Remove.
17807 (virtual_context): Use BINFO_FOR_VBASE.
17808 (dfs_get_vbase_types): Simplify.
17809 (dfs_build_inheritance_graph_order): New function.
17810 (get_vbase_types): Use it.
17811 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
17813 * tinfo.cc (get_vbase_offset): New function.
17814 (__vmi_class_type_info::do_find_public_src): Use it.
17815 (__vmi_class_type_info::do_dyncast): Likewise.
17816 (__vmi_class_type_info::do_upcast): Likewise.
17818 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
17820 * lang-specs.h: Pass -fno-show-column to the preprocessor.
17822 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
17824 * rtti.c (class_hint_flags): Rename flags.
17825 (class_initializer): Remove flags.
17826 (synthesize_tinfo_var): Combine offset and flags. Add flags
17827 for __vmi_class_type_info.
17828 (create_tinfo_types): Remove flags from __class_type_info and
17829 __si_class_type_info. Merge flags and offset from
17830 base_class_type_info.
17831 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
17832 (__base_class_info::is_virtual_p): Adjust.
17833 (__base_class_info::is_public_p): Adjust.
17834 (__base_class_info::offset): New accessor.
17835 (__class_type_info::details): Remove member.
17836 (__class_type_info::__class_type_info): Lose details.
17837 (__class_type_info::detail_masks): Remove.
17838 (__si_class_type_info::__si_class_type_info): Lose details.
17839 (__vmi_class_type_info::details): New member.
17840 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
17841 (__vmi_class_type_info::detail_masks): New member.
17842 * tinfo.cc (__class_type_info::do_upcast): Initialize result
17843 with unknown_details_mask.
17844 (__vmi_class_type_info::do_find_public_src): Adjust
17845 (__vmi_class_type_info::do_dyncast): Adjust.
17846 (__vmi_class_type_info::do_upcast): Set result details, if
17848 (__dynamic_cast): Temporarily #if out optimization.
17850 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
17852 * rtti.c (get_tinfo_decl): Mark used.
17853 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
17854 mark as dealt with, if we output it.
17856 2000-03-28 Mark Mitchell <mark@codesourcery.com>
17858 * class.c: Reorganize to put virtual function table initialization
17859 machinery at the end of the file.
17861 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
17863 * class.c (finish_struct): Use bitsize_zero_node.
17864 * pt.c (instantiate_class_template): Likewise.
17866 2000-03-28 Mark Mitchell <mark@codesourcery.com>
17868 Put RTTI entries at negative offsets in new ABI.
17869 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
17870 vbase offset at index -3, not -1.
17871 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
17872 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
17873 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
17874 (build_rtti_vtbl_entries): New function.
17875 (set_rtti_entry): Remove.
17876 (build_primary_vtable): Don't use it.
17877 (build_secondary_vtable): Likewise.
17878 (start_vtable): Remove.
17879 (first_vfun_index): New function.
17880 (set_vindex): Likewise.
17881 (add_virtual_function): Don't call start_vtable. Do call
17883 (set_primary_base): Rename parameter.
17884 (determine_primary_base): Likewise.
17885 (num_vfun_entries): Don't use skip_rtti_stuff.
17886 (num_extra_vtbl_entries): Include RTTI information.
17887 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
17888 (skip_rtti_stuff): Remove.
17889 (dfs_modify_vtables): Don't use it.
17890 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
17891 (layout_nonempty_base_or_field): Update size handling.
17892 (create_vtable_ptr): Tweak.
17893 (layout_class_type): Adjust parameter names.
17894 (finish_struct_1): Simplify.
17895 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
17896 (skip_rtti_stuff): Remove.
17897 (first_vfun_index): New function.
17898 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17899 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
17900 (marked_vtable_pathp): Declare.
17901 (unmarked_vtable_pathp): Likewise.
17902 * error.c (dump_expr): Use first_vfun_index to calculate vtable
17904 * rtti.c (build_headof): Look for RTTI at negative offsets.
17905 (get_tinfo_decl_dynamic): Likewise.
17906 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
17908 (create_pseudo_type_info): Do it here instead. Adjust so that
17909 vptr points at first virtual function.
17910 * search.c (marked_vtable_pathp): Make it global.
17911 (unmarked_vtable_pathp): Likewise.
17912 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17913 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17914 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
17915 (get_pure_virtuals): Likewise.
17916 (expand_upcast_fixups): Likewise.
17917 * tree.c (debug_binfo): Likewise.
17918 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
17921 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17923 * class.c (check_field_decl): Fix typo.
17924 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
17925 (check_methods): Likewise.
17926 (check_field_decls): Likewise.
17927 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
17928 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
17929 Use DECL_RESULT_FLD, not DECL_RESULT.
17930 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
17931 * lex.c (identifier_type): Likewise.
17932 * pt.c (determine_specialization, lookup_template_class): Likewise.
17933 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
17934 (resolve_overloaded_unification, more_specialized): Likewise.
17935 * semantics.c (finish_member_declaration): Likewise.
17936 * typeck.c (build_x_function_call): Likewise.
17938 2000-03-26 Mark Mitchell <mark@codesourcery.com>
17940 * class.c (layout_empty_base): Handle empty bases with non-byte
17942 (build_base_field): Likewise.
17943 (layout_virtual_bases): Likewise.
17945 * class.c (finish_struct_1): Fix typo in this change:
17947 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17949 2000-03-25 Mark Mitchell <mark@codesourcery.com>
17951 * decl.c (grokdeclarator): Count partial specializations when
17952 keeping track of how many template classes have been seen.
17954 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
17956 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17958 * class.c (build_vbase_pointer_fields): layout_field now place_field.
17959 (get_vfield_offset): Use byte_position.
17960 (set_rtti_entry): Set OFFSET to ssizetype zero.
17961 (get_binfo_offset_as_int): Deleted.
17962 (dfs_record_base_offsets): Use tree_low_cst.
17963 (dfs_search_base_offsets): Likewise.
17964 (layout_nonempty_base_or_field): Reflect changes in RLI format
17965 and call byte_position.
17966 (layout_empty_base): Convert offset to ssizetype.
17967 (build_base_field): use rli_size_unit_so_far.
17968 (dfs_propagate_binfo_offsets): Do computation in proper type.
17969 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
17970 (layout_class_type): Reflect changes in RLI names and fields.
17971 (finish_struct_1): Set DECL_FIELD_OFFSET.
17972 * dump.c (dequeue_and_dump): Call bit_position.
17973 * expr.c (cplus_expand_constant): Use byte_position.
17974 * rtti.c (expand_class_desc): Use bitsize_one_node.
17975 * typeck.c (build_component_addr): Use byte_position and don't
17976 special case for zero offset.
17978 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
17980 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
17982 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
17984 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
17987 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17989 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
17991 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
17992 make_typename_type, check_initializer, cp_finish_decl,
17993 xref_tag): Likewise.
17994 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
17995 decl_namespace, arg_assoc_template_arg, arg_assoc,
17996 validate_nonmember_using_decl, do_class_using_decl): Likewise.
17997 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
17998 args_to_string): Likewise.
17999 * friend.c (is_friend): Likewise.
18000 * lex.c (note_got_semicolon, note_list_got_semicolon,
18001 is_global): Likewise.
18002 * method.c (build_overload_nested_name, build_overload_value,
18003 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18004 * parse.y (typename_sub, typename_sub1): Likewise.
18005 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18006 process_partial_specialization, convert_template_argument,
18007 template_args_equal, add_pending_template, lookup_template_class,
18008 for_each_template_parm_r, maybe_fold_nontype_arg,
18009 tsubst, instantiate_template, type_unification_real, unify,
18010 instantiate_pending_templates, set_mangled_name_for_template_decl):
18012 * repo.c (repo_get_id, repo_template_used): Likewise.
18013 * search.c (lookup_field_1): Likewise.
18014 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18015 * xref.c (classname): Likewise.
18017 2000-03-22 Mark Mitchell <mark@codesourcery.com>
18019 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18020 (CANONICAL_BINFO): New macro.
18021 (BINFO_NEW_VTABLE_MARKED): Use it.
18022 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18023 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18024 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18026 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18027 (build_secondary_vtable): Likewise.
18028 (dfs_finish_vtbls): Likewise.
18029 (dfs_accumulate_vtbl_inits): Likewise.
18030 (accumulate_vtbl_inits): New function.
18031 (finish_vtbls): Make sure that virtual bases come after
18032 non-virtual bases in the vtable group.
18033 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18034 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18035 * search.c (struct vbase_info): Move definition.
18036 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18037 (unmarked_new_vtable_p): Likewise.
18038 (dfs_mark_vtable_path): Remove.
18039 (dfs_mark_new_vtable): Remove.
18040 (dfs_unmark_new_vtable): Likewise.
18041 (dfs_clear_search_slot): Likewise.
18042 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18043 (dfs_clear_vbase_slots): Likewise.
18044 (init_vbase_pointers): LIkewise.
18046 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
18048 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18049 SIZETYPE to a non-SIZETYPE.
18051 2000-03-21 Mark Mitchell <mark@codesourcery.com>
18053 * class.c (layout_virtual_bases): Adjust names in conditionally
18056 * class.c (record_base_offsets): New function.
18057 (layout_conflict_p): Likewise.
18058 (layout_nonempty_base_or_field): Use it.
18059 (layout_empty_base): New function.
18060 (build_base_field): Use it.
18061 (build_base_fields): Update comment.
18062 (layout_virtual_bases): Fold in a little code form
18063 layout_basetypes. Use layout_empty_base.
18064 (layout_basetypes): Remove.
18065 (end_of_class): New function.
18066 (layout_class_type): Use it. Adjust.
18068 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18069 (fntype_p): Remove.
18070 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18072 (dfs_skip_nonprimary_vbases_markedp): Likewise.
18073 * typeck.c (fntype_p): Remove.
18075 * cp-tree.h (TI_SPEC_INFO): Remove.
18076 (CLASSTYPE_TI_SPEC_INFO): Likewise.
18077 * pt.c (process_partial_specialization): Likewise.
18079 * class.c (build_base_field): Fix thinko in computation of binfo
18082 * tree.c (mark_local_for_remap_p): Mark variables declared in
18083 TARGET_EXPRs as well.
18085 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18087 * typeck.c (require_complete_type, complete_type,
18088 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18089 build_array_ref, convert_arguments, pointer_diff,
18090 build_x_unary_op, build_unary_op, build_c_cast,
18091 build_modify_expr): Use COMPLETE_TYPE_P etc.
18092 * call.c (is_complete, convert_like_real,
18093 build_new_method_call): Likewise.
18094 * class.c (build_vbase_pointer_fields, check_bases,
18095 build_base_field, finish_struct_1, pushclass): Likewise.
18096 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18097 * decl.c (maybe_process_template_type_declaration, pushtag,
18098 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18099 layout_var_decl, check_initializer, cp_finish_decl,
18100 grokdeclarator, require_complete_types_for_parms,
18101 grok_op_properties, xref_tag, xref_basetypes,
18102 check_function_type): Likewise.
18103 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18104 * friend.c (do_friend): Likewise.
18105 * init.c (build_offset_ref): Likewise.
18106 * parse.y (structsp): Likewise.
18107 * pt.c (maybe_process_partial_specialization,
18108 tsubst_friend_function, instantiate_class_template, tsubst,
18109 do_type_instantiation, instantiate_pending_templates): Likewise.
18110 * repo.c (repo_get_id): Likewise.
18111 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18112 synthesize_tinfo_var, emit_support_tinfos): Likewise.
18113 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18114 * semantics.c (begin_class_definition): Likewise.
18115 * tree.c (build_cplus_method_type): Likewise.
18116 * typeck2.c (digest_init, build_functional_cast,
18117 add_exception_specifier): Likewise.
18118 * parse.h, parse.c: Regenerated.
18120 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18122 * inc/cxxabi.h: New header file. Define new-abi entry points.
18123 (__pointer_type_info::target): Rename member to ...
18124 (__pointer_type_info::type): ... here.
18125 (__base_class_info::type): Rename member to ...
18126 (__base_class_info::base): ... here.
18127 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18128 * cp-tree.h (CPTI_ABI): New global tree enumeration.
18129 (abi_node): New global tree node.
18130 * decl.c (abi_node): Document.
18131 (init_decl_processing): Initialize abi_node.
18132 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18133 (get_vmi_pseudo_type_info): Likewise.
18134 (create_tinfo_types): Likewise.
18135 (emit_support_tinfos): Likewise.
18136 * tinfo.h (cxxabi.h): Include for new-abi.
18137 Move rtti class definitions to new header file.
18138 * tinfo.cc (abi): Use the namespace.
18139 (std): Move new abi rtti classes from here ...
18140 (__cxxabiv1): ... to here.
18141 * tinfo2.cc (cxxabi.h): Include for new-abi.
18142 Move rtti class definitions to new header file.
18143 (std): Move new abi rtti classes from here ...
18144 (__cxxabiv1): ... to here.
18145 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18148 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18149 Jason Merrill <jason@casey.cygnus.com>
18151 * method.c (build_overload_int): Use host_integerp.
18153 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18155 * init.c (build_offset_ref): Handle the case of a templated member
18158 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18160 * except.c (expand_exception_blocks): Clear catch_clauses_last.
18162 2000-03-18 Mark Mitchell <mark@codesourcery.com>
18164 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18165 * class.c (check_bitfield_decl): Turn illegal bitfields into
18167 (dfs_propagate_binfo_offsets): Adjust for new size_binop
18169 (dfs_offset_for_unshared_vbases): Likewise.
18170 * cvt.c (cp_convert_to_pointer): Convert NULL to a
18171 pointer-to-member correctly under the new ABI.
18172 * expr.c (cplus_expand_constant): Don't use cp_convert when
18173 turning an offset into a pointer-to-member.
18174 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18175 when dereferencing them under the new ABI.
18176 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
18177 of pointers-to-members under the new ABI.
18179 * class.c (check_bitfield_decl): Remove restriction on really long
18181 (layout_class_type): Implement new ABI handling of bitfields
18182 longer than their types.
18184 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18186 * parse.y (extdefs): Call ggc_collect.
18187 * parse.c: Regenerated.
18189 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
18191 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
18192 (note_name_declared_in_class): Use OVL_CURRENT to get at a
18193 potential overload.
18195 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18197 * class.c (build_vbase_path): Use integer_zerop.
18198 (build_vtable_entry): Use tree_low_cst.
18199 (get_vfield_offset): Use bit_position.
18200 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
18202 (check_bitfield_decl): Set DECL_SIZE using convert.
18203 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
18204 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
18206 (finish_struct_1): Use bit_position.
18207 (dump_class_hierarchy): Use tree_low_cst.
18208 * cp-tree.h (min_precision): Add declaration.
18209 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
18210 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
18211 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
18212 * expr.c (cplus_expand_constant): Use bit_position.
18213 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
18214 * rtti.c (get_base_offset): Use bit_position.
18215 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
18216 host_integerp, and tree_low_cst.
18217 (pointer_int_sum): Use integer_zerop.
18218 (build_component_addr): Use bit_position.
18220 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
18222 * typeck.c (require_complete_type): Don't assume size_zero_node.
18223 (complete_type_or_else): Likewise.
18225 2000-03-16 Steven Grady <grady@digitaldeck.com>
18226 Jason Merrill <jason@casey.cygnus.com>
18228 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
18230 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
18232 * decl2.c (grokfield): Bail out if type is error_mark_node.
18234 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18236 * tinfo2.cc (__ptr_to_member_data): Rename to ...
18237 (__pointer_to_member_data): ... here. Adjust.
18238 * rtti.c (create_tinfo_types): Adjust.
18240 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18242 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
18243 * decl.c (ref_desc_type_node): Undocument.
18244 * rtti.c (ptr_ref_initializer): Rename to ...
18245 (ptr_initializer): ... here. Adjust comments.
18246 (ptmd_initializer): Fix comment thinko.
18247 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
18248 (create_tinfo_types): Remove ref_desc_type_node init.
18249 * tinfo2.cc (__reference_type_info): Remove.
18251 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18253 * decl.c (cp_finish_decl): Remove obsolete comment.
18255 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
18257 2000-03-14 Mark Mitchell <mark@codesourcery.com>
18259 * cp-tree.h: Tweak documentation.
18260 * class.c (build_vbase_pointer_fields): Layout the fields, too.
18261 (avoid_overlap): Remove.
18262 (get_binfo_offset_as_int): New function.
18263 (dfs_serach_base_offsets): Likewise.
18264 (layout_nonempty_base_or_field): Likewise.
18265 (build_base_field): Layout fields here. Avoid placing two objects
18266 of the same type at the same address, under the new ABI.
18267 (build_base_fields): Adjust accordingly.
18268 (create_vtable_ptr): Return the new field, but don't attach it to
18270 (remove_base_field): Remove.
18271 (remove_base_fields): Remove.
18272 (layout_basetypes): Adjust accordingly.
18273 (layout_class_type): Call layout_field for each field, rather than
18274 just making a wholesale call to layout_type.
18276 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
18278 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
18280 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
18282 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
18284 * except.c (dtor_nothrow): New fn.
18285 (do_pop_exception): Use it. Take type parm.
18286 (push_eh_cleanup): Take type parm.
18287 (expand_start_catch_block): Pass it.
18288 (build_eh_type_type_ref): Accept null type.
18290 2000-03-12 Mark Mitchell <mark@codesourcery.com>
18292 * cp-tree.h (revert_static_member_fn): Change prototype.
18293 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
18294 (grok_op_properties): Likewise.
18295 (start_function): Likewise.
18296 (revert_static_member_fn): Simplify.
18297 * pt.c (check_explicit_specialization): Adjust call to
18298 revert_static_member_fn.
18300 2000-03-11 Mark Mitchell <mark@codesourcery.com>
18302 * cp-tree.h (scope_kind): New type.
18303 (tmpl_spec_kind): Likewise.
18304 (declare_pseudo_global_level): Remove.
18305 (pseudo_global_level_p): Rename to template_parm_scope_p.
18306 (pushlevel): Remove declaration.
18307 (begin_scope): New function.
18308 (finish_scope): Likewise.
18309 (current_tmpl_spec_kind): Likewise.
18310 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
18311 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
18312 Add template_spec_p.
18313 (toplevel_bindings_p): Adjust.
18314 (declare_pseudo_global_level): Remove.
18315 (pseudo_global_level_p): Rename to template_parm_scope_p.
18316 (current_tmpl_spec_kind): New function.
18317 (begin_scope): Likewise.
18318 (finish_scope): Likewise.
18319 (maybe_push_to_top_level): Adjust.
18320 (maybe_process_template_type_declaration): Likewise.
18321 (pushtag): Likewise.
18322 (pushdecl_nonclass_level): Likewise.
18323 (lookup_tag): Likewise.
18324 (grokfndecl): Handle member template specializations. Share
18325 constructor and non-constructor code.
18326 * decl2.c (check_classfn): Handle member template specializations.
18327 * pt.c (begin_template_parm_list): Use begin_scope.
18328 (begin_specialization): Likewise.
18329 (end_specialization): Likewise.
18330 (check_explicit_specialization): Use current_tmpl_spec_kind.
18331 Handle member template specializations.
18332 (end_template_decl): Use finish_scope. Remove call to
18334 (push_template_decl_real): Remove bogus error message.
18335 (tsubst_decl): Fix typo in code contained in comment.
18336 (instantiate_template): Handle member template specializations.
18337 (most_general_template): Likewise.
18339 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
18341 * lex.c (whitespace_cr): Compress consecutive calls to warning().
18342 (do_identifier): Ditto for error().
18344 * pt.c (convert_nontype_argument): Ditto for cp_error().
18345 (convert_template_argument): Ditto for cp_pedwarn().
18347 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
18349 * exception.cc (__check_null_eh_spec): New fn.
18350 * except.c (expand_end_eh_spec): Call it if the spec is throw().
18352 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18354 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
18355 * except.c (expand_end_eh_spec): Add the return type.
18356 * rtti.c (throw_bad_cast): Add the parmtypes.
18357 (throw_bad_typeid): Likewise.
18359 * semantics.c (expand_stmt): Only leave out rtl for unused
18360 artificials, and set DECL_IGNORED_P on them as well.
18361 * decl.c (wrapup_globals_for_namespace): Likewise.
18363 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
18365 * decl.c (maybe_commonize_var): Skip all artificial decls.
18366 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
18368 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18370 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
18371 * cp-tree.h: Declare flag_enforce_eh_specs.
18372 * decl.c (store_parm_decls, finish_function): Check it.
18374 C library functions don't throw.
18375 * Makefile.in (cfns.h): New target.
18376 (except.o): Depend on it.
18377 * Make-lang.in (cc1plus): Depend on cfns.gperf.
18378 * cfns.gperf: New file.
18379 * cfns.h: Generated.
18380 * except.c: Include it.
18381 (nothrow_libfn_p): New fn.
18382 * decl.c (grokfndecl): Use it.
18383 * cp-tree.h: Declare it.
18385 * decl.c (push_overloaded_decl_1, auto_function,
18386 define_function): Lose.
18387 (build_library_fn_1): New static fn.
18388 (builtin_function): Use it.
18389 (get_atexit_node): Use build_library_fn_ptr.
18390 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
18391 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
18392 push_void_library_fn, push_throw_library_fn): New fns.
18393 * cp-tree.h: Declare them.
18394 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18395 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18396 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18397 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18398 * rtti.c (build_runtime_decl): Lose.
18399 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18400 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18401 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18403 * call.c (build_call): Remove result_type parm.
18404 Call mark_used on unused artificial fns.
18405 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18407 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
18409 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18411 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18412 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18413 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18414 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18415 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18416 expand_generic_desc): Likewise.
18418 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18420 * exception.cc (__cp_pop_exception): Cleanup the original object.
18422 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18424 * decl.c (grok_op_properties): Merge conversion to void warning
18425 with other silly op warnings.
18427 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
18429 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18430 array CONSTRUCTOR elements. Don't use expr_tree_cons.
18432 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18434 * decl.c (cp_make_fname_decl): New function.
18435 (wrapup_globals_for_namespace): Don't emit unused static vars.
18436 (init_decl_processing): Remove comment about use of
18437 array_domain_type. Set make_fname_decl.
18438 (cp_finish_decl): Remove __FUNCTION__ nadgering.
18439 * semantics.c (begin_compound_stmt): Remove
18440 current_function_name_declared flagging.
18441 (expand_stmt): Don't emit unused local statics.
18442 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18445 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18447 * typeck.c (convert_for_assignment): Don't look at array
18449 * call.c (convert_like_real): Likewise.
18451 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
18453 Add initial support for '\uNNNN' specifier.
18454 * lex.c (read_ucs): New fn.
18455 (readescape, skip_white_space): Call it.
18456 (is_extended_char, is_extended_char_1): New fns.
18457 (utf8_extend_token): New fn, #if 0'd out.
18458 (real_yylex): Treat extended chars like letters.
18460 * search.c (note_debug_info_needed): Walk the bases even if we
18461 weren't deferring the type itself.
18463 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18465 * decl2.c (finish_objects): Constify a char*.
18467 * method.c (emit_thunk): Likewise.
18469 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
18471 * typeck.c (dubious_conversion_warnings): Look through
18474 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18476 * class.c (dfs_modify_vtables): I is now unsigned.
18477 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18478 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18479 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18480 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18481 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18482 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18483 Call integer_all_onesp.
18484 * typeck2.c (process_init_constructor): Use compare_tree_int.
18486 * lang-specs.h (as): Don't call if -syntax-only.
18488 2000-03-06 Mark Mitchell <mark@codesourcery.com>
18490 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18491 RTL_EXPR_HAS_NO_SCOPE after all.
18493 2000-03-05 Mark Mitchell <mark@codesourcery.com>
18495 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18496 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
18497 RTL_EXPR_HAS_NO_SCOPE.
18499 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18502 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18504 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
18506 * call.c (convert_like): Macrofy.
18507 (convert_like_with_context): New macro.
18508 (convert_like_real): Renamed from convert_like. Add calling
18509 context parameters, for diagnostics. Add recursive flag. Call
18510 dubious_conversion_warnings for outer conversion.
18511 (build_user_type_conversion): Use convert_like_with_context.
18512 (build_over_call): Likewise. Don't warn about dubious
18513 conversions here. Adjust convert_default_arg calls.
18514 (convert_default_arg): Add context parameters for diagnostics.
18515 Pass through to convert_like_with_context.
18516 * cp-tree.h (convert_default_arg): Add context parameters.
18517 (dubious_conversion_warnings): Prototype new function.
18518 * typeck.c (convert_arguments): Adjust convert_default_arg call.
18519 (dubious_conversion_warnings): New function, broken
18520 out of convert_for_assignment.
18521 (convert_for_assignment): Adjust.
18523 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
18525 * decl2.c (key_method): Break out from...
18526 (import_export_vtable, import_export_class): ...here.
18528 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18529 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18531 * search.c (note_debug_info_needed, dfs_debug_mark,
18532 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
18533 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18535 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
18537 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18540 2000-03-02 Mark Mitchell <mark@codesourcery.com>
18542 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18543 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18544 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18545 (lang_type): Split gets_new into has_new and has_array_new.
18546 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18547 (TYPE_GETS_NEW): Split into ...
18548 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18549 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18550 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18551 (build_op_new_call): Don't declare.
18552 (build_new_1): Likewise.
18553 * call.c (build_op_new_call): Remove.
18554 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18555 instead of TYPE_NEEDS_DESTRUCTOR.
18556 (finish_struct_bits): Likewise.
18557 (add_implicitly_declared_members): Likewise.
18558 (check_field_decl): Likewise.
18559 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18560 correctly under the new ABI.
18561 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18562 instead of TYPE_NEEDS_DESTRUCTOR.
18563 (initialize_local_var): Likewise.
18564 (destroy_local_var): Likewise.
18565 (cp_finish_decl): Likewise.
18566 (register_dtor_fn): Likewise.
18567 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18568 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
18569 TYPE_VEC_DELETE_TAKES_SIZE here.
18570 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18571 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18572 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18573 (finish_destructor_body): Likewise.
18574 (maybe_build_cleanup_1): Likewise.
18575 * decl2.c (do_static_destruction): Likewise.
18576 * init.c (build_new_1): Make it static.
18577 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18578 (expand_cleanup_for_base): Likewise.
18579 (get_cookie_size): New function.
18580 (build_new_1): Handle array-new cookies correctly under the new
18582 (build_vec_delete_1): Likewise.
18583 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18584 (build_delete): Likewise.
18585 (build_vec_delete): Handle array-new cookies correctly under the new
18587 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18588 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
18589 TYPE_HAS_ARRAY_NEW_OPERATOR.
18590 * ptree.c (print_lang_type): Check them.
18591 * search.c (context_for_name_lookup): Fix typo in comment.
18592 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18593 * tree.c (break_out_cleanups): Likewise.
18594 (build_cplus_array_test_1): Likewise.
18595 (cp_build_qualified_type_real): Likewise.
18596 * typeck.c (complete_type): Likewise.
18598 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
18599 the command-line, not the end.
18601 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
18603 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
18605 2000-03-02 Tom Tromey <tromey@cygnus.com>
18607 * cp-tree.h (build_java_class_ref): Declare.
18608 * init.c (build_java_class_ref): No longer static.
18609 * except.c (expand_throw): Generate a Java-style `throw' if the
18610 thrown object is a "Java" object.
18611 (initialize_handler_parm): Generate a Java-style lookup of
18612 exception info if the caught object is a "Java" object.
18613 (catch_language, catch_language_init): New globals.
18614 (decl_is_java_type): New function.
18615 (expand_start_catch_block): Don't call push_eh_info() or
18616 push_eh_cleanup() when handling a Java-style "catch". Pass Java
18617 class reference to build_catch_block.
18619 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18621 * typeck.c (comptypes): Treat sizetype like its language equivalent.
18623 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
18625 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
18626 to merge reference/pointer code and fix incorrect warnings.
18628 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
18630 * search.c (protected_accessible_p): Use context_for_name_lookup.
18632 * init.c (construct_virtual_bases): Fix thinko.
18633 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
18635 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
18637 * decl.c (current_function_decl): Move to toplev.c.
18639 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
18641 * pt.c (fn_type_unification): Unify return type, whenever
18643 (get_bindings_real): Only pass return type when necessary.
18644 Remove explicit return type check.
18645 * class.c (resolve_address_of_overloaded_function): Pass desired
18646 return type to fn_type_unification.
18648 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18650 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
18652 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
18654 * rtti.c (expand_class_desc): Likewise.
18655 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
18656 (THUNK_VCALL_OFFSET): Likewise.
18657 (THUNK_DELTA): Reflect changes in ../tree.h.
18659 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
18661 * search.c (protected_accessible_p): Also allow the access if
18662 the member is public in DERIVED. Lose TYPE parm.
18663 (friend_accessible_p): Lose TYPE parm.
18664 (accessible_p): Adjust.
18666 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18668 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
18669 on things that are not sizes; ssize_binop deleted.
18670 Call size_diffop when appropriate.
18671 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18672 (build_primary_vtable, build_secondary_vtable): Likewise.
18673 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
18674 Variable I is HOST_WIDE_INT.
18675 (get_vfield_offset): Pass proper types to size_binop.
18676 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
18677 (finish_struct_1): Likewise.
18678 (skip_rtti_stuff): Arg N is now pointer to signed.
18679 (layout_class_type): Use size_zero_node.
18680 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
18681 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
18682 * decl.c (complete_arry_type): Pass proper types to size_binop.
18683 (xref_basetypes): BINFO_OFFSET is sizetype.
18684 * error.c (dump_expr): Don't use size_binop non-sizes.
18685 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
18686 * init.c (construct_virtual_bases): Fix type error.
18687 (build_vec_delete_1): Pass proper type to size_binop and don't
18689 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
18690 * rtti.c (get_base_offset): Pass proper type to size_binop.
18691 * search.c (dfs_find_vbases): Fix type error.
18692 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
18693 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
18694 * tree.c (debug_binfo): Variable N is signed.
18695 Use HOST_WIDE_INT_PRINT_DEC.
18696 * typeck.c (comptypes): sizetype is same as equivalent integer type.
18697 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
18698 size_one_node and size_zero_node.
18699 (c_alignof): Use size_one_node.
18700 (build_component_addr): Pass proper types to size_binop.
18701 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
18703 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
18705 Implement class scope using-declarations for functions.
18706 * class.c (handle_using_decl): Call add_method for used functions.
18707 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
18708 (add_method): Used functions are hidden by local functions.
18709 (check_bases_and_members): Handle using-decls before finalizing
18710 CLASSTYPE_METHOD_VEC.
18711 * call.c (add_function_candidate): Add ctype parm; if nonzero,
18712 override the type of 'this' accordingly.
18713 (add_template_candidate, add_template_candidate_real): Add ctype parm.
18714 (convert_class_to_reference, build_user_type_conversion_1,
18715 build_new_function_call, build_object_call, build_new_op,
18716 build_new_method_call): Pass ctype parm.
18718 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
18720 * call.c (convert_class_to_reference, build_user_type_conversion_1,
18721 build_new_function_call, build_object_call, build_new_op,
18722 build_new_method_call, build_op_delete_call): Don't get basetype_path
18724 * typeck.c (build_component_ref): Likewise.
18725 * init.c (build_offset_ref): Likewise.
18726 (resolve_offset_ref): Don't call enforce_access.
18727 Call build_scoped_ref.
18728 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
18729 would cause an error or if -pedantic.
18730 * class.c (alter_access): Lose binfo parm.
18732 2000-02-26 Mark Mitchell <mark@codesourcery.com>
18734 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
18737 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
18739 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
18740 pseudo_type_info creation into the std namespace
18742 2000-02-26 Mark Mitchell <mark@codesourcery.com>
18744 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
18745 (import_export_class): Remove declaration.
18746 * decl2.c (import_export_class): Make it static.
18747 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
18748 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
18749 EXPR_WITH_FILE_LOCATION.
18750 * lex.c (check_newline): Tweak filename/lineno setting.
18751 * semantics.c (begin_while_stmt): Fix typo in comment.
18753 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18755 * lang-options.h (-fmessage-length=): Add missing option.
18757 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
18759 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
18761 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
18763 2000-02-25 Jim Wilson <wilson@cygnus.com>
18765 * optimize.c (expand_call_inline): Emit the return label before
18766 evaluating the return value.
18768 2000-02-24 Mark Mitchell <mark@codesourcery.com>
18770 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
18771 than duplicating functionality here.
18772 * optimize.c: Include input.h.
18773 (expand_call_inline): Use push_srcloc and pop_srcloc.
18774 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
18775 * parse.c: Regenerated.
18776 * Makefile.in (lex.o): Depend on input.h.
18777 (optimize.o): Likewise.
18779 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
18781 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
18782 function type, rather than ICE.
18784 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
18786 * decl.c (grokdeclarator): Call decl_type_access_control.
18787 * parse.y (parse_end_decl): Don't call decl_type_access_control if
18790 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
18792 * decl.c (decls_match): Remove obsolete static member nadgering.
18794 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18796 * decl.c (grokdeclarator): Change ANSI to ISO.
18797 * lex.c (consume_string, readescape, do_identifier): Likewise.
18798 (parse_float, real_yylex): Likewise.
18799 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
18800 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
18801 new_type_id, maybe_label_decls, simple_stmt,
18802 for.init.statement): Likewise.
18803 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
18804 * semantics.c (finish_named_return_value): Likewise.
18805 * parse.c: Regenerate.
18807 2000-02-21 Mark Mitchell <mark@codesourcery.com>
18809 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
18810 (CPTI_CLASS_STAR_TYPE): Remove.
18811 (vtable_index_type): Likewise.
18812 (class_star_type_node): Remove.
18813 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
18814 (build_binary_op_nodefault): Remove.
18815 * call.c (build_new_op): Use build_binary_op instead of
18816 build_binary_op_nodefault.
18817 * decl.c (init_decl_processing): Remove class_star_type_node
18818 initialization. Make delta_type_node ptrdiff_type_node under the
18819 new ABI. Initialize vtable_index_type.
18820 (build_ptrmemfunc_type): Build different structures for the new
18822 (build_enumerator): Use build_binary_op instead of
18823 build_binary_op_nodefault.
18824 * method.c (build_overload_value): Mangle pointers-to-members
18825 appropriately under the new ABI.
18826 * typeck.c (build_array_ref): Use build_binary_op instead of
18827 build_binary_op_nodefault.
18828 (get_member_function_from_ptrfunc): Adjust for the new ABI.
18829 (build_binary_op_nodefault): Rename to ...
18830 (build_binary_op): ... this. Remove old version. Adjust for
18831 pointer-to-member comparisons under the new ABI.
18832 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
18833 (build_ptrmemfunc): Adjust for the new ABI.
18834 (expand_ptrmemfunc_cst): Likewise.
18835 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
18836 (pfn_from_ptrmemfunc): Adjust for the new ABI.
18838 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
18840 * call.c (build_object_call): Compress consecutive calls to
18842 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
18843 (build_op_delete_call): Adjust message formatting.
18845 * class.c (check_bases): Compress consecutive calls to
18847 (finish_struct_anon): Say 'ISO C++'.
18849 * decl.c (start_decl): Same here.
18850 (grok_reference_init): Likewise.
18851 (grokfndecl): Correct message formatting.
18852 (grokfndecl): Improve diagnostic.
18853 (check_static_variable_definition): Likewise. Say 'ISO C++'
18854 (compute_array_index_type): Say 'ISO C++'
18855 (create_array_type_for_decl): Compress consecutive calls to
18857 (grokdeclarator): Say 'ISO C++'
18858 (grok_op_properties): Likewise.
18860 * decl2.c (delete_sanity): Clairify diagnostic.
18861 (check_member_template): Same here.
18862 (grok_function_init): Use consistent terminology.
18864 * expr.c (do_case): Say 'ISO C++'
18866 * friend.c (do_friend): Compress consecutive calls to warning.
18868 2000-02-20 Mark Mitchell <mark@codesourcery.com>
18870 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
18871 * class.c (build_secondary_vtable): Reorganize. Don't create a
18872 new vtable under the new ABI.
18873 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
18874 computing the size.
18875 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
18876 the initializing elements.
18877 (initialize_vtable): New function.
18878 (dfs_finish_vtbls): Use it.
18879 (dfs_accumulate_vtbl_inits): New function.
18880 (finish_vtbls): Merge primary and secondary vtables under the new
18882 (finish_struct_1): Remove redundant call to layout_vtable_decl.
18883 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
18886 * class.c (build_vtable): New function, split out from ...
18887 (get_vtable_decl): ... here, and ...
18888 (build_secondary_vtable): ... here.
18890 * pt.c (tsubst_decl): Fix formatting.
18892 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18894 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
18895 (avoid_overlap, build_base_field): Likewise.
18896 (build_base_field, build_base_fields, is_empty_class):
18897 Test DECL_SIZE with integer_zero.
18898 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
18899 * cp-tree.h (struct lang_type): New field size_unit.
18900 (CLASSTYPE_SIZE_UNIT): New macro.
18901 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
18902 (cp_finish_decl): Delete -Wlarger-than processing.
18903 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
18904 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
18905 * tree.c (make_binfo): binfo vector is one entry longer.
18906 (walk_tree): Walk DECL_SIZE_UNIT.
18908 2000-02-19 Mark Mitchell <mark@codesourcery.com>
18910 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
18912 (build_vtable_entry): Don't assume all vtable entries are
18914 (build_vtbl_initializer): Adjust accordingly.
18915 (get_vtable_decl): Fix formatting.
18917 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
18919 * semantics.c (deferred_type_access_control): Walk the entire
18921 (save_type_access_control): Rename from
18922 initial_deferred_type_access_control. Just remember the value.
18923 (decl_type_access_control): New fn.
18924 (begin_function_definition): Use deferred_type_access_control, after
18925 we've started the function. Set type_lookups to error_mark_node.
18926 * parse.y (frob_specs, fn.def1): Adjust.
18927 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
18928 (parse_end_decl, parse_bitfield0, parse_method): New fns.
18929 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
18930 (after_type_component_declarator0): Likewise.
18931 (after_type_component_declarator): Likewise.
18932 (notype_component_declarator): Likewise.
18933 * cp-tree.h: Adjust.
18935 * decl.c (redeclaration_error_message): Allow redeclaration of
18936 namespace-scope decls.
18938 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
18940 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
18942 2000-02-17 Mark Mitchell <mark@codesourcery.com>
18944 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
18945 * decl2.c (grokclassfn): Likewise.
18947 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
18949 * decl2.c (lang_decode_option): Don't set default message length
18951 * lex.c (lang_init_options): Set it here.
18953 2000-02-16 Mark Mitchell <mark@codesourcery.com>
18955 Make DECL_CONTEXT mean the class in which a member function was
18956 declared, even for a virtual function.
18957 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
18958 (DECL_FRIEND_CONTEXT): New macro.
18959 (DECL_REAL_CONTEXT): Remove.
18960 (SET_DECL_FRIEND_CONTEXT): Likewise.
18961 (DECL_VIRTUAL_CONTEXT): Adjust.
18962 (DECL_CLASS_SCOPE_P): Use TYPE_P.
18963 (add_friends): Remove.
18964 (hack_decl_function_context): Likewise.
18965 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
18967 (build_over_call): Fix indentation. Use DECL_CONTEXT
18968 instead of DECL_CLASS_CONTEXT.
18969 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
18970 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18971 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18972 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
18973 (build_base_field): Likewise.
18974 (finish_struct_1): Likewise.
18975 (build_self_reference): Likewise.
18976 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
18978 (pushtag): Use decl_function_context, not
18979 hack_decl_function_context.
18980 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18981 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
18982 (pushdecl): Remove bogus code.
18983 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
18984 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18985 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18986 Use decl_function_context, nothack_decl_function_context.
18987 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
18988 (grokdeclarator): Likewise. Use decl_function_context, not
18989 hack_decl_function_context.
18990 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
18991 (start_function): Use DECL_FRIEND_CONTEXT, not
18992 DECL_CLASS_CONTEXT. Use decl_function_context, not
18993 hack_decl_function_context.
18994 (finish_function): Use decl_function_context, not
18995 hack_decl_function_context.
18996 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
18997 DECL_CLASS_CONTEXT.
18998 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
18999 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19000 (grokfield): Likewise.
19001 (finish_builtin_type): Likewise.
19002 (finish_vtable_vardec): Use decl_function_context, not
19003 hack_decl_function_context.
19004 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19005 (start_static_initialization_or_destruction): Likewise.
19006 (finish_static_initialization_or_destruction): Likewise.
19007 (mark_used): Adjust logic for deciding when to synthesize methods.
19008 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19010 * error.c (dump_function_decl): Use DECL_CONTEXT, not
19011 DECL_CLASS_CONTEXT.
19012 * friend.c (is_friend): Likewise.
19013 (add_friends): Remove.
19014 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19015 * lex.c (begin_definition_of_inclass_inline): Use
19016 decl_function_context, not hack_decl_function_context.
19017 (process_next_inline): Likewise.
19018 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19019 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19020 DECL_CLASSS_CONTEXT.
19021 (hack_identifier): Likewise.
19022 (synthesize_method): Use decl_function_context, not
19023 hack_decl_function_context.
19024 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19026 (is_member_template): Use decl_function_context, not
19027 hack_decl_function_context. Use DECL_CONTEXT, not
19028 DECL_CLASS_CONTEXT.
19029 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19030 DECL_CLASS_CONTEXT.
19031 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19033 (push_template_decl_real): Likewise.
19034 (instantiate_class_template): Don't call add_friends.
19035 (tsubst_default_argument): Use DECL_CONTEXT, not
19037 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19038 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19039 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19040 DECL_CLASS_CONTEXT.
19041 * repo.c (repo_inline_used): Likewise.
19042 * search.c (current_scope): Adjust for new _CONTEXT macros.
19043 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19045 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19046 (lookup_fnfields_here):Likewise.
19047 (check_final_overrider): Likewise.
19048 (init_vbase_pointers): Likewise.
19049 (virtual_context): Likewise.
19050 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19051 (expand_body): Use decl_function_context, not
19052 hack_decl_function_context.
19053 * tree.c (hack_decl_function_context): Remove.
19054 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19055 DECL_CLASS_CONTEXT.
19056 * typeck2.c (error_not_base_type): Likewise.
19058 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
19060 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19062 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19064 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19066 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
19068 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19070 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
19072 * decl2.c (lang_decode_option): Enable automatic line wrapping.
19074 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
19076 * parse.y (frob_specs): Split out...
19077 (parse_decl): From here.
19078 (fn.def2): Call initial_deferred_type_access_control.
19079 (after_type_component_declarator0): Call frob_specs.
19080 (notype_component_declarator0): Likewise.
19081 * search.c (friend_accessible_p): Nested classes are friends of their
19084 2000-02-10 Mark Mitchell <mark@codesourcery.com>
19086 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19087 used to create an implicit temporary.
19089 * class.c (dfs_modify_vtables): Tweak calculation of functions to
19092 2000-02-08 Nathan Sidwell <nathan@acm.org>
19094 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19095 strip array element qualifiers too.
19097 2000-02-07 Mark Mitchell <mark@codesourcery.com>
19099 * decl.c (store_parm_decls): Don't build cleanups for parameters
19100 while processing_template_decl.
19102 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
19104 * cp-tree.h (struct saved_scope): Add incomplete field.
19105 (namespace_scope_incomplete): New macro.
19106 * decl.c (pushdecl): Use it.
19107 (hack_incomplete_structures): Use it. See through artificial
19109 (mark_saved_scope): Mark it.
19111 Implement access control for nested types.
19112 * search.c (type_access_control): New fn.
19113 (accessible_p): Now we do perform access control for types.
19114 * semantics.c (deferred_type_access_control): New fn.
19115 (initial_deferred_type_access_control): New fn.
19116 (begin_function_definition): Call it. Add lookups parm.
19117 * decl.c (struct binding_level): Add this_class field.
19118 (pushlevel_class): Set it.
19119 (mark_binding_level): Mark it.
19120 (lookup_name_real): Use it. Call type_access_control.
19121 (mark_saved_scope): Mark lookups field.
19122 * cp-tree.h (flagged_type_tree): Add lookups field.
19123 (struct saved_scope): Add lookups field.
19124 (type_lookups): New macro.
19125 * parse.y (declmods): Now <ftype>.
19126 (parse_decl): Add lookups parm. Call
19127 initial_deferred_type_access_control.
19128 (lang_extdef): Clear type_lookups.
19129 (typed_declspecs, declmods, typespec): Set lookups field.
19130 (initdcl): Call deferred_type_access_control.
19131 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19132 component_decl_1, named_parm): Adjust.
19133 * friend.c (is_friend): Nested classes are friends of their
19136 * class.c (currently_open_derived_class): New fn.
19137 * method.c (hack_identifier): Use it.
19139 * lex.c (do_identifier): Remove obsolete code.
19141 * parse.y (typed_typespecs): Propagate new_type_flag properly.
19143 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
19145 * tinfo.h: Remove apostrophes from C++ comment (xgettext
19146 thinks this file is plain C).
19148 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19150 * Makefile.in (call.o): Depend on $(EXPR_H).
19152 * call.c: Include "expr.h".
19154 * class.c (dump_class_hierarchy): Add prototype.
19156 * search.c (dfs_get_pure_virtuals): Likewise.
19158 2000-02-1 Ulrich Drepper <drepper@redhat.com>
19160 * parse.y (simple_stmt): Allow :: token in asm parameter list.
19161 * parse.c: Rebuilt.
19163 2000-01-31 Jim Wilson <wilson@cygnus.com>
19165 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
19166 Store it in DECL_FCONTEXT.
19167 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
19169 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
19171 * tinfo.h (old abi): #include "tconfig.h".
19172 * tinfo.cc (convert_to_base): Move into old abi section.
19174 2000-01-31 Mark Mitchell <mark@codesourcery.com>
19176 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
19177 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
19178 (BINFO_PRIMARY_BINFO): New macro.
19179 (BF_DELTA): Rename to ...
19180 (BV_DELTA): ... this.
19181 (BF_VCALL_INDEX): Rename to ...
19182 (BV_VCALL_INDEX): ... this.
19183 (BF_FN): Rename to ...
19185 * class.c (build_vbase_path): Adjust for changes to reverse_path.
19186 (set_rtti_entry): Rename BF_ macros to BV_ variants.
19187 (modify_vtable_entry): Simplify.
19188 (add_virtual_function): Rename BF_ macros to BV_ variants.
19189 (build_vtable_initializer): Likewise.
19190 (get_class_offset_1): Remove.
19191 (dfs_get_class_offset): Likewise.
19192 (get_class_offset): Likewise.
19193 (dfs_find_final_overrider): New function.
19194 (find_final_overrider): Likewise.
19195 (modify_one_vtable): Remove.
19196 (dfs_find_base): New function.
19197 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
19198 find_final_overrider.
19199 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
19201 (dfs_fixup_vtable_deltas): Remove.
19202 (override_one_vtable): Remove.
19203 (merge_overrides): Likewise.
19204 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
19205 unreal chilren of virtual bases.
19206 (finish_struct_1): Don't use merge_overrides. Don't use
19207 dfs_fixup_vtable_deltas.
19208 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
19211 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
19212 Jason Merrill <jason@yorick.cygnus.com>
19214 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
19216 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
19218 * exception.cc (__throw_bad_typeid): Add missing std::.
19220 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19222 * cp-tree.h (make_thunk): PROTO -> PARAMS.
19224 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
19226 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
19228 Runtime support for new-abi rtti.
19229 * inc/typeinfo (type_info::operator!=): Define in class.
19230 (type_info::before, type_info::name, type_info::operator==,
19231 type_info::operator!=): Define new ABI implementations.
19232 (type_info::is_pointer_p, type_info::is_function_p): Declare
19233 new virtual functions.
19234 (type_info::do_catch, type_info::do_upcast): Likewise.
19236 * tinfo.h (__base_class_info): Define new class.
19237 (__class_type_info): Likewise.
19238 (__si_class_type_info): Likewise.
19239 (__vmi_class_type_info): Likewise.
19240 (__dynamic_cast): Prototype.
19242 * tinfo.cc: Conditionalize old and new rtti mechanisms.
19243 (type_info::is_pointer_p): Define new function.
19244 (type_info::is_function_p): Likewise.
19245 (type_info::do_catch): Likewise.
19246 (type_info::do_upcast): Likewise.
19247 (vtable_prefix): New structure for vtable access.
19248 (adjust_pointer): Define new template function.
19249 (contained_p, public_p, virtual_p, contained_public_p,
19250 contained_nonpublic_p, contained_nonvirtual_p): Define new
19252 (nonvirtual_base_type): New local variable.
19253 (__class_type_info::~__class_type_info): Define.
19254 (__si_class_type_info::~__si_class_type_info): Likewise.
19255 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
19256 (__class_type_info::do_catch): Define new function.
19257 (__class_type_info::do_upcast): Likewise.
19258 (__class_type_info::find_public_src): Likewise.
19259 (__class_type_info::do_find_public_src): Likewise.
19260 (__si_class_type_info::do_find_public_src): Likewise.
19261 (__vmi_class_type_info::do_find_public_src): Likewise.
19262 (__class_type_info::do_dyncast): Likewise.
19263 (__si_class_type_info::do_dyncast): Likewise.
19264 (__vmi_class_type_info::do_dyncast): Likewise.
19265 (__class_type_info::do_upcast): Likewise.
19266 (__si_class_type_info::do_upcast): Likewise.
19267 (__vmi_class_type_info::do_upcast): Likewise.
19268 (__dynamic_cast): Likewise.
19270 * tinfo2.cc (__fundamental_type_info): Define new class.
19271 (__pointer_type_info): Likewise.
19272 (__reference_type_info): Likewise.
19273 (__array_type_info): Likewise.
19274 (__function_type_info): Likewise.
19275 (__enum_type_info): Likewise.
19276 (__ptr_to_member_type_info): Likewise.
19277 (__fundamental_type_info::~__fundamental_type_info): Define.
19278 (__pointer_type_info::~__pointer_type_info): Likewise.
19279 (__reference_type_info::~__reference_type_info): Likewise.
19280 (__array_type_info::~__array_type_info): Likewise.
19281 (__function_type_info::~__function_type_info): Likewise.
19282 (__enum_type_info::~__enum_type_info): Likewise.
19283 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
19284 (__pointer_type_info::do_catch): Define new function.
19285 (__ptr_to_member_type_info::do_catch): Define new function.
19287 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
19288 (__is_pointer): Likewise.
19290 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
19292 2000-01-30 Mark Mitchell <mark@codesourcery.com>
19294 * cp/class.c (build_vtable): Rename to build_primary_vtable.
19295 (prepare_fresh_vtable): Rename to build_secondary_vtable.
19296 (make_new_vtable): New function.
19297 (modify_vtable_entry): Handle generation of new vtables correctly.
19298 (modify_one_vtable): Remove unused parameter.
19299 (dfs_fixup_vtable_deltas): Likewise.
19300 (override_one_vtable): Use build_secondary_vtable.
19301 (finish_struct_1): Use build_primary_vtable and
19302 build_secondary_vtable.
19304 2000-01-28 Ulrich Drepper <drepper@redhat.com>
19306 * cp/decl.c: Adjust variable names, comments, help strings.
19308 2000-01-29 Nathan Sidwell <nathan@acm.org>
19310 * new2.cc (operator delete[]): Use operator delete, don't assume
19313 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
19315 * class.c (build_vtbl_initializer): Add argument to
19316 build_vtable_entry call.
19318 2000-01-27 Mark Mitchell <mark@codesourcery.com>
19320 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
19321 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
19322 (BF_DELTA): New macro.
19323 (BF_VCALL_INDEX): Likewise.
19325 (THUNK_VCALL_OFFSET): Likewise.
19326 (make_thunk): Change prototype.
19327 * class.c (build_vtable_entry): Integrate
19328 build_vtable_entry_for_fn. Handle vcall indices.
19329 (build_vtable_entry_for_fn): Remove.
19330 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
19331 BF_VCALL_INDEX, BF_FN.
19332 (modify_vtable_entry): Integrate common code from
19333 modify_one_vtable and dfs_fixup_vtable_deltas.
19334 (add_virtual_function): Set BF_VCALL_INDEX.
19335 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
19337 (modify_one_vtable): Simplify.
19338 (dfs_fixup_vtable_deltas): Likewise.
19339 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
19340 * method.c (make_thunk): Handle vcall indices.
19342 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
19344 Compiler side new abi rtti (not enabled).
19345 * cp-tree.h (new_abi_rtti_p): New macro.
19346 (emit_support_tinfos): Prototype new function.
19347 (tinfo_decl_p): Likewise.
19348 (emit_tinfo_decl): Likwise.
19349 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
19351 (doing_runtime): New local static.
19352 (init_rtti_processing): Add new-abi initializer.
19353 (get_tinfo_decl): Add new-abi logic.
19354 (tinfo_from_decl): Likewise.
19355 (build_dynamic_cast_1): Likewise.
19356 (qualifier_flags): New static function.
19357 (tinfo_base_init): Likewise.
19358 (generic_initializer): Likewise.
19359 (ptr_ref_initializer): Likewise.
19360 (ptmd_initializer): Likewise.
19361 (class_hint_flags): Likewise.
19362 (class_initializer): Likewise.
19363 (synthesize_tinfo_var): Likewise.
19364 (create_real_tinfo_var): Likewise.
19365 (create_pseudo_type_info): Likewise.
19366 (get_vmi_pseudo_type_info): Likewise.
19367 (create_tinfo_types): Likewise.
19368 (emit_support_tinfos): New global function.
19369 (tinfo_decl_p): New global predicate.
19370 (emit_tinfo_decl): New global function.
19371 * class.c (set_rtti_entry): Generalize for old and new rtti.
19372 (build_vtbl_initializer): Likewise.
19373 * decl2.c (finish_file): Likewise.
19375 2000-01-27 Jim Wilson <wilson@cygnus.com>
19377 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
19378 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
19380 2000-01-27 Mike Stump <mrs@wrs.com>
19382 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
19385 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
19387 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
19389 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
19391 * optimize.c (calls_setjmp_r): Supply new argument
19392 to special_function_p.
19394 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19396 * call.c: PROTO -> PARAMS.
19397 * class.c: Likewise.
19398 * cp-tree.h: Likewise.
19400 * decl.c: Likewise.
19401 * decl.h: Likewise.
19402 * decl2.c: Likewise.
19403 * dump.c: Likewise.
19404 * errfn.c: Likewise.
19405 * error.c: Likewise.
19406 * except.c: Likewise.
19407 * expr.c: Likewise.
19408 * init.c: Likewise.
19409 * input.c: Likewise.
19412 * method.c: Likewise.
19413 * optimize.c: Likewise.
19414 * parse.y: Likewise.
19416 * repo.c: Likewise.
19417 * rtti.c: Likewise.
19418 * search.c: Likewise.
19419 * semantics.c: Likewise.
19420 * spew.c: Likewise.
19421 * tree.c: Likewise.
19422 * typeck.c: Likewise.
19423 * typeck2.c: Likewise.
19424 * xref.c: Likewise.
19426 2000-01-25 Richard Henderson <rth@cygnus.com>
19428 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19430 2000-01-25 Mark Mitchell <mark@codesourcery.com>
19432 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19433 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19434 (struct vcall_offset_data_s): New type.
19435 (dfs_vcall_offset_queue_p): New function.
19436 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19437 (build_vcall_offset_vtbl_entries): Likewise.
19438 (layout_vtable_decl): Likewise.
19439 (num_vfun_entries): Likewise.
19440 (num_extra_vtbl_entries): Add the entries for vcall offsets.
19441 (build_vtbl_initializer): Likewise.
19442 (dfs_finish_vtabls): Use layout_vtable_decl.
19443 (modify_one_vtables): Always duplicate vtables under the new ABI.
19444 (finish_struct_1): Use layout_vtable_decl.
19446 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19448 * decl.c (member_function_or_else): Change third arg from a format
19449 specifier to an `enum overload_flags'. Callers changed.
19451 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
19453 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19454 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19455 build_const_cast, get_delta_difference, check_return_expr): Avoid
19456 ANSI string concatenation usage.
19458 2000-01-24 Mark Mitchell <mark@codesourcery.com>
19460 * class.c (layout_class_type): Put the fields required to make a
19461 class non-empty at the end, not the beginning, of the TYPE_FIELDs
19464 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
19466 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19469 * decl2.c (mark_used): Do instantiate inlines that have been
19470 explicitly instantiated.
19472 2000-01-24 Richard Henderson <rth@cygnus.com>
19474 * call.c (build_over_call): Use expand_tree_builtin.
19475 * typeck.c (build_function_call_real): Likewise.
19476 (build_binary_op_nodefault): Handle unordered compares.
19478 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19480 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19481 cp_tree_index values.
19482 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19483 New global node #defines for them.
19484 * rtti.c (call_void_fn): Replace with ...
19485 (build_runtime_decl): ... new static function.
19486 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19487 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19488 (build_dynamic_cast_1): Always produce correctly typed result.
19489 Explicitly produce type_info addresses. Use dynamic_cast_node.
19490 * exception.cc (__throw_bad_cast): Return `void *'.
19491 (__throw_bad_typeid): Return `const type_info &'.
19493 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19495 * cp-tree.h (get_vtable_decl): Prototype new function.
19496 * class.c (get_vtable_decl): New function. Broken out from ...
19497 (build_vtable): ... here. Use it.
19498 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19499 by get_vtable_decl.
19501 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19503 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19504 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19505 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19506 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19507 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19508 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19509 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19510 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19511 (CPTI_TINFO_VAR_ID): New enumeration.
19512 (__tp_desc_type_node, __access_mode_type_node,
19513 __bltn_desc_type_node, __user_desc_type_node,
19514 __class_desc_type_node, __ptr_desc_type_node,
19515 __attr_desc_type_node, __func_desc_type_node,
19516 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19517 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19518 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19519 enum_desc_type_node, class_desc_type_node,
19520 si_class_desc_type_node, vmi_class_desc_type_node,
19521 ptmd_desc_type_node, base_desc_type_node): New #defines.
19522 (tinfo_fn_id, tinfo_fn_type): Rename to ...
19523 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19524 (tinfo_var_id): New enumeration.
19525 (DECL_TINFO_FN_P): Augment comment.
19526 * decl.c (cp_global_trees): Adjust documentation.
19527 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19528 tinfo_decl_type and tinfo_var_id.
19529 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19530 (build_typeid): Remove unused variable.
19531 (get_tinfo_var): Use tinfo_var_id.
19532 (tinfo_name): New static function.
19533 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19534 (tinfo_from_decl): Likewise.
19535 (get_base_offset): New static function, broken out of
19537 (expand_si_desc): Use tinfo_name.
19538 (expand_class_desc): Likewise. Lose local static variable.
19539 Use base_desc_type_node. Use get_base_offset.
19540 (expand_ptr_desc): Use tinfo_name.
19541 (expand_attr_desc): Likewise.
19542 (expand_generic_desc): Likewise.
19544 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19545 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19547 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19549 * cp-tree.h (__eprintf): Remove declaration.
19550 * tree.c (__eprintf): Remove definition.
19552 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
19553 Mark Mitchell <mark@codesourcery.com>
19555 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19556 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19558 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
19560 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19562 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19564 * cp-tree.h (register_dtor_fn): New function.
19565 * decl.c (destroy_local_static): Rename to ...
19566 (register_dtor_fn): ... this. Give it external linkage.
19567 (expand_static_init): Use it.
19568 * decl2.c (do_static_initialization): Likewise, if using
19570 (do_static_destruction): Check that __cxa_atexit is not in use.
19571 (finish_file): Don't call do_static_destruction if using
19574 * typeck.c (convert_arguments): Restore two-message error
19577 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
19579 Remap dynamic cast hint values to be consistent across ABIs.
19580 * search.c (dynamic_cast_base_recurse): Remap generated value.
19581 (get_dynamic_cast_base_type): Adjust documentation.
19582 * tinfo.h (__user_type_info::dyncast): Likewise.
19583 (__user_type_info::find_public_subobj): Remap BOFF meaning.
19584 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
19585 (__class_type_info::do_dyncast): Likewise.
19586 (__class_type_info::do_find_public_subobj): Likewise.
19587 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
19589 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19591 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
19593 * typeck2.c (incomplete_type_error): Restore previous
19594 cp_error and cp_error_at call sequence.
19596 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
19598 * class.c (dump_class_hierarchy): Make format agree with argument;
19599 cast pointer to unsigned long and print with %lx.
19601 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19603 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
19605 * typeck.c (composite_pointer_type, common_type,
19606 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
19607 build_function_call_real, convert_arguments,
19608 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
19609 build_unary_op, mark_addressable, build_compound_expr,
19610 build_static_cast, build_reinterpret_cast, build_const_cast,
19611 build_c_cast, build_modify_expr, get_delta_difference,
19612 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
19613 'ISO C++'. Fusion consecutive calls to diagnostic message routines
19615 * typeck2.c (readonly_error, abstract_virtuals_error,
19616 process_init_constructor, check_for_new_type): Likewise.
19618 2000-01-19 Mark Mitchell <mark@codesourcery.com>
19620 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
19623 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
19625 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
19626 (build_x_typeid): Likewise.
19627 (get_tinfo_fn): Likewise.
19628 (get_tinfo_fn_unused): Rename to ...
19629 (get_tinfo_decl): ... here.
19630 * rtti.c (build_headof): Replace logic error with assertion.
19631 (get_tinfo_fn_dynamic): Rename to ...
19632 (get_tinfo_decl_dynamic): ... here. Make static. Use
19633 complete_type_or_else.
19634 (build_x_typeid): Move into ...
19635 (build_typeid): ... here. Adjust call to
19636 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
19637 throw_bad_typeid expression.
19638 (get_tinfo_fn_unused): Rename to ...
19639 (get_tinfo_decl): ... here. Adjust comment.
19640 (get_tinfo_fn): Delete.
19641 (tinfo_from_decl): New static function.
19642 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
19643 (get_typeid): Use complete_type_or_else.
19644 (build_dynamic_cast_1): Adjust calls to
19645 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
19646 * parse.y (primary): Adjust call to build_typeid.
19647 * except.c (build_eh_type_type_ref): Adjust call to
19648 get_tinfo_decl. Mark as used.
19649 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
19650 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
19651 * parse.c: Regenerated.
19653 2000-01-17 Mark Mitchell <mark@codesourcery.com>
19655 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
19656 calling convention.
19657 (resolves_to_fixed_type_p): Document calling convention.
19658 * rtti.c (build_x_typeid): Initialize NONNULL.
19660 * cp-tree.h (build_shared_int_cst): New function.
19661 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
19662 * class.c (modify_vtable_entry): Likewise.
19663 (add_virtual_function): Split out code to generated shared
19664 INTEGER_CSTs to build_share_int_cst.
19665 (modify_all_vtables): Handle all the overridden functions here.
19666 Add overridden functions from non-primary virtual bases to the
19668 (finish_struct_1): Adjust call to modify_all_vtables. Add
19669 overridden functions from non-primary bases to the vtable.
19670 * tree.c (build_shared_int_cst): New function.
19672 * cp-tree.h (scratchalloc): Remove.
19673 (build_scratch_list): Likewise.
19674 * call.c (convert_class_to_reference): Replace build_scratch_list
19675 and build_expr_list with build_tree_list.
19676 (add_candidate): Replace scratchalloc with expralloc. Note memory
19678 (build_user_type_conversion_1): Replace build_scratch_list
19679 and build_expr_list with build_tree_list.
19680 (build_new_op): Likewise.
19681 (build_op_delete_call): Likewise.
19682 (convert_like): Likewise.
19683 * cvt.c (ocp_convert): Likewise.
19684 * decl.c (start_decl): Likewise.
19685 (start_function): Likewise.
19686 (finish_destructor_body): Likewise.
19687 (maybe_build_cleanup_1): Likewise.
19688 * decl2.c (reparse_decl_as_expr): Likewise.
19689 * init.c (perform_member_init): Likewise.
19690 (expand_cleanup_for_base): Likewise.
19691 (build_builtin_delete_call): Likewise.
19692 (build_new_1): Likewise.
19693 (build_delete): Likewise.
19694 * method.c (do_build_assign_ref): Likewise.
19695 * parse.y (already_scoped_stmt): Likewise.
19696 (nontrivial_exprlist): Likewise.
19697 (net_initializer): Likewise.
19698 (initlist): Likewise.
19699 * parse.c: Regenerated.
19700 * rtti.c (build_x_typeid): Likewise.
19701 (build_dynamic_cast_1): Likewise.
19702 * typeck.c (build_x_compound_expr): Likewise.
19703 (build_static_cast): Likewise.
19704 (build_modify_expr): Likewise.
19706 * cp-tree.h (DECL_VINDEX): Add documentation.
19707 * class.c (build_vtable_entry): Likewise.
19708 (start_vtable): Add comment.
19709 (add_virtual_function): Replace pending_hard_virtuals with
19710 overridden_virtuals and pending_virtuals with new_virtuals.
19711 Replace redundant assignments with assertions.
19712 (check_for_override): Add comment.
19713 (check_bases_and_members): Replace pending_hard_virtuals with
19714 overridden_virtuals and pending_virtuals with new_virtuals.
19715 (create_vtbl_ptr): Likewise.
19716 (layout_class_type): Likewise.
19717 (finish_struct_1): Likewise. Add comments.
19719 2000-01-16 Mark Mitchell <mark@codesourcery.com>
19721 * class.c (finish_struct_1): Replace redundant code with
19724 * cp-tree.h (flag_new_abi): Move.
19725 (flag_use_cxa_atexit): Likewise.
19726 (flag_honor_std): Likewise.
19727 (flag_rtti): Likewise.
19728 (vbase_offsets_in_vtable_p): Define.
19729 (vptrs_present_everywhere_p): Likewise.
19730 (TYPE_CONTAINS_VPTR_P): Likewise.
19731 (dfs_walk_real): Declare.
19732 * class.c (build_vbase_pointer_fields): Check
19733 vbase_offsets_in_vtable_p.
19734 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
19736 (build_vbase_offset_vtbl_entries): Simplify.
19737 (build_vbase_offset_vtbl_entries): Adjust.
19738 (build_vbase_pointer): Add ability to look up vbase offsets in
19740 (start_vtable): New function.
19741 (add_virtual_function): Use it.
19742 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
19743 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
19744 (build_vtbl_initializer): Take the type of the complete object as
19745 input. Use it to correctly calculate vbase offsets.
19746 (dfs_finish_vtbls): Pass the complete type to
19747 build_vtbl_initializer.
19748 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
19749 (create_vtable_ptr): Create a vtable even if there are no
19750 new virtual functions, under the new ABI.
19751 (finish_struct_1): Likewise.
19752 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
19753 * decl.c (exapnd_static_init): Remove call to
19754 preserve_initializer.
19755 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
19757 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
19758 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
19759 (construct_virtual_bases): Don't initialize virtual base pointers
19761 (build_aggr_init): Clean up comment.
19762 (expand_aggr_init_1): Likewise.
19763 * rtti.c (expand_class_desc): Store the virtual function table
19764 index where the vbase offset lives in the offset field.
19765 * search.c (dfs_walk_real): Make it global.
19766 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
19767 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
19769 * tinfo.h (USItype): Make it signed under the new ABI.
19770 * tinfo.cc (convert_to_base): New function. Encapsulate base
19771 conversion logic here.
19772 (__class_type_info::do_upcast): Use it.
19773 (__class_type_info::do_dyncast): Likewise.
19774 (__class_type_info::do_find_public_subobj): Likewise.
19776 * init.c (construct_virtual_bases): Don't look up the addresses of
19777 virtual bases at run-time.
19779 * class.c (build_vbase_pointer): Relocate.
19780 (build_vbase_pointer_fields): Likewise.
19781 (dfs_build_vbase_offset_vtbl_entries): Likewise.
19782 (build_vbase_offset_vtbl_entries): Likewise.
19784 * decl.c (init_decl_processing): Complain if -fnew-abi
19785 -fno-vtable-thunks is used.
19787 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
19790 2000-01-15 Mark Mitchell <mark@codesourcery.com>
19792 * cp-tree.h (num_extra_vtbl_entries): New function.
19793 (size_extra_vtbl_entries): Likewise.
19794 (dfs_vtable_path_unmark): Likewise.
19795 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
19796 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19797 * class.c (num_extra_vtbl_entries): New function.
19798 (size_extra_vtbl_entries): Likewise.
19799 (dfs_build_vbase_offset_vtbl_entries): New function.
19800 (build_vbase_offset_vtbl_entries): Likewise.
19801 (build_vtbl_initializer): Use it.
19802 (finish_struct_1): Adjust vtable sizes (using
19803 num_extra_vtbl_entries).
19804 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
19805 THUNK_DECL is non-NULL before expanding it.
19806 * init.c (expand_virtual_init): Adjust the vtable pointer by
19807 size_extra_vtbl_entries before storing it.
19808 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
19809 Handle TREE_LIST parameters here, not in the dfs_* functions.
19810 (dfs_unmarked_real_bases_queue_p): Adjust.
19811 (dfs_marked_real_bases_queue_p): Likewise.
19812 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
19813 (dfs_vtable_path_marked_real_bases_queue_p): New function.
19814 (dfs_vtable_path_unmark): Likewise.
19816 2000-01-14 Mark Mitchell <mark@codesourcery.com>
19818 * optimize.c (copy_body_r): Clear the operand three of a
19819 TARGET_EXPR when copying it.
19821 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19823 * method.c (build_decl_overload_real): Check whether we are in ::
19824 before returning __builtin_new/delete.
19826 2000-01-13 Mark Mitchell <mark@codesourcery.com>
19828 * pt.c (tsubst_friend_function): Improve comment.
19829 (instantiate_decl): Avoid crashing when a "nested" function is
19830 instantiated from the top level.
19832 * dump.c (dqeueue_and_dump): Dump
19833 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
19835 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19837 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
19839 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
19841 * g++spec.c (lang_specific_driver): Add -fnew-abi if
19842 ENABLE_NEW_GXX_ABI defined.
19843 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
19844 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
19845 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
19847 2000-01-12 Mark Mitchell <mark@codesourcery.com>
19849 * decl.c (start_cleanup_fn): Call pushdecl.
19851 * call.c (convert_class_to_reference): Fix typos.
19852 (build_conditional_expr): Handle errors gracefully.
19853 * class.c (push_nested_class): Likewise.
19854 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
19855 (DECL_THIS_EXTERN): Use it.
19856 (DECL_THIS_STATIC): Likewise.
19857 * cvt.c (convert_to_void): Handle errors gracefully.
19858 (build_expr_type_conversion): Likewise.
19859 * decl.c (maybe_push_decl): Likewise.
19860 (start_decl_1): Likewise.
19861 (require_complete_types_for_parms): Likewise.
19862 * parse.y (structsp): Likewise.
19863 (base_class): Likewise.
19864 * parse.c: Regenerated.
19865 * pt.c (finish_member_template_decl): Likewise.
19866 * typeck.c (decay_conversion): Likewise.
19868 * cp-tree.h (dfs_skip_vbases): New function.
19869 (find_vbase_instance): Likewise.
19870 * class.c (determine_primary_base): Allow a nearly empty base to
19871 serve as a primary base class under the new ABI.
19872 (get_class_offset_1): Rename to ...
19873 (dfs_get_class_offset): ... this. Simplify. Don't issue error
19875 (get_class_offset): Use it. Issue error messages here.
19876 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
19877 find the right copies of virtual bases.
19878 (fixup_vtable_deltas1): Rename to ...
19879 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
19880 bases as primary bases.
19881 (fixup_vtable_deltas): Remove.
19882 (override_one_vtable): Handle virtual bases as primary bases.
19883 (merge_overrides): Likewise.
19884 (finish_struct_1): Likewise.
19885 (dump_class_hierarchy): Dump primary-ness of bases as well.
19886 * search.c (mark_primary_bases): Use a pre-order traversal to
19887 handle primary virtual bases.
19888 (dfs_skip_vbases): New fiunction.
19889 (expand_upcast_fixups): Adjust to handle primary virtual bases.
19890 (fixup_virtual_upcast_offsets): Likewise.
19891 (fixup_all_virtual_upcast_offsets): Likewise.
19892 (dfs_find_vbase_instances): New function.
19893 (find_vbase_instance): Likewise.
19895 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
19897 * lex.c (DIR_SEPARATOR): Delete macro.
19899 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
19901 * decl2.c (lang_decode_option): Handle automatic line wrapping
19904 2000-01-11 Mark Mitchell <mark@codesourcery.com>
19906 * friend.c (do_friend): Don't resolve scopes when processing
19907 template declarations, even if the qualifying scope doesn't
19908 involve template parameters.
19910 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
19912 * class.c (dfs_modify_vtables_queue_p): Remove.
19913 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
19914 and dfs_marked_real_bases_queue_p instead of
19915 dfs_modify_vtables_queue_p.
19917 * class.c (build_vbase_path): Simplify.
19918 (dfs_propagate_binfo_offsets): New function.
19919 (propagate_binfo_offsets): Use it.
19920 (remove_base_field): Simplify.
19921 (dfs_set_offset_for_vbases): Remove.
19922 (dfs_set_offset_for_shared_vbases): New function.
19923 (dfs_set_offset_for_unshared_vbases): Likewise.
19924 (layout_virtual_bases): Use them.
19925 (layout_basetypes): Don't call propagate_binfo_offsets.
19926 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
19929 * class.c (build_base_field): New function, split out from ...
19930 (build_base_fields): ... here. Use it. Allocate primary bases
19931 first, under the new ABI.
19932 (get_vtable_entry): Remove.
19933 (remove_base_field): New function, split out from ...
19934 (remove_base_fields): ... here. Adjust since primary bases come
19935 first under the new ABI.
19937 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
19938 (initialize_vtbl_ptrs): New function.
19939 (expand_indirect_vtbls_init): Change prototype.
19940 (convert_pointer_to_vbase): Declare.
19941 * init.c (expand_direct_vtbls_init): Remove.
19942 (dfs_initialize_vtbl_ptrs): New function.
19943 (initialize_vtbl_ptrs): Likewise.
19944 (emit_base_init): Use initialize_vtbl_ptrs.
19945 * search.c (convert_pointer_to_vbase): Make it global.
19946 (expand_indirect_vtbls_init): Remove vtable initialization code.
19947 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
19949 * class.c (dfs_finish_vtbls): New function.
19950 (finish_vtbls): Use it.
19951 (dump_class_hierarchy): New function.
19953 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
19954 (BINFO_VBASE_PRIMARY_P): New macro.
19955 (BINFO_VIRTUALS): Add to documentation.
19956 (SET_BINFO_PRIMARY_MARKED_P): Remove.
19957 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19958 (dfs_mark_primary_bases_queue_p): Likewise.
19959 (dfs_unmarked_real_bases_queue_p): New function.
19960 (dfs_marked_real_bases_queue_p): Likewise.
19961 * search.c (dfs_mark_primary_bases): Adjust.
19962 (mark_primary_bases): Likewise.
19963 (get_shared_vbase_if_not_primary): New function.
19964 (dfs_unmarked_real_bases_queue_p): Likewise.
19965 (dfs_marked_real_bases_queue_p): Likewise.
19966 (dfs_get_pure_virtuals): Simplify.
19967 (get_pure_virtuals): Likewise.
19969 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19971 * lex.c: Include tm_p.h.
19973 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
19975 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
19977 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
19979 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
19980 * pt.c (instantiate_decl): Defer comdat templates that might not be
19983 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
19984 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
19985 (finish_file): Likewise.
19987 * decl2.c (import_export_class): Undo 12/14 change.
19989 * error.c (dump_decl): operator new, not operatornew.
19991 * class.c (field_decl_cmp): A nontype is "greater" than a type.
19992 * search.c (lookup_field_1): Look for the last field with the
19995 2000-01-05 Nathan Sidwell <nathan@acm.org>
19997 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20000 2000-01-05 Nathan Sidwell <nathan@acm.org>
20002 * typeck.c (build_static_cast): Don't strip target qualifiers
20003 when casting from a class.
20005 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20007 * class.c (warn_hidden): Initialize variable `fndecl'.
20009 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
20011 * decl.c (flag_isoc9x): New variable to be able to use code in
20012 c-common.c. For now always zero.
20014 2000-01-03 Mark Mitchell <mark@codesourcery.com>
20016 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20017 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20018 or unshare_base_binfos for virtual bases here.
20019 * search.c (dfs_get_vbase_types): Do it here.
20020 (get_vbase_types): Adjust.
20022 2000-01-02 Mark Mitchell <mark@codesourcery.com>
20024 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20025 (BINFO_PRIMARY_MARKED_P): Use flag 5.
20026 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20027 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20028 (unmark_primary_bases): Remove declaration.
20029 (unmarkedp): Declare.
20030 (dfs_vbase_unmark): Likewise.
20031 * class.c (determine_primary_base): Return immediately if there
20032 are no base classes. Call mark_primary_bases here.
20033 (modify_all_direct_vtables): Remove.
20034 (modify_all_indirect_vtables): Remove.
20035 (dfs_modify_vtables_queue_p): New function.
20036 (dfs_modify_vtables): New function.
20037 (modify_all_vtables): Use them.
20038 (build_base_fields): Build FIELD_DECLs for primary virtual base
20040 (create_vtable_ptr): Don't call determine_primary_base here.
20041 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20042 (dfs_set_offset_for_vbases): ... this.
20043 (layout_virtual_bases): Use it.
20044 (layout_class_type): Call determine_primary_base here.
20045 * search.c (unmarkedp): Make it global.
20046 (shared_marked_p): Simplify.
20047 (shared_unmarked_p): Likewise.
20048 (dfs_primary_bases_queue_p): Remove.
20049 (dfs_unmark_primary_bases): Likewise.
20050 (unmark_primary_bases): Likewise.
20051 (mark_primary_bases): Simplify.
20052 (get_pure_virtuals): Don't call mark_primary_bases here.
20053 (dfs_vbase_unmark): New function.
20054 (get_vbase_types): Simplify.
20056 * class.c (struct base_info): Remove.
20057 (determine_primary_base): Take has_virtual_p rather than a
20058 base_info as input. Don't calculate max_has_virtual.
20059 (finish_struct_bits): Remove max_has_virtual argument.
20060 (create_vtable_ptr): Remove max_has_virtual_p argument.
20061 (layout_virtual_bases): Remove max argument.
20062 (layout_basetypes): Likewise.
20063 (layout_class_type): Remove max_has_virtual_p argument.
20064 (finish_struct_1): Remove max_has_virtual.
20066 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20067 (layout_basetypes): Remove.
20068 * class.c (propagate_binfo_offsets): Moved here from tree.c.
20069 Update to handle primary virtual bases.
20070 (remove_base_fields): New function, split out from
20072 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20073 (layout_virtual_bases): New function, split out from
20074 layout_basetypes. Update to handle primary virtual bases.
20075 (layout_basetypes): Moved here from tree.c. Use
20076 remove_base_fields and layout_virtual_bases.
20077 * search.c (dfs_mark_primary_bases_queue_p): New function.
20078 (mark_primary_bases): Use it.
20079 * tree.c (CEIL): Remove.
20080 (propagate_binfo_offsets): Remove.
20081 (layout_basetypes): Remove.
20083 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20085 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20086 (BINFO_PRIMARY_MARKED_P): New macro.
20087 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20088 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20089 (mark_primary_bases): New function.
20090 (unmark_primary_bases): Likewise.
20091 * search.c (get_abstract_virtuals_1): Remove.
20092 (dfs_mark_primary_bases): New function.
20093 (mark_primary_bases): Likewise.
20094 (dfs_unmark_primary_bases): Likewise.
20095 (unmark_primary_bases): Likewise.
20096 (dfs_get_pure_virtuals): Likewise.
20098 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20100 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20101 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20102 (modify_one_vtable): Adjust.
20103 (fixup_vtable_deltas1): Likewise.
20104 (override_one_vtable): Likewise.
20105 * search.c (get_abstract_virtuals_1): Likewise.
20106 (get_pure_virtuals): Likewise.
20107 (expand_upcast_fixups): Likewise.
20108 * tree.c (debug_binfo): Likewise.
20110 * class.c (build_vtable): Don't return a value. Don't rebuild
20111 vtables for bases that have already been handled.
20112 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20113 already been handled.
20114 (modify_one_vtable): Adjust accordingly.
20115 (fixup_vtable_deltas1): Likewise.
20116 (finish_struct_1): Likewise.
20118 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20120 * call.c (build_new_method_call): Also check destructors.