1 2004-08-30 Richard Henderson <rth@redhat.com>
3 * class.c (build_base_path): Use build_address directly.
4 * typeck.c (build_unary_op): Don't lower &a.b to pointer
6 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
7 means !initializer_constant_valid_p.
9 2004-08-30 Richard Henderson <rth@redhat.com>
11 * class.c (fixed_type_or_null): Use get_base_address before
12 assuming an ADDR_EXPR is non-null.
14 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
16 * name-lookup.c (pop_binding, pushdecl,
17 set_identifier_type_value_with_scope, push_overloaded_decl,
18 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
19 * parser.c (cp_parser_diagnose_invalid_type_name,
20 cp_parser_postfix_expression, cp_parser_unary_expression,
21 cp_parser_check_declarator_template_para): Likewise.
22 * pt.c (push_inline_template_parms_recursive,
23 check_explicit_specialization, convert_nontype_argument,
24 coerce_template_template_parms, uses_template_parms,
25 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
26 tsubst_expr, instantiate_template,
27 maybe_adjust_types_for_deduction, type_unification_real,
28 resolve_overloaded_unification, template_decl_level,
29 type_dependent_expression_p): Likewise.
30 * search.c (lookup_base_r): Likewise.
31 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
32 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
33 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
34 * typeck.c (common_type, get_member_function_from_ptrfunc,
35 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
36 * typeck2.c (cxx_incomplete_type_diagnostic,
37 split_nonconstant_init_1, store_init_value,
38 process_init_constructor): Likewise.
40 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
42 * call.c (check_dtor_name): Replace abort with gcc_assert or
44 (build_call, add_builtin_candidate, build_new_op,
45 convert_like_real, build_over_call, in_charge_arg_for_name,
46 source_type, joust): Likewise.
47 * class.c (build_simple_base_path, get_vcall_index,
48 finish_struct_1, instantiate_type, get_enclosing_class,
49 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
50 * cp-gimplify.c (cp_genericize): Likewise.
51 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
52 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
53 * decl.c (poplevel, make_unbound_class_template, reshape_init,
54 check_special_function_return_type, grokdeclarator,
55 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
56 finish_function): Likewise.
57 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
58 * error.c (dump_global_iord, dump_decl, dump_template_decl,
59 language_to_string): Likewise.
60 * except.c (choose_personality_routine): Likewise.
61 * friend.c (do_friend): Likewise.
62 * g++spec.c (lang_specific_driver): Likewise.
63 * init.c (build_zero_init, expand_default_init, build_new_1,
64 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
65 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
66 * mangle.c (add_substitution, write_unscoped_name,
67 write_template_prefix, write_identifier,
68 write_special_name_destructor, write_type, write_builtin_type,
69 write_expression, write_template_param,
70 write_java_integer_type_codes): Likewise.
71 * method.c (implicitly_declare_fn): Likewise.
73 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
75 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
76 (BINFO_INDIRECT_PRIMARY_P): Remove.
77 * class.c (determine_primary_base): Rename to ...
78 (determine_primary_bases): ... here. Set all primary bases.
79 (set_primary_base): Remove.
80 (mark_primary_bases): Remove.
81 (build_simple_base_path, walk_subobject_offsets,
82 propagate_binfo_offsets, end_of_class): Adjust.
83 (layout_class_type): Rename determine_primary_base call.
84 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
86 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
87 build_rtti_vtbl_entries): Adjust.
88 * init.c (build_vtbl_address): Adjust.
90 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
92 2004-08-28 Ziemowit Laski <zlaski@apple.com>
94 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
96 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
97 separately on the link line.
99 2004-08-28 Jason Merrill <jason@redhat.com>
101 * decl.c (expand_static_init): Avoid bogus warnings.
103 2004-08-27 Jason Merrill <jason@redhat.com>
106 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
109 * decl.c (expand_static_init): Use thread-safety API.
110 (register_dtor_fn): Return the call, don't expand it.
111 * tree.c (add_stmt_to_compound): New fn.
112 (stabilize_call): Use it.
114 2004-08-27 Richard Henderson <rth@redhat.com>
116 * cp-tree.def (OFFSETOF_EXPR): New.
117 * parser.c (cp_parser_builtin_offsetof): Either built an
118 OFFSETOF_EXPR, or call fold_offsetof immediately.
119 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
121 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
123 * call.c (validate_conversion_obstack): Replace
124 my_friendly_assert with gcc_assert or gcc_unreachable.
125 (direct_reference_binding, merge_conversion_sequences,
126 build_user_type_conversion_1, perform_overload_resolution,
127 build_op_delete_call, enforce_access, call_builtin_trap,
128 build_over_call, build_special_member_call, build_new_method_call,
129 initialize_reference): Likewise.
130 * class.c (build_base_path, build_primary_vtable, alter_access,
131 check_bases, update_vtable_entry_for_fn, layout_empty_base,
132 clone_function_decl, adjust_clone_args,
133 type_requires_array_cookie, include_empty_classes,
134 finish_struct_1, resolve_address_of_overloaded_function,
135 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
136 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
137 accumulate_vtbl_inits, build_vtbl_initializer,
138 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
139 * cvt.c (build_up_reference, convert_to_reference): Likewise.
140 * decl.c (poplevel, duplicate_decls, make_typename_type,
141 cxx_init_decl_processing, reshape_init, check_initializer,
142 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
143 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
144 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
145 xref_basetypes, start_preparsed_function, save_function_data,
146 finish_function, finish_method, maybe_register_incomplete_var,
147 complete_vars): Likewise.
148 * decl2.c (grok_array_decl, check_member_template,
149 check_classfn, finish_static_data_member_decl, coerce_new_type,
150 coerce_delete_type, import_export_class, decl_needed_p,
151 determine_visibility, import_export_decl, build_cleanup,
152 start_static_initialization_or_destructi, do_static_destruction,
153 prune_vars_needing_no_initialization,
154 build_offset_ref_call_from_tree): Likewise.
155 * error.c (dump_decl, dump_expr): Likewise.
156 * init.c (finish_init_stmts, build_zero_init,
157 expand_virtual_init, expand_default_init, expand_aggr_init_1,
158 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
160 * mangle.c (write_method_parms, write_template_args,
161 write_expression, write_template_arg): Likewise.
162 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
163 * name-lookup.c (pop_binding, begin_scope, leave_scope,
164 resume_scope, push_using_decl, validate_nonmember_using_decl,
165 is_ancestor, poplevel_class, set_inherited_value_binding_p,
166 push_class_level_binding, do_class_using_decl, push_namespace,
167 pop_namespace, add_using_namespace, ambiguous_decl,
168 lookup_namespace_name, lookup_type_current_level,
169 maybe_process_template_type_declaration): Likewise.
170 * parser.c (cp_lexer_peek_nth_token,
171 cp_parser_parse_and_diagnose_invalid_typ,
172 cp_parser_translation_unit, cp_parser_template_id,
173 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
174 * pt.c (push_access_scope, finish_member_template_decl,
175 push_inline_template_parms_recursive, add_outermost_template_args,
176 get_innermost_template_args, begin_explicit_instantiation,
177 end_explicit_instantiation, retrieve_specialization,
178 is_specialization_of, is_specialization_of_friend,
179 register_specialization, check_explicit_specialization,
180 comp_template_parms, process_template_parm,
181 process_partial_specialization, convert_nontype_argument,
182 coerce_template_template_parms, coerce_template_parms,
183 mangle_class_name_for_template, lookup_template_function,
184 lookup_template_class, instantiate_class_template, tsubst_decl,
185 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
186 instantiate_template, fn_type_unification, type_unification_real,
187 get_template_base, regenerate_decl_from_template,
188 template_for_substitution, instantiate_decl,
189 get_mostly_instantiated_function_type, dependent_scope_ref_p,
190 value_dependent_expression_p, resolve_typename_type): Likewise.
191 * repo.c (repo_emit_p): Likewise.
192 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
193 create_tinfo_types, emit_tinfo_decl): Likewise.
194 * search.c (lookup_base_r, lookup_base, lookup_field_1,
195 dfs_access_in_type, build_baselink, lookup_member,
196 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
197 * semantics.c (perform_or_defer_access_check,
198 finish_non_static_data_member, finish_stmt_expr_expr,
199 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
200 finish_template_template_parm, finish_member_declaration,
201 emit_associated_thunks): Likewise.
202 * tree.c (build_target_expr_with_type, force_target_expr,
203 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
204 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
205 cxx_sizeof_or_alignof_type, perform_integral_promotions,
206 build_class_member_access_expr, finish_class_member_access_expr,
207 build_ptrmemfunc_access_expr, build_unary_op,
208 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
209 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
210 * typeck2.c (complete_type_check_abstract,
211 abstract_virtuals_error, process_init_constructor,
212 add_exception_specifier): Likewise.
214 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
216 * class.c (build_vtbl_initializer): Use ssize_int.
217 * decl.c (complete_array_type): Likewise.
218 * method.c (finish_thunk): Likewise.
219 * search.c (get_dynamic_base_type): Likewise.
221 2004-08-26 Richard Henderson <rth@redhat.com>
223 * cp-tree.h (DECL_FIELD_IS_BASE): New.
224 * class.c (build_base_field): Set it.
225 (build_simple_base_path): Use it.
226 (fixed_type_or_null): Don't consider base fields definitive.
228 2004-08-25 Roger Sayle <roger@eyesopen.com>
231 PR tree-optimization/16372
232 * decl.c (finish_enum): Make the precision of the enumerated type
233 the same width as the underlying integer type.
235 2004-08-25 Mark Mitchell <mark@codesourcery.com>
238 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
241 * mangle.c (get_identifier_nocopy): Add cast.
243 * cp-tree.h (mangle_type): Remove.
244 * mangle.c (globals): GTY it.
245 (mangle_obstack): New variable.
246 (name_obstack): Likewise.
247 (name_base): Likewise.
248 (write_char): Adjust accordingly.
249 (write_chars): Likewise.
250 (write_string): Likewise.
251 (start_mangling): Initialize G.substitutions only one. Add
253 (finish_mangling): Use VARRAY_CLEAR to reclaim
254 storage in G.substitutions. Use obstack_finish.
255 (init_mangle): Adjust for changes to variable names above.
256 Initialize G.substitutions.
257 (mangle_decl_string): Adjust call to start_mangling.
258 (get_identifier_nocopy): New function.
259 (mangle_decl): Use it.
260 (mangle_type_string): Adjust call to start_mangling.
261 (mangle_special_for_type): Likewise.
262 (mangle_vtt_for_type): Likewise.
263 (mangle_ctor_vtbl_for_type): Likewise.
264 (mangle_thunk): Likewise.
265 (mangle_guard_variable): Likewise.
266 (mangle_ref_init_variable): Likewise.
268 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
271 * pt.c (redeclare_class_template): Check the type of non-type and
272 template template parameter.
274 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
277 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
278 (build_user_type_conversion_1, convert_like_real,
279 build_java_interface_fn_ref, build_special_member_call): Likewise.
280 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
281 * cp-gimplify.c (cp_gimplify_expr): Likewise.
282 * cvt.c (cp_convert_to_pointer): Likewise.
283 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
284 * decl2.c (start_static_initialization_or_destruction,
285 generate_ctor_or_dtor_function): Likewise.
286 * except.c (build_throw): Likewise.
287 * mangle.c (write_integer_cst): Likewise.
288 * method.c (finish_thunk): Likewise.
289 * rtti.c (build_headof, get_tinfo_decl_dynamic,
290 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
291 get_pseudo_ti_init): Likewise.
292 * search.c (get_dynamic_cast_base_type): Likewise.
294 2004-08-25 Zack Weinberg <zack@codesourcery.com>
296 * class.c, search.c: Remove references to DWARF_DEBUG.
298 2004-08-25 Adam Nemet <anemet@lnxw.com>
300 * repo.c (extract_string): Reset backquote after one character.
301 (get_base_filename): Fix indentation.
302 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
304 * decl.c (cxx_init_decl_processing): Adjust
305 build_common_tree_nodes call.
307 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
310 * (is_subobject_of_p): Resurrect & optimize.
311 (lookup_field_r): Use it.
313 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
316 * search.c (friend_accessible_p): Increment processing_template_decl
317 when deal with TEMPLATE_DECL of SCOPE.
319 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
322 * semantics.c (check_accessibility_of_qualified_id): Defer check
323 if qualifying_type is a template parameter.
325 2004-08-23 Mark Mitchell <mark@codesourcery.com>
328 * pt.c (instantiate_decl): Do not try to apply
329 DECL_DECLARED_INLINED_P to a VAR_DECL.
331 * search.c (build_baselink): Fix typo in comment.
333 2004-08-22 Andrew Pinski <apinski@apple.com>
336 2004-08-22 Andrew Pinski <apinski@apple.com>
338 * typeck.c (build_unary_op): Use &a.b if the folded lowered
339 expression is not constant.
341 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
343 * name-lookup.c (pushdecl): Rename build_type_copy call.
344 * tree.c (cp_build_qualified_type_real,
345 build_exception_variant, handle_java_interface_attribute): Likewise.
347 2004-08-22 Andrew Pinski <apinski@apple.com>
350 * typeck.c (build_unary_op): Use &a.b if the folded lowered
351 expression is not constant.
353 2004-08-20 Mark Mitchell <mark@codesourcery.com>
356 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
358 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
361 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
364 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
366 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
367 before calling comp_template_args.
369 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
371 * class.c (build_vtbl_initializer): Use build_int_cst for
373 * decl.c (complete_array_type): Likewise.
374 * method.c (finish_thunk): Likewise.
376 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
378 * tree.c: Remove unused mark_local_for_remap_r.
380 2004-08-19 Eric Christopher <echristo@redhat.com>
382 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
383 * tree.c (cxx_unsave_expr_now): Delete.
384 (cp_unsave_r): Ditto.
386 2004-08-19 Mark Mitchell <mark@codesourcery.com>
389 * pt.c (push_template_decl_real): Disallow template allocation
390 functions with fewer than two parameters.
392 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
394 * cp-tree.h (build_shared_int_cst): Remove.
395 * tree.c (shared_int_cache): Remove.
396 (build_shared_int_cst): Remove.
397 * class.c (finish_struct_1): Use build_int_cst.
399 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
401 * decl.c (finish_enum): Do not copy value node early, copy
403 * lex.c (cxx_init): Force null_node to be unique.
405 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
408 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
409 from input for MODOP_EXPR.
411 2004-08-18 Mark Mitchell <mark@codesourcery.com>
413 * pt.c (dependent_template_p): Fix typo in commment.
416 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
419 2004-08-17 Mark Mitchell <mark@codesourcery.com>
422 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
423 arguments have the same type as the corresponding parameter.
426 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
427 is set use it for diagnostic purposes.
428 (cp_parser_pseudo_destructor_name): Remove special-case error
432 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
435 * cp-tree.h (qualified_name_lookup_error): Add parameter.
436 * name-lookup.c (do_class_using_decl): Restrict set of entities
437 passed to cp_emit_debug_info_for_using more carefully.
438 (lookup_qualified_name): Allow lookup_member to return sets of
440 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
441 (cp_parser_primary_expression): Handle ambiguous lookups.
442 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
443 (cp_parser_template_argument): Likewise.
444 (cp_parser_elaborate_type_specifier): Likewise.
445 (cp_parser_namespace_name): Likewise.
446 (cp_parser_class_name): Likewise.
447 (cp_parser_lookup_name_simple): Likewise.
448 * pt.c (tsubst_qualified_id): Handle ambiguous results.
449 (tsubst_expr): Likewise.
450 * semantics.c (qualified_name_lookup_error): Add decl paramter.
451 For ambiguous lookups, print candidates.
453 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
456 * pt.c (instantiate_pending_templates): Add int parameter. Don't
458 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
459 * decl2.c (finish_file): Adjust call to
460 instantiate_pending_templates.
462 2004-08-15 Roger Sayle <roger@eyesopen.com>
464 * call.c (build_vfield_ref, build_call, build_conditional_expr,
465 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
466 build_java_interface_fn_ref, build_special_member_call,
467 build_new_method_call, initialize_reference): Replace calls to
468 build with calls to buildN.
469 * class.c (build_base_path, convert_to_base_statically,
470 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
471 build_vtbl_initializer): Likewise.
472 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
473 gimplify_if_stmt, cp_genericize_r): Likewise.
474 * cvt.c (convert_to_void): Likewise.
475 * decl.c (check_initializer, finish_constructor_body,
476 finish_destructor_body): Likewise.
477 * error.c (dump_expr): Likewise.
478 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
480 * init.c (perform_member_init, expand_virtual_init,
481 expand_cleanup_for_base, build_init, expand_default_init,
482 build_offset_ref, decl_constant_value, build_new, build_new_1,
483 build_vec_delete_1, build_vec_init, build_delete,
484 push_base_cleanups, build_vec_delete): Likewise.
485 * mangle.c (write_integer_cst): Likewise.
486 * method.c (thunk_adjust, do_build_copy_constructor,
487 do_build_assign_ref): Likewise.
488 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
489 unify, build_non_dependent_expr): Likewise.
490 * rtti.c (build_headof, build_typeid, ifnonnull,
491 build_dyanmic_cast_1, tinfo_base_init): Likewise.
492 * semantics.c (begin_compound_stmt, finish_call_expr,
493 finish_pseudo_destructor_expr, finish_id_expression,
494 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
495 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
496 array_type_nelts_total, stabilize_call): Likewise.
497 * typeck.c (decay_conversion, build_class_member_access_expr,
498 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
499 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
500 build_x_unary_op, build_unary_op, unary_complex_lvalue,
501 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
502 check_return_expr): Likewise.
503 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
504 split_nonconstant_init, store_init_value, build_m_component_ref):
507 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
509 * call.c (convert_class_to_reference,
510 build_user_type_conversion_1, convert_like_real,
511 build_java_interface_fn_ref, build_special_member_call): Use
513 * class.c (build_vtbl_initializer): Likewise.
514 * cp-gimplify.c (cp_gimplify_expr): Likewise.
515 * cvt.c (cp_convert_to_pointer): Likewise.
516 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
517 * decl2.c (start_static_initialization_or_destruction,
518 generate_ctor_or_dtor_function): Likewise.
519 * except.c (build_throw): Likewise.
520 * lex.c (cxx_init): Likewise.
521 * mangle.c (write_integer_cst): Likewise.
522 * rtti.c (build_headof, get_tinfo_decl_dynamic,
523 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
524 get_pseudo_ti_init): Likewise.
525 * search.c (get_dynamic_cast_base_type): Likewise.
526 * tree.c (build_shared_int_cst): Likewise.
528 2004-08-12 Mark Mitchell <mark@codesourcery.com>
531 * class.c (count_depth_data): New type.
532 (dfs_depth_post): New function.
533 (dfs_depth_q): Likewise.
534 (find_final_overrider_data_s): Change type of vpath.
536 (dfs_find_final_overrider_1): New function.
537 (dfs_find_final_overrider): Use it.
538 (dfs_find_final_overrider_q): Adjust use of vpath.
539 (dfs_find_final_overrider_post): Likewise.
540 (find_final_overrider): Use dfs_depth. Allocate and deallocate
543 2004-08-12 Jan Beulich <jbeulich@novell.com>
545 * parser.c (cp_parser_asm_definition): Properly consume scope operator
546 tokens preceding the clobbers. Don't check for scope operator
547 following inputs. Simplify inputs handling to match that now used for
550 2004-08-11 Mark Mitchell <mark@codesourcery.com>
553 * except.c (build_throw): Allocate cleanup_type and the function
554 for __cxa_throw separately.
557 * call.c (standard_conversion): Do not accept conversions between
558 pointers to members if the class types are unrelated.
561 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
562 char &" instead of just "char &".
565 * pt.c (tsubst): Just return the unknown_type_node.
567 2004-08-11 Mark Mitchell <mark@codesourcery.com>
570 * parser.c (cp_parser_class_specifier): Robustify.
573 * pt.c (tsubst_copy_and_build): Complain about invalid
577 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
578 current_class_ref while tsubsting.
580 2004-08-10 Mark Mitchell <mark@codesourcery.com>
583 * parser.c (cp_parser_init_declarator): Robustify.
585 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
587 * typeck2.c (process_init_constructor): Guard the missing field warning
588 with warn_missing_field_initializers rather than extra_warnings.
590 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
592 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
594 2004-08-05 Mark Mitchell <mark@codesourcery.com>
596 * decl.c (start_preparsed_function): Move determine_visibility
598 * decl2.c (determine_visibility): Incorporate dllexport testing.
600 2004-08-05 Geoffrey Keating <geoffk@apple.com>
602 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
603 means that libstdc++ is needed.
605 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
607 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
609 2004-08-04 Geoffrey Keating <geoffk@apple.com>
611 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
612 than passing it as a parameter to rest_of_decl_compilation.
613 * decl2.c (grokfield): Use set_user_assembler_name.
615 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
617 * decl.c (complete_array_type): Don't gratuitously copy
618 maxindex. Its type is always set.
620 2004-08-04 Paul Brook <paul@codesourcery.com>
622 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
623 * cp-tree.h (struct language_function): Rename x_dtor_label to
625 (dtor_label): Rename ...
626 (cdtor_label): ... to this.
627 * decl.c (begin_constructor_body): Remove.
628 (check_special_function_return_type): Maybe change the return type.
629 (grokdeclarator): Pass the class type.
630 (start_preparsed_function): Constructors may need a return label.
631 (finish_constructor_body, finish_destructor_body): Set the return
633 (begin_function_body): Don't call begin_constructor_body.
634 (finish_function): Don't warn for constructors or destructors.
635 (implicitly_declare_fn): Maybe change the return type.
636 * optimize.c: Include target.h.
637 (maybe_clone_body): Remap the function result.
638 * semantics.c: Include target.h.
639 (finish_return_stmt): Maybe jump to return label for constructors.
641 2004-08-03 Mark Mitchell <mark@codesourcery.com>
643 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
644 (check_field_decls): Or here.
645 (check_methods): Or here.
646 (initialize_array): Don't mess with DECL_CONTEXT.
647 * cp-tree.h (start_decl): Adjust prototype.
648 (determine_visibility): New function.
649 * decl.c (duplicate_decls): Remove checks for hidden "operator
651 (build_library_fn_1): Give all library functions default
653 (start_decl): Add pop_scope_p parameter. Tidy.
654 (cp_finish_decl): Do not pop scopes here. Call
655 determine_visibility for variable definitions.
656 (start_preparsed_function): Call determine_visibility.
657 * decl2.c (determine_visibility): New function.
658 * method.c (use_thunk): Fix formatting.
659 * parser.c (cp_parser_condition): Adjust calls to start_decl.
660 (cp_parser_init_declarator): Likewise.
661 * pt.c (instantiate_decl): Always call pop_nested_class.
662 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
663 (tinfo_base_init): Likewise.
665 2004-08-02 Mark Mitchell <mark@codesourcery.com>
668 * name-lookup.c (validate_nonmember_using_decl): Robustify.
670 2004-08-01 Mark Mitchell <mark@codesourcery.com>
673 * name-lookup.c (decl_namespace): Remove.
674 (current_decl_namespace): Use decl_namespace_context instead of
676 (push_decl_namespace): Likewise.
677 (arg_assoc_class): Likewise.
678 (arg_assoc_type): Likewise.
679 * pt.c (check_specialization_namespace): New function.
680 (maybe_process_partial_specialization): Use it.
681 (register_specialization): Likewise.
684 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
685 * call.c (null_ptr_cst_p): Handle variables with constant
687 * pt.c (convert_nontype_argument): Use
688 DECL_INTEGRAL_CONSTANT_VAR_P.
689 * semantics.c (finish_id_expression): Likewise.
692 * decl.c (duplicate_decls): Reject duplicate namespace
696 * typeck.c (build_ptrmemfunc): Loosen assertion.
698 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
700 * call.c (z_candidate::template_decl): Rename from template.
701 (add_template_candidate_real): Adjust member reference.
704 2004-07-29 Mark Mitchell <mark@codesourcery.com>
706 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
707 (lang_decl_flags): Narrow the width of "languages". Add
709 (DECL_NEEDED_P): Remove.
710 (FOR_EACH_CLONE): New macro.
711 (DECL_REPO_AVAILABLE_P): Likewise.
712 (DECL_TINFO_P): Likewise.
713 (set_linkage_according_to_type): Declare.
714 (import_export_vtable): Remove.
715 (import_export_tinfo): Likewise.
716 (mark_needed): New function.
717 (decl_needed_p): Likewise.
718 (note_vauge_linkage_fn): Likewise.
719 (init_repo): Change prototype.
720 (repo_template_used): Remove.
721 (repo_template_instantiated): Likewise.
722 (repo_emit_p): New function.
723 (repo_export_class_p): Likewise.
724 (no_linkage_check): Change prototype.
725 * class.c (set_linkage_according_to_type): New function.
726 (build_vtable): Use it. Do not call import_export_vtable. Set
727 DECL_IGNORED_P if appropriate.
728 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
729 (make_rtL_for_nonlocal_decls): Check for template instantiations
731 (grokfndecl): Adjust call to no_linkage_check.
732 (set_linkage_for_static_data_member): New function.
733 (grokvardecl): Use it. Adjust call to no_linkage_check.
734 (grokdeclarator): Use set_linkage_for_static_data_member.
735 * decl2.c (note_vague_linkage_fn): New function.
736 (note_vague_linkage_var): Likewise.
737 (finish_static_data_member_decl): Use it.
738 (import_export_vtable): Remove.
739 (import_export_class): Use repo_export_class_p.
740 (var_finalized_p): Simplify.
741 (maybe_emit_vtables): Simplify.
742 (mark_needed): New function.
743 (decl_needed_p): Likewise.
744 (import_export_decl): Add documentation and consistency checks.
745 Use repo_emit_p. Handle virtual tables and RTTI information
747 (import_export_tinfo): Remove.
748 (write_out_vars): Call import_export_decl.
749 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
751 (finish_file): Use decl_needed_p. Do not call import_export_decl
752 for undefined static data members. Do not warn about undefined
753 inlines when using a repository.
754 (mark_used): Use note_vague_linkage_fn. Always defer template
756 * lex.c (cxx_init): Adjust call to init_repo. Always set
758 * method.c (synthesize_method): Remove unncessary
759 import_export_decl call.
760 (implicitly_declare_fn): Use set_linkage_according_to_type.
761 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
762 * pt.c (instantiate_class_template): Don't redundantly add classes
763 to keyed_classes. Don't call repo_template_used.
764 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
765 templates with internal linkage.
766 (check_instantiated_args): Adjust call to no_linkage_check.
767 (instantiate_template): Use FOR_EACH_CLONE.
768 (mark_definable): New function.
769 (mark_decl_instantiated): Use it.
770 (do_decl_instantiation): Adjust tests for explicit instantiation
771 after "extern template".
772 (instantiate_class_member): Do not use repo_template_instantiated.
773 (do_type_instantiation): Simplify.
774 (instantiate_decl): Use mark_definable. Check repo_emit_p.
776 * repo.c (repo_get_id): Remove.
777 (original_repo): Remove.
778 (IDENTIFIER_REPO_USED): Remove.
779 (IDENTIFIER_REPO_CHOSEN): Remove.
780 Remove all #if 0'd code.
781 (repo_template_used): Remove.
782 (repo_template_instantiated): Remove.
783 (temporary_obstack_initialized_p): New variable.
784 (init_repo): Register with lang_post_pch_load. Avoid creating
785 identifiers unnecessarily. Don't use original_repo. Close the
787 (reopen_repo_file_for_write): Not here.
788 (finish_repo): Always write out a new repository file.
789 (repo_emit_p): New function.
790 (repo_export_class_p): Likewise.
791 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
792 (involves_incomplete_p): New function.
793 (tinfo_base_init): Use it.
794 (ptr_initializer): Remove non_public_ptr parameter.
795 (ptm_initializer): Likewise.
796 (get_pseudo_ti_init): Likewise.
797 (unemitted_tinfo_decl_p): Remove.
798 (emit_tinfo_decl): Use import_export_decl.
799 * semantics.c (expand_body): Move updates of static_ctors and
801 (expand_or_defer_fn): ... here.
802 * tree.c (no_linkage_check): Add relaxed_p parameter.
804 2004-07-28 Eric Christopher <echristo@redhat.com>
806 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
808 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
810 * cp-tree.h (struct tree_pair_s): New.
811 (typedef tree_pair_p): New.
812 (DEF_VEC_O(tree_pair_s)): New.
813 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
814 (CLASSTYPE_VCALL_INDICES): Update documentation.
815 * class.c (get_vcall_index): Adjust.
816 (add_vcall_offset): Adjust.
818 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
820 * pt.c, typeck.c: Remove spurious carriage returns.
822 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
825 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
826 when the type of ARG is not dependent.
828 2004-07-26 Geoffrey Keating <geoffk@apple.com>
830 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
831 (lang_specific_driver): If the C++ or math library options don't
832 start with '-l', don't count them as added libraries.
834 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
836 * decl.c (xref_basetypes): Adjust base access vector creation.
837 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
839 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
841 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
842 Brian Ryner <bryner@brianryner.com>
846 * class.c (check_field_decls): Apply hidden visibility if
847 -fvisibility-inlines-hidden and inlined unless otherwise specified
848 (build_vtable): Set vtable visibility to class visibility.
849 (check_field_decls): Default static member visibility to class
851 (check_methods): Default method visibility to class visibility.
852 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
853 CLASSTYPE_VISIBILITY_SPECIFIED macro.
854 * decl.c (duplicate_decls): New logic for merging definition decls
855 with declaration decls. Added ignore & warning when non default
856 applied to global operator new or delete.
857 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
858 wherever VISIBILITY was changed
859 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
861 (tinfo_base_init): Set typeinfo name visibility to class visibility.
863 2004-07-25 Bernardo Innocenti <bernie@develer.com>
865 * decl.c: Rename all identifiers named `class' to `cl'.
866 * cp-tree.h: Likewise.
868 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
870 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
871 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
872 * name-lookup.c (binding_entry_make): Use GGC_NEW.
873 (binding_table_construct): Use GGC_CNEWVEC.
874 (binding_table_new): Use GGC_NEW.
875 (cxx_binding_make): Likewise.
876 (begin_scope): Likewise.
877 (push_to_top_level): Use GCC_CNEW.
878 * parser.c (cp_token_cache_new): Likewise.
879 (cp_token_cache_push_token): Likewise.
880 (cp_lexer_new_main): Likewise.
881 (cp_lexer_new_from_tokens): Likewise.
882 (cp_parser_context_new): Likewise.
883 (cp_parser_new): Likewise.
884 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
885 * lex.c (cxx_make_type): Use GGC_CNEW.
886 (retrofit_lang_decl): Use GGC_NEWVAR.
887 (cxx_dup_lang_specific_decl): Likewise.
888 (copy_lang_type): Likewise.
889 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
890 (save_function_data): Likewise.
891 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
892 (cxx_push_function_context): Likewise.
894 2004-07-25 Richard Henderson <rth@redhat.com>
896 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
897 DECL_IGNORED_P on RESULT_DECL.
898 * semantics.c (finalize_nrv): Copy them too.
900 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
902 * search.c (lookup_conversion_operator): Avoid two loops.
903 (add_conversions): Remove.
904 (check_hidden_convs, split_conversions,
905 lookup_conversions_r): New.
906 (lookup_conversions): Use lookup_conversions_r.
908 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
910 * pt.c (get_template_base): Check type is completable.
912 2004-07-21 Eric Christopher <echristo@redhat.com>
914 * decl.c (poplevel): Inline unused variable checking.
917 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
919 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
922 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
925 * pt.c (check_explicit_specialization): Remove extension to accept
926 specializations without template headers. Fall-through to normal
929 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
932 * pt.c (determine_specialization): New parameter template_count.
933 Disambiguate between member templates and member functions counting
934 the template headers.
935 (check_explicit_specialization): Update caller.
936 (tsubst_friend_function): Likewise.
938 2004-07-20 Steven Bosscher <stevenb@suse.de>
940 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
941 * cp-tree.h (tinst_level_t): New tree type.
942 (union lang_tree_node): Handle it.
943 (TINST_LOCATION): New accessor macro.
944 (make_tinst_level): New prototype.
945 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
946 * decl.c (cp_tree_node_structure): Likewise.
947 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
948 (print_instantiation_partial_context): Likewise.
949 * pt.c (pop_tinst_level): Likewise.
950 (push_tinst_level): Use make_tinst_level.
951 * tree.c (make_tinst_level): New function.
952 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
954 2004-07-20 Mark Mitchell <mark@codesourcery.com>
956 * parser.c (cp_parser_simple_type_specifier): Fix typo.
959 * parser.c (cp_parser_simple_type_specifier): Do not record usage
960 of globally-qualified names.
962 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
965 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
968 2004-07-19 Mark Mitchell <mark@codesourcery.com>
971 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
972 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
973 * class.c (add_implicitly_declared_members): Use
974 CLASSTYPE_LAZY_ASSIGNMENT_OP.
975 * method.c (lazily_declare_fn): Clear
976 CLASSTYPE_LAZY_ASSIGNMENT_OP.
977 * search.c (lookup_fnfields_1): Check it.
979 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
981 * cp-tree.h (vec_binfo_member): Remove.
982 * tree.c (vec_binfo_member): Remove.
984 * cp-tree.h (struct lang_type_class): Remove vfields field.
985 (CLASSTYPE_VFIELDS): Remove.
986 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
987 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
989 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
990 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
991 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
993 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
995 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
996 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
998 (BINFO_LANG_SLOTS): Remove.
999 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
1000 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
1001 * class.c (check_bases): Adjust BINFO accessors.
1002 (determine_primary_base, finish_struct_bits,
1003 maybe_warn_about_overly_private_class, warn_hidden,
1004 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
1005 warn_about_ambiguous_bases, get_vfield_name,
1006 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
1007 add_vcall_offset_vtbl_entries_r): Likewise.
1008 * dump.c (cp_dump_tree): Likewise.
1009 * init.c (sort_mem_initializers, expand_member_init, build_delete,
1010 push_base_cleanups): Likewise.
1011 * method.c (do_build_copy_constructor, do_build_assign_ref,
1012 synthesize_exception_spec): Likewise.
1013 name-lookup.c (arg_assoc_class): Likewise.
1014 * pt.c (instantiate_class_template,
1015 get_template_base_recursive): Likewise.
1016 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
1017 * typeck2.c (process_init_constructor): Likewise.
1018 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1019 dfs_access_in_type, dfs_walk_real, look_for_overrides,
1020 types_overlap_p, copied_binfo, original_binfo): Likewise.
1021 (binfo_for_vtable): Remove
1023 2004-07-20 Steven Bosscher <stevenb@suse.de>
1025 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
1026 thunk_alias, and the access and virtual_offset fields.
1027 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
1028 * decl.c (finish_case_label): Update c_add_case_node call.
1030 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1032 Revert patch for PR c++/16623.
1034 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
1036 * except.c: Remove two spurious carriage returns.
1038 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1041 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1042 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1043 * class.c (add_implicitly_declared_members): Use
1044 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1045 * method.c (lazily_declare_fn): Clear
1046 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1047 * search.c (lookup_fnfields_1): Check it.
1049 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
1051 * class.c (add_method): Delay adding the slot until the end.
1052 (determine_primary_base): Adjust VEC_iterate invokation.
1053 (resort_type_method_vec, finish_struct_methods, warn_hidden,
1054 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
1055 build_vtbl_initializer): Likewise.
1056 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
1057 build_vbase_delete): Likewise.
1058 * method.c (do_build_copy_constructor): Likewise.
1059 * name-lookup.c (new_class_binding, print_binding_level,
1060 poplevel_class, store_class_bindings, push_to_top_level,
1061 pop_from_top_level): Likewise.
1062 * pt.c (check_explicit_specialization): Likewise.
1063 * search.c (lookup_conversion_operator, lookup_fnfields_1,
1064 get_pure_virtuals, add_conversions, dfs_check_overlap,
1065 binfo_for_vbase): Likewise.
1067 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1070 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
1071 innermost set of template arguments during deduction. Simplify.
1073 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
1075 * typeck.c (build_modify_expr, build_x_modify_expr): Set
1076 TREE_NO_WARNING on assignments with an operator other than '='.
1078 2004-07-10 Steven Bosscher <stevenb@suse.de>
1079 Joseph S. Myers <jsm@polyomino.org.uk>
1081 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
1082 * decl2.c (grokfield): Don't check current_class_depth via
1083 unused TREE_COMPLEXITY.
1084 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
1085 to avoid the missing parentheses warning.
1086 Don't set C_SET_EXP_ORIGINAL_CODE.
1088 2004-07-18 Mark Mitchell <mark@codesourcery.com>
1090 * tree.c (no_linkage_helper): Remove.
1091 (no_linkage_check): Don't use walk_tree_without_duplicates.
1093 * mangle.c (write_expression): Issue a sorry for zero-operand
1096 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1099 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1100 TREE_TYPE for non-dependent names.
1101 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
1102 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1103 unknown_type_node as its TREE_TYPE.
1104 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1105 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1106 (dump_expr) <SCOPE_REF case>: Likewise.
1108 2004-07-17 Jason Merrill <jason@redhat.com>
1111 * call.c (type_passed_as): Make the invisible reference type
1113 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1114 cp_genericize_r. Handle invisible reference lowering.
1115 (is_invisiref_parm): New fn.
1116 (cp_genericize): Adjust the types of invisible reference parms.
1117 Don't repeat the walk for clones.
1118 * decl.c (store_parm_decls): Don't generate any code for clones.
1120 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1122 * cp-tree.h (builtin_function): Declare.
1124 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1126 * class.c (finish_struct_methods): Remove unncessary code.
1127 (add_implicitly_declared_members): Create declarations for default
1128 constructors and copy constructors lazily.
1129 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1131 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1132 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1133 * decl2.c (check_classfn): Robustify.
1134 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1135 (locate_ctor): Handle lazy default constructors.
1136 (locate_copy): Handle lazy copy constructors.
1137 (implicitly_declare_fn): Make sure we're looking at the
1138 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1139 set TYPE_HAS_CONSTRUCTOR.
1140 (lazily_declare_fn): New function.
1141 * name-lookup.c (constructor_name_full): Simplify.
1142 * search.c (lookup_fnfields_1): Lazily create methods, as
1144 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1146 2004-07-16 Steven Bosscher <stevenb@suse.de>
1148 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1149 single bit GTY desc.
1151 2004-07-16 Richard Henderson <rth@redhat.com>
1153 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1154 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1155 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1157 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1159 * class.c (finish_struct_bits): Use for loop.
1160 (propagate_binfo_offsets): Do primary binfo outside of loop.
1163 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1166 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1168 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1170 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1171 has_abstract_assign_ref. Make methods a VEC(tree) *.
1172 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1173 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1174 (CLASSTYPE_DESTRUCTORS): Likewise.
1175 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1176 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1177 (add_method): Change prototoype.
1178 * class.c (add_method): Remove error_p parameter. Adjust for
1179 changes to CLASSTYPE_METHOD_VEC.
1180 (handle_using_decl): Adjust call to add_method.
1181 (maybe_warn_about_overly_private_class): Adjust for
1182 changes to CLASSTYPE_METHOD_VEC.
1183 (resort_type_method_vec): Likewise.
1184 (finish_struct_methods): Likewise.
1185 (check_for_override): Likewise.
1186 (warn_hidden): Likewise.
1187 (add_implicitly_declared_members): Defer creation of assignment
1188 operators. Adjust call to add_method.
1189 (clone_function_decl): Adjust call to add_method.
1190 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1191 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1192 * decl.c (grok_special_member_properties): Don't set
1193 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1194 * decl2.c (check_classfn): Adjust for
1195 changes to CLASSTYPE_METHOD_VEC.
1196 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1197 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1198 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1199 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1201 * pt.c (check_explicit_specialization): Adjust for
1202 changes to CLASSTYPE_METHOD_VEC.
1203 (instantiate_class_template): Do not set
1204 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1205 * ptree.c (cxx_print_type): Don't try to print
1206 CLASSTYPE_METHOD_VEC.
1207 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1208 * search.c (lookup_field_r): Adjust for
1209 changes to CLASSTYPE_METHOD_VEC.
1210 (lookup_fnfields): Likewise.
1211 (lookup_conversion_operator): Likewise.
1212 (lookup_fnfields_1): Likewise. Create assignment operators
1214 (look_for_overrides_here): Adjust for
1215 changes to CLASSTYPE_METHOD_VEC.
1216 (add_conversions): Likewise.
1217 * semantics.c (finish_member_declaration): Adjust call to add_method.
1219 2004-07-15 Jason Merrill <jason@redhat.com>
1221 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1222 references and pointers are compatible.
1224 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1226 * decl.c (xref_basetypes): Refactor.
1227 * tree.c (copy_base_binfos): Replace with ...
1228 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1229 bases of the given base).
1230 * cp-tree.h (copy_base_binfo): Remove.
1231 (copy_binfo): Declare.
1233 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1235 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1237 (get_class_binding): Adjust.
1238 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1240 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1242 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1243 * decl.c (xref_basetypes): Set it here.
1245 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1246 Don't check for incomplete base.
1247 (get_vfield_name): Simplify while loop.
1248 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1250 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1252 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1254 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1255 (BINFO_PUSHDECLS_MARKED): Likewise.
1256 (maybe_inject_for_scope_var): Likewise.
1257 (push_class_decls): Likewise.
1258 * name-lookup.h (push_class_binding): Remove.
1259 (innermost_non_namespace_value): New function.
1260 (outer_binding): Likewise.
1261 * class.c (add_method): Push bindings before adding to
1263 (restore_class_cache): Do not restore class_shadowed.
1264 (pushclass): Do not add USING_DECLs. Do not call
1266 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1267 * decl.c (pushdecl): Use outer_binding.
1268 (poplevel): Set the scope for an out-of-scope for-loop declaration
1270 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1271 * name-lookup.c (new_class_binding): New function.
1272 (push_binding): Use it.
1273 (pushdecl): Use innermost_non_namespace_value.
1274 (maybe_inject_for_scope_var): Remove.
1275 (push_class_binding): Remove.
1276 (set_inherited_value_binding_p): New function.
1277 (get_class_binding): New function.
1278 (push_class_level_binding): Assert that the current_class_type is
1280 (outer_binding): New function.
1281 (innermost_non_namespace_value): Likewise.
1282 (lookup_name_real): Use outer_binding.
1283 (lookup_name_current_level): Ignore out-of-scope variables.
1284 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1285 (lookup_template_class): Likewise.
1286 * search.c (dfs_push_type_decls): Remove.
1287 (dfs_push_decls): Likewise.
1288 (setup_class_bindings): Likewise.
1289 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1290 (marked_pushdecls_p): Remove.
1291 (unmarked_pushdecls_p): Remove.
1292 (marked_identifiers): Remove.
1293 (setup_class_bindings): Remove.
1294 (dfs_push_type_decls): Remove.
1295 (dfs_push_decls): Remove.
1296 (push_class_decls): Remove.
1298 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1302 * decl.c (grokvardecl): Make declspecs parameter const.
1303 (grokdeclarator): Likewise. Adjust accordingly.
1304 * decl.h (grokdeclarator): Adjust declaration.
1305 * parser.c (cp_parser_init_declarator): Do not clear
1306 decl_specifiers->attributes.
1308 * cp-tree.h (lang_identifier): Remove class_value.
1309 (IDENTIFIER_CLASS_VALUE): Remove.
1310 (pop_class_decls): Likewise.
1311 (init_search_processing): Likewise.
1312 * class.c (handle_using_decl): Use lookup_member, not
1313 IDENTIFIER_CLASS_VALUE.
1314 (restore_class_cache): New function, split out from ...
1315 (pushclass): ... here. Do not call clear_identifier_class_values.
1316 (invalidate_class_lookup_cache): Do not clear
1317 IDENTIFIER_CLASS_VALUE.
1318 (popclass): Do not call pop_class_decls.
1319 (maybe_note_name_used_in_class): Do not save names looked up after
1320 the class is complete. Use lookup_member, not
1321 IDENTIFIER_CLASS_VALUE.
1322 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1323 * decl.c (cxx_init_decl_processing): Do not call
1324 init_search_processing.
1325 * method.c (do_build_copy_constructor): Remove unnecessary code.
1326 (do_build_assign_ref): Likewise.
1327 * name-lookup.c (pushdecl): Use lookup_member, not
1328 IDENTIFIER_CLASS_VALUE.
1329 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1331 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1332 (push_class_binding): Do not set it.
1333 (clear_identifier_class_values): Remove.
1334 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1335 (store_binding): Do not save it.
1336 (pop_from_top_level): Do not restore it.
1337 * name-lookup.h (cxx_saved_binding): Remove class_value.
1338 (clear_identifier_class_values): Remove.
1339 * ptree.c (cxx_print_identifier): Do not print
1340 IDENTIFIER_CLASS_VALUE.
1341 * search.c (search_obstack): Remove.
1342 (push_stack_level): Remove.
1343 (pop_stack_level): Remove.
1344 (search_level): Remove.
1345 (search_stack): Remove.
1346 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1347 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1348 IDENTIFIER_CLASS_VALUE.
1349 (marked_identifiers): New variable.
1350 (push_class_decls): Clear IDENTIFIER_MARKED.
1351 (pop_class_decls): Don't call pop_search_level.
1352 (init_search_processing): Remove.
1354 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1356 * cp-tree.h (get_aggr_typedef): Remove.
1357 * init.c (get_aggr_typedef): Likewise.
1359 * name-lookup.c (push_class_level_binding): Simplify.
1361 2004-07-12 Andrew Pinski <apinski@apple.com>
1365 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1367 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1370 2004-07-12 Eric Christopher <echristo@redhat.com>
1372 * parser.c (cp_parser_class_head): Remove unused variable.
1374 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1376 * decl.c (grok_op_properties): Reject [de-]allocation functions
1377 declared in a namespace, or declared as static.
1379 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1381 * cp-tree.h (make_binfo): Remove.
1382 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1383 * tree.h (copy_base_binfos): Likewise.
1384 (make_binfo): Remove.
1386 * call.c (build_user_type_conversion_1, build_new_op,
1387 check_constructor_callable, build_temp,
1388 perform_direct_initialization_of_possible): Pass type directly to
1389 lookup_fnfields & build_special_member_call.
1390 (build_special_member_call): Accept a type, and complete it.
1391 * class.c (finish_stuct_bits): Copy the BINFOs here.
1392 * cvt.c (ocp_convert): Pass type directly to
1393 build_special_member_call.
1394 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1395 (xref_basetypes): Allocate the binfo here. Adjust.
1396 * init.c (build_init, build_new_1): Pass type directly to
1397 build_special_member_call.
1398 * lex.c (cxx_make_type): Do not allocate binfo here.
1399 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1400 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1401 * pt.c (instantiate_class_template): Likewise. Inhibit access
1402 checking for template friends.
1403 * ptree.c (cxx_print_type): Adjust record printing.
1404 * search.c (lookup_base): When taking a type, complete it before
1405 looking for a binfo.
1406 (lookup_member): Delay completing a type.
1407 (push_class_decls): Don't walk an incomplete type.
1408 (lookup_conversions): Likewise.
1409 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1410 build_special_member_call.
1411 * tree.c (copy_base_binfos): Adjust.
1412 (make_binfo): Likewise.
1413 * typeck.c (build_modify_expr): Pass type directly to
1414 build_special_member_call.
1415 * typeck2.c (process_init_constructor): Check a binfo exists.
1416 (build_m_component_ref): Allow accessing an incomplete type.
1417 (build_functional_cast): Pass type directly to
1418 build_special_member_call.
1420 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1423 * config-lang.in (gtfiles): Add typeck2.c.
1424 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1426 * cp-tree.h: Declare complete_type_check_abstract.
1427 * typeck2.c (pat_calc_hash, pat_compare,
1428 complete_type_check_abstract): New functions.
1429 (abstract_virtuals_error): If the type is abstract, register the
1430 declaration within abstract_pending_vars for further checks.
1431 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1432 * decl.c (cp_finish_decl): Do not strip array types.
1433 (create_array_type_for_decl): Check for abstractness of the element
1435 (complete_vars): Call complete_type_check_abstract.
1436 * class.c (finish_struct): Prepare a list of virtual functions for
1437 template types, and call complete_vars on it to check for abstractness.
1439 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1441 PR tree-optimization/14107
1442 * decl.c (finish_function): Remove temporary band-aid.
1444 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1446 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1447 (build_new_op): Adjust call to lookup_function_nonclass.
1448 * name-lookup.c (identifier_type_value): Adjust call to
1450 (lookup_name_real): Add block_p parameter.
1451 (lookup_name_nonclass): Adjust call to lookup_name_real.
1452 (lookup_function_nonclass): Likewise.
1453 (lookup_name): Likewise.
1454 * name-lookup.h (lookup_name_real): Change prototype.
1455 (lookup_name_nonclass): Likewise.
1456 * parser.c (cp_parser_lookup_name): Likewise.
1458 * cp-tree.h (saved_scope): Make old_bindings a vector.
1459 (unuse_fields): Remove.
1460 * name-lookup.h (cxx_saved_binding): Define it.
1461 * class.c (pushclass): Don't use unuse_fields.
1462 * name-lookup.c (cxx_saved_binding_make): Remove.
1463 (store_binding): Add new bindings to a vector, using an
1464 accumulator style, rather than adding them to a list.
1465 (store_bindings): Adjust accordingly.
1466 (store_class_bindings): Likewise.
1467 (push_to_top_level): Likewise.
1468 (pop_from_top_level): Likewise.
1469 * optimize.c (maybe_clone_body): Must push_to_top_level and
1470 pop_from_top_level calls outside of loop.
1471 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1472 calls here from cp_parser_late_parsing_default_args.
1473 (cp_parser_save_default_args): Record the class type in which the
1474 function is declared.
1475 (cp_parser_late_parsing_default_args): Do not call
1476 push_nested_class/pop_nested_class.
1477 * search.c (dfs_unuse_fields): Remove.
1478 (unuse_fields): Remove.
1480 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1482 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1483 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1484 * cp-tree.h (poplevel): Declare.
1485 (set_block): Remove.
1486 * decl.c (set_block): Remove.
1488 2004-07-10 Mike Stump <mrs@apple.com>
1490 * decl2.c (import_export_class): Never export/import vtables
1491 with inline key functions.
1493 2004-07-09 Steven Bosscher <stevenb@suse.de>
1495 * typeck.c (c_expand_asm_operands): Remove.
1497 2004-07-09 Mike Stump <mrs@apple.com>
1499 * typeck.c (build_class_member_access_expr): Skip null deref
1500 warning when we don't dereference it.
1502 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1506 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1507 warn for pointers to functions/members, or for classes without
1510 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1512 * name-lookup.h (struct cp_binding_level): Update documentation
1515 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1518 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1519 returning CALL_EXPR, and non-reference return type.
1521 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1523 * name-lookup.c (push_binding): Use VEC_reserve.
1525 2004-07-08 Richard Henderson <rth@redhat.com>
1527 * cp-tree.h (expand_eh_spec_block): Remove.
1529 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1531 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1532 x_previous_class_values; add x_previous_class_level.
1533 (previous_class_type): Remove.
1534 (previous_class_values): Remove.
1535 (previous_class_level): New macro.
1536 * class.c (pushclass): Restore the identifier cache more
1538 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1539 previous_class_values.
1540 * decl.c (poplevel): Likewise.
1541 * name-lookup.c (cxx_binding_init): New function.
1542 (cxx_binding_make): Use it.
1543 (push_binding): For a binding in a class level, use a vector of
1544 cp_class_binding nodes.
1545 (push_binding_level): New function.
1546 (begin_scope): Use it.
1547 (leave_scope): Do not put class binding levels on the free list.
1548 (print_binding_level): Adjust for the fact that class_shadowed is
1550 (poplevel_class): Likewise.
1551 (clear_identifier_class_values): Likewise.
1552 (push_class_level_binding): Likewise.
1553 (set_class_shadows): Remove.
1554 (store_binding): New function.
1555 (store_class_bindings): New function.
1556 (push_to_top_level): Use store_class_bindings as appropriate.
1557 (pop_from_top_level): Use previous_class_level, not
1558 previous_class_type.
1559 * name-lookup.h (cp_class_binding): New type.
1560 (cp_binding_level): Use a vector object for class_shadowed.
1561 (push_binding_level): Declare.
1562 (set_class_shadows): Remove.
1564 2004-07-07 Andrew Pinski <apinski@apple.com>
1566 * class.c (instantiate_type): BUFFER_REF is dead.
1567 * lex.c (init_operators): IN_EXPR is dead.
1569 2004-07-07 Jason Merrill <jason@redhat.com>
1572 * call.c (build_new_op): Give overload warnings for built-in
1575 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1578 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1581 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1583 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1584 * class.c (build_primary_vtable, check_bases,
1585 determine_primary_base, finish_struct_bits,
1586 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1587 get_basefndecls, warn_hidden, walk_subobject_offsets,
1588 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1589 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1590 finish_struct_1, get_vfield_name, contains_empty_class_p,
1591 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1592 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1593 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1595 * decl.c (xref_basetypes): Likewise.
1596 * dump.c (cp_dump_tree): Likewise.
1597 * error.c (dump_expr): Likewise.
1598 * init.c (sort_mem_initializers, expand_member_init,
1599 push_base_cleanups): Likewise.
1600 * method.c (do_build_copy_constructor, do_build_assign_reg,
1601 synthesize_exception_spec): Likewise.
1602 * name-lookup.c (arg_assoc_class): Likewise.
1603 * pt.c (instantiate_class_template, tsubst,
1604 get_template_base_recursive): Likewise.
1605 * ptree.c (cxx_print_type): Likewise.
1606 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1607 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1608 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1609 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1610 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1611 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1612 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1613 * tree.c (copy_base_binfos, make_binfo): Likewise.
1614 * typeck.c (commmon_base_type): Likewise
1615 * typeck2.c (process_init_constructor): Likewise
1617 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1619 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1621 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1624 * pt.c (convert_nontype_argument): Disallow conversions between
1625 different enumeration types.
1627 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1629 * cp-tree.h (BINFO_MARKED): Remove.
1630 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1631 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1632 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1633 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1634 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1635 (mark_primary_bases, determine_primary_base, base_derived_from,
1636 dfs_find_final_overrider, dfs_find_final_overrider_q,
1637 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1638 dfs_modify_vtables, walk_subobject_offsets,
1639 layout_nonempty_base_or_field, build_base_field,
1640 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1641 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1642 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1643 build_ctor_vtbl_group, accumulate_vtble_inits,
1644 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1645 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1646 add_vcall_offset_vtbl_entries_1): Likewise.
1647 * decl.c (xref_basetypes): Incomming virtual base indicated by
1649 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1650 * init.c (finish_init_stmts, sort_mem_initializers,
1651 emit_mem_initializers, build_vtble_address, expand_member_init,
1652 push_base_cleanups): Likewise.
1653 * method.c (do_build_copy_constructor): Likewise.
1654 * pt.c (instantiate_class_template,
1655 get_template_base_recursive): Likewise.
1656 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1657 get_pseudo_ti_desc): Likewise.
1658 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1659 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1660 original_binfo): Likewise.
1661 * semantics.c (finish_base_specifier): Virtualness is indicated
1663 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1665 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1668 2004-06-24 Jason Merrill <jason@redhat.com>
1670 * decl.c (grokparms): Give the PARM_DECL reference type if the
1671 parameter is passed by invisible reference.
1673 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1675 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1676 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1677 * pt.c (check_instantiated_args, unify): Likewise.
1679 2004-07-05 Phil Edwards <phil@codesourcery.com>
1681 * Make-lang.in (check-c++, lang_checks): Add some comments.
1683 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1685 * cp-mudflap.c: Delete file.
1686 * Makefile.in: Remove all references to cp-mudflap.o.
1688 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1690 * decl.c (cxx_init_decl_processing): Call
1691 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1693 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1696 * call.c (build_operator_new_call): Look only at global scope.
1698 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1700 * call.c (enforce_access): Expect TREE_BINFO.
1701 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1702 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1703 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1705 (BINFO_LANG_ELTS): Remove.
1706 (BINFO_LANG_SLOTS): New.
1707 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1708 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1709 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1710 * search.c (lookup_member): Check TREE_BINFO.
1711 * semantics.c (perform_or_defer_access_check): Likewise.
1712 (check_accessibility_of_qualified_id): Check
1713 deferred_access_no_check.
1714 * tree.c (make_binfo): Use make_tree_binfo.
1716 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1718 * method.c (implicitly_declare_fn): Set linkage of generated
1721 2004-07-04 Richard Henderson <rth@redhat.com>
1723 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1725 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1728 * name-lookup.c (push_class_level_binding): Don't pass a
1729 TREE_LIST of ambiguous names to check_template_shadow as it
1730 only handles declarations. Instead, pull the declaration
1733 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1736 * pt.c (check_explicit_specialization): Clarify error message.
1738 2004-07-02 Richard Henderson <rth@redhat.com>
1740 * tree.c (cp_unsave_r): Update remap_save_expr call.
1742 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1745 * mangle.c (write_template_arg): Correct mangling.
1748 * decl.c (grokdeclarator): Robustify.
1750 2004-07-01 Richard Henderson <rth@redhat.com>
1752 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1753 * method.c (synthesize_method): Don't clear_last_expr.
1754 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1756 2004-07-01 Nick Clifton <nickc@redhat.com>
1758 * decl2.c (import_export_class): Invoke the
1759 import_export_class field in the gcc_target structure if it is not
1762 2004-06-30 Richard Henderson (rth@redhat.com>
1764 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1765 * method.c (use_thunk): Likewise.
1767 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1769 * call.c (build_over_call), typeck.c (build_function_call): Call
1770 check_function_arguments instead of check_function_format.
1772 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1774 * call.c (build_over_call), typeck.c (build_function_call): Update
1775 calls to check_function_format.
1777 2004-06-30 Richard Henderson <rth@redhat.com>
1779 * call.c (build_over_call): Use __builtin_memcpy for copying
1780 CLASS_AS_BASE rather than funny casting.
1782 2004-06-30 Richard Henderson <rth@redhat.com>
1784 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1785 TYPE_SIZE_UNIT of full_type.
1787 2004-06-30 Per Bothner <per@bothner.com>
1789 Conditionally compile support for --enable-mapped_location.
1790 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1791 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1792 adjustments - which I don't understand.
1793 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1794 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1795 (print_instantiation_partial_context): Use expand_location.
1796 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1797 * name-lookup.c: Likewise.
1798 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1799 * name-lookup.c: Use input_line macro.
1800 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1801 (cp_parser_statement): Rename locaal variable statement_locus to
1802 statement_location and use SET_EXPR_LOCATION macro.
1803 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1804 * tree.c (cp_walk_subtrees): Likewise.
1806 2004-06-29 Per Bothner <per@bothner.com>
1808 * tree.c (build_min_nt, build_min, build_min_non_dep):
1809 Don't set TREE_COMPLEXITY from input_line.
1811 2004-06-29 Paul Brook <paul@codesourcery.com>
1813 * init.c: Include target.h.
1814 (get_cookie_size): Remove and replace with target hook.
1816 (build_new_1): Store the element size in the cookie.
1818 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1821 * parser.c (cp_parser_template_declaration_after_export): Disable
1822 access checks here ...
1823 (cp_parser_class_specifier): ... not here.
1825 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1827 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1828 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1829 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1832 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1834 * cp-tree.h (struct deferred_access): Move to ...
1835 * semantics.c (struct deferred_access): ... here. Adjust.
1836 (deferred_access_stack): Make a VEC(deferred_access),
1837 (deferred_access_free_list): Remove.
1838 (deferred_access_no_check): New.
1839 (push_deferring_access_checks, resume_deferring_access_checks,
1840 stop_deferring_access_checks, pop_deferring_access_checks,
1841 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1842 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1844 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1847 * call.c (build_temp): Declare.
1848 (check_constructor_callable): New.
1849 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1850 CONSTRUCTOR_CALLABLE.
1851 (convert_like_real, initialize_reference): Use
1852 check_constructor_callable.
1853 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1854 (LOOKUP_*): Renumber.
1856 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1858 * friend.c (add_friend): Only perform access checks when context
1860 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1861 * parser.c (cp_parser_class_specifier): Disable access checks here
1862 when parsing the body of a templated class.
1863 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1864 NULL binfos when not checking access.
1866 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1868 Use vector API for vbase list.
1869 * cp-tree.h: Include vec.h
1870 (DEF_VEC_P (tree)): New type.
1871 (struct lang_type_class): Change vbase's member type.
1872 (binfo_for_vbase): Declare.
1873 * class.c (determine_primary_base, base_derived_from,
1874 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1875 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1876 build_vtbl_initializer): Adjust.
1877 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1879 * init.c (sort_mem_initializers, expand_member_init,
1880 push_base_cleanups): Adjust.
1881 * method.c (do_build_copy_constructor): Adjust.
1882 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1883 (binfo_for_vbase): New.
1884 * tree.c (copy_base_binfos): Adjust.
1886 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1888 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1890 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1893 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1894 paranthesis in case of pointers to array members.
1895 * error.c (dump_type_prefix): Likewise.
1896 (dump_type_suffix): Maybe issue a whitespace when printing
1899 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1902 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1903 redefinition of built-in types.
1905 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1907 * error.c (pp_template_argument_list_start): Remove.
1908 (pp_template_argument_list_end): Likewise.
1909 (pp_separate_with_comma): Use pp_cxx_separate_with.
1910 (reinit_global_formatting_buffer): Remove.
1911 (pp_non_consecutive_character): Likewise.
1912 (dump_scope): Use pp_cxx_colon_colon.
1913 (dump_template_parameter): Use pp_cxx_identifier,
1914 pp_cxx_tree_identifier and pp_cxx_whitespace.
1915 (dump_templat_bindings): Replace use of pp_string with sequence
1916 of pp_cxx_whitespace and pp_equal.
1917 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1918 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1920 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1921 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1922 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1923 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1924 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1925 (dump_decl): Likewise.
1926 (dump_template_decl): Likewise.
1927 (dump_function_decl): Likewise. Set padding as appropriate.
1928 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1930 (dump_exception_spec): Likewise.
1931 (dump_function_name): Use pp_cxx_tree_identifier and
1933 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1934 pp_cxx_end_template_argument_list.
1935 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1936 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1937 pp_cxx_whitespace throughout.
1938 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1940 (dump_unary_op): Likewise.
1941 (reinit_cxx_pp): New function.
1942 (type_as_string); Use it.
1943 (expr_as_string): Likewise.
1944 (decl_as_string); Likewise.
1945 (context_as_string): Likewise.
1946 (lang_decl_name): Likewise.
1947 (decl_to_string): Likewise.
1948 (expr_to_string): Likewise.
1949 (parm_to_string): Likewise.
1950 (type_to_string): Likewise.
1951 (args_to_string): Likewise.
1952 (cv_to_string): Likewise.
1954 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1956 * cp-tree.h (cp_cv_quals): New type.
1957 (cp_declarator): Use it instead of "tree" as appropriate.
1958 (grok_method_quals): Adjust prototype.
1959 (grokclassfn): Likewise.
1960 (do_friend): Likewise.
1961 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1962 (grokdeclarator): Likewise.
1963 * decl2.c (grok_method_quals): Likewise.
1964 (grokclassfn): Likewise.
1965 * friend.c (do_friend): Likewise.
1966 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1967 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1968 (make_pointer_declarator): Likewise.
1969 (make_reference_declarator): Likewise.
1970 (make_ptrmem_declarator): Likewise.
1971 (cp_parser_ptr_operator): Likewise.
1972 (cp_parser_cv_qualifier_seq_opt): Likewise.
1973 (cp_parser_cv_qualifier_opt): Remove.
1974 (cp_parser_new_declarator_opt): Adjust call to
1975 cp_parser_ptr_operator.
1976 (cp_parser_conversion_declaration_opt): Likewise.
1977 (cp_parser_declarator): Use cp_cv_quals, not tree.
1978 (cp_parser_direct_declarator): Likewise.
1980 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1982 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1983 Rename DECL_STMT to DECL_EXPR.
1984 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1985 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1986 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1988 2004-06-26 Jan Hubicka <jh@suse.cz>
1991 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1992 reachability analysis.
1994 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1996 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1999 2004-06-25 Paul Brook <paul@codesourcery.com>
2001 * decl2.c (get_guard): Call targetm.cxx.guard_type.
2002 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2004 2004-06-24 Mark Mitchell <mark@codesourcery.com>
2006 * decl.c (grokdeclarator): Restore error messages about __thread.
2007 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2009 2004-06-24 Jason Merrill <jason@redhat.com>
2012 * decl.c (grokparms): Give the PARM_DECL reference type if the
2013 parameter is passed by invisible reference.
2015 2004-06-24 Andreas Schwab <schwab@suse.de>
2017 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
2019 2004-06-23 Mark Mitchell <mark@codesourcery.com>
2021 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
2022 (cp/decl.o): Likewise.
2023 (cp/decl2.o): Likewise.
2024 (cp/pt.o): Likewise.
2025 (cp/semantics.o): Likewise.
2026 * config-lang.in (gtfiles): Do not reference cp/lex.h.
2027 * class.c: Do not include lex.h.
2028 (add_implicitly_declared_members): Do not use
2029 adding_implicit_members.
2030 (check_bases_and_members): Do not talk about grok_x_components.
2031 * cp/cp-tree.h (adding_implicit_members): Remove.
2032 (cp_storage_class): New type.
2033 (cp_decl_spec): Likewise.
2034 (cp_decl_specifier_seq): Likewise.
2035 (cp_parameter_declarator): Use it for the decl_specifiers field.
2036 (check_tag_decl): Adjust prototype.
2037 (shadow_tag): Likewise.
2038 (groktypename): Likewise.
2039 (start_decl): Likewise.
2040 (start_function): Likewise.
2041 (start_method): Likewise.
2042 (grok_x_components): Remove.
2043 (grokfield): Adjust prototype.
2044 (grokbitfield): Likewise.
2045 (finish_member_class_template): Remove.
2046 * decl.c: Do not include lex.h.
2047 (adding_implicit_members): Do not define.
2048 (check_tag_decl): Do not use trees to represent decl-specifiers.
2049 (shadow_tag): Likewise.
2050 (groktypename): Likewise.
2051 (start_decl): Likewise.
2052 (grokvardecl): Likewise.
2053 (grokdeclarator): Likewise.
2054 (grokparms): Likewise.
2055 (start_function): Likewise.
2056 (start_method): Likewise.
2057 * decl.h (grokdeclarator): Adjust prototype.
2058 * decl2.c: Do not include lex.h.
2059 (grok_x_components): Remove.
2060 (grokfield): Do not use trees to represent decl-specifiers.
2061 (grokbitfield): Likewise.
2062 * lex.c: Do not include lex.h.
2064 * parser.c: Include target.h.
2065 (clear_decl_specs): New function.
2066 (cp_parser_translation_unit): Do not use trees to represent
2068 (cp_parser_postfix_expression): Likewise.
2069 (cp_parser_new_type_id): Likewise.
2070 (cp_parser_condition): Likewise.
2071 (cp_parser_simple_declaration): Likewise.
2072 (cp_parser_decl_specifier_seq): Likewise.
2073 (cp_parser_function_specifier_opt): Likewise.
2074 (cp_parser_conversion_type_id): Likewise.
2075 (cp_parser_template_parameter): Likewise.
2076 (cp_parser_explicit_instantiation): Likewise.
2077 (cp_parser_type_specifier): Likewise.
2078 (cp_parser_simple_type_specifier): Likewise.
2079 (cp_parser_init_declarator): Likewise.
2080 (cp_parser_type_id): Likewise.
2081 (cp_parser_type_specifier_seq): Likewise.
2082 (cp_parser_parameter_declaration): Likewise.
2083 (cp_parser_member_declaration): Likewise.
2084 (cp_parser_exception_declaration): Likewise.
2085 (cp_parser_function_definition_from_specifiers_and_declarator):
2087 (cp_parser_single_declaration): Likewise.
2088 (cp_parser_save_member_function_body): Likewise.
2089 (cp_parser_friend_p): Likewise.
2090 (cp_parser_set_storage_class): New function.
2091 (cp_parser_set_decl_spec_type): Likewise.
2092 * pt.c: Do not include lex.h.
2093 * semantics.c: Likewise.
2094 (finish_member_class_template): Remove.
2096 2004-06-23 Roger Sayle <roger@eyesopen.com>
2098 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
2099 longer take both "args" and "convert_args" as arguments.
2100 (build_op_delete_call): Update call to build_cxx_call.
2101 (build_over_call): Likewise, update call to build_cxx_call.
2102 * cp-tree.h (build_cxx_call): Update funtion prototype.
2103 * typeck.c (build_function_call): Don't call expand_tree_builtin.
2104 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
2105 (throw_bad_typeid): Likewise.
2106 (build_dynamic_cast_1): Likewise.
2108 2004-06-22 Richard Henderson <rth@redhat.com>
2110 * class.c (build_vfn_ref): Take a pointer not object. Build
2112 (cp_fold_obj_type_ref): New.
2113 * call.c (build_over_call): Update build_vfn_ref call.
2114 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2115 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2117 2004-06-21 Jason Merrill <jason@redhat.com>
2120 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2123 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2125 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2126 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2127 (TREE_PARMLIST): Likewise.
2128 (CALL_DECLARATOR_PARMS): Likewise.
2129 (CALL_DECLARATOR_QUALS): Likewise.
2130 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2131 (cp_declarator_kind): New type.
2132 (cp_parameter_declarator): Likewise.
2133 (cp_declarator): Likewise.
2134 (cp_error_declarator): Likewise.
2135 (no_parameters): Likewise.
2136 (groktypename): Change prototype.
2137 (start_decl): Likewise.
2138 (start_handler_parms): Likewise.
2139 (get_scope_of_declarator): Likewise.
2140 (start_function): Likewise.
2141 (start_preparsed_function): New function.
2142 (start_function): Change prototype.
2143 (start_method): Likewise.
2144 (grokfield): Likewise.
2145 (grokbitfield): Likewise.
2146 (build_new): Likewise.
2147 (make_pointer_declarator): Remove.
2148 (make_reference_declarator): Likewise.
2149 (make_call_declarator): Likewise.
2150 (set_quals_and_spec): Likewise.
2151 (process_template_parm): Change prototype.
2152 (begin_function_definition): Remove.
2153 (finish_parmlist): Remove.
2154 * decl.c (groktypename): Do not use trees to represent
2156 (start_decl): Likewise.
2157 (start_handler_parms): Remove.
2158 (get_scope_of_declarator): Reimplement.
2159 (grokdeclarator): Do not use trees to represent declarators.
2160 (grokparms): Likewise.
2161 (start_function): Likewise.
2162 (start_method): Likewise.
2163 (build_void_list_mode): Do not use TREE_PARMLIST.
2164 * decl.h (grokdeclarator): Change prototype.
2165 * decl2.c (grok_method_quals): Robustify.
2166 (grok_x_components): Do not use trees to represent declarators.
2167 (grokfield): Likewise.
2168 (grokbitfield): Likewise.
2169 (start_objects): Build FUNCTION_DECLs, not declarators.
2170 (start_static_storage_duration_function): Likewise.
2171 * init.c (build_new): Simplify.
2172 * lex.c (make_pointer_declarator): Remove.
2173 (make_reference_declarator): Likewise.
2174 (make_call_declarator): Likewise.
2175 (set_quals_and_spec): Likewise.
2176 * method.c (use_thunk): Use start_preparsed_function.
2177 (synthesize_method): Likewise.
2178 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2179 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2180 * parser.c (cp_error_declarator): New variable.
2181 (declarator_obstack): Likewise.
2182 (alloc_declarator): New function.
2183 (make_declarator): Likewise.
2184 (make_id_declarator): Likewise.
2185 (make_pointer_declarator): Likewise.
2186 (make_reference_declarator): Likewise.
2187 (make_ptrmem_declarator): Likewise.
2188 (make_call_declarator): Likewise.
2189 (make_array_declarator): Likewise.
2190 (no_parameters): New variable.
2191 (make_parameter_declarator): Likewise.
2192 (cp_parser_check_for_definition_in_return_type): Do not use trees
2193 to represent declarators.
2194 (cp_parser_translation_unit): Likewise.
2195 (cp_parser_new_expression): Likewise.
2196 (cp_parser_new_type_id): Likewise.
2197 (cp_parser_new_declarator_opt): Likewise.
2198 (cp_parser_direct_new_declarator): Likewise.
2199 (cp_parser_condition): Likewise.
2200 (cp_parser_declaration_statement): Likewise.
2201 (cp_parser_declaration): Likewise.
2202 (cp_parser_conversion_type_id): Likewise.
2203 (cp_parser_conversion_declarator_opt): Likewise.
2204 (cp_parser_template_parameter_list): Likewise.
2205 (cp_parser_template_parameter): Likewise.
2206 (cp_parser_explicit_instantiation): Likewise.
2207 (cp_parser_init_declarator): Likewise.
2208 (cp_parser_declarator): Likewise.
2209 (cp_parser_direct_declarator): Likewise.
2210 (cp_parser_type_id): Likewise.
2211 (cp_parser_parameter_declaration_clause): Likewise.
2212 (cp_parser_parameter_declaration_list): Likewise.
2213 (cp_parser_parameter_declaration): Likewise.
2214 (cp_parser_member_declaration): Likewise.
2215 (cp_parser_exception_declaration): Likewise.
2216 (cp_parser_check_declarator_template_parameters): Likewise.
2217 (cp_parser_function_definition_from_specifiers_and_declarator):
2219 (cp_parser_save_member_function_body): Likewise.
2220 * pt.c (process_template_parm): Add is_non_type parameter.
2221 (convert_template_argument): Adjust call to groktypename.
2222 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2223 (tsubst): Do not expect declarators.
2224 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2226 (instantiate_decl): Use start_preparsed_function.
2227 * semantics.c (begin_function_definition): Remove.
2228 (finish_parmlist): Remove.
2229 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2232 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2234 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2235 (build_new_method_call): Likewise.
2236 * decl.c (local_variable_p_walkfn): Don't walk into types.
2237 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2238 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2239 * init.c (buld_new): Add new operand for ARRAY_REF.
2240 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2241 (do_build_assign_ref): Likewise.
2242 * parser.c (cp_parser_direct_new_declarator): Add new operands
2244 (cp_parser_direct_declarator): Likewise.
2245 * pt.c (tsubst): Likewise.
2246 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2248 * semantics.c (finish_non_static_data_member): Add new operand
2250 * typeck.c (build_class_member_access_expr): Likewise.
2251 (build_class_member_access_expr, finish_class_member_access_expr):
2253 (build_ptrmemfunc_access_expr): Likewise.
2254 (build_array_ref): Add new operands for ARRAY_REF.
2255 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2256 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2258 2004-06-21 Richard Henderson <rth@redhat.com>
2260 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2261 * parser.c (cp_parser_jump_statement): Update commentary.
2262 * pt.c (tsubst_expr): Use RETURN_EXPR.
2263 * semantics.c (finish_return_stmt): Likewise.
2264 (finalize_nrv_r): Likewise.
2265 * typeck.c, typeck2.c: Update file start commentary.
2267 2004-06-21 Richard Henderson <rth@redhat.com>
2269 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2271 2004-06-20 Richard Henderson <rth@redhat.com>
2273 * cp-tree.h (add_decl_stmt): Declare.
2274 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2275 * semantics.c (maybe_cleanup_point_expr): New.
2276 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2277 finish_for_expr, finish_switch_cond): Use it.
2278 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2280 2004-06-20 Richard Henderson <rth@redhat.com>
2282 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2283 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2284 (cp_gimplify_expr): Call it.
2285 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2286 (cp_genericize): New.
2287 * decl.c (finish_function): Call it.
2288 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2289 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2290 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2291 (cp_genericize): Declare.
2292 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2293 * dump.c (cp_dump_tree): Likewise.
2294 * semantics.c (push_cleanup): Move from c-semantics.c.
2296 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2298 * cp-lang.c (has_c_linkage): Implement.
2300 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2301 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2302 (builtin_function_1): Don't call make_decl_rtl.
2303 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2304 (grokvardecl): Don't call mangle_decl.
2305 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2306 DECL_ASSEMBLER_NAME.
2307 * method.c (set_mangled_name_for_decl): Delete.
2308 * name-lookup.c (pushdecl): When a local extern shadows a
2309 file-scope declaration of the same object, give both DECLs the
2311 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2312 on DECL_ASSEMBLER_NAME.
2314 2004-06-19 Richard Henderson <rth@redhat.com>
2316 * cp-gimplify.c: Remove unnecessary prototypes.
2317 (cp_gimplify_stmt): Merge into ...
2318 (cp_gimplify_expr): ... here. Move to end of file. Handle
2319 stmts_are_full_exprs_p frobbing.
2320 * cp-tree.h (cp_gimplify_stmt): Remove.
2321 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2322 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2324 2004-06-18 Richard Henderson <rth@redhat.com>
2327 * semantics.c (begin_cond): New.
2328 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2329 Assume that non-template decls go land before the conditional.
2330 (simplify_loop_decl_cond): Likewise.
2331 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2332 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2333 begin_switch_stmt, finish_switch_cond): Update to match.
2335 2004-06-17 Jason Merrill <jason@redhat.com>
2338 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2339 (finish_stmt_expr_expr): Update type after conversions.
2340 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2341 Handle void initializer.
2342 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2344 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2346 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2347 * cp-tree.h (defer_fn): Delete.
2348 * decl2.c (defer_fn): Delete.
2349 (finish_file): Simplify deferred_fns loops; check that
2350 only used inline functions get into deferred_fns.
2351 (mark_used): Inline previous contents of defer_fn.
2353 2004-06-16 Richard Henderson <rth@redhat.com>
2355 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2356 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2357 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2358 of CTOR_INITIALIZER ...
2359 (pp_cxx_statement): ... here.
2360 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2361 (finish_function): Use alloc_stmt_list to zap entire function.
2362 * parser.c (cp_parser_compound_statement): Update commentary.
2363 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2364 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2365 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2367 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2369 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2371 2004-06-16 Richard Henderson <rth@redhat.com>
2373 * parser.c (cp_parser_labeled_statement): Update commentary.
2374 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2375 * tree.c (mark_local_for_remap_r): Likewise.
2377 2004-06-16 Richard Henderson <rth@redhat.com>
2379 * parser.c (cp_parser_asm_definition): Update commentary.
2380 * pt.c (tsubst_expr): Use ASM_EXPR.
2381 * semantics.c (finish_asm_stmt): Likewise.
2383 2004-06-16 Richard Henderson <rth@redhat.com>
2385 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2386 * parser.c (cp_parser_statement): Update commentary.
2387 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2388 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2389 * tree.c (mark_local_for_remap_r): Likewise.
2391 2004-06-16 Richard Henderson <rth@redhat.com>
2394 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2395 statement in FOR_INIT_STMT for templates.
2397 2004-06-15 Richard Henderson <rth@redhat.com>
2399 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2400 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2401 (genericize_try_block): Use gimplify_stmt.
2402 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2403 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2404 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2405 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2406 (cp_tree_chain_matters_p): Remove.
2407 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2408 (COMPOUND_STMT_BODY_BLOCK): New.
2409 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2410 (EXPR_STMT_STMT_EXPR_RESULT): New.
2411 (building_stmt_tree): Check cur_stmt_list.
2412 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2413 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2414 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2415 (cp_finish_decl): Use push_cleanup.
2416 (start_function, finish_function): Use statement lists.
2417 (finish_stmt): Do nothing.
2418 * except.c (begin_eh_spec_block): Use statement lists.
2419 (check_handlers_1, check_handlers): Likewise.
2420 * init.c (construct_virtual_base): Don't add extra compound stmts.
2421 (build_vec_init): Likewise.
2422 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2423 * name-lookup.h (struct cp_binding_level): Add statement_list.
2424 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2425 (cp_parser_labeled_statement, cp_parser_expression_statement,
2426 cp_parser_statement_seq_opt): Likewise.
2427 (cp_parser_compound_statement): Likewise. Take bool for try block.
2428 (cp_parser_selection_statement): Tidy if processing.
2429 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2430 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2431 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2432 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2433 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2434 (finish_cond): New, rewritten from FINISH_COND.
2435 (simplify_loop_decl_cond): New.
2436 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2437 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2438 begin_else_clause, finish_else_clause, finish_if_stmt,
2439 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2440 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2441 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2442 finish_switch_cond, finish_switch_stmt, begin_try_block,
2443 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2444 finish_handler_sequence, finish_function_handler_sequence,
2445 begin_handler, finish_handler_parms, finish_handler,
2446 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2447 using statement lists.
2448 (begin_compound_stmt): Replace has_no_scope argument with flags.
2449 Update all callers. Use statement lists.
2450 (finish_compound_stmt): Likewise.
2451 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2452 (current_scope_stmt_stack): Remove.
2453 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2454 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2455 Rewrite with statement lists.
2457 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2459 * parser.c: Change all assignments of c_lex_string_translate
2460 to true and false to 1 and 0.
2461 (cp_lexer_read_token): Convert type of the translated string.
2462 (cp_parser_skip_to_closing_parentheses): Preserve original
2463 value of c_lex_string_translate, and set it to -1 while
2465 (cp_parser_cache_group): Likewise.
2466 (cp_parser_cache_group_1): Renamed.
2467 (cp_parser_asm_operand_list): Remove redundant setting of
2468 c_lex_string_translate.
2469 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2470 Handle chained strings.
2472 2004-06-12 Andrew Pinski <apinski@apple.com>
2476 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2478 * cp-tree.h: Fix typo.
2480 * cp-tree.h: Include cgraph.h
2481 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2482 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2484 2004-06-12 Jason Merrill <jason@redhat.com>
2486 PR tree-optimization/14107
2487 * decl.c (finish_function): Warn about no return in all functions.
2489 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2491 * cp-tree.h (struct language_function): Remove cannot_inline.
2492 * decl.c (save_function_data): cannot_inline is no more.
2493 (cxx_push_function_context): Likewise.
2494 * decl2.c (start_objects, start_static_storage_duration_function):
2495 Reset DECL_INLINE, set DECL_UNINLINABLE.
2497 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2500 * search.c (lookup_field): Propagate the ambiguity list.
2501 (lookup_fnfields): Likewise.
2503 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2506 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2507 template keyword to disambiguate.
2509 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2512 * decl.c (grokdeclarator): Ignore pointer-to-members when
2513 computing template depth.
2516 * name-lookup.c (pushtag): Do not try to put class declarations in
2517 explicit specialization scopes.
2519 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2521 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2523 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2526 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2527 bindings for undeclared built-ins.
2529 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2531 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2532 appear at the correct location.
2534 2004-06-10 Jason Merrill <jason@redhat.com>
2538 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2539 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2540 TREE_TYPE for non-dependent names.
2541 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2542 unknown_type_node as its TREE_TYPE.
2543 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2544 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2545 (dump_expr) <SCOPE_REF case>: Likewise.
2547 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2550 * parser.c (cp_parser_direct_declarator): Robustify.
2553 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2554 constants in non-dependent contexts.
2558 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2561 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2564 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2567 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2571 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2572 * lex.c (handle_pragma_interface): Deprecate.
2573 (handle_pragma_implementation): Likewise.
2575 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2577 * g++spec.c (lang_specific_driver): Remove check for -lm
2578 and -lmath when check it see if it was the math library.
2580 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2583 * parser.c (cp_parser_direct_declarator): Reject constructor named
2584 as qualified template-id.
2586 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2589 * lex.c (handle_pragma_interface): Deprecate.
2590 (handle_pragma_implementation): Likewise.
2592 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2595 * parser.c (cp_parser_iteration_statement): Fix typo in error
2599 * pt.c (tsubst_default_argument): Do not defer access checks
2600 while substituting into the default argument.
2603 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2604 constant in a non-dependent context.
2607 * except.c (build_throw): Ensure that temp_expr has been
2610 2004-06-06 Roger Sayle <roger@eyesopen.com>
2612 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2614 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2617 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2618 'typename', and accept 'template'.
2620 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2621 Jan Hubicka <jh@suse.cz>
2624 * method.c (use_think): Do not mark thunk as referenced.
2626 2004-06-03 Matt Austern <austern@apple.com>
2629 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2630 is nonzero, and if we see a noninline definition of a key method,
2631 make the vtables nonweak.
2633 2004-06-02 Matt Austern <austern@apple.com>
2635 * cp-tree.h (instantiate_decl): new boolean parameter,
2636 undefined_ok. Current behavior is equivalent to its being 0.
2637 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2638 * pt.c (mark_decl_instantiated): Unconditionally make
2639 instantiations explicit unconditionally
2640 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2641 since mark_decl_instantiated now does it.
2642 (instantiate_class_member): New. Instantiate a member of an
2643 explicitly instantiated class template.
2644 (do_type_instantiation): Explicitly instantiate members of an
2645 explicitly instantiated class template.
2646 (instantiate_decl): if undefined_ok is nonzero, and if we're
2647 trying to explicitly instantiated a template with no definition,
2648 change it to an implicit instantiation.
2649 (instantiate_pending_templates): Add new argument to instantiate_decl.
2650 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2652 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2654 * cp-tree.h: Fix typo.
2656 * cp-tree.h: Include cgraph.h
2657 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2658 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2660 2004-06-01 Jason Merrill <jason@redhat.com>
2663 * call.c (call_builtin_trap): Remove type parm.
2664 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2665 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2667 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2670 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2671 TREE_TYPE for non-dependent names.
2672 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2673 unknown_type_node as its TREE_TYPE.
2674 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2675 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2676 (dump_expr) <SCOPE_REF case>: Likewise.
2678 2004-06-01 Richard Henderson <rth@redhat.com>
2679 Andrew Pinski <pinskia@physics.uc.edu>
2681 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2682 * parser.c (struct cp_parser): Remove in_offsetof.
2683 (cp_parser_new): Don't set it.
2684 (cp_parser_unary_expression): Don't check it.
2685 (cp_parser_postfix_open_square_expression): Split out from ...
2686 (cp_parser_postfix_expression): ... here.
2687 (cp_parser_postfix_dot_deref_expression): Likewise.
2688 (cp_parser_builtin_offsetof): New.
2689 (cp_parser_primary_expression): Use it.
2691 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2694 * parser.c (cp_parser_postfix_expression): Allow subscript
2695 operator in offsetof.
2697 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2700 * friend.c (add_friend): Do not try to perform access checks for
2701 functions from dependent classes.
2703 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2705 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2706 (pp_cxx_begin_template_argument_list): Turn into a function.
2707 (pp_cxx_end_template_argument_list): Likewise.
2708 (pp_cxx_separate_with): Define.
2709 (pp_cxx_unqualified_id): Tidy.
2710 (pp_cxx_primary_expression): Likewise.
2711 (pp_cxx_postfix_expression): Likewise.
2712 (pp_cxx_expression): Likewise.
2713 (pp_cxx_simple_type_specifier): Likewise.
2714 (pp_cxx_type_specifier_seq): Likewise.
2715 (pp_cxx_parameter_declaration_clause): Likewise.
2716 (pp_cxx_exception_specification): Likewise.
2717 (pp_cxx_direct_declarator): Likewise.
2718 (pp_cxx_type_id): Likewise.
2719 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2721 (pp_cxx_left_paren): Likewise.
2722 (pp_cxx_right_paren): Likewise.
2723 (pp_cxx_left_brace): Likewise.
2724 (pp_cxx_right_brace): Likewise.
2725 (pp_cxx_left_bracket): Likewise.
2726 (pp_cxx_right_bracket): Likewise.
2727 (pp_cxx_dot): Likewise.
2728 (pp_cxx_identifier): Likewise.
2729 (pp_cxx_tree_identifier): Likewise.
2730 (pp_cxx_ampersand): New macro.
2731 (pp_cxx_star): Likewise.
2732 (pp_cxx_arrow): Likewise.
2733 (pp_cxx_semicolon): Likewise.
2734 (pp_cxx_complement): Likewise.
2735 (pp_cxx_begin_template_argument_list): Declaree.
2736 (pp_cxx_end_template_argument_list): Likewise.
2737 (pp_cxx_colon_colon): likewise.
2739 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2741 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2744 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2746 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2747 typeck.c: Fix comment formatting.
2749 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2751 * cp-lang.c (cp_expand_decl): Remove.
2752 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2754 2004-05-30 Andreas Jaeger <aj@suse.de>
2756 * lang-specs.h: Add missing initializers for .ii.
2758 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2760 * decl.c (cp_make_fname_decl): Free return value from
2763 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2766 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2768 * init.c (build_new): Likewise.
2771 * name-lookup.c (arg_assoc): Robustify.
2774 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2775 when determining the scope to use for a pointer to member.
2776 (lookup_anon_field): Give it external linkage.
2777 * cp-tree.h (lookup_anon_field): Declare it.
2778 * expr.c (cplus_expand_constant): Use it.
2780 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2783 * parser.c (cp_parser_simple_type_specifier): Call
2784 maybe_note_name_used_in_class.
2786 2004-05-28 Tom Marshall <tmarshall@real.com>
2789 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2790 the class has friends.
2792 2004-05-27 Adam Nemet <anemet@lnxw.com>
2795 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2796 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2798 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2800 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2801 if it might be needed.
2802 * pt.c (mark_decl_instantiated): Only call defer_fn if
2803 the function actually needs processing in finish_file.
2804 * decl2.c (finish_file): Add check that elements in
2805 deferred_fns_used are really needed there. Remove unnecessary
2806 test of DECL_SAVED_TREE.
2808 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2810 * Make-lang.in: No need to specify $(LIBCPP).
2812 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2815 * parser.c (cp_parser_class_head): Robustify.
2818 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2820 (cp_parser_constructor_declarator_p): Treat attributes
2824 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2825 base classes in templates.
2827 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2830 * pt.c (instantiate_template): Robustify.
2832 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2835 * decl.c (xref_tag): Issue errors about redeclaring template
2836 classes as non-template classes.
2838 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2841 * name-lookup.c (supplement_binding): Allow redefinitions of
2845 * parser.c (cp_parser_template_argument): Robustify.
2847 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2849 * class.c (alter_access): Use %E format specifier to print an
2850 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2851 (push_lang_context): Likewise.
2852 * decl.c (lookup_label): Likewise.
2853 (grokdeclarator): Likewise.
2854 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2855 * pt.c (do_type_instantiation): Likewise.
2856 * tree.c (handle_java_interface_attribute): Likewise.
2857 (handle_com_interface_attribute): Likewise.
2858 (handle_init_priority_attribute): Likewise.
2860 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2864 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2865 recognized as overloaded functions.
2867 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2870 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2871 layout conflicts for unions.
2874 * typeck.c (build_x_unary_op): Instantiate template class
2875 specializations before looking for "operator &".
2878 * typeck.c (complete_type): Layout non-dependent array types, even
2882 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2885 2004-05-22 Roger Sayle <roger@eyesopen.com>
2887 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2888 returning when TREE_TYPE is error_mark_node.
2889 * typeck.c (require_complete_type): Return error_mark_node if
2890 value's type is an error_mark_node.
2892 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2894 * optimize.c (calls_setjmp_r): Remove.
2895 (calls_setjmp_p): Remove.
2896 * cp-tree.c (calls_setjmp_p): Remove.
2897 * decl.c (finish_function): Do not call calls_setjmp_p.
2899 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2901 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2902 * decl2.c (maybe_make_one_only): Likewise.
2903 * method.c (use_thunk): Likewise.
2905 2004-05-18 Jason Merrill <jason@redhat.com>
2907 * class.c (build_base_path): Tidy a bit.
2909 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2911 * name-lookup.c (struct scope_binding): New.
2912 (EMPTY_SCOPE_BINDING): New.
2913 (lookup_using_namespace): Take a scope_binding instead of a
2915 (qualified_lookup_using_namespace): Likewise.
2916 (cxx_binding_clear): Delete.
2917 (do_nonmember_using_decl): Use a scope_binding instead of a
2919 (lookup_tag): Don't call select_decl.
2920 (ambiguous_decl): Don't return anything (and change callers to match).
2921 Take a scope_binding as the second parameter.
2922 (lookup_namespace_name): Use a scope_binding instead of a
2924 (unqualified_namespace_lookup): Likewise.
2925 (lookup_qualified_name): Likewise.
2926 (select_decl): Take a scope_binding instead of a cxx_binding.
2927 Use macros rather than hand-coding tests for type-ness.
2929 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2931 * cp-gimplify.c: Rename from cp-simplify.c.
2932 * Make-lang.in, optimize.c: Update.
2934 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2936 Merge from tree-ssa-20020619-branch. See
2937 ChangeLog.tree-ssa for details.
2939 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2940 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2941 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2942 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2944 * cp-mudflap.c: New file.
2945 * cp-simplify.c:: New file.
2947 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2950 * decl2.c (check_classfn): For member templates, compare also the
2951 template parameters to match the declaration.
2952 * cp-tree.h: Adjust declaration of check_classfn.
2953 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2954 * friend.c (do_friend): Likewise.
2955 * pt.c (tsubst_friend_function): Likewise.
2957 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2959 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2960 Instead, dig into the representation type to find the array bound.
2962 2004-04-30 Jason Merrill <jason@redhat.com>
2964 Refer to base members using COMPONENT_REFs where possible.
2965 * class.c (build_simple_base_path): New fn.
2966 (build_base_path): Use it for non-virtual base references.
2967 (layout_class_type): Change base fields to their real type
2968 after layout is done.
2969 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2970 * cp-lang.c (cxx_get_alias_set): Use it.
2972 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2974 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2977 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2980 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2981 used in integral constant expressions.
2983 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2985 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2988 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2990 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2991 * decl.c (reshape_init): Use it.
2992 * init.c (perform_member_init): Remove redundant condition.
2993 (build_aggr_init): Adjust to handle brace-enclosed initializers
2995 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2997 * parser.c (cp_parser_initializer_clause): Do not set
2998 TREE_HAS_CONSTRUCTOR on the initializer.
2999 * rtti.c (tinfo_base_init): Likewise.
3000 (generic_initializer): Likewise.
3001 (ptr_initializer): Likewise.
3002 (ptm_initializer): Likewise.
3003 (class_initializer): Likewise.
3004 (get_pseudo_ti_init): Likewise.
3005 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3007 2004-04-22 Alan Modra <amodra@bigpond.net.au>
3009 * name-lookup.c (anonymous_namespace_name): Make static.
3011 2004-04-19 Roger Sayle <roger@eyesopen.com>
3014 * class.c (build_base_path): Call fold whilst building the NULL
3015 pointer check expression trees.
3017 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3019 * init.c (build_new_1): Don't use type size argument for Java
3020 _Jv_AllocObject call.
3022 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
3024 * method.c (make_alias_for_thunk): Remove preprocessor guard on
3025 declaration and definition.
3027 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
3030 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
3031 than ASM_OUTPUT_DEF.
3033 2004-04-08 Jakub Jelinek <jakub@redhat.com>
3035 * decl2.c (mark_used): Don't segfault if cfun != NULL but
3036 current_function_decl == NULL.
3038 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
3041 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
3044 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3046 * init.c (decl_constant_value): Don't look at DECL_INITIAL
3048 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
3049 or TREE_SIDE_EFFECTS of a type.
3051 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
3054 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
3055 cv-qualifier unification.
3056 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
3058 2004-04-02 Jan Hubicka <jh@suse.cz>
3060 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
3061 * cp-tree.h (cp_update_decl_after_saving): Declare.
3062 * tree.c (cp_update_decl_after_saving): Define.
3064 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3067 * typeck.c (get_delta_difference): Call fold before returning the
3070 2004-04-01 Richard Henderson <rth@redhat.com>
3073 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
3074 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
3076 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3079 * name-lookup.c (maybe_push_cleanup_level): Robustify.
3081 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3083 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
3085 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3087 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
3088 * class.c (check_bitfield_decl): Likewise.
3089 * cvt.c (type_promotes_to): Likewise.
3090 * decl.c (finish_enum): Likewise.
3091 * mangle.c (write_builtin_type): Likewise.
3092 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
3093 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
3094 (build_binary_op): Likewise.
3096 2004-03-31 Jan Hubicka <jh@suse.cz>
3098 * tree.h (optimize_function): Kill prototype.
3099 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
3100 * semantics.c (expand_body): Kill.
3102 2004-03-30 Mark Mitchell <mark@codesourcery.com>
3105 * decl.c (start_decl_1): Do not decide whether or not to create a
3106 new cleanup level until after the type has been completed.
3109 * pt.c (tsubst_default_argument): Clear current_function_decl.
3111 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3113 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3115 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3117 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3118 is null, just print the literal name and return.
3120 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3122 * cxx-pretty-print.c: Fix comment typos.
3124 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3126 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3129 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3131 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3132 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3135 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3137 PR 12267, 12391, 12560, 13129, 14114, 14133
3138 * cp-lang.c (c_reset_state): Delete.
3139 (push_file_scope, pop_file_scope): New stubs.
3140 * parser.c (c_parse_file): Call sorry() here if called more than once.
3142 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3144 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3147 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3149 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3151 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3153 * error.c (enum pad): Remove.
3154 (dump_qualifiers): Likewise.
3155 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3156 (dump_aggr_type): Likewise.
3157 (dump_type_suffix): Likewise.
3158 (dump_simple_decl): Likewise.
3159 (dump_function_decl): Likewise.
3160 (cv_to_string): Likewise.
3161 (dump_type_prefix): Likewise. Adjust return void.
3162 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3164 (pp_cxx_template_keyword_if_needed): Document.
3165 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3166 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3167 MUST_NOT_THROW_EXPR.
3169 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3172 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3173 templates, if their type is non-dependent.
3175 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3177 * call.c (build_op_delete_call): Do not forget the placement
3178 arguments when iterating through mutiple delete operators.
3180 * cp-tree.h (svaed_scope): Remove last_parms.
3181 (NEW_DELETE_OPNAME_P): New macro.
3182 (last_function_parms): Remove.
3183 (do_friend): Adjust prototype.
3184 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3185 using last_function_parms.
3186 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3187 using last_function_parms.
3188 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3189 for class-specific operator new and operator delete.
3190 (grok_op_properties): Do not look for allocation functions with
3192 (start_function): Use DECL_ARGUMENTS instead of
3193 last_function_parms.
3194 * decl.h (last_function_parms): Do not declare.
3195 * decl2.c (grokclassfn): Do not use last_function_parms.
3196 * friend.c (do_friend): Remove parmdecls parameter.
3197 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3198 (pop_from_top_level): Do not restore it.
3199 * pt.c (check_explicit_specialization): Do not adjust
3200 last_function_parms.
3202 * name-lookup.c (do_local_using_decl): Create a local binding for
3203 types brought in via using declarations.
3205 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3206 function declarations correctly.
3208 * semantics.c (finish_id_expression): Correct handling of
3209 conversion operators to dependent types.
3211 * typeck.c (lookup_destructor): Allow the use of destructors from
3214 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3216 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3217 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3218 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3219 the field is named TEMPLATE_TYPE_PARM_INDEX.
3221 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3224 * parser.c (cp_parser_functional_cast): A cast to anything
3225 but integral or enumaration type is not an integral constant
3227 * pt.c (value_dependent_expression_p): Handle cast expressions
3228 without operands (such as "int()").
3230 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3232 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3233 cv-qualification between the type named by the
3234 pseudo-destructor-name and the object-type.
3236 * search.c (accessible_base_p): Handle non-proper bases.
3238 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3239 refers to a single overloaded function, set the type of the
3241 * tree.c (lvalue_type): Simplify.
3242 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3244 (build_unary_op): Handle OVERLOADs with known types.
3246 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3249 * parser.c (cp_parser_postfix_expression): Handle the use of
3250 "typename" in non-dependent contexts. Convert appropriately when
3251 when using a qualified name after "->" or ".".
3253 * call.c (conditional_conversion): Honor the requirement that some
3254 conversions refer to the original object.
3256 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3258 * call.c (build_conditional_expr): Do not call force_rvalue for
3259 operands of void_type when the conditional expression itself has
3261 * name-lookup.c (pushdecl): Don't consider a declaration of a
3262 function named "main" to be an overload of a type named "main".
3263 * parser.c (cp_parser_template_name): Perform name lookup when the
3264 template name is proceeded by "template" if the qualifying scope
3266 * typeck.c (composite_pointer_type_r): Correctly handle
3267 pointer-to-member types.
3268 (build_const_cast): Likewise.
3270 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3272 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3273 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3274 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3275 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3276 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3277 (TYPEOF_TYPE_EXPR): New macro.
3278 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3279 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3280 * pt.c (tsubst): Likewise.
3281 * semantics.c (finish_typeof): Likewise.
3282 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3283 and TEMPLATE_TYPE_PARM.
3284 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3285 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3287 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3290 * cp-tree.h (build_new_op): Change prototype.
3291 (build_x_binary_op): Likewise.
3292 * call.c (build_new_op): Add overloaded_p parameter.
3293 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3294 * parser.c (cp_parser_binary_expression): Note that uses of
3295 overloaded operators prevents an expression from being considered
3296 an integral constant.
3297 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3299 * semantics.c (finish_call_expr): Likewise.
3300 * typeck.c (rationalize_conditional_expr): Likewise.
3301 (build_x_indirect_ref): Likewise.
3302 (build_x_binary_op): Likewise.
3303 (build_x_unary_op): Likewise.
3304 (build_x_compound_expr): Likewise.
3305 (build_modify_expr): Likewise.
3306 * typeck2.c (build_x_arrow): Likewise.
3308 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3310 * cp-lang.c, ptree.c: Update copyright.
3312 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3315 * parser.c (cp_parser_non_integral_constant_expression): Encode
3316 more of the idiom that surrounded calls to this function within
3318 (cp_parser_primary_expression): Adjust accordingly.
3319 (cp_parser_postfix_expression): Likewise.
3320 (cp_parser_unary_expression): Likewise.
3321 (cp_parser_cast_expression): Likewise.
3322 (cp_parser_assignment_expression): Likewise.
3323 (cp_parser_expression): Likewise.
3324 (cp_parser_new_expression): Note that new-expressions are not
3325 allowed in integral constant expressions.
3326 (cp_parser_delete_expression): Likewise.
3328 2004-03-12 Matt Austern <austern@apple.com>
3330 * decl2.c (maybe_make_one_only): Look at
3331 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3332 to make an explicit instantiation weak.
3333 * method.c (use_thunk): Make sure we call comdat_linkage
3335 * pt.c (do_type_instantiation): On systems where weak symbols
3336 don't go in a static archive's TOC, explicit instantiation of a
3337 class must imply *explicit* instantiation of its memeber.
3339 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3341 * call.c, cp-tree.h, pt.c: Fix comment typos.
3343 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3346 * decl.c (xref_tag): Disregard non-type declarations when
3347 looking up a tagged type.
3349 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3352 * call.c (convert_like_real): Build a const qualified temporary,
3353 when testing ctor access.
3355 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3357 * call.c (initialize_reference): Fix typo.
3359 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3362 * pt.c (determine_specialization): For member templates, match also
3366 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3368 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3370 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3373 * call.c (initialize_reference): Handle initializers that are
3374 class-member access expressions applies to rvalues.
3376 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3379 * name-lookup.c (supplement_binding): Ignore functions that are
3380 marked DECL_ANTICIPATED.
3382 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3385 * class.c (check_field_decls): Complain about non-static data
3386 members of reference type in unions. Propagate
3387 CLASSTYPE_REF_FIELDS_NEED_INIT and
3388 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3390 * init.c (perform_member_init): Complain about mbmers with const
3391 type that are not explicitly initialized.
3393 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3395 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3396 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3397 (lang_identifier): Remove implicit_decl and error_locus.
3398 (IDENTIFIER_IMPLICIT_DECL): Remove.
3399 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3400 (IDENTIFIER_ERROR_LOCUS): Likewise.
3401 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3402 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3403 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3404 (implicitly_declare): Remove.
3405 * decl.c (warn_extern_redeclared_static): Remove check of
3406 IDENTIFIER_IMPLICIT_DECL.
3407 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3408 (implicitly_declare): Remove.
3409 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3410 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3411 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3412 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3413 in the innermost scope, rather than at namespace scope.
3414 * name-lookup.c (push_local_binding): Give it external linkage.
3415 (pushdecl): Remove dead code.
3416 * name-lookup.h (push_local_binding): Declare it.
3417 * ptree.c (cxx_print_identifier): Don't print
3418 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3419 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3420 not IDENTIFIER_ERROR_LOCUS.
3421 * typeck.c (build_function_call): Remove dead code.
3423 2004-03-08 Jason Merrill <jason@redhat.com>
3426 * decl.c (xref_tag): Remove attribute handling.
3427 * cp-tree.h: Adjust prototype.
3428 * decl.c, parser.c, rtti.c: Adjust callers.
3429 * parser.c (cp_parser_class_head): Pass back attributes in the
3431 (cp_parser_class_specifier): Adjust.
3433 2004-03-08 Matt Austern <austern@apple.com>
3436 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3437 as static, to static_decls array.
3439 2004-03-05 Jason Merrill <jason@redhat.com>
3441 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3443 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3445 * decl.c (grokfndecl): Update old incorrect comment.
3446 (grokvardecl): Diagnose C++ variables of type with no linkage.
3448 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3451 * pt.c (build_non_dependent_expr): Do not create a
3452 NON_DEPENDENT_EXPR for a THROW_EXPR.
3454 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3457 * error.c (dump_expr): Handle THROW_EXPR.
3459 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3462 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3463 lookup if ordinary name-lookup finds a non-function.
3464 * pt.c (tsubst_copy_and_build): Likewise.
3467 * parser.c (cp_parser_late_parsing_default_args): Check that there
3468 are no extra tokens after the end of the default-argument
3471 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3474 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3475 having C++ linkage for name-mangling purposes.
3478 * parser.c (cp_parser_direct_declarator): Recognize constructor
3479 declarators that use a template-id to name the class being
3483 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3484 (tsubst_expr): Do not call tsubst_copy, even when
3485 processing_template_decl.
3487 2004-03-01 Jeff Law <law@redhat.com>
3489 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3492 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3495 * name-lookup.h (push_scope): Change prototype.
3496 * name-lookup.c (push_scope): Do not reenter the current class
3498 * decl.c (grokfndecl): Check return code from push_scope before
3500 * decl2.c (check_classfn): Likewise.
3501 * parser.c (cp_parser_conversion_function_id): Likewise.
3502 (cp_parser_init_declarator): Likewise.
3503 (cp_parser_direct_declarator): Likewise.
3504 (cp_parser_class_specifier): Likewise.
3505 (cp_parser_class_head): Likewise.
3506 (cp_parser_lookup_name): Likewise.
3507 (cp_parser_constructor_declarator_p): Likewise.
3508 * pt.c (instantiate_class_template): Likewise.
3509 (resolve_typename_type): Likewise.
3511 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3514 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3518 * class.c (update_vtable_entry_for_fn): Do not go through
3519 covariance machinery if the type returned by an overrider is the
3520 same as the original.
3522 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3524 * call.c: Fix a comment typo.
3526 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3528 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3530 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3533 * parser.c (cp_parser_parameter_declaration_list): Commit
3534 to fewer tentative parses.
3536 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3539 * pt.c (dependent_type_p_r): A template template parameter is a
3542 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3545 * mangle.c (write_template_arg_literal): Don't rely on identity for
3548 2004-02-24 Jason Merrill <jason@redhat.com>
3550 * tree.c (build_exception_variant): Use check_qualified_type.
3552 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3553 Kazu Hirata <kazu@cs.umass.edu>
3555 * decl.c (cxx_init_decl_processing): Don't check
3556 flag_writable_strings.
3558 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3561 * typeck.c (maybe_warn_about_returning_address_of_location):
3562 Change check for VAR_DECL to use DECL_P instead.
3564 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3567 * cvt.c (build_expr_type_conversion): Type must be complete before
3568 looking up for conversions.
3570 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3573 * name-lookup.c (arg_assoc_class): Don't look into template
3574 arguments if it is not a primary template.
3576 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3579 * method.c (use_thunk): Always clone function argument tree.
3581 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3584 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3587 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3588 for all type variants.
3590 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3593 * decl.c (duplicate_decls): Return error_mark_node for invalid
3595 * name-lookup.c (push_namespace): Ignore the return value from
3597 * pt.c (push_template_decl_real): Robustify.
3600 * name-lookup.c (push_class_level_binding): Do not complain about
3601 adding a binding for a member whose name is the same as the
3602 enclosing class if the member is located in a base class of the
3605 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3608 * parser.c (cp_parser_new_expression): Parse an ill-formed
3609 direct-new-declarator after a parenthesized type-id to emit good
3612 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3614 * cp-tree.def, cvt.c: Update copyright.
3616 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3619 * cp-tree.h (abi_version_at_least): Remove.
3620 * mangle.c: Include flags.h.
3622 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3625 * call.c (build_conditional_expr): Handle conversions between
3626 class types which result in differently cv-qualified type
3630 * class.c (delete_duplicate_fields_1): Remove.
3631 (delete_duplicate_fields): Likewise.
3632 (finish_struct_anon): Remove check for members with the same name
3633 as their enclosing class.
3634 (check_field_decls): Do not call duplicate_fields.
3635 * decl.c (grokdeclarator): Remove check for static data members
3636 with the same name as their enclosing class.
3637 * name-lookup.c (push_class_level_binding): Check for members with
3638 the same name as their enclosing class.
3640 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3643 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3645 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3648 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3649 has full set of arguments.
3651 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3654 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3656 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3659 * cp-tree.h (delete_sanity): Change prototype.
3660 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3661 Remove dead code. Adjust code to warn about deleting an array.
3662 * typekc.c (decay_conversion): Use build_address and build_nop.
3665 * search.c (accessible_p): Do not check access in thunks.
3668 * call.c (build_conditional_expr): Call force_rvalue on the
3669 non-void operand in the case that one result is a throw-expression
3670 and the other is not.
3672 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3675 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3676 the type name and look ahead for ::~, and bail out early with a
3677 better error message if the parse is going to fail.
3679 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3681 * call.c (conversion_kind): New type.
3682 (conversion_rank): Likewise.
3683 (conversion): Likewise.
3684 (CONVERSION_RANK): New macro.
3685 (conversion_obstack): New variable.
3686 (obstack_initialized): Likewise.
3687 (z_candidate): Change type of convs and second_conv.
3688 (candidate_warning): New type.
3689 (IDENTITY_RANK): Remove.
3690 (EXACT_RANK): Likewise.
3691 (PROMO_RANK): Likewise.
3692 (STD_RANK): Likewise.
3693 (PBOOL_RANK): Likewise.
3694 (USER_RANK): Likewise.
3695 (ELLIPSIS_RANK): Likewise.
3696 (BAD_RANK): Likewise.
3697 (ICS_RANK): Likewise.
3698 (ICS_STD_RANK): Likewise.
3699 (ICS_USER_FLAG): Likewise.
3700 (ICS_ELLIPSIS_FLAG): Likewise.
3701 (ICS_THIS_FLAG): Likewise.
3702 (ICS_BAD_FLAG): Likewise.
3703 (NEED_TEMPORARY_P): Likewise.
3704 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3705 (USER_CONV_CAND): Likewise.
3706 (USER_CONV_FN): Likewise.
3707 (conversion_obstack_alloc): New function.
3708 (alloc_conversion): Likewise.
3709 (validate_conversion_obstack): Likewise.
3710 (alloc_conversions): Likewise.
3711 (build_conv): Adjust to deal with new conversion data structures.
3712 (build_identity_conv): New function.
3713 (build_ambiguous_conv): Likewise.
3714 (standard_conversion): Adjust to deal with new conversion data
3716 (convert_class_to_reference): Likewise.
3717 (direct_reference_binding): Likewise.
3718 (reference_binding): Likewise.
3719 (implicit_conversion): Likewise.
3720 (add_candidate): Likewise.
3721 (add_function_candidate): Likewise.
3722 (add_conv_candidate): Likewise.
3723 (build_builtin_candidate): Likewise.
3724 (print_z_candidate): Likewise.
3725 (merge_conversion_sequences): Likewise.
3726 (build_user_type_conversion_1): Likewise.
3727 (build_user_type_conversion): Likewise.
3728 (build_new_function_call): Likewise.
3729 (build_object_call): Likewise.
3730 (conditional_conversion): Likewise.
3731 (build_conditional_expr): Likewise.
3732 (build_new_op): Likewise.
3733 (build_op_delete_call): Likewise.
3734 (convert_like_real): Likewise.
3735 (build_over_call): Likewise.
3736 (build_new_method_call): Likewise.
3737 (is_subseq): Likewise.
3738 (maybe_handle_implicit_object): Likewise.
3739 (maybe_handle_ref_bind): Likewise.
3740 (compare_ics): Likewise.
3741 (source_type): Likewise.
3742 (add_warning): Likewise.
3744 (can_convert_arg): Likewise.
3745 (can_convert_arg_bad): Likewise.
3746 (perform_implicit_conversion): Likewise.
3747 (perform_direct_initialization_if_possible): Likewise.
3748 (initialize_reference): Likewise.
3749 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3750 * cp-tree.def (WRAPPER): Likewise.
3751 (IDENTITY_CONV): Remove.
3752 (LVALUE_CONV): Likewise.
3753 (QUAL_CONV): Likewise.
3754 (STD_CONV): Likewise.
3755 (PTR_CONV): Likewise.
3756 (PMEM_CONV): Likewise.
3757 (BASE_CONV): Likewise.
3758 (REF_BIND): Likewise.
3759 (USER_CONV): Likewise.
3760 (AMBIG_CONV): Likewise.
3761 (RVALUE_CONV): Likewise.
3762 * cp-tree.h (tree_wrapper): Remove.
3763 (WRAPPER_ZC): Remove.
3764 (lang_tree_node): Remove wrapper.
3765 (LOOKUP_SPECULATIVELY): Remove.
3766 (build_op_delete_call): Adjust prototype.
3767 (validate_conversion_obstack): Declare.
3768 (build_zc_wrapper): Remove.
3769 * cvt.c (convert_to_reference): Remove dead code.
3770 (ocp_convert): Likewise.
3771 * decl.c (redeclaration_error_message): Correct handling of
3773 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3774 (cp_tree_node_structure): Remove WRAPPER case.
3775 * decl2.c (finish_file): Call validate_conversion_obstack.
3776 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3777 (build_op_delete_call): Likewise.
3778 (build_x_delete): Likewise.
3779 (build_delete): Adjust call to build_op_delete_call.
3780 * pt.c (tsubst_friend_declaration): Adjust code to determine
3781 whether or not a friend template is a definition.
3782 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3783 * tree.c (build_zc_wrapper): Remove.
3785 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3787 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3788 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3789 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3790 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3792 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3794 * typeck.c (lookup_destructor): Fix typo in error message.
3796 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3798 * call.c, parser.c, tree.c: Fix comment typos.
3800 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3803 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3804 * decl.c (duplicate_decls, start_function): Likewise.
3806 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3808 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3809 * parser.c (free_parser_stacks): Delete.
3811 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3813 * rtti.c: Update copyright.
3815 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3818 * decl.c (require_complete_types_for_parms): Do not insert
3819 error_mark_node in the parameter list.
3821 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3824 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3825 error when terminator can not be found.
3827 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3829 Make-lang.in (po-generated): Delete.
3831 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3833 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3834 targetm.calls.promote_prototypes.
3836 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3840 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3842 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3843 (handle_pragma_implementation): Likewise.
3845 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3848 * typeck.c (lookup_destructor): Tweak error message.
3850 2004-02-05 Jan Hubicka <jh@suse.cz>
3852 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3855 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3858 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3859 code, only emits the diagnostic now. Added lookup of the identifier
3860 and support for qualified ids.
3861 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3862 Parse an (invalid) type name as id-expression within a declarator.
3863 (cp_parser_simple_declaration): Use it.
3864 (cp_parser_member_declaration): Likewise.
3865 (cp_parser_make_typename_type): New function. Handle errors through
3866 cp_parser_diagnose_invalid_typename.
3867 (cp_parser_elaborated_type_specifier): Use it.
3869 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3872 * call.c (convert_like_real): Use "converting" rather than
3873 "argument" as the descriptive keyword to
3874 dubious_conversion_warnings.
3875 * typeck.c (convert_for_assignment): Do not call
3876 dubious_conversion_warnings.
3878 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3881 * init.c (build_delete): Emit a more informative error message in
3882 case of an incomplete type, and on the correct source line.
3884 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3886 * error.c, search.c: Update copyright.
3888 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3891 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3892 linkage for the typeinfo name string.
3894 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3897 * cp-tree.h (fold_non_dependent_expr): New function.
3898 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3899 (cp_parser_template_argument): Use fold_non_dependent_expr.
3900 (cp_parser_direct_declarator): Likewise.
3901 * pt.c (fold_non_dependent_expr): New function.
3902 (convert_nontype_argument): Use it.
3903 (tsubst_qualified_id): Simplify.
3904 (tsubst_copy_and_build): Likewise.
3906 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3908 * decl.c (cxx_push_function_context): Do not set
3909 current_function_is_thunk.
3910 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3913 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3916 * pt.c (more_specialized_class): Increase processing_template_decl
3917 while partial ordering.
3919 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3922 * decl.c (start_function): Do not call pushdecl for any
3923 instantiation or specialization of a primary template.
3925 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3928 * parser.c (cp_parser_class_name): Robustify.
3931 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3934 * semantics.c (finish_id_expression): Do not return an
3935 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3937 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3940 * pt.c (build_non_dependent_expr): Do not build
3941 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3944 * semantics.c (finish_id_expression): Do not return an
3945 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3948 * parser.c (cp_parser_simple_declaration): When skipping to the
3949 end of the statement swallow the terminating semicolon.
3951 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3954 * init.c (build_offset_ref): Improve error recovery for invalid
3955 uses of non-static member functions.
3958 * cp-tree.h (cp_build_type_attribute_variant): New function.
3959 * class.c (build_clone): Use cp_build_type_attribute_variant.
3960 * decl.c (duplicate_decls): Likewise.
3961 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3962 (tsubst_function_type): Likewise.
3963 * tree.c (build_exception_variant): Check attributes before
3964 concluding that two types are the same.
3965 (cp_build_type-attribute_variant): New method.
3966 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3969 * call.c (convert_class_to_reference): Keep better track of
3970 pedantically invalid user-defined conversions.
3972 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3975 * pt.c (tsubst_qualified_id): Improved error message when a type
3976 is expected but not found.
3978 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3980 * class.c: Fix comment typos.
3982 * error.c: Likewise.
3983 * parser.c: Likewise.
3985 * search.c: Likewise.
3986 * typeck.c: Likewise.
3988 2004-01-30 Richard Henderson <rth@redhat.com>
3991 * method.c (use_thunk): Don't force_target_expr for void thunks.
3992 * tree.c (build_target_expr_with_type): Assert non-void type.
3993 (force_target_expr): Likewise.
3995 2004-01-30 Michael Matz <matz@suse.de>
3997 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3999 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4003 * decl.c (grokdeclarator): Check immediatly type completeness for
4004 non-dependent types.
4006 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4009 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
4010 a sizeof expression.block
4012 2004-01-29 Mark Mitchell <mark@codesourcery.com>
4015 * mangle.c (write_encoding): Correct encoding of member template
4018 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4020 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
4021 template name as it was `<::' (digraph typo).
4022 (cp_parser_nth_token_starts_template_argument_list_p): New function.
4023 (cp_parser_id_expression): Use it.
4024 (cp_parser_nested_name_specifier_opt): Likewise.
4025 (cp_parser_template_name): Likewise.
4026 (cp_parser_class_name): Likewise.
4027 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
4029 2004-01-28 Mark Mitchell <mark@codesourcery.com>
4032 * typeck.c (merge_types): Do not merge attributes into
4036 * parser.c (cp_parser_direct_declarator): Do not prevent
4037 backtracking inside a parenthesized declarator.
4038 (cp_parser_parameter_declaration): Fix typo in comment.
4040 2004-01-28 Jan Hubicka <jh@suse.cz>
4042 * semantics.c (expand_body) Do emit_associated_thunks before
4045 2004-01-27 Devang Patel <dpatel@apple.com>
4047 * name-lookup.c: Include "debug.h"
4048 (do_namespace_alias): Invoke debug_hooks to emit debug info
4049 for namespace alias.
4050 (do_local_using_decl): Invoke debug_hooks to emit debug info
4052 (do_class_using_decl): Same.
4053 (do_toplevel_using_decl): Same.
4054 (do_using_directive): Same.
4055 (cp_emit_debug_info_for_using): New function.
4056 * Make-lang.in (cp/parser.o): Depend on debug.h
4057 (cp/name-lookup.o): Same.
4059 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4061 * cp-tree.h (language_function, lang_type_header): Use
4063 * name-lookup.h (cp_binding_level): Likewise.
4065 2004-01-26 Mark Mitchell <mark@codesourcery.com>
4068 * semantics.c (finish_for_expr): Check for unresolved overloaded
4071 * class.c (add_method): Just check processing_template_decl to
4072 determine whether or not we are within a template.
4073 * decl2.c (maybe_retrofit_in_chrg): Likewise.
4074 * init.c (decl_constant_value): Check the type of the declaration,
4076 * name-lookup.c (maybe_push_to_top_level): Rename to ...
4077 (push_to_top_level): ... this.
4078 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
4079 * pt.c (push_template_decl_real): Reorder condition for speed.
4080 (convert_template_argument): Use dependency-checking functions in
4081 place of uses_template_parms.
4082 (lookup_template_class): Avoid calling uses_template_parms more
4084 (uses_template_parms): Reimplement, using dependency-checking
4086 (instantiate_class_template): Use push_to_top_level, not
4087 maybe_push_to_top_level.
4088 (type_unification_real): Simplify.
4089 (type_dependent_expression_p): Handle OFFSET_REFs and
4091 (any_dependent_template_arguments_p): Handle multiple levels of
4093 * semantics.c (expand_or_defer_fn): Do not check
4094 uses_template_parms for template instantiations.
4095 * typeck.c (comptypes): Avoid calling cp_type_quals.
4097 2004-01-25 Mark Mitchell <mark@codesourcery.com>
4100 * call.c (build_over_call): Do not convert arguments when
4101 processing a template.
4102 * pt.c (build_non_dependent_expr): Do not build a
4103 NON_DEPENDENT_EXPR for arithmetic constants.
4105 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4108 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
4109 returns a TYPE_DECL. no further lookup is required.
4110 * semantics.c (check_template_template_default_arg): A TYPE_DECL
4111 is invalid. Rework to give better diagnostics.
4113 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4116 * pt.c (instantiate_class_template): Add an error_mark_node
4118 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4120 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4123 * decl.c (finish_function): Move the call to
4124 finish_fname_decls below the call to
4125 finish_eh_spec_block.
4127 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4129 * optimize.c, typeck2.c: Update copyright.
4131 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4133 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4134 init.c, mangle.c, typeck.c: Update copyright.
4136 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4138 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4140 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4142 * Make-lang.in: Replace $(docdir) with doc.
4143 (c++.info, c++.srcinfo): Dummy entry.
4144 (c++.man, c++.srcman): New rules.
4145 (c++.install-man): Revamp rule.
4147 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4149 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4150 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4151 immediate $(shell) instead of deferred backquote.
4153 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4156 * parser.c (cp_parser_postfix_expression): When encountering
4157 incomplete type on left-hand side of "->" or ".", treat the entire
4158 expression as erroneous.
4161 * call.c (build_field_call): Remove.
4162 (n_build_method_call): Likewise.
4163 (build_method_call): Likewise.
4164 (build_new_method_call): Do not call build_field_call.
4165 * class.c (n_build_method_call): Remove.
4166 (print_class_statistics): Do not print it.
4167 * cp-tree.h (build_method_call): Remove declaration.
4168 (finish_object_call_expr): Likewise.
4169 (build_new_1): Do not use build_method_call.
4170 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4171 when the function appearing on the right-hand-side of "." or "->"
4172 is not actually a function.
4173 * pt.c (tsubst_copy_and_build): Likewise.
4174 * semantics.c (finish_object_call_expr): Remove.
4176 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4179 * pt.c (tsubst): Use finish_typeof.
4181 2004-01-18 Jason Merrill <jason@redhat.com>
4184 * except.c (build_throw): In a template, set
4185 current_function_returns_abnormally.
4187 2004-01-17 Fred Fish <fnf@intrinsity.com>
4190 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4191 except don't call array_type_nelts() with a VECTOR_TYPE.
4193 2004-01-16 Jan Hubicka <jh@suse.cz>
4195 * mangle.c (write_mangled_name): Remove inline modifier.
4197 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4200 * decl.c (compute_array_index_type): Fix grammar in comment.
4201 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4204 * call.c (name_as_c_string): Print conversion operator names
4208 * call.c (initialize_reference): Pass -1 for inner parameter to
4211 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4214 * parser.c (cp_parser_base_specifier): Check for an invalid
4215 keyword `typename' and emit an user-friendly error message.
4217 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4220 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4221 (handle_pragma_implementation): Likewise.
4223 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4226 * typeck.c (build_class_member_access_expr): Allow to access members
4227 of the currently open class.
4228 (finish_class_member_access_expr): Likewise.
4230 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4233 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4234 name by value, instead of computing them.
4235 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4236 arguments. Pass them to validate_nonmember_using_decl.
4237 * name-lookup.h (do_local_using_decl): Adjust.
4238 (do_toplevel_using_decl): Likewise.
4239 * parser.c (cp_parser_using_declaration): Likewise.
4240 * pt.c (tsubst_expr): Likewise.
4242 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4246 * name-lookup.c (qualified_lookup_using_namespace): Search
4247 strongly-associated namespaces first, and only then try other
4250 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4252 * Make-lang.in (c++.srcextra): Dummy entry.
4254 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4257 * parser.c (cp_parser_template_name): Don't try to parse a
4258 conversion-function-id, as it cannot be a template-name.
4259 (cp_parser_simple_type_specifier): Check for invalid template-ids
4260 even after a built-in type.
4262 2004-01-14 Jan Hubicka <jh@suse.cz>
4265 * pt.c (instantiate_decl): Do not increase function_depth.
4267 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4271 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4272 attributes and discard.
4273 * decl.c (xref_tag): Don't overwite existing attributes with
4276 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4279 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4280 is no destructor while looking up a BIT_NOT_EXPR.
4282 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4284 * cxxfilt.c: Remove unused file.
4286 2004-01-14 Jan Hubicka <jh@suse.cz>
4288 Partial fix to PR c++/12850
4289 * decl2.c (mark_used): Do not proactively instantiate templates
4290 when compiling in unit-at-a-time or not optimizing.
4291 * optimize.c (maybe_clone_body): Do not increase function depth.
4293 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4296 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4298 2004-01-12 Steven Bosscher <stevenb@suse.de>
4301 * parser.c (cp_parser_member_declaration): Any non-type is also
4302 not a class or a function.
4304 2004-01-12 Jason Merrill <jason@redhat.com>
4307 * class.c (build_base_path): Do not mark vtable references as
4309 (build_vtbl_ref_1): Likewise.
4311 2004-01-12 Richard Henderson <rth@redhat.com>
4314 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4315 (store_init_value): Use it.
4316 * decl.c (check_initializer): Expect full initialization code
4317 from store_init_value.
4318 * init.c (expand_aggr_init_1): Likewise.
4319 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4321 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4323 * class.c (layout_class_type): For non-POD class types, also copy
4324 the DECL_SIZE and DECL_MODE of fields to the base class type.
4326 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4329 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4330 calling regenerate_decl_from_template.
4332 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4335 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4336 decl-specifier occurring along with a class definition.
4338 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4340 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4341 clauses to comments describing declares_class_or_enum.
4342 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4345 2004-01-12 Jan Hubicka <jh@suse.cz>
4347 * pt.c (for_each_template_parm): Do not check for duplicates.
4348 (for_each_template_parm): Use walk_tree duplicate checking code.
4350 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4353 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4354 is error_mark_node, don't add any more decl_specs.
4355 (cp_parser_init_declarator): After committing to a declaration, if
4356 the decl_specifiers start with error_mark_node, issue an error and
4357 change the type to "int".
4359 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4362 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4364 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4368 * pt.c (tsubst): Substitution must fail if we are attempting to
4369 create an array with element type that is an abstract class type.
4370 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4371 before calling abstract_virtuals_error.
4373 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4375 * name-lookup.c (qualified_lookup_using_namespace): Consider
4376 strong using directives even if we've already found a binding.
4378 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4380 * cp-tree.h (cxx_expand_expr): Change prototype.
4381 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4383 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4386 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4387 looking into them recursively. They can be there because of the
4388 new __offsetof__ extension.
4390 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4392 * parser.c (cp_parser_save_member_function_body): Mark the
4395 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4398 * class.c (build_clone): Copy type attributes from the original
4399 function to the clone.
4402 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4403 references as constant.
4406 * parser.c (cp_parser_explicit_instantiation): Improve error
4408 (cp_parser_require): Improve indication of the error location.
4411 * parser.c (cp_parser_class_head): Reorder logic to check for
4412 invalid qualification.
4414 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4417 * name-lookup.c (lookup_using_namespace): Remove spacesp
4419 (unqualified_namespace_lookup): Likewise.
4420 (lookup_qualified_name): Adjust accordingly.
4421 (lookup_name_real): Likewise.
4422 (lookup_arg_dependent): Do not eliminate the namespace of the
4423 functions found by unqualified name lookup unless that is the
4426 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4428 * semantics.c (push_deferring_access_checks): Fix format.
4429 (resume_deferring_access_checks): Likewise.
4430 (stop_deferring_access_checks): Likewise.
4431 (pop_deferring_access_checks): Likewise.
4432 (get_deferred_access_checks): Likewise.
4433 (pop_to_parent_deferring_access_checks): Likewise.
4434 (perform_deferred_access_checks): Likewise.
4435 (perform_or_defer_access_check): Likewise.
4437 2004-01-04 Richard Henderson <rth@redhat.com>
4439 * call.c (build_over_call): Don't create a save_expr of an
4440 aggregate, but rather its address.
4442 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4445 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4446 an offsetof expression.
4448 * parser.c (cp_parser_parameter_declaration): Fix comment.
4451 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4452 (reference_binding): Set it when appropriate.
4453 (build_temp): New function, split out from ...
4454 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4455 (initialize_reference): Likewise.
4458 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4459 (cp_parser_new): Initialize it.
4460 (cp_parser_postfix_expression): Set it.
4461 (cp_parser_sizeof_operand): Likewise.
4462 (cp_parser_parameteR_declaration): Do not commit early to tenative
4463 parsers when in_type_id_in_expr_p is set.
4465 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4468 * parser.c (cp_parser_template_argument): Don't call
4469 make_unbound_class_template directly.
4470 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4471 UNBOUND_CLASS_TEMPLATE tree node.
4473 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4476 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4478 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4481 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4482 (DECL_FUNCTION_TEMPLATE_P): Use it.
4483 (DECL_CLASS_TEMPLATE_P): Likewise.
4484 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4485 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4486 (cp_parser_template_name): Likewise.
4487 (cp_parser_elaborated_type_specifier): Likewise.
4488 (cp_parser_namespace_name): Likewise.
4489 (cp_parser_class_name): Likewise.
4490 (cp_parser_lookup_name_simple): Likewise.
4492 See ChangeLog.3 for earlier changes.