1 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
3 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
4 (finish_compound_stmt): Remove no scope arg.
5 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
6 end_compound_stmt calls.
7 (expand_static_init, begin_destructor_body, begin_function_body,
8 finish_function_body): Likewise.
9 * decl2.c (start_objects, finish_objects,
10 start_static_storage_duration_function,
11 finish_static_storage_duration_function): Likewise.
12 * init.c (begin_init_stmts, finish_init_stmts,
13 construct_virtual_base, build_vec_init): Likewise.
14 * method.c (do_build_assign_ref, synthesize_method): Likewise.
15 * parser.c (cp_parser_compound_statement,
16 cp_parser_implicitly_scoped_statement,
17 cp_parser_already_scoped_statement): Likewise.
18 * pt.c (tsubst_expr): Likewise.
19 * semantics.c (begin_compound_stmt): No scope arg is a bool.
20 (finish_compound_stmt): Remove no scope arg.
22 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
25 2003-07-27 Mark Mitchell <mark@codesourcery.com>
27 * call.c (standard_conversion): Tweak handling of
28 pointer-to-member types.
29 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
30 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
31 pointer-to-data member types.
33 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
35 * parser.c (cp_parser_type_parameter): Reformat.
36 (cp_parser_parameter_declaration): Deprecate default args where
39 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
43 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
44 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
45 * init.c (begin_init_stmts): Make static. Return is_global
46 value. Always call begin_stmt_expr.
47 (finish_init_stmts): Make static. Add is_global parm. Always
49 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
50 (build_vec_init): Likewise. Always building a stmt tree.
51 (expand_default_init): Always building a stmt tree.
52 (get_temp_regvar): Likewise.
53 * semantics.c (begin_global_stmt_expr,
54 finish_global_stmt_expr): Remove.
56 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
58 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
59 (build_x_compound_expr_from_list): Declare.
60 * typeck.c (build_x_compound_expr_from_list): New.
61 (build_x_compound_expr): Adjust.
62 (build_compound_expr): Remove unreachable code. Take two
64 * decl.c (grok_reference_init): Use
65 build_x_compound_expr_from_list.
66 (expand_static_init): Adjust build_compound_expr call.
67 (cxx_maybe_build_cleanup): Likewise.
68 * init.c (perform_member_init): Use
69 build_x_compound_expr_from_list.
70 (build_new_1): Likewise.
71 (build_vec_delete): Adjust build_compound_expr calls.
72 (build_vbase_delete): Likewise.
73 * typeck2.c (store_init_value): Use
74 build_x_compound_expr_from_list.
75 (build_functional_cast): Likewise.
77 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
79 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
80 * decl.c (make_typename_type): Pass it.
81 * pt.c (lookup_template_class): Use it.
82 (resolve_typename_type): Pass it.
83 * semantics.c (finish_template_type): Pass it.
85 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
88 * cp-tree.h (qualified_name_lookup_error): Declare.
89 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
91 (tsubst_expr) <DECL_STMT case>: Likewise.
92 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
93 * semantics.c (qualified_name_lookup_error): New, broken out of ...
94 (finish_id_expression): ... here. Use it.
96 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
98 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
100 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
103 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
104 (tsubst_template_arg): New.
105 (tsubst_template_arg_vector): Rename to ...
106 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
108 (coerce_template_parms): Use tsubst_template_arg for default
110 (tsubst_template_parms): Likewise.
111 (tsubst_aggr_type): Adjust.
112 (tsubst_decl): Likewise.
113 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
114 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
116 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
118 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
119 * error.c: Use the new pretty-printer framework.
121 2003-07-24 Per Bothner <pbothner@apple.com>
123 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
124 which causes errors messages to incorrectly mention included files.
126 2003-07-24 Mark Mitchell <mark@codesourcery.com>
128 * cp-tree.h (convert_to_base_statically): Declare.
129 * call.c (build_special_member_call): Convert INSTANCE to the base
131 * class.c (convert_to_base_statically): New method.
132 * init.c (construct_virtual_base): Use it.
133 * method.c (do_build_assign_ref): Fix typo in comment.
135 2003-07-24 Jason Merrill <jason@redhat.com>
137 * decl.c: Just set truthvalue_* to boolean_*.
139 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
141 * decl.c (reshape_init): Remove unreachable code.
143 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
146 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
148 2003-07-23 Mark Mitchell <mark@codesourcery.com>
151 * cp-tree.h (accessible_base_p): Declare.
152 * call.c (build_over_call): Use it.
153 * search.c (accessible_base_p): New function, split out from ...
154 (lookup_base): ... here.
157 * call.c (build_conditional_expr): Use perform_implicit_conversion
158 and error_operand_p. Robustify.
159 * typeck.c (build_unary_op): Use perform_implicit_conversion.
161 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
164 * parser.c (cp_parser_nested_name_specifier): Reset scope on
166 (cp_parser_elaborated_type_specifier): Likewise.
168 2003-07-22 Mark Mitchell <mark@codesourcery.com>
170 Eliminate use of POINTER_TYPE for pointers-to-members.
171 * call.c (standard_conversion): Rework pointer-to-member handling.
173 (add_builtin_candidate): Likewise.
174 (resolve_scoped_fn_name): Remove.
175 (build_conditional_expr): Rework pointer-to-member handling.
176 (compare_ics): Likewise.
177 * class.c (check_field_decls): Use TYPE_PTR_P.
178 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
180 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
181 (TYPE_PTRMEM_P): Add comment.
182 (TYPE_PTR_P): Simplify.
183 (TYPE_PTROB_P): Correct definition.
184 (TYPE_PTR_TO_MEMBER_P): New macro.
185 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
186 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
187 (resolved_scoped_fn_name): Remove declaration.
188 (build_offset_ref): Change prototype.
189 (resolve_offset_ref): Remove.
190 (comp_target_types): Remove.
191 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
193 (convert_to_reference): Use can_convert.
194 (ocp_convert): Improve error handling. Rework pointer-to-member
196 (perform_qualification_conversions): Rework pointer-to-member
198 * decl.c (build_ptrmem_type): Handle functions too.
199 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
200 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
201 (grokparms): Remove OFFSET_TYPE error message.
202 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
203 * error.c (dump_type_prefix): Likewise.
204 * expr.c (cplus_expand_constant): Use build_nop.
205 * init.c (build_offset_ref): Add address_p parameter. Fold in
206 necessary bits from resolve_offset_ref.
207 (resolve_offset_ref): Remove.
208 * parser.c (cp_parser_postfix_expression): Remove special case
209 code for OFFSET_TYPE.
210 * pt.c (convert_nontype_argument): Rework pointer-to-member
212 (convert_template_argument): Likewise.
214 (invalid_nontype_parm_type_p): Likewise.
215 (dependent_type_p_r): Likewise.
216 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
217 (target_incomplete_p_): Rework pointer-to-member
219 (get_pseudo_ti_init): Likewise.
220 (get_pseudo_ti_desc): Likewise.
221 * semantics.c (finish_qualified_id_expr): Adjust call to
222 build_offset_ref. Remove use of resolve_offset_ref.
223 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
224 * typeck.c (target_type): Use TYPE_PTRMEM_P.
225 (type_unknown_p): Remove obsolete code about the time before
226 non-dependent expressions were handled correctly.
227 (qualify_type_recursive): Remove.
228 (composite_pointer_type_r): New function.
229 (composite_pointer_type): Use it.
230 (merge_types): Remove dead comments.
231 (comp_cv_target_types): Remove.
232 (comp_target_types): Likewise.
233 (comp_target_parms): Likewise.
234 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
235 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
236 (build_binary_op): Do not use of comp_target_types.
237 (pointer_diff): Remove OFFSET_TYPE case.
238 (build_unary_op): Adjust pointer-to-member handling.
239 (unary_complex_lvalue): Likewise.
240 (check_for_casting_away_constness): Add description parameter.
241 (build_static_cast): Pass it.
242 (build_reinterpret_cast): Use check_for_casting_away_constness.
243 (build_const_cast): Adjust pointer-to-member handling.
244 (build_c_cast): Likewise.
245 (convert_for_assignment): Remove OFFSET_TYPE error message.
246 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
247 (comp_ptr_ttypes_reinterpret): Remove.
248 (casts_away_constness_r): Adjust pointer-to-member handling.
249 (casts_away_constness): Liekwise.
250 (strip_all_pointer_quals): Remove.
251 * typeck2.c (digest_init): Adjust pointer-to-member handling.
252 (build_m_component_ref): Likewise.
254 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
256 * lex.c (unqualified_fn_lookup_error): Mention that the error
257 message needs to be kept in synch with the manual.
259 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
262 * decl.c (grokdeclarator): An array member is only a flexible
263 array member if the field itself is the array.
265 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
268 * decl.c (xref_basetypes): Handle error_mark_node.
270 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
272 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
273 * tree.c (lvalue_p_1): Set it.
274 * class.c (check_field): Don't allow non-packed non-POD fields to
276 * call.c (reference_binding): Need a temporary for all bitfield
278 (convert_like_real): Check it is ok to make a temporary here.
280 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
282 * cp-tree.h (hack_identifier): Remove.
283 * method.c (hack_identifier): Remove.
284 * semantics.c (finish_id_expression): Expand hack_identifier
287 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
289 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
290 semantics.c typeck.c: Remove unnecessary casts.
292 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
294 * cp-tree.h (hack_identifier): Remove.
295 * method.c (hack_identifier): Remove.
296 * semantics.c (finish_id_expression): Expand hack_identifier
299 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
301 * cp-tree.h (finish_non_static_data_member): Add object param.
302 * method.c (hack_identifier): Adjust.
303 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
304 again for a FIELD_DECL.
305 * semantics.c (finish_non_static_data_member): Add object
306 parameter. Always save the DECL in the COMPONENT_REF.
307 * call.c (resolve_scoped_fn_name): Adjust.
309 2003-07-17 Zack Weinberg <zack@codesourcery.com>
311 * pt.c (get_bindings): Make definition consistent with
314 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
317 * friend.c (add_friend): Check access for member functions
320 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
323 * typeck.c (build_class_member_access_expr): Improve diagnostic.
325 2003-07-16 Mark Mitchell <mark@codesourcery.com>
328 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
330 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
331 * decl.c (duplicate_decls): Merge
332 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
333 * parser.c (cp_parser_postfix_expression): Adjust call to
334 cp_parser_initializer_list and
335 cp_parser_parenthesized_expression_list.
336 (cp_parser_parenthesized_expression_list): Add non_constant_p.
337 (cp_parser_new_placement): Adjust call to
338 cp_parser_parenthesized_expression_list.
339 (cp_parser_direct_new_declarator): Likewise.
340 (cp_parser_conditional_expression): Remove.
341 (cp_parser_constant_expression): Parse an assignment-expression,
342 not a conditional-expression.
343 (cp_parser_simple_declaration): Resolve expression/declaration
344 ambiguity more quickly.
345 (cp_parser_mem_initializer): Adjust call to
346 cp_parser_parenthesized_expression_list.
347 (cp_parser_init_declarator): Keep track of whether or not the
348 initializer is a constant-expression.
349 (cp_parser_initializer): Add non_constant_p parameter.
350 (cp_parser_initializer_clause): Likewise.
351 (cp_parser_initializer_list): Likewise.
352 (cp_parser_attribute_list): Adjust call to
353 cp_parser_parenthesized_expression_list.
354 (cp_parser_functional_cast): Likewise.
355 * pt.c (tsubst_decl): Copy
356 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
357 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
358 * semantics.c (finish_id_expression): Use
359 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
361 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
363 * lang-options.h: Remove.
365 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
368 * class.c (field_decl_cmp): Remove.
369 (resort_field_decl_cmp): Remove.
370 (resort_sorted_fields): Remove.
371 (add_fields_to_vec): Rename to ...
372 (add_fields_to_record_type): this.
373 (finish_struct_1): Change to be using
374 sorted_fields_type's fields.
375 * cp-tree.h (lang_decl): In lang_decl_u3
376 change sorted_fields to be a pointer to
378 (resort_sorted_fields): Remove prototype.
379 * search.c (lookup_field_1): Change to be using
380 sorted_fields_type's fields.
382 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
385 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
386 is a member of other class.
387 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
388 is a specialization of function template.
390 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
393 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
396 2003-07-15 Mark Mitchell <mark@codesourcery.com>
398 * cp-tree.def (LOOKUP_EXPR): Remove.
399 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
400 (LOOKUP_EXPR_GLOBAL): Remove.
401 (get_bindings): Remove.
402 (is_aggr_type_2): Remove.
403 * call.c (resolved_scoped_fn_name): Remove support for
405 * decl.c (grokfndecl): Likewise.
406 (grokdeclarator): Likewise.
407 * error.c (dump_decl): Likewise.
408 (dump_expr): Likewise.
409 * friend.c (do_friend): Likewise.
410 * init.c (build_offset_ref): Likewise.
411 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
413 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
414 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
416 * pt.c (get_bindings): Give it internal linkage.
417 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
418 (lookup_template_function): Likewise.
419 (for_each_tempalte_parm_r): Likewise.
420 (tsubst_decl): Likewise.
421 (tsubst_qualified_id): Handle template template parameters.
422 (tsubst_copy): Remove support for LOOKUP_EXPR.
423 (tsubst_copy_and_build): Likewise.
424 (most_general_template): Likewise.
425 (value_dependent_expression_p): Likewise.
426 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
428 * semantics.c (perform_koenig_lookup): Do not create
430 (finish_fname): Likewise.
431 (finish_id_expression): Likewise.
432 * tree.c (is_aggr_type_2): Remove.
434 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
437 * typeck.c (check_return_expr): Fix thinko in diagnostic.
439 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
442 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
445 2003-07-14 Mark Mitchell <mark@codesourcery.com>
448 * pt.c (dependent_scope_ref_p): New function.
449 (value_dependent_expression_p): Use it.
450 (type_dependent_expression_p): Likewise.
452 * pt.c (tsubst_friend_function): Use reregister_specialization.
455 * cp-tree.h (lookup_qualified_name): Adjust prototype.
456 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
457 call to is_aggr_type.
458 * parser.c (cp_parser_lookup_name): Adjust call to
459 lookup_qualified_name.
460 * pt.c (tsubst_qualified_id): Likewise.
461 (tsubst_copy_and_build): Likewise.
462 * semantics.c (finish_qualified_id_expr): Deal with erroneous
465 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
468 * call.c (op_error): Properly format REALPART_EXPR and
470 * error.c (dump_expr): Likewise.
472 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
474 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
476 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
479 * call.c (initialize_reference): Improve diagnostic.
481 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
484 * pt.c (more_specialized_class): Add full_args parameter.
485 (most_specialized_class): Adjust calls to more_specialized_class.
486 * cp-tree.h (more_specialized_class): Adjust declaration.
488 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
490 * lex.c (enum tree_node_kind): Delete.
492 2003-07-13 Mark Mitchell <mark@codesourcery.com>
495 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
496 (SET_DECL_SELF_REFERENCE_P): Likewise.
497 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
498 * pt.c (tsubst_decl): Copy it.
499 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
501 * pt.c (reregister_specialization): Fix thinko in previous change.
503 * cp-tree.h (cp_id_kind): New type.
504 (unqualified_name_lookup_error): Change prototype.
505 (unqualified_fn_lookup_error): New function.
506 (do_identifier): Remove.
507 (do_scoped_id): Likewise.
508 (tsubst_copy_and_build): Change prototype.
509 (reregister_specialization): New function.
510 (perform_koenig_lookup): Likewise.
511 (finish_id_expression): Likewise.
512 * call.c (build_method_call): Adjust call to
513 unqualified_name_lookup_error.
514 * decl.c (duplicate_decls): Use reregister_specialization.
515 * lex.c (is_global): Remove.
516 (unqualified_name_lookup_error): Return a value.
517 (do_identifier): Remove.
518 (do_scoped_id): Likewise.
519 (identifier_typedecl_value): Remove.
520 (unqualified_fn_lookup_error): New function.
521 * parser.c (cp_parser_id_kind): Remove.
522 (cp_parser_non_constant_id_expression): Remove.
523 (cp_parser_primary_expression): Use finish_id_expression.
524 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
526 (cp_parser_postfix_expression): Use perform_koenig_lookup.
527 (cp_parser_template_argument): Use cp_id_kind.
528 (cp_parser_fold_non_dependent_expr): Adjust call to
529 tsubst_copy_and_build.
530 * pt.c (unregister_specialization): Rename to ...
531 (reregister_specialization): This.
532 (tsubst_friend_function): Use it.
533 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
534 (tsubst_qualified_id): Likewise.
535 (tsubst_expr): Likewise.
536 (tsubst_copy_and_build): Add function_p parameter. Use
537 finish_id_expression. Introduce RECUR macro.
538 (tsubst_non_call_postfix_expression): New function.
539 (regenerate_decl_from_template): Use reregister_specialization.
540 * semantics.c (perform_koenig_lookup): New function.
541 (finish_id_expression): Likewise.
543 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
545 * pt.c (push_access_scope_real): Remove.
546 (push_access_scope): Move code from push_access_scope_real.
547 (pop_access_scope): Don't check for TEMPLATE_DECL.
548 (instantiate_template): Defer access checking during template
550 (regenerate_decl_from_template): Tidy.
552 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
555 * operators.def: Add definitions for __imag__, __real__.
557 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
560 * parser.c (cp_parser_expression_list): Rename to ...
561 (cp_parser_parenthesized_expression_list): ... here. Add attribute
562 parameter, parse the surounding parentheses.
563 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
564 parameters. Return int.
565 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
566 (cp_parser_postfix_expression): Adjust function call parsing.
567 (cp_parser_new_placement): Adjust.
568 (cp_parser_new_initializer): Likewise.
569 (cp_parser_cast_expression): Likewise.
570 (cp_parser_selection_statement): Likewise.
571 (cp_parser_mem_initializer): Likewise.
572 (cp_parser_asm_definition): Likewise.
573 (cp_parser_init_declarator): Likewise.
574 (cp_parser_declarator): Make
575 cdtor_or_conv_p an int ptr.
576 (cp_parser_direct_declarator): Likewise. Check for a parameter
577 list on cdtors & conv functions.
578 (cp_parser_initializer): Adjust.
579 (cp_parser_member_declaration): Adjust.
580 (cp_parser_attribute_list): Move code into
581 cp_parser_parens_expression_list.
582 (cp_parser_functional_cast): Adjust.
583 * pt.c (type_dependent_expression_p): Erroneous expressions are
586 2003-07-11 Geoffrey Keating <geoffk@apple.com>
588 * decl.c (cp_finish_decl): Handle 'used' attribute.
590 * cp-lang.c (c_reset_state): New dummy routine.
591 * cp-tree.h (finish_file): Move prototype to c-common.h.
592 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
594 2003-07-11 Mark Mitchell <mark@codesourcery.com>
597 * pt.c (tsubst_qualified_id): Implement suggested resolution for
599 (type_dependent_expression_p): Likewise.
601 2003-07-10 Mark Mitchell <mark@codesourcery.com>
603 * typeck.c (build_binary_op): Do not warn about signed
604 vs. unsigned comparisons in the bodies of templates.
607 * parser.c (cp_parser_postfix_expression): Check dependency of
610 2003-07-09 Mark Mitchell <mark@codesourcery.com>
613 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
617 * error.c (decl_to_string): Do not print default argument
620 * cp-tree.h (break_out_calls): Remove declaration.
621 * tree.c (break_out_calls): Remove.
622 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
624 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
627 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
628 * decl2.c (constructor_name_p): Avoid repeated constructor_name
630 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
632 2003-07-09 Mark Mitchell <mark@codesourcery.com>
634 * typeck.c (build_x_unary_op): Take note of the fact that
635 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
638 * parser.c (cp_parser_primary_expression): Preserve the form of
639 qualified expressions in templates, even if they are not
641 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
642 (tsubst_qualified_id): Likewise.
643 * search.c (accessible_p): Treat everything in the body of a
644 template as accessible.
646 2003-07-08 Mark Mitchell <mark@codesourcery.com>
648 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
649 * cp-tree.h (build_call_from_tree): Remove.
650 (build_member_call): Likewise.
651 (dependent_template_arg_p): Remove.
652 (any_dependent_template_arguments_p): New function.
653 (dependent_template_id_p): Likewise.
654 (any_type_dependent_arguments_p): Likewise.
655 (build_non_dependent_expr): Likewise.
656 (build_non_dependent_args): Likewise.
657 (build_x_compound_expr): Adjust prototype.
658 * call.c (build_new_method_call): Handle non-dependent expressions
660 * decl2.c (grok_array_decl): Likewise.
661 (build_offset_ref_call_from_tree): Likewise.
662 (build_call_from_tree): Remove.
663 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
664 (dump_expr): Likewise.
665 * init.c (build_member_call): Remove.
666 * mangle.c (write_expression): Update handling for template-ids.
667 * parser.c (cp_parser_primary_expression): Use
668 any_dependent_template_arguments_p. Update constant-expression
670 (cp_parser_postfix_expression): Use
671 any_type_dependent_arguments_p. Simplify call processing.
672 (cp_parser_unary_expression): Simplify.
673 (cp_parser_expression): Adjust for changes to
674 build_x_compound_expr.
675 (cp_parser_template_argument): Implement standard-conforming
676 parsing of non-type template arguments.
677 (cp_parser_direct_declarator): Use
678 cp_parser_fold_non_dependent_expr.
679 (cp_parser_fold_non_dependent_expr): New function.
680 (cp_parser_next_token_ends_template_argument_p): Likewise.
681 * pt.c (convert_template_argument): Do not call
682 maybe_fold_nontype_arg.
683 (tsubst_baselink): Likewise.
684 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
685 processing work correctly for non-dependent expressions. Adjust
686 handling of COMPOUND_EXPR. Simplify call processing.
687 (value_dependent_expression_p): Deal with functional casts and
688 sizeof/alignof correctly.
689 (type_dependent_expression_p): Handle overloaded functions.
690 (any_type_dependent_arguments_p): New function.
691 (any_dependent_template_arguments_p): Likewise.
692 (dependent_template_p): Treat SCOPE_REFs as dependent.
693 (dependent_template_id_p): Simplify.
694 (build_non_dependent_expr): New function.
695 (build_non_dependent_args): Likewise.
696 * semantics.c (finish_stmt_expr): Don't make dependent
697 statement-expresions have void type.
698 (finish_call_expr): Handle non-dependent expressions
700 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
701 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
702 type size_t, even in templates.
703 (expr_sizeof): Likewise.
704 (finish_class_member_access_expr): Handle non-dependent expressions
706 (build_x_indirect_ref): Likewise.
707 (build_x_binary_op): Likewise.
708 (build_x_unary_op): Likewise.
709 (build_x_conditional_expr): Likewise.
710 (build_x_compound_expr): Likewise.
711 * typeck2.c (build_x_arrow): Likewise.
713 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
715 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
716 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
717 (start_function): Use DECL_ESTIMATED_INSNS.
718 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
720 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
723 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
726 * pt.c (instantiate_class_template): Don't call xref_tag to
727 inject name when the friend class is a specialization.
729 2003-07-07 Mark Mitchell <mark@codesourcery.com>
731 * cp-tree.h (build_scoped_method_call): Remove.
732 (lookup_qualified_name): Remove parameter.
733 (tsubst_copy_and_build): Declare.
734 (finish_qualified_object_call_expr): Remove.
735 (check_accessibility_of_qualified_id): New function.
736 (finish_qualified_id_expr): Likewise.
737 (non_reference): Likewise.
738 (build_expr_from-tree): Remove.
739 * call.c (non_reference): Remove.
740 (build_scoped_method_call): Likewise.
741 (build_method_call): Use error_operand_p. Assert that we are not
742 processing a template.
743 (standard_conversion): Use non_reference.
744 * class.c (build_vtbl_entry_ref): Likewise.
745 (build_vtbl_ref_1): Likewise.
746 * cvt.c (build_expr_type_conversion): Use non_reference.
747 * decl.c (lookup_qualified_name): Remove flags parameter.
748 (grok_op_properties): Use non_reference.
749 * decl2.c (grok_array_decl): Likewise.
750 (build_expr_from_tree): Remove.
751 (build_offset_ref_call_from_tree): Update comment.
752 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
753 * except.c (prepare_eh_types): Use non_reference.
754 (can_convert_eh): Likewise.
755 * init.c (build_dtor_call): Avoid using build_method_call.
756 * mangle.c (write_template_param): Remove misleading comment.
757 * method.c (locate_copy): Use non_reference.
758 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
759 (cp_parser_primary_expression): Do not create SCOPE_REFs is
760 non-dependent contexts.
761 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
762 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
763 build_expr_from_tree.
764 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
765 Use check_accessibility_of_qualified_id.
766 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
767 build_expr_from_tree.
768 (tsubst_baselink): New function.
769 (tsubst_qualified_id): Likewise.
770 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
771 (tsubst_expr): Adjust call to lookup_qualified_name.
772 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
773 handling of CALL_EXPRs.
774 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
775 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
776 * search.c (check_final_overrider): Likewise.
777 * semantics.c (check_accessibility_of_qualified_id): New function.
778 (finish_qualified_object_call_expr): Remove.
779 * typeck.c (target_type): Use non_reference.
780 (cxx_sizeof_or_alignof_type): Likewise.
781 (dubious_conversion_warnings): Likewise.
782 (convert_for_initialization): Likewise.
783 (non_reference): New function.
785 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
787 * decl.c (print_binding_level, print_other_binding_stack,
788 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
790 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
792 2003-07-07 Andreas Jaeger <aj@suse.de>
794 * friend.c: Convert to ISO C90 prototypes.
796 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
798 * cfns.h: Regenerate.
800 * typeck.c: Convert remaining prototypes to ISO C90.
801 * search.c: Likewise.
803 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
804 * semantics.c (expand_or_defer_fn): Likewise
805 * mangle.c (discriminator_for_string_literal): Likewise.
806 * g++spec.c (lang_specific_driver): Likewise.
808 * search.c (lookup_base_r): Remove unused variable.
810 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
812 * semantics.c: (genrtl_try_block) Adjust emit_line_note
815 2003-07-07 Andreas Jaeger <aj@suse.de>
817 * search.c (lookup_base_r): Remove unused variable.
819 2003-07-06 Michael Chastain <mec@shout.net>
822 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
823 assigning to input_filename directly.
825 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
827 * call.c: Fix comment formatting.
829 * cp-tree.h: Likewise.
833 * method.c: Likewise.
834 * name-lookup.c: Likewise.
835 * parser.c: Likewise.
838 * search.c: Likewise.
839 * typeck.c: Likewise.
841 2003-07-06 Mark Mitchell <mark@codesourcery.com>
844 * search.c (lookup_base_r): Remove is_non_public and
845 within_current_scope parameters. Remove other dead code.
846 (lookup_base): Adjust call to lookup_base_r.
847 (adjust_result_of_qualified_name_lookup): Improve comment.
848 * semantics.c (finish_call_expr): Use maybe_dummy_object.
850 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
852 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
853 LANG_HOOKS_MISSING_ARGUMENT): Override.
855 2003-07-05 Mark Mitchell <mark@codesourcery.com>
858 * typeck.c (build_static_cast): Check for reference conversions
861 2003-07-04 Mark Mitchell <mark@codesourcery.com>
863 * cp-tree.h (perform_integral_promotions): Declare.
864 * call.c (build_addr_func): Use decay_conversion.
865 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
866 (convert_for_arg_passing): Use perform_integral_promotions.
867 * cvt.c (build_expr_type_conversion): Use decay_conversion.
868 (type_promotes_to): Do not return a cv-qualified type.
869 * decl.c (grok_reference_init): Fix formatting.
870 (get_atexit_node): Use decay_conversion.
871 (build_enumerator): Use perform_integral_promotions.
872 * init.c (build_vec_init): Use decay_conversion.
873 * semantics.c (finish_expr_stmt): Likewise.
874 (finish_switch_cond): Use perform_integral_promotions.
875 * typeck.c (default_conversion): Likewise.
876 (perform_integral_promotions): New function.
877 (build_indirect_ref): Use decay_conversion.
878 (build_array_ref): Use perform_integral_promotions.
879 (convert_arguments): Use decay_conversion.
880 (build_unary_op): Use perform_integral_promotions.
881 (build_c_cast): Use decay_conversion.
882 (build_modify_expr): Likewise.
883 (convert_for_initialization): Likewise.
884 * typeck2.c (build_x_arrow): Likewise.
886 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
888 * call.c: Fix comment typos.
890 * cp-tree.h: Likewise.
895 * mangle.c: Likewise.
896 * parser.c: Likewise.
898 * search.c: Likewise.
899 * semantics.c: Likewise.
901 * typeck.c: Likewise.
903 2003-07-04 Zack Weinberg <zack@codesourcery.com>
905 * parser.c (cp_lexer_read_token): No need to handle string
906 constant concatenation.
908 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
910 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
911 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
912 ATTRIBUTE_GCC_CXXDIAG.
914 2003-07-03 Mark Mitchell <mark@codesourcery.com>
916 * call.c (build_addr_func): Handle bound pointers-to-members.
917 (build_method_call): Do not call resolve_offset_ref.
918 (implicit_conversion): Likewise.
919 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
921 (resolve_args): Do not call resolve_offset_ref.
922 (build_conditional_expr): Likewise.
923 (build_new_method_call): Likewise.
924 * cp-tree.def (OFFSET_REF): Update documentation.
925 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
926 pointers to members to pointers.
927 (ocp_convert): Do not call resolve_offset_ref.
928 (convert_to_void): Likewise.
929 (build_expr_type_conversion): Likewise.
930 * decl2.c (delete_sanity): Likewise.
931 * init.c (resolve_offset_ref): Simplify greatly.
932 (build_vec_delete): Do not call resolve_offset_ref.
933 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
935 (cp_parser_unary_expression): Use
936 cp_parser_simple_cast_expression.
937 (cp_parser_delete_expression): Likewise.
938 (cp_parser_cast_expression): Likewise.
939 (cp_parser_pm_expression): Use cp_parser_binary_op.
940 (cp_parser_simple_cast_expression): New function.
941 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
942 * semantics.c (finish_increment_expr): Likewise.
943 (finish_typeof): Likewise.
944 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
945 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
946 (decay_conversion): Do not call resolve_offset_ref.
947 (finish_class_member_access_expr): Likewise.
948 (convert_arguments): Likewise.
949 (build_x_binary_op): Handle DOTSTAR_EXPR.
950 (condition_conversion): Do not call resolve_offset_ref.
951 (unary_complex_lvalue): Likewise.
952 (build_static_cast): Likewise.
953 (build_reinterpret_cast): Likewise.
954 (build_const_cast): Likewise.
955 (build_c_cast): Likewise.
956 (build_modify_expr): Likewise.
957 (convert_for_assignment): Likewise.
958 (convert_for_initialization): Likewise.
959 * typeck2.c (build_x_arrow): Likewise.
960 (build_m_component_ref): Simplify.
962 * call.c (build_scoped_method_call): Use convert_to_void.
963 (build_method_call): Likewise.
964 * class.c (check_field_decls): Remove dead code.
965 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
966 * decl2.c (grok_array_decl): Remove dead code.
967 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
968 as pointer-to-member representation.
969 * init.c (build_offset_ref): Tidy.
970 (build_vec_delete_1): Use convert_to_void.
971 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
972 as pointer-to-member representation.
974 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
977 * decl.c (grokdeclarator): Return friend decls, not
979 * decl2.c (grokfield): Alter friend decl check.
980 * parser.c (struct cp_parser): Document default_arg chain on
981 unparsed_functions_queue.
982 (cp_parser_save_default_args): New.
983 (cp_parser_init_declarator, cp_parser_function_definition,
984 cp_parser_member_declaration): Call it.
985 (cp_parser_class_specifier): Remove unused variable. Alter
986 processing of unparsed_functions_queue.
988 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
990 * class.c (add_method, check_field_decl): Fix format specifier.
991 * decl.c (duplicate_decls, pushdecl, check_goto,
992 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
993 start_enum): Likewise.
994 * decl2.c (ambiguous_decl): Likewise.
995 * pt.c (redeclare_class_template): Likewise.
997 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
1000 * pt.c (type_unification_real): Don't unify exprs of error type.
1001 * tree.c (error_type): Don't die on error_type.
1004 * decl2.c (arg_assoc_class): Don't die on NULL type.
1005 * typeck.c (type_unknown_p): Don't die on untyped expressions.
1007 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1010 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1013 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1015 * error.c (locate_error): %P takes an `int', not a `tree'.
1017 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1019 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1020 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1021 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1024 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1025 (expand_or_defer_fn): Declare.
1026 (lower_function): Declare.
1027 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1028 * decl2.c: Include cgraph.h and varpool.h
1029 (maybe_emit_vtables): Make explicit instantations as needed.
1030 (mark_member_pointers, lower_function): New functions.
1031 (finish_file): Do unit-at-a-time.
1032 * method.c (synthesize_method): Use expand_or_defer_fn.
1033 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1034 * parser.c (cp_parser_function_definition_after_decl): Use
1036 * pt.c (instantiate_decl): Likewise.
1037 * semantics.c: Include cgraph.h
1038 (expand_or_defer_fn): Break out from ...
1039 (expand_body): ... here; deal with unit-at-a-time.
1040 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1041 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1043 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1045 * call.c (resolve_scoped_fn_name): Return error_mark_node for
1048 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1051 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1054 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
1057 * error.c (dump_decl): Handle BIT_NOT_EXPR as
1058 pseudo destructor calls.
1060 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1062 * cp-tree.h (define_label): Replace filename and lineno
1063 arguments with a location_t.
1064 * decl.c (pop_label): Adjust define_label call.
1065 (define_label): Replace filename and lineno arguments with a
1067 * semantics.c (finish_label): Adjust define_label call.
1069 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1072 * decl2.c (grokfield): Do not build NOP_EXPRs around the
1075 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
1077 * Make-lang.in: Update.
1078 * cp-lang.c (c_language): Define.
1079 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1080 * cp-tree.h (cxx_init_options): Remove.
1081 * lex.c: Don't include diagnostic.h.
1082 (cxx_init_options): Remove.
1084 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1087 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1088 tree generated within a template. Use dump_expr to dump an
1091 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1093 * mangle.c (write_expression): Exit gracefully when trying to
1096 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1099 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1100 (value- or type-) dependent expression as DECL_INITIAL is a
1101 valid constant-expression (at parser time).
1103 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1106 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1107 USING_DECL, instead of print_tree_identifier.
1109 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1111 * cp-tree.h (language_to_string): Adjust declaration.
1112 * dump.c (cp_dump_tree): Adjust usage.
1113 * error.c (dump_char): Use output_formatted_scalar. Tidy.
1114 (parm_to_string): Lose unused parameter. Tidy.
1115 (expr_to_string): Likewise.
1116 (code_to_string): Likewise.
1117 (language_to_string): Likewise.
1118 (op_to_string): Likewise.
1119 (assop_to_string): Likewise.
1120 (digit_buffer): Remove.
1121 (dump_type): Format builtin vector type as __vector__.
1123 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1125 * error.c (print_integer): Remove.
1126 (dump_type_suffix): Adjust.
1127 (dump_expr): Likewise.
1129 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1131 * error.c (print_instantiation_partial_context): Take a
1133 (print_instantiation_full_context): Adjust.
1134 (print_instantiation_context): Adjust.
1136 * cp-tree.h (cp_line_of, cp_file_of): Remove.
1137 * error.c (cp_line_of, cp_file_of): Merge into ...
1138 (location_of): ... here. Make static, return a location_t.
1139 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1141 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1144 * call.c (joust): Move warn_conversion check outwards.
1146 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1148 * decl.c (build_typename_type)
1149 * mangle.c (write_template_template_arg)
1150 * parser.c (cp_parser_scope_through_which_access_occurs)
1151 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1152 * repo.c (get_base_filename)
1153 * semantics.c (maybe_convert_cond):
1154 Mark the definition static, matching the forward declaration.
1156 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1159 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1161 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1164 * decl.c (finish_enum): Implement DR377.
1166 * decl.c (cp_finish_decl): Don't make variables with reference
1167 type readonly while they are being initialized.
1169 2003-06-26 Mark Mitchell <mark@codesourcery.com>
1172 * typeck.c (build_static_cast): Avoid returning expressions with
1175 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
1177 * call.c (build_op_delete_call): Use strip_array_call. Correct
1178 error message to say 'delete' or 'delete[]'.
1180 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
1183 * pt.c (check_explicit_specialization): When looking up a
1184 template function from an identifier outside class-scope, bind
1185 it to CP_DECL_CONTEXT.
1187 2003-06-25 Mark Mitchell <mark@codesourcery.com>
1190 * search.c (lookup_base_r): Rely on accessible_p, rather than
1191 trying to emulate that logic here.
1194 * call.c (convert_like): Pass issue_conversion_warnings.
1195 (convert_like_with_context): Likewise.
1196 (convert_like_real): Add issue_conversion_warnings parameter.
1197 (perform_direct_initialization_if_possible): New function.
1198 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
1199 * typeck.c (check_for_casting_away_constness): New function.
1200 (build_static_cast): Rewrite.
1202 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
1204 * call.c (enforce_access): Assert we get a binfo.
1205 (build_op_delete_call): Pass a binfo to
1206 perform_or_defer_access_check.
1207 * class.c (alter_access): Likewise.
1208 * decl.c (make_typename_type): Likewise.
1209 (make_unbound_class_template): Likewise.
1210 * lex.c (do_identifier): Likewise.
1211 * method.c (hack_identifier): Likewise.
1212 * parser.c (cp_parser_lookup_name): Likewise.
1213 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
1215 * semantics.c (finish_non_static_data_member): Likewise.
1216 (perform_or_defer_access_check): Expect a binfo.
1217 * typeck.c (comptypes): Expect types.
1219 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
1220 * friend.c (make_friend_class): Likewise.
1221 * pt.c (check_default_tmpl_args): Likewise.
1222 (lookup_template_class): Likewise.
1224 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
1226 * method.c (thunk_labelno): Move outside ifdef block to make garbage
1229 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
1231 * class.c (build_vtable): Make vtables.
1232 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
1233 * decl2.c (output_vtable_inherit): Rename to ...
1234 (prepare_assemble_variable): ... this one; change interface.
1235 (maybe_emit_vtables): Do not call output_vtable_inherit.
1236 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
1237 * cp-tree.h (prepare_assemble_variable): New.
1239 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
1241 * method.c: add prototype for make_alias_for_thunk.
1242 (thunk_labelno, make_alias_for_thunk): only define
1243 if ASM_OUTPUT_DEF is defined.
1245 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1247 * method.c (thunk_labelno): New variable.
1248 (make_alias_for_thunk): New function.
1249 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
1250 into the same section as the function it is calling.
1251 Include gt-cp-method.h.
1252 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
1253 (cp/method.o): Depend on gt-cp-method.h.
1254 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
1256 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
1258 * decl.c (register_dtor_fn): Mark cleanup as used.
1259 * decl2.c (mark_vtable_entries): Skip nops.
1260 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
1261 (build_dynamic_cast_1): Likewise.
1262 (tinfo_base_init): Likewise.
1263 (emit_tinfo_decl): Likewise.
1265 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1267 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
1270 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1273 * call.c (joust): Warn about choosing conversion sequence only if
1276 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1279 * call.c (op_error): Tidy.
1280 * error.c (dump_expr): Properly format 'T()' when T is an
1283 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1286 * decl.c (grok_op_properties): Warn possible confusing conversion
1287 only if -Wconversion.
1289 2003-06-20 Mark Mitchell <mark@codesourcery.com>
1292 * parser.c (cp_parser_class_head): See through dependent names
1293 when parsing a class-head.
1296 * pt.c (try_class_unification): Correct handling of member class
1299 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
1301 * semantics.c (genrtl_finish_function): Adjust
1302 expand_function_end call.
1304 2003-06-19 Mark Mitchell <mark@codesourcery.com>
1307 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
1309 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
1312 * cp-tree.h (pushdecl_class_level): Change prototype.
1313 (push_class_level_binding): Likewise.
1314 * decl.c (add_binding): Reject duplicate static data members.
1315 (pushdecl_class_level): Return a value indicating whether or not
1316 the binding was valid.
1317 (push_class_level_binding): Likewise.
1318 * semantics.c (finish_member_declaration): Don't keep invalid
1322 * call.c (initialize_reference): Do not use cp_finish_decl to emit
1323 temporary variables.
1324 * cp-tree.h (static_aggregates): Declare.
1325 (pushdecl_top_level_and_finish): Likewise.
1326 * decl.c (pushdecl_top_level_1): New function.
1327 (pushdecl_top_level): Use it.
1328 (pushdecl_top_level_and_finish): New function.
1329 (initialize_local_var): Remove redundant code.
1330 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
1332 * decl.h (static_aggregates): Remove.
1333 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
1334 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
1335 (tinfo_base_init): Likewise.
1337 2003-06-19 Matt Austern <austern@apple.com>
1340 * init.c (build_zero_init): Assert that number of array elements
1341 is an integer constant.
1342 (build_default_init) Don't use build_zero_init for arrays with
1343 variable number of elements.
1345 2003-06-19 Andreas Jaeger <aj@suse.de>
1347 * cp-tree.h: Remove duplicated declarations.
1349 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
1351 * pt.c: Convert to ISO C.
1352 * semantics.c: Convert to ISO C.
1354 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1356 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
1357 at_least_as_qualified_p, more_qualified_p): Return bool.
1358 * typeck.c: ANSIFY function definitions.
1359 (comp_array_types): Take redeclaration bool parameter.
1360 (comptypes): Rearrange STRICT handling.
1361 (at_least_as_qualified_p, more_qualified_p,
1362 comp_cv_qualification): Cache cv quals.
1363 (compparms): Rearrange loop.
1365 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1367 * cp-tree.h (COMPARE_RELAXED): Rename to ...
1368 (COMPARE_DERIVED): ... here. Adjust comment.
1369 (resolve_typename_type_in_current_instantiation): Remove.
1370 (cp_tree_equal, comptypes): Return a bool.
1371 * cvt.c (convert_to_reference): Adjust comptypes call.
1372 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
1373 (resolve_typename_type_in_current_instantiation): Remove.
1374 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
1375 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
1376 calls. Refactor code.
1377 * typeck.c (comp_array_types): Return bool. Lose callback.
1378 parameter. Adjust cp_tree_equal calls.
1379 (comptypes): Return bool. Adjust strict handling. Remove relaxed
1380 enumeration and java type handling. Deal with typename types here.
1381 Adjust recursive and cp_tree_equals calls. Adjust base and derived
1383 (comp_target_types): Remove unreachable code. Adjust
1384 same_or_base_type_p calls.
1385 (ptr_reasonably_similar): Adjust base and derived check.
1387 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
1389 (check_return_expr): Adjust error messages.
1390 * cp-tree.def (SCOPE_REF): Correct comment.
1392 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1394 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1397 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
1399 * optimize.c (dump_function): Form complete flag name by
1400 prefixing 'fdump-' to string returned by dump_flag_name().
1402 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1404 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1407 2003-06-17 Jason Merrill <jason@redhat.com>
1410 * decl.c (grokfndecl): Don't mark a function inline for
1411 -finline-functions if it isn't defined.
1413 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1416 * class.c (handle_using_decl): Robustify.
1419 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1420 * mangle.c (struct globals): Remove internal_mangling_p.
1421 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1422 (write_template_parm): Don't write out the level number.
1423 (conv_type_names): New variable.
1424 (hash_type): New function.
1425 (compare_type): Likewise.
1426 (mangle_conv_op_name_for_type): Don't try to mangle conversion
1428 * search.c (lookup_conversion_operator): New function.
1429 (lookup_fnfields_1): Use it.
1431 2003-06-17 Andreas Jaeger <aj@suse.de>
1433 * except.c: Remove duplicate declaration of push_eh_cleanup.
1435 * call.c: Remove extra declaration of inhibit_warnings.
1437 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1439 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
1440 * mangle.c: Convert to ISO C.
1442 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1444 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1447 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1449 * tree.c: Convert to ISO C.
1451 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
1453 * cp-tree.h: Follow spelling conventions.
1454 * mangle.c: Likewise.
1455 * method.c: Likewise.
1456 * parser.c: Likewise.
1458 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
1460 * decl.c (start_function): Adjust init_function_start call.
1461 * method.c (use_thunk): Likewise.
1462 * semantics.c (genrtl_start_function): Likewise.
1464 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
1466 * Make-lang.in: Remove c-options.o.
1468 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
1470 * lex.c: Convert to ISO C.
1472 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
1473 * init.c: removes use of PARAMS macro. Use ISO style function
1474 declarations. (Not copyright-significant change.)
1476 * rtti.c: Remove PARAMS.
1478 * typeck2.c: Convert to ISO C.
1480 2003-06-12 Mark Mitchell <mark@codesourcery.com>
1483 * typeck.c (build_c_cast): Check that the destination type is
1486 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1489 * cp-tree.h (finish_declarator): Remove.
1490 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1491 erroneous declarations.
1492 * semantics.c (finish_declarator): Remove.
1494 2003-06-11 Roger Sayle <roger@eyesopen.com>
1496 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1497 global static constructor/destructor if it will be empty, i.e.
1498 either doesn't call any ctors/dtors or only calls pure or const
1501 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1503 * mangle.c (tm_p.h): Include it.
1504 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1507 * tree.c (cp_cannot_inline_fn): Check for "inline" before
1510 2003-06-10 Jason Merrill <jason@redhat.com>
1513 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1515 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
1517 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1518 (start_cleanup_cnt): New.
1520 2003-06-10 Mark Mitchell <mark@codesourcery.com>
1523 * cp-tree.h (template_for_substitution): Declare.
1524 * decl2.c (mark_used): Use it when figuring out whether or not a
1526 * pt.c (template_for_substitution): Give it external linkage.
1527 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1530 2003-06-09 Zack Weinberg <zack@codesourcery.com>
1533 * mangle.c (write_real_cst): New function. Implement
1534 ABI-compliant mangling of floating-point literals when
1535 -fabi-version>=2; provide backward compatibility with 3.3 when
1536 -fabi-version=1 (with warning). Clarify commentary.
1537 (write_template_arg_literal): Use write_real_cst.
1539 2003-06-07 Andreas Jaeger <aj@suse.de>
1541 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1543 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
1545 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1546 (LANG_HOOKS_HANDLE_OPTION): Override.
1547 * cp-tree.h (cxx_init_options): Update.
1548 * lex.c (cxx_init_options): Update.
1550 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
1552 * Make-lang.in: Add support for stageprofile and stagefeedback
1554 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
1556 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1558 2003-06-04 Andreas Jaeger <aj@suse.de>
1560 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1562 2003-06-03 Jason Merrill <jason@redhat.com>
1564 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1566 * cp/decl.c (reshape_init): Handle vectors.
1568 * testsuite/g++.dg/init/array10.C: New.
1570 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1573 * pt.c (check_explicit_specialization): Check for 'static'
1576 2003-05-31 Diego Novillo <dnovillo@redhat.com>
1578 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
1579 the operand of a CONSTRUCTOR node.
1581 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1583 * decl.c (cp_binding_level::this_entity): Rename from this_class.
1584 (cxx_scope_descriptor): New function.
1585 (cxx_scope_debug): Likewise.
1586 (push_binding_level): Use it.
1587 (pop_binding_level): Likewise.
1588 (suspend_binding_level): Likewise.
1589 (resume_binding_level): Likewise.
1590 (pushlevel_class): Adjust use of this_class.
1591 (pushtag): Likewise.
1592 (lookup_name_real): Likewise.
1593 (global_scope_name): New variable.
1594 (initialize_predefined_identifiers): Initialize it.
1595 (push_namespace): Use it.
1596 (make_cxx_scope): New function.
1597 (pushlevel): Use it.
1598 (pushlevel_class): Likewise.
1599 (push_binding_level): Simplify. Loose the last two arguments.
1600 (make_binding_level): Remove.
1601 (initial_push__namespace_scope): New function.
1602 (push_namespace): Use it. Simplify.
1603 (cxx_init_decl_processing): Likewise.
1604 (declare_namespace_level): Remove.
1606 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1609 * pt.c (instantiate_decl): Don't use full template arguments if
1610 we are dealing with specializations.
1612 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1614 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
1615 (binding_depth): Unconditionally define.
1616 (is_class_level): Likewise.
1617 (indent): Likewise. Take an indenting parameter.
1618 (push_binding_level): Remove conditional definittion.
1619 (pop_binding_level): Likewise.
1620 (suspend_binding_level): Likewise.
1621 (resume_binding_level): Likewise.
1622 (pushlevel): Likewise.
1623 (pushlevel_class): Likewise.
1624 (poplevel_class): Likewise.
1625 (pop_everything): Likewise.
1627 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1629 * name-lookup.h (global_scope_p): New macro.
1630 * decl.c (pop_binding_level): Use it. Don't refer directly to
1631 global_binding_level.
1632 (suspend_binding_level): Likewise.
1633 (global_bindings_p): Likewise.
1634 (print_other_binding_stack): Likewise.
1635 (print_binding_stack): Likewise.
1636 (maybe_push_to_top_level): Likewise.
1637 (pushdecl_namespace_level): Likewise.
1638 (cxx_init_decl_processing): Likewise.
1639 (start_decl): Likewise.
1640 (cp_finish_decl): Likewise.
1641 (start_function): Likewise.
1642 (global_binding_level): Remove.
1644 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1646 * parser.c (cp_parser_explicit_instantiation): Restore old
1647 access before template instantiation.
1649 2003-05-23 Geoffrey Keating <geoffk@apple.com>
1651 * lang-specs.h: Use -o to specify preprocessor's output file.
1652 Make -no-integrated-cpp work when building PCH files.
1654 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1657 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1658 check for implicitly created typedef to an enum.
1660 2003-05-21 Jason Merrill <jason@redhat.com>
1662 * init.c (build_vec_delete): Copy the address into a temporary
1663 variable before calling build_vec_delete_1.
1664 * decl2.c (delete_sanity): Don't call stabilize_reference.
1666 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
1668 * pt.c (register_specialization): Update the decl's location,
1670 (check_explicit_specialization): Likewise.
1672 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1674 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1676 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
1679 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1680 if the old decl had instantiated DECL_RTL.
1681 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1683 2003-05-19 Matt Austern <austern@apple.com>
1685 * lang-options.h: Document -Wno-invalid-offsetof
1686 * typeck.c (build_class_member_access_expr): Don't complain about
1687 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
1689 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1691 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1692 (binding_entry_make): Make entry->chain NULL after getting an entry.
1693 fix the spelling of chain in a comment.
1694 (binding_table_free): speed up by having temporary variable.
1695 (binding_table_new): set table->chain to be NULL after allocating
1697 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1698 binding->previous to NULL after getting an binding for speed.
1700 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1702 * cp-tree.h (struct lang_type_class): Replace data member tags
1703 with hash-table nested_udts.
1704 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1705 * class.c (unreverse_member_declarations): Don't touch
1707 (pushclass): Use cxx_remember_type_decls.
1708 * decl.c (struct cp_binding_level): Replace data member tags with
1709 hash-table type_decls.
1710 (pop_binding_level): Handle level->type_decls.
1711 (kept_level_p): Adjust.
1712 (poplevel): Remove unused local variable.
1713 (bt_print_entry): New function.
1714 (print_binding_level): Use it.
1715 (push_namespace): Build current_binding_level->type_decls.
1716 (maybe_process_template_type_declaration): Adjust.
1717 (pushtag): Likewise.
1718 (clear_anon_tags): Use binding_table_remove_anonymous_types.
1720 (cxx_remember_type_decls): Rename from storetags. Adjust.
1721 (lookup_tag): Use binding_table_find_anon_type. Tidy.
1722 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
1723 (cxx_init_decl_processing): Build global_binding_level->type_decls.
1724 (store_parm_decls): Remove pointless code.
1725 * name-lookup.c (free_binding_entry): New variable.
1726 (ENTRY_INDEX): New macro.
1727 (struct binding_table_s): New datatype.
1728 (binding_entry_make): New function.
1729 (binding_entry_free): Likewise.
1730 (binding_table_construct): Likewise.
1731 (binding_table_free): Likewise.
1732 (binding_table_new): Likewise.
1733 (binding_table_expand): Likewise.
1734 (binding_table_insert): Likewise.
1735 (binding_table_find): Likewise.
1736 (binding_table_find_anon_type): Likewise.
1737 (binding_table_reverse_maybe_remap): Likewise.
1738 (binding_table_remove_anonymous_types): Likewise.
1739 (binding_table_foreach): Likewise.
1740 * name-lookup.h (binding_table): New type.
1741 (binding_entry): Likewise.
1742 (bt_foreach_proc): Likewise.
1743 (struct binding_entry_s): New datatype.
1744 (SCOPE_DEFAULT_HT_SIZE): New macro.
1745 (CLASS_SCOPE_HT_SIZE): Likewise.
1746 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1747 (NAMESPACE_STD_HT_SIZE): Likewise.
1748 (GLOBAL_SCOPE_HT_SIZE): Likewise.
1749 (binding_table_new): Declare.
1750 (binding_table_free): Likewise.
1751 (binding_table_insert): Likewise.
1752 (binding_table_find_anon_type): Likewise.
1753 (binding_table_reverse_maybe_remap): Likewise.
1754 (binding_table_remove_anonymous_types): Likewise.
1755 (binding_table_foreach): Likewise.
1756 (binding_table_find): Likewise.
1757 (cxx_remember_type_decls): Likewise.
1758 * pt.c (bt_instantiate_type_proc): New function.
1759 (do_type_instantiation): Use it.
1760 * search.c (lookup_field_r): Use binding_table_find.
1762 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1764 * semantics.c (perform_deferred_access_checks): Don't discard
1767 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1769 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1770 libiberty VA_ macros, always use stdarg.
1771 * rtti.c (create_pseudo_type_info): Likewise.
1772 * tree.c (build_min_nt, build_min): Likewise.
1774 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1776 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1777 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1778 collapse multiple function calls into one.
1779 * tree.c (debug_binfo): Likewise.
1781 2003-05-15 Jason Merrill <jason@redhat.com>
1784 * call.c (conditional_conversion): Don't consider implicit
1785 conversions if T2 is a base of T1.
1786 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
1787 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1789 * parser.c (cp_parser_primary_expression): Convert a static data
1790 member from reference.
1792 2003-05-15 Mark Mitchell <mark@codesourcery.com>
1794 * call.c (build_op_delete_call): Avoid creating unnecessary types.
1795 * class.c (instantiate_type): Remove tests for tf_no_attributes.
1796 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
1797 (COMPARE_NO_ATTRIBUTES): Remove.
1798 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
1801 * semantics.c (finish_typeof): Refine type-dependency check.
1803 2003-05-13 Jason Merrill <jason@redhat.com>
1805 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
1806 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
1808 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1810 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
1812 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1814 PR c++/10230, c++/10481
1815 * semantics.c (finish_non_static_data_member): Handle when the
1816 non-static member is not from a base of the current class type.
1818 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1821 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
1822 template and has dependent context.
1824 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1826 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
1828 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1831 * cp-tree.h (saved_scope): Remove check_access field.
1832 (tsubst_flags_t): Remove tf_parsing.
1833 * decl.c (maybe_push_to_top_level): Don't initialize
1834 scope_chain->check_access.
1835 (make_typename_type, make_unbound_class_template): Don't use
1837 (register_dtor_fn): Use push/pop_deferring_access_checks
1838 instead of scope_chain->check_access.
1839 * method.c (use_thunk): Likewise.
1840 * parser.c (cp_parser_explicit_instantiation
1841 (cp_parser_constructor_declarator_p): Don't call
1842 push/pop_deferring_access_checks here.
1843 (cp_parser_template_argument, cp_parser_class_name): Don't use
1845 (yyparse): Check flag_access_control.
1846 * pt.c (instantiate_class_template): Call
1847 push/pop_deferring_access_checks.
1848 * semantics.c (push_deferring_access_checks): Propagate
1850 (perform_or_defer_access_check): Make sure basetype_path is
1851 a type before comparison.
1852 * call.c (build_op_delete_call, build_over_call): Use
1853 perform_or_defer_access_check.
1854 * class.c (alter_access): Likewise.
1855 * init.c (build_offset_ref): Likewise.
1856 * lex.c (do_identifier): Likewise.
1857 * method.c (hack_identifier): Likewise.
1858 * search.c (lookup_member): Likewise.
1859 * semantics.c (finish_non_static_data_member): Likewise.
1860 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
1861 instead of flag_access_control.
1863 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1866 * parser.c (cp_parser_class_name): Remove check_access parameter.
1867 All caller adjusted. Update declaration.
1868 (cp_parser_lookup_name): Likewise.
1869 * semantics.c (push_deferring_access_checks): Change parameter type
1870 to enum deferring_kind. All caller adjusted.
1871 (resume_deferring_access_checks): Adjust to use new enum.
1872 (stop_deferring_access_checks): Likewise.
1873 (perform_or_defer_access_check): Likewise.
1874 * cp-tree.h (deferring_kind): New enum.
1875 (deferred_access): Adjust field type.
1876 (push_deferring_access_checks): Update declaration.
1878 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1880 PR c++/10555, c++/10576
1881 * pt.c (lookup_template_class): Handle class template with
1882 multiple levels of parameters when one of the levels contain
1885 2003-05-08 Jason Merrill <jason@redhat.com>
1887 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
1888 expression. Undo some of the recent reorg.
1890 2003-05-07 Richard Henderson <rth@redhat.com>
1893 * cfns.gperf: Comment out POSIX thread cancellation points,
1894 plus abort and raise.
1895 * cfns.h: Regenerate.
1897 2003-05-07 Jason Merrill <jason@redhat.com>
1899 * call.c (build_conditional_expr): Don't assume that the folded
1900 expression has result_type.
1902 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1904 * typeck.c (build_unary_op): Deal with const qualifier in
1905 invalid pointer-to-member earlier.
1907 2003-05-05 Jason Merrill <jason@redhat.com>
1910 * call.c (conditional_conversion): Build an RVALUE_CONV if
1911 we're just changing the cv-quals.
1912 (build_conditional_expr): Don't call convert to change
1915 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1918 * typeck.c (build_unary_op): Don't output const qualifier when
1919 output invalid pointer-to-member diagnostics.
1921 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1923 * decl.c: Fix typos.
1925 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1928 * decl.c (start_function): Use same_type_p to check return type
1931 2003-05-03 Zack Weinberg <zack@codesourcery.com>
1934 * cp/typeck.c (build_x_compound_expr): No need to check
1935 extra_warnings as well as warn_unused_value.
1937 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1939 PR c++/9364, c++/10553, c++/10586
1940 * decl.c (make_typename_type): Don't crash on illegal code.
1942 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
1944 * class.c (finish_struct): Use location_t and input_location
1946 * decl.c (make_label_decl): Likewise.
1947 (use_label): Likewise.
1948 * decl2.c (warn_if_unknown_interface): Likewise.
1949 (start_static_initialization_or_destruction): Likewise.
1950 (generate_ctor_or_dtor_function): Likewise.
1951 (finish_file): Likewise.
1952 * error.c (print_instantiation_full_context): Likewise.
1953 * init.c (create_temporary_var): Likewise.
1954 * method.c (synthesize_method): Likewise.
1955 * parser.c (cp_token): Likewise.
1956 (cp_lexer_set_source_position_from_token): Likewise.
1957 (cp_lexer_get_preprocessor_token): Likewise.
1958 (cp_parser_statement): Likewise.
1959 * pt.c (tsubst_friend_function): Likewise.
1960 (instantiate_class_template): Likewise.
1961 (tsubst_decl): Likewise.
1963 (instantiate_decl): Likewise.
1964 * semantics.c (begin_class_definition): Likewise.
1965 (expand_body): Likewise.
1967 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
1969 * class.c (finish_struct): Rename lineno to input_line.
1970 * decl.c (push_binding_level, pop_binding_level,
1971 suspend_binding_level, resume_binding_level, make_label_decl,
1972 use_label, start_function): Likewise.
1973 * decl2.c (warn_if_unknown_interface,
1974 start_static_initialization_or_destruction,
1975 generate_ctor_or_dtor_function, finish_file): Likewise.
1976 * error.c (cp_line_of, print_instantiation_full_context,
1977 print_instantiation_context): Likewise.
1978 * except.c (check_handlers_1, check_handlers): Likewise.
1979 * init.c (create_temporary_var): Likewise.
1980 * method.c (use_thunk, synthesize_method): Likewise.
1981 * parser.c (cp_lexer_set_source_position_from_token,
1982 cp_lexer_get_preprocessor_token): Likewise.
1983 * pt.c (push_tinst_level, pop_tinst_level,
1984 tsubst_friend_function, instantiate_class_template, tsubst_decl,
1985 tsubst, tsubst_expr, instantiate_decl): Likewise.
1986 * semantics.c (genrtl_try_block, finish_label_stmt,
1987 begin_class_definition, expand_body,
1988 genrtl_finish_function): Likewise.
1989 * tree.c (build_min_nt, build_min): Likewise.
1991 2003-05-01 Mark Mitchell <mark@codesourcery.com>
1993 * decl2.c (comdat_linkage): Don't externalize explicit
1996 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1999 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2002 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
2004 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
2005 (struct lang_identifier): ... to here.
2006 (LANG_ID_FIELD): Remove.
2007 (SET_LANG_ID): Remove.
2008 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2009 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2010 (IDENTIFIER_IMPLICIT_DECL): Likewise.
2011 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2012 (IDENTIFIER_ERROR_LOCUS): Likewise.
2013 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2015 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2018 * pt.c (convert_template_argument): Correct diagnostic.
2020 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2022 PR c++/9432, c++/9528
2023 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2025 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
2027 * decl.c (check_previous_goto_1): Adjust prototype.
2028 (check_previous_goto): Adjust use.
2029 (check_switch_goto): Likewise.
2030 (use_label): Adjust.
2031 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2032 (struct named_label_use_list): Use location_t datatype.
2034 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2037 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2038 that have not yet been written out.
2040 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2043 * class.c (layout_class_type): Mark overlong bitfields as having
2044 the maximum size permitted by their type, after layout.
2047 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2049 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2051 * call.c (build_operator_new_call): Fix typo.
2052 * lang-options.h: Likewise.
2054 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2057 * cp-tree.h (lookup_field_1): Declare it.
2058 * search.c (lookup_field_1): Make it public.
2059 * decl.c (reshape_init): Handle designated initializers.
2061 * decl.c (maybe_commonize_var): Further tweak support for systems
2062 without weak symbols.
2064 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2066 * decl.c (maybe_commonize_var): Fix thinko in last patch.
2068 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2071 * method.c (use_thunk): Decrement immediate_size_expand.
2074 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2075 (DECL_MAYBE_TEMPLATE): Remove.
2076 * class.c (fixed_type_or_null): Avoid infinite recursion.
2078 * decl.c (maybe_commonize_var): Make the code match the comments.
2079 * pt.c (instantiate_decl): Move call to import_export_decl.
2081 2003-04-26 Mark Mitchell <mark@codesourcery.com>
2083 * decl2.c (finish_file): Fix merge botch.
2085 2003-04-25 Mark Mitchell <mark@codesourcery.com>
2087 * decl2.c (finish_file): Don't call import_export_decl for
2088 functions that are not defined.
2089 (handle_class_head): Robustify.
2090 * pt.c (instantiate_decl): Do not call cp_finish_decl for
2091 variables that are not defined.
2093 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
2095 * call.c (print_z_candidates): Fix off by one error.
2097 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
2100 * call.c (joust): Don't warn about conversion ops that are exact
2101 or cv-conversions. Rearrange to avoid multiple type comparisons.
2103 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2106 * call.c (build_cxx_call): Robustify.
2108 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
2110 * Make-lang.in (lex.o): Remove mbchar.h.
2111 * lex.c (MULTIBYTE_CHARS): Lose.
2112 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2115 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2118 * cp-tree.h (duplicate_tag_error): Remove.
2119 * class.c (duplicate_tag_error): Remove.
2120 * semantics.c (begin_class_definition): Return immediately for a
2121 duplicate class definition.
2124 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2126 2003-04-22 Mark Mitchell <mark@codesourcery.com>
2129 * search.c (lookup_fnfields_1): Handle empty slots in the method
2133 * decl.c (check_elaborated_type_specifier): New function, split
2135 (xref_tag): ... here. Use the new function in more places.
2137 * rtti.c (throw_bad_typeid): Use build_cxx_call.
2139 2003-04-21 Mark Mitchell <mark@codesourcery.com>
2141 * call.c (build_over_call): Use build_cxx_call.
2142 (build_cxx_call): New method, split out of build_over_call.
2143 * cp-tree.h (language_function): Add can_throw.
2144 (build_cxx_call): Declare it.
2145 * decl.c (finish_function): If a function does not contain any
2146 calls to functions that can throw an exception, indicate that
2148 * decl2.c (mark_used): Do not defer the instantiation of
2149 functions, if the current function does not throw.
2150 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2151 * pt.c (instantiate_decl): Make sure import_export_decl is called
2152 before emitting things.
2153 * rtti.c (throw_bad_cast): Use build_cxx_call.
2154 (build_dynamic_cast_1): Likewise.
2155 * typeck.c (build_function_call): Likewise.
2157 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
2160 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
2161 expressions. Reverts my 2002-08-08 patch.
2163 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
2166 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2168 * cp/decl2.c (start_static_storage_duration_function): Take count
2169 arg, don't check if it wraps round.
2170 (generate_ctor_or_dtor_function): Add locus arg, use it.
2171 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
2173 (finish_file): Set line numbers to past EOF for synthesized
2176 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2179 * search.c (lookup_field_1): Final scan goes backwards for
2180 types, forwards for non-types.
2182 2003-04-17 Roger Sayle <roger@eyesopen.com>
2185 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
2186 "nothrow" function attributes.
2188 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2191 * pt.c (type_dependent_expression_p): Handle array new.
2193 2003-04-15 Mark Mitchell <mark@codesourcery.com>
2196 * parser.c (cp_parser_primary_expression): Reorganize logic for
2197 dealing with name lookup failures.
2199 2003-04-15 Jason Merrill <jason@redhat.com>
2201 * decl2.c (mark_used): Don't instantiate anything if
2204 2003-04-14 Ziemowit Laski <zlaski@apple.com>
2206 * tree.c (build_cplus_array_type_1): Do not call
2207 uses_template_parms() on a NULL index_type.
2209 2003-04-13 Roger Sayle <roger@eyesopen.com>
2211 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
2213 2003-04-12 Mark Mitchell <mark@codesourcery.com>
2216 * init.c (build_new_1): Reorganize.
2218 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2220 * class.c (initialize_array)
2221 * decl.c (reshape_init)
2222 * decl2.c (build_expr_from_tree)
2223 * init.c (build_zero_init)
2224 * pt.c (tsubst_copy, tsubst_copy_and_build)
2225 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
2226 (ptm_initializer, class_initializer, get_pseudo_ti_init)
2227 * semantics.c (finish_compound_literal)
2228 * typeck.c (build_ptrmemfunc1)
2229 * typeck2.c (store_init_value, process_init_constructor)
2230 (build_functional_cast): Use build_constructor.
2232 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2234 * call.c (print_z_candidates): Use gcc_gettext_width, not
2235 strlen, to determine how much padding to use.
2237 2003-04-10 Zack Weinberg <zack@codesourcery.com>
2239 * decl.c: Update all calls to shadow_warning.
2241 2003-04-10 Mark Mitchell <mark@codesourcery.com>
2243 * class.c (layout_class_type): Correct handling for overlong
2244 bit-fields whose width is the same as an integer type.
2246 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2248 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
2249 * cp-lang.c (cp_tree_size): New function.
2250 (LANG_HOOKS_TREE_SIZE): Override.
2252 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
2253 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
2254 (union lang_tree_node): Remove common and srcloc members.
2255 (build_srcloc_here): Don't prototype.
2256 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
2257 * pt.c (pending_templates): Correct comment.
2258 * tree.c (build_srcloc, build_srcloc_here): Kill.
2260 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2262 * call.c: Include intl.h.
2263 (print_z_candidate): Always use inform; get rid of errfn
2264 argument. Reorganize so that all the strings get picked up
2265 by xgettext. Note obligation of caller to pass first argument
2267 (print_z_candidates): Update to match. Indent second and
2268 successive candidates by strlen() of translated message.
2269 (joust): Restructure ambiguous-conversion pedwarn so that
2270 translators see a complete sentence. Update calls to
2273 * Make-lang.in (cp/call.o): Update dependencies.
2275 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2277 * decl.c (set_current_binding_level): Delete, revert last change.
2278 (current_binding_level): Modify to allow it as as lvalue.
2280 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2282 * name-lookup.c (find_binding): Pass appropriate pointer type to
2283 POP_TIMEVAR_AND_RETURN.
2285 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2287 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
2288 * cp-tree.h: Don't insist on having GNUC.
2290 2003-04-03 Jason Merrill <jason@redhat.com>
2292 * cvt.c (ocp_convert): Only abort if we try to convert an object
2293 of TREE_ADDRESSABLE type.
2295 * class.c (build_vtable): Set DECL_ALIGN here.
2296 (get_vtable_decl): Not here.
2297 (layout_vtable_decl): Or here.
2298 (create_vtable_ptr): Or here.
2299 (layout_class_type): Or here.
2300 (check_bitfield_decl): Don't mess with field alignment.
2302 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2304 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
2305 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
2306 * rtti.c (dfs_class_hint_mark): Likewise.
2308 * decl.c (push_local_name, push_class_level_binding,
2309 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
2310 functions returning void.
2311 * decl2.c (add_using_namespace): Likewise.
2313 * decl.c (print_binding_level, print_other_binding_stack,
2314 print_binding_stack): Cast argument of %p specifier to void*.
2315 * ptree.c (cxx_print_decl): Likewise.
2317 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2318 VAR_FUNCTION_OR_PARM_DECL_CHECK,
2319 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2320 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
2321 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
2323 * decl.c (set_current_binding_level): New macro. Use throughout
2324 when setting the current binding level.
2326 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
2328 * method.c (mangling_flags): Likewise.
2330 * cp-tree.h (lang_type_header): Add __extension__ and use
2331 CHAR_BITFIELD for members.
2333 2003-04-02 Geoffrey Keating <geoffk@apple.com>
2336 * mangle.c: Include gt-cp-mangle.h.
2337 (subst_identifiers): Mark with GTY.
2338 * config-lang.in (gtfiles): Add cp/mangle.c.
2339 * Make-lang.in: (gt-cp-mangle.h): New rule.
2340 (cp/mangle.o): Depends on gt-cp-mangle.h.
2342 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
2344 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
2345 after \$(srcdir)/cp/name-lookup.h.
2346 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
2347 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
2348 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
2349 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2351 2003-03-31 Jason Merrill <jason@redhat.com>
2354 * class.c (check_field_decl): Don't set DECL_ALIGN.
2356 2003-03-30 Mark Mitchell <mark@codesourcery.com>
2359 * decl.c (grokdeclarator): Tidy, slightly.
2360 * search.c (lookup_field_1): Add want_type parameter.
2361 (lookup_field_r): Adjust call to lookup_field_1.
2363 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2365 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
2367 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2369 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
2371 (cxx_scope_find_binding_for_name): Likewise.
2372 * decl.c (find_binding: Move to name-lookup.c.
2373 (binding_for_name): Likewise.
2374 (cxx_scope_find_binding_for_name): Likewise.
2375 (BINDING_LEVEL): Remove.
2376 (push_binding): Tidy.
2377 (push_class_binding): Likewise.
2378 (pop_binding): Likewise.
2379 (poplevel): Likewise.
2380 (poplevel_class): Likewise.
2381 (set_identifier_type_value_with_scope): Likewise.
2382 (push_overloaded_decl): Likewise.
2383 (lookup_tag): Likewise.
2384 (unqualified_namespace_lookup): Likewise.
2385 (lookup_name_current_level): Likewise.
2386 (maybe_inject_for_scope_var): Likewise.
2387 (namespace_binding): Move to name-lookup.c.
2388 (set_namespace_binding): Likewise.
2389 * decl2.c (lookup_using_namespace): Tidy.
2390 (qualified_lookup_using_namespace): Likewise.
2391 (do_toplevel_using_decl): Likewise.
2392 * name-lookup.c: Include "timevar.h"
2393 * name-lookup.h (cxx_scope): Declare.
2394 (struct cxx_binding): Lose member "has_level". Adjust "scope"
2396 (BINDING_SCOPE): Adjust definition.
2397 (BINDING_HAS_LEVEL_P): Remove.
2399 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2401 * name-lookup.c: New file.
2402 * name-lookup.h: Likewise..
2403 * decl.c (push_binding): Adjust use cxx_binding_make.
2404 (free_bindings): Move to name-lookup.c
2405 (pop_binding): Use cxx_binding_free.
2406 (binding_for_name): Tidy.
2407 * cp-tree.h: Include "name-lookup.h"
2408 (cxx_binding_make): Move to name-lookup.h
2409 (cxx_binding_clear): Likewise.
2410 (struct cxx_binding): Likewise.
2411 (LOCAL_BINDING_P): Likewise.
2412 (INHERITED_VALUE_BINDING_P): Likewise.
2413 (BINDING_SCOPE): Likewise.
2414 (BINDING_HAS_LEVEL_P): Likewise.
2415 (BINDING_VALUE): Likewise.
2416 (BINDING_TYPE): Likewise.
2417 * config-lang.in (gtfiles): Add cp/name-lookup.h
2418 * Make-lang.in (cp/name-lookup.o): New rule.
2419 (CXX_OBJS): Add cp/name-lookup.o
2420 (CXX_TREE_H): Add cp/name-lookup.h
2422 2003-03-28 Jason Merrill <jason@redhat.com>
2425 * cvt.c (force_rvalue): New fn.
2426 * call.c (build_conditional_expr): Use it.
2427 * cp-tree.h: Declare it.
2429 2003-03-28 Mike Stump <mrs@apple.com>
2431 * error.c (dump_expr): Add 0x to printed hex numbers to make
2432 output match source code better.
2434 2003-03-28 Mark Mitchell <mark@codesourcery.com>
2437 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2440 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2441 non-existant ssdf_decls array.
2442 (finish_file): Call generator_ctor_or_dtor_function when there are
2443 static constructors or destructors and no other static
2446 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
2449 * decl2.c (finish_file): Don't warn about explicitly instantiated
2452 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2455 * pt.c (lookup_template_class): Only check instantiated args if
2456 they do not contain template parameters.
2458 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2461 * parser.c (cp_parser_function_definition): Set
2462 DECL_INITIALIZED_IN_CLASS for members.
2463 * pt.c (instantiate_decl): Only reduce the template args for
2464 friends that are not defined in class.
2466 2003-03-25 Jason Merrill <jason@redhat.com>
2468 * call.c (print_z_candidate): Change name of first arg to msgid.
2469 (joust): Add comment for translators.
2471 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2473 PR c++/9898, PR c++/383, DR 322
2474 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2475 through reference types on both PARM and ARG.
2477 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2480 * error.c (dump_expr) <BASELINK>: Use dump_expr.
2481 * pt.c (maybe_fold_nontype_args): New function.
2482 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2483 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2484 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2485 maybe_fold_nontype_args.
2487 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2490 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2492 2003-03-23 Mark Mitchell <mark@codesourcery.com>
2495 * typeck.c (cxx_mark_addressable): Adjust call to
2496 gen_mem_addressof or put_var_into_stack.
2498 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
2500 PR c++/9978, c++/9708
2501 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2502 * call.c (add_template_candidate_real): Adjust
2503 instantiate_template call.
2504 * class.c (resolve_address_of_overloaded_function): Likewise.
2505 * decl.c (build_enumerator): Set TREE_CONSTANT.
2506 * pt.c (check_instantiated_args): New.
2507 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2509 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2510 (reduce_template_parm_level): Likewise.
2511 (process_template_parm): Likewise.
2512 (check_explicit_specialization): Adjust instantiate_template call.
2513 (convert_template_argument): Don't check non-type argument here.
2514 (lookup_template_class): Check them here.
2515 (tsubst_friend_function): Adjust instantiate_template call.
2516 (instantiate_template): Add tsubst_flags parameter, use it. Check
2519 2003-03-21 Zack Weinberg <zack@codesourcery.com>
2521 * decl.c: Update calls to shadow_warning.
2523 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
2526 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2527 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2529 2003-03-20 Mark Mitchell <mark@codesourcery.com>
2531 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2533 * cp/pt.c (instantiate_class_template): Fix formatting.
2535 2003-03-14 Matt Austern <austern@apple.com>
2537 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2538 (unemitted_tinfo_decl_p): Remove.
2539 (emit_tinfo_decl): Change declaration to remove unused parameter.
2540 * decl2.c (finish_file): Change tinfo emission to loop through
2541 unemitted_tinfo_decls array instead of looping through all decls.
2542 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2543 unused second parameter.
2544 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2545 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2546 (emit_tinfo_decl): remove unused second parameter, add assertion
2547 that decl hasn't already been emitted.
2549 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
2551 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2552 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2555 2003-03-19 Jason Merrill <jason@redhat.com>
2557 PR c++/8316, c++/9315, c++/10136
2558 * call.c (print_z_candidate): Split out from...
2559 (print_z_candidiates): ...here.
2562 2003-03-17 Roger Sayle <roger@eyesopen.com>
2565 * decl.c (duplicate_decls): Use the new type when prototyping
2566 anticipated decls, even when the types match. This defines the
2567 exception list for the built-in function.
2569 2003-03-17 Jason Merrill <jason@redhat.com>
2572 * typeck.c (build_class_member_access_expr): Compare
2575 2003-03-17 Mark Mitchell <mark@codesourcery.com>
2578 * parser.c (cp_parser_declarator_id): Clear parser->scope.
2580 2003-03-16 Jason Merrill <jason@redhat.com>
2583 * decl.c (finish_function): Only allow the NRVO to use variables
2584 declared at function scope.
2586 2003-03-17 Andreas Jaeger <aj@suse.de>
2588 * Make-lang.in (cp/TAGS): Remove.
2590 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
2593 * cp-tree.h (struct language_function): Add in_base_initializer.
2594 (in_base_initializer): define it.
2595 (expand_member_init): Remove INIT param.
2596 * init.c (expand_member_init): Remove INIT param, return the member.
2597 (emit_mem_initializers): Set in_base_initializer.
2598 * class.c (build_base_path): Check in_base_initializer.
2599 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
2600 * pt.c (tsubst_initializer_list): Likewise.
2602 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2604 * decl.c (binding_for_name): Fix initialization thinko.
2606 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2608 Compile-time improvement: 2/n.
2609 * cp-tree.h (struct cxx_binding): New datatype;
2610 (struct lang_identifier): Use it.
2611 (LOCAL_BINDING_P): Adjust definition.
2612 (INHERITED_VALUE_BINDING_P): Likewise.
2613 (BINDING_SCOPE): Likewise.
2614 (BINDING_HAS_LEVEL_P): Likewise.
2615 (BINDING_VALUE): Likewise.
2616 (BINDING_TYPE): Likewise.
2617 (IDENTIFIER_VALUE): Likewise.
2618 (struct tree_binding): Remove.
2619 (TS_CP_BINDING): Likewise.
2620 ((union lang_tree_node): Remove field "binding".
2621 (cxx_binding_clear): New macro.
2622 (binding_for_name): Adjust return type.
2623 (qualified_lookup_using_namespace): Adjust prototype.
2624 (lookup_using_namespace): Adjust prototype.
2625 (cxx_scope_find_binding_for_name): Declare.
2626 * cp-tree.def: Remove CPLUS_BINDING definition.
2627 * decl.c (push_binding): Adjust local variable type.
2628 (add_binding): Likewise.
2629 (push_class_binding): Likewise.
2630 (pop_binding): Likewise.
2631 (poplevel): Likewise.
2632 (poplevel_class): Likewise.
2633 (free_bindings): Adjust type.
2634 (find_binding): Adjust return type, add a third parameter. Remove
2635 non-useful assertion now that we use static typing.
2636 (cxx_scope_find_binding_for_name): New function.
2637 (binding_for_name): Use it. Adjust local variable type. Simplify.
2638 (namespace_binding): Simplify.
2639 (set_namespace_binding): Likewise.
2640 (set_identifier_type_value_with_scope): Adjust local variable type.
2641 (lookup_tag): Don't type-abuse of local variable 'old'.
2642 (lookup_namespace_name): Likewise. Allocate binding on stack.
2643 (select_decl): Adjust prototype.
2644 (unqualified_namespace_lookup): Allocate binding on stack.
2645 Don't type-abuse of local variable 'val'.
2646 (lookup_name_real): Likewise.
2647 (maybe_inject_for_scope_var): Adjust local variable type.
2648 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2649 (namespace_binding): Adjust logic, simplify.
2650 (BINDING_LEVEL): Adjust definition.
2651 (push_class_level_binding): Adjust local variable type.
2652 (struct cxx_saved_binding): Adjust field 'binding' type.
2653 * decl2.c (ambiguous_decl): Adjust prototype.
2654 (lookup_using_namespace): Adjust local variable type.
2655 (qualified_lookup_using_namespace): Catch type error and correct
2656 ensueing logic error.
2657 (do_nonmember_using_decl): Adjust local variable type. Allocate
2658 temporary cxx_binding on stack.
2659 (do_toplevel_using_decl): Adjust local variable type.
2660 * ptree.c (cxx_print_cxx_binding): New function.
2661 (cxx_print_identifier): Use it.
2662 (cxx_print_xnode): Delete CPLUS_BINDING case label.
2664 2003-03-15 Roger Sayle <roger@eyesopen.com>
2666 * tree.c (count_functions): Fix whitespace.
2668 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
2670 * Make-lang.in: Update.
2672 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2675 * pt.c (maybe_process_partial_specialization): Handle
2676 member class template when enclosing class template is
2677 explicit specialized.
2678 (most_general_template): Stop looking when DECL is already
2681 2003-03-13 Jason Merrill <jason@redhat.com>
2684 * search.c (lookup_conversions): Call complete_type here.
2685 * call.c (implicit_conversion): Not here.
2687 2003-03-13 Mark Mitchell <mark@codesourcery.com>
2689 * decl2.c (do_nonmember_using_decl): Correct handling of
2690 simultaneous type/non-type bindings.
2692 * call.c (initialize_reference): Remove bogus assertion.
2693 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2695 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
2698 * expr.c (cxx_expand_expr): Return const0_rtx for throw
2701 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2704 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2705 to merge old and new declarations.
2707 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2710 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2711 (cp/g++.1): Build it from scratch in the build tree.
2712 (c++.install-man): Depend on it. Install it from the build tree.
2713 (c++.mostlyclean): Clean it.
2715 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2718 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2719 to merge old and new declarations.
2722 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2724 2003-03-11 Jason Merrill <jason@redhat.com>
2727 * search.c (lookup_member): Fix handling of functions in a class
2730 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2733 * call.c (convert_class_to_reference): Adjust usage of
2735 (any_viable): Remove.
2736 (splice_viable): Combine with any_viable.
2737 (print_z_candidates): Avoid printing duplicates.
2738 (build_user_type_conversion_1): Adjust usage of splice_viable.
2739 (build_new_function_call): Likewise.
2740 (build_operator_new_call): Likewise.
2741 (build_object_call): Likewise.
2742 (build_conditional_expr): Likewise.
2743 (build_new_op): Likewise.
2744 (build_new_method_call): Likewise.
2745 (joust): Remove spurious comment.
2746 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2747 * decl2.c (arg_assoc_class): Simplify.
2748 * friend.c (add_friend): Likewise.
2750 2003-03-11 Jason Merrill <jason@redhat.com>
2753 * decl2.c (check_classfn): A member template only matches a
2756 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
2758 * Make-lang.in (CXX_C_OBJS): Update.
2759 * lang-specs.h: Don't define __GNUG__ here.
2761 2003-03-10 Mark Mitchell <mark@codesourcery.com>
2763 * call.c (perform_overload_resolution): New function.
2764 (build_new_function_call): Use it.
2765 (build_operator_new_call): Likewise.
2766 (add_candidates): Add explicit_targs and template_only parameters.
2767 (build_new_op): Adjust accordingly.
2768 * cp-tree.h (build_operator_new_call): New function.
2769 (build_function_call_real): Remove.
2770 (build_function_call_maybe): Likewise.
2771 * init.c (build_new_1): Use build_operator_new_call.
2772 * typeck.c (build_function_call_real): Rename to ...
2773 (build_function_call): ... this.
2775 2003-03-10 Devang Patel <dpatel@apple.com>
2778 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2780 2003-03-10 Jason Merrill <jason@redhat.com>
2783 * decl.c (push_using_directive): Push before recursing.
2785 PR c++/9868, c++/9524
2786 * call.c (resolve_scoped_fn_name): Handle the case of a function
2789 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
2790 argument in the pointer-to-member case.
2792 2003-03-09 Mark Mitchell <mark@codesourcery.com>
2795 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
2796 pointers to member functions.
2799 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
2800 in pointer-to-member-function types.
2802 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2804 * expr.c (cplus_expand_constant): Use C90 prototype style.
2805 (cxx_expand_expr): Likewise.
2807 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2810 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
2813 2003-03-08 Geoffrey Keating <geoffk@apple.com>
2815 * lang-specs.h (c++-header): Change .pch to .gch.
2817 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
2819 * cp-tree.h (cxx_init): Update prototype.
2820 * lex.c (cxx_init): Similarly.
2822 2003-03-08 Mark Mitchell <mark@codesourcery.com>
2825 * cp-tree.h (begin_mem_initializers): Remove.
2826 * parser.c (cp_parser_mem_initializer_list): Inline it here.
2827 Do not call finish_mem_initializers if not in a constructor.
2828 (cp_parser_class_head): Fix typo in error message.
2829 * semantics.c (begin_mem_initializers): Remove.
2830 * testsuite/g++.dg/parser/constructor1.C: New test.
2833 * call.c (add_function_candidate): Skip builtin fuctions that have
2834 not yet been declared.
2837 * init.c (build_new_1): Correct logic for determining whether or
2838 not to use an array cookie.
2841 * parser.c (cp_parser_postfix_expression): Call
2842 finish_non_static_data_member, even when processing_template_decl.
2845 * cp-tree.h (is_ancestor): New function.
2846 (handle_class_head): Change prototype.
2847 * decl2.c (is_namespace_ancestor): Rename to ...
2848 (namespace_anecestor): ... this.
2849 (set_decl_namespace): Adjust accordingly.
2850 (handle_class_head): Remove unncessary parameters.
2851 * parser.c (cp_parser_class_head): Check that
2852 nested-name-specifiers are used appropriately.
2854 2003-03-07 Mark Mitchell <mark@codesourcery.com>
2856 * call.c (reference_binding): Remove REF_IS_VAR parameter.
2857 (implicit_conversion): Adjust call to reference_binding.
2858 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
2859 (initialize_reference): Adjust handling for references bound to
2861 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
2863 (real_non_cast_lvalue_p): New method.
2864 * cvt.c (build_up_reference): Adjust use of
2865 make_temporary_var_for_ref_to_temp.
2866 * tree.c (real_non_cast_lvalue_p): New method.
2868 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2870 * except.c (init_exception_processing): Use C90 prototype style.
2871 (cp_protect_cleanup_actions): Likewise.
2872 (prepare_eh_type): Likewise.
2873 (build_eh_type_type): Likewise.
2874 (build_exc_ptr): Likewise.
2875 (do_begin_catch): Likewise.
2876 (dtor_nothrow): Likewise.
2877 (do_end_catch): Likewise.
2878 (push_eh_cleanup): Likewise.
2879 (decl_is_java_type): Likewise.
2880 (choose_personality_routine): Likewise.
2881 (initialize_handler_parm): Likewise.
2882 (expand_start_catch_block): Likewise.
2883 (expand_end_catch_block): Likewise.
2884 (begin_eh_spec_block): Likewise.
2885 (finish_eh_spec_block): Likewise.
2886 (do_allocate_exception): Likewise.
2887 (do_free_exception): Likewise.
2888 (wrap_cleanups_r): Likewise.
2889 (stabilize_throw_expr): Likewise.
2890 (build_throw): Likewise.
2891 (complete_ptr_ref_or_void_ptr_p): Likewise.
2892 (is_admissible_throw_operand): Likewise.
2893 (nothrow_libfn_p): Likewise.
2894 (can_convert_eh): Likewise.
2895 (check_handlers_1): Likewise.
2896 (check_handlers): Likewise.
2898 2003-03-06 Mark Mitchell <mark@codesourcery.com>
2900 * call.c (merge_conversion_sequences): New function.
2901 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
2902 (convert_class_to_reference): Correct handling of second
2903 standard conversion sequence in a user-defined conversion
2905 (build_user_type_conversion_1): Use merge_conversion_sequences.
2906 * cp-tree.def: Add comments for CONV nodes.
2907 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
2909 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2911 * error.c (init_error): Use C90 prototype style.
2912 (dump_scope): Likewise.
2913 (dump_qualifiers): Likewise.
2914 (dump_template_argument): Likewise.
2915 (dump_template_argument_list): Likewise.
2916 (dump_template_parameter): Likewise.
2917 (dump_template_bindings): Likewise.
2918 (dump_type): Likewise.
2919 (dump_typename): Likewise.
2920 (class_key_or_enum): Likewise.
2921 (dump_aggr_type): Likewise.
2922 (dump_type_prefix): Likewise.
2923 (dump_type_suffix): Likewise.
2924 (dump_global_iord): Likewise.
2925 (dump_simple_decl): Likewise.
2926 (dump_decl): Likewise.
2927 (dump_template_decl): Likewise.
2928 (dump_function_decl): Likewise.
2929 (dump_parameters): Likewise.
2930 (dump_exception_spec): Likewise.
2931 (dump_function_name): Likewise.
2932 (dump_template_parms): Likewise.
2933 (dump_char): Likewise.
2934 (dump_expr_list): Likewise.
2935 (dump_expr): Likewise.
2936 (dump_binary_op): Likewise.
2937 (dump_unary_op): Likewise.
2938 (type_as_string): Likewise.
2939 (expr_as_string): Likewise.
2940 (decl_as_string): Likewise.
2941 (context_as_string): Likewise.
2942 (lang_decl_name): Likewise.
2943 (cp_file_of): Likewise.
2944 (cp_line_of): Likewise.
2945 (decl_to_string): Likewise.
2946 (expr_to_string): Likewise.
2947 (fndecl_to_string): Likewise.
2948 (code_to_string): Likewise.
2949 (language_to_string): Likewise.
2950 (parm_to_string): Likewise.
2951 (op_to_string): Likewise.
2952 (type_to_string): Likewise.
2953 (assop_to_string): Likewise.
2954 (args_to_string): Likewise.
2955 (cv_to_string): Likewise.
2956 (cxx_print_error_function): Likewise.
2957 (cp_diagnostic_starter): Likewise.
2958 (cp_diagnostic_finalizer): Likewise.
2959 (cp_print_error_function): Likewise.
2960 (function_category): Likewise.
2961 (print_instantiation_full_context): Likewise.
2962 (print_instantiation_partial_context): Likewise.
2963 (maybe_print_instantiation_context): Likewise.
2964 (print_instantiation_context): Likewise.
2965 (cp_printer): Likewise.
2966 (print_integer): Likewise.
2967 (print_non_consecutive_character): Likewise.
2968 (locate_error): Likewise.
2970 2003-03-06 Mark Mitchell <mark@codesourcery.com>
2973 * call.c (reference_binding): Add ref_is_var parameter.
2974 (implicit_conversion): Adjust call to reference_binding.
2975 (initialize_reference): Likewise.
2978 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
2982 * class.c (get_basefndecls): Use lookup_fnfields_1.
2984 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2987 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
2989 (cp_parser_single_declaration): Likewise.
2991 2003-03-05 Jason Merrill <jason@redhat.com>
2994 * call.c (build_conditional_expr): Use convert rather than an
2997 2003-03-02 Matt Austern <austern@apple.com>
2999 * decl.c (cp_binding_level): Add static_decls varray member.
3000 (add_decl_to_level): Add static/inline namespace scope
3001 declarations to static_decls array.
3002 (wrapup_global_for_namespace): Pass static_decls only, instead of
3003 all decls, to wrapup_global_declarations/check_global_declarations.
3004 (push_namespace): Initialize static_decls for ordinary namespaces.
3005 (cxx_init_decl_processing): Initialize static_decls for global
3008 2003-03-05 Mark Mitchell <mark@codesourcery.com>
3010 * class.c (end_of_class): Correct thinko.
3012 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
3014 * config-lang.in: Replace ${libstdcxx_version} by its value.
3016 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3018 * cp-tree.h (cxx_saved_binding): Declare.
3019 (struct saved_scope): Adjust type of field 'old_binding'.
3020 * decl.c (cxx_saved_binding_make): New macro.
3021 (struct cxx_saved_binding): Define.
3022 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
3024 (maybe_push_to_top_level): Adjust local variable type.
3025 (pop_from_top_level): Likewise.
3027 2003-03-04 Tom Tromey <tromey@redhat.com>
3029 * Make-lang.in (c++.tags): New target.
3031 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
3033 * Make-lang.in: Update.
3035 2003-03-03 Jason Merrill <jason@redhat.com>
3037 * decl.c (finish_enum): Do set the type in a template. Simplify.
3038 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3040 2003-03-03 Mark Mitchell <mark@codesourcery.com>
3043 * call.c (convert_class_to_reference): Correct conversion
3045 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3046 (implicit_conversion): Adjust call to reference_binding.
3047 (add_candidate): Change type of candidates parameter.
3048 (add_function_candidate): Likewise.
3049 (add_conv_candidate): Likewise.
3050 (build_builtin_candidate): Likewise.
3051 (add_builtin_candidate): Likewise.
3052 (add_builtin_candidates): Likewise.
3053 (add_template_candidate_real): Likewise.
3054 (add_template_candidate): Likewise.
3055 (add_template_conv_candidate): Likewise.
3056 (build_user_type_conversion_1): Adjust accordingly.
3057 (build_object_call): Likewise.
3058 (build_conditional_expr): Likewise.
3059 (add_candidates): Likewise.
3060 (build_new_op): Likewise.
3061 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
3062 (build_new_method_call): Adjust calls to add_function_candidate.
3063 (make_temporary_var_for_ref_to_temp): New function.
3064 (initialize_reference): Add decl parameter.
3065 * class.c (build_rtti_vtbl_entries): Use build_address and
3067 * cp-tree.h (initialize_reference): Change prototype.
3068 (make_temporary_var_for_ref_to_temp): New function.
3069 (build_type_conversion): Change prototype.
3070 (build_address): New function.
3071 (build_nop): Likewise.
3072 * cvt.c (cp_convert_to_pointer): Adjust call to
3073 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
3075 (convert_to_pointer_force): Use build_nop.
3076 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3077 (convert_to_reference): Adjust call to build_type_conversion.
3078 (ocp_convert): Likewise.
3079 (build_type_conversion): Remove for_sure parameter.
3080 * decl.c (grok_reference_init): Use initialize_reference.
3081 * typeck.c (build_address): New function.
3082 (build_nop): Likewise.
3083 (build_unary_op): Use them.
3084 (build_ptrmemfunc): Tidy slightly.
3085 (convert_for_initialization): Adjust call to
3086 initialize_reference.
3087 * typeck2.c (store_init_value): Remove #if 0'd code.
3089 2003-03-03 Jason Merrill <jason@redhat.com>
3091 * decl.c (start_function): Clear DECL_NUM_STMTS.
3093 * class.c (get_vtable_decl): Use vtbl_type_node.
3094 (build_primary_vtable): Check for it.
3096 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
3098 * decl.c (check_initializer): Check for vector_opaque_p.
3100 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
3102 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3103 invoke an external cpp during compilation.
3105 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3107 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3109 (start_decl): Likewise.
3110 (start_function): Likewise.
3112 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
3114 * Make-lang.in (CXX_C_OBJS): Update.
3116 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3119 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3122 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
3124 * parser.c (cp_parser_init_declarator): Revert opaque
3125 vector_opaque_p change.
3126 Do not include target.h.
3128 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3131 * cp-tree.h (build_zero_init): Add parameter.
3132 * decl.c (cp_finish_decl): Adjust call.
3133 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
3135 (build_default_init): Add nelts parameter. Adjust calls to
3137 (build_new_1): Adjust call to build_default_init.
3138 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3140 2003-02-26 Devang Patel <dpatel@apple.com>
3142 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3143 required. Postpone enum setting for template decls.
3144 (build_enumerator): Delay copying value node until finish_enum
3145 (). Remove #if 0'ed code.
3146 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3147 (tsubst_copy): Add check for enum type.
3149 2003-02-25 Mark Mitchell <mark@codesourcery.com>
3152 * decl2.c (prune_vars_needing_no_initialization): Do not throw
3153 away initializations for DECL_EXTERNAL VAR_DECLs.
3154 (finish_file): Adjust accordingly.
3155 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3157 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3159 * decl.c (add_binding): Time TV_NAME_LOOKUP.
3160 (push_class_binding): Likewise.
3161 (set_namespace_binding): Likewise.
3163 2003-02-24 Mark Mitchell <mark@codesourcery.com>
3166 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
3167 specializations back to the main template.
3168 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
3169 * pt.c (resolve_typename_type): Likewise.
3171 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
3174 * pt.c (tsubst_copy_and_build): For a templated function inside a
3175 scope, process template arguments.
3177 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3180 * typeck2.c (abstract_virtuals_error): Don't check when
3181 TYPE is still template parameter dependent.
3183 2003-02-23 Mark Mitchell <mark@codesourcery.com>
3186 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
3187 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
3188 * pt.c (instantiate_class_template): Don't try to instantiate
3190 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
3192 2003-02-21 Mark Mitchell <mark@codesourcery.com>
3195 * decl.c (grokdeclarator): Do not allow parameters with variably
3198 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
3200 * search.c (grow_bfs_bases): Remove. Fold into ...
3201 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
3204 2003-02-20 Mark Mitchell <mark@codesourcery.com>
3207 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
3208 when the G++ 3.2 ABI prevents correct compilation.
3210 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3212 Change base class access representation. Share virtual base
3214 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
3216 * cp/class.c (build_base_path): Likewise.
3217 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
3218 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
3219 (make_new_vtable): Adjust.
3220 (force_canonical_binfo_r): Delete.
3221 (force_canonical_binfo): Delete.
3222 (mark_primary_virtual_base): Delete.
3223 (dfs_unshared_virtual_bases): Delete.
3224 (mark_primary_bases): Adjust.
3225 (maybe_warn_about_overly_private_class): Adjust.
3226 (dfs_base_derived_from): Delete.
3227 (base_derived_from): Follow the inheritance chain.
3228 (struct find_final_overrider_data): Add vpath member.
3229 (dfs_find_final_overrider): Adjust.
3230 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
3231 (find_final_overrider): Adjust.
3232 (update_vtable_entry_for_fn): Adjust.
3233 (modify_all_vtables): Adjust.
3234 (walk_subobject_offsets): Adjust.
3235 (layout_nonempty_base_or_field): Adjust.
3236 (layout_empty_base): Remove last parameter. Adjust.
3237 (build_base_field): Adjust.
3238 (build_base_fields): Adjust.
3239 (propagate_binfo_offsets): Remove last parameter. Adjust.
3240 (dfs_set_offset_for_unshared_vbases): Delete.
3241 (layout_virtual_bases): Adjust.
3242 (finish_struct_1): Adjust.
3243 (init_class_processing): Don't init access nodes.
3244 (dfs_get_primary_binfo): Delete.
3245 (get_primary_binfo): Adjust.
3246 (dump_class_hierarchy_r): Remove most derived arg, add IGO
3248 (dump_class_hierarchy): Adjust.
3249 (finish_vtbls): Adjust.
3250 (get_original_base): Delete.
3251 (build_vtt_inits): Adjust.
3252 (dfs_build_secondary_vptr_vtt_inits): Adjust.
3253 (dfs_ctor_vtable_bases_queue_p): Adjust.
3254 (build_ctor_vtbl_group): Adjust.
3255 (dfs_accumulate_vtbl_inits): Adjust.
3256 (build_vtbl_initializer): Adjust.
3257 (build_vbase_offset_vtbl_entries): Adjust.
3258 (add_vcall_offset_vtbl_entries_1): Adjust.
3259 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
3260 (access_*_node): Remove.
3261 (CANONICAL_BINFO): Delete.
3262 (BINFO_UNSHARED_MARKED): Remove.
3263 (BINFO_MARKED): Set LANG_FLAG_0 directly.
3264 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
3265 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
3266 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
3268 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
3269 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3270 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
3272 (BINFO_DEPENDENT_BASE_P): New.
3273 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
3275 (markedp, unmarkedp): Adjust.
3276 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
3277 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
3278 find_vbase_instance, binfo_for_vbase): Delete.
3279 (copied_binfo, original_binfo): Declare.
3280 (finish_base_specifier): Add virtual_p arg.
3281 (unshare_base_binfos): Delete.
3282 (copy_base_binfos): Declare.
3283 (reverse_path): Delete.
3284 * cp/decl.c (xref_basetypes): Access and virtuality passed
3285 differently. Don't copy direct base binfos here. Call
3287 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
3288 (initialize_vtbl_ptrs): Adjust.
3289 (expand_member_init): Adjust.
3290 * cp/parser.c (cp_parser_base_specifier): Adjust.
3291 * cp/pt.c (instantiate_class_template): Adjust.
3292 (get_template_base_recursive): Adjust.
3293 * cp/rtti.c (get_pseudo_ti_init): Adjust.
3294 (get_pseudo_ti_desc): Adjust.
3295 * cp/tree.c (unshare_base_binfos): Rename to ...
3296 (copy_base_binfos): ... here, reimplement.
3297 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
3298 (reverse_path): Remove.
3299 * cp/typeck.c (get_delta_difference): Adjust error messages.
3300 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
3301 * cp/search.c (lookup_base_r): Adjust.
3302 (dynamic_cast_base_recurse): Adjust.
3303 (canonical_binfo): Remove.
3304 (dfs_canonical_queue): Remove.
3305 (dfs_assert_unmarked_p): Remove.
3306 (assert_canonical_unmarked): Remove.
3307 (shared_marked_p, shared_unmarked_p): Remove.
3308 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
3309 (dfs_access_in_type): Adjust.
3310 (access_in_type): Adjust.
3311 (dfs_accessible_queue_p): Adjust.
3312 (dfs_accessible_p): Adjust.
3313 (is_subobject_of_p_1, is_subobject_of_p): Remove.
3314 (struct lookup_field_info): Remove from_dep_base_p field.
3315 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
3316 (lookup_field_r): Remove dependent base code.
3317 (lookup_member): Likewise.
3318 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
3319 (dfs_unmarked_real_bases_queue_p): Remove.
3320 (dfs_marked_real_bases_queue_p): Remove.
3321 (dfs_skip_vbases): Remove.
3322 (dfs_get_pure_virtuals): Adjust.
3323 (markedp, unmarkedp): Adjust.
3324 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
3325 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
3326 (dfs_unmark): Adjust.
3327 (dfs_get_vbase_types):Remove.
3328 (dfs_build_inheritance_graph_order): Remove.
3329 (get_vbase_types): Remove
3330 (dfs_find_vbase_instance): Remove.
3331 (find_vbase_instance): Remove.
3332 (dfs_debug_unmarkedp): Adjust.
3333 (dependent_base_p): Remove.
3334 (dfs_push_type_decls): Adjust.
3335 (dfs_push_decls): Adjust.
3336 (dfs_no_overlap_yet): Adjust.
3337 (copied_binfo): New function.
3338 (original_binfo): New function.
3339 (binfo_for_vbase): Remove.
3341 2003-02-18 Zack Weinberg <zack@codesourcery.com>
3343 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
3344 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
3347 2003-02-18 Mark Mitchell <mark@codesourcery.com>
3350 * class.c (layout_class_type): In the 3.2 ABI, take into account
3351 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
3353 2003-02-18 Matt Austern <austern@apple.com>
3355 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
3357 * cp/decl.c (wrapup_globals_for_namespace): Remove special
3358 handling of global namespace.
3360 2003-02-18 Geoffrey Keating <geoffk@apple.com>
3362 * cp-tree.h (rid_to_yy): Delete.
3363 (C_RID_YYCODE): Delete.
3364 (finish_file): Delete redundant declaration.
3366 2003-02-18 Jason Merrill <jason@redhat.com>
3369 * decl.c (reshape_init): Don't mess with initializer labels.
3372 * parser.c (cp_parser_postfix_expression): Set idk properly for
3373 object->scope::member.
3375 2003-02-18 Ben Elliston <bje@redhat.com>
3378 * decl.c (duplicate_decls): Fix typo in comment.
3380 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
3383 * class.c (build_base_field): Mark fields for base classes with
3386 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3389 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3390 CONSTRUCTOR_ELTS only once.
3392 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3395 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3396 (dump_type_suffix): Likewise.
3398 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
3400 * search.c: ANSIfy function declarations and definitions.
3401 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3402 * call.c (build_method_call, resolve_scoped_fn_name,
3403 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3405 * class.c (handle_using_decl): Likewise.
3406 * decl.c (make_typename_type, make_unmound_class_template,
3407 start_decl, compute_array_index_type): Likewise.
3408 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3409 * init.c (expand_member_init, build_member_call): Likewise.
3410 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3411 resolve_typename_type): Likewise.
3412 * typeck.c (lookup_destructor, finish_class_member_access_exprm
3413 build_prememfunc_access_expr): Likewise.
3415 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3417 * decl2.c: Include "timevar.h".
3418 (namespace_ancestor): Time name lookup.
3419 (add_using_namespace): Likewise.
3420 (lookup_using_namespace): Likewise.
3421 (qualified_lookup_using_namespace): Likewise.
3422 (decl_namespace): Likewise.
3423 (lookup_arg_dependent): Likewise.
3424 * lex.c (do_identifier): Likewise.
3425 (do_scoped_id): Likewise.
3426 * pt.c (lookup_template_class): Likewise.
3428 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
3430 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3432 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3434 * decl.c: Include "timevar.h".
3435 (poplevel): Time name lookup.
3436 (find_binding): Likewise.
3437 (push_namespace): Likewise.
3438 (pop_nested_namespace): Likewise.
3439 (store_bindings): Likewise.
3440 (maybe_push_to_top_level): Likewise.
3441 (pop_from_top_level): Likewise.
3442 (push_local_name): Likewise.
3443 (pushtag): Likewise.
3444 (pushdecl): Likewise.
3445 (pushdecl_with_scope): Likewise.
3446 (pushdecl_namespace_level): Likewise.
3447 (pushdecl_top_level): Likewise.
3448 (pushdecl_class_level): Likewise.
3449 (push_class_level_binding): Likewise.
3450 (push_using_decl): Likewise.
3451 (push_using_directive): Likewise.
3452 (push_overloaded_decl): Likewise.
3453 (lookup_label): Likewise.
3454 (define_label): Likewise.
3455 (lookup_tag): Likewise.
3456 (lookup_tag_reverse): Likewise.
3457 (lookup_namespace_name): Likewise.
3458 (select_decl): Likewise.
3459 (unqualified_namespace_lookup): Likewise.
3460 (lookup_name_real): Likewise.
3461 (lookup_name_current_level): Likewise.
3462 (lookup_type_current_level): Likewise.
3463 (maybe_inject_for_scope_var): Likewise.
3464 (xref_tag): Likewise.
3466 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3468 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
3470 * decl.c (build_enumerator): Remove unneeded test.
3472 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
3474 * cp-tree.h (struct lang_type_header): Make all fields unsigned
3477 2003-02-03 Mark Mitchell <mark@codesourcery.com>
3480 * call.c (z_candidate): Add args.
3481 (convert_class_to_reference): Set it.
3482 (implicit_conversion): Tidy.
3483 (add_candidate): Add args parameter.
3484 (add_function_candidate): Adjust call to add_candidate.
3485 (add_conv_candidate): Likewise.
3486 (build_builtin_candidate): Likewise.
3487 (build_user_type_conversion_1): Eliminate wasteful tree_cons
3489 (build_new_function_call): Likewise.
3490 (build_object_call): Likewise.
3491 (add_candidates): New function.
3492 (build_new_op): Use it.
3493 (covert_like_real): Adjust call to build_over_call.
3494 (build_over_call): Remove args parameter.
3495 * operators.def: Add <?= and >?=.
3497 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
3499 * typeck.c (build_indirect_ref): Don't check flag_volatile.
3501 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3504 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3506 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3508 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3509 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3510 (BINFO_LANG_ELTS): New #define.
3511 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3513 2003-01-30 Geoffrey Keating <geoffk@apple.com>
3515 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3517 2003-01-30 Mark Mitchell <mark@codesourcery.com>
3519 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3521 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3522 rather than TYPE_LANG_FLAG_0.
3523 (TYPE_BUILT_IN): Remove.
3524 (TYPE_DEPENDENT_P): New macro.
3525 (TYPE_DEPENDENT_P_VALID): Likewise.
3526 (lang_type_class): Add fields_readonly.
3527 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3528 * pt.c (dependent_type_p_r): New function, split out from ...
3529 (dependent_type_p): ... here. Memoize results.
3530 * search.c (dependent_base_p): Use dependent_type_p, not
3531 uses_template_parms.
3532 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3535 2003-01-29 Mark Mitchell <mark@codesourcery.com>
3537 * call.c (build_field_call): Use build_new_op, not build_opfncall.
3538 (prep_operand): New function.
3539 (build_new_op): Use it. Remove dead code.
3540 * class.c (pushclass): Change "modify" parameter type from int to
3542 (currently_open_class): Use same_type_p, not pointer equality.
3543 (push_nested_class): Adjust calls to pushclass, remove modify
3545 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3546 (pushclass): Change prototype.
3547 (push_nested_class): Likewise.
3548 (grokoptypename): Remove.
3549 (build_opfncall): Remove.
3550 (value_dependent_expression_p): Declare.
3551 (resolve_typename_type): Likewise.
3552 (resolve_typename_type_in_current_instantiation): Likewise.
3553 (enter_scope_of): Remove.
3555 (tsubst_expr): Likewise.
3556 (tsubst_copy): Likewise.
3557 (tsubst_copy_and_build): Likewise.
3558 * decl.c (warn_about_implicit_typename_lookup): Remove.
3559 (finish_case_label): Return error_mark_node for erroneous labels.
3560 (start_decl): Adjust calls to push_nested_class.
3561 (grokfndecl): Call push_scope/pop_scope around call to
3563 (grokdeclarator): Do not call tsubst.
3564 (start_function): Adjust calls to push_nested_class.
3565 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3566 (check_classfn): Use push_scope/pop_scope around type comparisions.
3567 (grokoptypename): Remove.
3568 (push_sscope): Adjust call to push_nested_class.
3569 * error.c (dump_type): Show cv-qualification of typename types.
3570 * init.c (build_member_call): Use build_new_op, not
3572 * method.c (build_opfncall): Remove.
3573 * parser.c (cp_parser): Add allow_non_constant_expression_p and
3574 non_constant_expression_p.
3575 (cp_parser_constant_expression): Adjust prototype.
3576 (cp_parser_resolve_typename_type): Remove.
3577 (cp_parser_non_constant_expression): New function.
3578 (cp_parser_non_constant_id_expression): Likewise.
3579 (cp_parser_new): Set allow_non_constant_expression_p and
3580 non_constant_expression_p.
3581 (cp_parser_primary_expression): Reject `this' and `va_arg' in
3582 constant-expressions. Note that dependent names aren't really
3584 (cp_parser_postfix_expression): Reject conversions to non-integral
3585 types in constant-expressions. Neither are increments or
3587 (cp_parser_unary_expression): Reject increments and decrements in
3588 constant-expressions.
3589 (cp_parser_direct_new_declarator): Adjust call to
3590 cp_parser_constant_expression.
3591 (cp_parser_cast_expression): Reject conversions to non-integral
3592 types in constant-expressions.
3593 (cp_parser_assignment_expression): Rejects assignments in
3594 constant-expressions.
3595 (cp_parser_expression): Reject commas in constant-expressions.
3596 (cp_parser_labeled_statement): Adjust call to
3597 cp_parser_constant_expression.
3598 (cp_parser_direct_declarator): Simplify array bounds, even in
3599 templates, when they are non-dependent. Use
3600 resolve_typename_type, not cp_parser_resolve_typename_type.
3601 (cp_parser_class_head): Use resolve_typename_type, not
3602 cp_parser_resolve_typename_type.
3603 (cp_parser_member_declaration): Adjust call to
3604 cp_parser_constant_expression.
3605 (cp_parser_constant_initializer): Likewise.
3606 (cp_parser_constructor_declarator): Use resolve_typename_type, not
3607 cp_parser_resolve_typename_type.
3608 (cp_parser_late_parsing_default_args): Adjust call to
3610 * pt.c (tsubst): Give it internal linkage.
3611 (tsubst_expr): Likewise.
3612 (tsubst_copy): Likewise.
3613 (tsubst_copy_and_build): Likewise.
3614 (push_access_scope_real): Likewise.
3615 (tsubst_friend_class): Likewise.
3616 (instantiate_class_template): Adjust call to pushclass.
3617 (value_dependent_expression_p): Give it external linkage.
3619 (resolve_typename_type): New function.
3620 * semantics.c (finish_call_expr): Use build_new_op, not
3622 (begin_constructor_declarator): Remove.
3623 (begin_class_definition): Adjust call to pushclass.
3624 (enter_scope_of): Remove.
3625 * typeck.c (comptypes): Resolve typename types as appropriate.
3626 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
3627 (build_x_compound_expr): Likewise.
3628 (build_modify_expr): Likewise.
3629 (build_x_modify_expr): Likewise.
3630 * typeck2.c (build_x_arrow): Likewise.
3632 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
3634 * pt.c (last_pending_template) Declare GTY().
3636 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3639 * parser.c (cp_parser_elaborated_type_specifier): Convert
3640 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
3641 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
3643 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
3646 * pt.c (unify): Don't unify '*T' with 'U C::*'.
3649 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3650 inside a declarator.
3652 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
3654 * class.c (update_vtable_entry_for_fn): Add index parameter.
3655 Generate vcall thunk for covariant overriding from a virtual
3657 (dfs_modify_vtables): Adjust.
3659 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
3662 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3664 (cp_parser_base_specifier): Look for and consume a
3665 TEMPLATE keyword. Replace switch with array index.
3668 * semantics.c (finish_non_static_data_member): Remember the
3669 field's type even in a template.
3672 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3676 * parser.c (cp_parser_cast_expression): Be more tentative.
3678 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3680 * cp-tree.h (flagged_type_tree_s): Remove.
3681 (check_for_new_type): Likewise.
3682 * typeck2.c (check_for_new_type): Likewise.
3684 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
3686 * dump.c: ANSIfy function declarations and definitions.
3688 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
3690 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3693 * init.c (build_new): Set the type of the new-expression, even
3694 when processing_templte_decl.
3697 * parser.c (cp_parser_primary_expression): Improve error message
3698 for templates used in an expression context.
3701 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3702 parse when encountering "typedef".
3704 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3706 * class.c, parser.c: ANSIfy function definitions and declarations.
3708 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3711 * error.c (dump_decl): For an OVERLOAD, just print the name of the
3712 function; it doesn't make sense to try to print its type.
3713 * semantics.c (finish_typeof): Issue errors about invalid uses.
3716 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3718 (cp_parser_expression_statement): Use it.
3719 (cp_parser_explicit_instantiation): Likewise.
3720 * pt.c (do_decl_instantiation): Improve error handling logic.
3722 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3725 * parser.c (cp_parser_using_declaration): Issue error messages
3726 about name resolution failures here.
3729 * class.c (currently_open_derived_class): Use dependent_type_p.
3730 * cp-tree.h (dependent_type_p): New function.
3731 (dependent_template_arg_p): Likewise.
3732 (dependent_template_p): Likewise.
3733 (type_dependent_expression_p): Likewise.
3734 * parser.c (cp_parser_dependent_type_p): Remove.
3735 (cp_parser_value_dependent_type_p): Likewise.
3736 (cp_parser_type_dependent_expression_p): Likewise.
3737 (cp_parser_dependent_template_arg_p): Likewise.
3738 (cp_parser_dependent_template_id_p): Likewise.
3739 (cp_parser_dependent_template_p): Likewise.
3740 (cp_parser_diagnose_invalid_type_name): Replace
3741 cp_parser_dependent_type_p with dependent_type_p, etc.
3742 (cp_parser_primary_expresion): Likewise.
3743 (cp_parser_nested_name_specifier_opt): Likewise.
3744 (cp_parser_postfix_expression): Likewise.
3745 (cp_parser_unary_expression): Likewise.
3746 (cp_parser_template_name): Likewise.
3747 (cp_parser_class_name): Likewise.
3748 (cp_parser_lookup_name): Likewise.
3749 * pt.c (dependent_type_p): New function.
3750 (value_dependent_expression_p): Likewise.
3751 (type_dependent_expression_p): Likewise.
3752 (dependent_template_arg_p): Likewise.
3753 (dependent_template_id_p): Likewise.
3754 (dependent_template_p): Likewise.
3758 * parser.c (cp_parser_simple_declaration): Return quickly when
3759 encountering errors.
3761 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3763 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3765 2003-01-17 Jason Merrill <jason@redhat.com>
3767 PR c++/9167, c++/9358
3768 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3770 2003-01-17 Jason Merrill <jason@redhat.com>
3773 * call.c (build_conditional_expr): Always do lvalue-rvalue
3776 2003-01-17 Mark Mitchell <mark@codesourcery.com>
3779 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3780 * cp-tree.h (BASELINK_BINFO): Adjust.
3781 (BASELINK_FUNCTIONS): Likewise.
3782 (BASELINK_ACCESS_BINFO): Likewise.
3783 (tree_baselink): New structure.
3784 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3785 (lang_tree_node): Add baselink.
3786 * decl.c (cp_tree_node_structure): Add BASELINK case.
3787 * search.c (build_baselink): Adjust.
3788 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
3789 test from TREE_LIST case.
3792 * parser.c (cp_parser_constructor_declarator_p): Do not assume
3793 that a constructor cannot be declared outside of its own class.
3795 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
3796 be resolved, neither can the qualified name.
3798 * rtti.c (get_pseudo_ti_desc): Fix thinko.
3800 2003-01-16 Jason Merrill <jason@redhat.com>
3803 * init.c (build_vec_init): Re-add maxindex parm.
3804 (perform_member_init, build_aggr_init): Pass it.
3805 (build_new_1): Pass it. Use an incomplete array type for full_type.
3806 * typeck.c (build_modify_expr): Pass it.
3807 * cp-tree.h: Adjust.
3809 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
3811 * cp-tree.h (tsubst_copy_and_build): New declaration.
3812 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
3813 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
3814 (tsubst_copy_and_build): New function.
3816 2003-01-16 Mark Mitchell <mark@codesourcery.com>
3818 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
3819 (PARTIAL_INSTANTIATION_P): Remove.
3820 (IMPLICIT_TYPENAME_P): Likewise.
3821 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
3822 (build_typename_type): Remove declaration.
3823 (parmlist_is_exprlist): Likewise.
3824 * decl.c (build_typename_type): Make it static, remove third
3826 (push_class_binding): Don't do implicit typename stuff.
3827 (make_typename_type): Likewise.
3828 (lookup_name_real): Likewise.
3829 (grokdeclarator): Don't try to convert declarations into
3830 initializations. Don't do implicit typename stuff.
3831 (parmlist_is_exprlist): Remove.
3832 (xref_basetypes): Simplify.
3833 * decl2.c (grokfield): Don't try to convert declarations into
3835 (build_anon_union_vars): Do this while processing templates, too.
3836 (finish_anon_union): Likewise.
3837 * error.c (dump_type): Remove implicit typename handling.
3838 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
3839 (cp_parser_primary_expression): Correct handling of names not
3840 found by unqualified name lookup in templates.
3841 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
3842 of types when possible.
3843 (cp_parser_simple_declaration): Complain intelligently about some
3844 invalid declarations.
3845 (cp_parser_member_declaration): Likewise.
3846 (cp_parser_constructor_declarator_p): Don't check when we're in a
3848 * pt.c (instantiate_class_template): Remove
3849 PARTIAL_INSTANTIATION_P gunk.
3850 * search.c (lookup_field_r): Don't build implicit typenames.
3851 (marked_pushdecls_p): Don't enter dependent base types.
3852 (unmarked_pushdecls_p): Likewise.
3853 * semantics.c (begin_class_definition): Remove implicit typename
3856 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
3859 * parser.c (cp_parser_direct_declarator): If accepting either
3860 abstract or named, the name must be an unqualified-id.
3862 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3864 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
3866 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3868 * decl2.c (check_classfn): Fix uninitialized warning.
3869 (build_anon_union_vars): Likewise.
3870 * pt.c (tsubst_copy): Likewise.
3872 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
3874 Further conform g++'s __vmi_class_type_info to the C++ ABI
3876 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
3878 (class_hint_flags): Likewise.
3880 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3882 * config-lang.in: Add semantics.c to gtfiles.
3883 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
3884 (saved_scope): Likewise.
3885 (type_lookups): Remove.
3886 (deferred_access): New structure.
3887 (type_access_control): Remove.
3888 (save_type_access_control): Likewise.
3889 (reset_type_access_control): Likewise.
3890 (decl_type_access_control): Likewise.
3891 (push_deferring_access_checks): Declare.
3892 (resume_deferring_access_checks): Likewise.
3893 (stop_deferring_access_checks): Likewise.
3894 (pop_deferring_access_checks): Likewise.
3895 (get_deferred_access_checks): Likewise.
3896 (pop_to_parent_deferring_access_checks): Likewise.
3897 (perform_deferred_access_checks): Likewise.
3898 (perform_or_defer_access_check): Likewise.
3899 * decl.c (make_typename_type): Use perform_or_defer_access_check.
3900 (make_unbound_class_template): Likewise.
3901 (grokdeclarator): Don't call decl_type_access_control.
3902 * parser.c (cp_parser_context): Remove deferred_access_checks
3903 and deferring_access_checks_p fields.
3904 (cp_parser_context_new): Adjust.
3905 (cp_parser): Remove access_checks_lists.
3906 (cp_parser_defer_access_check): Remove.
3907 (cp_parser_start_deferring_access_checks): Remove.
3908 (cp_parser_stop_deferring_access_checks): Remove.
3909 (cp_parser_perform_deferred_access_checks): Remove.
3910 (cp_parser_nested_name_specifier_opt): Use new deferred access
3912 (cp_parser_simple_declaration): Likewise.
3913 (cp_parser_template_id): Likewise.
3914 (cp_parser_function_definition): Likewise.
3915 (cp_parser_class_specifier): Likewise.
3916 (cp_parser_lookup_name): Likewise.
3917 (cp_parser_single_declaration): Likewise.
3918 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
3919 (cp_parser_parse_tentatively): Likewise.
3920 (cp_parser_parse_definitely): Likewise.
3921 (yyparse): Likewise.
3922 (cp_parser_init_declarator): Remove access_checks parameter.
3923 Use new deferred access functions.
3924 (cp_parser_function_definition_from_specifiers_and_declarator):
3926 (cp_parser_class_head): Remove deferring_access_checks_p and
3927 saved_access_checks parameters. Use new deferred access functions.
3928 (cp_parser_member_specification_opt): Don't call
3929 reset_type_access_control.
3930 * search.c (type_access_control): Remove.
3931 * semantics.c: Include "gt-cp-semantics.h".
3932 (deferred_type_access_control): Remove.
3933 (deferred_access_stack): New variable.
3934 (deferred_access_free_list): Likewise.
3935 (push_deferring_access_checks): New function.
3936 (resume_deferring_access_checks): Likewise.
3937 (stop_deferring_access_checks): Likewise.
3938 (pop_deferring_access_checks): Likewise.
3939 (get_deferred_access_checks): Likewise.
3940 (pop_to_parent_deferring_access_checks): Likewise.
3941 (perform_deferred_access_checks): New function, adapted from
3942 cp_parser_perform_deferred_access_checks.
3943 (perform_or_defer_access_check): New function, adapted from
3944 cp_parser_defer_access_check.
3945 (current_type_lookups): Remove.
3946 (deferred_type_access_control): Likewise.
3947 (decl_type_access_control): Likewise.
3948 (save_type_access_control): Likewise.
3949 (reset_type_access_control): Likewise.
3950 (begin_function_definition): Adjust.
3951 (begin_class_definiton): Likewise.
3953 2003-01-13 Jason Merrill <jason@redhat.com>
3956 * class.c (build_base_path): Take the address before calling save_expr.
3958 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
3959 all the ambiguous conversions are bad.
3961 * class.c (maybe_warn_about_overly_private_class): Don't stop
3962 searching when we find a nonprivate method.
3964 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
3966 2003-01-12 Mark Mitchell <mark@codesourcery.com>
3968 * cp-tree.h (get_arglist_len_in_bytes): Remove.
3971 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
3972 typeame types more robustly.
3974 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
3976 * parser.c: Fix comment typos.
3978 2003-01-10 Mark Mitchell <mark@codesourcery.com>
3981 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
3982 an object_type which is not a class type.
3984 2003-01-10 Geoffrey Keating <geoffk@apple.com>
3986 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
3987 (cp_parser_late_parsing_default_args): Likewise.
3989 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
3991 * cfns.gperf: ANSIfy function declarations.
3992 * cfns.h: Regenerate.
3993 * cp-tree.h: ANSIfy function declarations.
3995 2003-01-10 Mark Mitchell <mark@codesourcery.com>
3997 * cp-tree.h (reparse_absdcl_as_expr): Remove.
3998 (reparse_absdcl_as_casts): Likewise.
3999 (reparse_decl_as_expr): Likewise.
4000 (finish_decl_parsing): Likewise.
4001 * decl2.c (reparse_absdcl_as_expr): Remove.
4002 (reparse_absdcl_as_casts): Likewise.
4003 (repase_decl_as_expr): Likewise.
4004 (finish_decl_parsing): Likewise.
4009 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4011 (cp_parser_nested_name_specifier_opt): Correct the
4012 check_dependency_p false.
4013 (cp_parser_postfix_expression): Fix formatting.
4014 (cp_parser_decl_specifier_seq): Avoid looking for constructor
4015 declarators when possible.
4016 (cp_parser_template_id): Avoid performing name-lookup when
4018 (cp_parser_class_head): Do not count specializations when counting
4019 levels of templates.
4020 (cp_parser_constructor_declarator_p): Return immediately if
4021 there's no chance that the tokens form a constructor declarator.
4022 * rtti.c (throw_bad_typeid): Add comment. Do not return an
4023 expression with reference type.
4024 (get_tinfo_decl_dynamic): Do not return an expression with
4026 (build_typeid): Add comment. Do not return an expression with
4028 * typeck.c (build_class_member_access_expr): Improve handling of
4029 conditionals and comma-expressions as objects.
4031 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4033 * cfns.gperf: ANSIfy function declarations.
4034 * cfns.h: Regenerate.
4035 * cp-tree.h: ANSIfy function declarations.
4036 * parser.c: ANSIfy function declarations & definitions.
4038 * decl.c (bad_specifiers): Fix parameter order error I introduced.
4040 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4042 Merge from pch-branch:
4044 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4046 Merge to tag pch-merge-20030102:
4048 * semantics.c (finish_translation_unit): Don't call finish_file.
4049 * parser.c: Don't include ggc.h.
4050 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4051 read first token here. Don't allow PCH files after the first
4053 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4054 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4055 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4056 (cp_parser_late_parsing_for_member): Don't duplicate call to
4057 cp_lexer_set_source_position_from_token.
4058 (cp_parser_late_parsing_default_args): Likewise.
4059 (yyparse): Call finish_file after clearing the_parser.
4061 2002-12-11 Geoffrey Keating <geoffk@apple.com>
4063 * Make-lang.in: Remove $(GGC_H) from all dependencies.
4064 (CXX_TREE_H): Add $(GGC_H).
4065 * class.c: Don't include ggc.h.
4066 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4067 (method_name_cmp): Likewise.
4068 (resort_data): New variable.
4069 (resort_field_decl_cmp): New.
4070 (resort_method_name_cmp): New.
4071 (resort_sorted_fields): New.
4072 (resort_type_method_vec): New.
4073 (finish_struct_methods): Delete cast.
4074 (finish_struct_1): Delete cast.
4075 * cp-tree.h: Include ggc.h.
4076 (struct lang_type_class): Add reorder attribute to field `methods'.
4077 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4078 (resort_sorted_fields): New prototype.
4079 (resort_type_method_vec): New prototype.
4080 * call.c: Don't include ggc.h.
4082 * decl2.c: Likewise.
4085 * method.c: Likewise.
4086 * optimize.c: Likewise.
4087 * parse.y: Likewise.
4090 * search.c: Likewise.
4091 * semantics.c: Likewise.
4095 * lang-specs.h: Remove comment.
4097 2002-12-03 Geoffrey Keating <geoffk@apple.com>
4099 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4100 (operator_name_info): Mark to be saved for PCH, specify size.
4101 (assignment_operator_name_info): Likewise.
4103 2002-11-19 Geoffrey Keating <geoffk@apple.com>
4105 * decl.c (anon_cnt): Mark to be saved for PCH.
4107 2002-10-25 Geoffrey Keating <geoffk@apple.com>
4109 * lex.c (init_reswords): Delete now-untrue comment.
4110 Allocate ridpointers using GGC.
4112 2002-10-04 Geoffrey Keating <geoffk@apple.com>
4114 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4116 * g++spec.c (lang_specific_driver): Don't include standard
4117 libraries in `added'.
4119 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
4121 * decl2.c (finish_file): Call c_common_write_pch.
4122 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4124 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
4126 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4127 files when using g++.
4128 * lang-specs.h: Handle compiling C++ header files.
4130 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4132 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4134 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4136 * pt.c (push_access_scope_real): Call push_to_top_level for
4137 function in namespace scope.
4138 (pop_access_scope): Call pop_from_top_level for function in
4141 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4143 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4145 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
4147 * Make-lang.in (c++.install-common, c++.install-man,
4148 c++.uninstall): Prepend $(DESTDIR) to destination paths in
4149 all (un)installation commands.
4150 (c++.install-common): Rewrite $(LN) commands to support
4151 DESTDIR with "ln" as well as with "ln -s".
4153 2003-01-08 Jason Merrill <jason@redhat.com>
4155 * parser.c (cp_parser_primary_expression): See through explicitly
4156 scoped ALIAS_DECLs, too.
4158 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
4160 * decl.c: Remove some #if 0 code.
4162 * decl.c: ANSIfy function declarations.
4164 2003-01-07 Mark Mitchell <mark@codesourcery.com>
4166 * parser.c (cp_parser_asm_definition): Correct handling of omitted
4169 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4172 * decl.c (make_typename_type): Check access only when tf_error.
4173 (make_unbound_class_template): Likewise.
4174 * pt.c (saved_access_scope): New variable.
4175 (push_access_scope_real): New function.
4176 (push_access_scope): Likewise.
4177 (pop_access_scope): Likewise.
4178 (tsubst_default_argument): Use them.
4179 (instantiate_template): Likewise.
4180 (regenerate_decl_from_template): Likewise.
4181 (instantiate_decl): Likewise.
4182 (get_mostly_instantiated_function_type): Likewise.
4184 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
4186 * tree.c: Delete bogus #if 0 code.
4188 2003-01-07 Andreas Schwab <schwab@suse.de>
4190 * class.c (layout_class_type): Don't use
4191 PCC_BITFIELD_TYPE_MATTERS if not defined.
4193 2003-01-06 Mark Mitchell <mark@codesourcery.com>
4196 * decl2.c (build_cleanup): Mark the object as used.
4198 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4199 (hash_local_specialization): New function.
4200 (register_local_specialization): Revert 2003-01-05 change.
4201 (instantiate_decl): Use hash_local_specialization when creating
4202 the local_specializations table.
4204 * decl2.c (mark_used): Do not synthesize thunks.
4206 * class.c (layout_class_type): Correct handling of unnamed
4207 bitfields wider than their types.
4210 * parser.c (cp_parser): Remove default_arg_types. Update
4211 documentation for unparsed_functions_queues.
4212 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
4214 (cp_parser_new): Don't set parser->default_arg_types.
4215 (cp_parser_function_definition): Adjust usage of
4216 unparsed_funtions_queues.
4217 (cp_parser_class_specifier): Don't mess with
4218 parser->default_arg_types. Handle default argument processing in
4219 a separate phase from function body processing.
4220 (cp_parser_template_declaration_after_export): Adjust usage of
4221 unparsed_functions_queues.
4222 (cp_parser_late_parsing_for_member): Do not handle default
4225 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
4228 * parser.c (cp_parser_declarator_kind): New enum.
4229 (cp_parser_declarator): Adjust.
4230 (cp_parser_direct_declarator): Adjust. Allow for either named or
4231 abstract declarator. Prefer abstract, if possible. Allow
4232 parenthesized function name.
4233 (cp_parser_condition): Adjust cp_parser_declarator call.
4234 (cp_parser_explicit_instantiation): Likewise.
4235 (cp_parser_init_declarator): Likewise.
4236 (cp_parser_type_id): Likewise.
4237 (cp_parser_function_definition): Likewise.
4238 (cp_parser_member_declaration): Likewise.
4239 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
4240 the tentative parsing.
4241 (cp_parser_exception_declaration): Likewise.
4243 2003-01-05 Mark Mitchell <mark@codesourcery.com>
4245 * parser.c (cp_parser_template_parameter): Adjust call to
4246 cp_parser_parameter_declaration.
4247 (cp_parser_parameter_declaration_list): Likewise.
4248 (cp_parser_parameter_declaration): Replace
4249 greater_than_is_operator_p with template_parm_p parameter. Do not
4250 cache tokens for template default arguments.
4252 * pt.c (retrieve_local_specialization): Use htab_find, not
4253 htab_find_with_hash.
4254 (register_local_specialization): Use htab_find_slot, not
4255 htab_find_slot_with_hash.
4256 (instantiate_decl): Pass a hash function to htab_create.
4258 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4260 * parser.c (cp_parser_binary_expression,
4261 cp_parser_multiplicative_expression,
4262 cp_parser_additive_expression, cp_parser_shift_expression,
4263 cp_parser_relational_expression, cp_parser_equality_expression,
4264 cp_parser_and_expression, cp_parser_exclusive_or_expression,
4265 cp_parser_inclusive_or_expression,
4266 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
4267 cp_parser_binary_expression): Const-ify.
4269 2003-01-04 Mark Mitchell <mark@codesourcery.com>
4271 * method.c (use_thunk): Disable access control while building the
4274 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
4276 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
4279 2003-01-03 Matt Austern <austern@apple.com>
4281 * cp-tree.h (struct lang_type_class): add field for key method
4282 (cp_global_trees): rename dynamic_classes to keyed_classes
4283 (key_method): add definition
4284 * class.c (finish_struct_1): compute class's key method, and add
4285 the class to keyed_classes list if there is no key method.
4286 * decl.c (finish_function): add class to keyed_classes list if we
4287 see a definition of the class's key method.
4288 * pt.c (instantiate_class_template): add template specialization
4289 of a dynamic class to keyed_classes list.
4290 * decl2.c (key_method): remove
4291 (finish_file): iterate only through keyed_classes list when
4292 deciding whether to emit vtables, remove class from its list after
4295 2003-01-02 Jason Merrill <jason@redhat.com>
4297 * call.c (build_conditional_expr): Stabilize lvalues properly.
4298 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
4299 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
4300 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
4302 * call.c (convert_like_real): Call decl_constant_value for an
4303 IDENTITY_CONV even if there are no more conversions.
4305 * cvt.c (build_up_reference): Don't push unnamed temps.
4307 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
4309 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
4310 for a backend struct.
4312 * except.c (wrap_cleanups_r, build_throw): Make
4313 MUST_NOT_THROW_EXPRs void.
4314 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
4316 * init.c (build_vec_delete_1): Pre-evaluate the base address.
4318 * init.c (get_temp_regvar): Simplify logic.
4320 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
4321 our replacement is a decl.
4323 * decl.c (cp_make_fname_decl): Push the decls inside the
4326 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
4329 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
4332 2003-01-03 Graham Stott <graham.stott@btinternet.com>
4334 * parser.c (struct cp_parser): Add access_checks_lists field
4335 (cp_parser_simple_declaration): Use.
4336 (cp_parser_init_declarator): Likewise.
4338 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4340 * parser.c (cp_parser_declaration): Accept the __extension__
4341 keyword before the declaration.
4344 * parser.c (cp_parser_parameter_declaration): Allow attributes to
4345 appear after the declarator.
4347 * call.c (build_new_method_call): Fix typo in message format
4350 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4352 * parser.c (cp_lexer_next_token_is): Declare it inline.
4353 (cp_lexer_set_source_position_from_token): Likewise.
4354 (cp_lexer_debugging_p): Likewise.
4355 (cp_parser_parsing_tentatively): Likewise.
4356 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
4357 to the cp_lexer_peek_token.
4359 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4362 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4364 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
4365 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
4366 cp/repo.c: Fix copyright years.
4368 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
4370 * lex.c: Remove superfluous include of cpplib.h.
4371 (CONSTRAINT): Define without conditions.
4372 (init_cp_pragma): Use c_register_pragma.
4374 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4376 * .cvsignore: Remove.
4378 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
4380 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
4381 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
4382 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
4383 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
4384 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
4386 * lex.h: parse.y is dead, so don't mention it. Also replace the
4387 copyright header with the default GNU copyright header.
4389 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4391 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4392 (lookup_name_namespace_only): Likewise.
4393 (begin_only_namespace_names): Likewise.
4394 (end_only_namespace_names): Likewise.
4395 * decl.c (only_namespace_names): Remove.
4396 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4397 (lookup_name_real): Do not check only_namespace_names.
4398 (lookup_name_namespace_only): Remove.
4399 (begin_only_namespace_names): Likewise.
4400 (end_only_namespace_names): Likewise.
4401 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4402 nested-name-specifiers more gracefully.
4403 (cp_parser_class_or_namespace_name): Avoid looking up namespace
4404 names when they cannot possibly appear.
4405 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4406 (cp_parser_elaborated_type_specifier): Likewise.
4407 (cp_parser_namespace_name): Only look for namespace names.
4408 (cp_parser_lookup_name): Add is_namespace parameter.
4409 (cp_parser_lookup_name_simple): Adjust call to
4410 cp_parser_lookup_name.
4412 * parser.c (cp_parser_dependent_type_p): Fix thinko.
4414 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4416 * .cvsignore: Update.
4418 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
4420 * class.c (modify_vtable_entry): Remove unused variable.
4421 (get_vcall_index): Always expect a non-thunk.
4422 (update_vtable_entry_for_fn): Combine covariant adjustments, when
4423 overriding a thunk. Pass get_vcall_index a non-thunk.
4425 * decl2.c (finish_file): Mark undefined inlines as extern.
4427 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4429 * cp-tree.def (RETURN_INIT): Remove.
4430 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4431 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4432 (note_level_for_for): Remove.
4433 (note_level_for_try): Likewise.
4434 (note_level_for_catch): Likewise.
4435 (finish_named_return_value): Likewise.
4436 (do_pushlevel): Change prototype.
4437 (pending_lang_change): Remove.
4438 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4440 (note_level_for_for): Remove.
4441 (note_level_for_try): Likewise.
4442 (note_level_for_catch): Likewise.
4443 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4444 * parser.c (cp_parser_context_free_list): Make it "deletable".
4445 (cp_parser_template_argument): Remove misleading comment.
4446 * pt.c (tsubst_expr): Remove RETURN_INIT code.
4447 * semantics.c (genrtl_named_return_value): Remove.
4448 (do_pushlevel): Take a scope kind as an argument.
4449 (begin_if_stmt): Adjust.
4450 (begin_while_stmt): Likewise.
4451 (begin_for_stmt): Likewise.
4452 (finish_for_init_stmt): Likewise.
4453 (begin_switch_stmt): Likewise.
4454 (begin_handler): Likewise.
4455 (begin_compound_stmt): Likewise.
4456 (finish_named_return_value): Remove.
4457 (cp_expand_stmt): Remove RETURN_INIT case.
4458 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4460 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4463 * parser.c (cp_parser_direct_declarator): Handle erroneous
4464 parenthesized declarators correctly.
4466 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4468 * cp-tree.h (pending_lang_change): Declare.
4470 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4472 * parser.c (cp_parser_context_free_list): New variable.
4473 (cp_parser_context_new): Use it.
4474 (cp_parser_error): Check return code from
4475 cp_parser_simulate_error.
4476 (cp_parser_simulate_error): Return a value.
4477 (cp_parser_id_expression): Optimize common case.
4478 (cp_parser_class_name): Likewise.
4479 (cp_parser_class_specifier): Adjust call to
4480 cp_parser_late_parsing_default_args.
4481 (cp_parser_lookup_name): Optimize common case.
4482 (cp_parser_late_parsing_for_member): Adjust call to
4483 cp_parser_late_parsing_default_args.
4484 (cp_parser_late_parsing_default_args): Add scope parameter.
4485 (cp_parser_require): Avoid creating the error message unless it's
4487 (cp_parser_parse_definitely): Place free'd contexts on the free
4490 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4492 2002-12-30 David Edelsohn <edelsohn@gnu.org>
4494 * parser.c (cp_parser_parameter_declaration_clause): Treat system
4495 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4497 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4499 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4502 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4506 * Make-lang.in (gt-cp-spew.h): Remove.
4507 * cp-tree.h (do_pending_lang_change): Remove.
4508 (do_identifier): Change prototype.
4509 (finish_id_expr): Remove.
4510 * decl.c (lookup_name_real): Remove yylex variable.
4511 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4512 * lex.c (init_cpp_parse): Remove.
4513 (reduce_cmp): Likewise.
4514 (token_cmp): Likewise.
4516 (lastiddecl): Likewise.
4517 (token_count): Likewise.
4518 (reduce_count): Likewise.
4520 (print_parse_statistics): Likewise.
4521 (do_pending_lang_change): Likewise.
4522 (do_identifier): Remove parsing parameter.
4523 * lex.h (lastiddecl): Remove.
4524 (looking_for_typename): Remove.
4525 (looking_for_template): Likewise.
4526 (pending_lang_change): Likewise.
4528 * semantics.c (finish_id_expr): Remove.
4530 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4533 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4535 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
4536 end, not the C front end.
4538 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
4540 * cp-tree.h (THUNK_TARGET): New macro.
4541 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4542 (finish_thunk): Remove offset parms.
4543 * class.c (find_final_overrider): Look through thunks.
4544 (get_vcall_index): Use THUNK_TARGET.
4545 (update_vtable_entry_for_fn): Look through thunks. Set covariant
4546 fixed offset here. Adjust finish_thunk call.
4547 (build_vtbl_initializer): Adjust finish_thunk calls.
4548 * mangle.c (mangle_call_offset): Remove superfluous if.
4549 (mangle_thunk): Adjust.
4550 * method.c (make_thunk): Adjust.
4551 (finish_thunk): Adjust.
4552 (thunk_adjust): Remove assert.
4553 (use_thunk): Use THUNK_TARGET
4554 * dump1.c (cp_dump_tree): Adjust thunk dumping.
4557 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4558 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4560 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4562 Remove traditional C constructs 4/n.
4563 * decl2.c (grok_method_quals, warn_if_unknown_interface,
4564 grok_x_components, cp_build_parm_decl, build_artificial_parm,
4565 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4566 delete_sanity, check_member_template, check_java_method,
4567 check_classfn, finish_static_data_member_decl, grokfield,
4568 grokbitfield, grokoptypename, grok_function_init,
4569 cplus_decl_attributes, constructor_name, defer_fn,
4570 build_anon_union_vars, finish_anon_union, coerce_new_type,
4571 coerce_delete_type, comdat_linkage, maybe_make_one_only,
4572 key_method, import_export_vtable, import_export_class,
4573 output_vtable_inherit, import_export_decl, import_export_tinfo,
4574 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4575 set_guard, start_objects, finish_objects,
4576 start_static_storage_duration_function,
4577 finish_static_storage_duration_function, get_priority_info,
4578 start_static_initialization_or_destruction,
4579 finish_static_initialization_or_destruction,
4580 do_static_initialization, do_static_destruction,
4581 prune_vars_needing_no_initialization, write_out_vars,
4582 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
4583 add_using_namespace, merge_functions, ambiguous_decl,
4584 lookup_using_namespace, lookup_using_namespace,
4585 qualified_lookup_using_namespace, set_decl_namespace,
4586 decl_namespace, current_decl_namespace, push_decl_namespace,
4587 pop_decl_namespace, push_scope, pop_scope, add_function,
4588 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
4589 lookup_arg_dependent, do_namespace_alias,
4590 validate_nonmember_using_decl, do_nonmember_using_decl,
4591 do_toplevel_using_decl, do_local_using_decl,
4592 do_class_using_decl, do_using_directive, check_default_args,
4593 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
4594 * parser.c (cp_parser_class_head): Use booleanss.
4595 * decl.c (walk_globals, walk_vtables): Likewise.
4596 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
4597 walk_globals): Change return type from 'int' to 'bool'.
4598 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
4599 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
4600 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
4601 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
4602 qualifier_flags, tinfo_base_init, generic_initializer,
4603 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
4604 dfs_class_hint_unmark, class_hint_flags, class_initializer,
4605 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
4606 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
4607 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
4608 * repo.c (repo_compile_flags, repo_template_declared,
4609 repo_template_defined, repo_class_defined, repo_get_id,
4610 repo_template_used, repo_vtable_used, repo_inline_used,
4611 repo_tinfo_used, repo_template_instantiated, extract_string,
4612 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
4613 finish_repo): Likewise.
4614 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
4615 cxx_print_xnode): Likewise..
4616 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
4617 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4618 * cxxfilt.c (demangle_it, print_demangler_list, usage,
4619 standard_symbol_characters, hp_symbol_characters, main, fatal):
4621 (strip_underscore): Change type from 'int' to 'bool'.
4622 (main): Use boolean constants.
4624 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4626 Remove traditional C constructs 3/n.
4627 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
4628 build_up_reference, warn_ref_binding, convert_to_reference,
4629 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
4630 convert_to_void, convert, convert_force, build_type_conversion,
4631 build_expr_type_conversion, type_promotes_to,
4632 perform_qualification_conversions): Use C90 prototyping style.
4633 * decl2.c (grok_array_decl): Use boolean constant.
4634 (delete_sanity): Likewise.
4635 * typeck.c (build_unary_op): Likewise.
4636 * semantics.c (finish_switch_cond): Likewise.
4637 * parser.c (cp_parser_direct_new_declarator): Likewise.
4638 * init.c (build_new): Likewise.
4640 2002-12-27 Mark Mitchell <mark@codesourcery.com>
4642 * Make-lang.in (po-generated): Remove parse.c.
4643 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
4644 ($(srcdir)/cp/parse.h): Remove target.
4645 ($(srcdir)/cp/parse.c): Likewise.
4646 (gt-cp-parse.h): Likewise.
4647 (gt-cp-parser.h): New target.
4648 (c++.distclean): Do not remove parse.output.
4649 (c++.maintainer-clean): Do not remove parse.c or parse.h.
4650 (cp/spew.o): Remove target.
4651 (cp/lex.o): Adjust dependencies.
4652 (cp/pt.o): Likewise.
4653 (cp/parse.o): Likewise.
4654 (cp/TAGS): Do not mention parse.c.
4655 (cp/parser.o): New target.
4656 * NEWS: Mention the new parser.
4657 * call.c (build_scoped_method_call): Simplify.
4658 (build_method_call): Likewise.
4659 (build_new_function_call): Adjust calls to add_function_candidate
4660 and add_template_candidate.
4661 (build_new_op): Improve handling of erroroneous operands.
4662 (convert_default_arg): Remove circular argument processing.
4663 (name_as_c_string): New function.
4664 (build_new_method_call): Use it.
4665 (perform_implicit_conversion): Use error_operand_p.
4666 * class.c (finish_struct_anon): Use constructor_name_p.
4667 (check_field_decls): Likewise.
4668 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4669 (resolve_address_of_overloaded_function): Likewise.
4670 (instantiate_type): Tweak pointer-to-member handling.
4671 (get_primary_binfo): Remove incorrect assertion.
4672 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4673 * cp-tree.h (DEFARG_TOKENS): New macro.
4674 (default_arg): New structure.
4675 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4676 (lang_tree_node): Add default_arg.
4677 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4678 (type_info_ref_type): New macro.
4679 (saved_scope): Make processing_explicit_instantiation a boolean.
4680 (check_access): New field.
4681 (unparsed_text): Remove.
4682 (language_function): Remove unparsed_inlines.
4683 (error_operand_p): New macro.
4684 (lang_decl): Adjust pending_inline_info.
4685 (DEFARG_POINTER): Remove.
4686 (tag_types): Add typenames.
4687 (lookup_ualified_name): Declare.
4688 (lookup_name_real): Likewise.
4689 (shadow_tag): Adjust prototype.
4690 (get_scope_of_declarator): Declare it.
4691 (process_next_inline): Remove it.
4692 (check_for_missing_semicolon): Likewise.
4693 (maybe_get_template_decl_from_type_decl): Declare it.
4694 (finish_label_stmt): Adjust prototype.
4695 (finish_non_static_data_meber): Declare it.
4696 (finish_pseudo_destructor_call_expr): Rename to ...
4697 (finish_pseudo_destructor_expr): ... this.
4698 (finish_compound_literal): Declare it.
4699 (begin_inline_definitions): Remove it.
4700 (init_spew): Remove.
4701 (peekyylex): Likewise.
4702 (arbitrate_lookup): Likewise.
4703 (frob_opname): Likewise.
4704 (maybe_snarf_defarg): Likewise.
4705 (add_defarg_fn): Likewise.
4706 (do_pending_defargs): Likewise.
4707 (done_pending_defargs): Likewise.
4708 (unprocessed_defarg_fn): Likewise.
4709 (replace_defarg): Likewise.
4710 (end_input): Likewise.
4711 (get_overloaded_fn): Likewise.
4712 * cvt.c (convert_to_reference): Improve error handling.
4713 * decl.c (lookup_name_real): Do not declare it static.
4714 (maybe_push_to_top_level): Set check_access.
4715 (identifier_type_value): Adjust call to lookup_name_real.
4716 (lookup_qualified_name): New method.
4717 (lookup_name_real): Remove special-case parsing code.
4718 (lookup_name-nonclass): Adjust call to lookup_name_real.
4719 (lookup_name_namespace_only): Likewise.
4720 (lookup_name): Likewise.
4721 (check_tag_decl): Return the type declared.
4722 (shadow_tag): Likewise.
4723 (register_dtor_fn): Tweak check_access.
4724 (grokfndecl): Use constructor_name_p.
4725 (get_scope_of_declarator): New function.
4726 (grokdeclarator): Obscure tweaks for slightly different declarator
4728 (start_method): Return error_mark_node to indicate failure.
4729 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
4730 * decl2.c (constructor_name_full): Simplify.
4731 (constructor_name): Use it.
4732 (build_expr_from_tree): Adjust for changes to do new parser.
4733 (push_scope): Improve robustness.
4734 (validate_nonmember_using_decl): Process declarations, not names.
4735 (do_class_using_decl): Likewise.
4736 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4738 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4739 * expr.c (cxx_expand_expr): Handle BASELINKs.
4740 * init.c (member_init_ok_or_else): Issue more errors.
4741 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4742 * lex.c: Do not include parse.h.
4743 (yypring): Do not declare.
4745 (make_reference_declarator): Remove error-generating code.
4746 (rid_to_yy): Remove.
4747 (cxx_init): Do not call init_spew.
4749 (check_for_missing_semicolon): Remove.
4750 * lex.h (got_scope): Remove.
4751 (got_object): Remove.
4752 * method.c (hack_identifier): Use finish_non_static_data_member.
4753 (implicitly_declare_fn): Adjust use of constructor_name.
4754 * parser.c: New file.
4755 * pt.c (parse.h): Do not include it.
4756 (maybe_get_template_decl_from_template): Do not declare it.
4757 (finish_member_template_decl): Tweak.
4758 (begin_explicit_instantiation): Adjust for
4759 processing_explicit_instantiation being boolean.
4760 (end_explicit_instantiation): Likewise.
4761 (maybe_process_partial_specialization): Tighten specialization
4763 (retrieve_local_specialization): Adjust ue of hash table.
4764 (eq_local_specializations): New function.
4765 (register_local_specialization): Likewise.
4766 (push_template_decl_real): Remove unnecessary test.
4767 (maybe_get_template_decl_from_type_decl): Don't make it static.
4768 (for_each_template_parm_r): Handle TYPEOF_TYPE.
4769 (tsubst_copy): Use retrieive_local_specialization to handle
4770 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
4771 Handle COMPONENT_REFs with pseudo-destructor-expressions.
4772 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4773 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4774 (unify): Tweak handling of CONST_DECLs.
4775 (regenerate_decl_from_template): Use push_nested_class.
4776 (template_for_substitution): New funciton.
4777 (instantiate_decl): Use it. Register parameters as local
4779 * rtti.c (init_rtti_processing): Set type_info_ref_type.
4780 (build_typeid): Use it.
4781 (get_typeid): Likeise.
4782 * search.c (accessible_p): Use check_access, not
4783 flag_access_control.
4784 (adjust_result_of_qualified_name_lookup): Pay attention to the
4786 * semantics.c (finish_asm_stmt): Adjust error handling.
4787 (finish_label_stmt): Return the statement.
4788 (finish_non_static_data_member): New function.
4789 (finish_class_expr): Handle BASELINKs.
4790 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
4791 (finish_object_call_expr): Simplify handling during templates.
4792 (finish_pseudo_destructor_call_expr): Rename to ...
4793 (finish_pseudo_dtor_expr): ... this.
4794 (finish_compound_literal): New function.
4795 (begin_inline_definitions): Remove.
4796 (finish_sizeof): Remove special template handling.
4797 * spew.c: Do not include parse.h.
4798 * tree.c (get_overloaded_fn): Remove.
4799 * typeck.c (build_class_member_access_expr): Handle
4800 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
4801 (lookup_destructor): New function.
4802 (finish_class_member_access_expr): Use it.
4803 (convert_arguments): Simplify.
4804 (build_unary_op): Handle BASELINKs.
4806 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
4809 * decl2.c (mark_used): Defer inline functions.
4810 (finish_file): Merge deferred_fns loops. Check all used
4811 inline functions have a definition.
4812 * method.c (make_thunk): Thunks are not inline.
4814 PR c++/5116, c++/764
4815 * call.c (build_new_op): Make sure template class operands are
4818 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
4821 * cp-tree.h (resolve_scoped_fn_name): Prototype.
4822 * call.c (resolve_scoped_fn_name): New function. Deal with
4823 more template expansion. Broken out of ...
4824 * parse.y (parse_finish_call_expr): ... here. Call it.
4825 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
4826 resolve_scoped_fn_name and build_call_from_tree.
4829 * decl.c (duplicate_decls): Templates may be disambiguated by
4833 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
4834 conversion operators on failure.
4836 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4838 Remove traditional C constructs 2/n.
4839 * call.c (tourney, build_field_call, equal_functions, joust,
4840 compare_ics, build_over_call, build_java_interface_fn_ref,
4841 convert_like_real, op_error, build_object_call, resolve_args,
4842 build_vfield_ref, check_dtor_name, build_scoped_method_call,
4843 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
4844 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
4845 standard_conversion, reference_related_p,
4846 reference_compatible_p, convert_class_to_reference,
4847 direct_reference_binding, reference_binding,
4848 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
4849 add_template_conv_candidate, any_viable, any_strictly_viable,
4850 build_this, splice_viable, print_z_candidates,
4851 build_user_type_conversion, build_new_function_call,
4852 conditional_conversion, build_conditional_expr, build_new_op,
4853 build_op_delete_call, enforce_access, call_builtin_trap,
4854 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
4855 convert_default_arg, type_passed_as, convert_for_arg_passing,
4856 in_charge_arg_for_name, is_properly_derived_from,
4857 maybe_handle_implicit_object, maybe_handle_ref_bind,
4858 source_type, add_warning, can_convert, can_convert_arg,
4859 perform_implicit_conversion, can_convert_arg_bad,
4860 initialize_reference, add_conv_candidate,
4861 add_template_candidate_real, add_template_candidate): Ansify.
4863 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
4866 * cp-tree.h (grokoptypename): Add SCOPE parameter.
4867 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
4868 if in a template scope.
4869 * parse.y (unoperator): Return the scope.
4870 (operator_name): Adjust grokoptypename call.
4872 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4874 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
4875 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
4876 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
4878 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4880 * ChangeLog: Fix a typo.
4881 * class.c: Fix comment typos.
4882 * cp-tree.h: Likewise.
4884 2002-12-18 Jason Merrill <jason@redhat.com>
4886 Handle anonymous unions at the tree level.
4887 C++ ABI change: Mangle anonymous unions using the name of their
4888 first named field (by depth-first search). Should not cause
4889 binary compatibility problems, though, as the compiler previously
4890 didn't emit anything for affected unions.
4891 * cp-tree.def (ALIAS_DECL): New tree code.
4892 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
4893 first field, not the largest.
4894 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
4895 push the decl, and write it out at namespace scope.
4896 * decl.c (lookup_name_real): See through an ALIAS_DECL.
4897 (pushdecl): Add namespace bindings for ALIAS_DECLs.
4898 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
4899 of a decl which doesn't have one.
4900 * typeck.c (build_class_member_access_expr): Don't recurse if
4901 we already have the type we want.
4903 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4906 * friend.c (make_friend_class): Allow partial specialization
4907 when declaration is not a template friend.
4909 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4912 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
4913 TREE_PROTECTED to created decl nodes.
4915 2002-12-18 Mark Mitchell <mark@codesourcery.com>
4917 * class.c (build_base_field): Do not set DECL_PACKED on the
4920 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
4922 * cp-tree.h (struct tree_srcloc): Use location_t.
4923 (SOURCE_LOCUS): New.
4924 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
4926 2002-12-17 Jason Merrill <jason@redhat.com>
4928 * decl.c (finish_function): Also complain about no return in
4930 * semantics.c (finish_return_stmt): Also call check_return_expr in
4932 * typeck.c (check_return_expr): In a template, just remember that we
4935 2002-12-16 Jason Merrill <jason@redhat.com>
4937 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
4940 * semantics.c (do_pushlevel): Call pushlevel after adding the
4942 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
4943 * parse.y (function_body): Go back to using compstmt.
4944 * decl.c (pushdecl): Skip another level to get to the parms level.
4946 * call.c (build_new_method_call): Use is_dummy_object to determine
4947 whether or not to evaluate the object parameter to a static member
4950 2002-12-14 Jason Merrill <jason@redhat.com>
4952 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
4953 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4954 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
4955 don't bother with an AGGR_INIT_EXPR.
4956 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
4957 just generate a new decl normally. Take return slot parm.
4958 * cp-tree.h: Adjust prototype.
4960 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4963 * cvt.c (convert_to_pointer_force): Don't try comparing against
4966 2002-12-13 Geoffrey Keating <geoffk@apple.com>
4968 * cp-tree.h: Have the multiple-include guards around
4971 2002-12-10 David Edelsohn <edelsohn@gnu.org>
4973 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
4975 (snarf_method): Same.
4976 (snarf_defarg): Same.
4978 2002-12-10 Mark Mitchell <mark@codesourcery.com>
4981 * pt.c (tsubst_copy): Handle destructor names more correctly.
4983 2002-12-10 Matt Austern <austern@apple.com>
4985 * cp-tree.h: get rid of needs_virtual_reinit bit.
4987 2002-12-09 Mark Mitchell <mark@codesourcery.com>
4989 * NEWS: Document removal of in-class initialization extension for
4990 static data members of non-arithmetic, non-enumeration type.
4991 * decl.c (check_static_variable_definition): Do not allow that
4993 * decl2.c (grokfield): Do not call digest_init when processing
4996 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4998 * error.c (dump_expr): Fix format specifier warning.
5000 2002-12-04 Geoffrey Keating <geoffk@apple.com>
5002 * class.c (finish_struct_1): Correct comment.
5003 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5005 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5008 * error.c (dump_expr): Don't ever try to dump a non-existent
5011 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
5013 Implement covariant returns.
5014 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5015 (struct lang_decl_flags): Add this_thunk_p flag.
5016 Rename vcall_offset to virtual_offset.
5017 (struct lang_decl): Rename delta to fixed_offset.
5018 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5019 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5020 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5021 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5022 (make_thunk): Add this_adjusting arg.
5023 (finish_thunk): Declare.
5024 (mangle_thunk): Add this_adjusting arg.
5025 * class.c (get_vcall_index): Use base function for lookup.
5026 (update_vtable_entry_for_fn): Generate covariant thunk.
5027 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5028 (build_vtbl_initializer): Use base function for lookup.
5029 Finish covariant thunk here. Adjust thunk generation.
5030 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5031 Adjust thunk dumping.
5032 * mangle.c (mangle_call_offset): New function.
5033 (mangle_thunk): Adjust for covariant thunks.
5034 * method.c (make_thunk): Adjust. Do not set name here.
5035 (finish_thunk): New function. Set name here.
5036 (use_thunk): Generate covariant thunks too.
5037 (thunk_adjust): New function.
5038 * search.c (covariant_return_p): Remove. Fold into ...
5039 (check_final_overrider): ... here. Simplify.
5040 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5042 2002-12-03 Jason Merrill <jason@redhat.com>
5045 * call.c (build_over_call): Check specifically for TARGET_EXPR
5048 PR c++/8461, c++/8625
5049 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5050 (cp_convert_parm_for_inlining): Remove.
5051 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5053 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5054 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5056 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5057 an ambiguous conversion.
5059 2002-12-03 Mark Mitchell <mark@codesourcery.com>
5062 * decl.c (reshape_init): Handle erroneous initializers.
5064 2002-12-02 Mark Mitchell <mark@codesourcery.com>
5067 * spew.c (remove_last_token): Make sure that last_chunk is set
5071 * error.c (dump_expr): Handle character constants with
5074 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5077 * decl.c (grokdeclarator): Require class-key for all friend class.
5078 Output the correct type and context in the error message.
5080 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5083 * pt.c (unify): Use variably_modified_type_p to test validity of
5084 template argument types.
5087 * cp-tree.h (lang_type_class): Add typeinfo_var.
5088 (CLASSTYPE_TYPEINFO_VAR): New macro.
5089 * rtti.c (get_tinfo_decl): Use it.
5092 * init.c (expand_member_init): Always get the main variant of a
5095 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5099 * decl.c (cxx_init_decl_processing): Use size_type_node, not
5101 * decl2.c (coerce_new_type): Likewise.
5102 * except.c (do_allocate_exception): Likewise.
5104 2002-11-30 Zack Weinberg <zack@codesourcery.com>
5106 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5107 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5108 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5109 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5110 typeck2.c: Include coretypes.h and tm.h.
5111 * Make-lang.in: Update dependencies.
5113 2002-11-30 Mark Mitchell <mark@codesourcery.com>
5116 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5117 (check_initializer): Validate the type of the initialized
5118 variable, even if the initializer is absent.
5119 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5122 * typeck.c (convert_for_assignment): Do not use
5123 decl_constant_value on the operand.
5126 * pt.c (instantiate_decl): Handle template friends defined outside
5127 of the class correctly.
5129 2002-11-29 Joe Buck <jbuck@synopsys.com>
5131 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5134 2002-11-29 Mark Mitchell <mark@codesourcery.com>
5136 * class.c (walk_subobject_offsets): Recur on binfos as well as on
5138 (layout_nonempty_base_or_field): Pass it a binfo when processing a
5140 (layout_empty_base): Likewise.
5141 (build_base_field): Likewise.
5143 2002-11-27 Mark Mitchell <mark@codesourcery.com>
5145 * class.c (build_base_field): Make sure we get the canonical base
5146 when descending through primary bases.
5148 2002-11-26 Geoffrey Keating <geoffk@apple.com>
5150 * decl.c (check_initializer): Don't error on initialisation of
5151 a scalar with a brace-enclosed expression.
5153 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
5155 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5156 (template_parms_equal): Remove prototype.
5157 * typeck.c (buuld_indirect_ref): Reformat.
5159 2002-11-25 Jason Merrill <jason@redhat.com>
5161 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
5164 2002-11-25 Mark Mitchell <mark@codesourcery.com>
5166 * tree.c (cp_build_qualified_type_real): Correct handling of
5168 * class.c (walk_subobject_offsets): Fix thinko.
5169 (build_base_field): Record offsets of empty bases in primary
5171 (layout_class_type): Record offsets of empty bases in fields.
5173 * search.c (is_subobject_of_p_1): Fix thinko.
5174 (lookup_field_queue_p): Likewise.
5176 2002-11-24 Mark Mitchell <mark@codesourcery.com>
5178 * class.c (layout_class_type): Reuse tail padding when laying out
5181 2002-11-22 Mark Mitchell <mark@codesourcery.com>
5183 * rtti.c (qualifier_flags): Fix thinko.
5185 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5187 Remove traditional C constructs 1/n.
5188 * cp-tree.h (init_method, set_mangled_name_for_decl,
5189 build_opfncall, hack_identifier, make_thunk, use_thunk,
5190 synthesize_method, implicitly_declare_fn,
5191 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
5192 maybe_clone_body): Remove use of PARAMS.
5194 * method.c (do_build_assign_ref, do_build_copy_constructor,
5195 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
5197 (synthesize_method): Use 'bool' type and constants instead of
5199 (locate_copy): Likewise.
5200 (implicitly_declare_fn): Likewise.
5202 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
5203 Remove old-style declaration.
5204 (maybe_clone_body): Use 'bool' type and constants.
5206 2002-11-21 Glen Nakamura <glen@imodulo.com>
5209 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
5210 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
5211 of the branches of a COND_EXPR.
5213 2002-11-19 Mark Mitchell <mark@codesourcery.com>
5215 * pt.c (for_each_template_parm): Free allocated memory.
5216 * search.c (is_subobject_of_p_1): New function.
5217 (is_subobject_of_p): Avoid walking virtual bases multiple times.
5219 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
5221 * g++spec.c (lang_specific_spec_functions): New.
5223 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5225 * ChangeLog: Follow spelling conventions.
5226 * class.c: Likewise.
5227 * decl2.c: Likewise.
5229 2002-11-14 Zack Weinberg <zack@codesourcery.com>
5231 * search.c (dfs_push_decls): Do not try to reorder elements
5232 3..n of method_vec if method_vec has only two elements.
5233 Reverse order of two tests to avoid accessing unallocated
5236 2002-11-14 Mark Mitchell <mark@codesourcery.com>
5238 * class.c (dfs_find_final_overrider): Adjust so that the most
5239 derived object is a binfo, rather than a class type.
5240 (find_final_overrider): Likewise.
5241 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
5242 (add_vcall_offset): Likewise.
5244 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5247 * pt.c (instantiate_template): Push class scope for member
5249 (get_mostly_instantiated_function_type): Likewise. Don't call
5250 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
5251 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
5252 * mangle.c (write_encoding, write_unqualified_name): Adjust.
5254 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5256 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
5257 vcall offfsets. Split out ...
5258 (add_vcall_offset): ... new function.
5261 * pt.c (for_each_template_parm): Add htab parameter.
5262 (process_partial_specialization): Adjust call.
5263 (push_template_decl_real): Likewise.
5264 (pair_fn_data): Add visited.
5265 (for_each_template_parm_r): Avoid walking duplicates more than
5267 (uses_template_parms): Adjust call to for_each_template_parm.
5269 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5271 * class.c (add_implicitly_declared_members): Put implicitly
5272 declared functions at the end of TYPE_METHODs when -fabi-version
5275 2002-11-05 Geoffrey Keating <geoffk@apple.com>
5277 * decl2.c (finish_file): Correct spelling.
5279 2002-11-03 Mark Mitchell <mark@codesourcery.com>
5281 * call.c (build_special_member_call): Do not try to lookup VTTs by
5283 * class.c (vtbl_init_data): Add generate_vcall_entries.
5284 (get_vtable_decl): Do not look up virtual tables by name.
5285 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
5286 (set_primary_base): Do not set CLASSTYPE_RTTI.
5287 (determine_primary_base): Likewise.
5288 (get_matching_virtual): Remove.
5289 (get_vcall_index): New function.
5290 (update_vtable_entry_for_fn): Do not try to use virtual thunks
5291 when they are not required. Assign vcall indices at this point.
5292 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
5293 Do update dynamic_classes.
5294 (build_vtt): Do not add VTTs to the symbol table.
5295 (build_ctor_vtbl_group): Likewise.
5296 (build_vtbl_initializer): Simplify handling of vcall indices.
5297 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
5298 for the most derived class.
5299 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
5301 * cp-tree.h (dynamic_classes): New macro.
5302 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
5303 (CLASSTYPE_RTTI): Remove.
5304 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
5305 (CLASSTYPE_VCALL_INDICES): New macro.
5306 (CLASSTYPE_VTABLES): Likewise.
5307 (BV_USE_VCALL_INDEX_P): Remove.
5308 (build_vtable_path): Remove.
5309 * decl2.c (finish_vtable_vardecl): Remove.
5310 (key_method): Remove #if 0'd code.
5311 (finish_vtable_vardecl): Rename to ...
5312 (maybe_emit_vtables): ... this.
5313 (finish_file): Use it.
5314 * search.c (look_for_overrides_here): Update comment.
5316 2002-11-01 Zack Weinberg <zack@codesourcery.com>
5319 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
5321 2002-10-30 Jason Merrill <jason@redhat.com>
5324 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
5325 * call.c (convert_for_arg_passing): Set it.
5326 * except.c (stabilize_throw_expr): Recurse for such an arg.
5328 2002-10-31 Mark Mitchell <mark@codesourcery.com>
5330 * cp-tree.h (lang_decl_flags): Remove init_priority.
5331 (lang_decl): Add delta.
5332 (GLOBAL_INIT_PRIORITY): Remove.
5333 (THUNK_DELTA): Revise definition.
5334 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
5335 * dump.c (cp_dump_tree): Don't dump it.
5337 2002-10-30 Mark Mitchell <mark@codesourcery.com>
5340 * typeck2.c (process_init_constructor): Call complete_array_type.
5343 * decl.c (make_typename_type): Issue errors about invalid results.
5345 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5347 Core issue 287, PR c++/7639
5348 * cp-tree.h (lang_type_class): Add decl_list field.
5349 (CLASSTYPE_DECL_LIST): New macro.
5350 (maybe_add_class_template_decl_list): Add declaration.
5351 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
5352 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
5353 (maybe_add_class_template_decl_list): New function.
5354 (add_implicitly_declared_members): Use it.
5355 * decl.c (maybe_process_template_type_declaration): Likewise.
5356 (pushtag): Likewise.
5357 * friend.c (add_friend): Likewise.
5358 (make_friend_class): Likewise.
5359 * semantics.c (finish_member_declaration): Likewise.
5360 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
5361 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
5362 to process members and friends in the order of declaration.
5364 2002-10-29 Mark Mitchell <mark@codesourcery.com>
5367 * decl.c (finish_destructor_body): Create the label to jump to
5368 when returning from a destructor here.
5369 (finish_function_body): Rather than here.
5371 2002-10-25 Zack Weinberg <zack@codesourcery.com>
5374 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
5375 SCOPE_REF is not null before dereferencing it.
5377 2002-10-25 Mark Mitchell <mark@codesourcery.com>
5379 * call.c (build_over_call): Use DECL_CONTEXT, not
5380 DECL_VIRTUAL_CONTEXT.
5381 * class.c (modify_vtable_entry): Don't mess with
5382 DECL_VIRTUAL_CONTEXT.
5383 (set_vindex): Remove.
5384 (set_primary_base): Remove vfuns_p parameter.
5385 (determine_primary_base): Likewise.
5386 (modify_all_vtables): Likewise.
5387 (layout_class_type): Likewise. Adjust calls to other functions
5389 (finish_struct_1): Adjust calls to modified functions. Set
5391 * cp-tree.h (lang_type_class): Remove vsize.
5392 (CLASSTYPE_VSIZE): Remove.
5393 (lang_decl): Remove thunks.
5394 (DECL_THUNKS): Adjust.
5395 (DECL_VIRTUAL_CONTEXT): Remove.
5396 (duplicate_decls): Don't copy it.
5397 * pt.c (build_template_decl): Don't set it.
5398 (tsubst_decl): Likewise.
5399 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5401 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5402 (build_vtable_entry): Remove.
5403 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5404 (lang_decl): Add thunks.
5405 (DECL_THUNKS): New macro.
5406 * decl.c (duplicate_decls): Copy it.
5407 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5408 * semantics.c (emit_associated_thunks): Simplify.
5410 2002-10-24 David Edelsohn <edelsohn@gnu.org>
5413 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5414 lang_type structure exists before accessing field.
5415 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5416 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5417 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5418 * class.c (check_field_decls): Use new macros.
5419 * typeck2.c (process_init_constructor): Remove redundant check for
5420 existence of lang_type structure.
5422 2002-10-24 Mark Mitchell <mark@codesourcery.com>
5424 * class.c (end_of_base): New method.
5425 (end_of_class): Use it. Check indirect virtual bases.
5427 * class.c (check_field_decls): Fix typo.
5429 2002-10-23 Mark Mitchell <mark@codesourcery.com>
5432 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5436 * spew.c (next_token): Do not return an endless stream of
5437 END_OF_SAVED_INPUT tokens.
5438 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5439 the cached token stream.
5440 (snarf_defarg): Likewise.
5442 2002-10-23 Zack Weinberg <zack@codesourcery.com>
5444 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5445 variably_modified_type_p.
5446 * cp-tree.h: Remove prototype of variably_modified_type_p.
5447 * tree.c (variably_modified_type_p): Remove; now implemented
5448 in language-independent code.
5450 2002-10-22 Mark Mitchell <mark@codesourcery.com>
5453 * spew.c (snarf_parenthesized_expression): New function.
5454 (snarf_block): Use it.
5456 2002-10-22 Richard Henderson <rth@redhat.com>
5458 * method.c (use_thunk): Always compute vcall_value; assert that
5459 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
5460 for vcall thunks as well.
5462 2002-10-21 Mark Mitchell <mark@codesourcery.com>
5464 * class.c (empty_base_at_nonzero_offset_p): New function.
5465 (layout_nonempty_base_or_field): Do not check for conflicts when
5466 laying out a virtual base using the GCC 3.2 ABI.
5467 (build_base_field): Correct checking for presence of empty classes
5468 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5470 * class.c (include_empty_classes): Use normalize_rli.
5471 (layout_class_type): Likewise.
5473 * decl.c (reshape_init): Tweak handling of character arrays.
5476 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5477 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5478 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5479 (check_field_decls): Likewise.
5480 (layout_class_type): Likewise.
5481 (finish_struct_1): Initialize it.
5482 (walk_subobject_offsets): Use it to prune searches.
5484 2002-10-20 Mark Mitchell <mark@codesourcery.com>
5486 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5487 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5488 TARGET_ASM_OUTPUT_MI_THUNK in comments.
5490 2002-10-18 Zack Weinberg <zack@codesourcery.com>
5492 * decl.c (start_decl): Point users of the old initialized-
5493 typedef extension at __typeof__.
5495 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5497 * Make-lang.in (method.o): Depend on TARGET_H.
5498 * method.c (target.h): Include it.
5499 (use_thunk): Use target hooks. Use vcall thunks, if available.
5501 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5503 * class.c (base_derived_from): Make sure return value is a bool.
5505 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5507 * class.c (find_final_overrider_data_s): Remove overriding_fn and
5509 (dfs_base_derived_from): New function.
5510 (base_derived_from): Likewise.
5511 (dfs_find_final_overrider): Use base_derived_from.
5512 (find_final_overrider): Adjust.
5514 2002-10-18 Jason Merrill <jason@redhat.com>
5517 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5518 with condition decls in a template.
5520 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
5522 * class.c (add_method): Compare template parms too.
5524 2002-10-17 Mark Mitchell <mark@codesourcery.com>
5527 * class.c (handle_using_decl): Allow the declaration used to be
5528 from an ambiguous base.
5530 * pt.c (convert_template_argument): Revert this change:
5531 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5532 * pt.c (convert_template_argument): Do not fold non-type
5533 template rguments when inside a template.
5535 * init.c (expand_default_init): Handle brace-enclosed initializers
5538 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5540 * mangle.c (write_expression): Correct handling of enumeration
5542 (write_template_arg): Likewise.
5543 * pt.c (convert_template_argument): Do not fold non-type template
5544 arguments when inside a template.
5547 * cvt.c (convert_to_reference): Allow references as the incoming
5550 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5553 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5554 build_qualified_type.
5556 2002-10-15 Richard Henderson <rth@redhat.com>
5558 * error.c (dump_expr): Use real_to_decimal directly, and with
5561 2002-10-15 Mark Mitchell <mark@codesourcery.com>
5563 * decl.c (reshape_init): Fix typo.
5565 * cp-tree.h (operator_name_info_t): Add arity.
5566 * lex.c (init_operators): Initialize it.
5567 * mangle.c (write_conversion_operator_name): New function.
5568 (write_unqualified_name): Use it.
5569 (write_template_args): Accept template arguments as a TREE_LIST.
5570 (write_expression): Adjust handling of qualified names to match
5573 2002-10-15 Jason Merrill <jason@redhat.com>
5575 * call.c (call_builtin_trap): New fn.
5576 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
5577 (build_call): Don't set current_function_returns_abnormally outside
5580 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5582 * class.c (check_field_decls): Remove empty_p parameter. Instead,
5583 clear CLASSTYPE_EMPTY_P.
5584 (build_base_field): Likewise.
5585 (build_base_fields): Likewise.
5586 (check_bases_and_members): Likewise.
5587 (create_vtbl_ptr): Likewise.
5588 (layout_class_type): Likewise. Ensure that empty classes have
5589 size zero when used as base classes in the 3.2 ABI.
5590 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
5591 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
5593 (is_empty_class): Correct definition when using post-3.2 ABI.
5594 * cp-tree.h (lang_type_class): Add empty_p.
5595 (CLASSTYPE_EMPTY_P): New macro.
5597 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
5599 * init.c (build_delete): Do not apply save_expr for arrays.
5600 (build_vec_delete): Likewise.
5602 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5604 * decl.c (layout_var_decl): Call layout_decl even for variables
5605 whose type is an array with unspecified bounds.
5608 * lex.c (do_identifier): Add another option for the parsing
5610 * parse.y (do_id): Use it.
5612 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
5614 PRs C++/6803, C++/7721 and C++/7803
5615 * decl.c (grokdeclarator): Gracefully handle template-name as
5618 2002-10-11 Jason Molenda <jmolenda@apple.com>
5620 * init.c (build_field_list): Provide uses_unions_p with a default
5623 2002-10-11 Mark Mitchell <mark@codesourcery.com>
5626 * cp-tree.h (variably_modified_type_p): New function.
5627 (grokdeclarator) Tighten check for variably modified types as
5629 * pt.c (convert_template_argument): Do not allow variably modified
5630 types as template arguments.
5631 * tree.c (variably_modified_type_p): New function.
5633 * NEWS: Document removal of "new X = ..." extension.
5634 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
5635 brace-enclosed initializers.
5636 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
5637 (initialize_local_var): Remove declaration.
5638 (expand_static_init): Likewise.
5639 * decl.c (next_initializable_field): New function.
5640 (reshape_init): Likewise.
5641 (check_initializer): Use them. Build dynamic initializer for
5642 aggregates here too.
5643 (initialize_local_var): Simplify, and incorporate cleanup
5644 insertion code as well.
5645 (destroy_local_var): Remove.
5646 (cp_finish_decl): Tidy.
5647 (expand_static_init): Fold checks for whether or not a variable
5648 needs initialization into this function. Simplify.
5649 * decl2.c (do_static_initialization): Simplify.
5650 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5651 be done for us automatically.
5652 (expand_default_init): Handle brace-enclosed initializers
5654 (expand_aggr_init_1): Remove RTL-generation code.
5655 (build_vec_init): Remove "new X = ..." support.
5656 * parse.y (new_initializer): Likewise.
5657 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5658 brace-enclosed initializer.
5659 (create_pseudo_type_info): Likewise.
5660 * typeck2.c (store_init_value): Don't try to handle digest_init
5661 being called more than once.
5662 (digest_init): Tidy handling of brace-enclosed initializers.
5664 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5666 * decl.c (typename_hash): Use htab_hash_pointer.
5668 2002-10-10 Jim Wilson <wilson@redhat.com>
5670 * decl.c (duplicate_decls): Don't call decl_attributes.
5672 2002-10-09 Zack Weinberg <zack@codesourcery.com>
5675 * decl.c (start_decl): Unconditionally issue error for
5676 'typedef foo = bar'.
5677 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5678 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5680 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5682 * decl2.c (prune_vtable_vardecl): Delete unused function.
5684 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5687 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5688 procesing template functions.
5689 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5690 type. Call layout_decl.
5691 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5693 2002-10-07 Richard Henderson <rth@redhat.com>
5695 * decl2.c, pt.c: Revert c++/7754 fix.
5697 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5700 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5702 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5705 * pt.c (for_each_template_parm_r): Handle BASELINKs.
5708 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5709 procesing template functions.
5710 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5711 type. Call layout_decl.
5712 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5714 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5717 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5718 template parameters.
5719 (globals): Add entity and need_abi_warning.
5720 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5721 CLASSTYPE_TEMPLATE_INFO.
5722 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
5724 (write_prefix): Handle typename types correctly.
5725 (write_template_prefix): Handle template template parameters
5727 (start_mangling): Add entity parameter.
5728 (finish_mangling): Warn about names whose mangling will change.
5729 (mangle_decl_string): Adjust.
5730 (mangle_type_string): Likewise.
5731 (mangle_special_for_type): Likewise.
5732 (mangle_ctor_vtbl_for_type): Likewise.
5733 (mangle_thunk): Likewise.
5734 (mangle_guard_variable): Likewise.
5735 (mangle_ref_init_variable): Likewise.
5737 2002-10-02 Mark Mitchell <mark@codesourcery.com>
5740 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5741 * cp-tree.h (emit_base_init): Rename to ....
5742 (emit_mem_initializers): ... this.
5743 (expand_member_init): Change prototype.
5744 * init.c (perform_member_init): Compute explicit, rather than
5745 requiring it as a parameter.
5746 (sort_member_init): Rename to ...
5747 (sort_mem_initializers): ... this. Process bases and data members
5749 (sort_base_init): Remove.
5750 (emit_base_init): Rename to ...
5751 (emit_mem_initializers): ... this.
5752 (expand_aggr_vbase_init_1): Remove.
5753 (construct_virtual_bases): Rename to ...
5754 (construct_virtual_base): ... this.
5755 (expand_member_init): Rework handling of base initializers.
5756 * method.c (do_build_copy_constructor): Use
5757 finish_mem_initializers.
5758 * parse.y (member_init): Adjust calls to expand_member_init.
5759 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5760 (tsubst_initializer_list): Use expand_member_init.
5761 * semantics.c (finish_mem_intiailizers): Simplify.
5763 2002-10-02 Matt Austern <austern@apple.com>
5764 * decl.c (walk_vtables_r): Fixed typo that caused result to
5765 never get a nonzero value.
5767 2002-10-02 Roger Sayle <roger@eyesopen.com>
5769 PR optimization/6627
5770 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5771 from here, and move it to tree.h.
5772 * decl.c (cxx_init_decl_processing): If storing the vbit
5773 in function pointers, ensure that force_align_functions_log
5776 2002-10-02 Matt Austern <austern@apple.com>
5778 * class.c (check_field_decls): Changed warning about const member
5779 variables so that it doesn't get issued for a class aggregate.
5781 2002-10-01 Mark Mitchell <mark@codesourcery.com>
5783 * decl.c (cp_finish_decl): Make sure array types are laid out,
5784 even if the array bounds are unknown.
5786 2002-10-01 Steve Ellcey <sje@cup.hp.com>
5788 * class.c (build_vtbl_initializer): Change build_c_cast
5791 2002-10-01 Mark Mitchell <mark@codesourcery.com>
5793 * decl.c (cp_finish_decl): Make sure array types are laid out,
5794 even if the array bounds are unknown.
5796 * decl.c (cp_finish_decl): Correct check for dynamic
5797 initialization of thread-local storage.
5799 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
5801 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
5804 2002-09-30 Steve Ellcey <sje@cup.hp.com>
5806 * class.c (build_vtbl_initializer): Add cast.
5807 (add_vcall_offset_vtbl_entries_1):
5808 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
5810 2002-09-30 Mark Mitchell <mark@codesourcery.com>
5812 * class.c (walk_subobject_offsets): Correct the calculation of
5813 offsets for virtual bases. Correct the counting of array
5815 (layout_nonempty_base_or_field): Simplify. Correct the
5816 calculation of offsets to be propagated through the binfo
5818 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
5819 Add the FIELD_DECL to TYPE_FIELDS.
5820 (build_base_fields): Adjust accordingly.
5821 (layout_virtual_bases): Use build_base_field.
5822 (end_of_class): Return a tree, not an integer.
5823 (warn_about_ambiguous_direct_bases): Rename to ...
5824 (warn_about_ambiguous_bases): ... this.
5825 (include_empty_classes): New function.
5826 (layout_class_type): Create an alternative version of the type to
5827 be used when as a base class type. Do not call
5828 finish_record_layout until we are done laying out the class.
5829 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
5831 (CLASSTYPE_SIZE): Reimplement.
5832 (CLASSTYPE_SIZE_UNIT): Likewise.
5833 (CLASSTYPE_ALIGN): Likweise.
5834 (CLASSTYPE_USER_ALIGN): Likewise.
5835 (CLASSTYPE_AS_BASE): New macro.
5836 (DECL_INITIALIZED_P): Likewise.
5837 (extract_init): Remove prototype.
5838 (build_forced_zero_init): Rename to ...
5839 (build_zero_init): ... this.
5840 (force_store_init_value): Remove.
5841 * decl.c (obscure_complex_init): Remove.
5842 (duplicate_decls): Copy DECL_INITIALIZED_P.
5843 (check_initializer): Do not leave junk in DECL_INITIAL.
5844 (cp_finish_decl): Handle zero-initialization of entities with
5845 static storage duration.
5846 * expr.c (extract_init): Remove.
5847 * init.c (build_forced_zero_init): Remove.
5848 (build_zero_init): New function.
5849 (build_default_init): Use it.
5850 (build_field_list): Skip FIELD_DECLs for base subobjects.
5851 (push_base_cleanups): Likewise.
5852 * method.c (do_build_assign_ref): Likewise.
5853 (synthesize_exception_spec): Likewise.
5854 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
5855 (regenerate_decl_from_template): To not set DECL_INITIAL for a
5856 static data member whose initialization took place in its class.
5857 (instantiate_decl): Do not pass an initializer to cp_finish_decl
5859 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
5860 (dfs_unuse_fields): Likewise.
5861 * tree.c (pod_type_p): Handle error_mark_node.
5862 (zero_init_p): Likewise.
5863 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
5865 * typeck2.c (store_init_value): Remove #if 0'd code.
5866 (force_store_init_value): Remove.
5867 (process_init_constructor): Use build_zero_init.
5869 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
5872 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
5874 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
5876 * cp-tree.h: Fix comment typos.
5880 2002-09-25 Mark Mitchell <mark@codesourcery.com>
5882 * cp/class.c (contains_empty_class_p): New method.
5883 (walk_subobject_offsets): Correct computation of field offset.
5884 (layout_empty_base): Correct placement of emtpy base classes.
5885 (layout_class_type): Warn about ABI changes.
5887 2002-09-23 Mark Mitchell <mark@codesourcery.com>
5889 * cp/class.c (layout_virtual_bases): Do not round the size of the
5890 type to a multiple of the alignment before laying out virtual bases.
5891 (layout_class_type): Correct handling of bit-fields that are wider
5892 than their type inside unions. Round the size of the type to a
5893 even number of bytes when computing the size without virtual
5895 * cp/cp-tree.h (abi_version_at_least): New macro.
5897 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
5899 * ChangeLog: Follow spelling conventions.
5900 * ChangeLog.2: Likewise.
5902 * class.c: Likewise.
5903 * cp-tree.h: Likewise.
5906 * decl2.c: Likewise.
5907 * except.c: Likewise.
5908 * friend.c: Likewise.
5909 * g++spec.c: Likewise.
5912 * mangle.c: Likewise.
5913 * method.c: Likewise.
5914 * operators.def: Likewise.
5915 * optimize.c: Likewise.
5918 * search.c: Likewise.
5919 * semantics.c: Likewise.
5922 * typeck.c: Likewise.
5924 2002-09-18 Devang Patel <dpatel@apple.com>
5926 * cp/cp-tree.h: New prototype for walk_vtabls().
5927 * cp/decl.c (walk_vtables_r): New function.
5928 (struct cp_binding_level): Add new members, namespaces,
5929 names_size and vtables.
5930 (add_decl_to_level): Add decl in namespaces or vtables
5931 chain, if conditions match.
5932 (walk_vtables): New function.
5933 (walk_namespaces_r): Travers separate namespace chain
5934 for namespace decls.
5935 (wrapup_globals_for_namespace): Use names_size instead
5937 * cp/decl2.c (finish_file): Use walk_vtables() instead of
5938 walk_globals() to walk vtable decls.
5940 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
5942 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
5943 ICE with invalid pointers & references.
5945 2002-09-17 Zack Weinberg <zack@codesourcery.com>
5947 * Make-lang.in: Remove all references to the demangler.
5948 * cxxfilt.c: Moved to binutils.
5950 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5953 * pt.c (tsubst_decl): Remove assert.
5955 Remove DR 295 implementation.
5956 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
5957 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
5958 about ignoring volatile qualifiers.
5960 * search.c (lookup_member): Correct documentation.
5962 2002-09-16 Geoffrey Keating <geoffk@apple.com>
5964 * cp-tree.h (union lang_tree_node): Add chain_next option.
5966 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5968 * parse.y (parse_finish_call_expr): Check lookup_member result.
5971 * semantic.c (finish_asm_stmt): Fix operand/output_operands
5973 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
5975 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
5978 * call.c (build_over_call): Convert this pointer for fns found by
5981 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
5983 * ChangeLog: Follow spelling conventions.
5984 * ChangeLog.1: Likewise.
5986 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
5989 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
5991 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
5993 * error.c: Fix comment formatting.
5994 * except.c: Likewise.
5996 * friend.c: Likewise.
5997 * g++spec.c: Likewise.
6000 * mangle.c: Likewise.
6001 * method.c: Likewise.
6002 * optimize.c: Likewise.
6005 * search.c: Likewise.
6006 * semantics.c: Likewise.
6009 * typeck.c: Likewise.
6010 * typeck2.c: Likewise.
6012 2002-09-13 Matt Austern <austern@apple.com>
6015 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6016 * cp/call.c: Change call-by-const-reference mechanism to use
6017 non_cast_lvalue_p when deciding whether the create a temporary.
6018 We need a temporary when passing, e.g. (long) x by const ref.
6020 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
6022 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6024 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
6026 * decl.c: Fix comment formatting.
6027 * decl2.c: Likewise.
6029 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
6031 * call.c: Fix comment formatting.
6032 * class.c: Likewise.
6033 * cp-lang.c: Likewise.
6034 * cp-tree.h: Likewise.
6037 2002-09-11 Zack Weinberg <zack@codesourcery.com>
6039 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6040 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6041 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6042 minor adjustments (use version_string, eliminate yet another
6043 duplicate of xmalloc)
6045 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6047 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6049 2002-09-05 Jason Merrill <jason@redhat.com>
6051 * typeck2.c (add_exception_specifier): Only pedwarn for an
6053 (require_complete_eh_spec_types): New fn.
6054 (cxx_incomplete_type_diagnostic): Also support pedwarning.
6055 * typeck.c (complete_type_or_diagnostic): Likewise.
6056 * call.c (build_call): Call require_complete_eh_spec_types.
6057 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6058 on an incomplete type.
6060 2002-09-04 Jakub Jelinek <jakub@redhat.com>
6062 * decl.c (start_cleanup_fn): Clear interface_only before
6063 start_function, restore it afterwards.
6065 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
6067 * cp-tree.h (finish_builtin_type): Remove.
6068 * decl2.c (finish_builtin_type): Move to common code.
6069 * decl.c (build_ptrmemfunc_type): Adjust.
6070 * rtti.c (create_pseudo_type_info): Adjust.
6071 (create_tinfo_types): Adjust.
6073 2002-08-31 Jason Merrill <jason@redhat.com>
6075 * cp-lang.c (cp_expr_size): Allow initialization from a
6078 2002-08-30 Richard Henderson <rth@redhat.com>
6081 * tree.c: Include target.h.
6082 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6084 * Makefile.in (tree.o): Update.
6086 2002-08-27 Mark Mitchell <mark@codesourcery.com>
6088 * class.c (layout_virtual_bases): Warn about bugs in G++ that
6089 result in incorrect object layouts.
6090 (layout_class_type): Likewise.
6092 2002-08-24 Matt Austern <austern@apple.com>
6094 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6096 (real_lvalue_p): Update caller.
6098 (non_cast_lvalue_or_else): New.
6099 * tree.h: Declare it.
6100 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6102 2002-08-22 Mark Mitchell <mark@codesourcery.com>
6104 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6105 and COND_EXPR specially; fix error message output.
6107 2002-08-22 Jason Merrill <jason@redhat.com>
6109 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6110 * semantics.c (nullify_returns_r): Likewise.
6112 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
6115 * typeck.c (finish_class_member_access_expr): Diagnose cases where
6116 name lookup finds nothing.
6118 2002-08-15 Jason Merrill <jason@redhat.com>
6120 * semantics.c (finish_then_clause): Remove redundant assignment.
6121 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6122 extra binding level outside the if/switch statement.
6123 (finish_while_cond, finish_for_cond): Rewrite complex condition
6126 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
6128 * parse.y (sizeof, alignof, typeof): New non-terminals to
6129 increment skip_evaluation. Replace terminals with them and
6130 decrement skip_evaluation at the end of rules using them.
6131 * decl2.c (mark_used): Don't assemble_external if
6132 skipping evaluation.
6134 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
6137 * parse.y (parse_finish_call_expr): Handle incomplete
6138 type used to name a scope.
6140 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
6143 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6144 regression caused by my 2002-08-08 patch.
6146 2002-08-13 Mark Mitchell <mark@codesourcery.com>
6148 * decl.c (pushdecl_class_level): Honor requests to bind names to
6151 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6153 * decl2.c (build_call_from_tree): Fix uninitialized variable.
6154 * parse.y (parse_finish_call_expr): Likewise.
6155 * repo.c (old_args, old_dir, old_main): Const-ify.
6157 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
6159 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6160 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
6161 * optimize.c (maybe_clone_body): Likewise.
6162 * pt.c (tsubst_enum): Likewise.
6163 (lookup_template_class): Likewise.
6164 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
6166 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
6168 * lang-specs.h: Remove -ansi.
6170 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
6172 * tree.c (maybe_dummy_object): Replace // with /* */
6174 2002-08-09 Mark Mitchell <mark@codesourcery.com>
6176 * call.c (standard_conversion): Use build_ptrmem_type.
6177 * cp-tree.h (build_ptrmem_type): New function.
6178 (adjust_result_of_qualified_name_lookup): Likewise.
6179 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
6180 static data members.
6181 (build_ptrmem_type): New function.
6182 (grokdeclarator): Do not use build_offset_type when encountering a
6184 * parse.y (parse_finish_call_expr): Use
6185 adjust_result_of_qualified_name_lookup.
6186 * search.c (adjust_result_of_qualified_name_lookup): New function.
6187 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
6188 accessing OFFSET_TYPEs directly.
6190 2002-08-08 Mike Stump <mrs@apple.com>
6192 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
6193 (type_decays_to): Likewise.
6194 * class.c (find_final_overrider): Likewise.
6195 (maybe_note_name_used_in_class): Likewise.
6196 * decl.c (current_tmpl_spec_kind): Likewise.
6197 (add_binding): Likewise.
6198 (push_class_binding): Likewise.
6199 (duplicate_decls): Likewise.
6200 (layout_var_decl): Likewise.
6201 (grokfndecl): Likewise.
6202 (grokdeclarator): Likewise.
6203 (check_default_argument): Likewise.
6204 * decl2.c (handle_class_head): Likewise.
6205 * error.c (dump_template_decl): Likewise.
6206 * init.c (build_offset_ref): Likewise.
6207 * pt.c (check_specialization_scope): Likewise.
6208 (determine_specialization): Likewise.
6209 (check_explicit_specialization): Likewise.
6210 (maybe_check_template_type): Likewise.
6211 (process_partial_specialization): Likewise.
6212 (check_default_tmpl_args): Likewise.
6213 (push_template_decl_real): Likewise.
6214 (convert_template_argument): Likewise.
6215 (try_class_unification): Likewise.
6216 (get_bindings_real): Likewise.
6217 (do_decl_instantiation): Likewise.
6218 * semantics.c (begin_function_definition): Likewise.
6219 (finish_member_declaration): Likewise.
6220 (check_multiple_declarators): Likewise.
6221 * typeck.c (comp_array_types): Likewise.
6222 (comptypes): Likewise.
6223 (expr_sizeof): Likewise.
6224 (build_binary_op): Likewise.
6225 (dubious_conversion_warnings): Likewise.
6226 (check_return_expr): Likewise.
6228 2002-08-08 Mark Mitchell <mark@codesourcery.com>
6230 * typeck.c (build_class_member_access_expr): Do not return
6231 error_mark_node when no error has occurred.
6233 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6235 * typeck.c (build_component_addr): Remove.
6236 (build_unary_op): Just check it's not a bitfield, and then build
6239 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6241 * class.c (convert_to_base): Correct check for error_mark_node.
6242 (create_vtable_ptr): Remove unused VFUNS_P parm.
6244 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6246 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
6248 2002-08-07 Mark Mitchell <mark@codesourcery.com>
6250 Rework build_component_ref.
6251 * call.c (build_vfield_ref): Do not go through build_component_ref.
6252 (build_field_call): Use build_class_member_access_expr.
6253 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
6254 (build_object_call): Likewise.
6255 * class.c (convert_to_base): New function.
6256 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
6257 (instantiate_type): Handle BASELINKs.
6258 * cp-tree.def (BASELINK): New tree code.
6259 * cp-tree.h (BASELINK_P): Reimplement.
6260 (SET_BASELINK_P): Remove.
6261 (BASELINK_BINFO): Reimplement.
6262 (BASELINK_FUNCTIONS): Likewise.
6263 (BASELINK_ACCESS_BINFO): Likewise.
6264 (BASELINK_OPTYPE): Likewise.
6265 (convert_to_base): New function.
6267 (build_object_ref): Remove.
6268 (build_component_ref_1): Likewise.
6269 (build_component_ref): Likewise.
6270 (build_x_component_ref): Likewise.
6271 (build_class_member_access_expr): New function.
6272 (finish_class_member_access_expr): Likewise.
6273 (build_ptrmemfunc_access_expr): Likewise.
6274 * decl.c (grokdeclarator): Handle BASELINKs.
6275 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
6276 finish_class_member_access_expr.
6277 (arg_assoc): Handle BASELINKs.
6278 (do_class_using_decl): Likewise.
6279 * error.c (dump_decl): Likewise.
6280 (dump_expr): Use build_ptrmemfunc_access_expr.
6281 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
6283 (build_throw): Use BASELINK_FUNCTIONS.
6284 * init.c (perform_member_init): Use
6285 build_class_member_access_expr.
6286 (build_offset_ref): Handle BASELINKs. Use
6287 build_class_member_access_expr.
6288 * method.c (hack_identifier): Likewise.
6289 * parse.y (do_id): Use BASELINK, not TREE_LIST.
6290 (primary): Remove uses of build_object_ref.
6291 * pt.c (lookup_template_function): Handle BASELINKs.
6292 (resolve_overloaded_unification): Likewise.
6293 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
6294 (lookup_field): Use BASELINK, not TREE_LIST.
6295 (lookup_fnfiels): Likewise.
6296 (setup_class_bindings): Likewise.
6297 * semantics.c (finish_object_call_expr): Do not use
6298 build_method_call when we already know what function is being
6300 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
6301 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
6303 (name_p): New function.
6304 * typeck.c (build_object_ref): Remove.
6305 (build_component_ref_1): Likewise.
6306 (build_x_component_ref): Likewise.
6307 (build_class_member_access_expr): New function.
6308 (finish_class_member_access_expr): Likewise.
6309 (build_ptrmemfunc_access_expr): Likewise.
6310 (get_member_function_from_ptrfunc): Use
6311 build_ptrmemfunc_access_expr.
6312 (build_binary_op): Likewise.
6313 (build_unary_op): Likewise.
6314 (build_ptrmemfunc): Likewise.
6315 (pfn_from_ptrmemfunc): Likewise.
6316 * typeck2.c (build_m_component_ref): Adjust comment.
6318 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
6320 * Make-lang.in (CXX_C_OBJS): Update.
6321 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
6322 * cp-tree.h (cxx_decode_option): Remove.
6323 * decl2.c (compare_options, lang_f_options, unsupported_options,
6324 cxx_decode_option): Remove.
6326 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
6328 * typeck.c (build_x_unary_op): Handle pointer-to-member.
6330 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
6332 * class.c: Don't include obstack.h.
6334 * decl2.c: Delete bogus comment.
6335 * error.c: Don't include obstack.h.
6336 * except.c: Likewise.
6337 (dump_type): Correct comment.
6338 * method.c: Don't include obstack.h.
6341 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
6344 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
6345 expressions to pointer-to-data-member of pointer-to-member-functions.
6347 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
6349 * cvt.c (ocp_convert): Delete obsolete code.
6350 * parse.y (permanent_obstack): Delete declaration.
6351 * pt.c (permanent_obstack): Delete declaration.
6352 * repo.c (permanent_obstack): Delete declaration.
6353 (open_repo_file): Use xmalloc instead of permanent_obstack.
6354 (init_repo): Use xstrdup instead of permanent_obstack.
6356 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
6358 * cp-tree.h (VF_DERIVED_VALUE): Remove.
6359 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
6361 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
6364 C++ ABI change - vfunc ordering.
6365 * class.c (add_virtual_function): Remove.
6366 (dfs_modify_all_vtables): Take list of all declared
6367 virtuals. Assign all that are not in primary base.
6368 (check_for_override): Adjust comments.
6369 (create_vtable_ptr): Take single list of virtuals. Build chain
6370 of declared virtuals here.
6371 (layout_class_type): Take single list of virtuals. Adjust.
6372 (finish_struct_1): Keep virtuals on single list. Adjust.
6374 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6376 * init.c (build_member_call): Use build_new_method_call, not
6379 2002-08-02 Krister Walfridsson <cato@df.lth.se>
6381 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
6383 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6385 * call.c (build_method_call): Issue a more helpful error message
6386 about ambiguous method names.
6388 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
6390 * tree.c (build_shared_int_cst): Make cache file scope, and
6393 2002-08-02 Jason Merrill <jason@redhat.com>
6395 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6396 (cp_expr_size): New fn.
6397 * call.c (build_over_call): Lose empty class hackery.
6398 (convert_arg_to_ellipsis): Promote non-POD warning to error.
6399 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6401 * semantics.c (expand_body): Do tree optimization in the function
6404 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
6406 * cp-tree.h: Move all warning and flag declarations to c-common.h.
6407 * decl.c: Move all warning and flag variables to c-common.c.
6408 * decl2.c: Move all warning and flag variables to c-common.c.
6409 * lex.c (flag_digraphs): Remove.
6410 (warn_traditional): Now in c-common.c.
6412 2002-07-31 Mark Mitchell <mark@codesourcery.com>
6414 * call.c (build_field_call): Do not look up the field by name.
6415 (build_method_call): Simplify.
6416 (struct z_candidate): Add access_path and conversion_path. Remove
6418 (convert_class_to_reference): Adjust use of
6419 add_function_candidate.
6420 (add_candidate): Add conversion_path argument.
6421 (add_function_candidate): Use it.
6422 (add_conv_dndidate): Likewise.
6423 (build_builtin_candidate): Likewise.
6424 (add_template_candidate_real): Add conversion_path argument.
6425 (add_template_conv_candidate): Likewise.
6426 (add_template_candidate): Likewise.
6427 (build_user_type_conversion_1): Use it.
6428 (build_new_function_call): Remove name lookup code. Adjust use of
6429 add_template_candidate and add_function_candidate.
6430 (build_new_op): Likewise.
6431 (convert_like_real): Use build_special_member_call.
6432 (build_over_call): Use cand->conversion_path.
6433 (build_special_member_call): New method.
6434 (build_new_method_call): Remove name lookup code.
6435 * cp-tree.def (OFFSET_REF): Update documentation.
6436 (TEMPLATE_ID_EXPR): Likewise.
6437 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6438 (BASELINK_OPTYPE): Likewise.
6439 (build_new_method_call): Adjust prototype.
6440 (build_special_member_call): New method.
6441 (build_baselink): New method.
6442 (build_offset_ref_call_from_tree): Likewise.
6443 (build_call_from_tree): Likewise.
6444 (finish_qualified_call_expr): Remove.
6445 (finish_call_expr): Adjust prototype.
6446 (build_x_function_call): Remove.
6447 * cvt.c (ocp_convert): Use build_special_member_call.
6448 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6449 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6451 (build_offset_ref_call_from_tree): New function.
6452 (build_call_from_tree): Likewise.
6453 * init.c (expand_cleanup): Use build_special_member_call.
6454 (expand_default_init): Likewise.
6455 (build_member_call): Use finish_call_expr.
6456 (build_new_1): Use build_special_member_call.
6457 (push_base_cleanups): Likewise.
6458 * method.c (do_build_assign_ref): Likewise.
6459 * parse.y (template_id): Do not pass a COMPONENT_REF to
6460 lookup_template_function.
6461 (primary): Use parse_finish_call_epxr, not finish_call_expr.
6462 (parse_finish_call_expr): New function.
6463 * pt.c (lookup_template_function): Add assertions.
6464 * search.c (lookup_base): Allow T to be a binfo.
6465 (build_baselink): New function.
6466 (lookup_member): Use it.
6467 * semantics.c (finish_call_expr): Do not do name lookup.
6468 (finish_object_call_expr): Remove #if 0'd code.
6469 (finish_qualified_call_expr): Remove.
6470 * typeck.c (build_x_function_call): Remove.
6471 (build_static_case): Use build_special_member_call.
6472 * typeck2.c (build_functional_cast): Likewise.
6474 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
6476 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6478 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
6480 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6482 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
6484 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6487 2002-07-29 Alan Modra <amodra@bigpond.net.au>
6489 * cp-tree.h: Comment typo fix.
6491 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
6493 * spew.c (space_for_token): Allocate zeroed memory for a new token
6496 2002-07-27 Roger Sayle <roger@eyesopen.com>
6498 * decl.c (builtin_function_1): No need to explicitly mark
6499 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6501 2002-07-27 Roger Sayle <roger@eyesopen.com>
6503 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6505 2002-07-26 Jason Merrill <jason@redhat.com>
6507 * call.c (build_over_call): Likewise.
6508 (cp_convert_parm_for_inlining): New fn.
6509 (convert_for_arg_passing): New fn.
6510 (convert_default_arg, build_over_call): Use it.
6511 (type_passed_as): New fn.
6512 * pt.c (tsubst_decl): Use it.
6513 * decl2.c (cp_build_parm_decl): New fn.
6514 (build_artificial_parm): Use it.
6515 (start_static_storage_duration_function): Likewise.
6516 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6517 (grokparms): Don't mess with DECL_ARG_TYPE.
6518 * typeck.c (convert_arguments): Use convert_for_arg_passing.
6519 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6521 * cp-tree.h: Declare new fns.
6523 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
6525 * cp-tree.h (flag_operator_names): Remove.
6526 * decl2.c (flag_operator_names): Remove.
6527 (lang_f_options): Remove operator-names.
6528 * lex.c (D_OPNAME): Remove.
6529 (reswords): Remove operator names.
6530 (rid_to_yy): Remove operator names.
6531 (init_reswords): No need to handle D_OPNAME.
6532 * spew.c (read_process_identifier): There are no operator
6535 2002-07-26 Jason Merrill <jason@redhat.com>
6537 * dump.c (cp_dump_tree): Call c_dump_tree.
6538 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6540 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6542 * error.c (print_whitespace): Remove.
6543 * g++spec.c (LIBUNWIND): Move.
6544 * mangle.c (mangled_position, write_signed_number): Remove.
6546 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6548 * decl2.c (cxx_decode_option): Similarly.
6550 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
6552 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6553 (cxx_sizeof_or_alignof_type): Take a third argument.
6554 (cxx_sizeof): Adjust definition.
6555 (cxx_alignof): Likewise.
6556 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6557 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6559 (c_sizeof_nowarn): Remove definition.
6560 (build_unary_op): Use cxx_sizeof_nowarn.
6562 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
6564 * tree.c (cp_build_qualified_type_real): When copying
6565 pointer-to-method types, unshare the record that holds
6566 the cached pointer-to-member-function type.
6568 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6570 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6572 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
6575 * typeck.c (cxx_sizeof_or_alignof_type): New function.
6576 (c_sizeof): Remove definition.
6577 (expr_sizeof): Use cxx_sizeof.
6578 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
6579 * decl.c (finish_destructor_body): Use cxx_sizeof.
6580 * semantics.c (finish_alignof): Likewise.
6581 (finish_alignof): Use cxx_alignof.
6582 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
6583 (cxx_sizeof_or_alignof_type): Declare.
6584 (my_friendly_assert): Move to ../c-common.h.
6586 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6588 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
6590 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6592 PR c++/7347, c++/7348
6593 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
6594 * decl.c (make_typename_type): Use it.
6595 (make_unbound_class_template): Likewise.
6596 (lookup_name_real): Don't call type_access_control if scope is
6597 template parameter dependent.
6598 * parse.y (template_arg): Call make_unbound_class_template with
6600 (nest_name_specifier): Call make_typename_type with tf_parsing set.
6601 (typename_sub0): Likewise.
6602 (typename_sub1): Likewise.
6603 (instantiate_decl): Push class scope.
6604 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
6605 for both static variable and member function template.
6606 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
6608 * search.c (type_access_control): Do type access for TEMPLATE_DECL
6611 2002-07-20 Roger Sayle <roger@eyesopen.com>
6613 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
6614 test by using positive_option. Make whitespace consistent.
6616 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
6618 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
6619 members with 'locus'. Adjust use throughout.
6620 (struct feed): Likewise.
6621 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
6623 (snarf_defarg): Use error(), not error_with_file_and_line().
6625 2002-07-19 Chris Demetriou <cgd@broadcom.com>
6627 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
6628 cpp_options is included.
6630 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6632 PR c++/2862, c++/2863
6633 * pt.c (determine_specialization): Compare the length of
6634 TYPE_ARG_TYPES. Tidy.
6636 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6639 * decl.c (duplicate_decls): Don't propagate inlining parameters from
6640 olddecl to newdecl when newdecl is a specialization of the
6641 instantiation olddecl.
6643 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6645 PR c++/4802, c++/5387
6646 * decl.c (make_typename_type): Use enforce_access.
6648 2002-07-17 Scott Snyder <snyder@fnal.gov>
6651 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6653 2002-07-12 Mark Mitchell <mark@codesourcery.com>
6655 * class.c (add_method): Correct handling of conversion operators.
6657 2002-07-11 Mark Mitchell <mark@codesourcery.com>
6660 * class.c (add_method): Simplify.
6662 2002-07-11 Jason Merrill <jason@redhat.com>
6665 * tree.c (cp_copy_res_decl_for_inlining): Also copy
6668 2002-07-10 Graham Stott <graham.stott@btinternet.com>
6670 * pt.c (template_parm_this_level_p, push_template_decl_real):
6671 Pass depth as int pointer.
6673 2002-07-11 Tim Josling <tej@melbpc.org.au>
6675 Remove front end hard coding from gengtype.c.
6677 * config-lang.in (gtfiles): Add files needed for this front end.
6679 2002-07-10 Mark Mitchell <mark@codesourcery.com>
6681 * cp-tree.h (unqualified_name_lookup_error): Declare it.
6682 (begin_function_definition): Adjust prototype.
6683 * lex.c (unqualified_name_lookup_error): New function, split out
6685 (do_identifier): ... here.
6686 * parse.y (parse_begin_function_definition): New function.
6688 * semantics.c (begin_function_definition): Accept decl-specifiers
6689 and attributes as separate parameters.
6691 2002-07-10 Jason Merrill <jason@redhat.com>
6694 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6695 modifying the old one.
6697 2002-07-09 Mark Mitchell <mark@codesourcery.com>
6699 * cp-tree.h (constructor_name_p): Declare it.
6700 (check_template_template_default_arg): Likewise.
6701 * class.c (handle_using_decl): Use constructor_name_p.
6702 * decl.c (grokdeclarator): Likewise.
6703 * decl2.c (constructor_name_p): Define it.
6704 * init.c (build_member_call): Use constructor_name_p.
6705 * parse.y (template_parm): Use check_template_template_default_arg.
6706 * pt.c (check_explicit_specialization): Use constructor_name_p.
6707 * semantics.c (check_template_template_default_arg): New function.
6709 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6711 * pt.c (can_complete_type_without_circularity): Add static to
6712 function definition.
6714 2002-07-08 Mark Mitchell <mark@codesourcery.com>
6716 * cp-tree.h (have_extern_spec): Declare it
6717 * decl.c (have_extern_spec): Define it.
6718 (start_decl): Eliminate use of used_extern_spec.
6719 (start_function): Likewise.
6720 * parse.y (have_extern_spec): Remove declaration.
6721 (used_extern_spec): Likewise.
6722 (frob_specs): Eliminate use of used_extern_spec.
6723 (.hush_warning): Likewise.
6725 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6727 * Make-lang.in (cp/parse.o): Depend on decl.h.
6728 * cp-tree.h (do_decl_instantiation): Change prototype.
6729 * parse.y: Include decl.h.
6730 (parse_decl_instantiation): New function.
6731 (explicit_instantiation): Use it.
6732 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6735 2002-07-07 Roger Sayle <roger@eyesopen.com>
6737 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6738 constructor and destructor tests when passed a TEMPLATE_DECL.
6740 2002-07-05 Jason Merrill <jason@redhat.com>
6742 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6745 PR optimization/7145
6746 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6748 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
6750 Repair damage on weak-impared targets caused by my previous patch.
6751 * cp-tree.h (import_export_tinfo): Add parameter.
6752 * decl2.c (import_export_tinfo): Add parameter, post adjust
6754 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6755 import_export_tinfo.
6757 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6760 * init.c (build_aggr_init): Remove qualifiers of init before calling
6762 (build_vec_init): Flatten multi-dimensional array during cleanup.
6763 (build_vec_delete_1): Abort if the type of each element is array.
6765 2002-07-03 Graham Stott <graham.stott@btinternet.com>
6767 * pt.c (instantiate_class_template): Fix typo.
6769 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6771 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6772 by CVS conflict in my last patch.
6774 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6777 * pt.c (can_complete_type_without_circularity): New function.
6778 (instantiate_class_template): Use it.
6779 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6780 message due to incomplete fields.
6782 2002-07-01 Mark Mitchell <mark@codesourcery.com>
6785 * mangle.c (write_expression): Add mangling for sizeof when
6787 * operators.def: Remove stale comment.
6789 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
6791 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
6792 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
6793 (tinfo_decl_type): Replace with ...
6794 (type_info_ptr_type): ... this.
6795 (import_export_tinfo): Declare.
6796 (tinfo_decl_p): Rename to ...
6797 (unemitted_tinfo_decl_p): ... this.
6798 * decl2.c (import_export_decl): Break out tinfo handling into ...
6799 (import_export_tinfo): ... here. New function.
6800 (finish_file): Adjust.
6801 * rtti.c (TINFO_REAL_NAME): New macro.
6802 (init_rtti_processing): Create the tinfo types.
6803 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
6804 (get_tinfo_decl): Adjust.
6805 (get_tinfo_ptr): New function.
6806 (get_type_id): Use it.
6807 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
6808 (ptr_initializer): Use get_tinfo_ptr.
6809 (ptm_initializer): Likewise.
6810 (synthesize_tinfo_var): Break into ...
6811 (get_pseudo_ti_init): ... this. Just create the initializer.
6812 (get_pseudo_ti_desc): .. and this.
6813 (create_real_tinfo_var): Remove.
6814 (create_pseudo_type_info): Don't create the vtable decl here.
6815 (get_vmi_pseudo_type_info): Remove.
6816 (create_tinfo_types): Adjust.
6817 (tinfo_decl_p): Rename to ...
6818 (unemitted_tinfo_decl_p): ... here. Adjust.
6819 (emit_tinfo_decl): Adjust. Create the initializer.
6821 2002-06-27 Mark Mitchell <mark@codesourcery.com>
6824 * pt.c (tsubst_friend_class): Substitute into the context of the
6825 friend before using it.
6827 2002-06-26 Mark Mitchell <mark@codesourcery.com>
6829 * cp-tree.h (xref_tag): Change prototype.
6830 (handle_class_head): Likewise.
6831 (build_x_component_ref): Likewise.
6832 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
6833 (xref_tag): Take attributes as a separate parameter.
6834 (xref_tag_from_type): Adjust call to xref_tag.
6835 * decl2.c (build_expr_from_tree): Adjust call to
6836 build_x_component_ref.
6837 (handle_class_head): Take attributes as a separate parameter.
6838 * parse.y (parse_xref_tag): New function.
6839 (parse_handle_class_head): Likewise.
6840 (primary): Use parse_xref_tag.
6841 (class_head_decl): Use parse_handle_class_head.
6842 (class_head_defn): Likewise.
6843 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
6844 (build_dynamic_cast_1): Likewise.
6845 (create_pseudo_type_info): Likewise.
6846 (emit_support_tinfos): Likewise.
6847 * typeck.c (build_object_ref): Adjust call to
6848 build_x_component_ref.
6849 (build_x_component_ref): Remove protect parameter.
6851 2002-06-25 Mark Mitchell <mark@codesourcery.com>
6853 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
6854 * class.c (handle_using_decl): Likewise.
6855 (instantiate_type): Likewise.
6856 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
6857 (xref_basetypes): Change prototype.
6858 (begin_mem_initializers): New function.
6859 (get_overloaded_fn): Likewise.
6860 * decl.c (xref_basetypes): Simplify.
6861 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
6862 * init.c (build_offset_ref): Likewise.
6863 * parse.y (base_init): Use begin_mem_initializers().
6864 (structsp): Adjust call to xref_basetypes.
6865 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
6866 (instantiate_class_template): Adjust call to xref_basetypes.
6867 * semantics.c (begin_mem_initializers): New function.
6868 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
6869 (really_overlaoded_fn): Likewise.
6870 (get_overloaded_fn): New function.'
6871 (get_first_fn): USe BASELINK_FUNCTIONS.
6873 2002-06-24 Mark Mitchell <mark@codesourcery.com>
6875 * cp-tree.h (SCALAR_TYPE_P): New macro.
6876 (check_for_out_of_scope_variable): New function.
6877 (at_class_scope_p): Likewise.
6878 (finish_fname): Likewise.
6879 * class.c (finish_struct): Use at_function_scope_p.
6880 * decl.c (check_for_out_of_scope_variable): New function, split
6881 out from do_identifier.
6882 (finish_enum): Use at_function_scope_p.
6883 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
6884 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
6885 (primary): Use at_function_scope_p.
6886 * search.c (at_class_scope_p): New function.
6887 * semantics.c (finish_fname): Likewise.
6888 (check_multiple_declarators): Use at_function_scope_p.
6890 2002-06-23 Mark Mitchell <mark@codesourcery.com>
6892 * parse.y (parse_scoped_id): New function.
6894 * cp-tree.h (do_scoped_id): Adjust declaration.
6895 * lex.c (do_scoped_id): Remove call to yylex.
6896 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
6897 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
6898 expanding it inline.
6900 2002-06-23 Matt Thomas <matt@3am-software.com>
6902 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
6905 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6907 * mangle.c (integer_type_codes): Const-ify.
6909 2002-06-20 Richard Henderson <rth@redhat.com>
6912 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
6913 Call put_var_into_stack.
6915 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6917 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
6918 array size calculation.
6920 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6923 * pt.c (tsubst_expr): Handle FILE_STMT.
6925 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6928 * pt.c (lookup_template_class): Don't build complete argument of
6929 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
6932 2002-06-19 Akim Demaille <akim@epita.fr>
6934 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
6936 * spew.c, lex.c: Adjust.
6937 * parse.y (explicit_instantiation): Add empty action to override
6938 the default $$ = $1 where it introduces a type clash.
6940 2002-06-14 Jason Merrill <jason@redhat.com>
6942 * semantics.c (begin_for_stmt): Push the 'for' scope before
6943 adding the FOR_STMT.
6946 * class.c (build_base_field): Set DECL_PACKED.
6947 (layout_class_type): Don't use tail padding of PODs.
6948 * mangle.c (write_unqualified_name): Fix template conversion op
6951 2002-06-16 Richard Henderson <rth@redhat.com>
6954 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
6955 after template instantiation.
6957 2002-06-16 Richard Henderson <rth@redhat.com>
6959 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
6961 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
6963 * cp-tree.h (compiler_error): Remove declaration.
6964 * lex.c (compiler_error): Remove definition.
6966 2002-06-14 Steve Ellcey <sje@cup.hp.com>
6968 * g++spec.c (LIBUNWIND): New.
6969 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
6971 2002-06-13 Jessica Han <jessica@cup.hp.com>
6973 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
6974 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
6975 (build_vbase_offset_vtbl_entries): Likewise.
6976 * rtti.c (build_headof): Likewise.
6977 (get_tinfo_decl_dynamic): Likewise.
6978 (create_pseudo_type_info): Likewise.
6980 2002-06-12 Stan Shebs <shebs@apple.com>
6982 * mpw-config.in: Remove file, no longer used.
6983 * mpw-make.sed: Ditto.
6985 2002-06-07 Zack Weinberg <zack@codesourcery.com>
6987 * decl2.c: Update call to cpp_handle_option.
6989 2002-06-07 H.J. Lu (hjl@gnu.org)
6991 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
6993 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
6995 * error.c (cp_error_at): Fix typo.
6997 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
6999 * error.c (cp_diagnostic_starter): Adjust call.
7000 (maybe_print_instantiation_context): Change prototype to take a
7001 'diagnostic_info *'.
7002 (print_instantiation_full_context): Likewise.
7003 (print_instantiation_partial_context): Likewise.
7004 (cp_diagnostic_starter): Likewise.
7005 (cp_diagnostic_finalizer): Likewise.
7006 (cp_print_error_function): Likewise.
7007 (cp_printer): Take a secondary parameter as a 'text_info *'.
7008 Remove output_state savings. Adjust calls.
7010 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7012 * pt.c (inline_parm_levels): Mark for GC.
7014 * mangle.c (start_mangling): Allocate G.substitutions here...
7015 (init_mangle): ... rather than here.
7016 (finish_mangling): Clear the varray pointer when done with it.
7017 * spew.c (yylexstring): Don't use VARRAY_FREE.
7018 * search.c (bfs_walk): Don't use VARRAY_FREE.
7019 * decl2.c (pending_statics): Use gengtype to mark.
7020 (deferred_fns): Likewise.
7021 (ssdf_decls): Likewise.
7022 (init_decl2): Delete.
7023 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7024 (cxx_init_decl_processing): Don't call init_decl2.
7025 (cxx_pop_function_context): Don't use VARRAY_FREE.
7026 * cp-tree.h (struct saved_scope): No need for special marking
7028 (struct language_function): Likewise.
7029 (local_classes): Use gengtype to mark.
7030 (init_decl2): Delete prototype.
7031 * class.c (init_class_processing): Don't use
7032 ggc_add_tree_varray_root.
7033 (build_vtbl_initializer): Don't use VARRAY_FREE.
7035 * decl.c (typename_compare): Don't use same_type_p.
7037 * decl.c: Include hashtab.h instead of hash.h.
7038 (typename_hash): Update to use htab_h.
7039 (typename_compare): Likewise.
7040 (typename_htab): Use gengtype to mark.
7041 (build_typename_type): Update to use htab_h.
7042 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7044 * Make-lang.in (gt-cp-tree.h): New rule.
7045 (cp/tree.o): Depend on gt-cp-tree.h.
7046 * config-lang.in (gtfiles): Add cp/tree.c.
7047 * tree.c: Include gt-cp-tree.h.
7048 (list_hash_table): Use gengtype to mark.
7049 (init_tree): Use gengtype to mark trees.
7051 * Make-lang.in (cp/decl.o): Add debug.h dependency.
7052 * call.c (struct z_candidate): Use gengtype.
7053 (USER_CONV_CAND): Use WRAPPER_ZC.
7054 (convert_class_to_reference): Use build_zc_wrapper.
7055 (build_type_conversion_1): Likewise.
7056 (build_over_call): Use WRAPPER_ZC.
7057 (add_warning): Use build_zc_wrapper.
7058 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7059 * cp-tree.h (struct lang_identifier): Use gengtype.
7060 (struct template_parm_index_s): Likewise.
7061 (struct ptrmem_cst): Likewise.
7062 (struct tree_binding): Likewise.
7063 (struct tree_overload): Likewise.
7064 (struct tree_srcloc): Likewise.
7065 (struct tree_wrapper): Likewise. Also modify to have a pointer
7066 to struct z_candidate rather than void.
7067 (enum cp_tree_node_structure_enum): New.
7068 (union lang_tree_node): New.
7069 (cxx_mark_tree): Delete prototype.
7070 (cp_tree_node_structure): New prototype.
7071 (build_ptr_wrapper): Delete prototype.
7072 (build_int_wrapper): Delete prototype.
7073 (build_zc_wrapper): New prototype.
7074 * decl.c: Include debug.h
7075 (cxx_mark_tree): Delete.
7076 (cp_tree_node_structure): New.
7077 * tree.c (build_ptr_wrapper): Delete.
7078 (build_int_wrapper): Delete.
7079 (build_zc_wrapper): New.
7081 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7082 Correct typo. Patch from k_fukui@highway.ne.jp.
7084 * semantics.c (current_stmt_tree): Update for change to
7085 struct language_function.
7086 (finish_mem_initializers): Likewise.
7087 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7088 * cp-tree.h (struct language_function): Rename from
7089 cp_language_function. Change all uses.
7090 (cp_function_chain): Don't need to cast.
7092 * class.c (duplicate_tag_error): Reset discriminator.
7093 (check_bases_and_members): Update for data structure changes.
7094 * cp-tree.h (struct lang_id2): Use gengtype.
7095 (flagged_type_tree): Likewise.
7096 (SET_LANG_ID): Use GGC on struct lang_id2.
7097 (struct cp_language_function): Use gengtype. Remove field
7098 'x_vcalls_possible_p'.
7099 (current_vcalls_possible_p): Delete.
7100 (struct lang_type_header): New.
7101 (struct lang_type_class): Rename from struct lang_type. Include
7102 struct lang_type_header.
7103 (struct lang_type_ptrmem): New.
7104 (struct lang_type): New.
7105 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
7106 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
7107 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7108 (struct lang_decl_flags): Use gengtype. Add discriminators.
7109 (struct lang_decl): Use gengtype. Add and use discriminators.
7110 Update the macros that reference moved fields.
7111 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
7112 (SET_DECL_THUNK_P): Set discriminator too.
7113 (clear_inline_text_obstack): Delete prototype.
7114 (finish_inline_definitions): Delete prototype.
7115 (mark_pending_inlines): Delete prototype.
7116 (lang_check_failed): New prototype.
7117 * decl.c (struct named_label_use_list): Use gengtype.
7118 (struct named_label_list): Likewise.
7119 (mark_binding_level): Delete.
7120 (mark_named_label_lists): Delete.
7121 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7122 (cxx_init_decl_processing): Use generated marker routine.
7123 (begin_destructor_body): Delete dead set to
7124 current_vcalls_possible_p.
7125 (mark_lang_function): Delete.
7126 (mark_cp_function_context): Delete.
7127 (lang_mark_tree): Use generated marker routines.
7128 * decl2.c (start_objects): Set discriminator when setting
7129 GLOBAL_INIT_PRIORITY.
7130 * lex.c (retrofit_lang_decl): Set discriminators.
7131 (copy_lang_type): Update for changes to lang_type structure.
7132 (cp_make_lang_type): Set discriminator.
7133 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
7134 * search.c: Include ggc.h.
7135 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7136 (finish_inline_definitions): Delete.
7137 * spew.c (struct token): Use gengtype.
7138 (struct token_chunk): New.
7139 (struct unparsed_text): Use gengtype. Store tokens in chunks.
7140 (struct feed): Use gengtype.
7141 (feed_obstack): Delete.
7142 (feed): Mark as GC root.
7143 (pending_inlines): Mark as GC root.
7144 (pending_inlines_tail): Likewise.
7145 (processing_these_inlines): Likewise.
7146 (token_obstack): Make static.
7147 (first_token): Likewise.
7148 (init_spew): Don't initialize deleted things; use gengtype for roots.
7149 (clear_inline_text_obstack): Delete.
7150 (feed_input): Use GC for struct feed. Update for changes to
7151 struct unparsed_text.
7152 (mark_pending_inlines): Delete.
7153 (next_token): Rename from add_token. Change all callers. Update
7154 for changes to struct unparsed_text.
7155 (space_for_token): New.
7156 (remove_last_token): New.
7157 (alloc_unparsed_text): New.
7158 (snarf_block): Take an unparsed_text. Update for changes to struct
7160 (snarf_method): Update for changes to struct unparsed_text.
7161 (snarf_defarg): Update for changes to struct unparsed_text.
7162 * tree.c (lang_check_failed): New.
7164 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
7165 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
7166 (cp/spew.o): Add dependency on gt-<filename>.h.
7167 (cp/decl2.o): Add dependency on gt-<filename>.h.
7168 (cp/call.o): Add dependency on gt-<filename>.h.
7169 (cp/pt.o): Add dependency on gt-<filename>.h.
7170 (cp/repo.o): Add dependency on gt-<filename>.h.
7171 (cp/parse.o): Add dependency on gt-<filename>.h.
7172 * call.c: Use gengtype for roots.
7173 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
7174 decl2.c parse.y pt.c repo.c spew.c.
7175 * cp-tree.h: Use gengtype for roots.
7176 (struct saved_scope): Use GGC, gengtype.
7177 (cp_parse_init): Delete prototype.
7178 (init_pt): Delete prototype.
7179 * decl.c: Use gengtype for roots.
7180 (mark_saved_scope): Delete.
7181 (cxx_init_decl_processing): Don't call deleted initilisation
7183 (signed_size_zero_node): Delete, unused.
7184 * decl.h: Use gengtype for roots.
7185 * decl2.c: Use gengtype for roots.
7186 * lex.h: Use gengtype for roots.
7187 * parse.y: Use gengtype for roots.
7188 (cp_parse_init): Delete.
7189 * pt.c: Use gengtype for roots.
7191 * repo.c: Use gengtype for roots.
7192 * spew.c: Use gengtype for roots.
7194 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
7195 (cp/decl.o): Add dependency on gtype-cp.h.
7196 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
7197 Include gtype-cp.h. Allow for filename changes.
7199 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
7200 (cp/decl.o): Add cp/gt-decl.h dependency.
7201 * config-lang.in (gtfiles): New.
7202 * tree.h: Rename struct binding_level to struct cp_binding_level.
7203 * decl.c: Rename struct binding_level to struct cp_binding_level.
7204 Include cp/gt-decl.h.
7205 (struct cp_binding_level): Use gengtype.
7206 (make_binding_level): Use GGC on struct cp_binding_level.
7207 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
7208 (cxx_init_decl_processing): Mark free_binding_level as
7211 * decl.c (mark_cp_function_context): Update calling sequence.
7213 * decl.c (start_function): Don't free 'struct
7214 cp_language_function'.
7215 (pop_cp_function_context): Likewise.
7216 (save_function_data): Allocate it using GC.
7217 * semantics.c (genrtl_start_function): Don't free 'struct
7218 cp_language_function'.
7220 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
7222 * lang-specs.h: Use cpp_debug_options.
7224 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7226 * mangle.c, tree.c: Include real.h.
7227 * Make-lang.in: Update dependency lists.
7229 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
7231 * lex.c: Don't include c-lex.h.
7232 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
7234 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
7236 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
7238 2002-05-22 Richard Henderson <rth@redhat.com>
7240 * decl.c (obscure_complex_init): Check for VAR_DECL
7241 before using DECL_THREAD_LOCAL.
7243 2002-05-22 Richard Henderson <rth@redhat.com>
7245 * decl.c (check_tag_decl): Handle RID_THREAD.
7246 (obscure_complex_init): Reject run-time init of tls.
7247 (grokvardecl, grokdeclarator): Handle RID_THREAD.
7248 * lex.c (reswords): Add __thread.
7249 (rid_to_yy): Map RID_THREAD to SCSPEC.
7251 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
7253 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
7254 * cp-tree.h (cxx_post_options): Kill.
7255 * cp-lex.c (cxx_post_options): Kill.
7257 2002-05-21 Richard Henderson <rth@redhat.com>
7259 * lex.c (rid_to_yy): Add RID_THREAD.
7261 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
7263 * init.c (build_vec_init): Test for trivial copy-assignment when
7264 copy-assigning arrays.
7266 2002-05-20 Andreas Jaeger <aj@suse.de>
7268 * init.c (build_default_init): Remove unused variable.
7270 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
7272 * call.c (any_strictly_viable): New.
7273 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
7275 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7277 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
7279 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7282 * pt.c (do_decl_instantiation): Don't complain explicit
7283 instantiation after explicit specialization.
7284 (do_type_instantiation): Likewise.
7286 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
7288 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
7290 (complete_type_or_else): ... this. Redefined as macro.
7291 (cxx_incomplete_type_diagnostic): Declare.
7292 (cxx_incomplete_type_error): Define as macro.
7293 * init.c (build_delete): Warn about incomplete types other than
7294 void, and use the built-in operator delete for them.
7295 * typeck.c (complete_type_or_diagnostic): Renamed from
7296 complete_type_or_else. Added warn_only argument, passed to...
7297 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
7298 warnings or errors depending on new warn_only argument. Renamed
7300 (cxx_incomplete_type_error): ... this. New implementation in
7301 terms of cxx_incomplete_type_diagnostic.
7303 2002-05-18 Jason Merrill <jason@redhat.com>
7306 * decl2.c (import_export_decl): If we clear
7307 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
7309 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7312 * pt.c (verify_class_unification): Don't check if PARM is template
7313 parameter dependent. Simplify.
7314 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
7315 parameter dependent expression.
7317 2002-05-14 Jason Merrill <jason@redhat.com>
7319 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
7321 (synthesize_tinfo_var): Take the public decl.
7322 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
7323 (emit_tinfo_decl): Adjust. Call import_export_decl.
7324 * decl2.c (import_export_decl): Simplify tinfo decl handling.
7326 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
7328 * cp-tree.h (struct lang_type): Added non_zero_init.
7329 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
7330 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
7331 * class.c (check_field_decls): Test non_zero_init.
7332 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
7333 zero-to-NULL conversions.
7334 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
7335 type that needs zero-initialization without zeros.
7336 (check_initializer_decl): Compute zero-initializer for types
7337 that require a non-trivial one.
7338 * init.c (build_forced_zero_init): New function.
7339 (build_default_init): Use it.
7340 * tree.c (zero_init_p): New function.
7341 * typeck2.c (force_store_init_value): New function.
7342 (process_init_constructor): Create non-trivial zero-initializers
7343 for array members and class fields.
7345 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
7347 * lang-specs.h: Remove redundant -lang-c++.
7349 2002-05-13 Jason Merrill <jason@redhat.com>
7351 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
7352 (fixed_type_or_null): See through reference vars.
7353 (build_base_path): Vtable contents are constant.
7354 * typeck.c (get_member_function_from_ptrfunc): Likewise.
7356 2002-05-12 Jason Merrill <jason@redhat.com>
7358 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
7361 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
7363 * cp-tree.h (flag_ansi): Remove.
7364 * decl2.c (flag_ansi): Remove.
7365 (cxx_decode_option): Set flag_iso and flag_undef.
7367 2002-05-09 Jason Merrill <jason@redhat.com>
7369 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
7370 Use subtraction rather than a bitmask to get the index.
7371 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
7373 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
7375 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
7377 * Make-lang.in (decl2.o): Update.
7378 * cp-tree.h (warn_multichar): Remove.
7379 * decl2.c: Include c-common.h.
7380 (warn_multichar): Remove.
7382 2002-05-03 Jason Merrill <jason@redhat.com>
7384 * tree.c (build_cplus_array_type): Only const and volatile get
7387 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
7389 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7391 ABI change, returning simple classes from functions.
7392 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7393 TYPE_HAS_TRIVIAL_INIT_REF is false or
7394 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7396 2002-04-30 Jason Merrill <jason@redhat.com>
7399 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7400 anonymous class with a typedef if there are attributes.
7402 2002-04-29 Paul Eggert <eggert@twinsun.com>
7404 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7406 2002-04-29 Jakub Jelinek <jakub@redhat.com>
7409 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7412 2002-04-29 Mark Mitchell <mark@codesourcery.com>
7415 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7416 enter that scope before name lookup.
7419 * method.c (do_build_copy_constructor): Avoid building
7420 cv-qualified reference types.
7422 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
7425 * decl.c (grok_op_properties): Assignment ops don't have to return
7426 by value. operator% should.
7428 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7431 * decl.c (duplicate_decls): Call merge_weak.
7433 2002-04-26 Richard Henderson <rth@redhat.com>
7435 * parse.y (malloced_yyss, malloced_yyvs): New.
7436 (yyoverflow): Re-add. Set them.
7437 (free_parser_stacks): New.
7439 2002-04-26 Mark Mitchell <mark@codesourcery.com>
7442 * method.c (do_build_assign_ref): Pass a derivation to
7443 build_method_call when calling base class assignment operators.
7445 2002-04-26 Richard Henderson <rth@redhat.com>
7447 * parse.y (yyoverflow): Revert.
7449 2002-04-26 Richard Henderson <rth@redhat.com>
7452 * parse.y (string): Remove. Update all uses to use STRING
7453 instead, and not call combine_strings.
7454 * rtti.c (tinfo_name): Use fix_string_type.
7455 * semantics.c (finish_asm_stmt): Don't call combine_strings.
7456 * spew.c (yylexstring): New.
7457 (read_token): Use it.
7459 2002-04-25 Richard Henderson <rth@redhat.com>
7462 * parse.y (yyoverflow): New.
7464 2002-04-25 Jason Merrill <jason@redhat.com>
7467 * search.c (check_final_overrider): No longer static.
7468 * class.c (update_vtable_entry_for_fn): Call it.
7469 * cp-tree.h: Adjust.
7471 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7473 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7474 * cp-tree.h (cxx_set_yydebug): Die.
7475 * lex.c (YYDEBUG): Get from c-lex.h.
7476 (cxx_set_yydebug): Remove.
7477 * parse.y: Include c-lex.h.
7478 (YYDEBUG): Get from c-lex.h.
7480 2002-04-24 Mark Mitchell <mark@codesourcery.com>
7483 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7486 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
7488 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7489 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7491 * cp-tree.h (cp_attribute_table): Rename.
7492 * decl.c (lang_attribute_table): Remove declaration.
7493 (cxx_init_decl_processing): Don't set it.
7494 * tree.c (cp_attribute_table): Rename.
7496 2002-04-24 Jason Merrill <jason@redhat.com>
7499 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7500 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7501 The pedwarn for array assignment is now unconditional.
7502 * tree.c (build_cplus_array_type_1): Still process simple array types
7503 normally in templates.
7506 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7509 2002-04-23 Jakub Jelinek <jakub@redhat.com>
7511 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7512 node with attributes.
7514 2002-2-23 David O'Brien <obrien@FreeBSD.org>
7516 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7517 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7519 2002-04-23 Mark Mitchell <mark@codesourcery.com>
7522 * pt.c (tsubst_friend_class): Handle templates with explicit
7526 * typeck.c (merge_types): Remember the cv-qualification of pointer
7527 types when merging them.
7529 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
7531 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7532 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7533 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7534 cxx_mark_function_context): New.
7535 * decl.c (push_cp_function_context, pop_cp_function_context,
7536 mark_cp_function_context): Rename for consistency.
7537 (cxx_init_decl_processing): Don't set old hooks.
7539 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
7541 * call.c (convert_type_from_ellipsis): Rename, update.
7542 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7543 * cp-tree.h (convert_type_from_ellipsis): Rename.
7544 * decl.c (cxx_init_decl_processing): Don't set hook.
7546 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7548 * call.c (build_new_method_call): Update.
7549 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7550 * cp-tree.h (cxx_incomplete_type_error): New.
7551 * decl.c (grokdeclarator, grokparms): Update.
7552 * decl2.c (check_classfn): Update.
7553 * pt.c (tsubst): Update.
7554 * typeck.c (complete_type_or_else, expr_sizeof,
7555 decay_conversion): Update.
7556 * typeck2.c (incomplete_type_error): Rename.
7557 (add_exception_specifier): Update.
7559 2002-04-18 Jason Merrill <jason@redhat.com>
7562 * search.c (setup_class_bindings): A class template qualifies as a
7565 2002-04-17 Jakub Jelinek <jakub@redhat.com>
7568 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7571 2002-04-16 Mark Mitchell <mark@codesourcery.com>
7573 * init.c (begin_init_stmts): Remove commented out code.
7574 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7575 * semantics.c (begin_gobal_stmt_expr): Adjust call to
7576 expand_start_stmt_expr.
7578 2002-04-15 Mark Mitchell <mark@codesourcery.com>
7580 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
7581 dso_handle itself, to __cxa_atexit.
7583 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7585 * error.c (cxx_print_error_function): Adjust call to macros.
7587 2002-04-14 Jakub Jelinek <jakub@redhat.com>
7589 * class.c (layout_virtual_bases): Do all dsize computation on trees.
7591 2002-04-14 Jason Merrill <jason@redhat.com>
7593 * typeck.c (get_member_function_from_ptrfunc): Don't do
7594 gratuitious division and multiplication on
7595 ptrmemfunc_vbit_in_delta targets.
7597 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7600 * semantics.c (finish_expr_stmt): Remember the type of the
7601 expression before any conversions are performed.
7603 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7606 * call.c (add_template_candidate_real): Do not treat member
7607 templates as copy constructors.
7609 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7611 * decl.c (duplicate_decls): Do not copy the RTL for a variable
7612 declaration if the old variable had an incomplete type and the new
7614 (complete_vars): Do not call layout_decl for completed variables.
7616 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
7618 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
7619 with an explicit one.
7620 (follow_tag_typedef): New.
7621 (lookup_tag): Use it to extract the tag of an explicit typedef.
7622 (xref_tag): Likewise.
7624 2002-04-11 Andrew Haley <aph@redhat.com>
7626 * typeck.c (type_after_usual_arithmetic_conversions):
7627 If two types have the same variant, return immediately.
7628 When two floating-point operands are the same precision:
7629 convert to float if one of the operands is float;
7630 if neither operand is one of the standard types, return the type
7631 of the first operand.
7633 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
7636 * decl.c (make_typename_type): Remove implicit typenameness.
7638 2002-04-09 Jason Merrill <jason@redhat.com>
7640 PR optimization/6189
7641 * semantics.c (genrtl_start_function): Don't free
7642 DECL_SAVED_FUNCTION_DATA for inline functions.
7644 * init.c (build_member_call): For now, don't convert to
7645 intermediate base if it would cause an error.
7647 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
7649 * parse.y (namespace_qualifier, maybe_identifier,
7650 begin_explicit_instantiation, end_explicit_instantiation,
7651 apparent_template_type, .finish_template_type,
7652 do_id, maybe_init, defarg_again, component_decl_1):
7653 Add ending ';', in accordance with POSIX.
7655 2002-04-06 Mark Mitchell <mark@codesourcery.com>
7658 * class.c (layout_class_type): Remember incomplete static
7660 (finish_struct_1): Call complete_vars, not
7661 hack_incomplete_structures.
7662 * cp-tree.h (hack_incomplete_structures): Rename to ...
7663 (complete_vars): ... this.
7664 (struct saved_scope): Remove incomplete.
7665 (namespace_scope_incomplete): Remove.
7666 * decl.c (struct binding_level): Remove incomplete.
7667 (incomplete_vars): New variable.
7668 (mark_binding_level): Don't mark incomplete.
7669 (print_binding_level): Don't print it.
7670 (mark_saved_scope): Don't mark incomplete.
7671 (pushdecl): Use maybe_register_incopmlete_var.
7672 (cxx_init_decl_processing): Register incomplete_vars for GC.
7673 (start_decl_1): Clarify error message.
7674 (hack_incomplete_vars): Remove.
7675 (maybe_register_incomplete_var): New function.
7676 (complete_vars): Likewise.
7678 2002-04-06 Jason Merrill <jason@redhat.com>
7681 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7682 set before checking it.
7685 * init.c (build_member_call): Use build_scoped_ref.
7686 (resolve_offset_ref): Likewise.
7687 * call.c (build_scoped_method_call): Likewise.
7688 * tree.c (maybe_dummy_object): Kludge around current_class_type being
7690 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7691 * cp-tree.h: Adjust.
7693 * init.c (push_base_cleanups): Just use build_scoped_method_call.
7696 * method.c (implicitly_declare_fn): Pass unqualified type to
7697 synthesize_exception_spec.
7699 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
7701 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7702 * cvt.c: Update comment.
7703 * init.c (expand_cleanup_for_base): Update.
7704 * semantics.c (finish_parenthesized_expr): Update.
7705 * typeck.c (cp_truthvalue_conversion): Update.
7707 2002-04-04 Jason Merrill <jason@redhat.com>
7709 * semantics.c (finish_eh_cleanup): New fn.
7710 * cp-tree.h: Add prototype.
7711 * init.c (perform_member_init, expand_cleanup_for_base): Use
7713 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7714 * cp-tree.h: Remove references.
7715 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7716 * dump.c (cp_dump_tree): Likewise.
7717 * pt.c (tsubst_expr): Likewise.
7718 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7719 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7720 * tree.c (cp_statement_code_p): Likewise.
7722 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
7725 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
7729 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7731 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7733 2002-04-03 Richard Henderson <rth@redhat.com>
7735 * cp-lang.c (cxx_warn_unused_global_decl): New.
7736 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7738 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
7740 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7741 * tree.c (init_tree): Don't set hook.
7743 2002-04-03 Roger Sayle <roger@eyesopen.com>
7746 * decl.c (duplicate_decls): Don't mess with assembler names when
7747 redeclaring builtin functions as static.
7749 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7751 * call.c (build_addr_func): Update.
7752 * class.c (resolve_address_of_overloaded_function): Update.
7753 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7754 * cp-tree.h (cxx_mark_addressable): New.
7755 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7756 * decl2.c (build_cleanup): Update.
7757 * except.c (build_throw): Update.
7758 * init.c (resolve_offset_ref): Update.
7759 * pt.c (convert_nontype_argument): Update.
7760 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7761 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7762 unary_complex_lvalue): Update.
7763 (mark_addressable): Rename.
7765 2002-04-01 Roger Sayle <roger@eyesopen.com>
7768 * decl.c (duplicate_decls): Overwrite the RTL when (and only
7769 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
7770 but follow the SET_DECL_RTL idiom used elsewhere in the function.
7772 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7774 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7775 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7776 * decl.c (grokdeclarator): Update.
7777 * mangle.c (write_integer_cst): Update.
7778 * typeck.c (build_binary_op): Update.
7780 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7782 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7783 * lex.c (cxx_init): Don't set hook.
7785 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7787 * Make-lang.in (error.o): Update.
7788 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7789 * cp-tree.h (struct diagnostic_context): Predeclare.
7790 (cxx_print_error_function): New.
7791 * error.c: Include langhooks-def.h.
7792 (lang_print_error_function): Rename. Update.
7793 (init_error): Don't set hook.
7795 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7797 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
7799 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
7800 * decl.c (finish_enum): Similarly.
7801 * error.c (dump_type): Similarly.
7802 * lex.c (cxx_init): Similarly.
7803 * mangle.c (write_builtin_type): Similarly.
7804 * typeck.c (comptypes): Similarly.
7806 2002-03-28 Roger Sayle <roger@eyesopen.com>
7809 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
7810 in the g++ front-end.
7811 (duplicate_decl): Allow redefinition of anticipated built-ins.
7812 Fix inlining problem by over-writing the old DECL_RTL.
7813 (lookup_namespace_name): Fail to find an identifier in the
7814 specified namespace if its still anticipated.
7815 (builtin_function_1): New function split out from builtin_function
7816 to create a builtin in the current namespace with given context.
7817 (builtin_function): Call builtin_function_1 to define the
7818 appropriate builtins in both the std and global namespaces.
7819 (select_decl): Don't test for anticipated decls here.
7820 (unqualified_namespace_lookup): Instead ignore them whilst
7821 searching through scopes and namespaces.
7822 * decl2.c (do_nonmember_using_decl): If a using declaration
7823 specifies an anticipated built-in function, mark it as no longer
7824 anticipated in that scope.
7825 (ambiguous_decl): Avoid resolving to an anticipated decl.
7826 * lex.c (do_scoped_id): Fail to find an identifier in the global
7827 namespace if its still anticipated.
7829 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7831 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
7832 * cp-tree.h (cp_make_lang_type): Rename.
7833 * lex.c (cp_make_lang_type): Rename.
7834 (make_aggr_type): Update.
7835 * tree.c (init_tree): Don't set make_lang_type_fn.
7837 2002-03-29 Jakub Jelinek <jakub@redhat.com>
7840 * class.c (finish_struct_1): Update static field's DECL_MODE even
7841 if its type is a variant of t.
7843 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7845 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
7846 * cp-tree.h (cxx_insert_default_attributes): New.
7847 * decl.c (insert_default_attributes): Rename.
7849 2002-03-27 Mark Mitchell <mark@codesourcery.com>
7852 * call.c (build_op_delete_call): Allow for the fact the placement
7853 may be a COMPOUND_EXPR.
7855 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7857 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7858 * cp-tree.h (init_cplus_expand): Remove.
7859 (cxx_expand_expr): New.
7860 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
7862 (init_cplus_expand): Remove.
7863 * lex.c (cxx_init): Don't call init_cplus_expand.
7865 2002-03-26 Mark Mitchell <mark@codesourcery.com>
7868 * init.c (build_new_1): Allow for the fact the result of
7869 build_function_call may be a COMPOUND_EXPR.
7871 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
7874 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
7875 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7876 (dfs_skip_nonprimary_vbases_markedp): Remove.
7877 * search.c (get_shared_vbase_if_not_primary): Remove.
7878 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7879 (dfs_skip_nonprimary_vbases_markedp): Remove.
7880 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
7881 (dfs_marked_real_bases_queue_p): Likewise.
7883 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
7885 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7886 * cp-tree.h (cxx_mark_tree): New.
7887 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
7889 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
7891 * cp-tree.h (cxx_maybe_build_cleanup): New.
7892 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
7893 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
7894 * tree.c (build_target_expr): Update.
7895 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
7897 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
7899 * decl2.c (cxx_decode_option): Handle -E.
7900 * lang-specs.h (default_compilers): Preprocess with cc1plus.
7901 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
7903 2002-03-23 Jakub Jelinek <jakub@redhat.com>
7906 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
7908 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7910 * error.c (dump_type): Be careful about implicit typenames.
7912 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7915 * semantics.c (finish_base_specifier): Handle erronous base
7918 2002-03-22 Zack Weinberg <zack@codesourcery.com>
7920 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
7923 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
7925 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
7926 an index into the vtable_entry array regardless of
7927 TARGET_PTRMEMFUNC_VBIT_LOCATION.
7929 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
7931 * tree.c (cp_cannot_inline_tree_fn): Same.
7933 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
7935 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7936 insert_block, getdecls, global_bindings_p): New.
7938 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
7941 * mangle.c (struct globals) Add internal_mangling_p member.
7942 (write_template_param): Do internal mangling, if needed.
7943 (mangle_conv_op_name_for_type): Request internal mangling.
7945 2002-03-20 Jason Merrill <jason@redhat.com>
7948 * init.c (build_delete): Check access for a member op delete here.
7949 * decl2.c (delete_sanity): Not here.
7951 2002-03-19 Jason Merrill <jason@redhat.com>
7954 * class.c (get_vfield_name): Use the constructor_name.
7956 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
7958 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7959 * cp-tree.h (lang_printable_name): Rename.
7960 * error.c (lang_decl_name): Use new hook.
7961 * lex.c (cxx_init): Remove old hook.
7962 * pt.c (tsubst_decl): Use new hook.
7963 * tree.c (lang_printable_name): Rename.
7965 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
7968 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
7969 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
7970 only after recording the declaration.
7972 2002-03-18 Jason Merrill <jason@redhat.com>
7975 * init.c (resolve_offset_ref): Hand off to build_component_ref.
7977 PR c++/4222, c++/5995
7978 * call.c (build_over_call): Fix empty class logic.
7981 * cp-tree.h (struct saved_scope): Add last_parms field.
7982 * decl.c (maybe_push_to_top_level): Save last_function_parms.
7983 (pop_from_top_level): Restore it.
7986 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
7990 * pt.c (tsubst_friend_function): Use decl_namespace_context.
7992 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
7993 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
7994 type with a nontrivial destructor.
7996 2002-03-17 Jason Merrill <jason@redhat.com>
7999 * class.c (build_base_path): Virtual base layout is fixed in
8002 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8004 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8005 * parse.y (yyparse): Remove macro.
8007 2002-03-17 Jason Merrill <jason@redhat.com>
8010 * init.c (build_new_1): Pass the right pointer to op delete.
8012 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
8015 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8016 conversion operators go.
8017 (struct lang_decl_flags): Add template_conv_p and unused
8019 (DECL_TEMPLATE_CONV_FN_P): New macro.
8020 * call.c (build_user_type_conversion_1): Don't check second type
8021 conversion of overload set first.
8022 * class.c (add_method): Make sure templated conversion operators
8023 all end up on slot 2.
8024 * lex.c (do_identifier): A conversion operator token might be
8025 satisfied by a templated conversion operator.
8026 * pt.c (check_explicit_specialization): Use
8027 CLASSTYPE_FIRST_CONVERSION_SLOT.
8028 (template_parm_this_level_p): New function.
8029 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8030 * search.c (lookup_fnfields_1): Template conversions will be on
8032 * typeck.c (build_component_ref): Preserve the type of an
8033 conversion operator name on the overload type.
8034 (build_x_function_call): Retrieve the conversion operator name.
8036 2002-03-15 Richard Henderson <rth@redhat.com>
8038 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8040 2002-03-15 Mark Mitchell <mark@codesourcery.com>
8042 * cp-tree.h (CLEANUP_DECL): Remove.
8043 (CLEANUP_EXPR): Likewise.
8044 * decl.c (destroy_local_var): Simplify.
8045 (maybe_build_cleanup): Tidy.
8046 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8047 * semantics.c (cp_expand_stmt): Likewise.
8048 * cp/tree.c (cp_statement_code_p): Likewise.
8050 2002-03-15 Jason Merrill <jason@redhat.com>
8053 * decl.c (duplicate_decls): Use merge_types instead of common_type.
8054 * typeck.c (common_type): Just hand off to
8055 type_after_usual_arithmetic_conversions and
8056 composite_pointer_type.
8057 (merge_types): New fn.
8058 (commonparms): Use it instead of common_type.
8059 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8060 (composite_pointer_type): Also handle attributes.
8061 * cp-tree.h: Declare merge_types.
8063 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8065 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8067 2002-03-14 Richard Henderson <rth@redhat.com>
8069 * decl.c: Include c-pragma.h.
8070 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8071 * Make-lang.in: Update dependencies.
8073 2002-03-14 Jakub Jelinek <jakub@redhat.com>
8076 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8077 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8079 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8081 * mangle.c (write_builtin_type): Handle 128-bit integers even if
8082 they are not a standard integer type.
8084 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8086 * cp-tree.h (init_init_processing): Remove declaration.
8087 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8088 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8090 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8092 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8094 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8096 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8097 cplus_tree_code_name): Delete.
8098 (cxx_init): Don't call add_c_tree_codes, instead set
8099 lang_unsafe_for_reeval. Don't try to copy into the various
8102 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
8105 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8106 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8109 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8111 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
8112 DR209 is now not a defect.
8113 * cp-tree.h (skip_type_access_control): Remove.
8114 * decl.c (grokdeclarator): Do type access control for friend
8116 * semantics.c (decl_type_access_control): Don't reset
8117 current_type_lookups.
8118 (save_type_access_control): Always save the lookups.
8119 (skip_type_access_control): Remove.
8120 (finish_class_definition): Don't change type_lookups.
8122 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8124 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
8126 * typeck.c (build_static_cast): Compare non-qualified types
8127 with pointer to member conversions.
8129 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
8130 Daniel Berlin <dan@dberlin.org>
8132 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8133 (cxx_get_alias_set): Use it.
8135 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8137 * cp-tree.h (stabilize_expr): Prototype.
8139 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
8141 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8142 conditional return void.
8144 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
8146 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8147 * cp-tree.h (cxx_unsave): New.
8148 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8149 (init_tree): Update.
8151 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8153 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8154 explicit sizeof/sizeof.
8155 * decl2.c (cxx_decode_option): Likewise.
8156 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8158 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
8161 * decl.c (lookup_tag): Only reject enum/class mismatch, not
8162 class/union mismatch.
8163 * parse.y (check_class_key): New function.
8164 (structsp): Call it.
8166 2002-03-01 Michael Matz <matz@suse.de>
8168 * typeck.c (cp_pointer_int_sum): Complete inner type which is
8169 used later by size_in_bytes().
8171 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
8173 * cp-tree.h: Require __GNUC__ to be #defined.
8174 (build_init): Add missing prototype.
8176 2002-03-01 Jason Merrill <jason@redhat.com>
8178 * except.c: Don't include decl.h or obstack.h. Do include
8180 (build_throw): Destroy temporaries from the thrown
8181 expression before calling __cxa_throw. Construct a thrown
8182 temporary directly into the exception object.
8183 (stabilize_throw_expr): New function.
8184 (wrap_cleanups_r): New function.
8185 * tree.c (stabilize_expr): New function.
8186 * init.c (build_init): New function.
8187 * Make-lang.in (cp/except.o): Adjust .h deps.
8189 2002-02-28 Jason Merrill <jason@redhat.com>
8191 * search.c (lookup_base_r): Don't clear is_non_public just because
8192 we found a friendly scope.
8194 * decl.c (finish_function): Only warn about missing return
8195 statement with -Wreturn-type.
8197 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
8199 * class.c (build_clone): Update.
8200 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8201 * cp-tree.h (cxx_dup_lang_specific_decl): New.
8202 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
8203 (copy_decl): Update.
8204 * method.c (make_thunk): Update.
8206 2002-02-27 Zack Weinberg <zack@codesourcery.com>
8208 * decl2.c: Delete traditional-mode-related code copied from
8209 the C front end but not used, or used only to permit the
8212 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
8215 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
8218 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8221 * semantics.c (finish_switch_cond): Don't call get_unwidened
8224 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
8227 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
8229 (make_typename_type): Use tsubst_flags_t.
8230 * decl.c (make_typename_type): Adjust. Return non-artificial
8231 TYPE_DECLs, if required.
8232 (grokdeclarator): Simplify CVR qualification handling. Allow bad
8233 qualifiers on typedef types.
8234 * decl2.c (handle_class_head): Adjust make_typename_type call.
8235 * parse.y (nested_name_specifier): Likewise.
8236 (typename_sub0): Likewise.
8237 (typename_sub1): Likewise.
8238 * pt.c (convert_template_argument): Adjust make_typename_type
8240 (tsubst): Adjust cp_build_qualified_type_real calls.
8241 (check_cv_quals_for_unify): Cope with allowing bad qualifications
8242 on template type parms.
8243 (instantiate_decl): Recheck substitutions to give warnings on bad
8245 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
8247 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
8249 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8251 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
8252 unless DECL_ALWAYS_INLINE.
8254 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8256 * typeck.c (cp_pointer_int_sum): Renamed from
8257 pointer_int_sum, call pointer_int_sum.
8259 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8261 * decl.c (duplicate_decls): Return 0 if issued error about
8264 2002-02-19 Jason Merrill <jason@redhat.com>
8266 ABI change: Mangle `void (A::*)() const' as
8267 M1AKFvvE, not MK1AFvvE.
8268 * mangle.c (write_function_type): Write cv-quals for member
8270 (write_pointer_to_member_type): Not here.
8272 2002-02-18 Jason Merrill <jason@redhat.com>
8274 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
8275 (do_decl_instantiation): Likewise.
8277 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
8280 * decl.c (duplicate_decls): Make warning unconditional
8281 if duplicate default argument declarations are present.
8283 2002-02-17 Jakub Jelinek <jakub@redhat.com>
8285 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
8288 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
8290 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
8291 remove incorrect comment. Move #if 0'd code to common path. Use
8292 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
8294 2002-02-13 Jason Merrill <jason@redhat.com>
8296 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
8297 (finish_function): Don't warn if current_function_returns_null.
8299 * typeck2.c (digest_init): Do handle values of vector type.
8301 * typeck2.c (digest_init, process_init_constructor): Treat vectors
8304 2002-02-11 Jason Merrill <jason@redhat.com>
8306 * parse.y (reserved_declspecs): Don't handle attributes.
8307 (reserved_typespecquals): Handle them here.
8308 * Make-lang.in (parse.c): Adjust expected conflicts.
8310 2002-02-08 Jakub Jelinek <jakub@redhat.com>
8312 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
8313 instead of compstmt.
8314 (compstmt_or_stmtexpr): Renamed from compstmt.
8315 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
8317 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8319 Rename instantiate_type_flags to tsubst_flags_t & expand use.
8320 * cp-tree.h (instantiate_type_flags): Rename to ...
8321 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
8322 add tf_warning flag.
8323 (instantiate_type): Adjust prototype.
8324 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
8325 do_type_instantiation, cp_build_qualified_type_real): Likewise.
8326 cp_build_qualified_type: Adjust.
8327 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
8329 * call.c (standard_conversion): Rename itf_* to tf_*.
8330 (reference_binding): Likewise.
8331 (convert_like_real): Likewise.
8332 * cvt.c (cp_convert_to_pointer): Likewise.
8333 (convert_to_reference): Likewise.
8334 * decl.c (lookup_namespace_name): Use tf_* flags.
8335 (make_typename_type): Likewise.
8336 (grokdeclarator): Likewise.
8337 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
8338 (coerce_template_template_parms, convert_template_argument,
8339 coerce_template_parms, maybe_get_template_decl_from_type_decl,
8340 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
8341 instantiate_class_template, tsubst_template_arg_vector,
8342 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
8343 tsubst_decl, tsubst_arg_types, tsubst_function_type,
8344 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
8345 instantiate_template, fn_type_unification,
8346 resolve_overloaded_unification, verify_class_unification,
8347 unify, get_bindings_real, do_type_instantiation,
8348 regenerate_decl_from_template, instantiate_decl,
8349 tsubst_initializer_list, tsubst_enum,
8350 get_mostly_instantiated_function_type,
8351 invalid_nontype_parm_type_p): Likewise.
8352 * tree.c (cp_build_qualified_type_real): Likewise.
8353 * typeck.c (build_binary_op): Rename itf_* to tf_*.
8354 (build_ptrmemfunc): Likewise.
8355 (convert_for_assignment): Likewise.
8357 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8360 * decl.c (grokdeclarator): Allow friend declarations from
8362 * decl2.c (handle_class_head): Don't push into template parm contexts.
8363 * pt.c (push_template_decl_real): Template parm contexts are never
8366 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
8368 * class.c: Include target.h.
8369 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
8370 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
8372 * Make-lang.in: Adjust deps.
8374 2002-02-05 Jason Merrill <jason@redhat.com>
8376 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
8378 2002-02-04 Jakub Jelinek <jakub@redhat.com>
8380 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
8381 (finish_switch_cond): Set SWITCH_TYPE.
8383 2002-02-04 Richard Henderson <rth@redhat.com>
8385 * method.c (use_thunk): Always initialize the block tree. Reindent.
8386 * semantics.c (expand_body): Emit thunks after function, not before.
8388 2002-02-04 Jason Merrill <jason@redhat.com>
8390 * decl.c (start_function): Call cplus_decl_attributes immediately
8391 after grokdeclarator.
8393 * decl.c (start_function): Combine DECL_RESULT handling code.
8395 2002-02-03 Jason Merrill <jason@redhat.com>
8398 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8399 (cp/xref.o): Remove dependencies.
8400 * class.c (finish_struct_1, check_methods): Don't call xref fns.
8401 (finish_struct_1): Likewise.
8402 * friend.c (make_friend_class): Likewise.
8403 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8404 * spew.c (read_process_identifier): Likewise.
8406 2002-02-01 Jason Merrill <jason@redhat.com>
8409 * decl.c (finish_function): Warn about a non-void function with
8410 no return statement and no abnormal exit.
8411 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8412 (current_function_returns_abnormally): New macro.
8413 * call.c (build_call): Set it.
8415 * typeck.c (build_component_ref): Always complain about offsetof
8416 constructs on non-PODs. Only make it an error for members of
8419 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8420 (dump_function_decl): Always dump parms.
8422 * decl2.c (finish_static_data_member_decl): Complain about a local
8423 class with a static data member.
8426 * search.c (lookup_field_1): Don't xref a static data member
8427 just because we looked it up.
8429 2002-01-31 Jason Merrill <jason@redhat.com>
8431 * Make-lang.in (parse.c): Handle .output file.
8434 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8436 * semantics.c (finish_class_definition): Adjust.
8438 Allow attributes in parms and casts.
8439 * parse.y (named_parm): Don't strip attrs.
8440 (declmods): Remove 'attributes' production.
8441 (nonempty_cv_qualifiers): Accept attributes.
8442 (ATTRIBUTE): Give precedence.
8443 * decl.c (groktypename): Handle attributes.
8444 (grokparms): Likewise.
8446 2002-01-29 Jakub Jelinek <jakub@redhat.com>
8448 * decl2.c (cxx_decode_option): Pass 0 as last argument to
8450 * lang-specs.h: Use cpp_unique_options instead of cpp_options
8451 when used together with cc1_options.
8453 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
8456 * typeck2.c (digest_init): Make sure non-array core type is
8458 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8459 constructor, rather than build a new one.
8460 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8461 PURPOSE of constructor elts.
8463 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8465 * Make-lang.in (parse.c): Adjust expected number of
8466 shift-reduce conflicts.
8467 (decl.o): Depend on diagnostic.h.
8468 * decl.c: Include diagnostic.h.
8469 (grokdeclarator): Check for null pointer.
8470 (finish_function): Don't abort when
8471 current_binding_level->parm_flag != 1, if errors have
8472 occurred; throw away the statement tree and extra binding
8473 levels, and continue.
8474 * lex.c (note_list_got_semicolon): Check for null pointer.
8475 * method.c (hack_identifier): Just return error_mark_node if
8476 value is error_mark_node.
8477 * parse.y (primary: TYPEID(type_id)): No need to use
8478 TYPE_MAIN_VARIANT here.
8479 (handler_seq): Accept an empty list of catch clauses and
8480 generate a fake handler block to avoid later crashes.
8481 (ansi_raise_identifier): Accept the error token too.
8482 * semantics.c (begin_class_definition,
8483 finish_class_definition): Check for error_mark_node.
8485 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8487 * typeck2.c (friendly_abort): Delete definition.
8488 * cp-tree.h (friendly_abort): Don't prototype.
8489 (my_friendly_assert): Use fancy_abort.
8491 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8493 * cp-tree.h (my_friendly_abort): Remove.
8495 2002-01-23 Jakub Jelinek <jakub@redhat.com>
8497 * spew.c (pending_inlines, pending_inlines_tail,
8498 processing_these_inlines): Make static.
8499 (mark_pending_inlines): Remove static.
8500 (begin_parsing_inclass_inline): If in function, save pi
8501 for GC to cp_function_chain->unparsed_inlines instead.
8502 (process_next_inline): Likewise.
8503 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8504 (mark_pending_inlines): Add prototype.
8505 * decl.c (spew_debug): Remove unused extern.
8506 (mark_lang_function): Call mark_pending_inlines.
8508 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8510 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8511 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8512 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8513 Change my_fancy_abort() to abort().
8515 2002-01-23 Jason Merrill <jason@redhat.com>
8518 * class.c (fixed_type_or_null): Fix thinko.
8521 * init.c (resolve_offset_ref): Use build_indirect_ref.
8523 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8525 2002-01-22 Jason Merrill <jason@redhat.com>
8527 * parse.y (function_body): Suppress the block for the outermost
8529 * decl.c (pushdecl): Don't try to skip it.
8530 (begin_function_body): Keep the block we create, not the next one.
8531 * init.c (emit_base_init): Don't mess with keep_next_level.
8533 * class.c (build_base_path): Tweak formatting.
8535 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
8537 Fix regression introduced with patch for c++/775
8538 * parse.y (class_head_defn): Check for template specializations
8539 with a different class-key.
8541 2002-01-17 Jason Merrill <jason@redhat.com>
8543 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8544 (begin_function_body): Call them and keep_next_level.
8545 * init.c (emit_base_init): Call keep_next_level.
8546 * semantics.c (setup_vtbl_ptr): Lose.
8547 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8548 (vtbls_set_up_p): Lose.
8549 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8550 * method.c (do_build_copy_constructor): Likewise.
8551 (synthesize_method): Call finish_mem_initializers.
8552 * parse.y (nodecls): Likewise.
8554 * error.c (dump_type_suffix): Print the exception specs before
8556 (dump_function_decl): Here, too.
8558 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8560 2002-01-10 Ira Ruben <ira@apple.com>
8563 * decl.c (start_method): Handle attrlist.
8565 2002-01-10 Jakub Jelinek <jakub@redhat.com>
8567 * decl2.c (max_tinst_depth): Increase default limit to 500.
8569 2002-01-10 Graham Stott <grahams@redhat.com>
8571 * spew.c (YYCHAR): Uppercase macro parameter and add
8574 (NAME): Uppercase macro parameter.
8576 2002-01-09 Graham Stott <grahams@redhat.com>
8578 * decl.h (grokdeclarator): Wrap long line.
8580 * semantics.c (FINISH_COND): Uppercase macro paramaters and
8583 2002-01-08 Graham Stott <grahams@redhat.com>
8585 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
8586 (PALLOC): Uppercase macro parameter and whitespace.
8587 (SALLOC): Uppercase macro parameter.
8588 (SFREE): Uppercase macros parameter, add parenthese and
8590 (STREQL): Uppercase macro parameter and whitespace.
8597 * call.c (convert_like): Add parenthesis and wrap.
8598 (convert_like_with_context): Likewise.
8599 (ICS_RANK): Whitespace.
8600 (NEED_TEMPORARY_P): Remove parenthesis.
8602 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
8604 (VTT_MARKED_BINFO_P): Likewise.
8606 * decl.c (BINDING_LEVEL): Add parenthesis.
8607 (DEF_OPERATOR): Likewise.
8609 * mangle.c (MANGLE_TRACE): Add parenthesis.
8610 (MANGLE_TRACE_TREE): Likewise.
8611 (write_signed_number): Likewise.
8612 (write_unsigned_number): Likewise.
8614 * pt.c (ccat): Uppercase macro parameter.
8617 * search.c (SET_BINFO_ACCESS): Add parenthesis.
8619 2002-01-07 Jason Merrill <jason@redhat.com>
8621 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
8625 * method.c (make_thunk): If !flag_weak, give the thunk the
8627 (use_thunk): Here, too.
8629 2002-01-07 Graham Stott <grahams@redhat.com>
8631 * error.c: Update copyright date.
8632 (print_scope_operator): Add parenthesis.
8633 (print_left_paren): Likewise.
8634 (print_right_paren): Likewise.
8635 (print_left_bracket): Likewise.
8636 (print_right_bracket): Likewise.
8637 (print_template_argument_list_start): Likewise.
8638 (print_template_argument_list_end): Likewise.
8639 (print_non_consecutive_character): Likewise.
8640 (print_tree_identifier): Likewise.
8641 (print_identifier): Likewise.
8642 (NEXT_CODE): Uppercase macro parameter.
8643 (ident_fndecl): Delete unused.
8644 (GLOBAL_THING): Likewise.
8646 2002-01-06 Graham Stott <grahams@redhat.com>
8648 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8649 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8650 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8651 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8652 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8653 (C_IS_RESERVED_WORD): Uppercase macro parameter.
8654 (C_RID_YYCODE) Likewise.
8655 (ptrmem_cst): Use rtx.
8656 (LOCAL_BINDING_P): Add whitespace.
8657 (INHERITED_VALUE_BINDING_P): Likewise.
8658 (BINDING_SCOPE): Wrap long line.
8659 (BINDING_HAS_LEVEL_P): Remove parenthesis.
8660 (BINDING_VALUE): Wrap long line.
8661 (BINDING_TYPE): Whitespace.
8662 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8663 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
8664 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
8665 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8666 (same_type_p): Uppercase macro parameters.
8667 (same_type_ignoring_top_level_qualifiers_p): Likewise.
8668 (OVL_FUNCTION): Wrap long line.
8669 (OVL_CHAIN): Whitespace.
8670 (OVL_CURRENT): Add parenthesis and whitespace.
8671 (OVL_NEXT): Whitespace.
8672 (OVL_USED): Likewise.
8673 (IDENTIFIER_TYPE_VALUE): Likewise.
8674 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8675 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8676 (LANG_ID_FIELD): Whitespace.
8677 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8678 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8679 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8680 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8681 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8682 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8683 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8684 (IDENTIFIER_VIRTUAL_P): Likewise.
8685 (IDENTIFIER_OPNAME_P): Likewise.
8686 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8687 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8688 (C_SET_EXP_ORIGINAL_CODE): Likewise.
8689 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8690 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8691 (IS_AGGR_TYPE): Uppercase macro parameter.
8692 (CLASS_TYPE_P): Likewise.
8693 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8694 (IS_AGGR_TYPE_2): Whitespace.
8695 (TAGGED_TYPE_P): Uppercase macro parameter.
8696 (TYPE_BUILT_IN): Whitespace.
8697 (TYPE_FOR_JAVA): Likewise.
8698 (FUNCTION_ARG_CHAIN): Remove parenthesis.
8699 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8700 (FUNCTION_FIRST_USER_PARAM): Likewise.
8701 (PROMOTES_TO_AGGR_TYPE): Whitespace.
8702 (DERIVED_FROM_P): Add parenthesis and wrap.
8703 (UNIQUELY_DERIVED_FROM_P): Likewise.
8704 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8705 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8706 (CLASSTYPE_USE_TEMPLATE): Whitespace.
8707 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8708 (TYPE_GETS_DELETE): Add parenthesis.
8709 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8710 (TYPE_HAS_ASSIGN_REF): Likewise,
8711 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8712 (TYPE_HAS_INIT_REF): Likewise.
8713 (TYPE_HAS_CONST_INIT_REF): Likewise.
8714 (TYPE_BEING_DEFINED): Likewise.
8715 (TYPE_LANG_SPECIFIC): Likewise.
8716 (CLASSTYPE_RTTI): Likewise.
8717 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8718 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8719 (TYPE_OVERLOADS_ARROW): Likewise.
8720 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8721 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8722 (CLASSTYPE_METHOD_VEC): Likewise.
8723 (CLASSTYPE_MARKED_N): Likewise.
8724 (CLASSTYPE_MARKED): Likewise.
8725 (CLASSTYPE_MARKED2): Likewise.
8726 (CLASSTYPE_MARKED3): Likewise.
8727 (CLASSTYPE_MARKED4): Likewise.
8728 (CLASSTYPE_MARKED5): Likewise.
8729 (CLASSTYPE_MARKED6): Likewise.
8730 (SET_CLASSTYPE_MARKED): Whitespace.
8731 (CLEAR_CLASSTYPE_MARKED): Likewise.
8732 (SET_CLASSTYPE_MARKED2): Likewise.
8733 (CLEAR_CLASSTYPE_MARKED2): Likewise.
8734 (SET_CLASSTYPE_MARKED3): Likewise.
8735 (CLEAR_CLASSTYPE_MARKED3): Likewise.
8736 (SET_CLASSTYPE_MARKED4): Likewise.
8737 (CLEAR_CLASSTYPE_MARKED4): Likewise.
8738 (SET_CLASSTYPE_MARKED5): Likewise.
8739 (CLEAR_CLASSTYPE_MARKED5): Likewise.
8740 (SET_CLASSTYPE_MARKED6): Likewise.
8741 (CLEAR_CLASSTYPE_MARKED6): Likewise.
8742 (CLASSTYPE_TAGS): Likewise.
8743 (CLASSTYPE_VSIZE): Likewise.
8744 (CLASSTYPE_VBASECLASSES): Likewise.
8745 (CANONICAL_BINFO): Add parenthesis.
8746 (CLASSTYPE_SIZE(NODE): Likewise.
8747 (CLASSTYPE_SIZE_UNIT): Likewise.
8748 (CLASSTYPE_ALIGN(NODE): Likewise.
8749 (CLASSTYPE_USER_ALIGN): Likewise.
8750 (TYPE_JAVA_INTERFACE): Likewise.
8751 (CLASSTYPE_PURE_VIRTUALS): Likewise.
8752 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8753 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8754 (CLASSTYPE_HAS_MUTABLE): Likewise.
8755 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8756 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8757 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8758 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8759 (CLASSTYPE_INTERFACE_ONLY): Likewise.
8760 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8761 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8762 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8763 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8764 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8765 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8766 (BINFO_UNSHARED_MARKED): Whitespace.
8767 (BINFO_MARKED): Whitespace and wrap.
8768 (SET_BINFO_MARKED): Likewise.
8769 (CLEAR_BINFO_MARKED): Likewise.
8770 (BINFO_VTABLE_PATH_MARKED): Likewise.
8771 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8772 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8773 (BINFO_SUBVTT_INDEX): Remove parenthesis.
8774 (BINFO_VPTR_INDEX): Likewise.
8775 (BINFO_PRIMARY_BASE_OF): Likewise,
8776 (CLASSTYPE_VFIELDS): Whitespace.
8777 (VF_DERIVED_VALUE): Wrap long line.
8778 (NAMESPACE_LEVEL): Whitespace.
8779 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8780 (DEFARG_POINTER): Whitespace.
8781 (DECL_NEEDED_P): Remove parenthesis.
8782 (DECL_LANGUAGE): Whitespace.
8783 (SET_DECL_LANGUAGE): Add parenthesis.
8784 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8785 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
8786 (DECL_IN_AGGR_P): Whitespace.
8787 (DECL_FRIEND_P): Likewise.
8788 (DECL_BEFRIENDING_CLASSES): Likewise.
8789 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
8790 (DECL_NONCONVERTING_P): Whitespace.
8791 (DECL_PURE_VIRTUAL_P): Likewise.
8792 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
8793 (DECL_PENDING_INLINE_INFO): Whitespace.
8794 (DECL_SORTED_FIELDS): Likewise.
8795 (DECL_DEFERRED_FN): Likewise.
8796 (DECL_TEMPLATE_INFO): Likewise.
8797 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
8798 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
8799 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
8800 (TMPL_ARGS_LEVEL): Likewise.
8801 (SET_TMPL_ARGS_LEVEL): Likewise.
8802 (INNERMOST_TEMPLATE_PARMS): Whitespace.
8803 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
8804 (INTEGRAL_CODE_P(CODE): Add parenthesis.
8805 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
8806 (TYPE_HAS_CONSTRUCTOR): Whitespace.
8807 (TREE_HAS_CONSTRUCTOR): Likewise.
8808 (TYPE_HAS_DESTRUCTOR): Likewise.
8809 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
8810 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
8811 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
8812 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
8813 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
8814 (TYPE_PTRMEMFUNC_P): Likewise.
8815 (TYPE_PTRMEMFUNC_FLAG): Likewise.
8816 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
8817 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
8818 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
8819 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8820 (DECL_ACCESS): Whitespace.
8821 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
8822 (DECL_GLOBAL_DTOR_P): Likewise.
8823 (GLOBAL_INIT_PRIORITY): Likewise.
8824 (DECL_TEMPLATE_PARMS): Likewise.
8825 (DECL_TEMPLATE_RESULT): Likewise.
8826 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
8827 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
8828 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
8829 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8830 (PRIMARY_TEMPLATE_P): Add parenthesis.
8831 (DECL_USE_TEMPLATE): Whitespace.
8832 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8833 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8834 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8835 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8836 (CALL_DECLARATOR_PARMS): Remove parenthesis.
8837 (CALL_DECLARATOR_QUALS): Likewise.
8838 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
8839 (TEMP_NAME_P): Wrap.
8840 (VFIELD_NAME_P): Likewise.
8841 (B_SET): Uppercase macro parameters and add parenthesis.
8844 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
8845 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
8846 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
8847 (same_or_base_type_p): Likewise.
8848 (cp_deprecated): Likewise.
8850 2002-01-05 Richard Henderson <rth@redhat.com>
8852 * semantics.c (expand_body): Revert last change.
8854 2002-01-04 Jason Merrill <jason@redhat.com>
8857 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
8860 * class.c (build_vtbl_initializer): Check for a lost primary
8861 before calculating the vtable entry to throw away.
8863 2002-01-02 Jason Merrill <jason@redhat.com>
8865 * semantics.c (expand_body): Call outlining_inline_function when
8866 emitting an inline function out of line.
8868 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8870 PR c++/5116, c++/764 reversion
8871 * call.c (build_new_op): Revert the instantiations. They are
8874 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8877 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
8879 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8882 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
8883 (tsubst, case POINTER_TYPE): Handle pmfs here.
8884 (tsubst, case OFFSET_TYPE): Check it is not an offset to
8885 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
8887 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8890 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
8891 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
8892 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
8894 (tsubst_template_parms): Break up loop statements.
8895 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
8896 parm PARM_DECLs don't get promoted.
8898 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8901 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
8902 (build_x_function_call): Cope with a COMPONENT_REF containing a
8905 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8908 * pt.c (convert_template_argument): Be more careful determining
8909 when RECORD_TYPE templates are or are not templates.
8911 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8914 * cp-tree.h (handle_class_head): Adjust prototype.
8915 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
8916 parameters. Use for all class heads.
8917 * parse.y (named_class_head_sans_basetype, named_class_head,
8918 named_complex_class_head_sans_basetype,
8919 named_class_head_sans_basetype_defn,
8920 unnamed_class_head): Remove.
8921 (class_head, class_head_apparent_template): Recognize class heads
8922 (class_head_decl, class_head_defn): New reductions. Process class
8924 (structsp): Adjust class definition and class declaration
8926 (maybe_base_class_list): Give diagnostic on empty list.
8928 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8931 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
8932 single non-static member.
8933 (unary_complex_lvalue): If it cannot be a pointer to member, don't
8934 make it so. Check it is not pointer to reference.
8936 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8939 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
8940 are processing a template decl.
8942 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8944 PR c++/5116, c++/764
8945 * call.c (build_new_op): Make sure template class operands are
8946 instantiated. Simplify arglist construction.
8948 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8950 * call.c (build_user_type_conversion_1): Use my_friendly_assert
8951 rather than if ... abort.
8952 * cvt.c (convert_to_reference): Likewise.
8953 * semantics.c (setup_vtbl_ptr): Likewise.
8954 * pt.c (lookup_template_class): Comment typo.
8956 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8959 * pt.c (push_template_decl_real): Make sure DECL has
8962 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8965 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
8966 for non-reference fields.
8967 * typeck.c (require_complete_type): Use resolve_offset_ref).
8969 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
8972 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
8974 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
8977 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
8978 up. Don't stabilize_references when initializing a reference.
8980 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8982 * decl2.c (lang_f_options): Const-ify.
8984 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8986 * config-lang.in (diff_excludes): Remove.
8988 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
8991 * typeck.c (build_function_call_real): Use original function
8992 expression for errors.
8994 2001-12-18 Jason Merrill <jason@redhat.com>
8997 * class.c (add_method): Do compare 'this' quals when trying to match a
8998 used function. Don't defer to another used function.
9000 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9002 * pt.c (instantiate_clone): Remove, fold into ...
9003 (instantiate_template): ... here. Simplify by removing mutual
9005 * typeck2.c (build_m_component_ref): Don't cv qualify the function
9006 pointed to by a pointer to function.
9007 * class.c (delete_duplicate_fields_1): Typo.
9009 2001-12-18 Jason Merrill <jason@redhat.com>
9011 C++ ABI change: destroy value arguments in caller.
9012 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9013 create an extra binding level for the parameters.
9014 * decl.c (store_parm_decls): Don't do parameter cleanups.
9016 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9018 * call.c (build_new_method_call): Use '%#V'.
9019 * error.c (cv_to_string): Use V parameter to determine padding.
9021 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9023 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9024 spellings in messages.
9026 2001-12-17 Zack Weinberg <zack@codesourcery.com>
9028 * cp-tree.h: Delete #defines for cp_error, cp_warning,
9029 cp_pedwarn, and cp_compiler_error.
9030 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9031 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9032 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9033 typeck2.c: Change calls to the above macros to use their
9034 language-independent equivalents: error, warning, pedwarn, and
9035 internal_error respectively.
9037 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
9039 * decl2.c (finish_file): Remove back_end_hook.
9041 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9043 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9044 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9045 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9047 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
9049 * lang-options.h: Use American spelling in messages.
9051 2001-12-13 Jason Merrill <jason@redhat.com>
9053 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9055 Use cleanups to run base and member destructors.
9056 * init.c (push_base_cleanups): New function, split out from...
9057 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
9058 * decl.c (finish_destructor_body): Move vbase destruction code to
9060 (begin_function_body, finish_function_body): New fns.
9061 (finish_function): Move [cd]tor handling and call_poplevel to
9062 finish_function_body.
9063 (pushdecl): Skip the new level.
9064 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9065 (setup_vtbl_ptr): Call push_base_cleanups.
9066 * method.c (synthesize_method): Call {begin,end}_function_body.
9067 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9068 * cp-tree.h: Declare new fns.
9069 * parse.y (function_body, .begin_function_body): New nonterminals.
9070 (fndef, pending_inline, function_try_block): Use function_body.
9071 (ctor_initializer_opt, function_try_block): No longer has a value.
9072 (base_init): Remove .set_base_init token.
9073 (.set_base_init, compstmt_or_error): Remove.
9074 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9076 * optimize.c (maybe_clone_body): Fix parameter updating.
9078 2001-12-12 Jason Merrill <jason@redhat.com>
9080 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9081 * semantics.c (genrtl_start_function): Don't pass
9082 parms_have_cleanups or push an extra binding level.
9083 (genrtl_finish_function): Lose cleanup_label cruft.
9085 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9086 (ctor_label): Remove.
9087 * semantics.c (finish_return_stmt): Lose ctor_label support.
9088 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9089 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9092 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9094 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9096 * decl.c (finish_function): Check VMS_TARGET, not VMS.
9098 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9099 (end_cleanup_fn): And poplevel.
9101 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9102 if we're in a template.
9104 2001-12-12 Jakub Jelinek <jakub@redhat.com>
9106 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9107 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9108 THIS_NAME_P): Delete.
9109 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9110 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9111 with internal naming scheme.
9112 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9114 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
9116 * decl.c (grokdeclarator): Deprecated implicit typename use.
9118 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
9121 * parse.y (frob_specs): Indicate it is a language linkage which
9122 contained the extern.
9123 * decl.c (grokdeclarator): Allow extern language linkage with
9126 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
9129 * decl.c (add_binding): Don't reject duplicate typedefs involving
9130 template parameters.
9132 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
9134 * parse.y, semantics.c: Similarly.
9136 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
9139 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9140 (copy_args_p): Rename to ...
9141 (copy_fn_p): ... here.
9142 (grok_special_member_properties): New function.
9143 (grok_op_properties): Lose VIRTUALP parameter.
9144 (copy_assignment_arg_p): Remove.
9145 * call.c (build_over_call): Use copy_fn_p.
9146 * decl.c (grokfndecl): Reformat. Adjust call to
9148 (copy_args_p): Rename to ...
9149 (copy_fn_p): ... here. Reject template functions. Check for pass
9151 (grok_special_member_properties): Remember special functions.
9152 (grok_ctor_properties): Don't remember them here, just check.
9153 (grok_op_properties): Likewise.
9154 (start_method): Call grok_special_member_properties.
9155 * decl2.c (grokfield): Likewise.
9156 (copy_assignment_arg_p): Remove.
9157 (grok_function_init): Don't remember abstract assignment here.
9158 * pt.c (instantiate_class_template): Call
9159 grok_special_member_properties.
9160 (tsubst_decl): Adjust grok_op_properties call.
9162 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
9164 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
9165 RID_TYPES_COMPATIBLE_P.
9167 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
9169 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
9170 call to build_aggr_init.
9171 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
9173 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
9175 * parse.y: Replace uses of the string non-terminal with STRING.
9176 Don't perform string concatentaion here.
9177 (string): Remove non-terminal.
9178 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
9180 2001-12-05 Jason Merrill <jason@redhat.com>
9182 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
9183 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
9184 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
9185 * pt.c (push_tinst_level): No longer static.
9186 * cp-tree.h: Declare them.
9188 * init.c (resolve_offset_ref): Don't check access for the base
9189 conversion to access a FIELD_DECL.
9191 * cp-tree.h (TYPE_REFFN_P): New macro.
9192 * decl.c (bad_specifiers): Check it, too.
9194 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
9195 on the __*_type_info type if we haven't seen a definition.
9197 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
9199 * decl.c: Include c-common.h.
9200 (shadow_warning): Move to c-common.c.
9202 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9204 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9206 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9208 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
9210 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9213 * init.c (sort_base_init): Allow binfos to be directly specified.
9214 * method.c (do_build_copy_constructor): Explicitly convert to the
9216 (do_build_assign_ref): Likewise.
9218 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
9220 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
9221 declaration and initialization.
9223 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9225 * typeck2.c: Remove leading capital from diagnostic messages, as
9226 per GNU coding standards.
9228 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
9231 * decl.c (xref_basetypes): Handle attributes between
9234 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
9237 * parse.y (named_complex_class_head_sans_basetype): Add new
9239 * Make-lang.in (parse.c): Adjust expected conflict count.
9241 2001-12-03 Jason Merrill <jason@redhat.com>
9243 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
9244 immediate binfos for our virtual bases.
9246 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
9248 * call.c (build_java_interface_fn_ref): Similarly.
9249 * except.c (is_admissible_throw_operand): Similarly.
9250 * init.c (build_java_class_ref): Similarly.
9251 * xref.c (open_xref_file): Similarly.
9253 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9255 * class.c (finish_struct): Remove trailing periods from messages.
9256 * decl.c (check_tag_decl): Similarly.
9257 * lex.c (cxx_set_yydebug): Similarly.
9258 * typeck2.c (friendly_abort): Similarly.
9260 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9263 * cp-tree.h (ovl_member): Remove.
9264 * decl2.c (merge_functions): Handle extern "C" functions
9266 * tree.c (ovl_member): Remove.
9268 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9271 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
9272 FUNCTION_DECL, as input.
9273 (mark_overriders): Remove.
9274 (warn_hidden): Rework for the new ABI.
9276 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9279 * call.c (convert_like_real): Do not build additional temporaries
9280 for rvalues of class type.
9282 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
9284 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
9285 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
9286 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
9287 (DERIVED_FROM_P): Likewise.
9288 (enum base_access): Renumber, add ba_quiet bit mask.
9289 (get_binfo): Remove.
9290 (get_base_distance): Remove.
9291 (binfo_value): Remove.
9292 (ACCESSIBLY_DERIVED_FROM_P): Remove.
9293 * call.c (standard_conversion): Use lookup_base.
9294 * class.c (strictly_overrides): Likewise.
9295 (layout_virtual_bases): Likewise.
9296 (warn_about_ambiguous_direct_bases): Likewise.
9297 (is_base_of_enclosing_class): Likewise.
9298 (add_vcall_offset_vtbl_entries_1): Likewise.
9299 * cvt.c (build_up_reference): Adjust comment.
9300 * init.c (build_member_call): Reformat.
9301 * search.c (get_binfo): Remove.
9302 (get_base_distance_recursive): Remove.
9303 (get_base_distance): Remove.
9304 (lookup_base_r): Tweak.
9305 (lookup_base): Add ba_quiet control. Complete the types here.
9306 (covariant_return_p): Use lookup_base.
9307 * tree.c (binfo_value): Remove.
9308 (maybe_dummy_object): Use lookup_base.
9309 * typeck.c (build_static_cast): Use lookup_base.
9310 (get_delta_difference): Likewise.
9311 * typeck2.c (binfo_or_else): Use lookup_base.
9312 (build_scoped_ref): Add back error_mark_check.
9313 (build_m_component_ref): Use lookup_base.
9315 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9317 * Make-lang.in (c++.generated-manpages): New dummy target.
9319 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9321 * Make-lang.in (cp-lang.o): Depends on c-common.h.
9322 * cp-lang.c (c-common.h): Include.
9323 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
9324 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
9325 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
9327 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
9329 * decl2.c (c_language): Move to c-common.c.
9330 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
9334 2001-11-26 Jason Merrill <jason@redhat.com>
9336 * call.c (joust): Remove COND_EXPR hack.
9338 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
9340 * search.c (lookup_base_r): Declare bk in variable declaration
9343 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
9346 * class.c (build_vbase_pointer): Remove.
9347 (build_vbase_path): Remove.
9348 (build_base_path): New function.
9349 * cp-tree.h (base_access, base_kind): New enumerations.
9350 (build_base_path): Declare.
9351 (convert_pointer_to_real): Remove.
9352 (convert_pointer_to): Remove.
9353 (lookup_base): Declare.
9354 (convert_pointer_to_vbase): Remove.
9355 * call.c (build_scoped_method_call): Use lookup_base &
9356 build_base_path instead of convert_pointer_to_real,
9357 get_base_distance & get_binfo.
9358 (build_over_call): Likewise.
9359 * cvt.c (cp_convert_to_pointer): Likewise.
9360 (convert_to_pointer_force): Likewise.
9361 (build_up_reference): Likewise.
9362 (convert_pointer_to_real): Remove.
9363 (convert_pointer_to): Remove.
9364 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
9365 instead of convert_pointer_to_vbase & build_vbase_path.
9366 (emit_base_init): Use build_base_path instead of
9367 convert_pointer_to_real.
9368 (expand_virtual_init): Lose unrequired conversions.
9369 (resolve_offset_ref): Use lookup_base and build_base_path
9370 instead of convert_pointer_to.
9371 * rtti.c (build_dynamic_cast_1): Use lookup_base &
9372 build_base_path instead of get_base_distance & build_vbase_path.
9373 * search.c (get_vbase_1): Remove.
9374 (get_vbase): Remove.
9375 (convert_pointer_to_vbase): Remove.
9376 (lookup_base_r): New function.
9377 (lookup_base): New function.
9378 * typeck.c (require_complete_type): Use lookup_base &
9379 build_base_path instead of convert_pointer_to.
9380 (build_component_ref): Likewise.
9381 (build_x_function_call): Likewise.
9382 (get_member_function_from_ptrfunc): Likewise.
9383 (build_component_addr): Likewise.
9384 * typeck2.c (build_scoped_ref): Likewise.
9386 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9388 * cp-tree.h (CP_TYPE_QUALS): Removed.
9389 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9390 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9391 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9392 * dump.c (cp_dump_tree): Use void* dump_info argument to match
9393 lang-hooks prototype.
9394 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9395 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9396 CP_TYPE_QUALS changed to cp_type_quals.
9397 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9398 (CXX_C_OBJS): Remove c-dump.o.
9400 2001-11-21 Mark Mitchell <mark@codesourcery.com>
9403 * pt.c (lookup_template_class): Ensure that all specializations
9404 are registered on the list corresponding to the most general
9407 2001-11-20 Mark Mitchell <mark@codesourcery.com>
9409 * call.c (non_reference): Add documentation.
9410 (convert_class_to_reference): Do not strip reference types
9411 from conversion operators.
9412 (maybe_handle_ref_bind): Simplify.
9413 (compare_ics): Correct handling of references.
9415 2001-11-19 John Wilkinson <johnw@research.att.com>
9417 * dump.c (dump_op): New function.
9418 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
9419 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9420 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9422 2001-11-19 Mark Mitchell <mark@codesourcery.com>
9425 * semantics.c (finish_sizeof): Make sure that expression created
9426 while processing a template do not have a type.
9427 (finish_alignof): Likewise.
9428 * typeck.c (c_sizeof): Likewise.
9429 (expr_sizeof): Likewise.
9431 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9433 * lex.c (cxx_finish): Call c_common_finish.
9434 (finish_parse): Remove.
9436 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9438 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9439 when displaying error message about missing array bounds.
9441 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9443 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9445 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9447 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
9449 * cp-tree.h (print_class_statistics): Restore.
9451 2001-11-15 Jason Merrill <jason@redhat.com>
9453 * method.c (use_thunk): Don't emit debugging information for thunks.
9455 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9456 * decl.c (make_typename_type): Handle getting a class template.
9457 * search.c (lookup_field_r): A class template is good enough for
9460 * call.c (convert_like_real): Only use cp_convert for the bad part.
9461 (standard_conversion): Also allow bad int->enum.
9462 * typeck.c (ptr_reasonably_similar): Also allow functions to
9463 interconvert. Pointers to same-size integers are reasonably
9466 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9469 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
9472 * init.c (sort_base_init): Remove unreachable code.
9473 (expand_member_init): Adjust comment to reflect reality. Simplify
9474 and remove unreachable code.
9476 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9478 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9479 (cxx_init): Update prototype.
9480 * decl.c (init_decl_processing): Rename. Move null node init
9481 to its creation time.
9482 * lex.c (cxx_init_options): Update.
9483 (cxx_init): Combine with old init_parse; also call
9484 cxx_init_decl_processing.
9486 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
9488 * decl.c (check_initializer): Try to complete the type of an
9489 array element before checking whether it's complete. Don't
9490 complain about arrays with complete element types but an
9492 (cp_finish_decl): Build the hierarchical constructor before
9493 calling maybe_deduce_size_from_array_init.
9495 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
9497 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9499 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
9502 * parse.y (already_scoped_stmt): Remove.
9503 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9505 2001-11-12 H.J. Lu <hjl@gnu.org>
9507 * cvt.c (ocp_convert): Don't warn the address of a weak
9508 function is always `true'.
9510 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9512 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9513 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9514 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9515 * cp-tree.h (print_class_statistics): Remove.
9516 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9517 cxx_print_identifier, cxx_set_yydebug): New.
9518 * lex.c (set_yydebug): Rename c_set_yydebug.
9519 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9520 lang_print_xnode): Rename.
9521 * tree.c (print_lang_statistics): Rename.
9523 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9525 * class.c (dump_array): Fix format specifier warning.
9527 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9529 * cp-lang.c (LANG_HOOKS_NAME): Override.
9530 (struct lang_hooks): Constify.
9531 * lex.c (cxx_init_options): Update.
9532 (lang_identify): Remove.
9533 * parse.y (language_string): Remove.
9535 2001-11-08 Andreas Franck <afranck@gmx.de>
9537 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9538 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9539 suggested by autoconf.
9540 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9541 (c++.install-common): Use the transformed target alias names.
9543 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9545 * Make-lang.in: Update.
9546 * cp-lang.c: Include langhooks-def.h.
9548 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9550 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9552 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9554 * lex.c (copy_lang_type): Add static prototype.
9556 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9558 * pt.c (unify): Handle SCOPE_REF.
9560 2001-11-01 Jakub Jelinek <jakub@redhat.com>
9562 * tree.c (cp_copy_res_decl_for_inlining): Adjust
9563 DECL_ABSTRACT_ORIGIN for the return variable.
9565 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9567 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9569 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
9571 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9572 semantics.c, spew.c: Fix spelling errors.
9574 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9576 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
9578 2001-10-25 Zack Weinberg <zack@codesourcery.com>
9580 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
9583 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9585 * cp-lang.c (cxx_get_alias_set): New function.
9586 Point LANG_HOOKS_GET_ALIAS_SET to it.
9588 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9590 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
9591 * cp-tree.h (make_unbound_class_template): Prototype new function.
9592 * decl.c (make_unbound_class_template): New function.
9593 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
9594 * error.c (dump_type): Likewise.
9595 * mangle.c (write_type): Likewise.
9596 * parse.y (template_parm): Likewise.
9597 (template_argument): Use make_unbound_class_template.
9598 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
9600 (tsubst_copy): Likewise.
9602 * tree.c (walk_tree): Likewise.
9603 * typeck.c (comptypes): Likewise.
9605 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9607 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
9608 extra calls into fewer ones.
9610 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
9612 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
9613 Warn when merging inline with attribute noinline.
9614 (start_decl, start_function): Warn if inline and attribute
9615 noinline appear in the same declaration.
9617 2001-10-16 H.J. Lu <hjl@gnu.org>
9619 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
9620 for tree checking disabled.
9622 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
9624 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
9625 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
9627 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9629 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
9630 (unify): Only handle MINUS_EXPR specially if the above flag is set
9631 and the subtracted constant is 1. Clear the flag on recursive calls.
9632 Set it when unifying the maximum value in an INTEGER_TYPE's range.
9634 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9636 * decl.c (bad_specifiers): Don't allow exception specifications
9639 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
9641 * cp/lex.c (init_cp_pragma): Similarly.
9643 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9645 * pt.c (lookup_template_class): Build complete template arguments
9646 for BOUND_TEMPLATE_TEMPLATE_PARM.
9648 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9650 * cp-tree.h (TYPE_BINFO): Update comment.
9651 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9652 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9653 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9654 (copy_type): Prototype new function.
9655 * lex.c (copy_lang_decl): Gather tree node statistics.
9656 (copy_lang_type): New function.
9657 (copy_type): Likewise.
9658 (cp_make_lang_type): Create lang_type for
9659 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
9660 and BOUND_TEMPLATE_TEMPLATE_PARM.
9661 * pt.c (tsubst): Use copy_type instead of copy_node.
9662 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9664 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9666 * pt.c (determine_specialization): Ignore functions without
9669 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
9672 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9674 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
9676 * typeck2.c (store_init_value): Don't re-digest a bracketed
9679 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9682 2001-10-11 Richard Henderson <rth@redhat.com>
9684 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9685 of an asm statement.
9686 (build_vtbl_ref_1): Split out from build_vtbl_ref.
9687 (build_vfn_ref): Use it to handle vtable descriptors before
9688 calling build_vtable_entry_ref.
9689 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9691 2001-10-10 Richard Henderson <rth@redhat.com>
9693 * parse.y (asm_operand): Allow named operands.
9694 * semantics.c (finish_asm_stmt): Tweek for changed location
9695 of the operand constraint.
9697 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
9699 * call.c (standard_conversion): Add bad conversion between
9700 integers and pointers.
9701 (convert_like_real): Don't use convert_for_initialization for bad
9702 conversions; complain here and use cp_convert.
9703 (build_over_call): Don't handle bad conversions specially.
9704 (perform_implicit_conversion): Allow bad conversions.
9705 (can_convert_arg_bad): New fn.
9706 * cp-tree.h: Declare it.
9707 * typeck.c (convert_for_assignment): Use it.
9708 (ptr_reasonably_similar): Any target type is similar to void.
9710 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
9712 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9713 (cp/cp-lang.o): New rule.
9714 * cp-tree.h: Declare hooks.
9715 * tree.c: Make hooks non-static.
9716 (init_tree): Don't initialize hooks here.
9717 * lex.c: Likewise. Move definition of lang_hooks to...
9718 * cp-lang.c: ... new file.
9720 2001-10-08 Richard Henderson <rth@redhat.com>
9722 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
9723 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
9725 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9727 * class.c (build_vtable_entry_ref): Const-ify.
9728 * decl.c (predefined_identifier,
9729 initialize_predefined_identifiers): Likewise.
9730 * init.c (build_new_1): Likewise.
9731 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9734 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
9736 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9737 (INSNS_PER_STMT): Likewise.
9738 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9739 (copy_body, initialize_inlined_parameters): Likewise.
9740 (declare_return_variable, inlinable_function_p): Likewise.
9741 (expand_call_inline, expand_calls_inline): Likewise.
9742 (optimize_inline_calls, clone_body): Likewise.
9743 * tree.c (walk_tree): Moved to ../tree-inline.c.
9744 (walk_tree_without_duplicates): Likewise.
9745 (copy_tree_r, remap_save_expr): Likewise.
9747 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
9749 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9750 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9751 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9752 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9753 (flag_inline_trees): Moved declaration to ../tree-inline.h.
9754 (walk_tree): Moved declaration to ../tree-inline.h.
9755 (walk_tree_without_duplicates, copy_tree_r): Likewise.
9756 (remap_save_expr): Likewise.
9757 * decl.c: Include tree-inline.h.
9758 (lang_mark_tree): Don't mark inlined_fns.
9759 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9760 * optimize.c: Include tree-inline.h.
9761 (optimize_inline_calls): Move declaration to ../tree.h, as
9763 (remap_decl): Use language-independent constructs and hooks.
9764 (remap_block, copy_body_r, declare_return_variable): Likewise.
9765 (inlinable_function_p): Likewise. Don't test for
9766 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9767 no longer language-specific.
9768 (optimize_inline_calls): Likewise. Make it non-static. Moved
9769 call of dump_function to...
9770 (optimize_function): Here...
9771 (clone_body): New function, extracted from...
9772 (maybe_clone_body): ... here. Build decl_map locally and pass
9773 it on to clone_body.
9774 * pt.c, semantics.c: Include tree-inline.h.
9776 (cp_walk_subtrees): New language-specific hook for tree inlining.
9777 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9778 cp_is_overload_p, cp_auto_var_in_fn_p,
9779 cp_copy_res_decl_for_inlining): Likewise.
9780 (walk_tree): Move language-specific constructs into...
9781 (cp_walk_subtrees): this new function.
9782 (copy_tree_r): Use language-independent constructs and hooks.
9783 (init_tree): Initialize tree inlining hooks.
9784 (remap_save_expr): Adjust prototype so that the declaration
9785 does not require the definition of splay_tree.
9787 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
9789 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
9790 to build the declaration instead of the declaration itself.
9792 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
9794 * decl2.c (cxx_decode_option): Add 'else'.
9796 * spew.c (end_input): No longer static.
9797 * cp-tree.h: Declare it.
9798 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
9800 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9802 * call.c (build_over_call), typeck.c (build_function_call_real):
9803 Pass type attributes to check_function_format rather than name or
9804 assembler name. Don't require there to be a name or assembler
9805 name to check formats.
9807 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9809 * decl.c (init_decl_processing): Don't call
9810 init_function_format_info. Initialize lang_attribute_table
9812 (builtin_function): Call decl_attributes.
9813 (insert_default_attributes): New.
9815 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
9817 * decl.c (grokdeclarator): Copy array typedef handling from C
9820 * decl.c (grokdeclarator): Copy too-large array handling from C
9823 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
9825 * config-lang.in (target_libs): Added target-gperf, so that we
9826 don't try to build it if C++ is disabled.
9828 2001-09-23 Zack Weinberg <zack@codesourcery.com>
9830 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
9831 (cp/errfn.o): Delete rule.
9832 (cp/error.o): Depend on flags.h.
9833 * errfn.c: Delete file.
9834 * cp-tree.h: Declare warn_deprecated. Remove definitions of
9835 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
9836 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
9837 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
9838 internal_error respectively. Make cp_deprecated into a macro.
9839 Don't define cp_printer typedef or declare cp_printers.
9840 * error.c: Include flags.h.
9841 Delete: struct tree_formatting_info, print_function_argument_list,
9842 print_declaration, print_expression, print_function_declaration,
9843 print_function_parameter, print_type_id, print_cv_qualifier_seq,
9844 print_type_specifier_seq, print_simple_type_specifier,
9845 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
9846 print_parameter_declaration_clause, print_exception_specification,
9847 print_nested_name_specifier, and definition of cp_printers.
9848 (locate_error): New function.
9849 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
9850 rewritten in terms of locate_error and diagnostic.c.
9851 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
9852 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
9853 (init_error): Adjust to match.
9855 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9857 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
9859 2001-09-21 Richard Henderson <rth@redhat.com>
9861 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
9862 (build_vtbl_initializer): Likewise.
9863 (build_vfn_ref): New.
9864 * cp-tree.h: Declare it.
9865 * call.c (build_over_call): Use it.
9866 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
9867 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
9869 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
9871 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
9873 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
9875 Table-driven attributes.
9876 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
9877 * decl2.c (cplus_decl_attributes): Only take one attributes
9879 * cp-tree.c (cplus_decl_attributes): Update prototype.
9880 * class.c (finish_struct), decl.c (start_decl, start_function),
9881 decl2.c (grokfield), friend.c (do_friend), parse.y
9882 (parse_bitfield): Update calls to cplus_decl_attributes.
9883 * decl.c (grokdeclarator): Take a pointer to a single ordinary
9885 * decl.h (grokdeclarator): Update prototype.
9886 * decl2.c (grokfield): Take a single ordinary attribute list.
9887 * friend.c (do_friend): Likewise.
9888 * decl.c (shadow_tag, groktypename, start_decl,
9889 start_handler_parms, grokdeclarator, grokparms, start_function,
9890 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
9891 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
9892 (process_template_parm, do_decl_instantiation): Pass single
9893 ordinary attribute lists around.
9894 * decl.c (grokdeclarator): Correct handling of nested attributes.
9896 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9897 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9900 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
9901 (cp_attribute_table): Declare.
9902 * decl.c (valid_lang_attribute): Don't define.
9903 (lang_attribute_table): Define.
9904 (init_decl_processing): Initialize lang_attribute_table instead of
9905 valid_lang_attribute.
9906 * tree.c (cp_valid_lang_attribute): Remove.
9907 (handle_java_interface_attribute, handle_com_interface_attribute,
9908 handle_init_priority_attribute): New functions.
9909 (cp_attribute_table): New array.
9910 * decl2.c (import_export_class): Don't use
9911 targetm.valid_type_attribute.
9913 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9915 * Make-lang.in (cp/error.o): Depend on real.h
9916 * error.c: #include "real.h"
9918 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9920 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
9921 xmalloc/strcpy/strcat.
9923 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9925 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
9927 * pt.c (tsubst_decl): Likewise.
9929 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9931 * decl2.c (lang_f_options): Const-ification.
9932 * lex.c (cplus_tree_code_name): Likewise.
9933 * spew.c (yyerror): Likewise.
9935 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9938 * class.c (force_canonical_binfo_r): Check & move an indirect
9940 (force_canonical_binfo): Check that it's not already
9942 (mark_primary_virtual_base): Remove BINFO parameter.
9943 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
9945 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9947 Remove TYPE_NONCOPIED_PARTS.
9948 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
9949 CLASSTYPE_PURE_VIRTUALS.
9950 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
9951 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
9952 (layout_class_type): Don't call fixup_inline_methods here ...
9953 (finish_struct_1): ... call it here.
9955 2001-09-04 Mark Mitchell <mark@codesourcery.com>
9957 * decl.c (duplicate_decls): Remove code deadling with
9959 * decl2.c (finish_file): Likewise.
9960 * pt.c (instantiate_decl): Likewise.
9961 * semantics.c (expand_body): Don't defer local functions if
9962 they wouldn't be deferred for some other reason. Don't
9963 generate RTL for functions that will not be emitted.
9964 (genrtl_start_function): Remove code deadling with
9966 (genrtl_finish_function): Likewise.
9968 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
9971 * call.c (build_over_call): Do not optimize any empty base
9974 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9976 * error.c (dump_template_decl): Output template parameters
9977 together with their specifiers.
9978 Output `class' prefix for template template parameter.
9979 (dump_decl): Fix formatting.
9981 2001-08-30 Kurt Garloff <garloff@suse.de>
9983 * optimize.c (inlinable_function_p): Allow only smaller single
9984 functions. Halve inline limit after reaching recursive limit.
9986 2001-08-30 Joern Rennecke <amylaar@redhat.com>
9987 Jason Merrill <jason_merrill@redhat.com>
9989 * class.c (build_vtable_entry_ref): Subtract in char*, not
9992 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
9994 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
9995 (build_cplus_array_type): Use cp_build_qualified_type, not
9996 TYPE_MAIN_VARIANT, to get an unqualified version.
9998 * decl2.c (grok_alignof): Lose.
9999 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10000 * typeck.c (c_alignof): Lose.
10001 * semantics.c (finish_sizeof, finish_alignof): New.
10002 * parse.y: Use them.
10003 * cp-tree.h: Declare them.
10005 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
10007 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10008 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10009 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10011 2001-08-19 Jakub Jelinek <jakub@redhat.com>
10013 * typeck2.c (add_exception_specifier): Only require complete type if
10014 not in processing template declaration.
10016 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10018 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10019 GNU_xref_start_scope and GNU_xref_end_scope.
10021 * tree.c (TYPE_HASH): Moved to ../tree.h.
10023 2001-08-16 Mark Mitchell <mark@codesourcery.com>
10025 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10028 2001-08-14 Richard Henderson <rth@redhat.com>
10030 * class.c, cp-tree.h (build_vfn_ref): Remove.
10031 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10033 2001-08-13 Mark Mitchell <mark@codesourcery.com>
10035 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10036 empty class assignment as having side-effects to avoid
10039 2001-08-13 Zack Weinberg <zackw@panix.com>
10041 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10042 * except.c: Include libfuncs.h.
10044 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10046 * decl.c (grokdeclarator): Clarify diagnostic message.
10048 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10050 * decl2.c (do_nonmember_using_decl): Replace using directive
10051 with using declaration in the error message.
10053 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10055 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10056 criterion to avoid rebuilding expression tree instead of
10057 processing_template_decl.
10059 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10061 Support named return value optimization for inlines, too.
10062 * decl.c (finish_function): Nullify returns here.
10063 * semantics.c (genrtl_start_function): Not here.
10064 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10065 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
10066 Also nullify the CLEANUP_STMT for the nrv.
10067 * cp-tree.h: Declare it.
10068 * optimize.c (declare_return_variable): Replace the nrv with the
10070 * typeck.c (check_return_expr): Be more flexible on alignment check.
10071 Ignore cv-quals when checking for a matching type.
10073 2001-08-09 Richard Henderson <rth@redhat.com>
10075 * decl2.c (finish_objects): Use target hooks instead of
10076 assemble_constructor and assemble_destructor.
10078 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10080 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10082 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
10085 Stop using TYPE_NONCOPIED_PARTS.
10086 * call.c (build_over_call): Be careful when copy constructing
10087 or assigning to an empty class.
10088 * class.c (check_bases_and_members): It has a
10089 COMPLEX_ASSIGN_REF if it has a vptr.
10090 (layout_class_type): Don't add empty class padding to
10091 TYPE_NONCOPIED_PARTS.
10092 (finish_struct_1): Don't add the VFIELD either.
10093 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10096 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10098 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10100 2001-08-06 Richard Henderson <rth@redhat.com>
10102 * decl2.c (finish_objects): Pass a symbol_ref and priority to
10103 assemble_{constructor,destructor}. Remove priority handling.
10105 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10107 Don't allow template-id in using-declaration.
10108 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10109 (do_class_using_decl): Likewise.
10111 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10113 * cp/spew.c (read_token): No need to pop buffers.
10115 2001-08-02 Stan Shebs <shebs@apple.com>
10117 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10118 (fnaddr_from_vtable_entry): Remove decl.
10119 * method.c (use_thunk): Update comment.
10121 2001-08-01 Andrew Cagney <ac131313@redhat.com>
10123 * repo.c (get_base_filename): Change return value to const char
10126 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
10130 * cp-tree.h (flag_honor_std): Remove.
10131 (CPTI_FAKE_STD): Remove.
10132 (std_node): Remove comment about it being NULL.
10133 (fake_std_node): Remove.
10134 * decl.c (in_fake_std): Remove.
10135 (walk_namespaces_r): Remove fake_std_node check.
10136 (push_namespace): Remove in_fake_std code.
10137 (pop_namespace): Likewise.
10138 (lookup_name_real): Remove fake_std_node check.
10139 (init_decl_processing): Always create std_node. Always add
10140 std:: things there.
10141 (builtin_function): Always put non '_' fns in std.
10142 * decl2.c (flag_honor_std): Remove.
10143 (lang_f_options): Remove honor-std.
10144 (unsupported_options): Add honor-std.
10145 (set_decl_namespace): Remove fake_std_node check.
10146 (validate_nonmember_using_decl): Likewise.
10147 (do_using_directive): Likewise.
10148 (handle_class_head): Likewise.
10149 * dump.c (cp_dump_tree): Likewise.
10150 * except.c (init_exception_processing): Adjust.
10151 * init.c (build_member_call): Remove fake_std_node check.
10152 (build_offset_ref): Likewise.
10153 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10154 * rtti.c (init_rtti_processing): Adjust.
10156 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10158 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10159 operand while calling cp_tree_equal.
10161 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10163 The 3.0 ABI no longer has vbase pointer fields.
10164 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
10165 FORMAT_VBASE_NAME): Remove.
10166 * method.c (do_build_copy_constructor): Adjust.
10167 (do_build_assign_ref): Adjust.
10168 * search.c (lookup_field_r): Adjust.
10169 * typeck.c (build_component_ref): Adjust.
10171 The 3.0 ABI always has a vtable pointer at the start of every
10173 * rtti.c (build_headof_sub): Remove.
10174 (build_headof): Adjust.
10175 (get_tinfo_decl_dynamic): No need to check flag_rtti
10177 (create_real_tinfo_var): Explain why we need a hidden name.
10179 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10182 * class.c (update_vtable_entry_for_fn): The fixed adjustment
10183 of a virtual thunk should be from declaring base.
10185 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10187 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
10188 the shared virtual base, so preserving inheritance graph order.
10190 2001-07-30 Andreas Jaeger <aj@suse.de>
10192 * decl2.c: Remove unused var global_temp_name_counter.
10194 2001-07-28 Richard Henderson <rth@redhat.com>
10196 * method.c (pending_inlines): Remove.
10198 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10200 * class.c (mark_primary_virtual_base): Don't adjust base
10202 (dfs_unshared_virtual_bases): Adjust them here.
10203 (mark_primary_bases): Explain why we adjust at the end.
10205 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10207 * class.c (finish_struct_1): When copying the primary base's
10208 VFIELD, make sure we find it is at offset zero.
10210 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10212 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
10213 tsubst_expr for default template arguments.
10215 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10218 * spew.c (yylex): Only copy the token's lineno, if it is
10221 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10224 * call.c (resolve_args): Simplify, call
10225 convert_from_reference.
10226 (build_new_op): Resolve and convert from reference ARG1
10227 earlier. Adjust ARG2 & ARG3 resolve and conversion.
10229 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10231 * decl.c (last_function_parm_tags): Remove.
10232 (current_function_parm_tags): Remove.
10233 (init_decl_processing): Adjust.
10234 (start_function): Adjust.
10235 (store_parm_decls): Adjust.
10238 * decl.c (grokdeclarator): Detect when a function typedef is
10239 declaring a function, and create last_function_parms correctly.
10241 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
10243 * call.c (joust): Only prefer a non-builtin candidate to a builtin
10244 one if they have the same signature.
10246 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
10247 it rather than toplevel_bindings_p. Give it a mangled name if static.
10248 (convert_to_reference): Adjust.
10249 * decl2.c (get_temp_name): Lose.
10250 * mangle.c (mangle_ref_init_variable): New fn.
10251 (mangle_guard_variable): Strip the ref-init header.
10252 * cp-tree.h: Adjust.
10253 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
10255 (grok_reference_init): Always use DECL_INITIAL.
10257 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10260 * call.c (build_conditional_expr): Recheck args after
10262 * cp-tree.h (build_conditional_expr): Move to correct file.
10263 * typeck.c (decay_conversion): Diagnose any unknown types
10265 (build_binary_op): Don't do initial decay or default
10266 conversions on overloaded functions.
10267 (build_static_cast): Don't do a decay conversion here.
10269 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10272 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
10273 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
10275 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10277 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
10278 (create_vtbl_ptr): ... here.
10280 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10282 * class.c (build_vbase_offset_vbtl_entries): Look for
10283 non-primary base of which we are a sub vtable.
10285 2001-07-24 Phil Edwards <pme@sources.redhat.com>
10287 * semantics.c (finish_this_expr): Remove unused code.
10289 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
10291 Simplify rtti, now we've only one ABI.
10292 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10294 (tinfo_decl_id, tinfo_var_id): Remove.
10295 (get_typeid_1): Remove.
10297 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
10298 (typeid_ok_p): New function.
10299 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
10300 (get_tinfo_decl): Remove old abi documentation.
10301 (tinfo_from_decl): Remove.
10302 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
10303 (get_typeid_1): Remove.
10304 (get_base_offset): Remove.
10305 (synthesize_tinfo_var): Absorb get_base_offset.
10306 (create_real_tinfo_var): Don't use tinfo_decl_id.
10308 2001-07-23 Graham Stott <grahams@redhat.com>
10310 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
10311 variable has_two_argument_delete_p.
10313 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
10315 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
10316 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
10317 (CPTI_INDEX_IDENTIFIER): Remove.
10318 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
10319 (delta2_identifier): Remove.
10320 (index_identifier): Remove.
10321 (pfn_or_delta2_identifier): Remove.
10322 (flag_vtable_thunks): Remove.
10323 (VTABLE_DELTA2_NAME): Remove.
10324 (VTABLE_INDEX_NAME): Remove.
10325 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
10326 (vfunc_ptr_type_node): Adjust.
10327 (VTABLE_NAME_PREFIX): Adjust.
10328 (build_vfn_ref): Lose first parameter.
10329 (fixup_all_virtual_upcast_offsets): Remove.
10330 * decl.c (initialize_predefined_identifiers): Remove
10331 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
10332 (init_decl_processing): Remove no-vtable-thunk code.
10333 * decl2.c (flag_vtable_thunks): Remove.
10334 (mark_vtable_entries): Remove no-vtable-thunk code.
10335 * error.c (dump_decl): Remove no-vtable-thunk code.
10336 (dump_expr): Adjust ptr to member function code.
10337 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
10339 * rtti.c (build_headof): Remove no-vtable-thunk code.
10340 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
10341 * search.c (get_base_distance): Remove expand_upcast_fixups case.
10342 (virtual_context) Remove.
10343 (expand_upcast_fixups): Remove.
10344 (fixup_virtual_upcast_offsets): Remove.
10345 (fixup_all_virtual_upcast_offsets): Remove.
10346 * typeck.c (get_member_function_from_ptrfunc): Remove
10347 no-vtable-thunk code.
10348 * call.c (build_over_call): Adjust call to build_vfn_ref.
10349 * class.c (build_vfn_ref): Lose first parameter. Remove
10350 no-vtable-thunk code.
10351 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
10352 (build_vtable_entry): Remove no-vtable-thunk code.
10354 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
10356 Remove old-abi remnants. Remove comments about old abi
10357 behavior. Remove references to 'new-abi' in comments.
10358 * cp-tree.h: Adjust comments.
10359 (vbase_offsets_in_vtable_p): Delete.
10360 (vcall_offsets_in_vtable_p): Delete.
10361 (vptrs_present_everywhere_p): Delete.
10362 (all_overridden_vfuns_in_vtables_p): Delete.
10363 (merge_primary_and_secondary_vtables_p): Delete.
10364 (TYPE_CONTAINS_VPTR_P): Adjust.
10365 (VTT_NAME_PREFIX): Remove.
10366 (CTOR_VTBL_NAME_PREFIX): Remove.
10367 (init_vbase_pointers): Remove.
10368 * class.c: Adjust coments.
10369 (build_vbase_pointer_fields): Delete.
10370 (build_vbase_pointer): Remove old-abi code.
10371 (build_secondary_vtable): Likewise.
10372 (modify_all_vtables): Likewise.
10373 (create_vtable_ptr): Likewise.
10374 (layout_class_type): Likewise.
10375 (finish_struct_1): Likewise.
10376 (finish_vtbls): Likewise.
10377 (dfs_finish_vtbls): Delete.
10378 (build_vbase_offset_vtbl_entries): Remove old-abi code.
10379 * cvt.c: Adjust comments.
10380 * decl.c: Adjust comments.
10381 * decl2.c: Adjust comments.
10382 * init.c: Adjust comments.
10383 (construct_virtual_bases): Remove old-abi code.
10384 * lang-specs.h: Remove -fno-new-abi.
10385 * mangle.c: Adjust comments.
10386 * rtti.c: Adjust comments.
10387 (get_base_offset): Remove old-abi-code.
10388 * search.c: Adjust comments.
10389 (dfs_init_vbase_pointers): Remove.
10390 (dfs_vtable_path_unmark): Remove.
10391 (init_vbase_pointers): Remove.
10392 * semantics.c: Adjust comments.
10393 (emit_associated_thunks): Remove old-abi code.
10394 * typeck.c: Adjust comments.
10396 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
10398 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10401 2001-07-19 Mark Mitchell <mark@codesourcery.com>
10403 * class.c (finish_struct_anon): Forbid nested classes.
10405 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10407 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10408 * optimize.c: Include debug.h.
10409 (maybe_clone_body): Use debug hook.
10410 * semantics.c: Include debug.h.
10411 (expand_body): Use debug hook.
10413 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10415 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10417 2001-07-18 Mark Mitchell <mark@codesourcery.com>
10419 * class.c (type_requires_array_cookie): New function.
10420 (check_methods): Don't try to figure out whether the type needs a
10422 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10423 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10424 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10425 * pt.c (instantiate_class_template): Don't set
10426 TYPE_VEC_DELETE_TAKES_SIZE.
10427 * NEWS: Document ABI changes from GCC 3.0.
10429 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
10430 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10432 * NEWS (Changes in GCC 3.0): Fix typo.
10434 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
10436 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10437 which attributes are to be attached, and a flags argument. Update
10438 call to decl_attributes.
10439 (grokfield): Update call to decl_attributes.
10440 * class.c (finish_struct): Update call to cplus_decl_attributes.
10441 * cp-tree.h (cplus_decl_attributes): Update prototype.
10442 * decl.c (start_decl, grokdeclarator, start_function): Update
10443 calls to decl_attributes and cplus_decl_attributes.
10444 * friend.c (do_friend): Update call to cplus_decl_attributes.
10445 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10447 2001-07-12 Mark Mitchell <mark@codesourcery.com>
10449 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10450 for `register' variables with an asm-specification.
10452 2001-07-11 Mark Mitchell <mark@codesourcery.com>
10454 * semantics.c (finish_asm_stmt): Mark the output operands
10455 to an asm addressable, if necessary.
10457 2001-07-11 Ben Elliston <bje@redhat.com>
10459 * Revert this change -- there is a subtle bug.
10462 * decl.c (finish_enum): New "attributes" argument; pass it to
10463 cplus_decl_attributes. Use a narrower type if the enum is packed.
10464 * cp-tree.h (finish_enum): Adjust prototype.
10465 * parse.y (enum_head): New non-terminal.
10466 (structsp): Use it. Enums now may be preceded or followed by
10467 optional attributes -- pass their chained tree to finish_enum().
10468 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10470 2001-07-10 Mark Mitchell <mark@codesourcery.com>
10472 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10475 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
10477 * semantics.c (cp_expand_stmt): Fix for null
10478 current_function_return_value.
10480 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
10482 * call.c (build_op_delete_call): Initialize fn.
10483 (convert_like_real): Delete conditional.
10484 (joust): Initialize *w and *l.
10485 * class.c: Add prototype for binfo_ctor_vtable.
10486 (get_primary_binfo): Initialize result.
10487 * init.c (build_java_class_ref): Initialize name.
10489 2001-07-09 Erik Rozendaal <dlr@acm.org>
10491 * typeck.c (unary_complex_lvalue): Do not duplicate the
10492 argument to modify, pre-, or post-increment when used as an
10493 lvalue and when the argument has side-effects.
10495 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10497 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10498 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
10499 cplus_decl_attributes even if attrs is NULL.
10500 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10502 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10504 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10505 calls to decl_attributes.
10507 2001-07-06 Ira Ruben <ira@apple.com>
10509 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10510 be DECL_TEMPLATE_RESULT.
10512 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10514 * cp-tree.h (copy_template_template_parm): Rename to ...
10515 (bind_template_template_parm): ... here.
10516 * tree.c (copy_template_template_parm): Rename to ...
10517 (bind_template_template_parm): ... here. Remove the case when
10518 NEWARGS is NULL_TREE.
10519 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10520 BOUND_TEMPLATE_TEMPLATE_PARM.
10521 * pt.c (lookup_template_class): Adjust.
10523 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
10525 * cvt.c (convert_lvalue): New fn.
10526 * cp-tree.h: Declare it.
10527 * method.c (do_build_assign_ref): Use it.
10528 (do_build_copy_constructor): Convert parm to base types
10529 before calling base constructors.
10531 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10532 DECL_USER_ALIGN. Check flag_elide_constructors instead of
10534 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10536 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
10538 * optimize.c (optimize_inline_calls): New function, broken out
10540 (optimize_function): ... here. Call it. Don't inline if it is
10542 (dump_function): Print name of dump flag causing this dump.
10543 * semantics.c (expand_body): Move thunk inline check to
10546 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
10548 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10549 (comptypes): Use target.comp_type_attributes.
10551 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
10553 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10555 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10557 * error.c (lang_print_error_function): Add a `diagnostic_context *'
10560 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10562 * decl2.c (import_export_class): Update.
10564 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10566 * error.c (init_error): Adjust settings.
10568 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10570 * error.c (init_error): Adjust settings.
10572 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
10574 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10575 return pointers to data members by reference rather than by value.
10577 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
10579 Implement the Named Return Value optimization.
10580 * cp-tree.h (struct cp_language_function): Add x_return_value.
10581 (current_function_return_value): Now a macro.
10582 * decl.c: Don't define it.
10583 (define_label, finish_case_label): Don't clear it.
10584 (init_decl_processing): Don't register it with GC.
10585 * semantics.c (genrtl_finish_function): Don't check it for
10586 no_return_label. Copy the RTL from the return value to
10587 current_function_return_value and walk, calling...
10588 (nullify_returns_r): ...this new fn.
10589 * typeck.c (check_return_expr): Set current_function_return_value.
10591 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
10593 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
10594 sharing a ctor vtable with. Merge code for cases 1 and 2.
10595 (binfo_ctor_vtable): New fn.
10596 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
10598 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
10600 * class.c (dfs_find_final_overrider): Fix logic.
10602 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
10603 virtual thunk instead of non-virtual.
10604 (get_matching_virtual): Uncomment.
10606 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
10607 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
10610 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
10612 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
10613 we've not emerged from the hierarchy of RTTI_BINFO on reaching
10614 a non-virtual base.
10616 2001-06-13 Mark Mitchell <mark@codesourcery.com>
10618 * NEWS: Update release number.
10620 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10622 PR c++/3130, c++/3131, c++/3132
10623 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
10624 * class.c (force_canonical_binfo_r): Move
10625 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
10626 virtual bases unless they're primary and what they're primary
10627 too has been moved.
10628 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
10629 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
10630 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
10632 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
10633 (layout_nonempty_base_or_field): Add most derived type
10635 (layout_empty_base): Likewise.
10636 (build_base_field): Likewise.
10637 (build_base_fields): Likewise.
10638 (propagate_binfo_offsets): Add most derived type
10639 parameter. Skip non canonical virtual bases too.
10640 (dfs_set_offset_for_unshared_vbases): Don't skip primary
10641 bases. Do skip canonical bases.
10642 (layout_virtual_bases): Adjust.
10643 (layout_class_type): Adjust.
10644 (dfs_get_primary_binfo): Build list of virtual primary base
10646 (get_primary_binfo): Check that the shared virtual primary
10647 base candidate was found first.
10648 (accumulate_vtbl_inits): Don't do anything for non-vptr
10649 containing binfos. For case 1 primary virtual bases, keep
10650 checking that we've not emerged from the hierarchy of RTTI_BINFO.
10652 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10655 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10656 hierarchy looking for primary bases for a ctor
10657 vtable. Recursively call oneself, if we meet our primary via
10658 this route and haven't met it yet via inheritance graph order.
10660 2001-06-11 Mark Mitchell <mark@codesourcery.com>
10662 * lang-options.h: Emit documentation for -fno-honor-std, not
10665 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
10667 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10668 Don't clobber delta.
10669 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10671 2001-06-10 Mark Mitchell <mark@codesourcery.com>
10672 Gabriel Dos Reis <gdr@codesourcery.com>
10674 * Make-lang.in (cp/call.o): Depend on diagnostic.h
10675 (cp/typeck.o): Depend on diagnostic.h
10676 (cp/typeck2.o): Depend on diagnostic.h
10677 (cp/repo.o): Depend on dignostic.h
10678 * typeck.c: #include diagnostic.h
10679 (convert_for_initialization): Remove extern declaration for
10680 warningcount and errorcount.
10682 * call.c: #include diagnostic.h
10683 (convert_like_real): Remove extern declaration for warnincount and
10686 * repo.c: #include diagnostic.h
10687 * typeck2.c: #include diagnostic.h
10689 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10691 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10692 in previous change.
10694 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10697 * friend.c (do_friend): Use push_decl_namespace for classes at
10700 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10701 Jason Merrill <jason_merrill@redhat.com>
10704 * class.c (build_secondary_vtable): Use assert, rather than an error
10706 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10707 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10708 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10709 Don't set BINFO_VTABLE for a primary virtual base.
10711 2001-06-07 Mark Mitchell <mark@codesourcery.com>
10713 * decl.c (duplicate_decls): Update source position information
10714 when a template function is defined.
10716 2001-06-07 Phil Edwards <pme@sources.redhat.com>
10718 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
10720 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
10723 * decl.c (pushtag): Don't push into a complete type's scope.
10725 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
10727 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10728 (struct lang_decl_flags): Lose generate_with_vtable_p.
10729 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10730 * class.c (copy_virtuals): Adjust.
10731 * decl2.c (mark_vtable_entries): Adjust.
10732 * method.c (make_thunk, build_vtable_entry): Adjust.
10733 * class.c (update_vtable_entry_for_fn): Only look as far as the
10734 first defining class.
10735 (build_vtbl_initializer): Put nothing in the slot for a function only
10736 defined in a lost primary virtual base.
10737 (add_vcall_offset_vtbl_entries_1): Use the same code for
10738 the lost primary case and the normal case.
10739 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10740 (get_vfield_offset, get_derived_offset): Lose.
10741 (dfs_find_final_overrider): Use look_for_overrides_here.
10742 (get_matching_virtual): New fn.
10743 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10744 not BV_VCALL_INDEX.
10745 * search.c (look_for_overrides_here): Split out from...
10746 (look_for_overrides_r): Here.
10748 * class.c (find_final_overrider): Return error_mark_node on error.
10750 * decl2.c (key_method): #if 0 accidental change.
10752 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
10754 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10755 (build_over_call): Likewise.
10756 * decl.c (grokparms): Likewise.
10757 * pt.c (tsubst_decl): Likewise.
10758 * typeck.c (convert_arguments): Likewise.
10760 2001-06-05 Mark Mitchell <mark@codesourcery.com>
10762 * semantics.c (begin_class_definition): Robustify.
10764 * pt.c (instantiate_decl): Tell the repository code about the
10765 clones, not the cloned functions.
10766 * repo.c (repo_template_used): Explicitly instantiate the cloned
10767 function, not the clones.
10769 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10771 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10772 ICS_BAD_FLAG on created conversion.
10773 (compare_ics): Break out rank.
10775 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10777 * decl.c (xref_tag): Remove extraneous %s on dependent name
10780 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10782 * class.c (layout_vtable_decl): Fix off by one error on
10784 (build_vtt): Likewise.
10785 (build_ctor_vtbl_group): Likewise.
10787 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10789 * class.c (maybe_indent_hierarchy): New function.
10790 (dump_class_hierarchy_r): Add flags. Dump extra binfo
10791 information, if enabled. Use maybe_indent_hierarchy. Adjust
10793 (dump_class_hierarchy): Adjust prototype. Adjust output format.
10794 (dump_array, dump_vtable, dump_vtt): New functions.
10795 (finish_struct_1): Adjust hierarchy dumping.
10796 (initialize_vtable): Call dump_vtable.
10797 (build_vtt): Call dump_vtt.
10798 (build_ctor_vtbl_group): Call dump_vtable.
10799 * decl2.c (flag_dump_class_layout): Remove.
10800 (cxx_decode_option): Remove dump translation unit
10801 and dump class hierarchy check. Call dump_switch_p.
10802 (finish_file): Adjust dumping.
10803 (dump.c): Only dump base classes if not TDF_SLIM.
10804 Only dump namespace members if not TDF_SLIM.
10805 * optimize.c (dump_function): New function.
10806 (optimize_function): Call dump_function.
10807 * semantics.c (expand_body): Use dump_enabled_p.
10809 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
10812 Part missed from first commit
10813 * decl2.c (finish_anon_union): Copy context.
10815 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
10818 * optimize.c (remap_decl): Remap anonymous aggregate members too.
10820 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
10823 * semantics.c (expand_body): Don't optimize thunks.
10825 2001-05-25 Sam TH <sam@uchicago.edu>
10827 * cp-tree.h lex.h: Fix header include guards.
10829 2001-05-25 Mark Mitchell <mark@codesourcery.com>
10831 * decl.c (init_decl_processing): Tweak.
10833 2001-05-24 Mark Mitchell <mark@codesourcery.com>
10835 * decl.c (duplicate_decls): Tidy.
10836 (init_decl_processing): Always set flag_no_builtin.
10838 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
10841 * decl2.c (do_local_using_decl): Push the decls, even in a
10844 2001-05-22 Mark Mitchell <mark@codesourcery.com>
10846 * optimize.c (initialize_inlined_parameters): Don't set
10847 TREE_READONLY for a VAR_DECL taking the place of an inlined
10850 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
10852 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
10853 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
10856 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
10858 * parse.y: Refer to compound literals as such, not as
10859 constructor-expressions.
10861 2001-05-21 Mark Mitchell <mark@codesourcery.com>
10863 * call.c (build_op_delete_call): Ignore exception-specifications
10864 when looking for matching delete operators.
10865 * init.c (build_new_1): Compute whether or not the allocation
10866 function used is a placement allocation function or not, and
10867 communicate this information to build_op_delete_call.
10869 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
10871 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
10872 (build_vtbl_ref): Adjust.
10873 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
10874 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
10876 (unsupported_options): Correspondingly.
10878 * decl2.c (maybe_make_one_only): Check flag_weak, not
10879 supports_one_only().
10881 * cp-tree.def (START_CATCH_STMT): Lose.
10882 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
10883 * tree.c (cp_statement_code_p): Don't case it.
10884 * semantics.c (cp_expand_stmt): Likewise.
10885 * cp-tree.h (START_CATCH_TYPE): Lose.
10886 (HANDLER_TYPE): New.
10887 * except.c (expand_start_catch_block): Don't start any blocks.
10889 (expand_end_catch_block): Don't end any blocks.
10890 * parse.y (handler): Don't pass anything from finish_handler_parms
10892 * pt.c (tsubst_expr): Likewise.
10893 * semantics.c (begin_handler): Call note_level_for_catch here.
10894 (finish_handler_parms): Don't return anything.
10895 (genrtl_catch_block, begin_catch_block): Lose.
10896 (genrtl_handler): Call expand_start_catch here.
10898 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
10900 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
10901 (get_vtable_decl, build_vtt): Not here.
10903 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
10906 * optimize.c (update_cloned_parm): Copy addressability and other
10909 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10911 * pt.c (determine_specialization): Ignore artificial functions.
10913 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
10915 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
10916 (C_RID_CODE): Remove.
10917 * lex.c (cxx_init_options): Call set_identifier_size. Update.
10918 (init_parse): Don't do it here.
10920 2001-05-18 Diego Novillo <dnovillo@redhat.com>
10922 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
10923 function declaration to avoid stripping the symbol's attributes.
10925 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
10927 * decl.c (pushdecl): Adjust error string.
10928 (xref_tag): Adjust friend class injection warning. Remove the
10929 inherited name from the class shadowed scope.
10931 2001-05-17 Mark Mitchell <mark@codesourcery.com>
10933 * except.c (cp_protect_cleanup_actions): New function.
10934 (init_exception_processing): Don't set protect_cleanup_actions
10935 here. Do set lang_protect_cleanup_actions.
10937 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10939 * spew.c (read_token): Call yyerror on all unexpected tokens.
10941 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10943 * init.c (member_init_ok_or_else): Take a tree rather than
10945 (expand_member_init): Adjust.
10947 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
10949 * decl.c (duplicate_decls): Suppress warning about duplicate
10950 decls if the first decl is a friend.
10952 2001-05-12 Zack Weinberg <zackw@stanford.edu>
10954 * except.c (choose_personality_routine): Export. Add
10955 explanatory comment. Take an enum languages, not a boolean.
10956 (initialize_handler_parm): Adjust to match.
10957 * cp-tree.h: Prototype choose_personality_routine.
10958 * lex.c (handle_pragma_java_exceptions): New function.
10959 (init_cp_pragma): Register #pragma GCC java_exceptions.
10961 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10963 * method.c (build_mangled_C99_name): Remove unused prototype.
10965 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
10967 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
10968 * typeck.c (get_member_function_from_ptrfunc,
10969 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
10970 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
10972 Reverted Geoff Keating's 2001-05-03's patch.
10974 2001-05-11 Ira Ruben <ira@apple.com>
10976 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
10978 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
10980 * cp-tree.h (finish_label_expr, lookup_label): Delete.
10981 * parse.y: Update for '&&'; don't issue warning here.
10982 * semantics.c (finish_label_expr): Delete.
10984 2001-05-07 Mark Mitchell <mark@codesourcery.com>
10986 * splay-tree.h (splay_tree_max): New function.
10987 (splay_tree_min): Likewise.
10989 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
10991 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
10992 (pfn_vflag_identifier): Define.
10993 Update comment about layout of pointer functions.
10994 (build_ptrmemfunc1): Update prototype.
10995 (expand_ptrmemfunc_cst): Update prototype.
10996 * decl.c (initialize_predefined_identifiers): Initialize
10997 pfn_vflag_identifier.
10998 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
10999 an extra field to the type.
11000 * expr.c (cplus_expand_constant): Pass 'flag' between
11001 expand_ptrmemfunc_cst and build_ptrmemfunc1.
11002 * typeck.c (get_member_function_from_ptrfunc): When
11003 FUNCTION_BOUNDARY < 16, look at additional field to determine
11004 if a pointer-to-member is a real pointer or a vtable offset.
11005 (build_ptrmemfunc1): Add new parameter to contain extra field.
11006 (build_ptrmemfunc): Pass the extra field around.
11007 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11008 (pfn_from_ptrmemfunc): Ignore the extra field.
11010 2001-05-03 Mark Mitchell <mark@codesourcery.com>
11012 * cp-tree.h (flag_inline_trees): Update documentation.
11013 * decl.c (init_decl_processing): Adjust handling of
11014 flag_inline_functions and flag_inline_trees to support -O3.
11015 (grokfndecl): Set DECL_INLINE on all functions if that's what
11016 the user requested.
11017 (save_function_data): Clear DECL_INLINE in
11018 current_function_cannot_inline is non-NULL.
11019 * decl2.c (flag_inline_trees): Update documentation.
11021 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
11023 * dump.c (cp_dump_tree, USING_STMT case): New case.
11024 * tree.c (cp_statement_code_p): Add USING_STMT.
11025 * decl2.c (do_using_directive): Add the using directive statement.
11027 * tree.c (walk_tree): Reformat an if block.
11029 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11031 * decl.c (compute_array_index_type): Don't try to do anything with
11032 the indices when processing a template.
11034 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11036 * call.c: NULL_PTR -> NULL.
11037 * class.c: Likewise.
11039 * decl.c: Likewise.
11040 * decl2.c: Likewise.
11041 * except.c: Likewise.
11042 * init.c: Likewise.
11043 * rtti.c: Likewise.
11044 * search.c: Likewise.
11045 * tree.c: Likewise.
11046 * typeck.c: Likewise.
11047 * typeck2.c: Likewise.
11049 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11051 * decl2.c (do_using_directive): Revert previous patch.
11053 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11055 * cp-tree.def (USING_STMT): New statement node.
11056 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11057 * decl2.c (do_using_directive): Add USING_STMT to statement
11058 tree. Don't emit errors when processing template decl.
11059 * pt.c (tsubst_expr, USING_STMT case): New case.
11060 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11062 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11064 * call.c (build_new_op): Convert args from reference here.
11065 (build_conditional_expr): Don't convert here.
11067 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11069 * spew.c (last_token_id): New static variable.
11070 (read_token): Set it here.
11071 (yyerror): Use it here.
11073 2001-04-30 Richard Henderson <rth@redhat.com>
11075 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11076 * decl.c: Likewise.
11078 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11080 * gxxint.texi: Remove.
11081 * Make-lang.in: Remove all traces of gxxint.texi.
11083 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
11085 * decl2.c (start_static_initialization_or_destruction): Correct
11086 logic to handle the -fno-use-cxa-atexit case.
11088 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11090 * optimize.c (update_cloned_parm): New function.
11091 (maybe_clone_body): Use it. Update the `this' parameter too.
11093 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
11095 * decl2.c (unsupported_options): Add new-abi.
11096 * lang-options.h: Remove no longer supported options.
11098 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11100 * except.c (can_convert_eh): Don't check template parms,
11101 typename types etc.
11103 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11105 * optimize.c (maybe_clone_body): Copy parameter names and locations.
11107 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11109 * cp-tree.h (adjust_clone_args): Prototype new function.
11110 * class.c (adjust_clone_args): New function.
11111 * decl.c (start_function): Call it for in charge ctors.
11113 2001-04-26 Mark Mitchell <mark@codesourcery.com>
11115 * method.c (use_thunk): Make sure that thunks really are emitted
11118 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
11120 * mangle.c (write_chars): New macro.
11121 (hwint_to_ascii): New function
11122 (write_number): Use it.
11123 (write_integer_cst): Deal with really big numbers.
11125 2001-04-25 Mark Mitchell <mark@codesourcery.com>
11127 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11130 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
11132 * decl.c (grokdeclarator): Set context of namespace scope
11135 2001-04-24 Zack Weinberg <zackw@stanford.edu>
11137 * cp/optimize.c: Include hashtab.h.
11138 (struct inline_data): Add tree_pruner.
11139 (expand_call_inline, expand_calls_inline): Use it when calling
11141 (optimize_function): Initialize and free tree_pruner.
11143 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11145 Lazy __FUNCTION__ generation.
11146 * cp-tree.def (FUNCTION_NAME): Remove.
11147 * cp-tree.h (function_name_declared_p): Remove.
11148 (cp_fname_init): Prototype.
11149 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11150 don't call declare_function_name. Call start_fname_decls.
11151 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11152 clobber the line number.
11153 (cp_fname_init): New function.
11154 (start_function): Call start_fname_decls.
11155 (finish_function): Call finish_fname_decls.
11156 * lex.c (reswords): Add slots for __FUNCTION__ et al.
11157 (rid_to_yy): Add mappings for __FUNCTION__ et al.
11158 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11159 * parse.y (VAR_FUNC_NAME): New token.
11160 (primary): Add VAR_FUNC_NAME.
11161 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
11163 (tsubst, FUNCTION_NAME case): Remove.
11164 (tsubst_copy, FUNCTION_NAME case): Remove.
11165 (tsubst_expr, DECL_STMT case): Be careful with a
11166 DECL_PRETTY_FUNCTION_P.
11167 (instantiate_decl): Remove function_name_declared_p.
11168 * semantics.c (begin_compound_statement): Don't call
11169 declare_function_name here.
11170 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
11171 (finish_translation_unit): Call finish_fname_decls.
11172 (expand_body): Remove function_name_declared_p.
11173 * typeck2.c (digest_init): Allow any ERROR_MARK.
11175 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11177 * pt.c (tsubst_decl): Use VOID_TYPE_P.
11178 * semantics.c: Fix some typos.
11180 2001-04-23 Phil Edwards <pme@sources.redhat.com>
11182 * cp/decl2.c (flag_honor_std): Always initialize to 1.
11184 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11186 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
11188 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
11190 * except.c (build_throw): Wrap the initialization of the exception
11191 object in a MUST_NOT_THROW_EXPR.
11192 (do_free_exception): #if 0.
11194 2001-04-20 Mark Mitchell <mark@codesourcery.com>
11196 * cp-tree.h (finish_enum): Change prototype.
11197 * decl.c (finish_enum): Reorganize.
11198 * parse.y (structsp): Adjust calls to finish_enum.
11200 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11202 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
11205 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11207 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
11208 (layout_empty_base): Return at end flag.
11209 (build_base_field): Likewise.
11210 (build_base_fields): Likewise.
11211 (layout_virtual_bases): Don't add 1 to eoc value.
11212 (end_of_class): Use full size for empty bases.
11213 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
11214 empty bases. Don't add 1 to eoc value. Only add trailing padding
11215 if we're an empty class with no empty bases.
11216 (dump_class_hierarchy): Dump size and alignment.
11218 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11220 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
11223 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11225 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
11226 is found, look first if name does not match the structure name.
11228 2001-04-19 Mark Mitchell <mark@codesourcery.com>
11230 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
11232 (SET_DECL_LANGUAGE): New macro.
11233 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
11234 (pushdecl): Likewise.
11235 (build_library_fn_1): Likewise.
11236 (build_cp_library_fn): Likewise.
11237 (grokfndecl): Likewise.
11238 (grokvardecl): Mark `extern "C"' variables as having C linkage.
11239 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
11240 * lex.c (retrofit_lang_decl): Likewise.
11241 * mangle.c (mangle_decl_string): Don't mangle the names of
11242 variables declared with C language linkage.
11243 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11245 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
11247 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
11248 flag_access_control from uninitialized storage.
11250 2001-04-15 Mark Mitchell <mark@codesourcery.com>
11252 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
11253 * mangle.c (write_pointer_to_member_type): Fix mangling of
11254 pointers to cv-qualified member function types.
11256 * init.c (build_delete): Create a SAVE_EXPR for the address if
11257 we're going to use it more than once.
11259 2001-04-13 Mark Mitchell <mark@codesourcery.com>
11261 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
11262 (expand_ptremfunc_cst): Change prototype.
11263 (delta2_from_ptrmemfunc): Remove.
11264 * expr.c (cplus_expand_constant): Adjust call to
11265 expand_ptrmemfunc_cst.
11266 * typeck.c (build_ptrmemfunc1): Simplify.
11267 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
11268 results in a constant.
11269 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
11270 (delta2_from_ptrmemfunc): Remove.
11271 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11273 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
11275 * cp-tree.h (decl_namespace_list): New macro.
11276 (struct saved_scope): Add decl_ns_list.
11277 * decl.c (mark_saved_scope): Mark it.
11278 * decl2.c: Lose static decl_namespace_list.
11279 (init_decl2): Don't save it.
11281 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11283 * cp-tree.h (warn_return_type, yylex): Delete redundant
11286 * decl.c (current_class_depth, global_namespace): Likewise.
11288 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
11290 * repo.c (flag_use_repository): Likewise.
11292 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11294 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
11295 set_block, pushdecl, getdecls, gettags, init_decl_processing,
11296 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
11297 lvalue_or_else, print_lang_statistics, comp_target_types,
11298 unsigned_type, signed_type, signed_or_unsigned_type,
11299 build_function_call, mark_addressable, incomplete_type_error):
11300 Delete redundant declarations.
11302 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
11304 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
11305 (TYPE_ANONYMOUS_P): New macro.
11306 (TAGGED_TYPE_P): New macro.
11307 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
11308 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
11309 * tree.c (no_linkage_helper): Likewise.
11310 * semantics.c (begin_class_definition): Likewise.
11311 * pt.c (convert_template_argument): Likewise.
11312 * lex.c (check_for_missing_semicolon): Likewise.
11314 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11316 * class.c (dfs_unshared_virtual_bases): New function.
11317 (mark_primary_bases): Call it.
11318 (check_bases): Ignore virtual bases when determining
11321 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11323 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
11325 2001-04-11 Mark Mitchell <mark@codesourcery.com>
11327 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
11328 cloned function to the clone.
11330 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11332 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
11334 * semantics.c: Include expr.h.
11336 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
11338 * method.c (implicitly_declare_fn): Commonize code for copy ctor
11339 and assignment op. Set TREE_USED for parameter.
11341 2001-04-10 Mark Mitchell <mark@codesourcery.com>
11343 * class.c (find_final_overrider_data): Add `candidates'.
11344 (dfs_find_final_overrider): Don't issue error messages
11346 (find_final_overrider): Issue error messages here.
11347 (build_base_field): Don't warn about amgibuous direct bases here.
11348 (warn_about_ambiguous_direct_bases): New function.
11349 (layout_class_type): Use it.
11351 2001-04-10 Richard Henderson <rth@redhat.com>
11353 * typeck.c (build_array_ref): Push the array reference inside
11354 COMPOUND_EXPR and COND_EXPR.
11356 2001-04-05 Mark Mitchell <mark@codesourcery.com>
11358 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
11359 * decl.c (duplicate_decls): Adjust accordingly.
11360 (maybe_commonize_var): Likewise.
11361 (grokfndecl): Likewise.
11362 (start_function): Likewise.
11363 (start_method): Likewise.
11364 * decl2.c (key_method): Likewise.
11365 (import_export_decl): Likewise.
11366 * method.c (implicitly_declare_fn): Likewise.
11367 * optimize.c (maybe_clone_body): Likewise.
11369 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
11371 * lang-specs.h: Add __DEPRECATED.
11373 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
11375 * search.c (get_dynamic_cast_base_type): When building a new
11376 constant, set its type to ssizetype.
11378 2001-04-04 Jakub Jelinek <jakub@redhat.com>
11380 * optimize.c (expand_call_inline): Only add newly inlined statements
11381 into inlined_stmts.
11383 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11385 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
11386 (OPERATOR_FORMAT): Likewise.
11387 (OPERATOR_TYPENAME_FORMAT): Likewise.
11388 * operators.def: Remove old name-mangling information.
11389 * decl.c (grok_op_properties): Adjust accordingly.
11390 * lex.c (init_operators): Likewise.
11391 * rtti.c (get_tinfo_decl): Issue error messages about types that
11392 have variable size.
11394 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11396 * decl2.c (import_export_decl): Don't call import_export_class
11397 when processing an inline member function.
11398 * semantics.c (expand_body): Call import_export_decl before
11399 emitting inline functions.
11401 2001-03-28 Richard Henderson <rth@redhat.com>
11403 IA-64 ABI Exception Handling:
11404 * cp-tree.def (EH_SPEC_BLOCK): New.
11405 (MUST_NOT_THROW_EXPR): New.
11406 * cp-tree.h: Update changed function declarations.
11407 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11408 (CPTI_CALL_UNEXPECTED): New.
11409 (struct cp_language_function): Rename x_eh_spec_try_block
11410 to x_eh_spec_block.
11411 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11412 * decl.c (current_binding_level): If no current function
11413 bindings, revert to scope_chain.
11414 (initialize_predefined_identifiers): Remove __cp_push_exception.
11415 (store_parm_decls): Use begin_eh_spec_block.
11416 (finish_function): Use finish_eh_spec_block.
11417 (mark_lang_function): Update for name changes.
11418 * decl2.c (finish_file): No mark_all_runtime_matches.
11419 * dump.c (cp_dump_tree): Handle new tree codes.
11420 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11421 * except.c (catch_language_init, catch_language): Remove.
11422 (init_exception_processing): Don't set language code.
11423 Initialize call_unexpected_node, protect_cleanup_actions,
11424 eh_personality_libfunc, lang_eh_runtime_type.
11425 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11426 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11427 (prepare_eh_type): Split out type canonicalizations ...
11428 (build_eh_type_type): ... from here.
11429 (build_eh_type_type_ref): Remove.
11430 (mark_all_runtime_matches): Remove.
11431 (build_exc_ptr): New.
11432 (do_begin_catch, do_end_catch): New.
11433 (do_pop_exception): Remove.
11434 (build_terminate_handler): Remove.
11435 (choose_personality_routine): Split out language choice from ...
11436 (initialize_handler_parm): ... here.
11437 Use MUST_NOT_THROW_EXPR.
11438 (expand_start_catch_block): Use do_begin_catch. Simplify Java
11439 exception object handling.
11440 (expand_start_eh_spec, expand_end_eh_spec): Remove.
11441 (expand_exception_blocks, alloc_eh_object): Remove.
11442 (begin_eh_spec_block, finish_eh_spec_block): New.
11443 (do_allocate_exception, do_free_exception): New.
11444 (expand_throw): Merge into ...
11445 (build_throw): ... here. Update for abi.
11446 * expr.c (cplus_expand_expr): No expand_internal_throw.
11447 Handle MUST_NOT_THROW_EXPR.
11448 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11449 * semantics.c (*) Update for except.h name changes.
11450 (genrtl_try_block): No protect_with_terminate.
11451 (genrtl_eh_spec_block): New.
11452 (genrtl_handler): Don't emit the goto here.
11453 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11454 (genrtl_finish_function): Don't expand_exception_blocks.
11455 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11457 2001-03-28 Richard Henderson <rth@redhat.com>
11459 * decl.c (struct named_label_list): Rename eh_region to
11460 in_try_scope, add in_catch_scope.
11461 (struct binding_level): Rename eh_region to is_try_scope,
11462 add is_catch_scope.
11463 (note_level_for_try): Rename from note_level_for_eh.
11464 (note_level_for_catch): New.
11465 (poplevel): Copy both is_try_scope and is_catch_scope to
11466 the named_label_list struct.
11467 (check_previous_goto_1): Don't check for catch block via
11468 DECL_ARTIFICIAL; use in_try_scope instead.
11469 (check_goto): Likewise.
11470 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11471 * except.c (expand_start_catch_block): Call note_level_for_catch.
11472 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11474 2001-03-27 Richard Henderson <rth@redhat.com>
11476 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11477 exceptions_via_longjmp.
11479 2001-03-27 Phil Edwards <pme@sources.redhat.com>
11481 * pt.c (check_default_tmpl_args): Make error messages clearer.
11483 2001-03-26 Phil Edwards <pme@sources.redhat.com>
11485 * error.c: Also undefine 'A' macro used for cp_printers definition.
11487 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11489 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11491 2001-03-26 Mike Yang <yang@research.att.com>
11492 Mark Mitchell <mark@codesourcery.com>
11494 * dump.c (dump_access): New function.
11495 (cp_dump_tree): Use it. Dump basetype information for class
11498 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11500 * Makefile.in (optimize.o): Depend on params.h.
11501 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11502 (init_decl_processing): Set flag_no_inline when doing
11504 * optimize.c: Include params.h.
11505 (struct inline_data): Improve documentation of FNS. Add
11506 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11507 (INSNS_PER_STMT): New macro.
11508 (remap_block): Use CLONING_P.
11509 (inlinable_function_p): Don't inline big functions.
11510 (expand_call_inline): Keep track of how much inlining we've done.
11511 (optimize_function): Set FIRST_INLINED_FN.
11512 (maybe_clone_body): Set CLONING_P.
11513 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11515 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11516 rest_of_compilation. Clear DECL_RTL for local variables
11518 (clear_decl_rtl): New function.
11520 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
11523 * cp-tree.h (skip_type_access_control,
11524 reset_type_access_control): Prototype.
11525 * decl.c (grokdeclarator): Access of friends is not checked.
11526 * parse.y (component_decl_list): Reset type access control.
11527 * semantics.c (decl_type_access_control): Clear
11528 current_type_lookups.
11529 (save_type_access_control): Don't save if not deferring.
11530 (skip_type_access_control, reset_type_access_control): New
11532 (begin_class_definition): Do type access control for basetypes.
11533 Start deferred access control.
11534 (finish_class_definition): Resume immediate access control if
11535 this is a local class.
11537 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11539 * class.c (add_method): Use memcpy/memmove, not bcopy.
11541 * decl.c (duplicate_decls): Likewise.
11543 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11545 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11548 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11550 * decl.c (local_names): Define.
11551 (push_local_name): New.
11552 (grok_reference_init): Return init if initializing static reference
11553 variable with non-constant instead of emitting it.
11554 Move expand_static_init call to cp_finish_decl.
11555 (layout_var_decl): Call push_local_name.
11556 (maybe_commonize_var): Allow inlining functions even if they have
11557 static local variables, use comdat_linkage for them if flag_weak.
11558 (check_initializer): Call obscure_complex_init if
11559 grok_reference_init returned nonzero.
11560 (save_function_data): Clear x_local_names.
11561 (pop_cp_function_context): Free x_local_names.
11562 (mark_inlined_fns): Remove.
11563 (mark_lang_function): Mark x_local_names.
11564 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11565 Mark inlined_fns as tree, remove call to mark_inlined_fns.
11566 * class.c (alter_access): Ensure DECL_ACCESS is never set if
11567 DECL_DISCRIMINATOR_P.
11568 * cp-tree.h (cp_language_function): Add x_local_names.
11569 (lang_decl_flags): Add discriminator into u2.
11570 (lang_decl_inlined_fns): Remove.
11571 (lang_decl): inlined_fns is now a TREE_VEC.
11572 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11573 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11574 TREE_VEC, not a custom structure.
11575 (optimize_function): Likewise.
11576 * mangle.c (discriminator_for_local_entity): Discriminate among
11577 VAR_DECL local entities.
11578 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
11581 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
11583 Add support for Java interface method calls.
11584 * cp-tree.h (struct lang_type): Add java_interface flag.
11585 (TYPE_JAVA_INTERFACE): New macro.
11586 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
11587 by setting TYPE_JAVA_INTERFACE.
11588 * call.c (java_iface_lookup_fn): New static.
11589 (build_over_call): If calling a method declared in a
11590 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
11591 expression which resolves the function address.
11592 (build_java_interface_fn_ref): New function.
11594 2001-03-22 Richard Henderson <rth@redhat.com>
11596 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
11597 * except.c: Don't include it.
11599 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11600 based on an idea from Joe Buck <jbuck@synopsys.com>
11602 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
11604 (data_def, component_decl): Add reductions to bad_decl.
11606 2001-03-22 Jakub Jelinek <jakub@redhat.com>
11608 * method.c (do_build_assign_ref): Don't use build_modify_expr for
11609 anonymous aggregates, since they don't have assignment operator
11611 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
11612 assignment operators for anonymous structure fields.
11614 2001-03-21 Jason Merrill <jason@redhat.com>
11616 * pt.c (instantiate_decl): Abort if we see a member constant
11617 instantiation that doesn't already have its initializer.
11618 Downgrade explicit instantiation without definition to pedwarn.
11620 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
11621 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
11622 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
11624 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
11625 (pending_vtables): Remove.
11626 * decl2.c (pending_vtables): Remove.
11627 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
11628 CLASSTYPE_VTABLE_NEEDS_WRITING.
11629 (import_export_class): Likewise.
11630 (init_decl2): Don't mark pending_vtables.
11631 * lex.c (handle_pragma_vtable): Just sorry.
11632 * pt.c (instantiate_class_template): Don't mess with
11633 CLASSTYPE_VTABLE_NEEDS_WRITING.
11634 (mark_class_instantiated): Likewise.
11635 * ptree.c (print_lang_type): Don't print it.
11636 * semantics.c (begin_class_definition): Don't set it.
11638 * pt.c (template_tail): Replace with last_pending_template.
11639 (maybe_templates, maybe_template_tail): Remove.
11640 (add_pending_template): Adjust.
11641 (instantiate_pending_templates): Adjust.
11643 * cp-tree.h (struct saved_scope): Remove lang_stack field.
11644 (current_lang_stack): Remove.
11645 * decl.c (maybe_push_to_top_level): Don't initialize it.
11646 (duplicate_decls): Use current_lang_depth.
11647 (xref_basetypes): Likewise.
11648 * class.c (current_lang_depth): New fn.
11649 (push_lang_context): Use more varray functionality.
11650 (pop_lang_context): Likewise.
11652 * error.c (GLOBAL_THING): Always use '__'.
11654 2001-03-21 Mark Mitchell <mark@codesourcery.com>
11656 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11658 * mangle.c (mangle_decl_string): Mangle the names of overloaded
11659 operators, even when they have `extern "C"' linkage.
11661 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11663 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11664 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11665 where it's not necessary.
11666 (add_method): Remove optimization involving comparison of
11667 DECL_ASSEMBLER_NAME.
11668 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11669 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11670 where it's not necessary.
11671 (check_methods): Likewise.
11672 (build_clone): Likewise.
11673 (built_vtt): Likewise.
11674 * cp-tree.h (DECL_NEEDED_P): Likewise.
11675 * decl.c (pushtag): Likewise.
11676 (duplicate_decls): Likewise.
11677 (pushdecl): Likewise.
11678 (builtin_function): Likewise.
11679 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11680 (build_cp_library_fn): Likewise.
11681 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11682 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11683 where it's not necessary.
11684 (make_rtl_for_nonlocal_decl): Likewise.
11685 (cp_finish_decl): Likewise.
11686 (grokfndecl): Likewise.
11687 (grokvardecl): Likewise.
11688 (grokdeclarator): Likewise.
11689 (start_function): Likewise.
11690 (cp_missing_return_ok_p): Likewise.
11691 * decl2.c (grokclassfn): Likewise.
11692 (check_classfn): Likewise.
11693 (finish_static_data_member_decl): Likewise.
11694 (grokfield): Likewise.
11695 * error.c (GLOBAL_IORD_P): Remove.
11696 (dump_global_iord): Improve output.
11697 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11698 * except.c (nothrow_libfn_p): Summarily reject any function not in
11700 * init.c (build_java_class_ref): Don't explicitly set
11701 DECL_ASSEMBLER_NAME after calling mangle_decl.
11702 * mangle.c (mangle_decl_string): Handle extern "C" functions.
11703 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11704 * method.c (set_mangled_name_for_decl): Don't explicitly set
11705 DECL_ASSEMBLER_NAME after calling mangle_decl.
11706 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11707 IDENTIFIER_GLOBAL_VALUE for the thunk.
11708 * pt.c (set_mangled_name_for_template_decl): Remove.
11709 (check_explicit_specialization): Don't use it.
11710 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11711 (tsubst_friend_function): Likewise.
11712 (tsubst_decl): Likewise.
11713 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11714 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11715 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11716 where it's not necessary.
11717 (tinfo_base_init): Likewise.
11718 (create_real_tinfo_var): Likewise.
11719 * search.c (looup_field_1): Likewise.
11720 * semantics.c (finish_named_return_value): Likewise.
11721 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11723 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
11725 Correct semantics restrictions checking in throw-expression.
11726 * except.c (is_admissible_throw_operand): New function.
11727 (build_throw): Use it.
11729 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11731 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11734 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11736 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11737 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11738 * decl.c (duplicate_decls): Likewise.
11739 (builtin_function): Likewise.
11740 (build_library_fn): Likewise.
11741 (build_cp_library_fn): Likewise.
11742 (check_initializer): Likewise.
11743 (cp_finish_decl): Likewise.
11744 * decl2.c (grokfield): Likewise.
11745 (grok_function_init): Remove #if 0'd code.
11746 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11747 * friend.c (do_friend): Likewise.
11748 * init.c (get_temp_regvar): Likewise.
11749 * method.c (make_thunk): Likewise.
11750 * pt.c (tsubst_friend_function): Likewise.
11751 (tsubst_decl): Likewise.
11752 (regenerate_decl_from_template): Likewise.
11753 * semantics.c (genrtl_named_return_value): Likewise.
11754 (expand_body): Likewise.
11755 (genrtl_finish_function): Likewise.
11756 * tree.c (cp_tree_equal): Likewise.
11758 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
11760 * call.c (convert_like_real): Add extra semantics to INNER
11761 parameter. Don't convert to temporary if a user conversion
11762 gives us an lvalue that we're about to bind to a reference.
11763 Set INNER to indicate pending reference binding on recursive
11766 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11768 * cp/lex.c: Delete duplicate pending_lang_change.
11770 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11772 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11774 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11775 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11777 2001-03-09 Zack Weinberg <zackw@stanford.edu>
11779 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11781 2001-03-08 Stan Shebs <shebs@apple.com>
11783 * cp-tree.h (set_identifier_local_value): Remove unused decl.
11785 2001-03-06 Zack Weinberg <zackw@stanford.edu>
11787 * spew.c: Remove references to CPP_OSTRING.
11789 2001-03-06 Andrew Haley <aph@redhat.com>
11791 * typeck.c (convert_arguments): Check that we have an fndecl.
11793 2001-03-05 Andrew Haley <aph@redhat.com>
11795 * typeck.c (convert_arguments): Don't do ellipsis conversion for
11796 __built_in_constant_p.
11798 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11800 * typeck.c (build_static_cast): Allow enum to enum conversions
11803 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11805 * class.c (check_field_decls): Pointers to member do not a
11806 non-pod struct make, as per DR 148.
11808 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11810 * call.c (joust): cp_pedwarn when using gnu extension concerning
11811 worst conversion sequences.
11813 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11815 * decl.c: Replace all uses of 'boolean' with 'bool'.
11817 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11819 * lang-specs.h: Add zero initializer for cpp_spec field to
11820 all array elements that need one. Don't put an #ifdef inside
11821 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
11824 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11826 Implement using decls inside template functions.
11827 * decl2.c (validate_nonmember_using_decl): Don't special case
11828 fake_std_node in the global namespace. Don't reject early when
11829 processing a template.
11830 (do_local_using_decl): Add to statement tree. Don't do further
11831 processing when building a template.
11832 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
11834 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11836 * decl2.c (do_nonmember_using_decl): Don't complain if we find
11837 same function. Do complain about ambiguating extern "C"
11840 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
11842 Remove floating point and complex type template constant parms.
11843 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
11844 COMPLEX_TYPE extensions.
11845 (invalid_nontype_parm_type_p): Likewise.
11847 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
11849 * except.c (call_eh_info): Revert "match_function"'s type.
11851 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
11853 Fix ctor vtable vcall offsets.
11854 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
11855 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
11856 (get_matching_base): Remove.
11857 (get_original_base): New function.
11858 (build_vtbl_initializer): Initialize vid.rtti_binfo.
11859 Use a virtual thunk for a ctor vtable with an index
11860 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
11861 primary base within a constructor vtable. Only set
11862 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
11863 when primary base has been lost.
11864 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
11866 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
11868 * call.c (joust): Ensure more_specialized()'s argument length
11869 parameter has correct value for constructors.
11871 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
11873 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11875 * decl.c (mark_inlined_fns): Prototype.
11877 2001-02-22 Mark Mitchell <mark@codesourcery.com>
11879 * spew.c (yylex): Correct handling of friends.
11881 2001-02-22 Mark Mitchell <mark@codesourcery.com>
11883 * mangle.c (write_encoding): Pass write_function_type the
11884 FUNCTION_DECL for the function being encoded.
11885 (write_function_type): Pass it along to write_bare_function_type.
11886 (write_bare_function_type): Pass it along to write_method_parms.
11887 (write_method_parms): Don't mangle the compiler-generated
11888 parameters to a constructor or destructor.
11890 2001-02-22 Andreas Jaeger <aj@suse.de>
11892 * optimize.c: Include toplev.h for
11893 note_deferral_of_defined_inline_function prototype.
11895 2001-02-22 Jakub Jelinek <jakub@redhat.com>
11897 * cp-tree.h (struct lang_decl_inlined_fns): New.
11898 (struct lang_decls): Add inlined_fns.
11899 (DECL_INLINED_FNS): New macro.
11900 * optimize.c (struct inline_data): Add inlined_fns.
11901 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
11902 (inlinable_function_p): Likewise, fix typo in comment,
11903 function is not inlinable if it already inlined function currently
11905 (expand_call_inline): Add fn to inlined_fns if necessary.
11906 (optimize_function): Initialize inlined_fns.
11907 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
11908 * decl.c (mark_inlined_fns): New function.
11909 (lang_mark_tree): Call it.
11911 2001-02-21 Jason Merrill <jason@redhat.com>
11913 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
11914 (DECL_UNINLINABLE): Move to middle-end.
11916 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
11917 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
11918 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
11919 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
11920 parms and outer BLOCK. note_deferral_of_defined_inline_function.
11922 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
11923 second parm of op=.
11925 2001-02-19 Mark Mitchell <mark@codesourcery.com>
11927 * decl2.c (set_decl_namespace): Allow explicit instantiations in
11930 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11932 * optimize.c (expand_call_inline): Don't walk subtrees of type
11935 2001-02-18 Mark Mitchell <mark@codesourcery.com>
11937 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
11940 2001-02-18 Jason Merrill <jason@redhat.com>
11942 Do put the VTT parameter in DECL_ARGUMENTS.
11943 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
11944 (current_vtt_parm): New macro.
11945 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
11946 (DECL_HAS_VTT_PARM_P): New macro.
11947 (DECL_VTT_PARM): Remove.
11948 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
11949 * decl.c (duplicate_decls): Only copy the operator code if
11951 (start_function): Set current_vtt_parm.
11952 (lang_mark_tree): Don't mark vtt_parm.
11953 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
11954 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
11955 * class.c (build_clone): Maybe remove the VTT parm.
11956 * optimize.c (maybe_clone_body): Set up the VTT parm.
11957 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
11958 * call.c (build_over_call): Just allow the VTT arg.
11959 * method.c (make_thunk): Don't set DECL_VTT_PARM.
11960 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
11961 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
11962 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
11963 * error.c (dump_function_decl): Likewise.
11964 * call.c (build_user_type_conversion_1, convert_like_real): Abort
11965 if we try to call a constructor with in-charge or VTT parms.
11966 * method.c (skip_artificial_parms_for): New fn.
11967 * call.c (add_function_candidate, build_over_call): Call it.
11968 * call.c (build_new_method_call): Use current_vtt_parm.
11969 * init.c (expand_virtual_init): Likewise.
11970 * class.c (same_signature_p): No longer static.
11971 * cp-tree.h: Declare it.
11972 * search.c (look_for_overrides_r): Use it.
11974 2001-02-17 Mark Mitchell <mark@codesourcery.com>
11976 * cp-tree.h (new_abi_rtti_p): Remove.
11977 (name_mangling_version): Likewise.
11978 (flag_do_squangling): Likewise.
11979 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
11980 * decl.c (grokfndecl): Likewise.
11981 * decl2.c (name_mangling_version): Remove.
11982 (flag_do_squangling): Likewise.
11983 (lang_f_options): Remove `squangle'.
11984 (unsupported_options): Add `squangle'.
11985 (cxx_decode_option): Issue a warning about uses of
11986 -fname-mangling-version.
11987 (finish_file): Remove old ABI support.
11988 * pt.c (check_explicit_specialization): Likewise.
11989 (tsubst_decl): Likewise.
11990 * rtti.c (init_rtti_processing): Likewise.
11991 (build_headof): Likewise.
11992 (get_tinfo_decl_dynamic): Likewise.
11993 (tinfo_from_decl): Likewise.
11994 (build_dynamic_cast_1): Likewise.
11995 (synthesize_tinfo_var): Likewise.
11996 * init.c (build_new): Allow enumeration types for the array-bounds
11997 in a direct-new-declarator.
11999 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12001 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12002 TREE_PROTECTED from the template being specialized.
12004 2001-02-17 Jason Merrill <jason@redhat.com>
12006 * decl2.c (build_artificial_parm): Set TREE_READONLY.
12008 * decl.c (bad_specifiers): Allow throw specs on things with
12009 pointer-to-function or -member-function type.
12010 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12013 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12015 * call.c (check_dtor_name): Handle template names correctly.
12017 2001-02-16 Jason Merrill <jason@redhat.com>
12019 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12020 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12021 * optimize.c (maybe_clone_body): Don't substitute it.
12022 * call.c (build_new_method_call): Check in_chrg instead.
12023 * init.c (expand_virtual_init): Likewise.
12025 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
12027 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12028 class-type introduces at least a type-name.
12030 2001-02-16 Jakub Jelinek <jakub@redhat.com>
12032 * call.c (convert_like_real): Create a temporary for non-lvalue.
12034 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
12036 * cp-tree.h: Fix typos in comments.
12038 2001-02-16 Jason Merrill <jason@redhat.com>
12040 * optimize.c (remap_block): If we're compiling a clone, pass the
12041 new block to insert_block.
12043 2001-02-16 Mark Mitchell <mark@codesourcery.com>
12045 * semantics.c (finish_asm_stmt): Robustify.
12047 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12049 * pt.c (push_template_decl_real): Don't remangle the name of a
12052 2001-02-15 Jim Meyering <meyering@lucent.com>
12054 * Make-lang.in (c++.install-common): Depend on installdirs.
12055 (c++.install-info): Likewise.
12056 (c++.install-man): Likewise.
12058 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12060 * typeck2.c (build_m_component_ref): Robustify.
12062 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
12064 * friend.c (do_friend): Don't take the nested [template] class
12065 into account when deciding whether to warn about the friend
12066 function not referring to a template function.
12068 2001-02-14 Jakub Jelinek <jakub@redhat.com>
12070 * typeck.c (build_unary_op): Clarify error message.
12072 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
12074 * parse.y (component_constructor_declarator): allow optional
12075 parentheses around constructor class name.
12077 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12079 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12081 * init.c (emit_base_init): Remove incorrect comment about
12083 * method.c (make_thunk): Fix comment alignment.
12085 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12087 Kill remnants of this is variable.
12088 * cp-tree.h (flag_this_is_variable): Remove.
12089 * decl2.c (flag_this_is_variable): Remove.
12090 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12091 (build_vbase_path): The path is non-static, even in a cdtor.
12092 (resolves_to_fixed_type_p): Add additional return value.
12093 * search.c (init_vbase_pointers): Adjust.
12094 * tree.c (lvalue_p_1): Adjust.
12095 * typeck.c (mark_addressable): Adjust.
12097 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12099 * pt.c (unify): Don't check cv quals of array types.
12101 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12103 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12104 check whether we already have the type.
12106 2001-02-13 Mark Mitchell <mark@codesourcery.com>
12108 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12109 * call.c (build_op_delete_call): Simplify to remove duplicate
12111 * class.c (clone_function_decl): Don't build the deleting variant
12112 of a non-virtual destructor.
12113 * decl.c (finish_destructor_body): Don't call delete if this is a
12114 non-virtual destructor.
12115 * init.c (build_delete): Explicitly call `operator delete' when
12116 deleting an object with a non-virtual destructor.
12118 2001-02-13 Jason Merrill <jason@redhat.com>
12120 * lang-specs.h: Add more __EXCEPTIONS.
12122 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12124 * typeck2.c (process_init_constructor): Check
12125 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12127 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12129 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12130 Remove spurious information in comment. Allow further
12131 adjustments of REFERENCE_TYPE args.
12133 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12135 * errfn.c (cp_deprecated): Tweak diagnostic text.
12136 * parse.y (new_initializer): Deprecate initializer lists
12139 2001-02-12 Mark Mitchell <mark@codesourcery.com>
12141 Remove old ABI support.
12143 2001-02-11 Mark Mitchell <mark@codesourcery.com>
12145 * decl2.c (flag_vtable_thunks): Always set it to 1.
12146 (flag_new_abi): Likewise.
12147 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12149 * Makefile.in (g++spec.o): Fix typo.
12151 2001-02-09 Jason Merrill <jason@redhat.com>
12153 * lang-specs.h: Restore definition of __EXCEPTIONS.
12155 2001-02-08 Jason Merrill <jason@redhat.com>
12157 * search.c (shared_member_p): New function.
12158 (lookup_field_r): Use it.
12159 * cp-tree.h (SHARED_MEMBER_P): Remove.
12161 * method.c (process_overload_item): Handle template-dependent array
12163 * pt.c (type_unification_real): If we end up with undeduced nontype
12166 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
12169 * typeck2.c (friendly_abort): Don't say anything if we have
12170 earlier errors or sorries.
12172 * decl.c (check_tag_decl): Notice attempts to redefine bool and
12173 wchar_t. Ignore if in_system_header.
12175 * decl.c (maybe_push_cleanup_level): New fn...
12176 (start_decl_1): ...split out from here.
12177 * cvt.c (build_up_reference): Use it.
12178 * cp-tree.h: Declare it.
12180 2001-02-07 Mark Mitchell <mark@codesourcery.com>
12182 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
12185 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
12187 * pt.c (lookup_template_class): Make sure it's a primary
12188 template or template_template_parm when called from the parser.
12189 (instantiate_template_class): Add assertion.
12191 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
12193 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
12194 from error_mark_node.
12196 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
12198 Fix specification and implementation bugs in V3 ABI
12199 construction vtables.
12200 * cp-tree.h (flag_dump_class_layout): New flag.
12201 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
12202 (BINFO_LOST_PRIMARY_P): New flag.
12203 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
12204 (BINFO_PRIMARY_MARKED_P): Rename to ...
12205 (BINFO_PRIMARY_P): ... here.
12206 (binfo_via_virtual): New prototype.
12207 * decl2.c (flag_dump_class_layout): New flag.
12208 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
12209 use `=' as a file name separator.
12210 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
12212 (build_vtbl_address): If this is a virtual primary base, then
12213 get the vtbl of what it is ultimately primary for.
12214 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
12215 for BINFO_PRIMARY_P.
12216 (dfs_skip_nonprimary_vbases_markedp): Likewise.
12217 (get_shared_vbase_if_not_primary): Likewise.
12218 (dfs_get_pure_virtuals): Likewise.
12219 (expand_upcast_fixups): Likewise.
12220 (fixup_virtual_upcast_offsets): Likewise.
12221 (dfs_find_vbase_instance): Likewise.
12222 (find_vbase_instance): Likewise.
12223 (binfo_from_vbase): Adjust comment to reflect reality.
12224 (binfo_via_virtual): New function.
12225 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
12226 for binfo walking during VTT construction.
12227 (dfs_mark_primary_bases): Remove.
12228 (force_canonical_binfo_r): New function.
12229 (force_canonical_binfo): New function.
12230 (mark_primary_virtual_base): New function.
12231 (mark_primary_bases): Walk in inheritance graph order, use
12232 mark_primary_virtual_base.
12233 (determine_primary_base): Use some more intermediate variables.
12234 (dfs_find_final_overrider): Don't check for overriding along a
12236 (dfs_modify_vtables): Walk into primary virtual bases too.
12237 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
12238 (build_base_fields): Likewise.
12239 (dfs_set_offset_for_unshared_vbases): Likewise.
12240 (layout_virtual_bases): Likewise.
12241 (end_of_class): Likewise.
12242 (finish_struct_1): Call dump_class_hierarchy, if requested.
12243 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
12244 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
12245 (dump_class_hierarchy): Add file parameter. Append to file, if
12247 (finish_vtbls): Adjust accumulate_vtbl_inits call.
12248 Use canonical base for virtual bases.
12249 (build_vtt): Add more comments. Adjust build_vtt_inits call.
12250 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
12251 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
12252 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
12254 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
12255 from DATA. We want virtual primary bases and all bases via virtual.
12256 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
12257 virtual base when not a construction vtable.
12258 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
12259 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
12260 Use canonical bases when processing virtual bases.
12261 (accumulate_vtbl_inits): We're interested in any base via a
12263 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
12264 within a construction vtable, determine what is being overridden.
12265 (build_vtbl_initializer): Add more comments
12266 (add_vcall_offset_vtbl_entries_1): Adjust comment.
12267 (build_rtti_vtbl_entries): Check if the base has lost its
12270 2001-02-05 Mark Mitchell <mark@codesourcery.com>
12272 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
12274 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12276 * decl.c (pushdecl): Call abort instead of fatal.
12277 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
12278 * init.c (build_new_1): Likewise.
12279 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
12280 * decl.c (build_typename_type): hash_table_init now returns void.
12281 decl.c (init_decl_processing): Make an error non-fatal.
12283 2001-02-04 Mark Mitchell <mark@codesourcery.com>
12285 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
12287 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
12288 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
12289 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
12290 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
12291 * decl.c (maybe_commonize_var): Use the new name-mangling where
12293 * decl2.c (comdat_linkage): Enhance comments. Make all
12294 compiler-generated things static, if COMDAT is not available.
12295 (get_tinfo_decl): Do not make typeinfo objects that belong in the
12297 (tinfo_base_init): Use the correct mangled name for typeinfo
12298 strings, and push them into the global scope.
12299 (typeinfo_in_lib_p): New function.
12300 (synthesize_tinfo_var): Use it.
12301 (create_real_tinfo_var): Likewise.
12303 2001-02-03 Jakub Jelinek <jakub@redhat.com>
12305 * decl.c (push_class_binding): Use context_for_name_lookup instead
12306 of CP_DECL_CONTEXT.
12307 * search.c (context_for_name_lookup): Remove static. Check for NULL
12308 context in the loop.
12309 * cp-tree.h (context_for_name_lookup): Add prototype.
12311 2001-02-02 Jakub Jelinek <jakub@redhat.com>
12313 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
12314 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
12316 * call.c (convert_class_to_reference, build_user_type_conversion_1,
12317 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
12319 2001-02-02 Mark Mitchell <mark@codesourcery.com>
12321 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
12322 of macros used when compiling g++spec.c.
12323 * g++spec.c (lang_specific_driver): Link with the shared
12326 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
12328 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
12329 make_reference_declarator, make_call_declarator), method.c
12330 (implicitly_declare_fn), parse.y (namespace_using_decl,
12331 notype_unqualified_id, expr_or_declarator, new_type_id,
12332 after_type_declarator, direct_after_type_declarator,
12333 notype_declarator, complex_notype_declarator,
12334 complex_direct_notype_declarator, qualified_id,
12335 notype_qualified_id, overqualified_id, direct_new_declarator,
12336 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
12337 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
12338 instead of build_parse_node.
12340 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12342 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
12343 (minus_one_node): Moved to top level gcc directory. Renamed
12344 to integer_minus_one_node.
12346 * init.c (init_init_processing): Don't set minus_one_node.
12347 (build_vec_init): Use integer_minus_one_node.
12349 * rtti.c (get_tinfo_decl_dynamic): Likewise.
12351 2001-01-28 Jakub Jelinek <jakub@redhat.com>
12353 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
12354 identical and they would be replaced with constant, remove
12355 MODIFY_EXPR from the tree.
12357 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12359 * Make-lang.in: Remove all dependencies on defaults.h.
12360 * call.c: Don't include defaults.h.
12361 * decl.c: Likewise.
12362 * decl2.c: Likewise.
12363 * except.c: Likewise.
12365 * rtti.c: Likewise.
12366 * tree.c: Likewise.
12367 * typeck.c: Likewise.
12369 2001-01-25 Jakub Jelinek <jakub@redhat.com>
12371 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
12372 operators even in "C" linkage.
12373 * method.c (set_mangled_name_for_decl): Likewise.
12374 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
12375 overloaded operators in "C" linkage.
12377 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12379 * pt.c (tsubst_decl): Remove IN_DECL parameter.
12380 (tsubst_arg_types): Check parameter is not void.
12381 (tsubst): Adjust tsubst_decl call.
12383 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12385 * call.c (add_builtin_candidate): Quote std properly, from
12388 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12390 * pt.c (check_explicit_specialization): Clone constructors and
12393 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12395 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12396 indicates anything special about template depth. Make sure we
12397 only count the user visible template classes.
12399 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12401 * call.c (build_conv): Typo in comment.
12402 (add_builtin_candidate): Add more explanation.
12403 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12404 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12405 when we have enumeral types.
12406 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12407 candidates for relops and eqops.
12408 (joust): Simplify control flow. Allow a non-template user
12409 function to hide a builtin.
12411 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
12413 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12414 (more_specialized): Add deduction parameter.
12415 * call.c (joust): Adjust more_specialized call.
12416 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12417 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12418 (get_bindings_order): Remove.
12419 (get_bindings_real): Add DEDUCE parameter.
12420 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12421 REFERENCE_TYPE jig for DEDUCE_ORDER.
12422 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12423 maybe_adjust_types_for_deduction.
12424 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12426 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12427 (check_cv_quals_for_unify): Use new unify qualifier flags.
12428 (unify): Clear new unify qualifier flags.
12429 (get_bindings_real): Add DEDUCE parameter.
12430 (get_bindings): Adjust call to get_bindings_real.
12431 (get_bindings_overload): Likewise.
12432 (most_specialized_instantiation): Adjust call to
12435 2001-01-19 Jason Merrill <jason@redhat.com>
12437 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12439 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12442 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
12444 * decl2.c (arg_assoc_class): Fix double iteration logic.
12446 2001-01-19 Jason Merrill <jason@redhat.com>
12448 * init.c (build_delete): Always call convert_force to strip cv-quals.
12450 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12451 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12452 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12454 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12456 * search.c (get_vbase_1): Count only virtual bases.
12458 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12460 * class.c (duplicate_tag_error): Robustify flag clearing.
12462 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12464 * cp-tree.h (lookup_template_class): Add complain parm.
12465 * decl.c (lookup_namespace_name): Adjust call to
12466 lookup_template_class.
12467 (make_typename_type): Likewise.
12468 * semantics.c (finish_template_type): Likewise.
12469 * pt.c (lookup_template_class): Add complain parm. Adjust.
12470 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12471 (tsubst): Likewise.
12473 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12475 * pt.c (copy_default_args_to_explicit_spec): Preserve
12476 object's CV quals. Reorganize.
12478 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12480 * typeck.c (build_modify_expr): Say `initialization' for
12482 * init.c (build_default_init): Convert to enumeral type, if
12485 2001-01-18 Jakub Jelinek <jakub@redhat.com>
12487 * parse.y (nomods_initdcl0): Properly set things up for
12490 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12492 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12493 (type_unification_real): Set it.
12496 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12498 * decl.c (finish_destructor_body): Convert to vbase pointer here.
12500 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12502 * semantics.c (begin_class_definition): Check we're not inside a
12503 template parm list.
12505 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12507 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12510 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12512 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12513 * call.c (build_over_call): Add comment.
12515 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12517 * cvt.c (ocp_convert): Handle vector type conversion
12518 * typeck2.c (digest_init): Handle vector type initializations
12520 2001-01-16 Phil Edwards <pme@sources.redhat.com>
12522 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
12525 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12527 * pt.c (check_nontype_parm): Rename to ...
12528 (invalid_nontype_parm_type_p): ... here.
12529 (process_template_parm): Adjust.
12530 (convert_template_argument): Adjust.
12532 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12534 * pt.c (check_nontype_parm): New function.
12535 (process_template_parm): Use it.
12536 (convert_template_argument): Use it.
12537 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12540 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
12542 * tree.c: Add defaults.h
12543 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12544 * Make-lang.in (cp/tree.o): Add defaults.h.
12546 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12548 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12550 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12552 * g++.1: Change to be ".so man1/gcc.1".
12554 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12556 * Make-lang.in (c++.info, c++.install-info): Build and install g++
12558 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12559 ($(srcdir)/cp/g++int.info): New target.
12560 * gxxint.texi: Add info directory entry. Use @@ in email address.
12561 * .cvsignore: Update.
12563 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12565 * typeck.c (build_c_cast): Do template processing earlier.
12566 Always pedwarn on array casts.
12568 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12570 * friend.c (make_friend_class): Make sure a templated class is
12571 actually a template.
12573 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12575 * decl2.c (get_guard): Set linkage from guarded decl.
12577 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12579 * call.c (convert_default_arg): Check for unprocessed
12581 * cp-tree.h (replace_defarg): Move to spew.c.
12582 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
12583 spew.c, which is where they really are.
12584 (done_pending_defargs): Declare.
12585 (unprocessed_defarg_fn): Declare.
12586 * decl.c (replace_defarg): Move to spew.c
12587 * parse.y (structsp): Call done_pending_defargs.
12588 * spew.c (defarg_fns): Rearrange list structure.
12589 (defarg_fnsdone): New static variable.
12590 (defarg_depfns): New static variable.
12591 (init_spew): Adjust.
12592 (add_defarg_fn): Store the type in TREE_TYPE.
12593 (do_pending_defargs): Detect and deal with ordering constraints
12595 (done_pending_defargs): New function.
12596 (unprocessed_defarg_fn): New function.
12597 (replace_defarg): Moved from decl.c. Robustify. Don't save
12598 if circularity detected.
12600 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12602 * pt.c (unify): Check array has a domain, before checking
12603 whether it is variable sized.
12605 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12607 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
12608 parameters with pointers to arrays of unknown bound.
12610 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12612 * parse.y (template_parm_header, template_spec_header): New
12613 reductions. Split out from ...
12614 (template_header): ... here. Use them.
12615 (template_template_parm): Use template_parm_header.
12616 * semantics.c (finish_template_template_parm): Add assert.
12618 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12620 * mangle.c (write_builtin_type): Fix thinko.
12622 * pt.c (copy_default_args_to_explicit_spec_1): New function.
12623 (copy_default_args_to_explicit_spec): Likewise.
12624 (check_explicit_specialization): Use it.
12626 * class.c (finish_struct_1): Remove last argument in call to
12627 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12628 * decl.c (builtin_function): Likewise.
12629 (build_cp_library_fn): Likewise.
12630 (check_initializer): Likewise.
12631 (make_rtl_for_nonlocal_decl): Likewise.
12632 (cp_finish_decl): Likewise.
12633 (start_function): Likewise.
12634 * decl2.c (finish_anon_union): Likewise.
12635 * friend.c (do_friend): Likewise.
12636 * init.c (build_java_class_ref): Likewise.
12637 * method.c (make_thunk): Likewise.
12638 * pt.c (tsubst_friend_function): Likewise.
12639 * semantics.c (expand_body): Likewise.
12641 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12643 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
12644 looking at DECL_CLONED_FUNCTION for non-functions.
12646 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12648 * error.c (dump_template_parameter): Use parm to determine how
12649 to print default value.
12651 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12653 * class.c (duplicate_tag_error): Clear more flags.
12655 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12657 * call.c (build_new_method_call): Use binfo_for_vbase.
12659 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
12661 * cp-tree.h (flag_cond_mismatch): Don't declare.
12662 * decl2.c (flag_cond_mismatch): Don't define.
12663 (lang_f_options): Remove cond-mismatch.
12664 (unsupported_options): Add cond-mismatch.
12666 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
12668 * class.c (handle_using_decl): Reject using of constructor name
12669 of sourcing class. Allow injecting of a method with same name as
12670 nested class. Fixup error messages.
12672 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
12674 * decl2.c (lang_decode_option): Handle -Wformat=2.
12676 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12678 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12679 initialized_in_class.
12680 (DECL_DEFINED_IN_CLASS_P): Rename to ...
12681 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12682 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12683 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12684 * pt.c (check_default_tmpl_args): Adjust for
12685 DECL_INITIALIZED_IN_CLASS_P.
12686 (instantiate_class_template): Likewise.
12687 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
12689 * class.c (finish_struct): Constify saved_filename.
12691 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12693 * class.c (duplicate_tag_error): Adjust diagnostic.
12694 (finish_struct): Locally set location to start of struct.
12695 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12697 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12699 * decl.c (struct binding_level): Adjust class_shadowed comments
12700 to reflect reality.
12701 (push_class_level_binding): Adjust comments to reflect reality.
12702 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12703 Don't set TREE_VALUE on the class_shadowed list.
12705 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12707 * decl2.c (acceptable_java_type): Allow references too.
12708 * init.c (build_java_class_ref): When using the new ABI, search
12709 `class$' and have it mangled with `mangle_decl.'
12710 * mangle.c (write_java_integer_type_codes): New function.
12711 (write_builtin_type): Detect and mangle Java integer and real
12714 2001-01-07 Mark Mitchell <mark@codesourcery.com>
12716 * decl2.c (grokfield): Don't accept `asm' specifiers for
12717 non-static data members.
12719 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12721 * expr.c (cplus_expand_expr): Don't reset `target'.
12723 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
12725 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
12727 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12729 * parse.y (template_datadef): Check for error_mark_node.
12731 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12733 * cp-tree.def (DEFAULT_ARG): Make `x' class.
12735 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
12737 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12738 (record_builtin_type): Make non-static.
12739 (flag_short_double): Don't declare.
12740 (init_decl_processing): Remove the creation of many tree nodes now
12741 in c_common_nodes_and_builtins.
12742 (build_void_list_node): New function.
12743 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12744 * cp-tree.h (flag_short_wchar): Don't declare.
12746 2001-01-04 Mark Mitchell <mark@codesourcery.com>
12748 * call.c (build_conv): Don't use build1 for USER_CONV.
12749 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12751 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
12753 * lex.c (lang_init): Call c_common_lang_init.
12755 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12757 * search.c (lookup_fnfields_here): Remove.
12758 (look_for_overrides_r): Use lookup_fnfields_1.
12759 Ignore functions from using declarations.
12761 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12763 Implement exceptions specifiers for implicit member functions.
12764 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12765 * method.c (synthesize_exception_spec): New function.
12766 (locate_dtor, locate_ctor, locate_copy): New functions.
12767 (implicitly_declare_fn): Generate the exception spec too.
12768 * search.c (check_final_overrider): Check artificial functions
12770 * typeck2.c (merge_exception_specifiers): New function.
12772 2001-01-03 Jason Merrill <jason@redhat.com>
12774 * init.c (build_default_init): New fn.
12775 (perform_member_init): Split out from here.
12776 (build_new_1): Use it. Simplify initialization logic.
12777 (build_vec_init): Take an array, rather than a pointer and maxindex.
12778 Speed up simple initializations. Don't clean up if we're assigning.
12779 * cp-tree.h: Adjust.
12780 * decl2.c (do_static_initialization): Remove TREE_VEC case.
12781 * parse.y (new_initializer): Return void_zero_node for ().
12782 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12783 * typeck2.c (digest_init): Only complain about user-written
12786 2000-12-22 Mike Stump <mrs@wrs.com>
12788 * decl2.c: (max_tinst_depth): Increase to 50.
12790 2001-01-02 Mark Mitchell <mark@codesourcery.com>
12792 * class.c (invalidate_class_lookup_cache): Zero the
12793 previous_class_values.
12794 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
12796 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
12797 * decl.c (free_bindings): New variable.
12798 (push_binding): Don't create a new binding if we have one on the
12800 (pop_binding): Put old bindings on the free list.
12801 (init_decl_processing): Use size_int, not build_int_2.
12802 Register free_bindings as a GC root.
12803 (cp_make_fname_decl): Use size_int, not build_int_2.
12804 (push_inline_template_parms_recursive): Likewise.
12805 (end_template_parm_list): Likewise.
12806 (for_each_template_parm): Do not use walk_tree_without_duplicates.
12807 (tsubst_template_parms): Use size_int, not build_int_2.
12808 (tsubst): Likewise.
12809 * rtti.c (get_vmi_pseudo_type_info): Likewise.
12811 2001-01-02 Richard Henderson <rth@redhat.com>
12813 * parse.y (asm): Set ASM_INPUT_P.
12815 2001-01-02 Jason Merrill <jason@redhat.com>
12817 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
12820 * typeck.c (cp_truthvalue_conversion): New fn.
12821 * cvt.c (ocp_convert): Use it.
12823 * cp-tree.h: Lose c-common.c decls.
12825 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
12826 * cvt.c (convert_to_void): Use type_unknown_p.
12828 * typeck.c (strip_all_pointer_quals): Also strip quals from
12829 pointer-to-member types.
12831 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
12834 * call.c (build_new_method_call): Do evaluate the object parameter
12835 when accessing a static member.
12836 * typeck.c (build_component_ref): Likewise.
12838 2001-01-02 Andreas Jaeger <aj@suse.de>
12840 * decl.c (cp_missing_noreturn_ok_p): New.
12841 (init_decl_processing): Set lang_missing_noreturn_ok_p.
12843 2000-12-29 Jakub Jelinek <jakub@redhat.com>
12845 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
12847 2000-12-29 Mark Mitchell <mark@codesourcery.com>
12849 * class.c (pushclass): Remove #if 0'd code.
12850 * cp-tree.h (overload_template_name): Remove.
12851 * decl.c (store_bindings): Simplify.
12852 (pop_from_top_level): Likewise.
12853 * pt.c (overload_template_name): Remove.
12854 (instantiate_decl): Don't call push_to_top_level if it's not
12857 2000-12-28 Mark Mitchell <mark@codesourcery.com>
12859 * pt.c (register_local_specialization): Don't return a value.
12860 (lookup_template_class): Use move-to-front heuristic when looking
12861 up template instantiations.
12862 (instantiate_decl): Only push_to_top_level when we're actually
12863 going to instantiate the template.
12865 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
12867 * search.c (binfo_for_vtable): Return least derived class, not
12868 most. Handle secondary vtables.
12870 2000-12-22 Jason Merrill <jason@redhat.com>
12872 * pt.c (more_specialized): Don't optimize len==0.
12873 (fn_type_unification): If we're adding the return type, increase len.
12875 * typeck.c (build_binary_op): Fix pmf comparison logic.
12877 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
12878 DECL_STATIC_FUNCTION_P.
12880 * semantics.c (genrtl_finish_function): Don't try to jump to
12881 return_label unless it exists.
12883 In partial ordering for a call, ignore parms for which we don't have
12885 * call.c (joust): Pass len to more_specialized.
12886 (add_template_candidate_real): Strip 'this', pass len.
12887 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
12888 (get_bindings_order): New fn. Pass len down.
12889 (get_bindings_real): Strip 'this', pass len.
12890 (fn_type_unification): Likewise.
12891 (type_unification_real): Succeed after checking 'len' args.
12892 (most_specialized_instantiation): Lose explicit_args parm.
12893 * class.c (resolve_address_of_overloaded_function): Strip 'this',
12896 2000-12-21 Jason Merrill <jason@redhat.com>
12898 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
12899 DECL_TEMPLATE_RESULT.
12901 * search.c (lookup_field_r): Call lookup_fnfields_1, not
12902 lookup_fnfields_here.
12904 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
12906 * call.c (build_object_call): Also allow conversions that return
12907 reference to pointer to function.
12908 (add_conv_candidate): Handle totype being ref to ptr to fn.
12909 (build_field_call): Also allow members of type reference to function.
12910 Lose support for calling pointer to METHOD_TYPE fields.
12912 * error.c (dump_expr): Handle *_CAST_EXPR.
12914 * typeck2.c (build_scoped_ref): Always convert to the naming class.
12916 * tree.c (break_out_cleanups): Lose.
12917 * cp-tree.h: Remove prototype.
12918 * typeck.c (build_component_ref): Don't break_out_cleanups.
12919 (build_compound_expr): Likewise.
12920 * semantics.c (finish_expr_stmt): Likewise.
12922 2000-12-20 Richard Henderson <rth@redhat.com>
12924 * cp-tree.h: Update declarations.
12925 * decl.c (finish_case_label): Return the new stmt node.
12926 * semantics.c (finish_goto_stmt): Likewise.
12927 (finish_expr_stmt, finish_return_stmt): Likewise.
12928 (finish_break_stmt, finish_continue_stmt): Likewise.
12929 (finish_asm_stmt): Likewise.
12930 * parse.y (already_scoped_stmt): Set STMT_LINENO.
12931 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
12932 (simple_if, simple_stmt): Return the new stmt node.
12933 (save_lineno): New.
12935 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
12937 * cp-tree.h: Don't declare warn_long_long.
12939 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12941 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
12944 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12946 * pt.c (unify): Handle when both ARG and PARM are
12947 BOUND_TEMPLATE_TEMPLATE_PARM.
12949 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12951 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
12952 DECL_TEMPLATE_PARM_P.
12954 2000-12-15 Jason Merrill <jason@redhat.com>
12956 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
12958 * init.c (build_new_1): Don't strip quals from type.
12960 * decl.c (pushdecl): Don't check for linkage on a non-decl.
12962 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
12964 * call.c (build_new_function_call): Lose space before paren in
12966 (build_new_method_call): Likewise.
12968 * typeck2.c (build_m_component_ref): Propagate quals from datum.
12970 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12972 * pt.c (check_explicit_specialization): Propagate default
12973 function arguments to explicit specializations.
12975 2000-12-13 DJ Delorie <dj@redhat.com>
12977 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
12980 2000-12-08 Jason Merrill <jason@redhat.com>
12982 * error.c (dump_function_name): Don't let the user see __comp_ctor.
12984 Clean up copy-initialization in overloading code.
12985 * call.c (build_user_type_conversion_1): Die if we are asked to
12986 convert to the same or a base type.
12987 (implicit_conversion): Avoid doing so. Lose reference binding code.
12988 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
12989 direct-initialization. Also do direct-init part of copy-init.
12990 (build_user_type_conversion): Don't provide context to convert_like.
12991 * cvt.c (ocp_convert): build_user_type_conversion will now provide
12992 the constructor call for copy-init.
12994 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
12995 instantiation of a member template.
12996 (do_decl_instantiation): Not here.
12998 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13000 * class.c (check_field_decls): Don't special case anonymous
13001 fields in error messages.
13002 (note_name_declared_in_class): Use %D on diagnostic.
13004 * tree.c (pod_type_p): Use strip_array_types.
13005 (cp_valid_lang_attribute): Likewise.
13006 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13007 multiple evaluations.
13008 (cp_has_mutable_p): Use strip_array_types.
13010 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13012 * cp-tree.h (sufficient_parms_p): Declare new function.
13013 * call.c (sufficient_parms_p): New function, broken out of ...
13014 (add_function_candidate): ... here. Use it.
13015 (add_conv_candidate): Use it.
13016 * decl.c (grok_ctor_properties): Use it.
13018 2000-12-07 Jakub Jelinek <jakub@redhat.com>
13020 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13022 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
13024 * decl2.c (lang_decode_option): Handle -Wformat-security.
13026 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13028 * pt.c (verify_class_unification): New function.
13029 (get_class_bindings): Use it.
13030 (try_class_unification): Tidy.
13031 (unify): Handle when argument of a template-id is not
13032 template parameter dependent.
13033 (template_args_equal): Handle when TREE_CODE's do not match.
13035 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
13037 * lang-specs.h (c++): When invoking the stand-alone preprocessor
13038 for -save-temps, pass all relevant -Defines to it, and then don't
13039 pass them to cc1plus.
13041 2000-12-05 Will Cohen <wcohen@redhat.com>
13043 * decl.c (finish_case_label): Cleared
13044 more_cleanups_ok in surrounding function scopes.
13045 (define_label): Likewise.
13047 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13049 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13050 (get_matching_virtual): Remove.
13051 (look_for_overrides): Declare new function.
13052 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13054 * class.c (check_for_override): Move base class iteration code
13055 to look_for_overrides.
13056 * search.c (next_baselink): Remove.
13057 (get_virtuals_named_this): Remove.
13058 (get_virtual_destructor): Remove.
13059 (tree_has_any_destructors_p): Remove.
13060 (struct gvnt_info): Remove.
13061 (check_final_overrider): Remove `virtual' from error messages.
13062 (get_matching_virtuals): Remove. Move functionality to ...
13063 (look_for_overrides): ... here, and ...
13064 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13067 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13069 * typeck.c (get_delta_difference): If via a virtual base,
13071 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13074 2000-12-04 Richard Henderson <rth@redhat.com>
13076 * error.c (dump_tree): Use output_add_string not OB_PUTS.
13078 2000-12-04 Jason Merrill <jason@redhat.com>
13080 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13081 (write_builtin_type): Pass intSI_type_node and the like through
13083 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13084 Pass intSI_type_node and the like through type_for_mode.
13085 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13086 * pt.c (tsubst, unify): Likewise.
13087 * tree.c (walk_tree): Likewise.
13088 * error.c (dump_type): Likewise.
13089 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13091 * Make-lang.in: Tweak top comment for emacs.
13092 (cp/TAGS): Restore.
13094 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13096 * class.c (clone_function_decl): Robustify.
13098 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
13100 * decl.c (store_bindings): Only search in the non modified
13101 old_bindings for duplicates.
13103 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
13105 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13106 TYPE_POLYMORPHIC_P.
13108 * typeck.c (build_static_cast): Remove unused variable.
13110 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13112 * pt.c: Fix typo in comment.
13114 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13116 * decl2.c (warn_format): Remove definition.
13117 (lang_decode_option): Handle -Wformat-nonliteral,
13118 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
13120 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13122 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13123 (init_decl_processing): Don't create string_type_node,
13124 const_string_type_node, wint_type_node, intmax_type_node,
13125 uintmax_type_node, default_function_type, ptrdiff_type_node and
13126 unsigned_ptrdiff_type_node. Adjust position of call to
13127 c_common_nodes_and_builtins.
13128 (identifier_global_value): New function.
13130 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
13132 * call.c (standard_conversion): Reject pointer to member
13133 conversions from ambiguous, inaccessible or virtual bases.
13134 * typeck.c (build_static_cast): Don't check pointers to members
13137 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13139 * method.c (do_build_copy_constructor): Preserve cv
13140 qualifications when accessing source object members.
13141 (do_build_assign_ref): Likewise. Remove separate diagnostics for
13144 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13146 * method.c (do_build_assign_ref): Construct appropriately
13147 CV-qualified base reference. Don't allow const casts in base
13150 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13152 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13153 incomplete return type.
13155 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13157 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13158 * semantics.c (finish_base_specifier): Accept a _TYPE not a
13161 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13163 * spew.c (yyerror): Cope if yylval.ttype is NULL.
13165 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13167 * decl.c (grokdeclarator): Diagnose undefined template contexts.
13169 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13171 * decl.c (grokdeclarator): Do type access control on friend
13174 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13176 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
13177 bison parser ickiness.
13178 * pt.c (tsubst_friend_function): Enter namespace scope when
13179 tsubsting the function name.
13180 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
13182 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13184 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
13185 * cvt.c (cp_convert_to_pointer): Add force parameter.
13186 Allow conversions via virtual base if forced.
13187 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
13188 (ocp_convert): Likewise.
13189 * search.c (binfo_from_vbase): Return the virtual base's binfo.
13190 * typeck.c (get_delta_difference): Adjust handling of virtual
13193 2000-11-26 Mark Mitchell <mark@codesourcery.com>
13195 * tree.c (struct list_hash): Remove.
13196 (list_hash_table): Make it be an htab.
13197 (struct list_proxy): New type.
13198 (list_hash_eq): New function.
13199 (list_hash_pieces): Renamed from ...
13200 (list_hash): ... this.
13201 (list_hash_lookup): Remove.
13202 (list_hash_add): Remove.
13203 (hash_tree_cons): Use the generic hashtable.
13204 (mark_list_hash): Remove.
13205 (init_tree): Create the hashtable.
13207 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
13209 * method.c (build_mangled_C9x_name): Rename to
13210 build_mangled_C99_name. Change C9X references in comments to
13213 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13215 * parse.y (unary_expr): Move VA_ARG from here ...
13216 (primary): ... to here.
13218 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13220 * semantics.c (finish_id_expr): If type is error_mark, return
13223 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
13225 * pt.c (lookup_template_class): Simplify loop exit constructs.
13226 Cope when there is no partial instantiation of a template
13229 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
13231 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
13233 2000-11-22 Mark Mitchell <mark@codesourcery.com>
13235 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
13238 * pt.c (do_decl_instantiate): Explicitly clone constructors and
13239 destructors that haven't already been cloned.
13241 2000-11-20 Richard Henderson <rth@redhat.com>
13243 * parse.y (yyparse_1): Rename the parser entry point.
13245 2000-11-20 Alex Samuel <samuel@codesourcery.com>
13247 * mangle.c (write_name): Use <unscoped-name> for names directly in
13249 (write_unscoped_name): Accept names directly in function scope.
13251 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
13253 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
13254 * parse.y (extdef): Add EXPORT reduction.
13255 * spew.c (yylex): Don't skip export here.
13257 2000-11-19 Mark Mitchell <mark@codesourcery.com>
13259 * decl.c (init_decl_processing): Correct name of pure virtual
13260 function under the new ABI.
13261 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
13262 (throw_bad_typeid): Likewise for bad typeid function.
13264 2000-11-18 Mark Mitchell <mark@codesourcery.com>
13266 * decl.c (grokparms): Don't even function types of `void' type,
13268 * mangle.c (write_type): Don't crash when confronted with the
13271 * decl.c (grokparms): Don't create parameters of `void' type.
13273 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
13275 * lex.c (mark_impl_file_chain): Delete.
13276 (init_parse): Remove call to ggc_add_string_root. No need to
13277 ggc_strdup a string constant. Do not add impl_file_chain to GC
13279 (handle_pragma_implementation): No need to ggc_strdup main_filename.
13281 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13283 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
13285 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13287 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
13288 * decl.c (grokdeclarator): Don't reject void parms here.
13289 (require_complete_types_for_parms): Simplify, use
13290 complete_type_or_else.
13291 (grokparms): Remove bitrot. Remove funcdef parm.
13292 Deal with ellipsis parm lists here.
13293 * semantics.c (finish_parmlist): Don't append void_list_node
13294 here. Set PARMLIST_ELLIPSIS_P.
13296 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13298 * typeck2.c (incomplete_type_error): Reorganize to avoid
13299 excessive diagnostics.
13301 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
13303 * lex.c (struct impl_files, internal_filename): Constify a char *.
13305 2000-11-16 Mark Mitchell <mark@codesourcery.com>
13307 * mangle.c (write_special_name_constructor): Don't generate
13308 assembler junk when confronted with an old-style constructor.
13309 (write_special_name_destructor): Likewise.
13310 (mangle_decl_string): Do it here instead.
13312 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
13314 * call.c (op_error): Make error messages clearer.
13316 2000-11-15 Mark Mitchell <mark@codesourcery.com>
13318 * decl.c (wrapup_globals_for_namespace): Don't mark things
13319 TREE_ASM_WRITTEN when they're not.
13321 2000-11-15 Jason Merrill <jason@redhat.com>
13323 * typeck2.c (friendly_abort): Uncount the error before handing
13324 off to fancy_abort.
13326 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
13328 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
13330 2000-11-14 Mark Mitchell <mark@codesourcery.com>
13332 * class.c (build_vtbl_initializer): Fix typo in comment.
13333 * typeck.c (expr_sizeof): Don't crash on errors.
13335 2000-11-14 Jim Wilson <wilson@redhat.com>
13337 * lang-specs.h: Add %2 after %(cc1_options).
13339 2000-11-14 Richard Henderson <rth@redhat.com>
13341 * typeck.c (c_sizeof): Be strict about casting result value
13342 back to c_size_type_node.
13343 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
13345 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
13347 * typeck.c (build_unary_op): Use boolean_increment from
13348 c-common.c, moving the relevant code there.
13350 2000-11-11 Jason Merrill <jason@redhat.com>
13352 * typeck.c (mark_addressable): Don't call put_var_into_stack.
13354 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
13357 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13359 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
13360 * lex.c (copy_lang_decl): Likewise.
13362 2000-11-09 Mark Mitchell <mark@codesourcery.com>
13364 * dump.c (cp_dump_tree): Don't dump function bodies here.
13366 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
13367 (dump.o): Update dependency list.
13368 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
13369 (flag_dump_translation_unit): Likewise.
13370 (CP_TYPE_QUALS): Adjust definition.
13371 (DECL_C_BIT_FIELD): Remove.
13372 (SET_DECL_C_BIT_FIELD): Likewise.
13373 (CLEAR_DECL_C_BIT_FIELD): Likewise.
13374 (add_maybe_template): Likewise.
13375 (strip_array_types): Likewise.
13376 (dump_node_to_file): Likewise.
13377 (cp_dump_tree): New function.
13378 * decl.c (init_decl_processing): Set lang_dump_tree.
13379 * decl2.c (flag_dump_translation_unit): Remove.
13380 * dump.c: Move most of it to ../c-dump.c.
13381 (cp_dump_tree): New function.
13382 * pt.c (add_maybe_template): Remove.
13383 * typeck.c (strip_array_types): Likewise.
13385 2000-11-07 Eric Christopher <echristo@redhat.com>
13387 * decl.c (init_decl_processing): Change definition of
13388 __wchar_t to wchar_t. Remove artificial declaration of
13390 * lex.c: Change instances of __wchar_t to wchar_t.
13392 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
13394 * lex.c (do_identifier): Don't lookup_name for operators.
13395 * parse.y (operator): Save looking_for_typename.
13396 (unoperator): Restore it.
13397 * spew.c (frob_opname): Use nth_token for lookahead.
13399 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
13401 * decl.c (grok_op_properties): Always use coerce_new_type and
13402 coerce_delete_type.
13403 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13404 exception specification. Tidy up.
13405 (coerce_delete_type): Preserve exception specification. Tidy up.
13407 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
13409 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13410 (push_binding_level), error.c (cp_tree_printer), pt.c
13411 (process_partial_specialization, tsubst_template_arg_vector),
13412 search.c (lookup_member): Use memset () instead of bzero ().
13414 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
13416 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13418 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
13420 * Make-lang.in (c++.distdir): Remove.
13422 2000-11-04 Mark Mitchell <mark@codesourcery.com>
13424 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13425 declarations from different namespaces to be combined.
13427 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
13429 * decl.c: Include tm_p.h.
13431 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
13433 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13435 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
13437 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13438 (build_overload_value), repo.c (open_repo_file), xref.c
13439 (open_xref_file): Use strchr () and strrchr () instead of index ()
13442 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
13444 * call.c (build_over_call): Call fold on the CALL_EXPR.
13446 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
13448 * error.c (dump_template_decl): Separate template hearders with
13451 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
13453 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
13454 TS_* flags with corresponding TFF_*. Adjust prototypes of
13455 functions (which used to take a tree_string_flags) to take an int.
13457 * cp-tree.h (enum tree_string_flags): Remove
13458 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13459 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13460 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13461 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13462 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13463 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13464 (type_as_string, decl_as_string, expr_as_string,
13465 context_as_string): Adjust prototype.
13467 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13468 instead of TS_PLAIN.
13470 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13471 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13474 2000-10-30 Mark Mitchell <mark@codesourcery.com>
13476 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13477 (linkage_kind): New enumeration.
13478 (decl_linkage): New function.
13479 * decl2.c (comdat_linkage): Extend comment.
13480 * error.c (dump_function_decl): Print the arguments used to
13481 instantiate a template, even when not printing the type of the
13483 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13484 not TREE_PUBLIC, to test for external linkage.
13485 * tree.c (decl_linkage): New function.
13487 2000-10-28 Mark Mitchell <mark@codesourcery.com>
13489 * pt.c (instantiate_decl): Always instantiate static data members
13490 initialized in-class.
13492 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
13494 * Make-lang.in: Move all build rules here from Makefile.in,
13495 adapt to new context. Wrap all rules that change the current
13496 directory in parentheses. Expunge all references to $(P).
13497 When one command depends on another and they're run all at
13498 once, use && to separate them, not ;. Add OUTPUT_OPTION to
13499 all object-file generation rules. Delete obsolete variables.
13501 * Makefile.in: Delete.
13502 * config-lang.in: Delete outputs= line.
13504 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
13506 * error.c (dump_function_decl): Print no space between
13507 `ptr-operator' the `type-specifier' of the return type.
13508 (dump_type_prefix): Make sure we put space at the appropriate
13511 2000-10-23 Jason Merrill <jason@redhat.com>
13513 * call.c (equal_functions): Also call decls_match for extern "C" fns.
13515 2000-10-22 Jason Merrill <jason@redhat.com>
13517 * call.c (build_conditional_expr): Use ocp_convert to force
13520 2000-10-22 Mark Mitchell <mark@codesourcery.com>
13522 * call.c (standard_conversion): Use RVALUE_CONVs for all
13523 expressions that satisfy lvalue_p, not just those that satisfy
13526 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13528 * typeck.c (c_sizeof): Return an expression of `size_t' type,
13529 not one with TYPE_IS_SIZETYPE set.
13530 (dubious_conversion_warnings): Remove special-case code.
13532 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
13534 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13535 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13536 (dump_type_prefix): Print vector-of-int as 'int vector'.
13537 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13538 * tree.c (walk_tree): Handle VECTOR_TYPE.
13540 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13542 2000-10-21 Jason Merrill <jason@redhat.com>
13544 * parse.y (operator): Set got_object from got_scope.
13545 Set looking_for_typename.
13546 * decl.c (lookup_name_real): Clear val after setting from_obj.
13547 Reorganize diagnostic.
13549 2000-10-20 Jason Merrill <jason@redhat.com>
13551 * tree.c (walk_tree): Don't walk into default args.
13553 * error.c (dump_expr): Use host_integerp.
13555 2000-10-20 David Edelsohn <edelsohn@gnu.org>
13557 * typeck2.c (abstract_virtuals_error): Use "because" instead of
13558 "since" in error message.
13560 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13562 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13564 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
13566 * decl.c (revert_static_member_fn): Fixed typo.
13568 2000-10-19 Mark Mitchell <mark@codesourcery.com>
13570 * class.c (subobject_offset_fn): New type.
13571 (dfs_record_base_offsets): Remove.
13572 (record_base_offsets): Likewise.
13573 (dfs_search_base_offsets): Likewise.
13574 (record_subobject_offset): New function.
13575 (check_subobject_offset): Likewise.
13576 (walk_subobject_offsets): Likewise.
13577 (record_subobject_offsets): Likewise.
13578 (layout_conflict_p): Reimplement.
13579 (layout_nonempty_base_or_field): Correct handling of type
13580 conflicts during layout.
13581 (layout_empty_base): Likewise.
13582 (build_base_field): Adjust to handle new representation of empty
13584 (build_base_fields): Likewise.
13585 (layout_virtual_bases): Likewise.
13586 (splay_tree_compare_integer_csts): New function.
13587 (layout_class_type): Use a splay_tree, rather than a varray, to
13588 represent the offsets of empty bases.
13590 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
13591 * decl.c (select_decl): Don't return declarations that are
13594 2000-10-18 Mark Mitchell <mark@codesourcery.com>
13596 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
13597 (fake_std_node): New macro.
13598 * decl.c (in_std): Rename to ...
13599 (in_fake_std): ... this.
13600 (flag_no_builtin): Remove.
13601 (flag_no_nonansi_builtin): Likewise.
13602 (walk_namespaces_r): Use fake_std_node.
13603 (push_namespace): Use std_identifier.
13604 (pop_namespace): Use in_fake_std.
13605 (lookup_name_real): Use fake_std_node.
13606 (init_decl_processing): When -fhonor-std, create the `std'
13607 namespace. Don't create a dummy fake_std_node in that case.
13608 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
13609 (builtin_function): Put builtins whose names don't begin
13610 with `_' in the std namespace.
13611 * decl2.c (flag_no_builtin): Remove.
13612 (flag_no_nonansi_builtin): Likewise.
13613 (set_decl_namespace): Use fake_std_node.
13614 (validate_nonmember_using_decl): Likewise.
13615 (do_using_directive): Likewise.
13616 (handle_class_head): Likewise.
13617 * dump.c (dequeue_and_dump): Likewise.
13618 * except.c (init_exception_processing): Use std_identifier.
13619 * init.c (build_member_call): Use fake_std_node.
13620 * rtti.c (init_rtti_processing): Use std_identifier.
13622 2000-10-17 Mark Mitchell <mark@codesourcery.com>
13624 * cp-tree.h (back_end_hook): Remove declaration.
13625 * decl2.c (back_end_hook): Remove definition.
13627 * dump.c (dequeue_and_dump): Dump TREE_USED.
13629 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
13631 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
13633 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13635 * decl.c (WINT_TYPE): Define.
13636 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
13637 c_size_type_node, signed_size_type_node and wint_type_node.
13639 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13641 * decl2.c (warn_missing_format_attribute): New variable.
13642 (lang_decode_option): Decode -Wmissing-format-attribute.
13644 2000-10-16 Mark Mitchell <mark@codesourcery.com>
13646 * typeck.c (qualify_type): Remove.
13647 (composite_pointer_type): Fix handling of conversions to `cv void*'.
13649 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13651 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13653 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13655 * Makefile.in (parse.c, parse.h): Create atomically.
13657 2000-10-12 Mark Mitchell <mark@codesourcery.com>
13659 * class.c (current_obstack): Remove.
13660 * decl.c (ggc_p): Remove.
13661 (start_decl): Don't use decl_tree_cons.
13662 (grokdeclarator): Don't use build_decl_list.
13663 (start_function): Don't use decl_tree_cons.
13664 (finish_function): Don't mess with obstacks.
13665 * decl2.c (grok_x_components): Don't use build_decl_list.
13666 * lex.c (make_call_declarator): Don't call decl_tree_cons.
13667 (implicitly_declare_fn): Don't call build_decl_list.
13668 * parse.y (frob_specs): Don't call build_decl_list or
13670 (expr_or_declarator_intern): Don't call decl_tree_cons.
13671 (primary): Don't call build_decl_list.
13672 (fcast_or_absdcl): Likewise.
13673 (typed_declspecs): Don't call decl_tree_cons.
13674 (reserved_declspecs): Don't call build_decl_list.
13675 (declmods): Likewise.
13676 (reserved_typespecquals): Likewise.
13678 (new_type_id): Likewise.
13679 (cv_qualifiers): Likewise.
13680 (after_type_declarator_intern): Likewise.
13681 (notype_declarator_intern): Likewise.
13682 (absdcl_intern): Likewise.
13683 (named_parm): Likewise.
13684 * pt.c (most_specialized_class): Likewise.
13685 * repo.c (temporary_obstack): Make it a structure, not a pointer.
13686 (init_repo): Initialize it.
13687 * search.c (current_obstack): Remove.
13688 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
13690 2000-10-09 Richard Henderson <rth@cygnus.com>
13692 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13693 (c++ language support bits for libgcc): Remove.
13694 (c++.clean): Remove cplib2.txt cleanup.
13695 * config-lang.in (headers, lib2funcs): Remove.
13697 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13698 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13699 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13700 * inc/new.h, inc/typeinfo: Remove files.
13702 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
13704 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13706 (init_decl_processing): Initialize intmax_type_node and
13709 2000-10-06 Richard Henderson <rth@cygnus.com>
13711 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13712 (original_result_rtx): Remove.
13713 * decl.c (save_function_data): Don't clear x_result_rtx.
13714 (mark_lang_function): Don't mark it either.
13715 * expr.c (fixup_result_decl): Remove.
13716 * semantics.c (genrtl_named_return_value): Frob the return decl
13717 before calling emit_local_var.
13718 (genrtl_finish_function): Don't call fixup_result_decl.
13719 Always emit the jump to return_label.
13721 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
13723 * pt.c (lookup_template_class): Set current access for enum.
13724 (tsubst_enum): Set file & line for enum decl.
13726 * spew.c (yylex): Remove unused variable.
13728 2000-10-05 Richard Henderson <rth@cygnus.com>
13730 * semantics.c (genrtl_finish_function): Don't init or check
13731 can_reach_end; remove noreturn and return value checks.
13733 2000-10-05 Tom Tromey <tromey@cygnus.com>
13735 * init.c (build_java_class_ref): Use `build_static_name' with a
13736 suffix, not a prefix, to build the class object's name.
13738 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13740 * cp-tree.h (access_kind): Fix comment typo.
13741 * decl2.c (grokfield): Fix diagnostic typo.
13742 * semantics.c (finish_template_type): Fix comment typo.
13743 (finish_qualified_object_call_expr): Likewise.
13745 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13747 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
13750 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13752 * spew.c (frob_id): New static function.
13753 (frob_opname): Use it.
13756 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13758 * decl.c (lang_mark_false_label_stack): Remove.
13759 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
13761 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
13763 * gxxint.texi: Use @email for formatting email addresses.
13765 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
13767 * error.c: Remove direct obstack manipulation. Replace with
13768 output_buffer-based formatting. Adjust calls to removed macros.
13769 (obstack_chunk_alloc, obstack_chunk_free): Remove.
13770 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13771 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13773 2000-09-24 Mark Mitchell <mark@codesourcery.com>
13775 * ir.texi: Move to ../c-tree.texi.
13777 2000-09-20 Jason Merrill <jason@redhat.com>
13779 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13781 2000-09-21 Andreas Jaeger <aj@suse.de>
13783 * errfn.c: Move declaration of cp_printer and cp_printers to ...
13784 * cp-tree.h: ... here.
13786 * error.c: Remove declaration of cp_printer.
13788 2000-09-20 Mark Mitchell <mark@codesourcery.com>
13790 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
13792 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
13794 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
13797 2000-09-18 Mark Mitchell <mark@codesourcery.com>
13799 * decl.c (start_function): Robustify.
13801 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13803 * cp-tree.h (check_function_format): Accept a `status' parameter.
13805 * call.c, typeck.c: Updates calls to `check_function_format'.
13807 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
13809 * decl2.c (handle_class_head): Always push some scope even
13812 2000-09-16 Mark Mitchell <mark@codesourcery.com>
13814 * cp-tree.h (struct cp_language_function): Remove
13815 x_scope_stmt_stack and name_declared.
13816 (current_scope_stmt_stack): Remove.
13817 (function_name_declared_p): New macro.
13818 (struct lang_decl_flags): Use c_lang_decl as a base class.
13820 (struct lang_decl): Replace saved_tree with context.
13821 (DECL_FRIEND_CONTEXT): Adjust accordingly.
13822 (SET_DECL_FRIEND_CONTEXT): Likewise.
13823 (DECL_VIRTUAL_CONTEXT): Likewise.
13824 (DECL_SAVED_TREE): Remove.
13825 (C_DECLARED_LABEL_FLAG): Likewise.
13826 (cplus_expand_expr_stmt): Don't declare.
13827 (add_decl_stmt): Likewise.
13828 (add_scope_stmt): Likewise.
13829 * decl.c (mark_stmt_tree): Remove.
13830 (case_compare): Likewise.
13831 (finish_case_label): Use c_add_case_label.
13832 (init_decl_processing): Set more language-specific hooks.
13833 (build_enumerator): Fix typo in comment.
13834 (cplus_expand_expr_stmt): Remove.
13835 (mark_lang_function): Use mark_c_language_function.
13836 (lang_mark_tree): Use c_mark_lang_decl.
13837 * decl2.c: Change order of inclusion.
13838 * except.c: Likewise.
13839 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
13840 back on c_expand_expr.
13841 * friend.c: Include expr.h.
13842 * init.c: Change order of inclusion.
13843 * Makefile.in: Update dependencies.
13844 * lex.h (free_lang_decl_chain): Remove.
13845 * optimize.c (maybe_clone_body): Use function_name_declared_p.
13846 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
13848 (instantiate_decl): Use function_name_declared_p.
13849 * semantics.c (lang_expand_expr_stmt): Remove.
13850 (set_current_function_name_declared): Likewise.
13851 (current_function_name_declared): Likewise.
13852 (begin_compound_stmt): Use function_name_declared_p.
13853 (add_decl_stmt): Remove.
13854 (setup_vtbl_ptr): Use function_name_declared_p.
13855 (add_scope_stmt): Remove.
13856 (current_scope_stmt_stack): New function.
13857 (cp_expand_stmt): Don't handle SCOPE_STMTs.
13858 (expand_body): Use function_name_declared_p.
13859 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
13860 * typeck.c: Change order of includes.
13861 (convert_sequence): Remove.
13863 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
13865 * lex.c (reswords): Add _Complex.
13867 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13869 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
13871 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
13873 * init.c (begin_init_stmts): Don't use // comments.
13875 2000-09-12 Jason Merrill <jason@redhat.com>
13877 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
13878 all non-extern arrays.
13880 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
13881 typenames, too. Downgrade complaint to pedwarn.
13882 (xref_tag): Warn about surprising behavior of 'friend struct T'.
13883 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
13884 'class This::Inherited'.
13886 2000-09-12 Mark Mitchell <mark@codesourcery.com>
13888 * decl.c (finish_case_label): Given the LABEL_DECL a
13891 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
13893 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
13894 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
13895 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13896 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13897 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
13899 (sorry_for_unsupported_tree, print_scope_operator,
13900 print_left_paren, print_right_paren, print_left_bracket,
13901 print_right_bracket, print_whitespace): Likewise.
13902 (aggr_variety): Rename to class_key_or_enum.
13903 (print_type): Rename to print_type_id.
13904 (print_type_specifier_seq, print_simple_type_specifier,
13905 print_elaborated_type_specifier,
13906 print_rest_of_abstract_declarator,
13907 print_parameter_declaration_clause, print_exception_specification,
13908 print_nested_name_specifier, print_template_id,
13909 typedef_original_name, print_template_argument_list_start,
13910 print_template_argument_list_end): New functions.
13912 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
13914 * ir.texi: Add more documentation.
13916 2000-09-11 Mark Mitchell <mark@codesourcery.com>
13918 * cp-tree.h (struct saved_scope): Remove x_function_parms.
13919 (current_function_parms): Don't define.
13920 (struct cp_language_function): Remove parms_stored.
13921 (current_function_just_assigned_this): Don't define.
13922 (current_function_parms_stored): Likewise.
13923 (static_ctors): Declare.
13924 (static_dtors): Likewise.
13925 (SF_EXPAND): Don't define.
13926 (expand_start_early_try_stmts): Remove declaration.
13927 (store_parm_decls): Likewise.
13928 * decl.c (static_ctors): Don't declare.
13929 (static_dtors): Likewise.
13930 (struct binding_level): Remove this_block.
13931 (poplevel): Remove dead code.
13932 (set_block): Likewise.
13933 (mark_binding_level): Don't mark this_block.
13934 (mark_saved_scope): Don't mark x_function_parms.
13935 (init_decl_processing): Don't add current_function_parms as a GC
13937 (check_function_type): Change prototype.
13938 (start_function): Remove RTL-generation code.
13939 (expand_start_early_try_stmts): Remove.
13940 (store_parm_decls): Give it internal linkage. Remove
13941 RTL-generation code.
13942 (finish_function): Remove RTL-generation code.
13943 * decl2.c (static_ctors): Fix formatting.
13944 (static_dtors): Likewise.
13945 * method.c (use_thunk): Don't call store_parm_decls.
13946 (synthesize_method): Likewise.
13947 * optimize.c (maybe_clone_body): Likewise.
13948 * parse.y (fn.def2): Likewise.
13949 (.set_base_init): Likewise.
13950 (nodecls): Likewise.
13951 * pt.c (instantiate_decl): Likewise.
13952 * rtti.c (synthesize_tinfo_fn): Likewise.
13953 * semantics.c (genrtl_try_block): Simplify.
13954 (expand_body): Use genrtl_start_function and
13955 genrtl_finish_function.
13956 (genrtl_start_function): New function.
13957 (genrtl_finish_function): Likewise.
13959 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13961 * error.c (cp_tree_printer, case 'P'): Append break.
13963 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13965 * cp-tree.h (frob_opname): Declare.
13966 * parse.y (saved_scopes): New static variable.
13967 (cp_parse_init): Adjust.
13968 (do_id): If lastiddecl is NULL, do do_identifier.
13969 (operator): Save scope information.
13970 (unoperator): New reduction. Restore scope information.
13971 (operator_name): Append unoperator. Call frob_opname.
13972 * spew.c (frob_opname): Define.
13974 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13976 * decl.c, rtti.c: Include defaults.h if not already included.
13977 Don't define the *_TYPE_SIZE macros.
13979 2000-09-09 Mark Mitchell <mark@codesourcery.com>
13981 * cp-tree.h (push_switch): Change prototype.
13982 (check_cp_case_value): Remove declaration.
13983 (decl_constant_value): Likewise.
13984 * decl.c (struct cp_switch): Add switch_stmt and cases.
13985 (case_compare): New function.
13986 (push_switch): Set switch_stmt. Initialize cases.
13987 (pop_switch): Clean up cases.
13988 (define_case_label): Rename to ...
13989 (finish_case_label): ... this. Do semantic analysis for case
13991 (start_function): Correct comment.
13992 * decl2.c (check_cp_case_value): Remove.
13993 * expr.c (do_case): Remove.
13994 * pt.c (tsubst_expr): Adjust call to finish_case_label.
13995 * semantics.c (genrtl_do_poplevel): Remove declaration.
13996 (RECHAIN_STMTS): Remove.
13997 (finish_break_stmt): Use build_break_stmt.
13998 (finish_continue_stmt): Use build_continue_stmt.
13999 (finish_switch_cond): Adjust condition here, rater than in
14000 c_expand_start_case.
14001 (finish_case_label): Remove.
14002 * typeck.c (c_expand_return): Remove.
14003 (c_expand_start_case): Likewise.
14005 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
14007 * ir.texi: Document type nodes.
14009 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14011 * cp-tree.h (init_cp_semantics): Declare.
14012 (genrtl_try_block): Don't declare.
14013 (genrtl_handler): Likewise.
14014 (genrtl_catch_block): Likewise.
14015 (genrtl_ctor_stmt): Likewise.
14016 (genrtl_subobject): Likewise.
14017 (genrtl_do_poplevel): Likewise.
14018 (genrtl_named_return_value): Likewise.
14019 * lex.c (init_parse): Call init_cp_semantics.
14020 * semantics.c (genrtl_try_block): Give it internal linkage.
14021 (genrtl_handler): Likewise.
14022 (genrtl_catch_block): Likewise.
14023 (genrtl_ctor_stmt): Likewise.
14024 (genrtl_subobject): Likewise.
14025 (genrtl_do_poplevel): Likewise.
14026 (genrtl_named_return_value): Likewise.
14027 (lang_expand_stmt): Rename to ...
14028 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
14029 (init_cp_semantics): Define.
14031 * decl.c (initialize_local_var): Remove RTL-generating code.
14032 * semantics.c (genrtl_try_block): Fix formatting.
14034 Move statement-tree facilities from C++ to C front-end.
14035 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14036 (void_zero_node): Remove.
14037 (stmt_tree): Likewise.
14038 (scope_chain): Adjust.
14039 (language_function): Rename to cp_language_function.
14040 (cp_function_chain): Adjust.
14041 (current_stmt_tree): Remove.
14042 (last_tree): Likewise.
14043 (last_expr_type): Likewise.
14044 (struct lang_decl): Adjust.
14045 (STMT_IS_FULL_EXPR_P): Remove.
14046 (add_tree): Remove.
14047 (begin_stmt_tree): Likewise.
14048 (finish_stmt_tree): Likewise.
14049 (walk_tree_fn): Likewise.
14050 (walk_stmt_tree): Likewise.
14051 * class.c (finish_struct): Replace use of add_tree with add_stmt.
14052 * decl.c (mark_stmt_tree): Adjust type.
14053 (init_decl_processing): Don't build void_zero_node.
14054 (initialize_local_var): Adjust usage of current_stmt_tree.
14055 (finish_enum): Use add_stmt, not add_tree.
14056 (save_function_data): Adjust use of language_function.
14057 (finish_constructor_body): Use add_stmt, not add_tree.
14058 (finish_destructor_body): Likewise.
14059 (push_cp_function_context): Adjust use of language_function.
14060 (pop_cp_function_context): Likewise.
14061 (mark_lang_function): Likewise.
14062 (mark_cp_function_context): Likewise.
14063 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14064 (build_vec_init): Likewise.
14065 * semantics.c (SET_LAST_STMT): Remove.
14066 (RECHAIN_STMTS): Don't use it.
14067 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14068 (current_stmt_tree): Define.
14069 (add_tree): Remove.
14070 (finish_goto_stmt): Use add_stmt, not add_tree.
14071 (finish_expr_stmt): Likewise.
14072 (begin_if_stmt): Likewise.
14073 (finish_then_clause): Likewise.
14074 (begin_while_stmt): Likewise.
14075 (begin_do_stmt): Likewise.
14076 (finish_return_stmt): Likewise.
14077 (begin_for_stmt): Likewise.
14078 (finish_break_stmt): Likewise.
14079 (finish_continue_stmt): Likewise.
14080 (begin_switch_stmt): Likewise.
14081 (finish_case_label): Likewise.
14082 (begin_try_block): Likewise.
14083 (begin_function_try_block): Likewise.
14084 (begin_handler): Likewise.
14085 (begin_catch_block): Likewise.
14086 (begin_compound_stmt): Likewise.
14087 (begin_asm_stmt): Likewise.
14088 (finish_asm_stmt): Likewise.
14089 (finish_label_stmt): Likewise.
14090 (add_decl_stmt): Likewise.
14091 (finish_subobject): Likewise.
14092 (finish_decl_cleanup): Likewise.
14093 (finish_named_return_value): Likewise.
14094 (setup_vtbl_ptr): Likewise.
14095 (add_scope_stmt): Likewise.
14096 (finish_stmt_expr): Likewise.
14097 (prune_unused_decls): Remove.
14098 (begin_stmt_tree): Likewise.
14099 (finish_stmt_tree): Likewise.
14100 (prep_stmt): Adjust use of current_stmt_tree.
14101 (lang_expand_stmt): Likewise.
14102 * tree.c (statement_code_p): Remove.
14103 (cp_statement_code_p): New function.
14104 (walk_stmt_tree): Remove.
14105 (init_tree): Set lang_statement_code_p.
14107 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
14109 Integrated preprocessor.
14111 * Make-lang.in, Makefile.in: Remove all references to input.c,
14112 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
14113 * gxx.gperf, hash.h, input.c: Delete.
14114 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14115 initialized properly.
14117 * class.c (fixup_pending_inline): Take a tree, not a
14118 struct pending_inline *. All callers changed.
14119 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14120 RID_PROTECTED entries in ridpointers[] array here.
14121 * decl.c (duplicate_decls): Do not refer to struct
14123 (record_builtin_type, init_decl_processing): Use RID_MAX not
14125 (grokdeclarator): Use C_IS_RESERVED_WORD.
14126 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14128 (grok_x_components): Do not inspect pending_inlines chain.
14130 * cp-tree.h (struct lang_identifier): Add rid_code entry.
14131 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14132 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14133 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14134 TIME_IDENTIFIER_FILEINFO): Kill.
14136 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
14137 single 32-bit word.
14138 * parse.y: Call do_pending_inlines unconditionally.
14139 reinit_parse_for_method is now snarf_method. fn.defpen is no
14140 longer necessary. Remove unnecessary <itype> annotation on
14141 SCOPE. Do not refer to end_of_file or struct pending_inline.
14142 * semantics.c (begin_inline_definitions): Call
14143 do_pending_inlines unconditionally.
14145 * lex.c: Remove all code now shared with C front end.
14146 Initialize cpplib properly if USE_CPPLIB. Put reserved words
14147 into the get_identifier table. Rewrite pragma handling to
14148 work with the registry. Move code to save tokens for later
14149 processing to spew.c.
14151 * spew.c: Rewrite everything in terms of token streams instead
14152 of text. Move routines here from lex.c / input.c as
14153 appropriate. GC-mark trees hanging off the pending inlines
14156 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14158 * NEWS: Mention that the named return value extension has been
14160 * cp-tree.h (original_result_rtx): Define.
14161 (TREE_REFERENCE_EXPR): Remove.
14162 (DECL_VPARENT): Likewise.
14163 (pushdecl_nonclass_level): Likewise.
14164 (store_return_init): Likewise.
14165 (reinit_lang_specific): Likewise.
14166 (genrtl_named_return_value): Change prototype.
14167 * decl.c (original_result_rtx): Remove.
14168 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
14169 Do not generate RTL for local variables here.
14170 (store_return_init): Remove.
14171 * semantics.c (genrtl_named_return_value): Simplify. Fold in
14173 (finish_named_return_value): Adjust accordingly. Warn that this
14174 extension is deprecated.
14175 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
14177 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14179 * pt.c (type_unification_real): Replace switch with if.
14180 (unify): Tsubst non-type parms before comparing.
14182 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14184 * error.c (dump_typename): New function, broken out of ...
14185 (dump_type): ... here. Use it.
14186 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
14188 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14190 * init.c (build_offset_ref): Deal with namespace scoped
14193 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14195 * class.c (resolve_address_of_overloaded_function): Add
14196 explanation message.
14197 * decl.c (define_case_label): Reformat explanation.
14198 * decl2.c (finish_static_data_member_decl): Likewise.
14199 (grokfield): Likewise.
14200 * friend.c (do_friend): Likewise.
14202 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
14204 * tree.c (walk_tree): Expose tail recursion.
14205 (walk_stmt_tree): New function.
14206 * cp-tree.h: Prototype walk_stmt_tree.
14207 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
14208 the BLOCKs directly. If a BLOCK has no variables after
14209 pruning, discard it.
14210 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
14211 restore the line number.
14213 2000-09-05 Mark Mitchell <mark@codesourcery.com>
14215 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
14216 (pt.o): Remove dependency on HTAB_H.
14217 * cp-tree.h: Include hashtab.h.
14218 (walk_tree): Change prototype.
14219 (walk_tree_without_duplicates): New function.
14220 * decl.c (check_default_argument): Use it.
14221 * optimize.c (remap_decl): Adjust calls to walk_tree.
14222 (copy_body): Likewise.
14223 (expand_calls_inline): Likewise.
14224 (calls_setjmp_p): Use walk_tree_without_duplicates.
14225 * pt.c: Don't include hashtab.h.
14226 (for_each_template_parm): Use walk_tree_without_duplicates.
14227 * semantics.c (finish-stmt_tree): Likewise.
14228 (expand_body): Likewise.
14229 * tree.c (walk_tree): Add additional parameter.
14230 (walk_tree_without_duplicates): New function.
14231 (count_trees): Use it.
14232 (verify_stmt_tree): Adjust call to walk_tree.
14233 (find_tree): Use walk_tree_without_duplicates.
14234 (no_linkage_check): Likewise.
14235 (break_out_target_exprs): Adjust call to walk_tree.
14236 (cp_unsave): Likewise.
14238 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14240 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
14241 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14242 * cp-tree.h (TYPE_BINFO): Adjust comment.
14243 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
14244 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14245 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14246 (TYPE_TEMPLATE_INFO): Likewise.
14247 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
14248 * class.c (push_nested_class): Likewise.
14249 * decl.c (lookup_name_real): Likewise.
14250 (grokdeclarator): Likewise.
14251 (grok_op_properties): Likewise.
14252 (xref_tag): Likewise.
14253 (xref_basetypes): Likewise.
14254 * decl2.c (constructor_name_full): Likewise.
14255 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
14256 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14257 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
14258 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14259 (dump_type_suffix): Likewise.
14260 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
14262 (get_aggr_from_typedef): Likewise.
14263 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
14264 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14265 (write_template_parm): Likewise.
14266 (write_template_template_parm): Check tree code instead of
14267 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14268 * method.c (build_overload_nested_name): Add
14269 BOUND_TEMPLATE_TEMPLATE_PARM.
14270 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
14271 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14272 * pt.c (convert_template_argument): Check tree code instead of
14273 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14274 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
14275 (for_each_template_parm): Adjust comment.
14276 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
14277 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14278 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
14279 template_args_equal to compare template template parameter cases.
14280 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14281 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
14283 * tree.c (copy_template_template_parm): Decide whether to create
14284 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
14285 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14286 (copy_tree_r): Likewise.
14287 * typeck.c (comptypes): Likewise. Check tree code instead of
14288 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14290 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
14292 * decl.c (finish_function): Move the code for handling functions
14293 marked with the constructor and destructor attributes inside the
14296 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14298 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
14300 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14302 * pt.c (lookup_template_class): Remove abort.
14303 * tree.c (get_type_decl): Allow error_mark_node.
14305 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14307 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
14310 2000-09-03 Mark Mitchell <mark@codesourcery.com>
14312 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
14315 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14317 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
14318 union tag mismatch error reporting.
14320 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14322 * call.c (build_scoped_method_call): Check it is not a namespace.
14324 2000-08-30 Jason Merrill <jason@redhat.com>
14326 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
14328 * tree.c (bot_manip): Check TREE_CONSTANT rather than
14329 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
14330 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
14332 * decl.c (start_function): Always call make_function_rtl.
14334 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14336 * semantics.c (prune_unused_decls): New function.
14337 (finish_stmt_tree): Call it via walk_tree.
14339 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14341 * class.c (build_secondary_vtable): Constify a char *.
14342 * decl.c (init_decl_processing): Initialize function_id_node,
14343 pretty_function_id_node, and func_id_node.
14344 * input.c (struct input_source): Constify 'str'.
14345 (feed_input): Constify first argument.
14346 * mangle.c (write_identifier): Constify argument.
14347 * pt.c (mangle_class_name_for_template): Constify argument.
14349 2000-08-29 Mark Mitchell <mark@codesourcery.com>
14351 * typeck.c (mark_addressable): Remove code that pokes around in
14354 2000-08-28 Jason Merrill <jason@redhat.com>
14356 * lex.c (file_name_nondirectory): Move to toplev.c.
14358 * cp-tree.h (LOCAL_CLASS_P): New macro.
14359 * class.c (finish_struct_1): Use it.
14361 2000-08-27 Alex Samuel <samuel@codesourcery.com>
14363 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
14364 (write_encoding): Pass another argument to write_name.
14365 (write_name): Add ignore_local_scope parameter. Fix handling of
14367 (write_nested_name): Use write_unqualified_name.
14368 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
14369 (write_template_prefix): Use write_unqualified_name.
14370 (write_component): Remove.
14371 (write_local_name): Add parameter. Use direct local entity to
14372 discriminator calculation.
14373 (write_class_enum_type): Pass another argument to write_name.
14374 (write_template_template_arg): Likewise.
14375 (make_guard_variable): Likewise.
14377 2000-08-27 Jason Merrill <jason@redhat.com>
14379 * decl.c (pushdecl): Matching decls for local externs are found in
14380 the current level. Propagate linkage information from previous
14383 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
14385 * ir.texi (Expressions): Fix typo.
14387 2000-08-25 Greg McGary <greg@mcgary.org>
14389 * tree.c (init_tree): Use ARRAY_SIZE.
14391 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14393 * error.c (cp_tree_printer): Rework.
14395 2000-08-25 Mark Mitchell <mark@codesourcery.com>
14397 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14399 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14400 (cp-demangle.o): Remove target.
14401 (dyn-string.o): Likewise.
14403 * decl.c (grokfndecl): Require that `main' return an `int'.
14404 * mangle.c (write_encoding): Don't mangle return types for
14405 conversion functions.
14407 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14409 * error.c (tree_formatting_info): New data type.
14410 (tree_being_formatted): New macro.
14411 (tree_formatting_flags): Likewise.
14412 (put_whitespace): Likewise.
14413 (print_tree_identifier): Likewise.
14414 (print_identifier): Likewise.
14415 (cp_tree_printer, print_function_argument_list, print_declaration,
14416 print_expression, print_function_declaration,
14417 print_function_parameter, print_type, print_cv_qualifier): New
14419 (init_error): Initialize lang_printer.
14421 2000-08-24 Jason Merrill <jason@redhat.com>
14423 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14424 adjustment necessary.
14426 2000-08-24 Greg McGary <greg@mcgary.org>
14428 * cp-tree.h (MAIN_NAME_P): Remove macro.
14430 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
14432 * error.c (print_instantiation_context): Don't forget to flush the
14435 2000-08-23 Jason Merrill <jason@redhat.com>
14437 * typeck.c (build_ptrmemfunc): Save the input pmf.
14439 * method.c (process_modifiers): Use same_type_p.
14441 2000-08-23 Mark Mitchell <mark@codesourcery.com>
14443 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14444 * mangle.c (write_function_type): Change prototype.
14445 (write_encoding): Don't mangle return types for
14446 constructors or destructors.
14447 (write_type): Adjust call to write_function_type.
14448 * pt.c (instantiate_template): Instantiate alternate entry points
14449 when instantiating the main function.
14451 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14453 * error.c (cp_print_error_function): Don't use embedded '\n' in
14456 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14458 * decl.c (init_decl_processing): Remove bogus initialization.
14459 * error.c (lang_print_error_function): Restore here.
14460 (init_error): Initialize print_error_function.
14462 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14464 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14466 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
14468 * Makefile.in (error.o): Depends on diagnostic.h
14470 * cp-tree.h (problematic_instantiation_changed,
14471 record_last_problematic_instantiation, current_instantiation,
14472 print_instantiation_context): Declare.
14473 (maybe_print_template_context): Remove.
14475 * decl.c (init_decl_processing): Set print_error_function to NULL.
14476 (lang_print_error_function): Remove, since we're using a new
14479 * error.c: #include diagnostic.h
14480 (function_category): New function.
14481 (cp_diagnostic_starter): Likewise.
14482 (cp_diagnostic_finalizer): Likewise.
14483 (cp_print_error_function): Likewise.
14484 (maybe_print_instantiation_context): Likewise.
14485 (print_instantiation_full_context): Likewise.
14486 (print_instantiation_partial_context): Likewise.
14487 (print_instantiation_context): Define.
14488 (init_error): Initialize diagnostic pager and finalizer.
14490 * pt.c (problematic_instantiation_changed): Define.
14491 (record_last_problematic_instantiation): Likewise.
14492 (current_instantiation): Likewise.
14493 (maybe_print_template_context): Remove.
14494 (print_template_context): Likewise.
14495 (current_tinst_level): Make static to reflect Brendan Kehoe's
14496 change of 1995-04-13.
14497 (push_tinst_level): Call print_instantiation_context.
14499 2000-08-21 Nix <nix@esperi.demon.co.uk>
14501 * lang-specs.h: Do not process -o or run the assembler if
14504 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
14506 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14508 * decl2.c (lang_decode_option): Disable gettext attributes for
14511 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
14513 * lex.c (lang_init_options): Default diagnostic message maximum
14514 length to 80, when line-wrapping.
14516 2000-08-20 Mark Mitchell <mark@codesourcery.com>
14518 * class.c (build_vtbl_initializer): Clear the entire
14519 vtbl_init_data. Start keeping track of the functions for which we
14520 have created vcall offsets here.
14521 (dfs_build_vcall_offset_vtbl_entries): Remove.
14522 (build_vcall_offset_vtbl_entries): Reimplement.
14523 (add_vcall_offset_vtbl_entries_r): New function.
14524 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
14525 computing when vcall offsets are necessary.
14527 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14529 * decl.c (member_function_or_else): Use cp_error ... %T.
14530 (grokdeclarator): Likewise.
14531 (start_method): Likewise.
14532 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14534 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14536 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14539 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14541 * cp-tree.h (PTRMEM_OK_P): New macro.
14542 (itf_ptrmem_ok): New enumeration value.
14543 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14544 argument. Diagnose implicit pointer to member.
14545 (instantiate_type): Don't diagnose implicit pointer to member
14546 here. Pass itf_ptrmem_ok if ok. Adjust calls to
14547 resolve_address_of_overloaded_function.
14548 * init.c (build_offset_ref): Set PTRMEM_OK_P.
14549 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14550 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14551 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14552 (build_unary_op): Deal with single non-static member in
14555 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14557 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14559 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14561 * cp-tree.h (enum_name_string): Remove prototype.
14562 (report_case_error): Remove prototype.
14563 * cp/typeck2.c (enum_name_string): Remove.
14564 (report_case_error): Remove.
14565 * error.c (dump_expr): Deal with enum values directly.
14566 Correctly negate integer constant.
14568 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14570 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14571 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14572 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14573 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14574 (__cxa_vec_new): Use __cxa_vec_new2.
14575 (__cxa_vec_delete): Use __cxa_vec_delete2.
14577 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14579 * vec.cc (__cxa_vec_new): Set "C" linkage.
14580 (__cxa_vec_ctor): Likewise.
14581 (__cxa_vec_cctor): Likewise.
14582 (__cxa_vec_dtor): Likewise.
14583 (__cxa_vec_delete): Likewise.
14584 * inc/cxxabi.h (__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.
14590 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14592 * class.c (instantiate_type): Reinstate local variable
14593 deleted in previous change.
14595 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
14598 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14600 * cp-tree.h (instantiate_type_flags): New enumeration.
14601 (instantiate_type): Change parameter.
14602 * class.c (instantiate_type): Adjust prototype. Adjust.
14603 * call.c (standard_conversion): Adjust instantiate_type call.
14604 (reference_binding): Likewise.
14605 (build_op_delete_call): Likewise.
14606 (convert_like_real): Likewise.
14607 * cvt.c (cp_convert_to_pointer): Likewise.
14608 (convert_to_reference): Likewise.
14609 * pt.c (convert_nontype_argument): Likewise.
14610 * typeck.c (build_binary_op): Likewise.
14611 (build_ptrmemfunc): Likewise.
14612 (convert_for_assignment): Likewise.
14614 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14616 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
14617 (current_aggr): Define.
14618 * decl.c (grokdeclarator): Make sure a friend class is an
14619 elaborated type specifier.
14620 * parse.y (current_aggr): Remove static definition.
14621 (cp_parse_init): Adjust.
14622 (structsp): Clear and restore current_aggr.
14623 (component_decl_list): Clear current_aggr.
14625 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
14626 aggregate tag on the typename's context.
14628 * pt.c (tsubst_friend_class): Return error_mark_node, if
14629 parms becomes NULL.
14630 (instantiate_class_template): Ignore error_mark_node friend types.
14632 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
14634 * cvt.c (warn_ref_binding): New static function, broken out of ...
14635 (convert_to_reference): ... here. Use it.
14637 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14639 * parse.y (template_arg): Add rule for template qualified with
14642 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14644 * decl2.c (add_function): Reorganize.
14645 (arg_assoc): Do not consider function template decls.
14647 2000-08-11 Jason Merrill <jason@redhat.com>
14649 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14652 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14654 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14655 (lookup_nested_tag): Likewise.
14657 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14660 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14662 * parse.y (named_complex_class_head_sans_basetype): Remove
14665 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14667 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14668 explicit TEMPLATE_ID_EXPR args.
14669 (build_expr_from_tree, case CALL_EXPR): Likewise.
14671 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14673 * decl.c (check_tag_decl): Diagnose typename's which don't
14676 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
14678 * init.c (build_aggr_init): Reject bogus array initializers
14681 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14683 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14685 * cp/tinfo.cc (__dynamic_cast): Likewise.
14686 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
14688 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14690 * cvt.c (convert_to_pointer_force): Fix error message when
14691 attempting to cast from ambiguous base.
14693 2000-08-08 Jason Merrill <jason@redhat.com>
14695 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14696 (tsubst_template_arg_vector): Likewise.
14698 * decl2.c (build_anon_union_vars): Choose the largest field; don't
14699 assume that one will be as large as the union.
14701 2000-08-07 Kazu Hirata <kazu@hxi.com>
14703 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14704 * decl.c (pop_labels): Likewise.
14706 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
14708 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14710 (__pointer_to_member_type_info): Likewise.
14711 (__base_class_info): Likewise.
14712 (__class_type_info): Likewise.
14713 (__si_class_type_info): Likewise.
14714 (__vmi_class_type_info): Likewise.
14715 * tinfo.cc (__si_class_type_info::__do_find_public_src):
14716 Changed member names to match specifications.
14717 (__vmi_class_type_info::__do_find_public_src): Likewise.
14718 (__si_class_type_info::__do_dyncast): Likewise.
14719 (__vmi_class_type_info::__do_dyncast): Likewise.
14720 (__si_class_type_info::__do_upcast): Likewise.
14721 (__vmi_class_type_info::__do_upcast): Likewise.
14722 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
14723 (__pbase_type_info::__pointer_catch): Likewise.
14724 (__pointer_type_info::__pointer_catch): Likewise.
14725 (__pointer_to_member_type_info::__pointer_catch): Likewise.
14727 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
14729 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14730 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14731 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
14733 2000-08-04 Mark Mitchell <mark@codesourcery.com>
14735 * cp-tree.h (add_method): Change prototype.
14736 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
14737 Don't double the size of the method vector in the error case.
14738 (handle_using_decl): Adjust call to add_method.
14739 (add_implicitly_declared_members): Likewise.
14740 (clone_function_decl): Likewise.
14741 * decl2.c (check_classfn): Likewise.
14742 * semantics.c (finish_member_declaration): Likewise.
14744 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
14746 * decl.c (flag_isoc94): New variable.
14748 2000-08-02 Jason Merrill <jason@redhat.com>
14750 * pt.c (do_type_instantiation): Add complain parm; don't complain
14751 if called recursively.
14752 * cp-tree.h, parse.y: Adjust.
14754 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
14756 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14757 -Wno-strict-prototypes.
14759 * g++spec.c: Adjust type of second argument to
14760 lang_specific_driver, and update code as necessary.
14762 * cp-tree.h: Don't prototype min_precision here.
14763 (my_friendly_assert): Cast expression to void.
14764 * semantics.c (do_poplevel): Initialize scope_stmts.
14766 2000-08-02 Mark Mitchell <mark@codesourcery.com>
14768 * cp-tree.h (DECL_NEEDED_P): Tweak.
14770 2000-07-28 Jason Merrill <jason@redhat.com>
14772 * lang-specs.h: Use %i in rule for .ii files.
14774 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
14776 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14778 2000-07-30 Mark Mitchell <mark@codesourcery.com>
14780 Allow indirect primary bases.
14781 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
14783 (CLASSTYPE_VFIELD_PARENT): Remove.
14784 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14785 (BINFO_PRIMARY_BINFO): Remove.
14786 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
14787 (BINFO_VBASE_PRIMARY_P): Likewise.
14788 (BINFO_PRIMARY_BASE_OF): New macro.
14789 (BINFO_INDIRECT_PRIMARY_P): Likewise.
14790 (get_primary_binfo): New function.
14791 * decl.c (lang_mark_tree): Make lang_type::primary_base.
14792 * class.c (vcall_offset_data_s): Rename to ...
14793 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
14794 and add ctor_vtbl_p.
14795 (get_derived_offset): Use get_primary_binfo.
14796 (dfs_mark_primary_bases): Adjust handling of virtual primary
14798 (mark_primary_bases): Likewise.
14799 (set_primary_base): Take a binfo, not an integer, as a
14800 representation of the primary base.
14801 (indirect_primary_base_p): Remove.
14802 (determine_primary_base): Adjust for indirect primary bases.
14803 (dfs_find_final_overrider): Fix typo in coment.
14804 (update_vtable_entry_for_fn): Use get_primary_binfo.
14805 (layout_nonempty_base_or_field): Tweak.
14806 (build_base_fields): Adjust for new primary base semantics.
14807 (dfs_propagate_binfo_offsets): Remove.
14808 (propagate_binfo_offsets): Rewrite.
14809 (dfs_set_offset_for_shared_vbases): Remove.
14810 (layout_virtual_bases): Don't use it.
14811 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
14813 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
14814 CLASSTYPE_VFIELD_PARENT.
14815 (dfs_get_primary_binfo): New function.
14816 (get_primary_binfo): Likewise.
14817 (dump_class_hierarchy_r): Tweak printing of primary bases.
14818 (build_vtbl_initializer): Fix typo in comments. Use
14820 (build_vcall_and_vbase_vtbl_entries): Likewise.
14821 (build_vbaes_offset_vtbl_entries): Likewise.
14822 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
14823 BV_VCALL_INDEX to handle indirect primary bases.
14824 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
14825 (build_rtti_vtbl_entries): Likewise.
14826 * search.c (get_shared_vbase_if_not_primary): Tweak.
14827 (find_vbase_instance): Likewise.
14828 (binfo_for_vtable): Simplify.
14829 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
14830 (make_binfo): Make it have 11 entries.
14832 2000-07-30 Alex Samuel <samuel@codesourcery.com>
14834 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
14835 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
14836 ascertaining primaryness.
14837 (G): Remove template_args.
14838 (decl_is_template_id): New function.
14839 (write_encoding): Use decl_is_template_id.
14840 (write_name): Likewise. Handle type_decls. Get main variant of
14842 (write_nested_name): Likewise.
14843 (write_prefix): Likewise.
14844 (write_template_prefix): Likewise.
14845 (write_special_name_constructor): Remove defunct production from
14847 (write_bare_function_type): Remove comment about absent parameter.
14848 (write_template_template_arg): Add missing grammar production to
14851 2000-07-27 Jason Merrill <jason@redhat.com>
14853 * decl.c (duplicate_decls): If common_type produces a non-typedef
14854 type for a typedef, just use the old type.
14856 2000-07-27 Mark Mitchell <mark@codesourcery.com>
14858 * cp-tree.h (function_depth): Declare.
14859 (verify_stmt_tree): Likewise.
14860 (find_tree): Likewise.
14861 * decl.c (function_depth): Give it external linkage.
14862 * optimize.c (optimize_function): Increment and decrement it.
14863 * tree.c (verify_stmt_tree_r): New function.
14864 (verify_stmt_tree): Likewise.
14865 (find_tree_r): Likewise.
14866 (find_tree): Likewise.
14868 2000-07-27 Jason Merrill <jason@redhat.com>
14870 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
14872 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
14874 2000-07-26 Mark Mitchell <mark@codesourcery.com>
14876 * decl.c (start_cleanup_fn): Mark the function as `inline'.
14877 * decl2.c (get_guard): Call cp_finish_decl, not
14878 rest_of_decl_compilation, for local guards.
14879 * lex.c (do_identifier): Remove unused variable.
14881 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
14883 * parse.y: Add missing ';'.
14885 2000-07-26 Mark Mitchell <mark@codesourcery.com>
14887 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
14890 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14892 Kill strict_prototype. Backwards compatibility only for
14893 non NO_IMPLICIT_EXTERN_C systems.
14894 * cp-tree.h (flag_strict_prototype): Remove.
14895 (strict_prototype): Remove.
14896 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14897 * decl.c (maybe_push_to_top_level): Adjust.
14898 (pop_from_top_level): Adjust.
14899 (decls_match): Only allow sloppy parm matching for ancient
14901 (init_decl_processing): Adjust.
14902 (grokdeclarator): Adjust.
14903 * decl2.c (flag_strict_prototype): Remove.
14904 (strict_prototype): Remove.
14905 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14906 (lang_f_options): Remove "strict-prototype".
14907 (unsupported-options): Add "strict-prototype".
14908 * lex.c (do_identifier): Adjust.
14909 (do_scoped_id): Adjust.
14910 * parse.y (empty_parms): Adjust.
14911 * class.c (push_lang_context): Adjust.
14912 (pop_lang_context): Adjust.
14913 * typeck.c (comp_target_parms): Adjust.
14915 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14917 * decl.c (poplevel): Deal with anonymous variables at for scope.
14918 (maybe_inject_for_scope_var): Likewise.
14920 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
14922 * decl.c: Remove all signal handling code, now done in toplev.c.
14924 2000-07-23 Mark Mitchell <mark@codesourcery.com>
14926 * decl.c (make_rtl_for_nonlocal_decl): Rework.
14928 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
14931 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
14933 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
14934 Define my_friendly_assert and my_friendly_abort as macros
14935 which may call friendly_abort. Prototype friendly abort, not
14936 my_friendly_abort or my_friendly_assert.
14937 * decl.c (signal_catch): Report the signal caught in the error
14938 message. Call fatal directly.
14939 * typeck2.c (ack, my_friendly_assert): Delete.
14940 (my_friendly_abort): Rename to friendly_abort. Expect file,
14941 line, and function parameters. Report the abort code, then
14942 call fancy_abort. Do not mask an abort if errors have
14945 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
14947 * typeck.c (comp_target_parms): Remove obsolete parameter.
14948 (comp_target_types): Adjust.
14950 2000-07-17 Jason Merrill <jason@redhat.com>
14952 * typeck.c (mark_addressable): Never set TREE_USED.
14953 * call.c (build_call): Don't abort on calls to library functions
14954 that have been declared normally.
14956 * typeck.c (build_binary_op): Fix grammar in warning.
14958 * exception.cc (__eh_free): Fix prototype.
14960 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
14962 * decl.c (pushdecl): Handle seeing an OVERLOAD in
14963 IDENTIFIER_NAMESPACE_VALUE.
14965 2000-07-16 Mark Mitchell <mark@codesourcery.com>
14967 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
14968 * method.c (use_thunk): Correct handling of vcall offsets.
14970 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
14972 * .cvsignore: parse.h and parse.c have no cp- prefix.
14974 2000-07-13 Mark Mitchell <mark@codesourcery.com>
14976 * .cvsignore: New file.
14978 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
14980 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
14982 2000-07-12 Mark Mitchell <mark@codesourcery.com>
14984 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
14986 * parse.h: Likewise.
14988 2000-07-11 Mark Mitchell <mark@codesourcery.com>
14990 * class.c (layout_class_type): Add pointers to virtual bases after
14991 base classes under the old ABI.
14993 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
14995 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
14996 (finish_continue_stmt): Likewise.
14997 (begin_for_stmt): Remove call to note_level_for_for.
14998 (finish_goto_stmt): Change call from build_min_nt
15000 (finish_expr_stmt): Likewise.
15001 (begin_if_stmt): Likewise.
15002 (begin_while_stmt): Likewise.
15003 (finish_while_stmt): Likewise.
15004 (finish_return_stmt): Likewise.
15005 (begin_for_stmt): Likewise.
15006 (finish_for_stmt): Likewise.
15007 (finish_break_stmt): Likewise.
15008 (begin_switch_stmt): Likewise.
15009 (finish_case_label): Likewise.
15010 (genrtl_try_block): Likewise.
15011 (begin_try_block): Likewise.
15012 (begin_handler): Likewise.
15013 (begin_compound_stmt): Likewise.
15014 (finish_asm_stmt): Likewise.
15015 (finish_label_stmt): Likewise.
15016 (add_decl_stmt): Likewise.
15017 (finish_subobject): Likewise.
15018 (finish_decl_cleanup): Likewise.
15019 (finish_named_return_value): Likewise.
15020 (setup_vtbl_ptr): Likewise.
15021 (add_scope_stmt): Likewise.
15022 * decl.c (finish_constructor_body): Likewise.
15023 (finish_destructor_body): Likewise.
15024 * optimize.c (copy_body_r): Likewise.
15025 (initialize_inlined_parameters): Likewise.
15026 (declare_return_variable): Likewise.
15027 (expand_call_inline): Likewise.
15029 2000-07-10 Jakub Jelinek <jakub@redhat.com>
15031 * semantics.c (expand_body): Sync interface information
15032 at the end of function body expansion.
15034 2000-07-09 Jason Merrill <jason@redhat.com>
15036 * init.c (build_new_1): Bail early if the call to new fails.
15038 * decl.c (compute_array_index_type): Check specifically for
15039 an INTEGER_CST, not just TREE_CONSTANT.
15041 * decl.c (duplicate_decls): Don't call duplicate_decls on
15042 the DECL_TEMPLATE_RESULT.
15043 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15046 * error.c (dump_template_bindings): Don't crash if we had an
15047 invalid argument list.
15049 * typeck.c (c_expand_start_case): Do narrowing here.
15050 * semantics.c (finish_switch_cond): Not here.
15052 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
15054 * parse.y (asm_clobbers): Do string concatenation.
15056 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15058 * decl.c (pushtag): Don't put local classes in template functions
15059 on the local_classes list.
15061 2000-07-04 Scott Snyder <snyder@fnal.gov>
15063 * decl2.c (get_guard): Add missing return for old ABI local
15066 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15068 * cp-tree.h (char_type_p): New function.
15069 * decl.c (init_decl_processing): Don't initialize
15070 signed_wchar_type_node or unsigned_wchar_type_node.
15071 (complete_array_type): Handle brace-enclosed string-constants.
15072 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15073 * tree.c (char_type_p): New function.
15074 * typeck2.c (digest_init): Use char_type_p.
15076 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15078 * pt.c (tsubst): Don't layout type, if it's error_mark.
15080 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15082 * pt.c (instantiate_pending_templates): Reset template level.
15084 2000-07-05 Jason Merrill <jason@redhat.com>
15086 * call.c (joust): Don't complain about `operator char *()' beating
15087 `operator const char *() const'.
15089 2000-07-04 scott snyder <snyder@fnal.gov>
15090 Jason Merrill <jason@redhat.com>
15092 * repo.c (repo_get_id): Handle the case where a class with virtual
15093 bases has a null TYPE_BINFO_VTABLE.
15095 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
15096 Jason Merrill <jason@redhat.com>
15098 * parse.y (member_init): Just pass in the type.
15099 * init.c (expand_member_init): Handle getting a type.
15101 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15102 Jason Merrill <jason@redhat.com>
15104 * decl.c (finish_function): Warn if a function has no return
15106 Suggested by Andrew Koenig.
15107 * typeck.c (check_return_expr): Do set current_function_returns_value
15108 if we got an error_mark_node.
15110 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15112 * decl2.c (push_decl_namespace): Push the original namespace.
15114 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15116 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15117 * semantics.c (begin_class_definition): Clear it.
15119 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
15121 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15122 (genrtl_expr_stmt): Likewise.
15123 (genrtl_decl_stmt): Likewise.
15124 (genrtl_if_stmt): Likewise.
15125 (genrtl_while_stmt): Likewise.
15126 (genrtl_do_stmt): Likewise.
15127 (genrtl_return_stmt): Likewise.
15128 (genrtl_for_stmt): Likewise.
15129 (genrtl_break_stmt): Likewise.
15130 (genrtl_continue_stmt): Likewise.
15131 (genrtl_scope_stmt): Likewise.
15132 (genrtl_switch_stmt): Likewise.
15133 (genrtl_case_label): Likewise.
15134 (genrtl_begin_compound_stmt): Likewise.
15135 (genrtl_finish_compound_stmt): Likewise.
15136 (genrtl_compound_stmt): Likewise.
15137 (genrtl_asm_stmt): Likewise.
15139 * init.c (begin_init_stmts): Remove call to
15140 genrtl_begin_compound_stmt.
15141 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15143 * semantics.c (lang_expand_stmt): Changed call to
15144 genrtl_compound_stmt to ignore return value.
15146 2000-07-02 Mark Mitchell <mark@codesourcery.com>
15148 * mangle.c (canonicalize_for_substitution): Return the canonical
15151 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15153 * typeck.c (commonparms): Remove obstack manipulations.
15155 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
15157 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15159 * Makefile.in (OBJS): Added ../c-semantics.o.
15160 (OBJDEPS): Likewise.
15162 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
15164 (struct stmt_tree): Added comment.
15165 (current_function_name_declared): Removed.
15166 (stmts_are_full_exprs_p): Likewise.
15167 (genrtl_do_pushlevel): Likewise.
15168 (genrtl_clear_out_block): Likewise.
15169 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
15170 (DECL_ANON_UNION_ELEMS): Likewise.
15171 (emit_local_var): Likewise.
15172 (make_rtl_for_local_static): Likewise.
15173 (do_case): Likewise.
15174 (expand_stmt): Likewise.
15175 (genrtl_decl_cleanup): Likewise.
15176 (c_expand_asm_operands): Likewise.
15177 (c_expand_return): Likewise.
15178 (c_expand_start_case): Likewise.
15180 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
15181 (emit_local_var): Likewise.
15182 (initialize_local_var): Change reference to
15183 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15184 Change reference to stmts_are_full_exprs_p to
15185 current_stmt_tree->stmts_are_full_exprs_p.
15186 (push_cp_function_context): Likewise.
15188 * expect.c (expand_throw): Change reference to
15189 stmts_are_full_exprs_p.
15191 * init.c (build_aggr_init): Change reference to
15192 stmts_are_full_exprs_p.
15193 (build_vec_init): Likewise.
15195 * optimize.c (maybe_clone_body): Change reference to
15196 current_function_name_declared to
15197 cp_function_chain->name_declared.
15199 * pt.c (instantiate_decl): Change reference to
15200 current_function_name_declared to
15201 cp_function_chain->name_declared.
15203 * semantics.c (expand_cond): Moved declaration to c-common.h.
15204 (genrtl_do_pushlevel): Moved to c-semantics.c.
15205 (genrtl_clear_out_block): Likewise.
15206 (genrtl_goto_stmt): Likewise.
15207 (genrtl_expr_stmt): Likewise.
15208 (genrtl_decl_stmt): Likewise.
15209 (gerntl_if_stmt): Likewise.
15210 (genrtl_while_stmt): Likewise.
15211 (genrtl_do_stmt): Likewise.
15212 (genrtl_return_stmt): Likewise.
15213 (genrtl_for_stmt): Likewise.
15214 (genrtl_break_stmt): Likewise.
15215 (genrtl_continue_stmt): Likewise.
15216 (genrtl_scope_stmt): Likewise.
15217 (genrtl_switch_stmt): Likewise.
15218 (genrtl_case_label): Likewise.
15219 (genrtl_begin_compound_stmt): Likewise.
15220 (genrtl_finish_compound_stmt): Likewise.
15221 (genrtl_compound_stmt): Likewise.
15222 (genrtl_asm_stmt): Likewise.
15223 (genrtl_decl_cleanup): Likewise.
15224 (expand_cond): Likewise.
15225 (expand_stmt): Renamed to ...
15226 (lang_expand_stmt): ... this.
15227 (lang_expand_expr_stmt): Initialize.
15228 (set_current_function_name_declared): Likewise.
15229 (stmts_are_full_exprs_p): Likewise.
15230 (current_function_name_declared): Likewise.
15231 (anon_aggr_type_p): Likewise.
15232 (do_poplevel): Change reference to
15233 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15234 Change reference to stmts_are_full_exprs_p to
15235 current_stmt_tree->stmts_are_full_exprs_p.
15236 (add_tree): Likewise.
15237 (finish_expr_stmt): Likewise.
15238 (prep_stmt): Likewise.
15239 (lang_expand_stmt): Likewise.
15240 (begin_compound_stmt): Change reference to
15241 current_function_name_declared to
15242 cp_function_chain->name_declared and call to
15243 current_function_name_declared().
15244 (setup_vtbl_ptr): Likewise.
15245 (genrtl_do_poplevel): Removed.
15247 2000-06-30 Jason Merrill <jason@redhat.com>
15249 * init.c (init_init_processing): Go back to aligning like
15250 double_type_node for old ABI.
15251 (get_cookie_size): Make cookie larger if we get a type that needs
15253 (build_vec_delete): Call it.
15255 * typeck.c (qualify_type_recursive): New fn.
15256 (composite_pointer_type): Use it.
15257 (build_binary_op): Use composite_pointer_type.
15259 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
15260 Jason Merrill <jason@redhat.com>
15262 * typeck.c (check_return_expr): Don't complain about returning
15263 NULL from operator new if -fcheck-new.
15264 * cp-tree.h: Declare flag_check_new here.
15265 * init.c: Not here.
15267 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15269 * mangle.c (find_substitution): Use same_type_p.
15270 (write_encoding): Don't check for substitutions.
15272 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15274 * parse.y (expr_no_comma_rangle): New non-terminal.
15275 (template_parm): Use it for default parameter case.
15276 (template_arg): Use it.
15277 (expr_no_commas): Remove commented out undefined extensions.
15278 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15279 * parse.h, parse.c: Rebuilt.
15281 2000-06-30 Mark Mitchell <mark@codesourcery.com>
15283 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
15284 (finish_asm_stmt): Do it here, instead.
15286 * cp-tree.h (ridpointers): Don't declare.
15287 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
15288 (record_builtin_java_type): Likewise.
15289 (init_decl_processing): Likewise.
15290 * lex.c: Move inclusion of lex.h.
15291 (ridpointers): Don't define.
15292 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
15294 * lex.h (enum rid): Rename to ...
15295 (enum cp_rid): ... this.
15296 (ridpointers): Don't declare.
15297 * parse.y: Move inclusion of lex.h.
15298 * parse.c: Regenerated.
15299 * spew.c: Move inclusion of lex.h.
15301 * cp-tree.h (struct language_function): Remove temp_name_counter.
15302 (temp_name_counter): Remove.
15303 (get_temp_name): Change prototype.
15304 (get_guard): New function.
15305 (get_guard_cond): Likewise.
15306 (set_guard): Likewise.
15307 * cvt.c (build_up_reference): Adjust call to get_temp_name.
15308 * decl.c (expand_static_init): Use get_guard and friends to
15309 implement guard variables.
15310 * decl2.c (get_temp_name): Assume that the variables created are
15312 (get_sentry): Rename to ...
15313 (get_guard): ... this. Implement new ABI guard variables.
15314 (get_guard_bits): New function.
15315 (get_guard_cond): Likewise.
15316 (set_guard): Likewise.
15317 (start_static_initialization_or_destruction): Use them.
15318 (do_static_initialization): Replace sentry with guard throughout.
15319 (do_static_destruction): Likewise.
15320 * init.c (create_temporary_var): Add comment.
15322 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15324 * mangle.c (find_substitution): Use same_type_p.
15325 (write_encoding): Don't check for substitutions.
15327 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15329 * parse.y (expr_no_comma_rangle): New non-terminal.
15330 (template_parm): Use it for default parameter case.
15331 (template_arg): Use it.
15332 (expr_no_commas): Remove commented out undefined extensions.
15333 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15334 * parse.h, parse.c: Rebuilt.
15336 2000-06-29 Mark Mitchell <mark@codesourcery.com>
15338 * cp-tree.h (flag_const_strings): Remove.
15339 (warn_parentheses): Likewise.
15340 (warn_format): Likewise.
15341 (common_type): Likewise.
15342 (default_conversion): Likewise.
15343 (build_binary_op): Likewise.
15344 (cp_build_binary_op): New macro.
15345 * call.c (build_new_op): Use cp_build_binary_op instead of
15347 * class.c (build_vtable_entry_ref): Likewise.
15348 * decl.c (expand_static_init): Likewise.
15349 (compute_array_index_type): Likewise.
15350 (build_enumerator): Likewise.
15351 * decl2.c (delete_sanity): Likewise.
15352 (start_static_initialization_or_destruction): Likewise.
15353 * error.c (dump_type_suffix): Likewise.
15354 * init.c (resolve_offset_ref): Likewise.
15355 (build_new): Likewise.
15356 (build_new_1): Likewise.
15357 (build_vec_delete_1): Likewise.
15358 (build_vec_init): Likewise.
15359 (build_delete): Likewise.
15360 * rtti.c (synthesize_tinfo_fn): Likewise.
15361 (synthesize_tinfo_var): Likewise.
15362 * search.c (expand_upcast_fixups): Likewise.
15363 (fixup_all_virtual_upcast_offsets): Likewise.
15364 * typeck.c (build_array_ref): Likewise.
15365 (get_member_function_from_ptrfunc): Likewise.
15366 (build_binary_op): Add parameter.
15367 (pointer_int_sum): Use cp_build_binary_op.
15368 (pointer_diff): Likewise.
15369 (build_modify_expr): Likewise.
15370 (get_delta_difference): Likewise.
15371 (build_ptrmemfunc): Likewise.
15373 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
15375 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
15376 * decl.c (create_implicit_typedef): Adjust.
15377 * decl2.c (build_artificial_parm): Adjust.
15378 * method.c (implicitly_declare_fn): Adjust.
15379 * pt.c (push_inline_template_parms_recursive): Adjust.
15380 (process_template_parm): Adjust.
15381 (overloaded_template_name): Adjust.
15382 * semantics.c (finish_template_template_parm): Adjust.
15384 2000-06-28 Mark Mitchell <mark@codesourcery.com>
15386 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15387 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
15388 where to emit thunks.
15389 (build_vtt): Adjust call to build_vtt_inits.
15390 (build_vtt_inits): Add parameter to indicate whether or not
15391 sub-VTTs for virtual bases should be included. Adjust handling of
15392 construction vtables.
15393 (get_matching_base): New function.
15394 (dfs_build_vtt_inits): Rename to ...
15395 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15396 construction vtables.
15397 (dfs_fixup_binfo_vtbls): Likewise.
15398 (build_ctor_vtbl_groups): Build construction vtables for virtual
15400 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15401 to build construction vtbls.
15402 (dfs_accumulate_vtbl_inits): Adjust handling of
15403 construction vtables.
15405 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15408 2000-06-27 Mark Mitchell <mark@codesourcery.com>
15410 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15412 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15414 * search.c (hides): Remove.
15415 (is_subobject_of_p): Add most_derived parameter. Use
15417 (lookup_field_queue_p): Adjust.
15418 (lookup_field_r): Adjust.
15420 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15422 * decl2.c (handle_class_head): Bash typedefs to the type's main
15425 2000-06-25 Mark Mitchell <mark@codesourcery.com>
15427 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15428 (begin_global_stmt_expr): ... this.
15429 (genrtl_finish_stmt_expr): Rename to ...
15430 (finish_global_stmt_expr): ... this.
15431 * init.c (begin_init_stmts): Adjust calls.
15432 (finish_init_stmts): Likewise.
15433 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15434 (begin_global_stmt_expr): ... this.
15435 (genrtl_finish_stmt_expr): Rename to ...
15436 (finish_global_stmt_expr): ... this.
15438 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15440 * search.c (lookup_member): Fix typo in comment.
15442 2000-06-24 Jason Merrill <jason@redhat.com>
15444 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15445 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15447 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15449 * parse.y (complex_direct_notype_declarator): Support global_scope.
15450 * Makefile.in: Adjust conflict count.
15452 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15454 * parse.y (template_arg): Convert TEMPLATE_DECL
15455 that is a template template parameter to
15456 TEMPLATE_TEMPLATE_PARM here.
15458 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15459 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15460 (copy_template_template_parm): Adjust prototype.
15461 * decl.c (grokdeclarator): Remove dead code.
15462 * pt.c (process_template_parm): Tidy.
15463 (lookup_template_class): Construct nodes in
15464 copy_template_template_parm.
15465 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15466 lookup_template_class. Use TYPE_TI_TEMPLATE.
15467 * tree.c (copy_template_template_parm): Add NEWARGS
15469 (mapcar): Adjust call to copy_template_template_parm.
15470 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15471 * method.c (build_template_template_parm_names): Change error
15472 code to avoid compilation warning.
15474 * gxxint.texi: Document template template parameter
15477 2000-06-21 Alex Samuel <samuel@codesourcery.com>
15479 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15480 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15481 (cp-demangle.o): New rule.
15482 (dyn-string.o): Likewise.
15483 * inc/cxxabi.h (__cxa_demangle): New declaration.
15485 2000-06-22 Mark Mitchell <mark@codesourcery.com>
15487 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15488 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15489 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
15490 a tree, not an int.
15491 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15492 (make_thunk): Change prototype.
15493 (emit_thunk): Rename to use_thunk.
15494 (mangle_thunk): Change prototype.
15495 * class.c (get_derived_offset): Simplify.
15496 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15497 BV_GENERATE_THUNK_WITH_VTABLE_P.
15498 (build_primary_vtable): Simplify.
15499 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15500 (dfs_find_base): Remove.
15501 (update_vtable_entry_for_fn): Correct bug in finding the base
15502 where a virtual function was first declared. Figure out whether
15503 or not to emit a vcall-thunk with the vtables in which it appears.
15504 Correct logic for deciding whether to use an ordinary thunk, or a
15506 (finish_struct_1): Remove unnecssary code.
15507 (build_vtbl_initializer): Use ssize_int for the running counter of
15509 (build_vtbl_initializer): Only use vcall thunks where necessary.
15510 Mark thunks as needing to be emitted with their vtables, or not.
15511 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15512 indices. Use size_binop.
15513 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15514 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
15516 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15517 (build_vtable_entry): Mark thunks as needing to be emitted with
15518 their vtables, or not.
15519 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15520 * decl2.c (mark_vtable_entries): Use use_thunk instead of
15522 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
15524 * error.c (dump_expr): Use BV_FN.
15525 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15527 * method.c (make_thunk): Likewise.
15528 (emit_thunk): Rename to use_thunk. Allow callers to decide
15529 whether or not to actually emit the thunk. Adjust for changes in
15530 representation of vcall offsets.
15531 * search.c (dfs_get_pure_virtuals): Use BV_FN.
15532 * semantics.c (emit_associated_thunks): New function.
15533 (expand_body): Use it.
15534 * ir.texi: Adjust decriptions of thunks.
15536 2000-06-22 Jason Merrill <jason@redhat.com>
15538 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15539 (tsubst_friend_function): Copy it here.
15541 * decl.c (grok_op_properties): Fix typo.
15543 * decl2.c (delete_sanity): Clarify warning, avoid failure on
15546 * pt.c (check_explicit_specialization): Clarify error.
15548 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15549 an old OVERLOAD when we're declaring a non-function.
15550 (pushdecl, destroy_local_var): Check for error_mark_node.
15551 (warn_extern_redeclared_static): Also bail early if
15552 we're a CONST_DECL.
15553 (push_overloaded_decl): Ignore an old error_mark_node.
15555 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
15557 * call.c (build_x_va_arg): Check if in a template decl.
15558 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15560 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15562 * class.c (push_lang_context): TYPE_NAME gets you to the Java
15564 * decl.c (check_goto): Computed gotos assumed OK.
15566 2000-06-20 Jason Merrill <jason@redhat.com>
15568 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15569 for which we don't need to look for instantiations.
15571 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
15573 * parse.y (program): Always call finish_translation_unit.
15574 * parse.c, parse.h: Rebuilt.
15576 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
15578 * method.c: Don't include hard-reg-set.h.
15580 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15582 * rtti.c (get_base_offset): Cope when vbase field is in a base.
15584 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15586 * call.c (build_conditional_expr): Use VOID_TYPE_P.
15587 * cvt.c (cp_convert_to_pointer): Likewise.
15588 (convert_to_void): Likewise.
15589 * error.c (dump_expr): Likewise.
15590 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
15591 * init.c (build_delete): Likewise.
15592 * method.c (emit_thunk): Likewise.
15593 * optmize.c (declare_return_variable): Likewise.
15594 * rtti.c (get_tinfo_decl_dynamic): Likewise.
15595 (get_typeid): Likewise.
15596 (build_dynamic_cast_1): Likewise.
15597 * typeck.c (composite_pointer_type): Likewise.
15598 (common_type): Likewise.
15599 (build_indirect_ref): Likewise.
15600 (build_binary_op): Likewise.
15601 (build_x_compound_expr): Likewise.
15602 (check_return_expr): Likewise.
15603 * typeck2.c (add_exception_specifier): Likewise.
15605 * mangle.c (write_method_parms): Use direct comparison for end
15608 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
15610 * cp-tree.h (genrtl_try_block): Declare function.
15611 (genrtl_handler): Likewise.
15612 (genrtl_catch_block): Likewise.
15613 (genrtl_ctor_stmt): Likewise.
15614 (genrtl_subobject): Likewise.
15615 (genrtl_decl_cleanup): Likewise.
15616 (genrtl_do_poplevel): Likewise.
15617 (genrtl_do_pushlevel): Likewise.
15618 (genrtl_clear_out_block): Likewise.
15619 (genrtl_goto_stmt): Likewise.
15620 (genrtl_expr_stmt): Likewise.
15621 (genrtl_decl_stmt): Likewise.
15622 (genrtl_if_stmt): Likewise.
15623 (genrtl_while_stmt): Likewise.
15624 (genrtl_do_stmt): Likewise.
15625 (genrtl_return_stmt): Likewise.
15626 (genrtl_for_stmt): Likewise.
15627 (genrtl_break_stmt): Likewise.
15628 (genrtl_continue_stmt): Likewise.
15629 (genrtl_scope_stmt): Likewise.
15630 (genrtl_switch_stmt): Likewise.
15631 (genrtl_case_label): Likewise.
15632 (genrtl_begin_compound_stmt): Likewise.
15633 (genrtl_finish_compound_stmt): Likewise.
15634 (genrtl_compound_stmt): Likewise.
15635 (genrtl_asm_stmt): Likewise.
15636 (genrtl_named_return_value): Likewise.
15637 (genrtl_begin_stmt_expr): Likewise.
15638 (genrtl_finish_stmt_expr): Likewise.
15639 (finish_for_stmt): Removed first argument.
15640 (finish_switch_stmt): Likewise.
15642 * semantics.c (genrtl_try_block): Define function.
15643 (genrtl_handler): Likewise.
15644 (genrtl_catch_block): Likewise.
15645 (genrtl_ctor_stmt): Likewise.
15646 (genrtl_subobject): Likewise.
15647 (genrtl_decl_cleanup): Likewise.
15648 (genrtl_do_poplevel): Likewise.
15649 (genrtl_do_pushlevel): Likewise.
15650 (genrtl_clear_out_block): Likewise.
15651 (genrtl_goto_stmt): Likewise.
15652 (genrtl_expr_stmt): Likewise.
15653 (genrtl_decl_stmt): Likewise.
15654 (genrtl_if_stmt): Likewise.
15655 (genrtl_while_stmt): Likewise.
15656 (genrtl_do_stmt): Likewise.
15657 (genrtl_return_stmt): Likewise.
15658 (genrtl_for_stmt): Likewise.
15659 (genrtl_break_stmt): Likewise.
15660 (genrtl_continue_stmt): Likewise.
15661 (genrtl_scope_stmt): Likewise.
15662 (genrtl_switch_stmt): Likewise.
15663 (genrtl_case_label): Likewise.
15664 (genrtl_begin_compound_stmt): Likewise.
15665 (genrtl_finish_compound_stmt): Likewise.
15666 (genrtl_compound_stmt): Likewise.
15667 (genrtl_asm_stmt): Likewise.
15668 (genrtl_named_return_value): Likewise.
15669 (genrtl_begin_stmt_expr): Likewise.
15670 (genrtl_finish_stmt_expr): Likewise.
15671 (finish_for_stmt): Removed first argument and generate rtl
15673 (finish_switch_stmt): Likewise.
15674 (do_poplevel): Removed generate rtl specific code.
15675 (do_pushlevel): Likewise.
15676 (add_tree): Likewise.
15677 (finish_goto_stmt): Likewise.
15678 (finish_expr_stmt): Likewise.
15679 (begin_if_stmt): Likewise.
15680 (finish_if_stmt_cond): Likewise.
15681 (finish_then_clause): Likewise.
15682 (begin_else_clause): Likewise.
15683 (finish_else_clause): Likewise.
15684 (finish_if_stmt): Likewise.
15685 (clear_out_block): Likewise.
15686 (begin_while_stmt): Likewise.
15687 (finish_while_stmt_cond): Likewise.
15688 (finish_while_stmt): Likewise.
15689 (begin_do_stmt): Likewise.
15690 (finish_do_body): Likewise.
15691 (finish_do_stmt): Likewise.
15692 (finish_return_stmt): Likewise.
15693 (begin_for_stmt): Likewise.
15694 (finish_for_init_stmt): Likewise.
15695 (finish_for_cond): Likewise.
15696 (finish_for_expr): Likewise.
15697 (finish_break_stmt): Likewise.
15698 (finish_continue_stmt): Likewise.
15699 (begin_switch_stmt): Likewise.
15700 (finish_switch_cond): Likewise.
15701 (finish_case_label): Likewise.
15702 (begin_try_block): Likewise.
15703 (begin_function_try_block): Likewise.
15704 (finish_try_block): Likewise.
15705 (finish_cleanup_try_block): Likewise.
15706 (finish_cleanup): Likewise.
15707 (finish_function_try_block): Likewise.
15708 (finish_handler_sequence): Likewise.
15709 (finish_function_handler_sequence): Likewise.
15710 (begin_handler): Likewise.
15711 (finish_handler_parms): Likewise.
15712 (begin_catch_block): Likewise.
15713 (finish_handler): Likewise.
15714 (begin_compound_stmt): Likewise.
15715 (finish_compound_stmt): Likewise.
15716 (finish_asm_stmt): Likewise.
15717 (finish_label_stmt): Likewise.
15718 (finish_label_decl): Likewise.
15719 (finish_subobject): Likewise.
15720 (finish_decl_cleanup): Likewise.
15721 (finish_named_return_value): Likewise.
15722 (begin_stmt_expr): Likewise.
15723 (finish_stmt_expr): Likewise.
15725 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
15726 to call genrtl_expr_stmt when appropriate.
15728 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
15729 begin_compound_expr to call genrtl_begin_stmt_expr and
15730 genrtl_begin_compound_expr when appropriate.
15731 (finish_init_stmts): Changed calls to finish_compound_expr and
15732 finish_stmt_expr to call genrtl_finish_compound_expr and
15733 genrtl_finish_stmt_expr when appropriate.
15734 (expand_default_init): Changed call to finish_expr_stmt to call
15735 genrtl_expr_stmt when appropriate.
15736 (build_vec_init): Likewise.
15738 * parse.y (simple_stmt): Removed first argument from call to
15739 finish_for_stmt. Removed first argument from call to
15740 finish_switch_stmt.
15742 * parse.c: Regenerated.
15744 * pt.c (tsubst_expr): Removed first argument from call to
15745 finish_for_stmt. Removed first argument from call to
15746 finish_switch_stmt.
15748 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
15750 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
15751 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
15753 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
15754 (cplus_tree_code_length[]): Likewise.
15755 (cplus_tree_code_name[]): Likewise.
15756 (init_parse): Added call to add_c_tree_codes. Changed
15757 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
15759 2000-06-16 Mark Mitchell <mark@codesourcery.com>
15761 * cp-tree.h (finish_mem_initializers): Declare.
15762 (count_trees): Likewise.
15763 * parse.y (base_init): Use finish_mem_initializers.
15764 * semantics.c (finish_mem_initializers): New function.
15766 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
15767 the number of trees.
15769 (count_trees): Don't use it.
15771 2000-06-15 Jason Merrill <jason@redhat.com>
15773 * tree.c (count_trees): New debugging function.
15775 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
15776 * init.c (build_member_call): Pull out the name of a DECL.
15778 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
15779 * semantics.c (expand_body): Push to TV_INTEGRATION here.
15780 * optimize.c (optimize_function): Not here.
15781 * pt.c (instantiate_decl): Push to TV_PARSE.
15783 2000-06-15 Mark Mitchell <mark@codesourcery.com>
15785 * cp-tree.h (struct language_function): Remove x_base_init_list
15786 and x_member_init_list.
15787 (current_base_init_list): Remove.
15788 (current_member_init_list): Likewise.
15789 (setup_vtbl_ptr): Change prototype.
15790 (emit_base_init): Likewise.
15791 (expand_member_init): Likewise.
15792 (reinit_parse_for_function): Remove.
15793 * decl.c (save_function_data): Don't clear x_base_init_list and
15794 x_member_init_list.
15795 (mark_language_function): Don't mark them.
15796 * init.c (perform_member_init): Tweak comment.
15797 (sort_member_init): Take the list of initializers as an argument.
15798 (sort_base_init): Likewise.
15799 (emit_base_init): Likewise.
15800 (expand_member_init): Return the initializer. Don't use global
15802 * lex.c (reinit_parse_for_function): Remove.
15803 * method.c (build_template_parm_names): Correct substitution.
15804 (do_build_copy_constructor): Don't use current_member_init_list
15805 and current_base_init_list.
15806 (synthesize_method): Likewise.
15807 * parse.y (base_init): Split mem-initializers into
15808 base-initializers and field-initializers.
15809 (member_init_list): Build up the list here.
15810 (member_init): Return the initializer.
15811 (fn.depfn): Don't use reinit_parse_for_function.
15812 * parse.c: Regenerated.
15813 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
15815 (tsubst_expr): Don't use current_member_init_list
15816 and current_base_init_list.
15817 (tsubst_expr_values): Rename to ...
15818 (tsubst_initializer_list): ... this. Use convert_from_reference.
15819 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
15820 and current_base_init_list.
15821 (begin_function_definition): Don't call reinit_parse_for_function.
15823 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
15825 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
15828 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
15830 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
15832 * cp-tree.h (IF_COND): Move to c-common.h.
15833 (THEN_CLAUSE): Likewise.
15834 (ELSE_CLAUSE): Likewise.
15835 (WHILE_COND): Likewise.
15836 (WHILE_BODY): Likewise.
15837 (DO_COND): Likewise.
15838 (DO_BODY): Likewise.
15839 (RETURN_EXPR): Likewise.
15840 (EXPR_STMT_EXPR): Likewise.
15841 (FOR_INIT_STMT): Likewise.
15842 (FOR_COND): Likewise.
15843 (FOR_EXPR): Likewise.
15844 (FOR_BODY): Likewise.
15845 (SWITCH_COND): Likewise.
15846 (SWITCH_BODY): Likewise.
15847 (CASE_LOW): Likewise.
15848 (CASE_HIGH): Likewise.
15849 (GOTO_DESTINATION): Likewise.
15850 (COMPOUND_BODY): Likewise.
15851 (ASM_CV_QUAL): Likewise.
15852 (ASM_STRING): Likewise.
15853 (ASM_OUTPUTS): Likewise.
15854 (ASM_INPUTS): Likewise.
15855 (ASM_CLOBBERS): Likewise.
15856 (DECL_STMT_DECL): Likewise.
15857 (STMT_EXPR_STMT): Likewise.
15858 (LABEL_STMT_LABEL): Likewise.
15859 (SCOPE_BEGIN_P): Likewise.
15860 (SCOPE_END_P): Likewise.
15861 (SCOPE_STMT_BLOCK): Likewise.
15862 (SCOPE_NULLIFIED_P): Likewise.
15863 (SCOPE_NO_CLEANUPS_P): Likewise.
15864 (SCOPE_PARTIAL_P): Likewise.
15865 (ASM_VOLATILE_P): Likewise.
15866 (STMT_LINENO): Likewise.
15867 (STMT_LINENO_FOR_FN_P): Likewise.
15869 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
15870 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
15871 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
15872 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
15873 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
15875 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
15877 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
15878 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
15880 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
15881 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
15882 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
15884 2000-06-14 Mark Mitchell <mark@codesourcery.com>
15886 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
15887 * class.c (dfs_find_final_overrider): Set it appropriately.
15888 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
15889 avoid unneeded secondary vptrs.
15891 2000-06-13 Jakub Jelinek <jakub@redhat.com>
15893 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
15894 (check_bitfield_decl, check_field_decl): Likewise.
15895 (build_vtbl_or_vbase_field, build_base_field): Likewise.
15896 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
15897 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
15898 (xfer_tag, finish_enum): Likewise.
15899 * decl2.c (finish_builtin_type): Likewise.
15900 * init.c (init_init_processing): Likewise.
15901 * pt.c (instantiate_class_template): Likewise.
15902 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
15903 * cp-tree.h (struct lang_type): Add user_align member.
15904 (CLASSTYPE_USER_ALIGN): Define.
15906 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
15908 * Make-lang.in (c++.install-common): Install g++-cross in
15909 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
15910 $(target_alias)-g++ and $(target_alias)-c++.
15912 2000-06-12 Mark Mitchell <mark@codesourcery.com>
15914 * class.c (vcall_offset_data_s): Add last_init and fns.
15915 (overrides): Rename to same_signature_p.
15916 (dfs_find_final_overrider): Adjust accordingly.
15917 (mark_overriders): Likewise.
15918 (warn_hidden): Likewise.
15919 (build_vtbl_initializer): Reorganize machinery for building things
15920 at negative offsets.
15921 (build_vcall_and_vbase_vtbl_entries): Likewise.
15922 (build_vbase_offset_vtbl_entries): Likewise.
15923 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
15924 offset entries. Do not create two entries for functions with the
15926 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
15927 (build_rtti_vtbl_entries): Reorganize machinery for building things
15928 at negative offsets.
15930 * optimize.c (expand_call_inline): Don't recurse into the code
15931 used to initialize the parameters more than once.
15933 2000-06-11 Mark Mitchell <mark@codesourcery.com>
15935 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
15936 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
15937 (find_substitution): Only use the `Sa' substitution for
15938 std::allocator, not instantiations of it.
15939 (write_template_prefix): Move comment. Only use a TREE_LIST to
15940 represent substitutions for a member template.
15941 (write_array_type): Mangle array dimensions correctly.
15942 * optimize.c (maybe_clone_body): Copy more information from the
15944 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
15945 on the regenerated declaration.
15947 2000-06-11 Chip Salzenberg <chip@valinux.com>
15948 Mark Mitchell <mark@codesourcery.com>
15950 * class.c (build_vtable): Clarify comment.
15951 (build_ctor_vtbl_group): Pass the most derived type to
15954 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15956 * decl2.c (compare_options): Don't needlessly cast away const-ness.
15958 2000-06-10 Mark Mitchell <mark@codesourcery.com>
15960 * decl.c (add_binding): Handle duplicate declarations of external
15963 2000-06-09 Chip Salzenberg <chip@valinux.com>
15964 Mark Mitchell <mark@codesourcery.com>
15966 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
15968 (write_signed_number): New macro.
15969 (write_unsigned_number): Likewise.
15970 (write_source_name): Use them.
15971 (write_number): Handle signed and unsigned values.
15972 (write_integer_cst): Use tree_int_cst_sgn, and use
15973 write_unsigned_number or write_signed_number as appropriate.
15974 (write_discriminator): Use write_unsigned_number or
15975 write_signed_number as appropriate.
15976 (write_template_arg_literal): Likewise.
15977 (write_array_type): Use tree_low_cst.
15978 (write_template_parm): Use write_unsigned_number or
15979 write_signed_number as appropriate.
15980 (write_substitution): Adjust call to write_number.
15981 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
15982 (write_expression): Handle non-type template arguments of
15983 reference type correctly.
15984 (mangle_thunk): Use write_signed_number.
15986 2000-06-09 Chip Salzenberg <chip@valinux.com>
15988 * mangle.c (find_substition): Don't mangle objects with typename
15989 substitutions (e.g. "cin" as "Si").
15991 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
15993 * call.c (add_candidate): Use ggc_alloc_cleared.
15994 * decl.c (lookup_label): Likewise.
15995 * lex.c (retrofit_lang_decl): Likewise.
15997 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
15999 * semantics.c (expand_body): Push to TV_EXPAND.
16000 * optimize.c (optimize_function): Push to TV_INTEGRATION.
16001 * decl.c (start_function): Always call announce_function.
16003 * tinfo2.cc: Just declare abort.
16005 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
16007 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16008 whenever @ is a symbolic name.
16010 2000-06-08 Jakub Jelinek <jakub@redhat.com>
16012 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16014 2000-06-07 Mark Mitchell <mark@codesourcery.com>
16016 * decl.c (pushdecl): Look up functions by DECL_NAME, not
16017 DECL_ASSEMBLER_NAME.
16019 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16021 * decl2.c (c_language): Define.
16023 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
16025 * lex.c (lang_init_options): Tweak.
16027 * decl2.c: Remove #inclusion of diagnostic.h
16028 (lang_decode_option): Move diagnostic formatting options to
16031 * lang-options.h: Remove documentation for diagnostic options.
16033 * Makefile.in (lex.o): Depends upon diagnostic.h
16035 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16037 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16038 the same DECL_RESULT, it's not a redefinition.
16039 * pt.c (tsubst_decl): Remove code to handle illegal
16042 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
16044 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16046 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
16048 * search.c (maybe_suppress_debug_info): Don't check
16049 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16051 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16054 Remember instantiation context in deferred instantiations.
16055 * cp-tree.h (struct tinst_level): Remove.
16056 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16057 * pt.c (current_tinst_level): Now a tree.
16058 (print_template_context, push_tinst_level, pop_tinst_level,
16059 tinst_for_decl): Adjust.
16060 (reopen_tinst_level): New fn.
16061 (init_pt): Register current_tinst_level as a root.
16062 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16063 of the pending templates list.
16064 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
16065 * lex.c (extract_interface_info): Adjust.
16066 * decl2.c (warn_if_unknown_interface): Adjust.
16068 2000-06-05 Mark Mitchell <mark@codesourcery.com>
16070 * class.c (indirect_primary_base_p): New function.
16071 (determine_primary_base): Use it.
16073 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
16075 Update new-abi dynamic cast algorithm.
16076 * tinfo.cc (__class_type_info::__dyncast_result): Add
16077 whole_details. Adjust constructor.
16078 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16079 Avoid unnecessary searching.
16080 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16082 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16084 * decl.c (init_decl_processing): Don't call record_component_aliases.
16085 * tree.c (build_cplus_array_type_1): Likewise.
16087 2000-06-04 Mark Mitchell <mark@codesourcery.com>
16089 * ir.texi: Correct typo.
16090 * mangle.c (write_expression): Handle non-type template arguments
16091 with reference type.
16092 * method.c (build_overload_value): Likewise.
16093 * pt.c (convert_nontype_argument): Explicitly represent conversion
16094 to a reference with an ADDR_EXPR.
16095 (unify): Always unify arguments in left-to-right order.
16097 2000-06-03 Alex Samuel <samuel@codesourcery.com>
16098 Mark Mitchell <mark@codesourcery.com>
16100 * Make-lang.in (CXX_SRCS): Add mangle.c.
16101 * Makefile.in (CXX_OBJS): Add mangle.o.
16102 (mangle.o): New rule.
16104 * class.c (local_classes): New variable.
16105 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16106 (get_vtt_name): Use mangle_vtt_name for new ABI.
16107 (init_class_processing): Initialize local_classes.
16108 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16109 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16110 (std_identifier): New macro.
16111 (DECL_VOLATILE_MEMFUNC_P): New macro.
16112 (DECL_NAMESPACE_STD_P): Likewise.
16113 (local_classes): Declare.
16114 (get_mostly_instantiated_function_type): Declare.
16115 (init_mangle): Declare.
16116 (mangle_decl): Likewise.
16117 (mangle_type_string): Likewise.
16118 (mangle_type): Likewise.
16119 (mangle_typeinfo_for_type): Likewise.
16120 (mangle_typeinfo_string_for_type): Likewise.
16121 (mangle_vtbl_for_type): Likewise.
16122 (mangle_vtt_for_type): Likewise.
16123 (mangle_ctor_vtbl_for_type): Likewise.
16124 (mangle_thunk): Likewise.
16125 (mangle_conv_op_name_for_type): Likewise.
16126 (mangle_guard_variable): Likewise.
16127 * decl.c (pushtag): Keep track of local classes.
16128 (initialize_predefined_identifiers): Initialize std_identifier.
16129 (init_decl_processing): Use std_identifier.
16130 (start_decl): Don't treat instantiations as specializations.
16131 (grokdeclarator): Likewise.
16132 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
16133 name for fully-instantiated templates.
16134 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16135 destructors with the new ABI.
16136 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16137 (grokfield): Use mangle_type for new ABI.
16138 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16139 (get_sentry): Use mangle_guard_variable for new ABI.
16140 (start_static_initialization_or_destruction): Likewise.
16141 * expr.c (extract_aggr_init): Remove.
16142 (extract_scalar_init): Likewise.
16143 (extract_init): Remove #if 0'd code.
16144 * mangle.c: New function.
16145 * method.c (build_mangled_name): Assert not flag_new_abi.
16146 (build_static_name): Likewise.
16147 (build_decl_overload_real): Likewise.
16148 (build_typename_overload): Likewise.
16149 (build_overload_with_type): Likewise.
16150 (build_overload_name): Likewise.
16151 (get_ctor_vtbl_name): Likewise.
16152 (start_squangling): Likewise.
16153 (get_id_2): Likewise.
16154 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16155 (init_method): Call init_mangle for new ABI.
16156 (make_thunk): Call mangle_thunk for new ABI.
16157 * operators.def: Correct new ABI manglings for the `%' operator.
16159 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16160 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
16161 (lookup_template_class): Call mangle_decl for new ABI.
16162 (get_mostly_instantiated_function_type): New function.
16163 (set_mangled_name_for_template_decl): Use it.
16164 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
16165 the new ABI. Use mangle_conv_op_name_for_type for instantiated
16166 conversion op names.
16167 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
16168 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
16169 (tinfo_base_init): Likewise. Mangle typeinfo string name with
16170 mangle_typeinfo_string_for_type.
16172 2000-06-03 Mark Mitchell <mark@codesourcery.com>
16174 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
16175 (INNERMOST_TEMPLATE_ARGS): New macro.
16176 (innermost_args): Remove.
16177 (get_innermost_template_args): New function.
16178 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
16179 * error.c (dump_function_decl): Be caution when using
16180 most_general_template.
16181 * method.c (build_template_parm_names): Use
16182 INNERMOST_TEMPLATE_ARGS.
16183 * pt.c (add_to_template_args): Tidy comment
16184 (get_innermost_template_args): New function.
16185 (check_explicit_specialization): Clear DECL_INITIAL for a new
16187 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
16189 (push_template_decl): Always register specializations of the most
16191 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
16192 (coerce_template_parms): Likewise.
16193 (lookup_template_class): Likewise.
16194 (innermost_args): Remove.
16195 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
16196 (tsubst_decl): Handle tricky specializations. Use
16197 get_innermost_template_args.
16198 (instantiate_template): Simplify handling of partial
16200 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
16201 (most_general_template): Reimplement, in a more straightforward
16203 (regenerate_decl_from_template): Tweak formatting. Use
16204 TMPL_ARGS_DEPTH for clarity.
16205 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
16207 * dump.c (dequeue_and_dump): Dump information about thunks.
16209 2000-06-01 Richard Henderson <rth@cygnus.com>
16211 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
16213 2000-06-01 Richard Henderson <rth@cygnus.com>
16215 * decl2.c (unsupported_options): Fix typo, make const.
16216 (lang_decode_option): Fix bsearch argument order.
16218 2000-06-01 Mark Mitchell <mark@codesourcery.com>
16220 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
16223 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16225 * cp-tree.h (c_get_alias_set): Deleted.
16226 * Makefile.in (decl.o): Include ../expr.h.
16227 * decl.c (expr.h): Include.
16228 (init_decl_processing): Call record_component_aliases for arrays.
16229 (grokdeclarator): Likewise.
16230 Set TREE_ADDRESSABLE for fields that aren't bitfields.
16231 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
16233 2000-05-31 Mark Mitchell <mark@codesourcery.com>
16235 Remove guiding declaration support.
16236 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
16237 (flag_guiding_decls): Remove.
16238 * call.c (build_user_type_conversion_1): Remove support for
16240 (build_new_function_call): Likewise.
16241 (build_new_op): Likewise.
16242 (build_new_method_call): Likewise.
16243 * decl.c (start_function): Likewise.
16244 * friend.c (is_friend): Likewise.
16245 (do_friend): Likewise.
16246 * decl2.c ((flag_dump_translation_unit): Make it const.
16247 (flag_guiding_decls): Remove.
16248 (unsupported_options): New variable
16249 (compare_options): New function.
16250 (lang_decode_option): Use them.
16252 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
16254 * method.c (mangle_expression): Adjust test for legal expression
16257 * pt.c (instantiate_decl): Save and restore the local
16258 specializations list.
16260 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
16262 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
16264 2000-05-30 Mark Mitchell <mark@codesourcery.com>
16266 * call.c (add_template_candidate_real): Handle member template
16267 constructors for classes with virtual bases.
16268 (build_user_type_conversion_1): Use in_charge_arg_for_name.
16269 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
16271 * ir.texi: Update thunk documentation.
16273 * call.c (joust): Fix handling of overloaded builtin operators.
16275 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
16277 * cp-tree.h (DECL_ANTICIPATED): New macro.
16278 Document new use of DECL_LANG_FLAG_7.
16279 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
16280 in the user namespace.
16281 * lex.c (do_identifier): If the identifier's declaration has
16282 DECL_ANTICIPATED on, it has not yet been declared. But do not
16283 replace it with an ordinary implicit declaration.
16285 * tinfo2.cc: Include stdlib.h.
16287 2000-05-29 Mark Mitchell <mark@codesourcery.com>
16289 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
16290 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
16293 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
16295 * decl2.c (lang_decode_option): Use skip_leading_substring instead
16298 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
16300 * operators.def (<?): Duplicated, should have been...
16303 2000-05-27 Alex Samuel <samuel@codesourcery.com>
16304 Mark Mitchell <mark@codesourcery.com>
16306 * cp-tree.h (ansi_opname): Make it a macro.
16307 (ansi_assopname): Likewise.
16308 (struct lang_decl_flags): Add assignment_operator_p.
16309 (struct lang_decl): Add operator_code.
16310 (DECL_VTT_PARM): Adjust.
16311 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
16312 overloaded operator.
16313 (SET_OVERLOADED_OPERATOR_CODE): New macro.
16314 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
16315 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
16316 (opname_tab): Remove.
16317 (assignop_tab): Likewise.
16318 (operator_name_info_t): New type.
16319 (operator_name_info): New variable.
16320 (assignment_operator_name_info): Likewise.
16321 (build_cp_library_fn): Remove declaration.
16322 (push_cp_library_fn): Likewise.
16323 (operator_name_string): Likewise.
16324 (build_decl_overload): Likewise.
16325 * call.c (print_z_candidates): Simplify.
16326 (build_object_call): Adjust usage of ansi_opname. Use
16327 DECL_OVERLOADED_OPERATOR_P.
16328 (op_error): Adjust operator name lookup.
16329 (build_conditional_expr): Adjust usage of ansi_opname.
16330 (build_new_op): Likewise.
16331 (build_op_delete_call): Likewise.
16332 (build_over_call): Likewise.
16333 (joust): Use DECL_OVERLOADED_OPERATOR_P.
16334 * decl.c (duplicate_decls): Copy operator_code.
16335 (init_decl_processing): Adjust parameters to push_cp_library_fn.
16336 (builtin_function): Adjust parameters to build_library_fn_1.
16337 (build_library_fn_1): Accept an overloaded operator code.
16338 (build_library_fn): Pass ERROR_MARK.
16339 (build_cp_library_fn): Accept an overloaded operator code.
16340 (push_cp_library_fn): Likewise.
16341 (grokfndecl): Tweak.
16342 (grokdeclarator): Simplify code to compute names of overloaded
16343 operators. Adjust use of ansi_opname.
16344 (ambi_op_p): Work on tree_codes, not identifiers.
16345 (unary_op_p): Likewise.
16346 (grok_op_properties): Likewise.
16347 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
16348 (lang_mark_tree): Don't try to mark the operator_code.
16349 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
16350 * error.c (dump_decl): Remove special handling for operator
16352 (dump_function_name): Likewise.
16353 (dump_expr): Adjust name lookup of operators.
16354 (op_to_string): Simplify.
16355 (assop_to_string): Likewise.
16356 * init.c (build_new_1): Adjust use of ansi_opname.
16357 * lex.c (opname_tab): Remove.
16358 (assignop_tab): Likewise.
16359 (ansi_opname): Likewise.
16360 (ansi_assopname): Likewise.
16361 (operator_name_string): Likewise.
16362 (reinit_lang_specific): Likewise.
16363 (operator_name_info): New variable.
16364 (assignment_operator_name_info): Likewise.
16365 (init_operators): New function.
16366 (init_parse): Use it.
16367 (do_identifier): Adjust use of ansi_opname.
16368 * method.c (mangle_expression): Don't use ansi_opname for
16370 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
16371 (build_decl_overload): Remove.
16372 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
16373 (do_build_assign_ref): Adjust use of ansi_opname.
16374 (synthesize_method): Likewise.
16375 (implicitly_declare_fn): Likewise.
16376 * operators.def: New file.
16377 * parse.y (operator): Adjust use of ansi_opname.
16378 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
16379 (set_mangled_name_for_template_decl): Don't play games with
16381 (special_function_p): Adjust use of ansi_opname.
16382 * typeck.c (check_return_expr): Likewise.
16383 * Make-lang.in (cc1plus): Depend on operators.def.
16384 * Makefile.in (lex.o): Likewise.
16385 (decl.o): Likewise.
16387 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
16389 * Make-lang.in (cplib2.ready): Eradicate.
16391 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16393 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16394 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16395 (built_min, cp_tree_equal): Likewise.
16397 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16399 * class.c (layout_nonempty_base_or_field): Replace
16400 `record_layout_info' with `record_layout_info_s'.
16402 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
16405 * cp-tree.h (struct language_function): x_named_labels is now
16406 a struct named_label_list*.
16407 * decl.c (struct named_label_use_list): Renamed from...
16408 (struct named_label_list): ...this. New struct.
16409 (push_binding_level): Don't set eh_region.
16410 (note_level_for_eh): New fn.
16411 (pop_label): Take label and old value directly.
16412 (pop_labels): Adjust for new named_labels format.
16413 (lookup_label): Likewise.
16414 (poplevel): Note characteristics of a binding level containing a
16415 named label. Mess with named label lists earlier.
16416 (mark_named_label_lists): New fn.
16417 (mark_lang_function): Call it.
16418 (use_label): New fn, split out from...
16419 (make_label_decl): ...here. Don't call it.
16420 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16421 check_previous_gotos): New fns, split out from...
16422 (define_label): ...here.
16423 (check_switch_goto): New fn.
16424 (define_case_label): Call it.
16425 (check_goto): New fn.
16426 * semantics.c (finish_goto_stmt): Call it and use_label.
16427 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16428 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16430 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16432 * class.c (build_vtable_entry_ref): Correct usage of
16433 get_vtbl_decl_for_binfo.
16435 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16436 * method.c (implicitly_declare_fn): Not here.
16438 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
16440 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16441 (CPTI_PTMD_DESC_TYPE): ... here.
16442 (ptmd_desc_type_node): Rename to ...
16443 (ptm_desc_type_node): ... here.
16444 * decl.c: Likewise.
16445 * rtti.c (ptmd_initializer): Rename to ...
16446 (ptm_initializer): ... here.
16447 (sythesize_tinfo_var): Adjust. Deal with pointer to member
16449 (create_tinfo_types): Adjust.
16451 2000-05-25 Mark Mitchell <mark@codesourcery.com>
16453 Finish implementation of VTTs.
16454 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16455 CPTI_VTT_PARM_IDENTIFIER.
16456 (vtt_parm_identifier): New macro.
16457 (vtt_parm_type): Likewise.
16458 (BINFO_SUBVTT_INDEX): Likewise.
16459 (BINFO_VPTR_INDEX): Likewise.
16460 (struct lang_decl): Add vtt_parm.
16461 (DECL_VTT_PARM): New macro.
16462 (DECL_USE_VTT_PARM): Likewise.
16463 (DECL_NEEDS_VTT_PARM_P): Likewise.
16464 (get_vtt_name): Declare.
16465 (build_artificial_parm): Likewise.
16466 (fixup_all_virtual_upcast_offsets): Likewise.
16467 (expand_indirect_vtbls_init): Remove.
16468 * call.c (build_new_method_call): Pass the vtt to subobject
16469 constructors and destructors.
16470 * class.c (get_vtt_name): Give it external linkage.
16471 (build_clone): Handle the magic VTT parameters for clones.
16472 (clone_function_decl): Fix typo in comment.
16473 (build_vtt): Keep track of the indices in the VTTs where various
16474 entities are stored.
16475 (build_vtt_inits): Likewise.
16476 (dfs_build_vtt_inits): Likewise.
16477 (build_ctor_vtbl_group): Tweak type of construction vtables.
16478 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16479 primary bases, when building construction vtables.
16480 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16481 (initialize_predefined_identifiers): Add vtt_parm_identifier.
16482 (init_decl_processing): Initialize vtt_parm_type.
16483 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16484 (lang_mark_tree): Make vtt_parm.
16485 * decl2.c (build_artificial_parm): New function.
16486 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
16487 (grokclassfn): Use build_artificial_parm.
16488 * init.c (initialize_vtbl_ptrs): Call
16489 fixup_all_virtual_upcast_offsets directly.
16490 (perform_member_init): Use the complete subobject destructor for
16492 (build_vtbl_address): New function.
16493 (expand_virtual_init): Handle VTTs.
16494 * optimize (maybe_clone_body): Likewise.
16495 * search.c (fixup_all_virtual_upcast_offsets): Give it external
16497 (expand_indirect_vtbls_init): Remove.
16498 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16499 * tree.c (make_binfo): Make them bigger.
16501 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16503 * inc/cxxabi.h (__pbase_type_info): Define, based on
16504 __pointer_type_info.
16505 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16506 (__pointer_to_member_type_info): Likewise.
16507 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16508 (__pointer_to_member_type_info::__is_pointer_p): Remove.
16509 (__pointer_type_info::__do_catch): Rename to ...
16510 (__pbase_type_info::__do_catch): ... here. Adjust.
16511 (__pbase_type_info::__pointer_catch): Implement.
16512 (__pointer_type_info::__pointer_catch): Adjust.
16513 (__pointer_to_member_type_info::__pointer_catch): Adjust.
16515 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16517 * tinfo.h (__user_type_info::contained_virtual_p): New
16519 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16521 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16522 diamond shaped hierarchy. Add early out for mixed diamond and
16523 duplicate shaped hierarchy.
16525 2000-05-24 Mark Mitchell <mark@codesourcery.com>
16527 * cp-tree.h (build_delete): Change prototype.
16528 (build_vec_delete): Likewise.
16529 * call.c (build_scoped_method_call): Use special_function_kind
16530 values to indicate the kind of destruction to be done.
16531 (build_method_call): Likewise.
16532 * decl.c (finish_destructor_body): Likewise.
16533 (maybe_build_cleanup_1): Likewise. Rename to ...
16534 (maybe_build_cleanup): ... this.
16535 * decl2.c (delete_sanity): Use special_function_kind
16536 values to indicate the kind of destruction to be done.
16537 (build_cleanup): Likewise.
16538 * init.c (perform_member_init): Likewise.
16539 (build_vec_delete_1): Likewise.
16540 (build_dtor_call): Simplify.
16541 (build_delete): Use special_function_kind
16542 values to indicate the kind of destruction to be done.
16543 (build_vbase_delete): Likewise.
16544 (build_vec_delete): Likewise.
16546 * init.c (sort_member_init): Fix typo in error message generation
16549 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
16551 * semantics.c (begin_class_definition): make the packed
16552 attribute be sensitive to the "-fpack-struct" command line flag
16554 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
16556 Update new-abi upcast algorithm.
16557 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16558 prototype and meaning of return value.
16559 (__si_class_type_info::__do_upcast): Likewise.
16560 (__vmi_class_type_info::__do_upcast): Likewise.
16561 * tinfo.cc (__class_type_info::__upcast_result): Replace
16562 whole2dst with part2dst. Adjust ctor.
16563 (__class_type_info::__do_upcast): Adjust call of worker function.
16564 (__class_type_info::__do_upcast): Adjust.
16565 (__si_class_type_info::__do_upcast): Adjust. Use parent's
16567 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16568 virtual base in diamond hierarchy bug.
16570 2000-05-23 Mark Mitchell <mark@codesourcery.com>
16572 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16573 and bitfield to tinfo_fn_p.
16574 (DECL_TINFO_FN_P): Adjust.
16575 (SET_DECL_TINFO_FN_P): Likewise.
16576 (DECL_MUTABLE_P): Likewise.
16577 (DECL_C_BIT_FIELD): Likewise.
16578 (SET_DECL_C_BIT_FIELD): Likewise.
16579 (CLEAR_DECL_C_BIT_FIELD): Likewise.
16580 (DECL_UNINLINABLE): Likewise.
16581 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
16582 (handle_using_decl): Remove assertion.
16583 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
16584 to build FIELD_DECLs.
16585 (build_base_field): Likewise.
16586 (layout_class_type): Likewise.
16587 * decl.c (init_decl_processing): Likewise.
16588 (build_ptrmemfunc_type): Likewise.
16589 (grokdeclarator): Likewise.
16590 * decl2.c (grok_x_components): Likewise.
16591 * except.c (call_eh_info): Likewise.
16592 * init.c (init_init_processing): Likewise.
16593 * rtti.c (expand_class_desc): Likewise.
16594 (create_pseudo_type_info): Likewise.
16595 (get_vmi_pseudo_type_info): Likewise.
16596 (create_tinfo_types): Likewise.
16597 * ptree.c (print_lang_decl): Adjust.
16598 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
16599 before checking DECL_MUTABLE_P.
16601 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
16602 parameters for template functions.
16603 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
16604 destructors as well as constructors.
16606 2000-05-22 Mark Mitchell <mark@codesourcery.com>
16608 * class.c (build_ctor_vtbl_group): Set inits.
16609 * optimize.c (maybe_clone_body): Set DECL_INLINE and
16610 DECL_THIS_INLINE appropriately for clones.
16612 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
16613 (DECL_CONV_FN_P): Simplify.
16614 (DECL_OPERATOR): Remove.
16615 (language_to_string): Declare.
16616 * decl.c (duplicate_decls): Fix typo in comment.
16617 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
16618 (grok_op_properties): Use DECL_CONV_FN_P instead of
16619 IDENTIFIER_TYPENAME_P.
16620 * dump.c (dequeue_and_dump): Dump the language linkage of
16622 * error.c (language_to_string): Give it external linkage.
16623 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
16624 (implicitly_declare_fn): Set DECL_LANGUAGE.
16625 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
16626 IDENTIFIER_TYPENAME_P.
16627 (tsubst_decl): Likewise.
16628 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
16629 * semantics.c (finish_member_declaration): Don't mark members of
16630 classes declared in an extern "C" region as extern "C".
16632 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16634 * decl2.c (qualified_lookup_using_namespace): Look through
16637 * decl.c (push_using_decl): Return the old decl on namespace level.
16639 2000-05-21 Mark Mitchell <mark@codesourcery.com>
16641 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
16642 (VTT_NAME_PREFIX): New macro.
16643 (CTOR_VTBL_NAME_PREFIX): Likewise.
16644 (get_ctor_vtbl_name): New function.
16645 * class.c (get_vtable_name): Simplify.
16646 (get_vtt_name): New function.
16647 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
16648 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
16649 when a virtual base becomes primary.
16650 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
16652 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
16653 additional parameters.
16654 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
16655 (initialize_array): New function.
16656 (build_vtt): Likewise.
16657 (build_vtt_inits): Likewise.
16658 (dfs_build_vtt_inits): Likewise.
16659 (dfs_fixup_binfo_vtbls): Likewise.
16660 (build_ctor_vtbl_group): Likewise.
16661 (initialize_vtable): Use initialize_array.
16662 (accumulate_vtbl_inits): Reimplement to handle construction
16664 (dfs_accumulate_vtbl_inits): Likewise.
16665 (bulid_vtbl_initializer): Adjust parameter name.
16666 * method.c (build_typename_overload): Remove #if 0'd code.
16667 (get_ctor_vtbl_name): New function.
16668 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
16669 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
16671 * cp-tree.h (struct lang_type): Remove search_slot.
16672 (CLASSTYPE_SEARCH_SLOT): Remove.
16673 (emit_base_init): Change prototype.
16674 (initialize_vtbl_ptrs): Likewise.
16675 (expand_indirect_vtbls_init): Likewise.
16676 (clear_search_slots): Remove.
16677 * decl.c (lang_mark_tree): Don't mark search_slot.
16678 * init.c (initialize_vtbl_ptrs): Simplify.
16679 (emit_base_init): Likewise.
16680 * search.c (struct vbase_info): Document decl_ptr.
16681 (convert_pointer_to_single_level): Remove.
16682 (dfs_find_vbases): Remove.
16683 (dfs_init_base_pointers): Simplify.
16684 (dfs_clear_vbase_slots): Remove.
16685 (dfs_vtable_path_unmark): New function.
16686 (init_vbase_pointers): Simplify.
16687 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
16688 (expand_indirect_vtbls_init): Simplify. Don't call
16689 mark_all_temps_used.
16690 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
16691 initialize_vtbl_ptrs.
16693 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
16695 * except.c: Add static prototypes.
16697 2000-05-20 H.J. Lu <hjl@gnu.org>
16699 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
16701 2000-05-19 Mark Mitchell <mark@codesourcery.com>
16703 Don't create a separate copy of virtual bases for the
16704 CLASSTYPE_VBASECLASSES list.
16705 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
16706 (BINFO_FOR_VBASE): Remove.
16707 (CANONICAL_BINFO): Adjust.
16708 (binfo_for_vbase): New function.
16709 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
16710 instead of BINFO_FOR_VBASE.
16711 (build_vbase_pointer): Likewise.
16712 (build_secondary_vtable): Likewise.
16713 (dfs_mark_primary_bases): Likewise.
16714 (mark_primary_bases): Likewise.
16715 (layout_nonempty_base_or_field): Likewise.
16716 (dfs_set_offset_for_shared_vbases): Likewise.
16717 (dfs_set_offset_for_unshared_vbases): Likewise.
16718 (layout_virtual_bases): Likewise. Adjust for changes to the
16719 CLASSTYPE_VBASECLASSES list.
16720 (dump_class_hierarchy_r): Use binfo_for_vbase
16721 instead of BINFO_FOR_VBASE.
16722 (dump_class_hierarchy): Likewise.
16723 (finish_vtbls): Likewise.
16724 (build_vtbl_initializer): Adjust for changes to the
16725 CLASSTYPE_VBASECLASSES list.
16726 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
16727 * decl.c (finish_destructor_body): Adjust for changes to the
16728 CLASSTYPE_VBASECLASSES list.
16729 * init.c (sort_base_init): Use binfo_for_vbase.
16730 (construct_virtual_bases): Adjust for changes to the
16731 CLASSTYPE_VBASECLASSES list.
16732 (expand_member_init): Use binfo_for_vbase.
16733 (build_vbase_delete): Adjust for changes to the
16734 CLASSTYPE_VBASECLASSES list.
16735 * method.c (do_build_copy_constructor): Likewise.
16736 * rtti.c (get_base_offset): Use binfo_for_vbase.
16737 (expand_class_desc): Remove #if 0'd code.
16738 * search.c (struct vbase_info): Remove vbase_types.
16739 (get_base_distance): Use binfo_for_vbase.
16740 (lookup_field_queue_p): Use CANONICAL_BINFO.
16741 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
16742 (get_pure_virtuals): Adjust for changes to the
16743 CLASSTYPE_VBASECLASSES list.
16744 (dfs_find_vbases): Use binfo_for_vbase.
16745 (dfs_init_vbase_pointers): Likewise.
16746 (init_vbase_pointers): Don't initialize vi.vbase_types.
16747 (virtual_context): Use binfo_for_vbase.
16748 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
16749 CLASSTYPE_VBASECLASSES list.
16750 (expand_indirect_vtbls_init): Simplify.
16751 (dfs_get_vbase_types): Don't replicate virtual bases.
16752 (find_vbase_instance): Use binfo_for_vbase.
16753 (binfo_for_vbase): New function.
16754 * typeck.c (get_delta_difference): Use binfo_for_vbase.
16756 2000-05-17 Mark Mitchell <mark@codesourcery.com>
16758 * decl2.c (finish_anon_union): Generalize error messages to handle
16759 anonymous structures.
16760 * init.c (perform_member_init): Remove `name' parameter.
16761 (build_field_list): New function.
16762 (sort_member_init): Handle anonymous union initialization order
16763 correctly. Check for multiple initializations of the same union.
16764 (emit_base_init): Don't look up fields by name here.
16765 (expand_member_init): Record the result of name lookup for future
16767 * typeck.c (build_component_ref): Fix formatting.
16769 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
16771 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
16772 * typeck.c (build_x_compound_expr): Replace warn_unused with
16775 * decl2.c (lang_decode_option): Update -Wall unused flags by
16776 calling set_Wunused.
16778 2000-05-16 Mark Mitchell <mark@codesourcery.com>
16780 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
16781 * init.c (dfs_vtable_path_unmark): Remove.
16782 * search.c (marked_new_vtable_p): Likewise.
16783 (unmarked_new_vtable_p): Likewise.
16784 (dfs_search_slot_nonempty_p): Likewise.
16785 (dfs_mark): Likewise.
16786 (dfs_vtable_path_unmark): Likewise.
16787 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
16788 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
16789 (dfs_init_vbase_pointers): Remove special-case new ABI code.
16790 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
16791 (init_vbase_pointers): Simplify.
16792 (expand_indirect_vtbls_init): Likewise.
16794 * class.c (copy_virtuals): New function.
16795 (build_primary_table): Use it.
16796 (build_secondary_vtable): Likewise.
16797 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
16798 indicate that no vcall offset is required.
16799 (add_virtual_function): Likewise.
16800 (modify_all_vtables): Likewise.
16801 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16802 (dfs_accumulate_vtbl_inits): Likewise.
16803 (build_vtbl_initializer): Make changes to handle construction
16805 (dfs_build_vcall_offset_vtbl_entries): Likewise.
16806 (build_rtti_vtbl_entries): Likewise.
16807 (build_vtable_entries): Handle a NULL vcall_index.
16809 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
16811 * decl2.c (lang_decode_option): Fix thinko.
16813 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
16815 * except.c (check_handlers): New fn.
16816 * cp-tree.h: Declare it.
16817 * semantics.c (finish_handler_sequence): Call it.
16818 (finish_function_handler_sequence): Likewise.
16819 (finish_handler_parms): Set TREE_TYPE on the handler.
16820 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
16821 * search.c (get_base_distance_recursive): If protect>1, ignore
16823 (get_base_distance): Don't reduce watch_access.
16825 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
16827 * lex.c: #include diagnostic.h.
16828 (lang_init_options): Set default prefixing rules.
16830 * lang-options.h: Add -fdiagnostics-show-location=.
16832 * decl2.c: #include diagnostic.h.
16833 (lang_decode_option): Handle -fdiagnostics-show-location=.
16835 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
16837 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
16838 * vec.cc: Revert my 2000-05-07 change.
16840 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
16842 * class.c (check_field_decls): Complain about non-static data
16843 members with same name as class in class with constructor.
16845 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
16847 * decl.c (grokdeclarator): Allow non-static data members with
16848 same name as class.
16850 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
16852 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
16853 and pending_inline.filename. Update prototypes.
16854 * decl.c (define_label): Constify filename parameter.
16855 * decl2.c (warn_if_unknown_interface): Constify local char *.
16856 * input.c Constify input_source.filename. Don't declare
16857 input_filename or lineno. Constify filename parameter to feed_input.
16858 * lex.c (init_parse): Constify parameter and return value.
16859 (cp_pragma_interface, cp_pragma_implementation): Constify
16861 (reinit_parse_for_method, reinit_parse_for_block,
16862 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
16863 Constify local char *.
16864 * pt.c: Don't declare lineno or input_filename.
16865 (print_template_context, tsubst_friend_function, tsubst_decl,
16866 tsubst, instantiate_decl): Constify local char *.
16867 * semantics.c (expand_body): Constify local char *.
16868 * tree.c (build_srcloc): Constify filename parameter.
16869 * typeck.c (c_expand_asm_operands): Constify filename
16872 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
16874 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
16875 offsetof expansion.
16877 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
16879 * inc/cxxabi.h: Fix typos in comment.
16880 (__base_class_info::__offset): Use a static_cast.
16882 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
16884 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
16885 of std::size_t and std::ptrdiff_t respectively.
16886 * tinfo.cc: Likewise.
16887 * vec.cc: Likewise.
16889 2000-05-06 Richard Henderson <rth@cygnus.com>
16891 * typeck.c (build_c_cast): Don't warn integer->pointer size
16892 mismatch for constants.
16894 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
16896 * rtti.c (ptmd_initializer): Set non-public, if class is
16899 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
16900 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16901 __cxa_vec_delete): Likewise.
16902 * tinfo.cc (__dynamic_cast): Likewise.
16903 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16904 __cxa_vec_delete): Likewise.
16906 2000-05-04 Mark Mitchell <mark@codesourcery.com>
16908 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
16909 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
16910 (lang_decl_flags): Add vcall_offset.
16911 (THUNK_VCALL_OFFSET): Use it.
16912 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
16913 * method.c (make_thunk): Create the lang_decl here, not in
16915 (emit_thunk): Make generic thunks into ordinary functions once
16916 they have been fed to expand_body.
16917 * semantics.c (expand_body): Set current_function_is_thunk here.
16919 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16921 * class.c (update_vtable_entry_for_fn): Prototype.
16923 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
16926 * search.c (dfs_build_inheritance_graph_order): Prototype.
16928 2000-05-04 Mark Mitchell <mark@codesourcery.com>
16930 * cp-tree.h (special_function_kind): Add various kinds of
16932 (special_function_p): New function.
16933 * class.c (overrides): Don't let one kind of destructor override
16935 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
16936 whether or not to instantiate a template.
16937 * tree.c (special_function_p): Define.
16939 2000-05-03 Mark Mitchell <mark@codesourcery.com>
16941 * cp-tree.def (THUNK_DECL): Remove.
16942 * cp-tree.h (DECL_THUNK_P): New macro.
16943 (DECL_NON_THUNK_FUNCTION_P): Likewise.
16944 (DECL_EXTERN_C_FUNCTION_P): Likewise.
16945 (SET_DECL_THUNK_P): Likewise.
16946 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
16947 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
16948 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
16949 * decl.c (decls_match): Use DECL_EXTERN_C_P.
16950 (duplicate_decls): Likewise.
16951 (pushdecl): Likewise. Adjust thunk handling.
16952 (grokfndecl): Use DECL_EXTERN_C_P.
16953 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
16954 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
16955 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
16956 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
16957 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
16958 DECL_NO_STATIC_CHAIN.
16959 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
16960 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
16961 * search.c (covariant_return_p): Remove THUNK_DECL handling.
16964 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
16966 * tree.c (walk_tree): Set lineno.
16968 2000-05-01 Mark Mitchell <mark@codesourcery.com>
16970 * exception.cc: Update license notice.
16971 * new.cc: Likewise.
16972 * new1.cc: Likewise.
16973 * new2.cc: Likewise.
16974 * tinfo.cc: Likewise.
16975 * tinfo2.cc: Likewise.
16976 * vec.cc: Likewise.
16977 * inc/cxxabi.h: Likewise.
16978 * inc/exception: Likewise.
16979 * inc/new: Likewise.
16980 * inc/new.h: Likewise.
16981 * inc/typeinfo: Likewise.
16983 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
16985 * tree.c (build_target_expr_with_type): If we already have a
16986 TARGET_EXPR, just return it.
16988 * optimize.c (initialize_inlined_parameters): Don't generate an
16989 EXPR_STMT if we can just use DECL_INITIAL.
16990 * decl.c (emit_local_var): Only make the initialization a
16991 full-expression if stmts_are_full_exprs_p.
16993 2000-05-01 Mark Mitchell <mark@codesourcery.com>
16995 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
16997 * call.c (standard_conversion): Use it.
16998 (direct_reference_binding): Likewise.
16999 (build_over_call): Likewise.
17000 (is_properly_derived_from): Likewise.
17001 (compare_ics): Likewise.
17002 * class.c (resolves_to_fixed_type_p): Likewise.
17003 * optimize.c (declare_return_variable): Likewise.
17004 * pt.c (is_specialization_of): Likewise.
17006 * typeck.c (comp_target_parms): Likeiwse.
17007 (build_static_cast): Likewise.
17008 (build_reinterpret_cast): Likewise.
17009 (build_const_cast): Likewise.
17010 (comp_ptr_ttypes_real): Likewise.
17011 (comp_ptr_ttypes_const): Likewise.
17012 * typeck2.c (process_init_constructor): Likewise.
17014 2000-04-30 Scott Snyder <snyder@fnal.gov>
17016 * decl.c (finish_destructor_body): Use the base destructor when
17017 destroying virtual bases.
17019 2000-04-30 Mark Mitchell <mark@codesourcery.com>
17021 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17023 * optimize.c (struct inline_data): Add target_exprs field.
17024 (declare_return_variable): When a function returns an aggregate,
17025 use the variable declared in the TARGET_EXPR as the remapped
17027 (expand_call_inline): Update the pending target_exprs stack.
17028 (optimize_function): Initialize the stack.
17030 * decl2.c (finish_file): Fix typo in comment.
17032 * method.c (emit_thunk): Don't try to return a `void' value.
17034 * optimize.c (initialize_inlined_parameters): If the parameter is
17035 addressable, we need to make a new VAR_DECL, even if the
17036 initializer is constant.
17038 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
17040 * decl.c (grok_op_properties): Add an extra check of argtypes.
17042 2000-04-27 Mark Mitchell <mark@codesourcery.com>
17044 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17046 (initialize_inlined_parameters): Try to avoid creating new
17049 2000-04-27 Alex Samuel <samuel@codesourcery.com>
17051 * lex.c (my_get_run_time): Remove.
17052 (init_filename_times): Use get_run_time instead of my_get_run_time.
17053 (check_newline): Likewise.
17054 (dump_time_statistics): Likewise.
17055 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17056 of computing elapsed time explicitly.
17058 2000-04-26 Mark Mitchell <mark@codesourcery.com>
17060 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17061 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17062 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17063 before calling decl_constant_value.
17064 * class.c (check_bitfield_decl): Likewise.
17065 * cvt.c (ocp_convert): Likewise.
17066 (convert): Likewise.
17067 * decl.c (compute_array_index_type): Likewise.
17068 (build_enumerator): Likewise.
17069 * decl2.c (check_cp_case_value): Likewise.
17070 * pt.c (convert_nontype_argument): Likewise.
17071 (tsubst): Likewise.
17072 * typeck.c (decay_conversion): Likewise.
17073 (build_compound_expr): Likewise.
17074 (build_reinterpret_cast): Likewise.
17075 (build_c_cast): Likewise.
17076 (convert_for_assignment): Likewise.
17078 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
17080 * decl.c (finish_function): Don't play games with DECL_INLINE.
17082 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
17084 * ir.texi: Correct typo.
17086 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17088 * decl.c (grokdeclarator): Reject VLAs as members.
17090 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
17092 * call.c (standard_conversion): Accept conversion between
17095 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17097 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
17099 * decl2.c (finish_file): Remove double setup for accounting
17102 2000-04-24 Robert Lipe <robertlipe@usa.net>
17104 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17106 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
17108 * new.cc (set_new_handler): Needs to be in std::.
17110 2000-04-23 Mark Mitchell <mark@codesourcery.com>
17112 * cp-tree.h (lang_decl): Remove pretty_function_p.
17113 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17114 language-specific node.
17115 * decl.c (cp_make_fname_decl): Use build_decl, not
17116 build_lang_decl, to build the variables.
17117 (grokvardecl): Don't call build_lang_decl for local variables in
17119 (grokdeclarator): Don't call build_lang_decl for local type
17120 declarations in templates.
17121 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17122 zero'd memory, rather than calling memset.
17123 * pt.c: Include hashtab.h.
17124 (local_specializations): New variable.
17125 (retrieve_local_specialization): Use it.
17126 (register_local_specialization): Likewise.
17127 (tsubst_decl): Don't assume local variables have
17128 DECL_LANG_SPECIFIC.
17129 (instantiate_decl): Set up local_specializations.
17130 * Makefile.in (HTAB_H): New variable.
17132 2000-04-23 Richard Henderson <rth@cygnus.com>
17134 * typeck.c (c_expand_asm_operands): Restore the original
17135 contents of the output list.
17137 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
17139 * ir.texi: Document complex number representation.
17141 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
17143 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17144 (target_incomplete_p): New function.
17145 (tinfo_base_init): Create comdat NTBS name variable.
17146 (ptr_initializer): Add non_public parameter. Calculate it.
17147 (ptmd_initializer): Likewise.
17148 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17149 (create_real_tinfo_var): Add non_public parameter. Use it.
17150 Push proxy into global namespace.
17151 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17153 * inc/typeinfo (type_info::before, type_info::operator==):
17154 Compare __name addresses.
17156 * tinfo2.cc: Remove new-abi builtins comment.
17158 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
17160 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
17162 * call.c (joust): Exit early if we get the same function, too.
17164 * decl2.c (key_method): Return NULL_TREE for template classes.
17165 (import_export_class): Don't need to check for template classes.
17167 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
17169 * lex.c: Remove references to cccp.c.
17171 2000-04-18 Mark Mitchell <mark@codesourcery.com>
17173 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
17174 volatile_memfunc. Add destructor_attr. Adjust dummy.
17175 (DECL_DESTRUCTOR_P): Use destructor_attr.
17176 (DECL_CONST_MEMFUNC_P): Reimplement.
17177 (DECL_VOLATILE_MEMFUNC_P): Remove.
17178 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
17179 (overrides): Use DECL_DESTRUCTOR_P.
17180 (check_for_override): Likewise.
17181 * decl.c (start_function): Likewise.
17182 * decl2.c (grokfclassfn): Likewise.
17183 (check_classfn): Likewise.
17184 (grok_function_init): Likewise.
17186 2000-04-17 Mark Mitchell <mark@codesourcery.com>
17188 * decl2.c (grokfield): Issue error on illegal data member
17191 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
17193 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
17195 2000-04-16 Mark Mitchell <mark@codesourcery.com>
17197 * class.c (build_vtable_entry): Don't build thunks for type-info
17200 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
17202 * decl.c (decls_match): Allow a redeclaration of a builtin to
17203 specify args while the builtin did not.
17205 2000-04-15 Mark Mitchell <mark@codesourcery.com>
17207 * cp-tree.def (THUNK_DECL): Add to documentation.
17208 * cp-tree.h (flag_huge_objects): Declare.
17209 * class.c (modify_vtable_entry): Tidy.
17210 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
17211 Calculate delta appropriately for the new ABI.
17212 (dfs_modify_vtables): Use it.
17213 (modify_all_vtables): Fix thinko in code to add overriding copies
17214 of functions to primary vtables.
17215 (build_clone): Fix typo in comment.
17216 (clone_function_decl): Correct order of destructors in vtable.
17217 (build_vbase_offset_vtbl_entries): Adjust comment.
17218 (dfs_vcall_offset_queue_p): Remove.
17219 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
17220 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
17221 (build_vtable_entry): Correct check for pure virtual functions.
17222 Don't declare flag_huge_objects.
17223 * decl.c (flag_huge_objects): Remove declaration.
17224 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
17225 Use int_size_in_bytes.
17226 (emit_thunk): Handle vcall offset thunks.
17228 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17230 * decl2.c (parse_time, varconst_time): Delete declarations.
17231 (finish_file): Delete LINENO declaration.
17232 START_TIME and THIS_TIME now long.
17234 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
17236 * class.c (build_base_field): Reformat comment.
17238 * inc/cxxabi.h (stddef.h): Comment inclusion.
17239 (__base_class_info::__offset): Comment shift.
17241 2000-04-12 Mark Mitchell <mark@codesourcery.com>
17243 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
17244 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
17245 (cp_push_exception_identifier): New macro.
17246 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
17247 (DECL_BASE_DESTRUCTOR_P): Likewise.
17248 (DECL_DELETING_DESTRUCTOR_P): Likewise.
17249 (get_vtbl_decl_for_binfo): Fix formatting.
17250 (in_charge_arg_for_name): New macro.
17251 (maybe_build_cleanup_and_delete): Remove declaration.
17252 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
17253 (in_charge_arg_for_name): New function.
17254 (build_new_method_call): Use it. Handle cloned destructors.
17255 (build_clone): Don't make the base constructor virtual.
17256 Automatically defer generated functions.
17257 (clone_function_decl): Handle destructors, too.
17258 (clone_constructors_and_destructors): Likewise.
17259 (create_vtable_ptr): Don't create a vtable entry for a cloned
17261 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
17262 (initialize_predefined_identifiers): Update appropriately.
17263 (finish_destructor_body): Simplify.
17264 (maybe_build_cleanup_and_delete): Remove.
17265 * except.c (expand_throw): Handle new-ABI destructors.
17266 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
17267 (build_dtor_call): New function.
17268 (build_delete): Use it. Simplify.
17269 * optimize.c (maybe_clone_body): Handle destructors.
17270 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
17272 * exception.cc (cleanup_fn): New typedef.
17273 (CALL_CLEANUP): New macro.
17274 (cp_eh_info): Use them.
17275 (__cp_push_exception): Likewise.
17276 (__cp_pop_exception): Likewise.
17278 2000-04-11 Mark Mitchell <mark@codesourcery.com>
17280 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
17281 (complete_dtor_identifier): New macro.
17282 (CLASSTYPE_FIRST_CONVERSION): Remove.
17283 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
17284 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
17285 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
17286 (CLASSTYPE_CONSTRUCTORS): Likewise.
17287 (CLASSTYPE_DESTRUCTORS): Likewise.
17288 (lang_decl): Add cloned_function.
17289 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
17290 (DECL_BASE_CONSTRUCTOR_P): Likewise.
17291 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
17292 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
17293 (DECL_CLONED_FUNCTION_P): Likewise.
17294 (DECL_CLONED_FUNCTION): Likewise.
17295 (clone_function_decl): Declare.
17296 (maybe_clone_body): Likewise.
17297 * call.c (build_user_type_conversion_1): Call complete object
17298 constructors in the new ABI.
17299 (build_new_method_call): Don't add in-charge parameters under the
17301 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
17302 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
17303 CLASSTYPE_DESTRUCTOR_SLOT.
17304 (build_clone): New function.
17305 (clone_function_decl): Likewise.
17306 (clone_constructors_and_destructors): Likewise.
17307 (check_bases_and_members): Use it.
17308 * decl.c (iniitialize_predefined_identifiers): Initialize
17309 complete_dtor_identifier.
17310 (finish_function): Don't add extra code to a clone.
17311 (lang_mark_tree): Mark cloned_function.
17312 * decl2.c (mark_used): Don't bother trying to instantiate things
17314 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
17315 * method.c (set_mangled_name_for_decl): Don't treat clones as
17317 (synthesize_method): Sythesize cloned functions, not the clones.
17318 * optimize.c (inline_data): Update comment on ret_label.
17319 (remap_block): Don't assume DECL_INITIAL exists.
17320 (copy_body_r): Allow ret_label to be NULL.
17321 (maybe_clone_body): Define.
17322 * pt.c (tsubst_decl): Handle clones.
17323 (instantiate_clone): New function.
17324 (instantiate_template): Use it.
17325 (set_mangled_name_for_template_decl): Don't treat clones as
17327 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
17328 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
17329 * semantics.c (expand_body): Clone function bodies as necessary.
17331 * optimize.c (remap_decl): Avoid sharing structure for arrays
17332 whose size is only known at run-time.
17333 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
17335 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
17336 to has_in_charge_parm_p.
17337 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
17338 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
17339 (DECL_COPY_CONSTRUCTOR_P): New macro.
17340 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
17341 (build_user_type_conversion_1): Likewise.
17342 (convert_like_real): Likewise.
17343 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
17344 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
17345 (copy_args_p): Likewise.
17346 (grok_ctor_properties): Likewise.
17347 (start_function): Likewise.
17348 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
17349 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
17350 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
17351 * method.c (do_build_copy_constructor): Use
17352 DECL_HAS_IN_CHARGE_PARM_P.
17353 (synthesize_method): Likewise.
17354 * pt.c (instantiate_template): Remove goto.
17355 * tree.c (build_cplus_method_type): Remove mention of obstacks in
17358 * cp-tre.h (finish_function): Change prototype.
17359 * decl.c (end_cleanup_fn): Adjust caller.
17360 (finish_function): Take only one parameter.
17361 * decl2.c (finish_objects): Adjust caller.
17362 (finish_static_storage_duration_function): Likewise.
17363 * method.c (emit_thunk): Likewise.
17364 * parse.y: Likewise.
17365 * parse.c: Regenerated.
17366 * pt.c (instantiate_decl): Likewise.
17367 * rtti.c (synthesize_tinfo_fn): Likewise.
17368 * semantics.c (expand_body): Likewise.
17370 * cp-tree.h (copy_decl): New function.
17371 * class.c (finish_struct_1): Use it.
17372 * lex.c (copy_decl): Define it.
17373 * pt.c (tsubst_decl): Likewise.
17374 * tree.c (copy_template_template_parm): Likewise.
17376 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
17377 has_nonpublic_assign_ref.
17378 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
17379 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
17380 * class.c (finish_struct_methods): Don't set
17381 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
17382 (interface_only): Don't declare.
17383 (interface_unknown): Likewise.
17385 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17387 * tree.h (HAVE_TEMPLATES): Remove definition.
17388 * lang-options.h (-fthis-is-variable): Remove documentation.
17390 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
17392 * class.c (instantiate_type): Handle object-relative template-id.
17394 * semantics.c (finish_expr_stmt): Call convert_to_void here.
17395 * decl.c (cplus_expand_expr_stmt): Not here.
17397 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17398 Initialize exprtype earlier.
17400 * parse.y (fn.def1): Check for defining types in return types.
17402 * decl.c (check_tag_decl): Notice extra fundamental types.
17403 Diagnose empty decls in classes, too.
17405 * decl.c (grokdeclarator): Don't override an anonymous name if no
17406 declarator was given.
17408 * cvt.c (convert_to_void): Call resolve_offset_ref.
17410 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17412 * decl2.c (decl_namespace): Handle getting a type.
17414 * typeck.c (build_c_cast): Re-enable warning for cast between
17415 pointer and integer of different size.
17417 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
17419 * inc/cxxabi.h (__pointer_type_info): Add restrict and
17421 (__pointer_type_info::__pointer_catch): New virtual function.
17422 (__pointer_to_member_type_info): Derive from
17423 __pointer_type_info. Adjust.
17424 (__pointer_to_member_type_info::__do_catch): Remove.
17425 (__pointer_to_member_type_info::__is_pointer_p): Declare.
17426 (__pointer_to_member_type_info::__pointer_catch): Declare.
17427 * rtti.c (qualifier_flags): Add restrict flag.
17428 (ptmd_initializer): Reorder members.
17429 (create_tinfo_types): Expand comments. Reorder
17430 ptmd_desc_type_node members.
17431 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17433 (__pointer_type_info::__do_catch): Move specific code into
17434 __pointer_catch. Call it.
17435 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17436 specific catch checking. Fix void conversion check.
17437 (__pointer_to_member_type_info::__do_catch): Remove.
17438 (__pointer_to_member_type_info::__pointer_catch): Implement.
17440 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17442 * lex.c (init_parse): Remove traces of classof and headof.
17443 * decl2.c (flag_operator_names): Default to 1.
17444 (lang_decode_option): Do not set it for -ansi.
17446 2000-04-09 Mark Mitchell <mark@codesourcery.com>
17448 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17449 (DECL_MAIN_VARIANT): Remove.
17450 * decl.c (duplicate_decls): Don't set it.
17451 (start_function): Likewise.
17452 (lang_mark_tree): Don't mark it.
17453 * decl2.c (defer_fn): Don't use it.
17454 * lex.c (retrofit_lang_decl): Don't set it.
17455 * pt.c (tsubst_decl): Likewise.
17456 * ptree.c (print_lang_decl): Don't print it.
17457 * typeck.c (mark_addressable): Don't use it.
17459 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17461 * vec.cc: Include <new> and <exception>.
17462 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17463 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17465 (__cxa_vec_delete): Catch dtor exceptions.
17467 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17469 Prepend __ to implementation defined names.
17470 * inc/typeinfo (type_info): Rename _name to __name.
17471 (type_info::type_info): Rename parameter.
17472 (type_info::operator==, type_info::operator!=,
17473 type_info::before): Likewise.
17474 (type_info::is_pointer_p, type_info::is_function_p,
17475 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17478 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17479 (__pointer_type_info::__pointer_type_info): Likewise.
17480 (__pointer_type_info::is_pointer_p,
17481 __pointer_type_info::do_catch): Prepend __. Rename parameters.
17482 (__array_type_info::__array_type_info): Rename parameters.
17483 (__function_type_info::__function_type_info): Likewise.
17484 (__function_type_info::is_function_p): Prepend __.
17485 (__enum_type_info::__enum_type_info): Rename parameters.
17486 (__pointer_to_member_type_info::__pointer_to_member_type_info):
17488 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17490 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17491 (__class_type_info::__class_type_info): Rename parameters.
17492 (__class_type_info::sub_kind): Prepend __. Adjust member names.
17493 (__class_type_info::upcast_result,
17494 __class_type_info::dyncast_result): Prepend __. Move definition
17496 (__class_type_info::do_upcast, __class_type_info::do_catch,
17497 __class_type_info::find_public_src,
17498 __class_type_info::do_dyncast,
17499 __class_type_info::do_find_public_src): Prepend __. Rename
17501 (__si_class_type_info::__si_class_type_info): Rename parameters.
17502 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17503 __si_class_type_info::do_find_public_src): Prepent __. Rename
17505 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17506 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17507 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17509 (__dynamic_cast): Rename parameters.
17510 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17511 type_info::do_catch, type_info::do_upcast): Prepend __.
17512 (contained_p, public_p, virtual_p, contained_public_p,
17513 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17514 (__class_type_info::do_catch,
17515 __class_type_info::do_upcast): Prepend __. Adjust.
17516 (__class_type_info::__upcast_result,
17517 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17519 (__class_type_info::find_public_src): Prepend __. Adjust.
17520 (__class_type_info::do_find_public_src,
17521 __si_class_type_info::do_find_public_src,
17522 __vmi_class_type_info::do_find_public_src): Likewise.
17523 (__class_type_info::do_dyncast,
17524 __si_class_type_info::do_dyncast,
17525 __vmi_class_type_info::do_dyncast): Likewise.
17526 (__class_type_info::do_upcast,
17527 __si_class_type_info::do_upcast,
17528 __vmi_class_type_info::do_upcast): Likewise.
17529 (__dynamic_cast): Adjust.
17530 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17531 (__function_type_info::is_function_p): Likewise.
17532 (__pointer_type_info::do_catch): Likewise. Adjust.
17533 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17534 (__throw_type_match_rtti_2): Adjust.
17535 (__is_pointer): Adjust.
17537 2000-04-08 Mark Mitchell <mark@codesourcery.com>
17539 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17540 (complete_ctor_identifier): New macro.
17541 (special_function_kind): Add sfk_copy_constructor and
17542 sfk_assignment_operator.
17543 (LOOKUP_HAS_IN_CHARGE): Remove.
17544 (cons_up_default_function): Rename to ...
17545 (implicitly_declare_fn): ... this.
17546 * call.c (build_new_method_call): Add in-charge parameters for
17548 * class.c (add_implicitly_declared_members): Change parameter name
17549 from cant_have_assignment to cant_have_const_assignment.
17550 Replace calls to cons_up_default_function to implicitly_declare_fn.
17551 * cvt.c (ocp_convert): Use complete_ctor_identifier.
17552 * decl.c (initialize_predefined_identifiers): Initialize it.
17553 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17554 complex expression.
17555 * init.c (expand_default_init): Don't calculate the in-charge
17557 (build_new_1): Likewise.
17558 * lex.c (cons_up_default_function): Move to method.c.
17559 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17560 (implicitly_declare_fn): New function.
17561 * typeck.c (build_static_cast): Use complete_ctor_identifier.
17562 (build_modify_expr): Likewise.
17563 * typeck2.c (build_functional_cast): Likewise.
17565 Under the new ABI, constructors don't return `this'.
17566 * cp-tree.h (warn_reorder): Declare.
17567 (special_function_kind): New enum.
17568 (global_base_init_list): Remove declaration.
17569 (emit_base_init): Don't return a value.
17570 (check_base_init): Don't declare.
17571 (is_aggr_typedef): Likewise.
17572 * decl.c (check_special_function_return_type): New function.
17573 (return_types): Remove.
17574 (grokdeclarator): Use check_special_function_return_type.
17575 (start_function): Don't initialize ctor_label under the new ABI.
17576 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
17577 * init.c (begin_init_stmts): Move to top of file.
17578 (finish_init_stmts): Likewise.
17579 (warn_reorder): Don't declare.
17580 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
17582 (check_base_init): Remove.
17583 (is_aggr_typedef): Likewise.
17584 (build_new_1): Don't use the return value of a constructor.
17585 * semantics.c (setup_vtbl_ptr): Don't use the return value
17587 * typeck.c (check_return_expr): Don't magically convert return
17588 statements into `return this' in constructors under the new ABI.
17590 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
17591 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
17592 (base_ctor_identifier): New macro.
17593 (base_dtor_identifier): Likewise.
17594 (deleting_dtor_identifier): Likewise.
17595 * decl.c: Don't include obstack.h.
17596 (obstack_chunk_alloc): Don't define.
17597 (obstack_chunk_free): Likewise.
17598 (struct predefined_identifier): New type.
17599 (initialize_predefined_identifiers): New function.
17600 (init_decl_processing): Use it.
17601 (debug_temp_inits): Remove.
17602 (start_method): Don't call preserve_data.
17603 (hack_incomplete_structures): Update comment.
17604 * init.c (init_init_processing): Don't initialize
17606 (build_offset_rf): Remove dead code.
17607 (build_delete): Use CLASSTYPE_N_BASECLASSES.
17608 * search.c (init_search_processing): Don't initialize
17611 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17613 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
17614 some sign_compare warnings.
17616 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17618 Rename abi::__vmi_class_type_info members.
17619 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
17620 base_list, detail_masks members to vmi_flags, vmi_base_count,
17621 vmi_bases and vmi_flags_masks respectively.
17622 (__vmi_class_type_info::vmi_flags_masks): Rename
17623 details_unknown_mask to flags_unknown_mask.
17624 * tinfo.cc (__class_type_info::do_upcast): Adjust.
17625 (__vmi_class_type_info::do_find_public_src): Adjust.
17626 (__vmi_class_type_info::do_dyncast): Adjust.
17627 (__vmi_class_type_info::do_upcast): Adjust.
17629 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17631 * tinfo.cc (convert_to_base): New function.
17632 (get_vbase_offset): Remove. Move into convert_to_base.
17633 (__vmi_class_type_info::do_find_public_src): Adjust.
17634 (__vmi_class_type_info::do_dyncast): Adjust.
17635 (__vmi_class_type_info::do_upcast): Adjust.
17637 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
17639 * tinfo.cc (operator=): Use __builtin_strcmp.
17640 * tinfo2.cc (before): Likewise.
17642 2000-04-06 Mark Mitchell <mark@codesourcery.com>
17644 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
17645 (DECL_SAVED_INLINE): Rename to ...
17646 (DECL_DEFERRED_FN): ... this.
17647 (in_function_p): Remove declaration.
17648 (mark_inline_for_output): Rename to ...
17649 (defer_fn): ... this.
17650 * decl.c (finish_function): Adjust call to mark_inline_for_output.
17651 (in_function_p): Remove definition.
17652 * decl2.c (saved_inlines): Rename to ...
17653 (deferred_fns): ... this.
17654 (saved_inlines_used): Rename to ...
17655 (deferred_fns_used): ... this.
17656 (mark_inline_for_output): Rename to ...
17657 (defer_fn): ... this.
17658 (finish_file): Adjust accordingly.
17659 (init_decl2): Likewise.
17660 * lex.c (cons_up_default_function): Likewise.
17661 * pt.c (mark_decl_instantiated): Likewise.
17662 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
17664 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
17665 * semantics.c (expand_body): Defer more functions.
17667 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17669 * vec.cc: New file.
17670 * Make-lang.in (CXX_LIB2FUNCS): Add it.
17672 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17673 __cxa_vec_delete): Declare.
17675 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17677 * rtti.c (dfs_class_hint_mark): New static function.
17678 (dfs_class_hint_unmark): New static function.
17679 (class_hint_flags): Use them.
17681 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
17683 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
17685 2000-04-05 Mark Mitchell <mark@codesourcery.com>
17687 * cp-tree.h (instantiate_decl): Change prototype.
17688 * decl2.c (mark_used): Adjust call.
17689 * optimize.c (inlinable_function_p): Adjust handling of templates.
17690 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
17691 (do_type_instantiation): Likewise.
17692 (instantiate_decl): Defer more templates.
17693 (instantiate_pending_templates): Adjust logic to handle inline
17696 * Makefile.in (GGC_H): New variable. Use it throughout in place
17699 * call.c: Don't include obstack.h. Include ggc.h.
17700 (obstack_chunk_alloc): Don't define.
17701 (obstack_chunk_free): Likewise.
17702 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
17703 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
17704 (pop_switch): Free it.
17706 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
17708 * dump.c (dequeue_and_dump): Don't try to print the bit_position
17709 if we don't have a DECL_FIELD_OFFSET.
17711 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
17713 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
17714 special_function_p.
17716 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17718 * cfns.gperf (hash, libc_name_p): Prototype.
17720 * rtti.c (build_dynamic_cast_1): Constification.
17722 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
17724 * semantics.c (deferred_type_access_control): Prototype.
17726 2000-04-04 Mark Mitchell <mark@codesourcery.com>
17728 Correct many new ABI issues regarding vbase and vcall offset
17730 * cp-tree.h (BINFO_VTABLE): Document.
17731 (struct lang_type): Tweak formatting.
17732 (BINFO_PRIMARY_BINFO): Add to documentation.
17733 (CLASSTYPE_VSIZE): Fix typo in comment.
17734 (CLASSTYPE_VBASECLASSES): Update documentation.
17735 (BINFO_VBASE_MARKED): Remove.
17736 (SET_BINFO_VBASE_MARKED): Likewise.
17737 (CLEAR_BINFO_VBASE_MARKED): Likewise.
17738 (BINFO_FIELDS_MARKED): Remove.
17739 (SET_BINFO_FIELDS_MARKED): Likewise.
17740 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
17741 (enum access_kind): New enumeration.
17742 (num_extra_vtbl_entries): Remove declaration.
17743 (size_extra_vtbl_entries): Likewise.
17744 (get_vtbl_decl_for_binfo): New function.
17745 (dfs_vbase_unmark): Remove declaration.
17746 (mark_primary_bases): Likewise.
17747 * class.c (SAME_FN): Remove.
17748 (struct vcall_offset_data_s): Move definition.
17749 (build_vbase_pointer): Use `build', not `build_binary_op', to
17750 access the vbase pointer under the new ABI.
17751 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
17752 (build_primary_vtable): Likewise.
17753 (dfs_mark_primary_bases): Move here from search.c.
17754 (mark_primary_bases): Likewise.
17755 (determine_primary_bases): Under the new ABI, don't make a base
17756 class a primary base just because we don't yet have any virtual
17758 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
17759 (num_vfun_entries): Remove.
17760 (dfs_count_virtuals): Likewise.
17761 (num_extra_vtbl_entries): Likewise.
17762 (size_extra_vtbl_entries): Likewise.
17763 (layout_virtual_bases): Iterate in inheritance graph order under
17765 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
17766 indicate that a vfield is present.
17767 (init_class_processing): Initialize access_public_node, etc., from
17769 (get_vtbl_decl_for_binfo): New function.
17770 (dump_class_hierarchy_r): Likewise.
17771 (dump_class_hierarchy): Use it.
17772 (finish_vtbls): Build the vtbls in inheritance graph order.
17773 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17774 (initialize_vtable): Use get_vtbl_decl_for_binfo.
17775 (accumulate_vtbl_inits): Add comments explaining why a pre-order
17777 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
17778 where the vptr points, even for primary vtables.
17779 (build_vtbl_initializer): Adjust handling of vbase and vcall
17781 (build_vcall_and_vbase_vtable_entries): New function.
17782 (dfs_build_vbase_offset_vtbl_entries): Remove.
17783 (build_vbase_offset_vtbl_entries): Reimplement.
17784 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
17785 were already handled in a primary base class vtable.
17786 (build_vcall_offset_vtbl_entries): Adjust.
17787 (build_rtti_vtbl_entries): Adjust.
17788 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
17789 * init.c (expand_virtual_init): Simplify.
17790 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
17791 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
17792 * search.c (BINFO_ACCESS): New macro.
17793 (SET_BINFO_ACCESS): Likewise.
17794 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
17795 (access_in_type): Likewise.
17796 (dfs_accessible_p): Likewise.
17797 (protected_accessible_p): Likewise.
17798 (lookup_fnfields_1): Adjust documentation.
17799 (dfs_mark_primary_bases): Move to class.c
17800 (mark_primary_bases): Likewise.
17801 (dfs_vbase_unmark): Remove.
17802 (virtual_context): Use BINFO_FOR_VBASE.
17803 (dfs_get_vbase_types): Simplify.
17804 (dfs_build_inheritance_graph_order): New function.
17805 (get_vbase_types): Use it.
17806 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
17808 * tinfo.cc (get_vbase_offset): New function.
17809 (__vmi_class_type_info::do_find_public_src): Use it.
17810 (__vmi_class_type_info::do_dyncast): Likewise.
17811 (__vmi_class_type_info::do_upcast): Likewise.
17813 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
17815 * lang-specs.h: Pass -fno-show-column to the preprocessor.
17817 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
17819 * rtti.c (class_hint_flags): Rename flags.
17820 (class_initializer): Remove flags.
17821 (synthesize_tinfo_var): Combine offset and flags. Add flags
17822 for __vmi_class_type_info.
17823 (create_tinfo_types): Remove flags from __class_type_info and
17824 __si_class_type_info. Merge flags and offset from
17825 base_class_type_info.
17826 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
17827 (__base_class_info::is_virtual_p): Adjust.
17828 (__base_class_info::is_public_p): Adjust.
17829 (__base_class_info::offset): New accessor.
17830 (__class_type_info::details): Remove member.
17831 (__class_type_info::__class_type_info): Lose details.
17832 (__class_type_info::detail_masks): Remove.
17833 (__si_class_type_info::__si_class_type_info): Lose details.
17834 (__vmi_class_type_info::details): New member.
17835 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
17836 (__vmi_class_type_info::detail_masks): New member.
17837 * tinfo.cc (__class_type_info::do_upcast): Initialize result
17838 with unknown_details_mask.
17839 (__vmi_class_type_info::do_find_public_src): Adjust
17840 (__vmi_class_type_info::do_dyncast): Adjust.
17841 (__vmi_class_type_info::do_upcast): Set result details, if
17843 (__dynamic_cast): Temporarily #if out optimization.
17845 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
17847 * rtti.c (get_tinfo_decl): Mark used.
17848 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
17849 mark as dealt with, if we output it.
17851 2000-03-28 Mark Mitchell <mark@codesourcery.com>
17853 * class.c: Reorganize to put virtual function table initialization
17854 machinery at the end of the file.
17856 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
17858 * class.c (finish_struct): Use bitsize_zero_node.
17859 * pt.c (instantiate_class_template): Likewise.
17861 2000-03-28 Mark Mitchell <mark@codesourcery.com>
17863 Put RTTI entries at negative offsets in new ABI.
17864 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
17865 vbase offset at index -3, not -1.
17866 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
17867 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
17868 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
17869 (build_rtti_vtbl_entries): New function.
17870 (set_rtti_entry): Remove.
17871 (build_primary_vtable): Don't use it.
17872 (build_secondary_vtable): Likewise.
17873 (start_vtable): Remove.
17874 (first_vfun_index): New function.
17875 (set_vindex): Likewise.
17876 (add_virtual_function): Don't call start_vtable. Do call
17878 (set_primary_base): Rename parameter.
17879 (determine_primary_base): Likewise.
17880 (num_vfun_entries): Don't use skip_rtti_stuff.
17881 (num_extra_vtbl_entries): Include RTTI information.
17882 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
17883 (skip_rtti_stuff): Remove.
17884 (dfs_modify_vtables): Don't use it.
17885 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
17886 (layout_nonempty_base_or_field): Update size handling.
17887 (create_vtable_ptr): Tweak.
17888 (layout_class_type): Adjust parameter names.
17889 (finish_struct_1): Simplify.
17890 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
17891 (skip_rtti_stuff): Remove.
17892 (first_vfun_index): New function.
17893 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17894 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
17895 (marked_vtable_pathp): Declare.
17896 (unmarked_vtable_pathp): Likewise.
17897 * error.c (dump_expr): Use first_vfun_index to calculate vtable
17899 * rtti.c (build_headof): Look for RTTI at negative offsets.
17900 (get_tinfo_decl_dynamic): Likewise.
17901 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
17903 (create_pseudo_type_info): Do it here instead. Adjust so that
17904 vptr points at first virtual function.
17905 * search.c (marked_vtable_pathp): Make it global.
17906 (unmarked_vtable_pathp): Likewise.
17907 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17908 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17909 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
17910 (get_pure_virtuals): Likewise.
17911 (expand_upcast_fixups): Likewise.
17912 * tree.c (debug_binfo): Likewise.
17913 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
17916 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17918 * class.c (check_field_decl): Fix typo.
17919 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
17920 (check_methods): Likewise.
17921 (check_field_decls): Likewise.
17922 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
17923 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
17924 Use DECL_RESULT_FLD, not DECL_RESULT.
17925 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
17926 * lex.c (identifier_type): Likewise.
17927 * pt.c (determine_specialization, lookup_template_class): Likewise.
17928 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
17929 (resolve_overloaded_unification, more_specialized): Likewise.
17930 * semantics.c (finish_member_declaration): Likewise.
17931 * typeck.c (build_x_function_call): Likewise.
17933 2000-03-26 Mark Mitchell <mark@codesourcery.com>
17935 * class.c (layout_empty_base): Handle empty bases with non-byte
17937 (build_base_field): Likewise.
17938 (layout_virtual_bases): Likewise.
17940 * class.c (finish_struct_1): Fix typo in this change:
17942 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17944 2000-03-25 Mark Mitchell <mark@codesourcery.com>
17946 * decl.c (grokdeclarator): Count partial specializations when
17947 keeping track of how many template classes have been seen.
17949 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
17951 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17953 * class.c (build_vbase_pointer_fields): layout_field now place_field.
17954 (get_vfield_offset): Use byte_position.
17955 (set_rtti_entry): Set OFFSET to ssizetype zero.
17956 (get_binfo_offset_as_int): Deleted.
17957 (dfs_record_base_offsets): Use tree_low_cst.
17958 (dfs_search_base_offsets): Likewise.
17959 (layout_nonempty_base_or_field): Reflect changes in RLI format
17960 and call byte_position.
17961 (layout_empty_base): Convert offset to ssizetype.
17962 (build_base_field): use rli_size_unit_so_far.
17963 (dfs_propagate_binfo_offsets): Do computation in proper type.
17964 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
17965 (layout_class_type): Reflect changes in RLI names and fields.
17966 (finish_struct_1): Set DECL_FIELD_OFFSET.
17967 * dump.c (dequeue_and_dump): Call bit_position.
17968 * expr.c (cplus_expand_constant): Use byte_position.
17969 * rtti.c (expand_class_desc): Use bitsize_one_node.
17970 * typeck.c (build_component_addr): Use byte_position and don't
17971 special case for zero offset.
17973 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
17975 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
17977 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
17979 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
17982 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17984 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
17986 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
17987 make_typename_type, check_initializer, cp_finish_decl,
17988 xref_tag): Likewise.
17989 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
17990 decl_namespace, arg_assoc_template_arg, arg_assoc,
17991 validate_nonmember_using_decl, do_class_using_decl): Likewise.
17992 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
17993 args_to_string): Likewise.
17994 * friend.c (is_friend): Likewise.
17995 * lex.c (note_got_semicolon, note_list_got_semicolon,
17996 is_global): Likewise.
17997 * method.c (build_overload_nested_name, build_overload_value,
17998 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
17999 * parse.y (typename_sub, typename_sub1): Likewise.
18000 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18001 process_partial_specialization, convert_template_argument,
18002 template_args_equal, add_pending_template, lookup_template_class,
18003 for_each_template_parm_r, maybe_fold_nontype_arg,
18004 tsubst, instantiate_template, type_unification_real, unify,
18005 instantiate_pending_templates, set_mangled_name_for_template_decl):
18007 * repo.c (repo_get_id, repo_template_used): Likewise.
18008 * search.c (lookup_field_1): Likewise.
18009 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18010 * xref.c (classname): Likewise.
18012 2000-03-22 Mark Mitchell <mark@codesourcery.com>
18014 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18015 (CANONICAL_BINFO): New macro.
18016 (BINFO_NEW_VTABLE_MARKED): Use it.
18017 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18018 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18019 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18021 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18022 (build_secondary_vtable): Likewise.
18023 (dfs_finish_vtbls): Likewise.
18024 (dfs_accumulate_vtbl_inits): Likewise.
18025 (accumulate_vtbl_inits): New function.
18026 (finish_vtbls): Make sure that virtual bases come after
18027 non-virtual bases in the vtable group.
18028 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18029 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18030 * search.c (struct vbase_info): Move definition.
18031 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18032 (unmarked_new_vtable_p): Likewise.
18033 (dfs_mark_vtable_path): Remove.
18034 (dfs_mark_new_vtable): Remove.
18035 (dfs_unmark_new_vtable): Likewise.
18036 (dfs_clear_search_slot): Likewise.
18037 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18038 (dfs_clear_vbase_slots): Likewise.
18039 (init_vbase_pointers): LIkewise.
18041 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
18043 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18044 SIZETYPE to a non-SIZETYPE.
18046 2000-03-21 Mark Mitchell <mark@codesourcery.com>
18048 * class.c (layout_virtual_bases): Adjust names in conditionally
18051 * class.c (record_base_offsets): New function.
18052 (layout_conflict_p): Likewise.
18053 (layout_nonempty_base_or_field): Use it.
18054 (layout_empty_base): New function.
18055 (build_base_field): Use it.
18056 (build_base_fields): Update comment.
18057 (layout_virtual_bases): Fold in a little code form
18058 layout_basetypes. Use layout_empty_base.
18059 (layout_basetypes): Remove.
18060 (end_of_class): New function.
18061 (layout_class_type): Use it. Adjust.
18063 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18064 (fntype_p): Remove.
18065 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18067 (dfs_skip_nonprimary_vbases_markedp): Likewise.
18068 * typeck.c (fntype_p): Remove.
18070 * cp-tree.h (TI_SPEC_INFO): Remove.
18071 (CLASSTYPE_TI_SPEC_INFO): Likewise.
18072 * pt.c (process_partial_specialization): Likewise.
18074 * class.c (build_base_field): Fix thinko in computation of binfo
18077 * tree.c (mark_local_for_remap_p): Mark variables declared in
18078 TARGET_EXPRs as well.
18080 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18082 * typeck.c (require_complete_type, complete_type,
18083 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18084 build_array_ref, convert_arguments, pointer_diff,
18085 build_x_unary_op, build_unary_op, build_c_cast,
18086 build_modify_expr): Use COMPLETE_TYPE_P etc.
18087 * call.c (is_complete, convert_like_real,
18088 build_new_method_call): Likewise.
18089 * class.c (build_vbase_pointer_fields, check_bases,
18090 build_base_field, finish_struct_1, pushclass): Likewise.
18091 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18092 * decl.c (maybe_process_template_type_declaration, pushtag,
18093 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18094 layout_var_decl, check_initializer, cp_finish_decl,
18095 grokdeclarator, require_complete_types_for_parms,
18096 grok_op_properties, xref_tag, xref_basetypes,
18097 check_function_type): Likewise.
18098 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18099 * friend.c (do_friend): Likewise.
18100 * init.c (build_offset_ref): Likewise.
18101 * parse.y (structsp): Likewise.
18102 * pt.c (maybe_process_partial_specialization,
18103 tsubst_friend_function, instantiate_class_template, tsubst,
18104 do_type_instantiation, instantiate_pending_templates): Likewise.
18105 * repo.c (repo_get_id): Likewise.
18106 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18107 synthesize_tinfo_var, emit_support_tinfos): Likewise.
18108 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18109 * semantics.c (begin_class_definition): Likewise.
18110 * tree.c (build_cplus_method_type): Likewise.
18111 * typeck2.c (digest_init, build_functional_cast,
18112 add_exception_specifier): Likewise.
18113 * parse.h, parse.c: Regenerated.
18115 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18117 * inc/cxxabi.h: New header file. Define new-abi entry points.
18118 (__pointer_type_info::target): Rename member to ...
18119 (__pointer_type_info::type): ... here.
18120 (__base_class_info::type): Rename member to ...
18121 (__base_class_info::base): ... here.
18122 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18123 * cp-tree.h (CPTI_ABI): New global tree enumeration.
18124 (abi_node): New global tree node.
18125 * decl.c (abi_node): Document.
18126 (init_decl_processing): Initialize abi_node.
18127 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18128 (get_vmi_pseudo_type_info): Likewise.
18129 (create_tinfo_types): Likewise.
18130 (emit_support_tinfos): Likewise.
18131 * tinfo.h (cxxabi.h): Include for new-abi.
18132 Move rtti class definitions to new header file.
18133 * tinfo.cc (abi): Use the namespace.
18134 (std): Move new abi rtti classes from here ...
18135 (__cxxabiv1): ... to here.
18136 * tinfo2.cc (cxxabi.h): Include for new-abi.
18137 Move rtti class definitions to new header file.
18138 (std): Move new abi rtti classes from here ...
18139 (__cxxabiv1): ... to here.
18140 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18143 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18144 Jason Merrill <jason@casey.cygnus.com>
18146 * method.c (build_overload_int): Use host_integerp.
18148 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18150 * init.c (build_offset_ref): Handle the case of a templated member
18153 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18155 * except.c (expand_exception_blocks): Clear catch_clauses_last.
18157 2000-03-18 Mark Mitchell <mark@codesourcery.com>
18159 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18160 * class.c (check_bitfield_decl): Turn illegal bitfields into
18162 (dfs_propagate_binfo_offsets): Adjust for new size_binop
18164 (dfs_offset_for_unshared_vbases): Likewise.
18165 * cvt.c (cp_convert_to_pointer): Convert NULL to a
18166 pointer-to-member correctly under the new ABI.
18167 * expr.c (cplus_expand_constant): Don't use cp_convert when
18168 turning an offset into a pointer-to-member.
18169 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18170 when dereferencing them under the new ABI.
18171 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
18172 of pointers-to-members under the new ABI.
18174 * class.c (check_bitfield_decl): Remove restriction on really long
18176 (layout_class_type): Implement new ABI handling of bitfields
18177 longer than their types.
18179 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18181 * parse.y (extdefs): Call ggc_collect.
18182 * parse.c: Regenerated.
18184 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
18186 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
18187 (note_name_declared_in_class): Use OVL_CURRENT to get at a
18188 potential overload.
18190 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18192 * class.c (build_vbase_path): Use integer_zerop.
18193 (build_vtable_entry): Use tree_low_cst.
18194 (get_vfield_offset): Use bit_position.
18195 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
18197 (check_bitfield_decl): Set DECL_SIZE using convert.
18198 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
18199 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
18201 (finish_struct_1): Use bit_position.
18202 (dump_class_hierarchy): Use tree_low_cst.
18203 * cp-tree.h (min_precision): Add declaration.
18204 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
18205 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
18206 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
18207 * expr.c (cplus_expand_constant): Use bit_position.
18208 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
18209 * rtti.c (get_base_offset): Use bit_position.
18210 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
18211 host_integerp, and tree_low_cst.
18212 (pointer_int_sum): Use integer_zerop.
18213 (build_component_addr): Use bit_position.
18215 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
18217 * typeck.c (require_complete_type): Don't assume size_zero_node.
18218 (complete_type_or_else): Likewise.
18220 2000-03-16 Steven Grady <grady@digitaldeck.com>
18221 Jason Merrill <jason@casey.cygnus.com>
18223 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
18225 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
18227 * decl2.c (grokfield): Bail out if type is error_mark_node.
18229 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18231 * tinfo2.cc (__ptr_to_member_data): Rename to ...
18232 (__pointer_to_member_data): ... here. Adjust.
18233 * rtti.c (create_tinfo_types): Adjust.
18235 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18237 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
18238 * decl.c (ref_desc_type_node): Undocument.
18239 * rtti.c (ptr_ref_initializer): Rename to ...
18240 (ptr_initializer): ... here. Adjust comments.
18241 (ptmd_initializer): Fix comment thinko.
18242 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
18243 (create_tinfo_types): Remove ref_desc_type_node init.
18244 * tinfo2.cc (__reference_type_info): Remove.
18246 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18248 * decl.c (cp_finish_decl): Remove obsolete comment.
18250 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
18252 2000-03-14 Mark Mitchell <mark@codesourcery.com>
18254 * cp-tree.h: Tweak documentation.
18255 * class.c (build_vbase_pointer_fields): Layout the fields, too.
18256 (avoid_overlap): Remove.
18257 (get_binfo_offset_as_int): New function.
18258 (dfs_serach_base_offsets): Likewise.
18259 (layout_nonempty_base_or_field): Likewise.
18260 (build_base_field): Layout fields here. Avoid placing two objects
18261 of the same type at the same address, under the new ABI.
18262 (build_base_fields): Adjust accordingly.
18263 (create_vtable_ptr): Return the new field, but don't attach it to
18265 (remove_base_field): Remove.
18266 (remove_base_fields): Remove.
18267 (layout_basetypes): Adjust accordingly.
18268 (layout_class_type): Call layout_field for each field, rather than
18269 just making a wholesale call to layout_type.
18271 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
18273 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
18275 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
18277 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
18279 * except.c (dtor_nothrow): New fn.
18280 (do_pop_exception): Use it. Take type parm.
18281 (push_eh_cleanup): Take type parm.
18282 (expand_start_catch_block): Pass it.
18283 (build_eh_type_type_ref): Accept null type.
18285 2000-03-12 Mark Mitchell <mark@codesourcery.com>
18287 * cp-tree.h (revert_static_member_fn): Change prototype.
18288 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
18289 (grok_op_properties): Likewise.
18290 (start_function): Likewise.
18291 (revert_static_member_fn): Simplify.
18292 * pt.c (check_explicit_specialization): Adjust call to
18293 revert_static_member_fn.
18295 2000-03-11 Mark Mitchell <mark@codesourcery.com>
18297 * cp-tree.h (scope_kind): New type.
18298 (tmpl_spec_kind): Likewise.
18299 (declare_pseudo_global_level): Remove.
18300 (pseudo_global_level_p): Rename to template_parm_scope_p.
18301 (pushlevel): Remove declaration.
18302 (begin_scope): New function.
18303 (finish_scope): Likewise.
18304 (current_tmpl_spec_kind): Likewise.
18305 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
18306 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
18307 Add template_spec_p.
18308 (toplevel_bindings_p): Adjust.
18309 (declare_pseudo_global_level): Remove.
18310 (pseudo_global_level_p): Rename to template_parm_scope_p.
18311 (current_tmpl_spec_kind): New function.
18312 (begin_scope): Likewise.
18313 (finish_scope): Likewise.
18314 (maybe_push_to_top_level): Adjust.
18315 (maybe_process_template_type_declaration): Likewise.
18316 (pushtag): Likewise.
18317 (pushdecl_nonclass_level): Likewise.
18318 (lookup_tag): Likewise.
18319 (grokfndecl): Handle member template specializations. Share
18320 constructor and non-constructor code.
18321 * decl2.c (check_classfn): Handle member template specializations.
18322 * pt.c (begin_template_parm_list): Use begin_scope.
18323 (begin_specialization): Likewise.
18324 (end_specialization): Likewise.
18325 (check_explicit_specialization): Use current_tmpl_spec_kind.
18326 Handle member template specializations.
18327 (end_template_decl): Use finish_scope. Remove call to
18329 (push_template_decl_real): Remove bogus error message.
18330 (tsubst_decl): Fix typo in code contained in comment.
18331 (instantiate_template): Handle member template specializations.
18332 (most_general_template): Likewise.
18334 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
18336 * lex.c (whitespace_cr): Compress consecutive calls to warning().
18337 (do_identifier): Ditto for error().
18339 * pt.c (convert_nontype_argument): Ditto for cp_error().
18340 (convert_template_argument): Ditto for cp_pedwarn().
18342 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
18344 * exception.cc (__check_null_eh_spec): New fn.
18345 * except.c (expand_end_eh_spec): Call it if the spec is throw().
18347 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18349 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
18350 * except.c (expand_end_eh_spec): Add the return type.
18351 * rtti.c (throw_bad_cast): Add the parmtypes.
18352 (throw_bad_typeid): Likewise.
18354 * semantics.c (expand_stmt): Only leave out rtl for unused
18355 artificials, and set DECL_IGNORED_P on them as well.
18356 * decl.c (wrapup_globals_for_namespace): Likewise.
18358 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
18360 * decl.c (maybe_commonize_var): Skip all artificial decls.
18361 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
18363 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18365 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
18366 * cp-tree.h: Declare flag_enforce_eh_specs.
18367 * decl.c (store_parm_decls, finish_function): Check it.
18369 C library functions don't throw.
18370 * Makefile.in (cfns.h): New target.
18371 (except.o): Depend on it.
18372 * Make-lang.in (cc1plus): Depend on cfns.gperf.
18373 * cfns.gperf: New file.
18374 * cfns.h: Generated.
18375 * except.c: Include it.
18376 (nothrow_libfn_p): New fn.
18377 * decl.c (grokfndecl): Use it.
18378 * cp-tree.h: Declare it.
18380 * decl.c (push_overloaded_decl_1, auto_function,
18381 define_function): Lose.
18382 (build_library_fn_1): New static fn.
18383 (builtin_function): Use it.
18384 (get_atexit_node): Use build_library_fn_ptr.
18385 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
18386 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
18387 push_void_library_fn, push_throw_library_fn): New fns.
18388 * cp-tree.h: Declare them.
18389 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18390 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18391 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18392 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18393 * rtti.c (build_runtime_decl): Lose.
18394 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18395 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18396 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18398 * call.c (build_call): Remove result_type parm.
18399 Call mark_used on unused artificial fns.
18400 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18402 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
18404 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18406 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18407 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18408 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18409 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18410 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18411 expand_generic_desc): Likewise.
18413 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18415 * exception.cc (__cp_pop_exception): Cleanup the original object.
18417 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18419 * decl.c (grok_op_properties): Merge conversion to void warning
18420 with other silly op warnings.
18422 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
18424 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18425 array CONSTRUCTOR elements. Don't use expr_tree_cons.
18427 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18429 * decl.c (cp_make_fname_decl): New function.
18430 (wrapup_globals_for_namespace): Don't emit unused static vars.
18431 (init_decl_processing): Remove comment about use of
18432 array_domain_type. Set make_fname_decl.
18433 (cp_finish_decl): Remove __FUNCTION__ nadgering.
18434 * semantics.c (begin_compound_stmt): Remove
18435 current_function_name_declared flagging.
18436 (expand_stmt): Don't emit unused local statics.
18437 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18440 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18442 * typeck.c (convert_for_assignment): Don't look at array
18444 * call.c (convert_like_real): Likewise.
18446 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
18448 Add initial support for '\uNNNN' specifier.
18449 * lex.c (read_ucs): New fn.
18450 (readescape, skip_white_space): Call it.
18451 (is_extended_char, is_extended_char_1): New fns.
18452 (utf8_extend_token): New fn, #if 0'd out.
18453 (real_yylex): Treat extended chars like letters.
18455 * search.c (note_debug_info_needed): Walk the bases even if we
18456 weren't deferring the type itself.
18458 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18460 * decl2.c (finish_objects): Constify a char*.
18462 * method.c (emit_thunk): Likewise.
18464 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
18466 * typeck.c (dubious_conversion_warnings): Look through
18469 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18471 * class.c (dfs_modify_vtables): I is now unsigned.
18472 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18473 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18474 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18475 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18476 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18477 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18478 Call integer_all_onesp.
18479 * typeck2.c (process_init_constructor): Use compare_tree_int.
18481 * lang-specs.h (as): Don't call if -syntax-only.
18483 2000-03-06 Mark Mitchell <mark@codesourcery.com>
18485 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18486 RTL_EXPR_HAS_NO_SCOPE after all.
18488 2000-03-05 Mark Mitchell <mark@codesourcery.com>
18490 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18491 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
18492 RTL_EXPR_HAS_NO_SCOPE.
18494 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18497 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18499 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
18501 * call.c (convert_like): Macrofy.
18502 (convert_like_with_context): New macro.
18503 (convert_like_real): Renamed from convert_like. Add calling
18504 context parameters, for diagnostics. Add recursive flag. Call
18505 dubious_conversion_warnings for outer conversion.
18506 (build_user_type_conversion): Use convert_like_with_context.
18507 (build_over_call): Likewise. Don't warn about dubious
18508 conversions here. Adjust convert_default_arg calls.
18509 (convert_default_arg): Add context parameters for diagnostics.
18510 Pass through to convert_like_with_context.
18511 * cp-tree.h (convert_default_arg): Add context parameters.
18512 (dubious_conversion_warnings): Prototype new function.
18513 * typeck.c (convert_arguments): Adjust convert_default_arg call.
18514 (dubious_conversion_warnings): New function, broken
18515 out of convert_for_assignment.
18516 (convert_for_assignment): Adjust.
18518 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
18520 * decl2.c (key_method): Break out from...
18521 (import_export_vtable, import_export_class): ...here.
18523 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18524 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18526 * search.c (note_debug_info_needed, dfs_debug_mark,
18527 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
18528 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18530 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
18532 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18535 2000-03-02 Mark Mitchell <mark@codesourcery.com>
18537 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18538 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18539 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18540 (lang_type): Split gets_new into has_new and has_array_new.
18541 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18542 (TYPE_GETS_NEW): Split into ...
18543 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18544 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18545 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18546 (build_op_new_call): Don't declare.
18547 (build_new_1): Likewise.
18548 * call.c (build_op_new_call): Remove.
18549 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18550 instead of TYPE_NEEDS_DESTRUCTOR.
18551 (finish_struct_bits): Likewise.
18552 (add_implicitly_declared_members): Likewise.
18553 (check_field_decl): Likewise.
18554 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18555 correctly under the new ABI.
18556 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18557 instead of TYPE_NEEDS_DESTRUCTOR.
18558 (initialize_local_var): Likewise.
18559 (destroy_local_var): Likewise.
18560 (cp_finish_decl): Likewise.
18561 (register_dtor_fn): Likewise.
18562 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18563 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
18564 TYPE_VEC_DELETE_TAKES_SIZE here.
18565 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18566 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18567 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18568 (finish_destructor_body): Likewise.
18569 (maybe_build_cleanup_1): Likewise.
18570 * decl2.c (do_static_destruction): Likewise.
18571 * init.c (build_new_1): Make it static.
18572 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18573 (expand_cleanup_for_base): Likewise.
18574 (get_cookie_size): New function.
18575 (build_new_1): Handle array-new cookies correctly under the new
18577 (build_vec_delete_1): Likewise.
18578 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18579 (build_delete): Likewise.
18580 (build_vec_delete): Handle array-new cookies correctly under the new
18582 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18583 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
18584 TYPE_HAS_ARRAY_NEW_OPERATOR.
18585 * ptree.c (print_lang_type): Check them.
18586 * search.c (context_for_name_lookup): Fix typo in comment.
18587 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18588 * tree.c (break_out_cleanups): Likewise.
18589 (build_cplus_array_test_1): Likewise.
18590 (cp_build_qualified_type_real): Likewise.
18591 * typeck.c (complete_type): Likewise.
18593 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
18594 the command-line, not the end.
18596 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
18598 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
18600 2000-03-02 Tom Tromey <tromey@cygnus.com>
18602 * cp-tree.h (build_java_class_ref): Declare.
18603 * init.c (build_java_class_ref): No longer static.
18604 * except.c (expand_throw): Generate a Java-style `throw' if the
18605 thrown object is a "Java" object.
18606 (initialize_handler_parm): Generate a Java-style lookup of
18607 exception info if the caught object is a "Java" object.
18608 (catch_language, catch_language_init): New globals.
18609 (decl_is_java_type): New function.
18610 (expand_start_catch_block): Don't call push_eh_info() or
18611 push_eh_cleanup() when handling a Java-style "catch". Pass Java
18612 class reference to build_catch_block.
18614 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18616 * typeck.c (comptypes): Treat sizetype like its language equivalent.
18618 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
18620 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
18621 to merge reference/pointer code and fix incorrect warnings.
18623 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
18625 * search.c (protected_accessible_p): Use context_for_name_lookup.
18627 * init.c (construct_virtual_bases): Fix thinko.
18628 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
18630 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
18632 * decl.c (current_function_decl): Move to toplev.c.
18634 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
18636 * pt.c (fn_type_unification): Unify return type, whenever
18638 (get_bindings_real): Only pass return type when necessary.
18639 Remove explicit return type check.
18640 * class.c (resolve_address_of_overloaded_function): Pass desired
18641 return type to fn_type_unification.
18643 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18645 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
18647 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
18649 * rtti.c (expand_class_desc): Likewise.
18650 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
18651 (THUNK_VCALL_OFFSET): Likewise.
18652 (THUNK_DELTA): Reflect changes in ../tree.h.
18654 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
18656 * search.c (protected_accessible_p): Also allow the access if
18657 the member is public in DERIVED. Lose TYPE parm.
18658 (friend_accessible_p): Lose TYPE parm.
18659 (accessible_p): Adjust.
18661 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18663 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
18664 on things that are not sizes; ssize_binop deleted.
18665 Call size_diffop when appropriate.
18666 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18667 (build_primary_vtable, build_secondary_vtable): Likewise.
18668 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
18669 Variable I is HOST_WIDE_INT.
18670 (get_vfield_offset): Pass proper types to size_binop.
18671 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
18672 (finish_struct_1): Likewise.
18673 (skip_rtti_stuff): Arg N is now pointer to signed.
18674 (layout_class_type): Use size_zero_node.
18675 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
18676 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
18677 * decl.c (complete_arry_type): Pass proper types to size_binop.
18678 (xref_basetypes): BINFO_OFFSET is sizetype.
18679 * error.c (dump_expr): Don't use size_binop non-sizes.
18680 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
18681 * init.c (construct_virtual_bases): Fix type error.
18682 (build_vec_delete_1): Pass proper type to size_binop and don't
18684 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
18685 * rtti.c (get_base_offset): Pass proper type to size_binop.
18686 * search.c (dfs_find_vbases): Fix type error.
18687 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
18688 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
18689 * tree.c (debug_binfo): Variable N is signed.
18690 Use HOST_WIDE_INT_PRINT_DEC.
18691 * typeck.c (comptypes): sizetype is same as equivalent integer type.
18692 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
18693 size_one_node and size_zero_node.
18694 (c_alignof): Use size_one_node.
18695 (build_component_addr): Pass proper types to size_binop.
18696 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
18698 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
18700 Implement class scope using-declarations for functions.
18701 * class.c (handle_using_decl): Call add_method for used functions.
18702 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
18703 (add_method): Used functions are hidden by local functions.
18704 (check_bases_and_members): Handle using-decls before finalizing
18705 CLASSTYPE_METHOD_VEC.
18706 * call.c (add_function_candidate): Add ctype parm; if nonzero,
18707 override the type of 'this' accordingly.
18708 (add_template_candidate, add_template_candidate_real): Add ctype parm.
18709 (convert_class_to_reference, build_user_type_conversion_1,
18710 build_new_function_call, build_object_call, build_new_op,
18711 build_new_method_call): Pass ctype parm.
18713 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
18715 * call.c (convert_class_to_reference, build_user_type_conversion_1,
18716 build_new_function_call, build_object_call, build_new_op,
18717 build_new_method_call, build_op_delete_call): Don't get basetype_path
18719 * typeck.c (build_component_ref): Likewise.
18720 * init.c (build_offset_ref): Likewise.
18721 (resolve_offset_ref): Don't call enforce_access.
18722 Call build_scoped_ref.
18723 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
18724 would cause an error or if -pedantic.
18725 * class.c (alter_access): Lose binfo parm.
18727 2000-02-26 Mark Mitchell <mark@codesourcery.com>
18729 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
18732 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
18734 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
18735 pseudo_type_info creation into the std namespace
18737 2000-02-26 Mark Mitchell <mark@codesourcery.com>
18739 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
18740 (import_export_class): Remove declaration.
18741 * decl2.c (import_export_class): Make it static.
18742 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
18743 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
18744 EXPR_WITH_FILE_LOCATION.
18745 * lex.c (check_newline): Tweak filename/lineno setting.
18746 * semantics.c (begin_while_stmt): Fix typo in comment.
18748 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18750 * lang-options.h (-fmessage-length=): Add missing option.
18752 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
18754 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
18756 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
18758 2000-02-25 Jim Wilson <wilson@cygnus.com>
18760 * optimize.c (expand_call_inline): Emit the return label before
18761 evaluating the return value.
18763 2000-02-24 Mark Mitchell <mark@codesourcery.com>
18765 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
18766 than duplicating functionality here.
18767 * optimize.c: Include input.h.
18768 (expand_call_inline): Use push_srcloc and pop_srcloc.
18769 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
18770 * parse.c: Regenerated.
18771 * Makefile.in (lex.o): Depend on input.h.
18772 (optimize.o): Likewise.
18774 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
18776 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
18777 function type, rather than ICE.
18779 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
18781 * decl.c (grokdeclarator): Call decl_type_access_control.
18782 * parse.y (parse_end_decl): Don't call decl_type_access_control if
18785 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
18787 * decl.c (decls_match): Remove obsolete static member nadgering.
18789 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18791 * decl.c (grokdeclarator): Change ANSI to ISO.
18792 * lex.c (consume_string, readescape, do_identifier): Likewise.
18793 (parse_float, real_yylex): Likewise.
18794 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
18795 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
18796 new_type_id, maybe_label_decls, simple_stmt,
18797 for.init.statement): Likewise.
18798 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
18799 * semantics.c (finish_named_return_value): Likewise.
18800 * parse.c: Regenerate.
18802 2000-02-21 Mark Mitchell <mark@codesourcery.com>
18804 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
18805 (CPTI_CLASS_STAR_TYPE): Remove.
18806 (vtable_index_type): Likewise.
18807 (class_star_type_node): Remove.
18808 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
18809 (build_binary_op_nodefault): Remove.
18810 * call.c (build_new_op): Use build_binary_op instead of
18811 build_binary_op_nodefault.
18812 * decl.c (init_decl_processing): Remove class_star_type_node
18813 initialization. Make delta_type_node ptrdiff_type_node under the
18814 new ABI. Initialize vtable_index_type.
18815 (build_ptrmemfunc_type): Build different structures for the new
18817 (build_enumerator): Use build_binary_op instead of
18818 build_binary_op_nodefault.
18819 * method.c (build_overload_value): Mangle pointers-to-members
18820 appropriately under the new ABI.
18821 * typeck.c (build_array_ref): Use build_binary_op instead of
18822 build_binary_op_nodefault.
18823 (get_member_function_from_ptrfunc): Adjust for the new ABI.
18824 (build_binary_op_nodefault): Rename to ...
18825 (build_binary_op): ... this. Remove old version. Adjust for
18826 pointer-to-member comparisons under the new ABI.
18827 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
18828 (build_ptrmemfunc): Adjust for the new ABI.
18829 (expand_ptrmemfunc_cst): Likewise.
18830 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
18831 (pfn_from_ptrmemfunc): Adjust for the new ABI.
18833 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
18835 * call.c (build_object_call): Compress consecutive calls to
18837 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
18838 (build_op_delete_call): Adjust message formatting.
18840 * class.c (check_bases): Compress consecutive calls to
18842 (finish_struct_anon): Say 'ISO C++'.
18844 * decl.c (start_decl): Same here.
18845 (grok_reference_init): Likewise.
18846 (grokfndecl): Correct message formatting.
18847 (grokfndecl): Improve diagnostic.
18848 (check_static_variable_definition): Likewise. Say 'ISO C++'
18849 (compute_array_index_type): Say 'ISO C++'
18850 (create_array_type_for_decl): Compress consecutive calls to
18852 (grokdeclarator): Say 'ISO C++'
18853 (grok_op_properties): Likewise.
18855 * decl2.c (delete_sanity): Clairify diagnostic.
18856 (check_member_template): Same here.
18857 (grok_function_init): Use consistent terminology.
18859 * expr.c (do_case): Say 'ISO C++'
18861 * friend.c (do_friend): Compress consecutive calls to warning.
18863 2000-02-20 Mark Mitchell <mark@codesourcery.com>
18865 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
18866 * class.c (build_secondary_vtable): Reorganize. Don't create a
18867 new vtable under the new ABI.
18868 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
18869 computing the size.
18870 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
18871 the initializing elements.
18872 (initialize_vtable): New function.
18873 (dfs_finish_vtbls): Use it.
18874 (dfs_accumulate_vtbl_inits): New function.
18875 (finish_vtbls): Merge primary and secondary vtables under the new
18877 (finish_struct_1): Remove redundant call to layout_vtable_decl.
18878 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
18881 * class.c (build_vtable): New function, split out from ...
18882 (get_vtable_decl): ... here, and ...
18883 (build_secondary_vtable): ... here.
18885 * pt.c (tsubst_decl): Fix formatting.
18887 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18889 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
18890 (avoid_overlap, build_base_field): Likewise.
18891 (build_base_field, build_base_fields, is_empty_class):
18892 Test DECL_SIZE with integer_zero.
18893 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
18894 * cp-tree.h (struct lang_type): New field size_unit.
18895 (CLASSTYPE_SIZE_UNIT): New macro.
18896 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
18897 (cp_finish_decl): Delete -Wlarger-than processing.
18898 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
18899 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
18900 * tree.c (make_binfo): binfo vector is one entry longer.
18901 (walk_tree): Walk DECL_SIZE_UNIT.
18903 2000-02-19 Mark Mitchell <mark@codesourcery.com>
18905 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
18907 (build_vtable_entry): Don't assume all vtable entries are
18909 (build_vtbl_initializer): Adjust accordingly.
18910 (get_vtable_decl): Fix formatting.
18912 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
18914 * semantics.c (deferred_type_access_control): Walk the entire
18916 (save_type_access_control): Rename from
18917 initial_deferred_type_access_control. Just remember the value.
18918 (decl_type_access_control): New fn.
18919 (begin_function_definition): Use deferred_type_access_control, after
18920 we've started the function. Set type_lookups to error_mark_node.
18921 * parse.y (frob_specs, fn.def1): Adjust.
18922 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
18923 (parse_end_decl, parse_bitfield0, parse_method): New fns.
18924 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
18925 (after_type_component_declarator0): Likewise.
18926 (after_type_component_declarator): Likewise.
18927 (notype_component_declarator): Likewise.
18928 * cp-tree.h: Adjust.
18930 * decl.c (redeclaration_error_message): Allow redeclaration of
18931 namespace-scope decls.
18933 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
18935 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
18937 2000-02-17 Mark Mitchell <mark@codesourcery.com>
18939 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
18940 * decl2.c (grokclassfn): Likewise.
18942 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
18944 * decl2.c (lang_decode_option): Don't set default message length
18946 * lex.c (lang_init_options): Set it here.
18948 2000-02-16 Mark Mitchell <mark@codesourcery.com>
18950 Make DECL_CONTEXT mean the class in which a member function was
18951 declared, even for a virtual function.
18952 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
18953 (DECL_FRIEND_CONTEXT): New macro.
18954 (DECL_REAL_CONTEXT): Remove.
18955 (SET_DECL_FRIEND_CONTEXT): Likewise.
18956 (DECL_VIRTUAL_CONTEXT): Adjust.
18957 (DECL_CLASS_SCOPE_P): Use TYPE_P.
18958 (add_friends): Remove.
18959 (hack_decl_function_context): Likewise.
18960 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
18962 (build_over_call): Fix indentation. Use DECL_CONTEXT
18963 instead of DECL_CLASS_CONTEXT.
18964 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
18965 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18966 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18967 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
18968 (build_base_field): Likewise.
18969 (finish_struct_1): Likewise.
18970 (build_self_reference): Likewise.
18971 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
18973 (pushtag): Use decl_function_context, not
18974 hack_decl_function_context.
18975 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18976 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
18977 (pushdecl): Remove bogus code.
18978 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
18979 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18980 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18981 Use decl_function_context, nothack_decl_function_context.
18982 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
18983 (grokdeclarator): Likewise. Use decl_function_context, not
18984 hack_decl_function_context.
18985 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
18986 (start_function): Use DECL_FRIEND_CONTEXT, not
18987 DECL_CLASS_CONTEXT. Use decl_function_context, not
18988 hack_decl_function_context.
18989 (finish_function): Use decl_function_context, not
18990 hack_decl_function_context.
18991 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
18992 DECL_CLASS_CONTEXT.
18993 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
18994 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
18995 (grokfield): Likewise.
18996 (finish_builtin_type): Likewise.
18997 (finish_vtable_vardec): Use decl_function_context, not
18998 hack_decl_function_context.
18999 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19000 (start_static_initialization_or_destruction): Likewise.
19001 (finish_static_initialization_or_destruction): Likewise.
19002 (mark_used): Adjust logic for deciding when to synthesize methods.
19003 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19005 * error.c (dump_function_decl): Use DECL_CONTEXT, not
19006 DECL_CLASS_CONTEXT.
19007 * friend.c (is_friend): Likewise.
19008 (add_friends): Remove.
19009 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19010 * lex.c (begin_definition_of_inclass_inline): Use
19011 decl_function_context, not hack_decl_function_context.
19012 (process_next_inline): Likewise.
19013 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19014 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19015 DECL_CLASSS_CONTEXT.
19016 (hack_identifier): Likewise.
19017 (synthesize_method): Use decl_function_context, not
19018 hack_decl_function_context.
19019 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19021 (is_member_template): Use decl_function_context, not
19022 hack_decl_function_context. Use DECL_CONTEXT, not
19023 DECL_CLASS_CONTEXT.
19024 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19025 DECL_CLASS_CONTEXT.
19026 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19028 (push_template_decl_real): Likewise.
19029 (instantiate_class_template): Don't call add_friends.
19030 (tsubst_default_argument): Use DECL_CONTEXT, not
19032 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19033 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19034 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19035 DECL_CLASS_CONTEXT.
19036 * repo.c (repo_inline_used): Likewise.
19037 * search.c (current_scope): Adjust for new _CONTEXT macros.
19038 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19040 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19041 (lookup_fnfields_here):Likewise.
19042 (check_final_overrider): Likewise.
19043 (init_vbase_pointers): Likewise.
19044 (virtual_context): Likewise.
19045 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19046 (expand_body): Use decl_function_context, not
19047 hack_decl_function_context.
19048 * tree.c (hack_decl_function_context): Remove.
19049 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19050 DECL_CLASS_CONTEXT.
19051 * typeck2.c (error_not_base_type): Likewise.
19053 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
19055 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19057 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19059 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19061 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
19063 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19065 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
19067 * decl2.c (lang_decode_option): Enable automatic line wrapping.
19069 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
19071 * parse.y (frob_specs): Split out...
19072 (parse_decl): From here.
19073 (fn.def2): Call initial_deferred_type_access_control.
19074 (after_type_component_declarator0): Call frob_specs.
19075 (notype_component_declarator0): Likewise.
19076 * search.c (friend_accessible_p): Nested classes are friends of their
19079 2000-02-10 Mark Mitchell <mark@codesourcery.com>
19081 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19082 used to create an implicit temporary.
19084 * class.c (dfs_modify_vtables): Tweak calculation of functions to
19087 2000-02-08 Nathan Sidwell <nathan@acm.org>
19089 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19090 strip array element qualifiers too.
19092 2000-02-07 Mark Mitchell <mark@codesourcery.com>
19094 * decl.c (store_parm_decls): Don't build cleanups for parameters
19095 while processing_template_decl.
19097 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
19099 * cp-tree.h (struct saved_scope): Add incomplete field.
19100 (namespace_scope_incomplete): New macro.
19101 * decl.c (pushdecl): Use it.
19102 (hack_incomplete_structures): Use it. See through artificial
19104 (mark_saved_scope): Mark it.
19106 Implement access control for nested types.
19107 * search.c (type_access_control): New fn.
19108 (accessible_p): Now we do perform access control for types.
19109 * semantics.c (deferred_type_access_control): New fn.
19110 (initial_deferred_type_access_control): New fn.
19111 (begin_function_definition): Call it. Add lookups parm.
19112 * decl.c (struct binding_level): Add this_class field.
19113 (pushlevel_class): Set it.
19114 (mark_binding_level): Mark it.
19115 (lookup_name_real): Use it. Call type_access_control.
19116 (mark_saved_scope): Mark lookups field.
19117 * cp-tree.h (flagged_type_tree): Add lookups field.
19118 (struct saved_scope): Add lookups field.
19119 (type_lookups): New macro.
19120 * parse.y (declmods): Now <ftype>.
19121 (parse_decl): Add lookups parm. Call
19122 initial_deferred_type_access_control.
19123 (lang_extdef): Clear type_lookups.
19124 (typed_declspecs, declmods, typespec): Set lookups field.
19125 (initdcl): Call deferred_type_access_control.
19126 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19127 component_decl_1, named_parm): Adjust.
19128 * friend.c (is_friend): Nested classes are friends of their
19131 * class.c (currently_open_derived_class): New fn.
19132 * method.c (hack_identifier): Use it.
19134 * lex.c (do_identifier): Remove obsolete code.
19136 * parse.y (typed_typespecs): Propagate new_type_flag properly.
19138 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
19140 * tinfo.h: Remove apostrophes from C++ comment (xgettext
19141 thinks this file is plain C).
19143 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19145 * Makefile.in (call.o): Depend on $(EXPR_H).
19147 * call.c: Include "expr.h".
19149 * class.c (dump_class_hierarchy): Add prototype.
19151 * search.c (dfs_get_pure_virtuals): Likewise.
19153 2000-02-1 Ulrich Drepper <drepper@redhat.com>
19155 * parse.y (simple_stmt): Allow :: token in asm parameter list.
19156 * parse.c: Rebuilt.
19158 2000-01-31 Jim Wilson <wilson@cygnus.com>
19160 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
19161 Store it in DECL_FCONTEXT.
19162 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
19164 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
19166 * tinfo.h (old abi): #include "tconfig.h".
19167 * tinfo.cc (convert_to_base): Move into old abi section.
19169 2000-01-31 Mark Mitchell <mark@codesourcery.com>
19171 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
19172 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
19173 (BINFO_PRIMARY_BINFO): New macro.
19174 (BF_DELTA): Rename to ...
19175 (BV_DELTA): ... this.
19176 (BF_VCALL_INDEX): Rename to ...
19177 (BV_VCALL_INDEX): ... this.
19178 (BF_FN): Rename to ...
19180 * class.c (build_vbase_path): Adjust for changes to reverse_path.
19181 (set_rtti_entry): Rename BF_ macros to BV_ variants.
19182 (modify_vtable_entry): Simplify.
19183 (add_virtual_function): Rename BF_ macros to BV_ variants.
19184 (build_vtable_initializer): Likewise.
19185 (get_class_offset_1): Remove.
19186 (dfs_get_class_offset): Likewise.
19187 (get_class_offset): Likewise.
19188 (dfs_find_final_overrider): New function.
19189 (find_final_overrider): Likewise.
19190 (modify_one_vtable): Remove.
19191 (dfs_find_base): New function.
19192 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
19193 find_final_overrider.
19194 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
19196 (dfs_fixup_vtable_deltas): Remove.
19197 (override_one_vtable): Remove.
19198 (merge_overrides): Likewise.
19199 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
19200 unreal chilren of virtual bases.
19201 (finish_struct_1): Don't use merge_overrides. Don't use
19202 dfs_fixup_vtable_deltas.
19203 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
19206 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
19207 Jason Merrill <jason@yorick.cygnus.com>
19209 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
19211 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
19213 * exception.cc (__throw_bad_typeid): Add missing std::.
19215 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19217 * cp-tree.h (make_thunk): PROTO -> PARAMS.
19219 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
19221 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
19223 Runtime support for new-abi rtti.
19224 * inc/typeinfo (type_info::operator!=): Define in class.
19225 (type_info::before, type_info::name, type_info::operator==,
19226 type_info::operator!=): Define new ABI implementations.
19227 (type_info::is_pointer_p, type_info::is_function_p): Declare
19228 new virtual functions.
19229 (type_info::do_catch, type_info::do_upcast): Likewise.
19231 * tinfo.h (__base_class_info): Define new class.
19232 (__class_type_info): Likewise.
19233 (__si_class_type_info): Likewise.
19234 (__vmi_class_type_info): Likewise.
19235 (__dynamic_cast): Prototype.
19237 * tinfo.cc: Conditionalize old and new rtti mechanisms.
19238 (type_info::is_pointer_p): Define new function.
19239 (type_info::is_function_p): Likewise.
19240 (type_info::do_catch): Likewise.
19241 (type_info::do_upcast): Likewise.
19242 (vtable_prefix): New structure for vtable access.
19243 (adjust_pointer): Define new template function.
19244 (contained_p, public_p, virtual_p, contained_public_p,
19245 contained_nonpublic_p, contained_nonvirtual_p): Define new
19247 (nonvirtual_base_type): New local variable.
19248 (__class_type_info::~__class_type_info): Define.
19249 (__si_class_type_info::~__si_class_type_info): Likewise.
19250 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
19251 (__class_type_info::do_catch): Define new function.
19252 (__class_type_info::do_upcast): Likewise.
19253 (__class_type_info::find_public_src): Likewise.
19254 (__class_type_info::do_find_public_src): Likewise.
19255 (__si_class_type_info::do_find_public_src): Likewise.
19256 (__vmi_class_type_info::do_find_public_src): Likewise.
19257 (__class_type_info::do_dyncast): Likewise.
19258 (__si_class_type_info::do_dyncast): Likewise.
19259 (__vmi_class_type_info::do_dyncast): Likewise.
19260 (__class_type_info::do_upcast): Likewise.
19261 (__si_class_type_info::do_upcast): Likewise.
19262 (__vmi_class_type_info::do_upcast): Likewise.
19263 (__dynamic_cast): Likewise.
19265 * tinfo2.cc (__fundamental_type_info): Define new class.
19266 (__pointer_type_info): Likewise.
19267 (__reference_type_info): Likewise.
19268 (__array_type_info): Likewise.
19269 (__function_type_info): Likewise.
19270 (__enum_type_info): Likewise.
19271 (__ptr_to_member_type_info): Likewise.
19272 (__fundamental_type_info::~__fundamental_type_info): Define.
19273 (__pointer_type_info::~__pointer_type_info): Likewise.
19274 (__reference_type_info::~__reference_type_info): Likewise.
19275 (__array_type_info::~__array_type_info): Likewise.
19276 (__function_type_info::~__function_type_info): Likewise.
19277 (__enum_type_info::~__enum_type_info): Likewise.
19278 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
19279 (__pointer_type_info::do_catch): Define new function.
19280 (__ptr_to_member_type_info::do_catch): Define new function.
19282 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
19283 (__is_pointer): Likewise.
19285 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
19287 2000-01-30 Mark Mitchell <mark@codesourcery.com>
19289 * cp/class.c (build_vtable): Rename to build_primary_vtable.
19290 (prepare_fresh_vtable): Rename to build_secondary_vtable.
19291 (make_new_vtable): New function.
19292 (modify_vtable_entry): Handle generation of new vtables correctly.
19293 (modify_one_vtable): Remove unused parameter.
19294 (dfs_fixup_vtable_deltas): Likewise.
19295 (override_one_vtable): Use build_secondary_vtable.
19296 (finish_struct_1): Use build_primary_vtable and
19297 build_secondary_vtable.
19299 2000-01-28 Ulrich Drepper <drepper@redhat.com>
19301 * cp/decl.c: Adjust variable names, comments, help strings.
19303 2000-01-29 Nathan Sidwell <nathan@acm.org>
19305 * new2.cc (operator delete[]): Use operator delete, don't assume
19308 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
19310 * class.c (build_vtbl_initializer): Add argument to
19311 build_vtable_entry call.
19313 2000-01-27 Mark Mitchell <mark@codesourcery.com>
19315 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
19316 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
19317 (BF_DELTA): New macro.
19318 (BF_VCALL_INDEX): Likewise.
19320 (THUNK_VCALL_OFFSET): Likewise.
19321 (make_thunk): Change prototype.
19322 * class.c (build_vtable_entry): Integrate
19323 build_vtable_entry_for_fn. Handle vcall indices.
19324 (build_vtable_entry_for_fn): Remove.
19325 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
19326 BF_VCALL_INDEX, BF_FN.
19327 (modify_vtable_entry): Integrate common code from
19328 modify_one_vtable and dfs_fixup_vtable_deltas.
19329 (add_virtual_function): Set BF_VCALL_INDEX.
19330 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
19332 (modify_one_vtable): Simplify.
19333 (dfs_fixup_vtable_deltas): Likewise.
19334 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
19335 * method.c (make_thunk): Handle vcall indices.
19337 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
19339 Compiler side new abi rtti (not enabled).
19340 * cp-tree.h (new_abi_rtti_p): New macro.
19341 (emit_support_tinfos): Prototype new function.
19342 (tinfo_decl_p): Likewise.
19343 (emit_tinfo_decl): Likwise.
19344 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
19346 (doing_runtime): New local static.
19347 (init_rtti_processing): Add new-abi initializer.
19348 (get_tinfo_decl): Add new-abi logic.
19349 (tinfo_from_decl): Likewise.
19350 (build_dynamic_cast_1): Likewise.
19351 (qualifier_flags): New static function.
19352 (tinfo_base_init): Likewise.
19353 (generic_initializer): Likewise.
19354 (ptr_ref_initializer): Likewise.
19355 (ptmd_initializer): Likewise.
19356 (class_hint_flags): Likewise.
19357 (class_initializer): Likewise.
19358 (synthesize_tinfo_var): Likewise.
19359 (create_real_tinfo_var): Likewise.
19360 (create_pseudo_type_info): Likewise.
19361 (get_vmi_pseudo_type_info): Likewise.
19362 (create_tinfo_types): Likewise.
19363 (emit_support_tinfos): New global function.
19364 (tinfo_decl_p): New global predicate.
19365 (emit_tinfo_decl): New global function.
19366 * class.c (set_rtti_entry): Generalize for old and new rtti.
19367 (build_vtbl_initializer): Likewise.
19368 * decl2.c (finish_file): Likewise.
19370 2000-01-27 Jim Wilson <wilson@cygnus.com>
19372 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
19373 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
19375 2000-01-27 Mike Stump <mrs@wrs.com>
19377 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
19380 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
19382 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
19384 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
19386 * optimize.c (calls_setjmp_r): Supply new argument
19387 to special_function_p.
19389 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19391 * call.c: PROTO -> PARAMS.
19392 * class.c: Likewise.
19393 * cp-tree.h: Likewise.
19395 * decl.c: Likewise.
19396 * decl.h: Likewise.
19397 * decl2.c: Likewise.
19398 * dump.c: Likewise.
19399 * errfn.c: Likewise.
19400 * error.c: Likewise.
19401 * except.c: Likewise.
19402 * expr.c: Likewise.
19403 * init.c: Likewise.
19404 * input.c: Likewise.
19407 * method.c: Likewise.
19408 * optimize.c: Likewise.
19409 * parse.y: Likewise.
19411 * repo.c: Likewise.
19412 * rtti.c: Likewise.
19413 * search.c: Likewise.
19414 * semantics.c: Likewise.
19415 * spew.c: Likewise.
19416 * tree.c: Likewise.
19417 * typeck.c: Likewise.
19418 * typeck2.c: Likewise.
19419 * xref.c: Likewise.
19421 2000-01-25 Richard Henderson <rth@cygnus.com>
19423 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19425 2000-01-25 Mark Mitchell <mark@codesourcery.com>
19427 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19428 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19429 (struct vcall_offset_data_s): New type.
19430 (dfs_vcall_offset_queue_p): New function.
19431 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19432 (build_vcall_offset_vtbl_entries): Likewise.
19433 (layout_vtable_decl): Likewise.
19434 (num_vfun_entries): Likewise.
19435 (num_extra_vtbl_entries): Add the entries for vcall offsets.
19436 (build_vtbl_initializer): Likewise.
19437 (dfs_finish_vtabls): Use layout_vtable_decl.
19438 (modify_one_vtables): Always duplicate vtables under the new ABI.
19439 (finish_struct_1): Use layout_vtable_decl.
19441 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19443 * decl.c (member_function_or_else): Change third arg from a format
19444 specifier to an `enum overload_flags'. Callers changed.
19446 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
19448 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19449 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19450 build_const_cast, get_delta_difference, check_return_expr): Avoid
19451 ANSI string concatenation usage.
19453 2000-01-24 Mark Mitchell <mark@codesourcery.com>
19455 * class.c (layout_class_type): Put the fields required to make a
19456 class non-empty at the end, not the beginning, of the TYPE_FIELDs
19459 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
19461 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19464 * decl2.c (mark_used): Do instantiate inlines that have been
19465 explicitly instantiated.
19467 2000-01-24 Richard Henderson <rth@cygnus.com>
19469 * call.c (build_over_call): Use expand_tree_builtin.
19470 * typeck.c (build_function_call_real): Likewise.
19471 (build_binary_op_nodefault): Handle unordered compares.
19473 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19475 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19476 cp_tree_index values.
19477 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19478 New global node #defines for them.
19479 * rtti.c (call_void_fn): Replace with ...
19480 (build_runtime_decl): ... new static function.
19481 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19482 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19483 (build_dynamic_cast_1): Always produce correctly typed result.
19484 Explicitly produce type_info addresses. Use dynamic_cast_node.
19485 * exception.cc (__throw_bad_cast): Return `void *'.
19486 (__throw_bad_typeid): Return `const type_info &'.
19488 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19490 * cp-tree.h (get_vtable_decl): Prototype new function.
19491 * class.c (get_vtable_decl): New function. Broken out from ...
19492 (build_vtable): ... here. Use it.
19493 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19494 by get_vtable_decl.
19496 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19498 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19499 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19500 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19501 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19502 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19503 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19504 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19505 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19506 (CPTI_TINFO_VAR_ID): New enumeration.
19507 (__tp_desc_type_node, __access_mode_type_node,
19508 __bltn_desc_type_node, __user_desc_type_node,
19509 __class_desc_type_node, __ptr_desc_type_node,
19510 __attr_desc_type_node, __func_desc_type_node,
19511 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19512 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19513 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19514 enum_desc_type_node, class_desc_type_node,
19515 si_class_desc_type_node, vmi_class_desc_type_node,
19516 ptmd_desc_type_node, base_desc_type_node): New #defines.
19517 (tinfo_fn_id, tinfo_fn_type): Rename to ...
19518 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19519 (tinfo_var_id): New enumeration.
19520 (DECL_TINFO_FN_P): Augment comment.
19521 * decl.c (cp_global_trees): Adjust documentation.
19522 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19523 tinfo_decl_type and tinfo_var_id.
19524 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19525 (build_typeid): Remove unused variable.
19526 (get_tinfo_var): Use tinfo_var_id.
19527 (tinfo_name): New static function.
19528 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19529 (tinfo_from_decl): Likewise.
19530 (get_base_offset): New static function, broken out of
19532 (expand_si_desc): Use tinfo_name.
19533 (expand_class_desc): Likewise. Lose local static variable.
19534 Use base_desc_type_node. Use get_base_offset.
19535 (expand_ptr_desc): Use tinfo_name.
19536 (expand_attr_desc): Likewise.
19537 (expand_generic_desc): Likewise.
19539 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19540 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19542 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19544 * cp-tree.h (__eprintf): Remove declaration.
19545 * tree.c (__eprintf): Remove definition.
19547 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
19548 Mark Mitchell <mark@codesourcery.com>
19550 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19551 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19553 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
19555 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19557 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19559 * cp-tree.h (register_dtor_fn): New function.
19560 * decl.c (destroy_local_static): Rename to ...
19561 (register_dtor_fn): ... this. Give it external linkage.
19562 (expand_static_init): Use it.
19563 * decl2.c (do_static_initialization): Likewise, if using
19565 (do_static_destruction): Check that __cxa_atexit is not in use.
19566 (finish_file): Don't call do_static_destruction if using
19569 * typeck.c (convert_arguments): Restore two-message error
19572 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
19574 Remap dynamic cast hint values to be consistent across ABIs.
19575 * search.c (dynamic_cast_base_recurse): Remap generated value.
19576 (get_dynamic_cast_base_type): Adjust documentation.
19577 * tinfo.h (__user_type_info::dyncast): Likewise.
19578 (__user_type_info::find_public_subobj): Remap BOFF meaning.
19579 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
19580 (__class_type_info::do_dyncast): Likewise.
19581 (__class_type_info::do_find_public_subobj): Likewise.
19582 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
19584 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19586 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
19588 * typeck2.c (incomplete_type_error): Restore previous
19589 cp_error and cp_error_at call sequence.
19591 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
19593 * class.c (dump_class_hierarchy): Make format agree with argument;
19594 cast pointer to unsigned long and print with %lx.
19596 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19598 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
19600 * typeck.c (composite_pointer_type, common_type,
19601 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
19602 build_function_call_real, convert_arguments,
19603 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
19604 build_unary_op, mark_addressable, build_compound_expr,
19605 build_static_cast, build_reinterpret_cast, build_const_cast,
19606 build_c_cast, build_modify_expr, get_delta_difference,
19607 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
19608 'ISO C++'. Fusion consecutive calls to diagnostic message routines
19610 * typeck2.c (readonly_error, abstract_virtuals_error,
19611 process_init_constructor, check_for_new_type): Likewise.
19613 2000-01-19 Mark Mitchell <mark@codesourcery.com>
19615 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
19618 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
19620 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
19621 (build_x_typeid): Likewise.
19622 (get_tinfo_fn): Likewise.
19623 (get_tinfo_fn_unused): Rename to ...
19624 (get_tinfo_decl): ... here.
19625 * rtti.c (build_headof): Replace logic error with assertion.
19626 (get_tinfo_fn_dynamic): Rename to ...
19627 (get_tinfo_decl_dynamic): ... here. Make static. Use
19628 complete_type_or_else.
19629 (build_x_typeid): Move into ...
19630 (build_typeid): ... here. Adjust call to
19631 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
19632 throw_bad_typeid expression.
19633 (get_tinfo_fn_unused): Rename to ...
19634 (get_tinfo_decl): ... here. Adjust comment.
19635 (get_tinfo_fn): Delete.
19636 (tinfo_from_decl): New static function.
19637 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
19638 (get_typeid): Use complete_type_or_else.
19639 (build_dynamic_cast_1): Adjust calls to
19640 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
19641 * parse.y (primary): Adjust call to build_typeid.
19642 * except.c (build_eh_type_type_ref): Adjust call to
19643 get_tinfo_decl. Mark as used.
19644 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
19645 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
19646 * parse.c: Regenerated.
19648 2000-01-17 Mark Mitchell <mark@codesourcery.com>
19650 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
19651 calling convention.
19652 (resolves_to_fixed_type_p): Document calling convention.
19653 * rtti.c (build_x_typeid): Initialize NONNULL.
19655 * cp-tree.h (build_shared_int_cst): New function.
19656 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
19657 * class.c (modify_vtable_entry): Likewise.
19658 (add_virtual_function): Split out code to generated shared
19659 INTEGER_CSTs to build_share_int_cst.
19660 (modify_all_vtables): Handle all the overridden functions here.
19661 Add overridden functions from non-primary virtual bases to the
19663 (finish_struct_1): Adjust call to modify_all_vtables. Add
19664 overridden functions from non-primary bases to the vtable.
19665 * tree.c (build_shared_int_cst): New function.
19667 * cp-tree.h (scratchalloc): Remove.
19668 (build_scratch_list): Likewise.
19669 * call.c (convert_class_to_reference): Replace build_scratch_list
19670 and build_expr_list with build_tree_list.
19671 (add_candidate): Replace scratchalloc with expralloc. Note memory
19673 (build_user_type_conversion_1): Replace build_scratch_list
19674 and build_expr_list with build_tree_list.
19675 (build_new_op): Likewise.
19676 (build_op_delete_call): Likewise.
19677 (convert_like): Likewise.
19678 * cvt.c (ocp_convert): Likewise.
19679 * decl.c (start_decl): Likewise.
19680 (start_function): Likewise.
19681 (finish_destructor_body): Likewise.
19682 (maybe_build_cleanup_1): Likewise.
19683 * decl2.c (reparse_decl_as_expr): Likewise.
19684 * init.c (perform_member_init): Likewise.
19685 (expand_cleanup_for_base): Likewise.
19686 (build_builtin_delete_call): Likewise.
19687 (build_new_1): Likewise.
19688 (build_delete): Likewise.
19689 * method.c (do_build_assign_ref): Likewise.
19690 * parse.y (already_scoped_stmt): Likewise.
19691 (nontrivial_exprlist): Likewise.
19692 (net_initializer): Likewise.
19693 (initlist): Likewise.
19694 * parse.c: Regenerated.
19695 * rtti.c (build_x_typeid): Likewise.
19696 (build_dynamic_cast_1): Likewise.
19697 * typeck.c (build_x_compound_expr): Likewise.
19698 (build_static_cast): Likewise.
19699 (build_modify_expr): Likewise.
19701 * cp-tree.h (DECL_VINDEX): Add documentation.
19702 * class.c (build_vtable_entry): Likewise.
19703 (start_vtable): Add comment.
19704 (add_virtual_function): Replace pending_hard_virtuals with
19705 overridden_virtuals and pending_virtuals with new_virtuals.
19706 Replace redundant assignments with assertions.
19707 (check_for_override): Add comment.
19708 (check_bases_and_members): Replace pending_hard_virtuals with
19709 overridden_virtuals and pending_virtuals with new_virtuals.
19710 (create_vtbl_ptr): Likewise.
19711 (layout_class_type): Likewise.
19712 (finish_struct_1): Likewise. Add comments.
19714 2000-01-16 Mark Mitchell <mark@codesourcery.com>
19716 * class.c (finish_struct_1): Replace redundant code with
19719 * cp-tree.h (flag_new_abi): Move.
19720 (flag_use_cxa_atexit): Likewise.
19721 (flag_honor_std): Likewise.
19722 (flag_rtti): Likewise.
19723 (vbase_offsets_in_vtable_p): Define.
19724 (vptrs_present_everywhere_p): Likewise.
19725 (TYPE_CONTAINS_VPTR_P): Likewise.
19726 (dfs_walk_real): Declare.
19727 * class.c (build_vbase_pointer_fields): Check
19728 vbase_offsets_in_vtable_p.
19729 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
19731 (build_vbase_offset_vtbl_entries): Simplify.
19732 (build_vbase_offset_vtbl_entries): Adjust.
19733 (build_vbase_pointer): Add ability to look up vbase offsets in
19735 (start_vtable): New function.
19736 (add_virtual_function): Use it.
19737 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
19738 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
19739 (build_vtbl_initializer): Take the type of the complete object as
19740 input. Use it to correctly calculate vbase offsets.
19741 (dfs_finish_vtbls): Pass the complete type to
19742 build_vtbl_initializer.
19743 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
19744 (create_vtable_ptr): Create a vtable even if there are no
19745 new virtual functions, under the new ABI.
19746 (finish_struct_1): Likewise.
19747 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
19748 * decl.c (exapnd_static_init): Remove call to
19749 preserve_initializer.
19750 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
19752 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
19753 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
19754 (construct_virtual_bases): Don't initialize virtual base pointers
19756 (build_aggr_init): Clean up comment.
19757 (expand_aggr_init_1): Likewise.
19758 * rtti.c (expand_class_desc): Store the virtual function table
19759 index where the vbase offset lives in the offset field.
19760 * search.c (dfs_walk_real): Make it global.
19761 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
19762 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
19764 * tinfo.h (USItype): Make it signed under the new ABI.
19765 * tinfo.cc (convert_to_base): New function. Encapsulate base
19766 conversion logic here.
19767 (__class_type_info::do_upcast): Use it.
19768 (__class_type_info::do_dyncast): Likewise.
19769 (__class_type_info::do_find_public_subobj): Likewise.
19771 * init.c (construct_virtual_bases): Don't look up the addresses of
19772 virtual bases at run-time.
19774 * class.c (build_vbase_pointer): Relocate.
19775 (build_vbase_pointer_fields): Likewise.
19776 (dfs_build_vbase_offset_vtbl_entries): Likewise.
19777 (build_vbase_offset_vtbl_entries): Likewise.
19779 * decl.c (init_decl_processing): Complain if -fnew-abi
19780 -fno-vtable-thunks is used.
19782 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
19785 2000-01-15 Mark Mitchell <mark@codesourcery.com>
19787 * cp-tree.h (num_extra_vtbl_entries): New function.
19788 (size_extra_vtbl_entries): Likewise.
19789 (dfs_vtable_path_unmark): Likewise.
19790 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
19791 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19792 * class.c (num_extra_vtbl_entries): New function.
19793 (size_extra_vtbl_entries): Likewise.
19794 (dfs_build_vbase_offset_vtbl_entries): New function.
19795 (build_vbase_offset_vtbl_entries): Likewise.
19796 (build_vtbl_initializer): Use it.
19797 (finish_struct_1): Adjust vtable sizes (using
19798 num_extra_vtbl_entries).
19799 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
19800 THUNK_DECL is non-NULL before expanding it.
19801 * init.c (expand_virtual_init): Adjust the vtable pointer by
19802 size_extra_vtbl_entries before storing it.
19803 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
19804 Handle TREE_LIST parameters here, not in the dfs_* functions.
19805 (dfs_unmarked_real_bases_queue_p): Adjust.
19806 (dfs_marked_real_bases_queue_p): Likewise.
19807 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
19808 (dfs_vtable_path_marked_real_bases_queue_p): New function.
19809 (dfs_vtable_path_unmark): Likewise.
19811 2000-01-14 Mark Mitchell <mark@codesourcery.com>
19813 * optimize.c (copy_body_r): Clear the operand three of a
19814 TARGET_EXPR when copying it.
19816 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19818 * method.c (build_decl_overload_real): Check whether we are in ::
19819 before returning __builtin_new/delete.
19821 2000-01-13 Mark Mitchell <mark@codesourcery.com>
19823 * pt.c (tsubst_friend_function): Improve comment.
19824 (instantiate_decl): Avoid crashing when a "nested" function is
19825 instantiated from the top level.
19827 * dump.c (dqeueue_and_dump): Dump
19828 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
19830 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19832 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
19834 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
19836 * g++spec.c (lang_specific_driver): Add -fnew-abi if
19837 ENABLE_NEW_GXX_ABI defined.
19838 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
19839 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
19840 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
19842 2000-01-12 Mark Mitchell <mark@codesourcery.com>
19844 * decl.c (start_cleanup_fn): Call pushdecl.
19846 * call.c (convert_class_to_reference): Fix typos.
19847 (build_conditional_expr): Handle errors gracefully.
19848 * class.c (push_nested_class): Likewise.
19849 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
19850 (DECL_THIS_EXTERN): Use it.
19851 (DECL_THIS_STATIC): Likewise.
19852 * cvt.c (convert_to_void): Handle errors gracefully.
19853 (build_expr_type_conversion): Likewise.
19854 * decl.c (maybe_push_decl): Likewise.
19855 (start_decl_1): Likewise.
19856 (require_complete_types_for_parms): Likewise.
19857 * parse.y (structsp): Likewise.
19858 (base_class): Likewise.
19859 * parse.c: Regenerated.
19860 * pt.c (finish_member_template_decl): Likewise.
19861 * typeck.c (decay_conversion): Likewise.
19863 * cp-tree.h (dfs_skip_vbases): New function.
19864 (find_vbase_instance): Likewise.
19865 * class.c (determine_primary_base): Allow a nearly empty base to
19866 serve as a primary base class under the new ABI.
19867 (get_class_offset_1): Rename to ...
19868 (dfs_get_class_offset): ... this. Simplify. Don't issue error
19870 (get_class_offset): Use it. Issue error messages here.
19871 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
19872 find the right copies of virtual bases.
19873 (fixup_vtable_deltas1): Rename to ...
19874 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
19875 bases as primary bases.
19876 (fixup_vtable_deltas): Remove.
19877 (override_one_vtable): Handle virtual bases as primary bases.
19878 (merge_overrides): Likewise.
19879 (finish_struct_1): Likewise.
19880 (dump_class_hierarchy): Dump primary-ness of bases as well.
19881 * search.c (mark_primary_bases): Use a pre-order traversal to
19882 handle primary virtual bases.
19883 (dfs_skip_vbases): New fiunction.
19884 (expand_upcast_fixups): Adjust to handle primary virtual bases.
19885 (fixup_virtual_upcast_offsets): Likewise.
19886 (fixup_all_virtual_upcast_offsets): Likewise.
19887 (dfs_find_vbase_instances): New function.
19888 (find_vbase_instance): Likewise.
19890 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
19892 * lex.c (DIR_SEPARATOR): Delete macro.
19894 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
19896 * decl2.c (lang_decode_option): Handle automatic line wrapping
19899 2000-01-11 Mark Mitchell <mark@codesourcery.com>
19901 * friend.c (do_friend): Don't resolve scopes when processing
19902 template declarations, even if the qualifying scope doesn't
19903 involve template parameters.
19905 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
19907 * class.c (dfs_modify_vtables_queue_p): Remove.
19908 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
19909 and dfs_marked_real_bases_queue_p instead of
19910 dfs_modify_vtables_queue_p.
19912 * class.c (build_vbase_path): Simplify.
19913 (dfs_propagate_binfo_offsets): New function.
19914 (propagate_binfo_offsets): Use it.
19915 (remove_base_field): Simplify.
19916 (dfs_set_offset_for_vbases): Remove.
19917 (dfs_set_offset_for_shared_vbases): New function.
19918 (dfs_set_offset_for_unshared_vbases): Likewise.
19919 (layout_virtual_bases): Use them.
19920 (layout_basetypes): Don't call propagate_binfo_offsets.
19921 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
19924 * class.c (build_base_field): New function, split out from ...
19925 (build_base_fields): ... here. Use it. Allocate primary bases
19926 first, under the new ABI.
19927 (get_vtable_entry): Remove.
19928 (remove_base_field): New function, split out from ...
19929 (remove_base_fields): ... here. Adjust since primary bases come
19930 first under the new ABI.
19932 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
19933 (initialize_vtbl_ptrs): New function.
19934 (expand_indirect_vtbls_init): Change prototype.
19935 (convert_pointer_to_vbase): Declare.
19936 * init.c (expand_direct_vtbls_init): Remove.
19937 (dfs_initialize_vtbl_ptrs): New function.
19938 (initialize_vtbl_ptrs): Likewise.
19939 (emit_base_init): Use initialize_vtbl_ptrs.
19940 * search.c (convert_pointer_to_vbase): Make it global.
19941 (expand_indirect_vtbls_init): Remove vtable initialization code.
19942 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
19944 * class.c (dfs_finish_vtbls): New function.
19945 (finish_vtbls): Use it.
19946 (dump_class_hierarchy): New function.
19948 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
19949 (BINFO_VBASE_PRIMARY_P): New macro.
19950 (BINFO_VIRTUALS): Add to documentation.
19951 (SET_BINFO_PRIMARY_MARKED_P): Remove.
19952 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19953 (dfs_mark_primary_bases_queue_p): Likewise.
19954 (dfs_unmarked_real_bases_queue_p): New function.
19955 (dfs_marked_real_bases_queue_p): Likewise.
19956 * search.c (dfs_mark_primary_bases): Adjust.
19957 (mark_primary_bases): Likewise.
19958 (get_shared_vbase_if_not_primary): New function.
19959 (dfs_unmarked_real_bases_queue_p): Likewise.
19960 (dfs_marked_real_bases_queue_p): Likewise.
19961 (dfs_get_pure_virtuals): Simplify.
19962 (get_pure_virtuals): Likewise.
19964 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19966 * lex.c: Include tm_p.h.
19968 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
19970 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
19972 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
19974 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
19975 * pt.c (instantiate_decl): Defer comdat templates that might not be
19978 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
19979 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
19980 (finish_file): Likewise.
19982 * decl2.c (import_export_class): Undo 12/14 change.
19984 * error.c (dump_decl): operator new, not operatornew.
19986 * class.c (field_decl_cmp): A nontype is "greater" than a type.
19987 * search.c (lookup_field_1): Look for the last field with the
19990 2000-01-05 Nathan Sidwell <nathan@acm.org>
19992 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
19995 2000-01-05 Nathan Sidwell <nathan@acm.org>
19997 * typeck.c (build_static_cast): Don't strip target qualifiers
19998 when casting from a class.
20000 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20002 * class.c (warn_hidden): Initialize variable `fndecl'.
20004 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
20006 * decl.c (flag_isoc9x): New variable to be able to use code in
20007 c-common.c. For now always zero.
20009 2000-01-03 Mark Mitchell <mark@codesourcery.com>
20011 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20012 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20013 or unshare_base_binfos for virtual bases here.
20014 * search.c (dfs_get_vbase_types): Do it here.
20015 (get_vbase_types): Adjust.
20017 2000-01-02 Mark Mitchell <mark@codesourcery.com>
20019 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20020 (BINFO_PRIMARY_MARKED_P): Use flag 5.
20021 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20022 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20023 (unmark_primary_bases): Remove declaration.
20024 (unmarkedp): Declare.
20025 (dfs_vbase_unmark): Likewise.
20026 * class.c (determine_primary_base): Return immediately if there
20027 are no base classes. Call mark_primary_bases here.
20028 (modify_all_direct_vtables): Remove.
20029 (modify_all_indirect_vtables): Remove.
20030 (dfs_modify_vtables_queue_p): New function.
20031 (dfs_modify_vtables): New function.
20032 (modify_all_vtables): Use them.
20033 (build_base_fields): Build FIELD_DECLs for primary virtual base
20035 (create_vtable_ptr): Don't call determine_primary_base here.
20036 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20037 (dfs_set_offset_for_vbases): ... this.
20038 (layout_virtual_bases): Use it.
20039 (layout_class_type): Call determine_primary_base here.
20040 * search.c (unmarkedp): Make it global.
20041 (shared_marked_p): Simplify.
20042 (shared_unmarked_p): Likewise.
20043 (dfs_primary_bases_queue_p): Remove.
20044 (dfs_unmark_primary_bases): Likewise.
20045 (unmark_primary_bases): Likewise.
20046 (mark_primary_bases): Simplify.
20047 (get_pure_virtuals): Don't call mark_primary_bases here.
20048 (dfs_vbase_unmark): New function.
20049 (get_vbase_types): Simplify.
20051 * class.c (struct base_info): Remove.
20052 (determine_primary_base): Take has_virtual_p rather than a
20053 base_info as input. Don't calculate max_has_virtual.
20054 (finish_struct_bits): Remove max_has_virtual argument.
20055 (create_vtable_ptr): Remove max_has_virtual_p argument.
20056 (layout_virtual_bases): Remove max argument.
20057 (layout_basetypes): Likewise.
20058 (layout_class_type): Remove max_has_virtual_p argument.
20059 (finish_struct_1): Remove max_has_virtual.
20061 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20062 (layout_basetypes): Remove.
20063 * class.c (propagate_binfo_offsets): Moved here from tree.c.
20064 Update to handle primary virtual bases.
20065 (remove_base_fields): New function, split out from
20067 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20068 (layout_virtual_bases): New function, split out from
20069 layout_basetypes. Update to handle primary virtual bases.
20070 (layout_basetypes): Moved here from tree.c. Use
20071 remove_base_fields and layout_virtual_bases.
20072 * search.c (dfs_mark_primary_bases_queue_p): New function.
20073 (mark_primary_bases): Use it.
20074 * tree.c (CEIL): Remove.
20075 (propagate_binfo_offsets): Remove.
20076 (layout_basetypes): Remove.
20078 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20080 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20081 (BINFO_PRIMARY_MARKED_P): New macro.
20082 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20083 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20084 (mark_primary_bases): New function.
20085 (unmark_primary_bases): Likewise.
20086 * search.c (get_abstract_virtuals_1): Remove.
20087 (dfs_mark_primary_bases): New function.
20088 (mark_primary_bases): Likewise.
20089 (dfs_unmark_primary_bases): Likewise.
20090 (unmark_primary_bases): Likewise.
20091 (dfs_get_pure_virtuals): Likewise.
20093 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20095 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20096 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20097 (modify_one_vtable): Adjust.
20098 (fixup_vtable_deltas1): Likewise.
20099 (override_one_vtable): Likewise.
20100 * search.c (get_abstract_virtuals_1): Likewise.
20101 (get_pure_virtuals): Likewise.
20102 (expand_upcast_fixups): Likewise.
20103 * tree.c (debug_binfo): Likewise.
20105 * class.c (build_vtable): Don't return a value. Don't rebuild
20106 vtables for bases that have already been handled.
20107 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20108 already been handled.
20109 (modify_one_vtable): Adjust accordingly.
20110 (fixup_vtable_deltas1): Likewise.
20111 (finish_struct_1): Likewise.
20113 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20115 * call.c (build_new_method_call): Also check destructors.