1 2004-08-27 Richard Henderson <rth@redhat.com>
3 * cp-tree.def (OFFSETOF_EXPR): New.
4 * parser.c (cp_parser_builtin_offsetof): Either built an
5 OFFSETOF_EXPR, or call fold_offsetof immediately.
6 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
8 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
10 * call.c (validate_conversion_obstack): Replace
11 my_friendly_assert with gcc_assert or gcc_unreachable.
12 (direct_reference_binding, merge_conversion_sequences,
13 build_user_type_conversion_1, perform_overload_resolution,
14 build_op_delete_call, enforce_access, call_builtin_trap,
15 build_over_call, build_special_member_call, build_new_method_call,
16 initialize_reference): Likewise.
17 * class.c (build_base_path, build_primary_vtable, alter_access,
18 check_bases, update_vtable_entry_for_fn, layout_empty_base,
19 clone_function_decl, adjust_clone_args,
20 type_requires_array_cookie, include_empty_classes,
21 finish_struct_1, resolve_address_of_overloaded_function,
22 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
23 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
24 accumulate_vtbl_inits, build_vtbl_initializer,
25 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
26 * cvt.c (build_up_reference, convert_to_reference): Likewise.
27 * decl.c (poplevel, duplicate_decls, make_typename_type,
28 cxx_init_decl_processing, reshape_init, check_initializer,
29 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
30 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
31 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
32 xref_basetypes, start_preparsed_function, save_function_data,
33 finish_function, finish_method, maybe_register_incomplete_var,
34 complete_vars): Likewise.
35 * decl2.c (grok_array_decl, check_member_template,
36 check_classfn, finish_static_data_member_decl, coerce_new_type,
37 coerce_delete_type, import_export_class, decl_needed_p,
38 determine_visibility, import_export_decl, build_cleanup,
39 start_static_initialization_or_destructi, do_static_destruction,
40 prune_vars_needing_no_initialization,
41 build_offset_ref_call_from_tree): Likewise.
42 * error.c (dump_decl, dump_expr): Likewise.
43 * init.c (finish_init_stmts, build_zero_init,
44 expand_virtual_init, expand_default_init, expand_aggr_init_1,
45 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
47 * mangle.c (write_method_parms, write_template_args,
48 write_expression, write_template_arg): Likewise.
49 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
50 * name-lookup.c (pop_binding, begin_scope, leave_scope,
51 resume_scope, push_using_decl, validate_nonmember_using_decl,
52 is_ancestor, poplevel_class, set_inherited_value_binding_p,
53 push_class_level_binding, do_class_using_decl, push_namespace,
54 pop_namespace, add_using_namespace, ambiguous_decl,
55 lookup_namespace_name, lookup_type_current_level,
56 maybe_process_template_type_declaration): Likewise.
57 * parser.c (cp_lexer_peek_nth_token,
58 cp_parser_parse_and_diagnose_invalid_typ,
59 cp_parser_translation_unit, cp_parser_template_id,
60 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
61 * pt.c (push_access_scope, finish_member_template_decl,
62 push_inline_template_parms_recursive, add_outermost_template_args,
63 get_innermost_template_args, begin_explicit_instantiation,
64 end_explicit_instantiation, retrieve_specialization,
65 is_specialization_of, is_specialization_of_friend,
66 register_specialization, check_explicit_specialization,
67 comp_template_parms, process_template_parm,
68 process_partial_specialization, convert_nontype_argument,
69 coerce_template_template_parms, coerce_template_parms,
70 mangle_class_name_for_template, lookup_template_function,
71 lookup_template_class, instantiate_class_template, tsubst_decl,
72 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
73 instantiate_template, fn_type_unification, type_unification_real,
74 get_template_base, regenerate_decl_from_template,
75 template_for_substitution, instantiate_decl,
76 get_mostly_instantiated_function_type, dependent_scope_ref_p,
77 value_dependent_expression_p, resolve_typename_type): Likewise.
78 * repo.c (repo_emit_p): Likewise.
79 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
80 create_tinfo_types, emit_tinfo_decl): Likewise.
81 * search.c (lookup_base_r, lookup_base, lookup_field_1,
82 dfs_access_in_type, build_baselink, lookup_member,
83 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
84 * semantics.c (perform_or_defer_access_check,
85 finish_non_static_data_member, finish_stmt_expr_expr,
86 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
87 finish_template_template_parm, finish_member_declaration,
88 emit_associated_thunks): Likewise.
89 * tree.c (build_target_expr_with_type, force_target_expr,
90 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
91 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
92 cxx_sizeof_or_alignof_type, perform_integral_promotions,
93 build_class_member_access_expr, finish_class_member_access_expr,
94 build_ptrmemfunc_access_expr, build_unary_op,
95 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
96 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
97 * typeck2.c (complete_type_check_abstract,
98 abstract_virtuals_error, process_init_constructor,
99 add_exception_specifier): Likewise.
101 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
103 * class.c (build_vtbl_initializer): Use ssize_int.
104 * decl.c (complete_array_type): Likewise.
105 * method.c (finish_thunk): Likewise.
106 * search.c (get_dynamic_base_type): Likewise.
108 2004-08-26 Richard Henderson <rth@redhat.com>
110 * cp-tree.h (DECL_FIELD_IS_BASE): New.
111 * class.c (build_base_field): Set it.
112 (build_simple_base_path): Use it.
113 (fixed_type_or_null): Don't consider base fields definitive.
115 2004-08-25 Roger Sayle <roger@eyesopen.com>
118 PR tree-optimization/16372
119 * decl.c (finish_enum): Make the precision of the enumerated type
120 the same width as the underlying integer type.
122 2004-08-25 Mark Mitchell <mark@codesourcery.com>
125 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
128 * mangle.c (get_identifier_nocopy): Add cast.
130 * cp-tree.h (mangle_type): Remove.
131 * mangle.c (globals): GTY it.
132 (mangle_obstack): New variable.
133 (name_obstack): Likewise.
134 (name_base): Likewise.
135 (write_char): Adjust accordingly.
136 (write_chars): Likewise.
137 (write_string): Likewise.
138 (start_mangling): Initialize G.substitutions only one. Add
140 (finish_mangling): Use VARRAY_CLEAR to reclaim
141 storage in G.substitutions. Use obstack_finish.
142 (init_mangle): Adjust for changes to variable names above.
143 Initialize G.substitutions.
144 (mangle_decl_string): Adjust call to start_mangling.
145 (get_identifier_nocopy): New function.
146 (mangle_decl): Use it.
147 (mangle_type_string): Adjust call to start_mangling.
148 (mangle_special_for_type): Likewise.
149 (mangle_vtt_for_type): Likewise.
150 (mangle_ctor_vtbl_for_type): Likewise.
151 (mangle_thunk): Likewise.
152 (mangle_guard_variable): Likewise.
153 (mangle_ref_init_variable): Likewise.
155 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
158 * pt.c (redeclare_class_template): Check the type of non-type and
159 template template parameter.
161 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
164 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
165 (build_user_type_conversion_1, convert_like_real,
166 build_java_interface_fn_ref, build_special_member_call): Likewise.
167 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
168 * cp-gimplify.c (cp_gimplify_expr): Likewise.
169 * cvt.c (cp_convert_to_pointer): Likewise.
170 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
171 * decl2.c (start_static_initialization_or_destruction,
172 generate_ctor_or_dtor_function): Likewise.
173 * except.c (build_throw): Likewise.
174 * mangle.c (write_integer_cst): Likewise.
175 * method.c (finish_thunk): Likewise.
176 * rtti.c (build_headof, get_tinfo_decl_dynamic,
177 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
178 get_pseudo_ti_init): Likewise.
179 * search.c (get_dynamic_cast_base_type): Likewise.
181 2004-08-25 Zack Weinberg <zack@codesourcery.com>
183 * class.c, search.c: Remove references to DWARF_DEBUG.
185 2004-08-25 Adam Nemet <anemet@lnxw.com>
187 * repo.c (extract_string): Reset backquote after one character.
188 (get_base_filename): Fix indentation.
189 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
191 * decl.c (cxx_init_decl_processing): Adjust
192 build_common_tree_nodes call.
194 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
197 * (is_subobject_of_p): Resurrect & optimize.
198 (lookup_field_r): Use it.
200 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
203 * search.c (friend_accessible_p): Increment processing_template_decl
204 when deal with TEMPLATE_DECL of SCOPE.
206 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
209 * semantics.c (check_accessibility_of_qualified_id): Defer check
210 if qualifying_type is a template parameter.
212 2004-08-23 Mark Mitchell <mark@codesourcery.com>
215 * pt.c (instantiate_decl): Do not try to apply
216 DECL_DECLARED_INLINED_P to a VAR_DECL.
218 * search.c (build_baselink): Fix typo in comment.
220 2004-08-22 Andrew Pinski <apinski@apple.com>
223 2004-08-22 Andrew Pinski <apinski@apple.com>
225 * typeck.c (build_unary_op): Use &a.b if the folded lowered
226 expression is not constant.
228 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
230 * name-lookup.c (pushdecl): Rename build_type_copy call.
231 * tree.c (cp_build_qualified_type_real,
232 build_exception_variant, handle_java_interface_attribute): Likewise.
234 2004-08-22 Andrew Pinski <apinski@apple.com>
237 * typeck.c (build_unary_op): Use &a.b if the folded lowered
238 expression is not constant.
240 2004-08-20 Mark Mitchell <mark@codesourcery.com>
243 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
245 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
248 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
251 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
253 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
254 before calling comp_template_args.
256 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
258 * class.c (build_vtbl_initializer): Use build_int_cst for
260 * decl.c (complete_array_type): Likewise.
261 * method.c (finish_thunk): Likewise.
263 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
265 * tree.c: Remove unused mark_local_for_remap_r.
267 2004-08-19 Eric Christopher <echristo@redhat.com>
269 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
270 * tree.c (cxx_unsave_expr_now): Delete.
271 (cp_unsave_r): Ditto.
273 2004-08-19 Mark Mitchell <mark@codesourcery.com>
276 * pt.c (push_template_decl_real): Disallow template allocation
277 functions with fewer than two parameters.
279 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
281 * cp-tree.h (build_shared_int_cst): Remove.
282 * tree.c (shared_int_cache): Remove.
283 (build_shared_int_cst): Remove.
284 * class.c (finish_struct_1): Use build_int_cst.
286 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
288 * decl.c (finish_enum): Do not copy value node early, copy
290 * lex.c (cxx_init): Force null_node to be unique.
292 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
295 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
296 from input for MODOP_EXPR.
298 2004-08-18 Mark Mitchell <mark@codesourcery.com>
300 * pt.c (dependent_template_p): Fix typo in commment.
303 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
306 2004-08-17 Mark Mitchell <mark@codesourcery.com>
309 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
310 arguments have the same type as the corresponding parameter.
313 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
314 is set use it for diagnostic purposes.
315 (cp_parser_pseudo_destructor_name): Remove special-case error
319 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
322 * cp-tree.h (qualified_name_lookup_error): Add parameter.
323 * name-lookup.c (do_class_using_decl): Restrict set of entities
324 passed to cp_emit_debug_info_for_using more carefully.
325 (lookup_qualified_name): Allow lookup_member to return sets of
327 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
328 (cp_parser_primary_expression): Handle ambiguous lookups.
329 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
330 (cp_parser_template_argument): Likewise.
331 (cp_parser_elaborate_type_specifier): Likewise.
332 (cp_parser_namespace_name): Likewise.
333 (cp_parser_class_name): Likewise.
334 (cp_parser_lookup_name_simple): Likewise.
335 * pt.c (tsubst_qualified_id): Handle ambiguous results.
336 (tsubst_expr): Likewise.
337 * semantics.c (qualified_name_lookup_error): Add decl paramter.
338 For ambiguous lookups, print candidates.
340 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
343 * pt.c (instantiate_pending_templates): Add int parameter. Don't
345 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
346 * decl2.c (finish_file): Adjust call to
347 instantiate_pending_templates.
349 2004-08-15 Roger Sayle <roger@eyesopen.com>
351 * call.c (build_vfield_ref, build_call, build_conditional_expr,
352 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
353 build_java_interface_fn_ref, build_special_member_call,
354 build_new_method_call, initialize_reference): Replace calls to
355 build with calls to buildN.
356 * class.c (build_base_path, convert_to_base_statically,
357 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
358 build_vtbl_initializer): Likewise.
359 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
360 gimplify_if_stmt, cp_genericize_r): Likewise.
361 * cvt.c (convert_to_void): Likewise.
362 * decl.c (check_initializer, finish_constructor_body,
363 finish_destructor_body): Likewise.
364 * error.c (dump_expr): Likewise.
365 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
367 * init.c (perform_member_init, expand_virtual_init,
368 expand_cleanup_for_base, build_init, expand_default_init,
369 build_offset_ref, decl_constant_value, build_new, build_new_1,
370 build_vec_delete_1, build_vec_init, build_delete,
371 push_base_cleanups, build_vec_delete): Likewise.
372 * mangle.c (write_integer_cst): Likewise.
373 * method.c (thunk_adjust, do_build_copy_constructor,
374 do_build_assign_ref): Likewise.
375 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
376 unify, build_non_dependent_expr): Likewise.
377 * rtti.c (build_headof, build_typeid, ifnonnull,
378 build_dyanmic_cast_1, tinfo_base_init): Likewise.
379 * semantics.c (begin_compound_stmt, finish_call_expr,
380 finish_pseudo_destructor_expr, finish_id_expression,
381 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
382 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
383 array_type_nelts_total, stabilize_call): Likewise.
384 * typeck.c (decay_conversion, build_class_member_access_expr,
385 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
386 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
387 build_x_unary_op, build_unary_op, unary_complex_lvalue,
388 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
389 check_return_expr): Likewise.
390 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
391 split_nonconstant_init, store_init_value, build_m_component_ref):
394 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
396 * call.c (convert_class_to_reference,
397 build_user_type_conversion_1, convert_like_real,
398 build_java_interface_fn_ref, build_special_member_call): Use
400 * class.c (build_vtbl_initializer): Likewise.
401 * cp-gimplify.c (cp_gimplify_expr): Likewise.
402 * cvt.c (cp_convert_to_pointer): Likewise.
403 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
404 * decl2.c (start_static_initialization_or_destruction,
405 generate_ctor_or_dtor_function): Likewise.
406 * except.c (build_throw): Likewise.
407 * lex.c (cxx_init): Likewise.
408 * mangle.c (write_integer_cst): Likewise.
409 * rtti.c (build_headof, get_tinfo_decl_dynamic,
410 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
411 get_pseudo_ti_init): Likewise.
412 * search.c (get_dynamic_cast_base_type): Likewise.
413 * tree.c (build_shared_int_cst): Likewise.
415 2004-08-12 Mark Mitchell <mark@codesourcery.com>
418 * class.c (count_depth_data): New type.
419 (dfs_depth_post): New function.
420 (dfs_depth_q): Likewise.
421 (find_final_overrider_data_s): Change type of vpath.
423 (dfs_find_final_overrider_1): New function.
424 (dfs_find_final_overrider): Use it.
425 (dfs_find_final_overrider_q): Adjust use of vpath.
426 (dfs_find_final_overrider_post): Likewise.
427 (find_final_overrider): Use dfs_depth. Allocate and deallocate
430 2004-08-12 Jan Beulich <jbeulich@novell.com>
432 * parser.c (cp_parser_asm_definition): Properly consume scope operator
433 tokens preceding the clobbers. Don't check for scope operator
434 following inputs. Simplify inputs handling to match that now used for
437 2004-08-11 Mark Mitchell <mark@codesourcery.com>
440 * except.c (build_throw): Allocate cleanup_type and the function
441 for __cxa_throw separately.
444 * call.c (standard_conversion): Do not accept conversions between
445 pointers to members if the class types are unrelated.
448 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
449 char &" instead of just "char &".
452 * pt.c (tsubst): Just return the unknown_type_node.
454 2004-08-11 Mark Mitchell <mark@codesourcery.com>
457 * parser.c (cp_parser_class_specifier): Robustify.
460 * pt.c (tsubst_copy_and_build): Complain about invalid
464 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
465 current_class_ref while tsubsting.
467 2004-08-10 Mark Mitchell <mark@codesourcery.com>
470 * parser.c (cp_parser_init_declarator): Robustify.
472 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
474 * typeck2.c (process_init_constructor): Guard the missing field warning
475 with warn_missing_field_initializers rather than extra_warnings.
477 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
479 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
481 2004-08-05 Mark Mitchell <mark@codesourcery.com>
483 * decl.c (start_preparsed_function): Move determine_visibility
485 * decl2.c (determine_visibility): Incorporate dllexport testing.
487 2004-08-05 Geoffrey Keating <geoffk@apple.com>
489 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
490 means that libstdc++ is needed.
492 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
494 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
496 2004-08-04 Geoffrey Keating <geoffk@apple.com>
498 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
499 than passing it as a parameter to rest_of_decl_compilation.
500 * decl2.c (grokfield): Use set_user_assembler_name.
502 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
504 * decl.c (complete_array_type): Don't gratuitously copy
505 maxindex. Its type is always set.
507 2004-08-04 Paul Brook <paul@codesourcery.com>
509 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
510 * cp-tree.h (struct language_function): Rename x_dtor_label to
512 (dtor_label): Rename ...
513 (cdtor_label): ... to this.
514 * decl.c (begin_constructor_body): Remove.
515 (check_special_function_return_type): Maybe change the return type.
516 (grokdeclarator): Pass the class type.
517 (start_preparsed_function): Constructors may need a return label.
518 (finish_constructor_body, finish_destructor_body): Set the return
520 (begin_function_body): Don't call begin_constructor_body.
521 (finish_function): Don't warn for constructors or destructors.
522 (implicitly_declare_fn): Maybe change the return type.
523 * optimize.c: Include target.h.
524 (maybe_clone_body): Remap the function result.
525 * semantics.c: Include target.h.
526 (finish_return_stmt): Maybe jump to return label for constructors.
528 2004-08-03 Mark Mitchell <mark@codesourcery.com>
530 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
531 (check_field_decls): Or here.
532 (check_methods): Or here.
533 (initialize_array): Don't mess with DECL_CONTEXT.
534 * cp-tree.h (start_decl): Adjust prototype.
535 (determine_visibility): New function.
536 * decl.c (duplicate_decls): Remove checks for hidden "operator
538 (build_library_fn_1): Give all library functions default
540 (start_decl): Add pop_scope_p parameter. Tidy.
541 (cp_finish_decl): Do not pop scopes here. Call
542 determine_visibility for variable definitions.
543 (start_preparsed_function): Call determine_visibility.
544 * decl2.c (determine_visibility): New function.
545 * method.c (use_thunk): Fix formatting.
546 * parser.c (cp_parser_condition): Adjust calls to start_decl.
547 (cp_parser_init_declarator): Likewise.
548 * pt.c (instantiate_decl): Always call pop_nested_class.
549 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
550 (tinfo_base_init): Likewise.
552 2004-08-02 Mark Mitchell <mark@codesourcery.com>
555 * name-lookup.c (validate_nonmember_using_decl): Robustify.
557 2004-08-01 Mark Mitchell <mark@codesourcery.com>
560 * name-lookup.c (decl_namespace): Remove.
561 (current_decl_namespace): Use decl_namespace_context instead of
563 (push_decl_namespace): Likewise.
564 (arg_assoc_class): Likewise.
565 (arg_assoc_type): Likewise.
566 * pt.c (check_specialization_namespace): New function.
567 (maybe_process_partial_specialization): Use it.
568 (register_specialization): Likewise.
571 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
572 * call.c (null_ptr_cst_p): Handle variables with constant
574 * pt.c (convert_nontype_argument): Use
575 DECL_INTEGRAL_CONSTANT_VAR_P.
576 * semantics.c (finish_id_expression): Likewise.
579 * decl.c (duplicate_decls): Reject duplicate namespace
583 * typeck.c (build_ptrmemfunc): Loosen assertion.
585 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
587 * call.c (z_candidate::template_decl): Rename from template.
588 (add_template_candidate_real): Adjust member reference.
591 2004-07-29 Mark Mitchell <mark@codesourcery.com>
593 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
594 (lang_decl_flags): Narrow the width of "languages". Add
596 (DECL_NEEDED_P): Remove.
597 (FOR_EACH_CLONE): New macro.
598 (DECL_REPO_AVAILABLE_P): Likewise.
599 (DECL_TINFO_P): Likewise.
600 (set_linkage_according_to_type): Declare.
601 (import_export_vtable): Remove.
602 (import_export_tinfo): Likewise.
603 (mark_needed): New function.
604 (decl_needed_p): Likewise.
605 (note_vauge_linkage_fn): Likewise.
606 (init_repo): Change prototype.
607 (repo_template_used): Remove.
608 (repo_template_instantiated): Likewise.
609 (repo_emit_p): New function.
610 (repo_export_class_p): Likewise.
611 (no_linkage_check): Change prototype.
612 * class.c (set_linkage_according_to_type): New function.
613 (build_vtable): Use it. Do not call import_export_vtable. Set
614 DECL_IGNORED_P if appropriate.
615 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
616 (make_rtL_for_nonlocal_decls): Check for template instantiations
618 (grokfndecl): Adjust call to no_linkage_check.
619 (set_linkage_for_static_data_member): New function.
620 (grokvardecl): Use it. Adjust call to no_linkage_check.
621 (grokdeclarator): Use set_linkage_for_static_data_member.
622 * decl2.c (note_vague_linkage_fn): New function.
623 (note_vague_linkage_var): Likewise.
624 (finish_static_data_member_decl): Use it.
625 (import_export_vtable): Remove.
626 (import_export_class): Use repo_export_class_p.
627 (var_finalized_p): Simplify.
628 (maybe_emit_vtables): Simplify.
629 (mark_needed): New function.
630 (decl_needed_p): Likewise.
631 (import_export_decl): Add documentation and consistency checks.
632 Use repo_emit_p. Handle virtual tables and RTTI information
634 (import_export_tinfo): Remove.
635 (write_out_vars): Call import_export_decl.
636 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
638 (finish_file): Use decl_needed_p. Do not call import_export_decl
639 for undefined static data members. Do not warn about undefined
640 inlines when using a repository.
641 (mark_used): Use note_vague_linkage_fn. Always defer template
643 * lex.c (cxx_init): Adjust call to init_repo. Always set
645 * method.c (synthesize_method): Remove unncessary
646 import_export_decl call.
647 (implicitly_declare_fn): Use set_linkage_according_to_type.
648 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
649 * pt.c (instantiate_class_template): Don't redundantly add classes
650 to keyed_classes. Don't call repo_template_used.
651 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
652 templates with internal linkage.
653 (check_instantiated_args): Adjust call to no_linkage_check.
654 (instantiate_template): Use FOR_EACH_CLONE.
655 (mark_definable): New function.
656 (mark_decl_instantiated): Use it.
657 (do_decl_instantiation): Adjust tests for explicit instantiation
658 after "extern template".
659 (instantiate_class_member): Do not use repo_template_instantiated.
660 (do_type_instantiation): Simplify.
661 (instantiate_decl): Use mark_definable. Check repo_emit_p.
663 * repo.c (repo_get_id): Remove.
664 (original_repo): Remove.
665 (IDENTIFIER_REPO_USED): Remove.
666 (IDENTIFIER_REPO_CHOSEN): Remove.
667 Remove all #if 0'd code.
668 (repo_template_used): Remove.
669 (repo_template_instantiated): Remove.
670 (temporary_obstack_initialized_p): New variable.
671 (init_repo): Register with lang_post_pch_load. Avoid creating
672 identifiers unnecessarily. Don't use original_repo. Close the
674 (reopen_repo_file_for_write): Not here.
675 (finish_repo): Always write out a new repository file.
676 (repo_emit_p): New function.
677 (repo_export_class_p): Likewise.
678 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
679 (involves_incomplete_p): New function.
680 (tinfo_base_init): Use it.
681 (ptr_initializer): Remove non_public_ptr parameter.
682 (ptm_initializer): Likewise.
683 (get_pseudo_ti_init): Likewise.
684 (unemitted_tinfo_decl_p): Remove.
685 (emit_tinfo_decl): Use import_export_decl.
686 * semantics.c (expand_body): Move updates of static_ctors and
688 (expand_or_defer_fn): ... here.
689 * tree.c (no_linkage_check): Add relaxed_p parameter.
691 2004-07-28 Eric Christopher <echristo@redhat.com>
693 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
695 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
697 * cp-tree.h (struct tree_pair_s): New.
698 (typedef tree_pair_p): New.
699 (DEF_VEC_O(tree_pair_s)): New.
700 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
701 (CLASSTYPE_VCALL_INDICES): Update documentation.
702 * class.c (get_vcall_index): Adjust.
703 (add_vcall_offset): Adjust.
705 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
707 * pt.c, typeck.c: Remove spurious carriage returns.
709 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
712 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
713 when the type of ARG is not dependent.
715 2004-07-26 Geoffrey Keating <geoffk@apple.com>
717 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
718 (lang_specific_driver): If the C++ or math library options don't
719 start with '-l', don't count them as added libraries.
721 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
723 * decl.c (xref_basetypes): Adjust base access vector creation.
724 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
726 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
728 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
729 Brian Ryner <bryner@brianryner.com>
733 * class.c (check_field_decls): Apply hidden visibility if
734 -fvisibility-inlines-hidden and inlined unless otherwise specified
735 (build_vtable): Set vtable visibility to class visibility.
736 (check_field_decls): Default static member visibility to class
738 (check_methods): Default method visibility to class visibility.
739 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
740 CLASSTYPE_VISIBILITY_SPECIFIED macro.
741 * decl.c (duplicate_decls): New logic for merging definition decls
742 with declaration decls. Added ignore & warning when non default
743 applied to global operator new or delete.
744 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
745 wherever VISIBILITY was changed
746 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
748 (tinfo_base_init): Set typeinfo name visibility to class visibility.
750 2004-07-25 Bernardo Innocenti <bernie@develer.com>
752 * decl.c: Rename all identifiers named `class' to `cl'.
753 * cp-tree.h: Likewise.
755 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
757 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
758 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
759 * name-lookup.c (binding_entry_make): Use GGC_NEW.
760 (binding_table_construct): Use GGC_CNEWVEC.
761 (binding_table_new): Use GGC_NEW.
762 (cxx_binding_make): Likewise.
763 (begin_scope): Likewise.
764 (push_to_top_level): Use GCC_CNEW.
765 * parser.c (cp_token_cache_new): Likewise.
766 (cp_token_cache_push_token): Likewise.
767 (cp_lexer_new_main): Likewise.
768 (cp_lexer_new_from_tokens): Likewise.
769 (cp_parser_context_new): Likewise.
770 (cp_parser_new): Likewise.
771 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
772 * lex.c (cxx_make_type): Use GGC_CNEW.
773 (retrofit_lang_decl): Use GGC_NEWVAR.
774 (cxx_dup_lang_specific_decl): Likewise.
775 (copy_lang_type): Likewise.
776 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
777 (save_function_data): Likewise.
778 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
779 (cxx_push_function_context): Likewise.
781 2004-07-25 Richard Henderson <rth@redhat.com>
783 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
784 DECL_IGNORED_P on RESULT_DECL.
785 * semantics.c (finalize_nrv): Copy them too.
787 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
789 * search.c (lookup_conversion_operator): Avoid two loops.
790 (add_conversions): Remove.
791 (check_hidden_convs, split_conversions,
792 lookup_conversions_r): New.
793 (lookup_conversions): Use lookup_conversions_r.
795 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
797 * pt.c (get_template_base): Check type is completable.
799 2004-07-21 Eric Christopher <echristo@redhat.com>
801 * decl.c (poplevel): Inline unused variable checking.
804 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
806 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
809 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
812 * pt.c (check_explicit_specialization): Remove extension to accept
813 specializations without template headers. Fall-through to normal
816 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
819 * pt.c (determine_specialization): New parameter template_count.
820 Disambiguate between member templates and member functions counting
821 the template headers.
822 (check_explicit_specialization): Update caller.
823 (tsubst_friend_function): Likewise.
825 2004-07-20 Steven Bosscher <stevenb@suse.de>
827 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
828 * cp-tree.h (tinst_level_t): New tree type.
829 (union lang_tree_node): Handle it.
830 (TINST_LOCATION): New accessor macro.
831 (make_tinst_level): New prototype.
832 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
833 * decl.c (cp_tree_node_structure): Likewise.
834 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
835 (print_instantiation_partial_context): Likewise.
836 * pt.c (pop_tinst_level): Likewise.
837 (push_tinst_level): Use make_tinst_level.
838 * tree.c (make_tinst_level): New function.
839 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
841 2004-07-20 Mark Mitchell <mark@codesourcery.com>
843 * parser.c (cp_parser_simple_type_specifier): Fix typo.
846 * parser.c (cp_parser_simple_type_specifier): Do not record usage
847 of globally-qualified names.
849 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
852 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
855 2004-07-19 Mark Mitchell <mark@codesourcery.com>
858 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
859 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
860 * class.c (add_implicitly_declared_members): Use
861 CLASSTYPE_LAZY_ASSIGNMENT_OP.
862 * method.c (lazily_declare_fn): Clear
863 CLASSTYPE_LAZY_ASSIGNMENT_OP.
864 * search.c (lookup_fnfields_1): Check it.
866 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
868 * cp-tree.h (vec_binfo_member): Remove.
869 * tree.c (vec_binfo_member): Remove.
871 * cp-tree.h (struct lang_type_class): Remove vfields field.
872 (CLASSTYPE_VFIELDS): Remove.
873 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
874 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
876 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
877 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
878 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
880 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
882 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
883 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
885 (BINFO_LANG_SLOTS): Remove.
886 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
887 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
888 * class.c (check_bases): Adjust BINFO accessors.
889 (determine_primary_base, finish_struct_bits,
890 maybe_warn_about_overly_private_class, warn_hidden,
891 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
892 warn_about_ambiguous_bases, get_vfield_name,
893 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
894 add_vcall_offset_vtbl_entries_r): Likewise.
895 * dump.c (cp_dump_tree): Likewise.
896 * init.c (sort_mem_initializers, expand_member_init, build_delete,
897 push_base_cleanups): Likewise.
898 * method.c (do_build_copy_constructor, do_build_assign_ref,
899 synthesize_exception_spec): Likewise.
900 name-lookup.c (arg_assoc_class): Likewise.
901 * pt.c (instantiate_class_template,
902 get_template_base_recursive): Likewise.
903 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
904 * typeck2.c (process_init_constructor): Likewise.
905 * search.c (lookup_base_r, dynamic_cast_base_recurse,
906 dfs_access_in_type, dfs_walk_real, look_for_overrides,
907 types_overlap_p, copied_binfo, original_binfo): Likewise.
908 (binfo_for_vtable): Remove
910 2004-07-20 Steven Bosscher <stevenb@suse.de>
912 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
913 thunk_alias, and the access and virtual_offset fields.
914 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
915 * decl.c (finish_case_label): Update c_add_case_node call.
917 2004-07-19 Mark Mitchell <mark@codesourcery.com>
919 Revert patch for PR c++/16623.
921 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
923 * except.c: Remove two spurious carriage returns.
925 2004-07-19 Mark Mitchell <mark@codesourcery.com>
928 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
929 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
930 * class.c (add_implicitly_declared_members): Use
931 CLASSTYPE_LAZY_ASSIGNMENT_OP.
932 * method.c (lazily_declare_fn): Clear
933 CLASSTYPE_LAZY_ASSIGNMENT_OP.
934 * search.c (lookup_fnfields_1): Check it.
936 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
938 * class.c (add_method): Delay adding the slot until the end.
939 (determine_primary_base): Adjust VEC_iterate invokation.
940 (resort_type_method_vec, finish_struct_methods, warn_hidden,
941 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
942 build_vtbl_initializer): Likewise.
943 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
944 build_vbase_delete): Likewise.
945 * method.c (do_build_copy_constructor): Likewise.
946 * name-lookup.c (new_class_binding, print_binding_level,
947 poplevel_class, store_class_bindings, push_to_top_level,
948 pop_from_top_level): Likewise.
949 * pt.c (check_explicit_specialization): Likewise.
950 * search.c (lookup_conversion_operator, lookup_fnfields_1,
951 get_pure_virtuals, add_conversions, dfs_check_overlap,
952 binfo_for_vbase): Likewise.
954 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
957 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
958 innermost set of template arguments during deduction. Simplify.
960 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
962 * typeck.c (build_modify_expr, build_x_modify_expr): Set
963 TREE_NO_WARNING on assignments with an operator other than '='.
965 2004-07-10 Steven Bosscher <stevenb@suse.de>
966 Joseph S. Myers <jsm@polyomino.org.uk>
968 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
969 * decl2.c (grokfield): Don't check current_class_depth via
970 unused TREE_COMPLEXITY.
971 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
972 to avoid the missing parentheses warning.
973 Don't set C_SET_EXP_ORIGINAL_CODE.
975 2004-07-18 Mark Mitchell <mark@codesourcery.com>
977 * tree.c (no_linkage_helper): Remove.
978 (no_linkage_check): Don't use walk_tree_without_duplicates.
980 * mangle.c (write_expression): Issue a sorry for zero-operand
983 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
986 * init.c (build_offset_ref): Build SCOPE_REF with non-null
987 TREE_TYPE for non-dependent names.
988 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
989 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
990 unknown_type_node as its TREE_TYPE.
991 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
992 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
993 (dump_expr) <SCOPE_REF case>: Likewise.
995 2004-07-17 Jason Merrill <jason@redhat.com>
998 * call.c (type_passed_as): Make the invisible reference type
1000 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1001 cp_genericize_r. Handle invisible reference lowering.
1002 (is_invisiref_parm): New fn.
1003 (cp_genericize): Adjust the types of invisible reference parms.
1004 Don't repeat the walk for clones.
1005 * decl.c (store_parm_decls): Don't generate any code for clones.
1007 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1009 * cp-tree.h (builtin_function): Declare.
1011 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1013 * class.c (finish_struct_methods): Remove unncessary code.
1014 (add_implicitly_declared_members): Create declarations for default
1015 constructors and copy constructors lazily.
1016 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1018 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1019 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1020 * decl2.c (check_classfn): Robustify.
1021 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1022 (locate_ctor): Handle lazy default constructors.
1023 (locate_copy): Handle lazy copy constructors.
1024 (implicitly_declare_fn): Make sure we're looking at the
1025 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1026 set TYPE_HAS_CONSTRUCTOR.
1027 (lazily_declare_fn): New function.
1028 * name-lookup.c (constructor_name_full): Simplify.
1029 * search.c (lookup_fnfields_1): Lazily create methods, as
1031 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1033 2004-07-16 Steven Bosscher <stevenb@suse.de>
1035 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1036 single bit GTY desc.
1038 2004-07-16 Richard Henderson <rth@redhat.com>
1040 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1041 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1042 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1044 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1046 * class.c (finish_struct_bits): Use for loop.
1047 (propagate_binfo_offsets): Do primary binfo outside of loop.
1050 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1053 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1055 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1057 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1058 has_abstract_assign_ref. Make methods a VEC(tree) *.
1059 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1060 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1061 (CLASSTYPE_DESTRUCTORS): Likewise.
1062 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1063 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1064 (add_method): Change prototoype.
1065 * class.c (add_method): Remove error_p parameter. Adjust for
1066 changes to CLASSTYPE_METHOD_VEC.
1067 (handle_using_decl): Adjust call to add_method.
1068 (maybe_warn_about_overly_private_class): Adjust for
1069 changes to CLASSTYPE_METHOD_VEC.
1070 (resort_type_method_vec): Likewise.
1071 (finish_struct_methods): Likewise.
1072 (check_for_override): Likewise.
1073 (warn_hidden): Likewise.
1074 (add_implicitly_declared_members): Defer creation of assignment
1075 operators. Adjust call to add_method.
1076 (clone_function_decl): Adjust call to add_method.
1077 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1078 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1079 * decl.c (grok_special_member_properties): Don't set
1080 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1081 * decl2.c (check_classfn): Adjust for
1082 changes to CLASSTYPE_METHOD_VEC.
1083 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1084 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1085 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1086 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1088 * pt.c (check_explicit_specialization): Adjust for
1089 changes to CLASSTYPE_METHOD_VEC.
1090 (instantiate_class_template): Do not set
1091 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1092 * ptree.c (cxx_print_type): Don't try to print
1093 CLASSTYPE_METHOD_VEC.
1094 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1095 * search.c (lookup_field_r): Adjust for
1096 changes to CLASSTYPE_METHOD_VEC.
1097 (lookup_fnfields): Likewise.
1098 (lookup_conversion_operator): Likewise.
1099 (lookup_fnfields_1): Likewise. Create assignment operators
1101 (look_for_overrides_here): Adjust for
1102 changes to CLASSTYPE_METHOD_VEC.
1103 (add_conversions): Likewise.
1104 * semantics.c (finish_member_declaration): Adjust call to add_method.
1106 2004-07-15 Jason Merrill <jason@redhat.com>
1108 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1109 references and pointers are compatible.
1111 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1113 * decl.c (xref_basetypes): Refactor.
1114 * tree.c (copy_base_binfos): Replace with ...
1115 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1116 bases of the given base).
1117 * cp-tree.h (copy_base_binfo): Remove.
1118 (copy_binfo): Declare.
1120 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1122 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1124 (get_class_binding): Adjust.
1125 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1127 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1129 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1130 * decl.c (xref_basetypes): Set it here.
1132 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1133 Don't check for incomplete base.
1134 (get_vfield_name): Simplify while loop.
1135 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1137 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1139 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1141 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1142 (BINFO_PUSHDECLS_MARKED): Likewise.
1143 (maybe_inject_for_scope_var): Likewise.
1144 (push_class_decls): Likewise.
1145 * name-lookup.h (push_class_binding): Remove.
1146 (innermost_non_namespace_value): New function.
1147 (outer_binding): Likewise.
1148 * class.c (add_method): Push bindings before adding to
1150 (restore_class_cache): Do not restore class_shadowed.
1151 (pushclass): Do not add USING_DECLs. Do not call
1153 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1154 * decl.c (pushdecl): Use outer_binding.
1155 (poplevel): Set the scope for an out-of-scope for-loop declaration
1157 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1158 * name-lookup.c (new_class_binding): New function.
1159 (push_binding): Use it.
1160 (pushdecl): Use innermost_non_namespace_value.
1161 (maybe_inject_for_scope_var): Remove.
1162 (push_class_binding): Remove.
1163 (set_inherited_value_binding_p): New function.
1164 (get_class_binding): New function.
1165 (push_class_level_binding): Assert that the current_class_type is
1167 (outer_binding): New function.
1168 (innermost_non_namespace_value): Likewise.
1169 (lookup_name_real): Use outer_binding.
1170 (lookup_name_current_level): Ignore out-of-scope variables.
1171 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1172 (lookup_template_class): Likewise.
1173 * search.c (dfs_push_type_decls): Remove.
1174 (dfs_push_decls): Likewise.
1175 (setup_class_bindings): Likewise.
1176 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1177 (marked_pushdecls_p): Remove.
1178 (unmarked_pushdecls_p): Remove.
1179 (marked_identifiers): Remove.
1180 (setup_class_bindings): Remove.
1181 (dfs_push_type_decls): Remove.
1182 (dfs_push_decls): Remove.
1183 (push_class_decls): Remove.
1185 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1189 * decl.c (grokvardecl): Make declspecs parameter const.
1190 (grokdeclarator): Likewise. Adjust accordingly.
1191 * decl.h (grokdeclarator): Adjust declaration.
1192 * parser.c (cp_parser_init_declarator): Do not clear
1193 decl_specifiers->attributes.
1195 * cp-tree.h (lang_identifier): Remove class_value.
1196 (IDENTIFIER_CLASS_VALUE): Remove.
1197 (pop_class_decls): Likewise.
1198 (init_search_processing): Likewise.
1199 * class.c (handle_using_decl): Use lookup_member, not
1200 IDENTIFIER_CLASS_VALUE.
1201 (restore_class_cache): New function, split out from ...
1202 (pushclass): ... here. Do not call clear_identifier_class_values.
1203 (invalidate_class_lookup_cache): Do not clear
1204 IDENTIFIER_CLASS_VALUE.
1205 (popclass): Do not call pop_class_decls.
1206 (maybe_note_name_used_in_class): Do not save names looked up after
1207 the class is complete. Use lookup_member, not
1208 IDENTIFIER_CLASS_VALUE.
1209 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1210 * decl.c (cxx_init_decl_processing): Do not call
1211 init_search_processing.
1212 * method.c (do_build_copy_constructor): Remove unnecessary code.
1213 (do_build_assign_ref): Likewise.
1214 * name-lookup.c (pushdecl): Use lookup_member, not
1215 IDENTIFIER_CLASS_VALUE.
1216 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1218 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1219 (push_class_binding): Do not set it.
1220 (clear_identifier_class_values): Remove.
1221 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1222 (store_binding): Do not save it.
1223 (pop_from_top_level): Do not restore it.
1224 * name-lookup.h (cxx_saved_binding): Remove class_value.
1225 (clear_identifier_class_values): Remove.
1226 * ptree.c (cxx_print_identifier): Do not print
1227 IDENTIFIER_CLASS_VALUE.
1228 * search.c (search_obstack): Remove.
1229 (push_stack_level): Remove.
1230 (pop_stack_level): Remove.
1231 (search_level): Remove.
1232 (search_stack): Remove.
1233 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1234 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1235 IDENTIFIER_CLASS_VALUE.
1236 (marked_identifiers): New variable.
1237 (push_class_decls): Clear IDENTIFIER_MARKED.
1238 (pop_class_decls): Don't call pop_search_level.
1239 (init_search_processing): Remove.
1241 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1243 * cp-tree.h (get_aggr_typedef): Remove.
1244 * init.c (get_aggr_typedef): Likewise.
1246 * name-lookup.c (push_class_level_binding): Simplify.
1248 2004-07-12 Andrew Pinski <apinski@apple.com>
1252 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1254 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1257 2004-07-12 Eric Christopher <echristo@redhat.com>
1259 * parser.c (cp_parser_class_head): Remove unused variable.
1261 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1263 * decl.c (grok_op_properties): Reject [de-]allocation functions
1264 declared in a namespace, or declared as static.
1266 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1268 * cp-tree.h (make_binfo): Remove.
1269 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1270 * tree.h (copy_base_binfos): Likewise.
1271 (make_binfo): Remove.
1273 * call.c (build_user_type_conversion_1, build_new_op,
1274 check_constructor_callable, build_temp,
1275 perform_direct_initialization_of_possible): Pass type directly to
1276 lookup_fnfields & build_special_member_call.
1277 (build_special_member_call): Accept a type, and complete it.
1278 * class.c (finish_stuct_bits): Copy the BINFOs here.
1279 * cvt.c (ocp_convert): Pass type directly to
1280 build_special_member_call.
1281 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1282 (xref_basetypes): Allocate the binfo here. Adjust.
1283 * init.c (build_init, build_new_1): Pass type directly to
1284 build_special_member_call.
1285 * lex.c (cxx_make_type): Do not allocate binfo here.
1286 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1287 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1288 * pt.c (instantiate_class_template): Likewise. Inhibit access
1289 checking for template friends.
1290 * ptree.c (cxx_print_type): Adjust record printing.
1291 * search.c (lookup_base): When taking a type, complete it before
1292 looking for a binfo.
1293 (lookup_member): Delay completing a type.
1294 (push_class_decls): Don't walk an incomplete type.
1295 (lookup_conversions): Likewise.
1296 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1297 build_special_member_call.
1298 * tree.c (copy_base_binfos): Adjust.
1299 (make_binfo): Likewise.
1300 * typeck.c (build_modify_expr): Pass type directly to
1301 build_special_member_call.
1302 * typeck2.c (process_init_constructor): Check a binfo exists.
1303 (build_m_component_ref): Allow accessing an incomplete type.
1304 (build_functional_cast): Pass type directly to
1305 build_special_member_call.
1307 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1310 * config-lang.in (gtfiles): Add typeck2.c.
1311 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1313 * cp-tree.h: Declare complete_type_check_abstract.
1314 * typeck2.c (pat_calc_hash, pat_compare,
1315 complete_type_check_abstract): New functions.
1316 (abstract_virtuals_error): If the type is abstract, register the
1317 declaration within abstract_pending_vars for further checks.
1318 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1319 * decl.c (cp_finish_decl): Do not strip array types.
1320 (create_array_type_for_decl): Check for abstractness of the element
1322 (complete_vars): Call complete_type_check_abstract.
1323 * class.c (finish_struct): Prepare a list of virtual functions for
1324 template types, and call complete_vars on it to check for abstractness.
1326 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1328 PR tree-optimization/14107
1329 * decl.c (finish_function): Remove temporary band-aid.
1331 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1333 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1334 (build_new_op): Adjust call to lookup_function_nonclass.
1335 * name-lookup.c (identifier_type_value): Adjust call to
1337 (lookup_name_real): Add block_p parameter.
1338 (lookup_name_nonclass): Adjust call to lookup_name_real.
1339 (lookup_function_nonclass): Likewise.
1340 (lookup_name): Likewise.
1341 * name-lookup.h (lookup_name_real): Change prototype.
1342 (lookup_name_nonclass): Likewise.
1343 * parser.c (cp_parser_lookup_name): Likewise.
1345 * cp-tree.h (saved_scope): Make old_bindings a vector.
1346 (unuse_fields): Remove.
1347 * name-lookup.h (cxx_saved_binding): Define it.
1348 * class.c (pushclass): Don't use unuse_fields.
1349 * name-lookup.c (cxx_saved_binding_make): Remove.
1350 (store_binding): Add new bindings to a vector, using an
1351 accumulator style, rather than adding them to a list.
1352 (store_bindings): Adjust accordingly.
1353 (store_class_bindings): Likewise.
1354 (push_to_top_level): Likewise.
1355 (pop_from_top_level): Likewise.
1356 * optimize.c (maybe_clone_body): Must push_to_top_level and
1357 pop_from_top_level calls outside of loop.
1358 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1359 calls here from cp_parser_late_parsing_default_args.
1360 (cp_parser_save_default_args): Record the class type in which the
1361 function is declared.
1362 (cp_parser_late_parsing_default_args): Do not call
1363 push_nested_class/pop_nested_class.
1364 * search.c (dfs_unuse_fields): Remove.
1365 (unuse_fields): Remove.
1367 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1369 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1370 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1371 * cp-tree.h (poplevel): Declare.
1372 (set_block): Remove.
1373 * decl.c (set_block): Remove.
1375 2004-07-10 Mike Stump <mrs@apple.com>
1377 * decl2.c (import_export_class): Never export/import vtables
1378 with inline key functions.
1380 2004-07-09 Steven Bosscher <stevenb@suse.de>
1382 * typeck.c (c_expand_asm_operands): Remove.
1384 2004-07-09 Mike Stump <mrs@apple.com>
1386 * typeck.c (build_class_member_access_expr): Skip null deref
1387 warning when we don't dereference it.
1389 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1393 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1394 warn for pointers to functions/members, or for classes without
1397 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1399 * name-lookup.h (struct cp_binding_level): Update documentation
1402 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1405 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1406 returning CALL_EXPR, and non-reference return type.
1408 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1410 * name-lookup.c (push_binding): Use VEC_reserve.
1412 2004-07-08 Richard Henderson <rth@redhat.com>
1414 * cp-tree.h (expand_eh_spec_block): Remove.
1416 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1418 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1419 x_previous_class_values; add x_previous_class_level.
1420 (previous_class_type): Remove.
1421 (previous_class_values): Remove.
1422 (previous_class_level): New macro.
1423 * class.c (pushclass): Restore the identifier cache more
1425 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1426 previous_class_values.
1427 * decl.c (poplevel): Likewise.
1428 * name-lookup.c (cxx_binding_init): New function.
1429 (cxx_binding_make): Use it.
1430 (push_binding): For a binding in a class level, use a vector of
1431 cp_class_binding nodes.
1432 (push_binding_level): New function.
1433 (begin_scope): Use it.
1434 (leave_scope): Do not put class binding levels on the free list.
1435 (print_binding_level): Adjust for the fact that class_shadowed is
1437 (poplevel_class): Likewise.
1438 (clear_identifier_class_values): Likewise.
1439 (push_class_level_binding): Likewise.
1440 (set_class_shadows): Remove.
1441 (store_binding): New function.
1442 (store_class_bindings): New function.
1443 (push_to_top_level): Use store_class_bindings as appropriate.
1444 (pop_from_top_level): Use previous_class_level, not
1445 previous_class_type.
1446 * name-lookup.h (cp_class_binding): New type.
1447 (cp_binding_level): Use a vector object for class_shadowed.
1448 (push_binding_level): Declare.
1449 (set_class_shadows): Remove.
1451 2004-07-07 Andrew Pinski <apinski@apple.com>
1453 * class.c (instantiate_type): BUFFER_REF is dead.
1454 * lex.c (init_operators): IN_EXPR is dead.
1456 2004-07-07 Jason Merrill <jason@redhat.com>
1459 * call.c (build_new_op): Give overload warnings for built-in
1462 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1465 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1468 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1470 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1471 * class.c (build_primary_vtable, check_bases,
1472 determine_primary_base, finish_struct_bits,
1473 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1474 get_basefndecls, warn_hidden, walk_subobject_offsets,
1475 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1476 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1477 finish_struct_1, get_vfield_name, contains_empty_class_p,
1478 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1479 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1480 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1482 * decl.c (xref_basetypes): Likewise.
1483 * dump.c (cp_dump_tree): Likewise.
1484 * error.c (dump_expr): Likewise.
1485 * init.c (sort_mem_initializers, expand_member_init,
1486 push_base_cleanups): Likewise.
1487 * method.c (do_build_copy_constructor, do_build_assign_reg,
1488 synthesize_exception_spec): Likewise.
1489 * name-lookup.c (arg_assoc_class): Likewise.
1490 * pt.c (instantiate_class_template, tsubst,
1491 get_template_base_recursive): Likewise.
1492 * ptree.c (cxx_print_type): Likewise.
1493 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1494 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1495 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1496 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1497 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1498 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1499 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1500 * tree.c (copy_base_binfos, make_binfo): Likewise.
1501 * typeck.c (commmon_base_type): Likewise
1502 * typeck2.c (process_init_constructor): Likewise
1504 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1506 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1508 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1511 * pt.c (convert_nontype_argument): Disallow conversions between
1512 different enumeration types.
1514 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1516 * cp-tree.h (BINFO_MARKED): Remove.
1517 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1518 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1519 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1520 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1521 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1522 (mark_primary_bases, determine_primary_base, base_derived_from,
1523 dfs_find_final_overrider, dfs_find_final_overrider_q,
1524 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1525 dfs_modify_vtables, walk_subobject_offsets,
1526 layout_nonempty_base_or_field, build_base_field,
1527 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1528 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1529 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1530 build_ctor_vtbl_group, accumulate_vtble_inits,
1531 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1532 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1533 add_vcall_offset_vtbl_entries_1): Likewise.
1534 * decl.c (xref_basetypes): Incomming virtual base indicated by
1536 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1537 * init.c (finish_init_stmts, sort_mem_initializers,
1538 emit_mem_initializers, build_vtble_address, expand_member_init,
1539 push_base_cleanups): Likewise.
1540 * method.c (do_build_copy_constructor): Likewise.
1541 * pt.c (instantiate_class_template,
1542 get_template_base_recursive): Likewise.
1543 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1544 get_pseudo_ti_desc): Likewise.
1545 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1546 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1547 original_binfo): Likewise.
1548 * semantics.c (finish_base_specifier): Virtualness is indicated
1550 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1552 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1555 2004-06-24 Jason Merrill <jason@redhat.com>
1557 * decl.c (grokparms): Give the PARM_DECL reference type if the
1558 parameter is passed by invisible reference.
1560 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1562 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1563 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1564 * pt.c (check_instantiated_args, unify): Likewise.
1566 2004-07-05 Phil Edwards <phil@codesourcery.com>
1568 * Make-lang.in (check-c++, lang_checks): Add some comments.
1570 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1572 * cp-mudflap.c: Delete file.
1573 * Makefile.in: Remove all references to cp-mudflap.o.
1575 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1577 * decl.c (cxx_init_decl_processing): Call
1578 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1580 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1583 * call.c (build_operator_new_call): Look only at global scope.
1585 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1587 * call.c (enforce_access): Expect TREE_BINFO.
1588 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1589 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1590 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1592 (BINFO_LANG_ELTS): Remove.
1593 (BINFO_LANG_SLOTS): New.
1594 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1595 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1596 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1597 * search.c (lookup_member): Check TREE_BINFO.
1598 * semantics.c (perform_or_defer_access_check): Likewise.
1599 (check_accessibility_of_qualified_id): Check
1600 deferred_access_no_check.
1601 * tree.c (make_binfo): Use make_tree_binfo.
1603 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1605 * method.c (implicitly_declare_fn): Set linkage of generated
1608 2004-07-04 Richard Henderson <rth@redhat.com>
1610 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1612 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1615 * name-lookup.c (push_class_level_binding): Don't pass a
1616 TREE_LIST of ambiguous names to check_template_shadow as it
1617 only handles declarations. Instead, pull the declaration
1620 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1623 * pt.c (check_explicit_specialization): Clarify error message.
1625 2004-07-02 Richard Henderson <rth@redhat.com>
1627 * tree.c (cp_unsave_r): Update remap_save_expr call.
1629 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1632 * mangle.c (write_template_arg): Correct mangling.
1635 * decl.c (grokdeclarator): Robustify.
1637 2004-07-01 Richard Henderson <rth@redhat.com>
1639 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1640 * method.c (synthesize_method): Don't clear_last_expr.
1641 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1643 2004-07-01 Nick Clifton <nickc@redhat.com>
1645 * decl2.c (import_export_class): Invoke the
1646 import_export_class field in the gcc_target structure if it is not
1649 2004-06-30 Richard Henderson (rth@redhat.com>
1651 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1652 * method.c (use_thunk): Likewise.
1654 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1656 * call.c (build_over_call), typeck.c (build_function_call): Call
1657 check_function_arguments instead of check_function_format.
1659 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1661 * call.c (build_over_call), typeck.c (build_function_call): Update
1662 calls to check_function_format.
1664 2004-06-30 Richard Henderson <rth@redhat.com>
1666 * call.c (build_over_call): Use __builtin_memcpy for copying
1667 CLASS_AS_BASE rather than funny casting.
1669 2004-06-30 Richard Henderson <rth@redhat.com>
1671 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1672 TYPE_SIZE_UNIT of full_type.
1674 2004-06-30 Per Bothner <per@bothner.com>
1676 Conditionally compile support for --enable-mapped_location.
1677 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1678 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1679 adjustments - which I don't understand.
1680 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1681 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1682 (print_instantiation_partial_context): Use expand_location.
1683 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1684 * name-lookup.c: Likewise.
1685 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1686 * name-lookup.c: Use input_line macro.
1687 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1688 (cp_parser_statement): Rename locaal variable statement_locus to
1689 statement_location and use SET_EXPR_LOCATION macro.
1690 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1691 * tree.c (cp_walk_subtrees): Likewise.
1693 2004-06-29 Per Bothner <per@bothner.com>
1695 * tree.c (build_min_nt, build_min, build_min_non_dep):
1696 Don't set TREE_COMPLEXITY from input_line.
1698 2004-06-29 Paul Brook <paul@codesourcery.com>
1700 * init.c: Include target.h.
1701 (get_cookie_size): Remove and replace with target hook.
1703 (build_new_1): Store the element size in the cookie.
1705 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1708 * parser.c (cp_parser_template_declaration_after_export): Disable
1709 access checks here ...
1710 (cp_parser_class_specifier): ... not here.
1712 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1714 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1715 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1716 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1719 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1721 * cp-tree.h (struct deferred_access): Move to ...
1722 * semantics.c (struct deferred_access): ... here. Adjust.
1723 (deferred_access_stack): Make a VEC(deferred_access),
1724 (deferred_access_free_list): Remove.
1725 (deferred_access_no_check): New.
1726 (push_deferring_access_checks, resume_deferring_access_checks,
1727 stop_deferring_access_checks, pop_deferring_access_checks,
1728 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1729 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1731 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1734 * call.c (build_temp): Declare.
1735 (check_constructor_callable): New.
1736 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1737 CONSTRUCTOR_CALLABLE.
1738 (convert_like_real, initialize_reference): Use
1739 check_constructor_callable.
1740 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1741 (LOOKUP_*): Renumber.
1743 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1745 * friend.c (add_friend): Only perform access checks when context
1747 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1748 * parser.c (cp_parser_class_specifier): Disable access checks here
1749 when parsing the body of a templated class.
1750 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1751 NULL binfos when not checking access.
1753 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1755 Use vector API for vbase list.
1756 * cp-tree.h: Include vec.h
1757 (DEF_VEC_P (tree)): New type.
1758 (struct lang_type_class): Change vbase's member type.
1759 (binfo_for_vbase): Declare.
1760 * class.c (determine_primary_base, base_derived_from,
1761 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1762 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1763 build_vtbl_initializer): Adjust.
1764 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1766 * init.c (sort_mem_initializers, expand_member_init,
1767 push_base_cleanups): Adjust.
1768 * method.c (do_build_copy_constructor): Adjust.
1769 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1770 (binfo_for_vbase): New.
1771 * tree.c (copy_base_binfos): Adjust.
1773 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1775 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1777 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1780 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1781 paranthesis in case of pointers to array members.
1782 * error.c (dump_type_prefix): Likewise.
1783 (dump_type_suffix): Maybe issue a whitespace when printing
1786 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1789 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1790 redefinition of built-in types.
1792 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1794 * error.c (pp_template_argument_list_start): Remove.
1795 (pp_template_argument_list_end): Likewise.
1796 (pp_separate_with_comma): Use pp_cxx_separate_with.
1797 (reinit_global_formatting_buffer): Remove.
1798 (pp_non_consecutive_character): Likewise.
1799 (dump_scope): Use pp_cxx_colon_colon.
1800 (dump_template_parameter): Use pp_cxx_identifier,
1801 pp_cxx_tree_identifier and pp_cxx_whitespace.
1802 (dump_templat_bindings): Replace use of pp_string with sequence
1803 of pp_cxx_whitespace and pp_equal.
1804 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1805 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1807 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1808 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1809 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1810 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1811 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1812 (dump_decl): Likewise.
1813 (dump_template_decl): Likewise.
1814 (dump_function_decl): Likewise. Set padding as appropriate.
1815 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1817 (dump_exception_spec): Likewise.
1818 (dump_function_name): Use pp_cxx_tree_identifier and
1820 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1821 pp_cxx_end_template_argument_list.
1822 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1823 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1824 pp_cxx_whitespace throughout.
1825 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1827 (dump_unary_op): Likewise.
1828 (reinit_cxx_pp): New function.
1829 (type_as_string); Use it.
1830 (expr_as_string): Likewise.
1831 (decl_as_string); Likewise.
1832 (context_as_string): Likewise.
1833 (lang_decl_name): Likewise.
1834 (decl_to_string): Likewise.
1835 (expr_to_string): Likewise.
1836 (parm_to_string): Likewise.
1837 (type_to_string): Likewise.
1838 (args_to_string): Likewise.
1839 (cv_to_string): Likewise.
1841 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1843 * cp-tree.h (cp_cv_quals): New type.
1844 (cp_declarator): Use it instead of "tree" as appropriate.
1845 (grok_method_quals): Adjust prototype.
1846 (grokclassfn): Likewise.
1847 (do_friend): Likewise.
1848 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1849 (grokdeclarator): Likewise.
1850 * decl2.c (grok_method_quals): Likewise.
1851 (grokclassfn): Likewise.
1852 * friend.c (do_friend): Likewise.
1853 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1854 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1855 (make_pointer_declarator): Likewise.
1856 (make_reference_declarator): Likewise.
1857 (make_ptrmem_declarator): Likewise.
1858 (cp_parser_ptr_operator): Likewise.
1859 (cp_parser_cv_qualifier_seq_opt): Likewise.
1860 (cp_parser_cv_qualifier_opt): Remove.
1861 (cp_parser_new_declarator_opt): Adjust call to
1862 cp_parser_ptr_operator.
1863 (cp_parser_conversion_declaration_opt): Likewise.
1864 (cp_parser_declarator): Use cp_cv_quals, not tree.
1865 (cp_parser_direct_declarator): Likewise.
1867 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1869 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1870 Rename DECL_STMT to DECL_EXPR.
1871 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1872 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1873 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1875 2004-06-26 Jan Hubicka <jh@suse.cz>
1878 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1879 reachability analysis.
1881 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1883 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1886 2004-06-25 Paul Brook <paul@codesourcery.com>
1888 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1889 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1891 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1893 * decl.c (grokdeclarator): Restore error messages about __thread.
1894 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1896 2004-06-24 Jason Merrill <jason@redhat.com>
1899 * decl.c (grokparms): Give the PARM_DECL reference type if the
1900 parameter is passed by invisible reference.
1902 2004-06-24 Andreas Schwab <schwab@suse.de>
1904 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1906 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1908 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1909 (cp/decl.o): Likewise.
1910 (cp/decl2.o): Likewise.
1911 (cp/pt.o): Likewise.
1912 (cp/semantics.o): Likewise.
1913 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1914 * class.c: Do not include lex.h.
1915 (add_implicitly_declared_members): Do not use
1916 adding_implicit_members.
1917 (check_bases_and_members): Do not talk about grok_x_components.
1918 * cp/cp-tree.h (adding_implicit_members): Remove.
1919 (cp_storage_class): New type.
1920 (cp_decl_spec): Likewise.
1921 (cp_decl_specifier_seq): Likewise.
1922 (cp_parameter_declarator): Use it for the decl_specifiers field.
1923 (check_tag_decl): Adjust prototype.
1924 (shadow_tag): Likewise.
1925 (groktypename): Likewise.
1926 (start_decl): Likewise.
1927 (start_function): Likewise.
1928 (start_method): Likewise.
1929 (grok_x_components): Remove.
1930 (grokfield): Adjust prototype.
1931 (grokbitfield): Likewise.
1932 (finish_member_class_template): Remove.
1933 * decl.c: Do not include lex.h.
1934 (adding_implicit_members): Do not define.
1935 (check_tag_decl): Do not use trees to represent decl-specifiers.
1936 (shadow_tag): Likewise.
1937 (groktypename): Likewise.
1938 (start_decl): Likewise.
1939 (grokvardecl): Likewise.
1940 (grokdeclarator): Likewise.
1941 (grokparms): Likewise.
1942 (start_function): Likewise.
1943 (start_method): Likewise.
1944 * decl.h (grokdeclarator): Adjust prototype.
1945 * decl2.c: Do not include lex.h.
1946 (grok_x_components): Remove.
1947 (grokfield): Do not use trees to represent decl-specifiers.
1948 (grokbitfield): Likewise.
1949 * lex.c: Do not include lex.h.
1951 * parser.c: Include target.h.
1952 (clear_decl_specs): New function.
1953 (cp_parser_translation_unit): Do not use trees to represent
1955 (cp_parser_postfix_expression): Likewise.
1956 (cp_parser_new_type_id): Likewise.
1957 (cp_parser_condition): Likewise.
1958 (cp_parser_simple_declaration): Likewise.
1959 (cp_parser_decl_specifier_seq): Likewise.
1960 (cp_parser_function_specifier_opt): Likewise.
1961 (cp_parser_conversion_type_id): Likewise.
1962 (cp_parser_template_parameter): Likewise.
1963 (cp_parser_explicit_instantiation): Likewise.
1964 (cp_parser_type_specifier): Likewise.
1965 (cp_parser_simple_type_specifier): Likewise.
1966 (cp_parser_init_declarator): Likewise.
1967 (cp_parser_type_id): Likewise.
1968 (cp_parser_type_specifier_seq): Likewise.
1969 (cp_parser_parameter_declaration): Likewise.
1970 (cp_parser_member_declaration): Likewise.
1971 (cp_parser_exception_declaration): Likewise.
1972 (cp_parser_function_definition_from_specifiers_and_declarator):
1974 (cp_parser_single_declaration): Likewise.
1975 (cp_parser_save_member_function_body): Likewise.
1976 (cp_parser_friend_p): Likewise.
1977 (cp_parser_set_storage_class): New function.
1978 (cp_parser_set_decl_spec_type): Likewise.
1979 * pt.c: Do not include lex.h.
1980 * semantics.c: Likewise.
1981 (finish_member_class_template): Remove.
1983 2004-06-23 Roger Sayle <roger@eyesopen.com>
1985 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1986 longer take both "args" and "convert_args" as arguments.
1987 (build_op_delete_call): Update call to build_cxx_call.
1988 (build_over_call): Likewise, update call to build_cxx_call.
1989 * cp-tree.h (build_cxx_call): Update funtion prototype.
1990 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1991 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1992 (throw_bad_typeid): Likewise.
1993 (build_dynamic_cast_1): Likewise.
1995 2004-06-22 Richard Henderson <rth@redhat.com>
1997 * class.c (build_vfn_ref): Take a pointer not object. Build
1999 (cp_fold_obj_type_ref): New.
2000 * call.c (build_over_call): Update build_vfn_ref call.
2001 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2002 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2004 2004-06-21 Jason Merrill <jason@redhat.com>
2007 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2010 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2012 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2013 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2014 (TREE_PARMLIST): Likewise.
2015 (CALL_DECLARATOR_PARMS): Likewise.
2016 (CALL_DECLARATOR_QUALS): Likewise.
2017 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2018 (cp_declarator_kind): New type.
2019 (cp_parameter_declarator): Likewise.
2020 (cp_declarator): Likewise.
2021 (cp_error_declarator): Likewise.
2022 (no_parameters): Likewise.
2023 (groktypename): Change prototype.
2024 (start_decl): Likewise.
2025 (start_handler_parms): Likewise.
2026 (get_scope_of_declarator): Likewise.
2027 (start_function): Likewise.
2028 (start_preparsed_function): New function.
2029 (start_function): Change prototype.
2030 (start_method): Likewise.
2031 (grokfield): Likewise.
2032 (grokbitfield): Likewise.
2033 (build_new): Likewise.
2034 (make_pointer_declarator): Remove.
2035 (make_reference_declarator): Likewise.
2036 (make_call_declarator): Likewise.
2037 (set_quals_and_spec): Likewise.
2038 (process_template_parm): Change prototype.
2039 (begin_function_definition): Remove.
2040 (finish_parmlist): Remove.
2041 * decl.c (groktypename): Do not use trees to represent
2043 (start_decl): Likewise.
2044 (start_handler_parms): Remove.
2045 (get_scope_of_declarator): Reimplement.
2046 (grokdeclarator): Do not use trees to represent declarators.
2047 (grokparms): Likewise.
2048 (start_function): Likewise.
2049 (start_method): Likewise.
2050 (build_void_list_mode): Do not use TREE_PARMLIST.
2051 * decl.h (grokdeclarator): Change prototype.
2052 * decl2.c (grok_method_quals): Robustify.
2053 (grok_x_components): Do not use trees to represent declarators.
2054 (grokfield): Likewise.
2055 (grokbitfield): Likewise.
2056 (start_objects): Build FUNCTION_DECLs, not declarators.
2057 (start_static_storage_duration_function): Likewise.
2058 * init.c (build_new): Simplify.
2059 * lex.c (make_pointer_declarator): Remove.
2060 (make_reference_declarator): Likewise.
2061 (make_call_declarator): Likewise.
2062 (set_quals_and_spec): Likewise.
2063 * method.c (use_thunk): Use start_preparsed_function.
2064 (synthesize_method): Likewise.
2065 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2066 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2067 * parser.c (cp_error_declarator): New variable.
2068 (declarator_obstack): Likewise.
2069 (alloc_declarator): New function.
2070 (make_declarator): Likewise.
2071 (make_id_declarator): Likewise.
2072 (make_pointer_declarator): Likewise.
2073 (make_reference_declarator): Likewise.
2074 (make_ptrmem_declarator): Likewise.
2075 (make_call_declarator): Likewise.
2076 (make_array_declarator): Likewise.
2077 (no_parameters): New variable.
2078 (make_parameter_declarator): Likewise.
2079 (cp_parser_check_for_definition_in_return_type): Do not use trees
2080 to represent declarators.
2081 (cp_parser_translation_unit): Likewise.
2082 (cp_parser_new_expression): Likewise.
2083 (cp_parser_new_type_id): Likewise.
2084 (cp_parser_new_declarator_opt): Likewise.
2085 (cp_parser_direct_new_declarator): Likewise.
2086 (cp_parser_condition): Likewise.
2087 (cp_parser_declaration_statement): Likewise.
2088 (cp_parser_declaration): Likewise.
2089 (cp_parser_conversion_type_id): Likewise.
2090 (cp_parser_conversion_declarator_opt): Likewise.
2091 (cp_parser_template_parameter_list): Likewise.
2092 (cp_parser_template_parameter): Likewise.
2093 (cp_parser_explicit_instantiation): Likewise.
2094 (cp_parser_init_declarator): Likewise.
2095 (cp_parser_declarator): Likewise.
2096 (cp_parser_direct_declarator): Likewise.
2097 (cp_parser_type_id): Likewise.
2098 (cp_parser_parameter_declaration_clause): Likewise.
2099 (cp_parser_parameter_declaration_list): Likewise.
2100 (cp_parser_parameter_declaration): Likewise.
2101 (cp_parser_member_declaration): Likewise.
2102 (cp_parser_exception_declaration): Likewise.
2103 (cp_parser_check_declarator_template_parameters): Likewise.
2104 (cp_parser_function_definition_from_specifiers_and_declarator):
2106 (cp_parser_save_member_function_body): Likewise.
2107 * pt.c (process_template_parm): Add is_non_type parameter.
2108 (convert_template_argument): Adjust call to groktypename.
2109 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2110 (tsubst): Do not expect declarators.
2111 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2113 (instantiate_decl): Use start_preparsed_function.
2114 * semantics.c (begin_function_definition): Remove.
2115 (finish_parmlist): Remove.
2116 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2119 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2121 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2122 (build_new_method_call): Likewise.
2123 * decl.c (local_variable_p_walkfn): Don't walk into types.
2124 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2125 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2126 * init.c (buld_new): Add new operand for ARRAY_REF.
2127 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2128 (do_build_assign_ref): Likewise.
2129 * parser.c (cp_parser_direct_new_declarator): Add new operands
2131 (cp_parser_direct_declarator): Likewise.
2132 * pt.c (tsubst): Likewise.
2133 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2135 * semantics.c (finish_non_static_data_member): Add new operand
2137 * typeck.c (build_class_member_access_expr): Likewise.
2138 (build_class_member_access_expr, finish_class_member_access_expr):
2140 (build_ptrmemfunc_access_expr): Likewise.
2141 (build_array_ref): Add new operands for ARRAY_REF.
2142 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2143 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2145 2004-06-21 Richard Henderson <rth@redhat.com>
2147 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2148 * parser.c (cp_parser_jump_statement): Update commentary.
2149 * pt.c (tsubst_expr): Use RETURN_EXPR.
2150 * semantics.c (finish_return_stmt): Likewise.
2151 (finalize_nrv_r): Likewise.
2152 * typeck.c, typeck2.c: Update file start commentary.
2154 2004-06-21 Richard Henderson <rth@redhat.com>
2156 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2158 2004-06-20 Richard Henderson <rth@redhat.com>
2160 * cp-tree.h (add_decl_stmt): Declare.
2161 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2162 * semantics.c (maybe_cleanup_point_expr): New.
2163 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2164 finish_for_expr, finish_switch_cond): Use it.
2165 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2167 2004-06-20 Richard Henderson <rth@redhat.com>
2169 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2170 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2171 (cp_gimplify_expr): Call it.
2172 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2173 (cp_genericize): New.
2174 * decl.c (finish_function): Call it.
2175 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2176 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2177 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2178 (cp_genericize): Declare.
2179 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2180 * dump.c (cp_dump_tree): Likewise.
2181 * semantics.c (push_cleanup): Move from c-semantics.c.
2183 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2185 * cp-lang.c (has_c_linkage): Implement.
2187 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2188 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2189 (builtin_function_1): Don't call make_decl_rtl.
2190 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2191 (grokvardecl): Don't call mangle_decl.
2192 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2193 DECL_ASSEMBLER_NAME.
2194 * method.c (set_mangled_name_for_decl): Delete.
2195 * name-lookup.c (pushdecl): When a local extern shadows a
2196 file-scope declaration of the same object, give both DECLs the
2198 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2199 on DECL_ASSEMBLER_NAME.
2201 2004-06-19 Richard Henderson <rth@redhat.com>
2203 * cp-gimplify.c: Remove unnecessary prototypes.
2204 (cp_gimplify_stmt): Merge into ...
2205 (cp_gimplify_expr): ... here. Move to end of file. Handle
2206 stmts_are_full_exprs_p frobbing.
2207 * cp-tree.h (cp_gimplify_stmt): Remove.
2208 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2209 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2211 2004-06-18 Richard Henderson <rth@redhat.com>
2214 * semantics.c (begin_cond): New.
2215 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2216 Assume that non-template decls go land before the conditional.
2217 (simplify_loop_decl_cond): Likewise.
2218 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2219 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2220 begin_switch_stmt, finish_switch_cond): Update to match.
2222 2004-06-17 Jason Merrill <jason@redhat.com>
2225 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2226 (finish_stmt_expr_expr): Update type after conversions.
2227 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2228 Handle void initializer.
2229 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2231 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2233 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2234 * cp-tree.h (defer_fn): Delete.
2235 * decl2.c (defer_fn): Delete.
2236 (finish_file): Simplify deferred_fns loops; check that
2237 only used inline functions get into deferred_fns.
2238 (mark_used): Inline previous contents of defer_fn.
2240 2004-06-16 Richard Henderson <rth@redhat.com>
2242 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2243 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2244 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2245 of CTOR_INITIALIZER ...
2246 (pp_cxx_statement): ... here.
2247 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2248 (finish_function): Use alloc_stmt_list to zap entire function.
2249 * parser.c (cp_parser_compound_statement): Update commentary.
2250 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2251 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2252 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2254 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2256 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2258 2004-06-16 Richard Henderson <rth@redhat.com>
2260 * parser.c (cp_parser_labeled_statement): Update commentary.
2261 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2262 * tree.c (mark_local_for_remap_r): Likewise.
2264 2004-06-16 Richard Henderson <rth@redhat.com>
2266 * parser.c (cp_parser_asm_definition): Update commentary.
2267 * pt.c (tsubst_expr): Use ASM_EXPR.
2268 * semantics.c (finish_asm_stmt): Likewise.
2270 2004-06-16 Richard Henderson <rth@redhat.com>
2272 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2273 * parser.c (cp_parser_statement): Update commentary.
2274 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2275 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2276 * tree.c (mark_local_for_remap_r): Likewise.
2278 2004-06-16 Richard Henderson <rth@redhat.com>
2281 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2282 statement in FOR_INIT_STMT for templates.
2284 2004-06-15 Richard Henderson <rth@redhat.com>
2286 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2287 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2288 (genericize_try_block): Use gimplify_stmt.
2289 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2290 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2291 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2292 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2293 (cp_tree_chain_matters_p): Remove.
2294 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2295 (COMPOUND_STMT_BODY_BLOCK): New.
2296 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2297 (EXPR_STMT_STMT_EXPR_RESULT): New.
2298 (building_stmt_tree): Check cur_stmt_list.
2299 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2300 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2301 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2302 (cp_finish_decl): Use push_cleanup.
2303 (start_function, finish_function): Use statement lists.
2304 (finish_stmt): Do nothing.
2305 * except.c (begin_eh_spec_block): Use statement lists.
2306 (check_handlers_1, check_handlers): Likewise.
2307 * init.c (construct_virtual_base): Don't add extra compound stmts.
2308 (build_vec_init): Likewise.
2309 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2310 * name-lookup.h (struct cp_binding_level): Add statement_list.
2311 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2312 (cp_parser_labeled_statement, cp_parser_expression_statement,
2313 cp_parser_statement_seq_opt): Likewise.
2314 (cp_parser_compound_statement): Likewise. Take bool for try block.
2315 (cp_parser_selection_statement): Tidy if processing.
2316 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2317 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2318 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2319 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2320 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2321 (finish_cond): New, rewritten from FINISH_COND.
2322 (simplify_loop_decl_cond): New.
2323 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2324 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2325 begin_else_clause, finish_else_clause, finish_if_stmt,
2326 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2327 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2328 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2329 finish_switch_cond, finish_switch_stmt, begin_try_block,
2330 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2331 finish_handler_sequence, finish_function_handler_sequence,
2332 begin_handler, finish_handler_parms, finish_handler,
2333 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2334 using statement lists.
2335 (begin_compound_stmt): Replace has_no_scope argument with flags.
2336 Update all callers. Use statement lists.
2337 (finish_compound_stmt): Likewise.
2338 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2339 (current_scope_stmt_stack): Remove.
2340 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2341 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2342 Rewrite with statement lists.
2344 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2346 * parser.c: Change all assignments of c_lex_string_translate
2347 to true and false to 1 and 0.
2348 (cp_lexer_read_token): Convert type of the translated string.
2349 (cp_parser_skip_to_closing_parentheses): Preserve original
2350 value of c_lex_string_translate, and set it to -1 while
2352 (cp_parser_cache_group): Likewise.
2353 (cp_parser_cache_group_1): Renamed.
2354 (cp_parser_asm_operand_list): Remove redundant setting of
2355 c_lex_string_translate.
2356 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2357 Handle chained strings.
2359 2004-06-12 Andrew Pinski <apinski@apple.com>
2363 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2365 * cp-tree.h: Fix typo.
2367 * cp-tree.h: Include cgraph.h
2368 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2369 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2371 2004-06-12 Jason Merrill <jason@redhat.com>
2373 PR tree-optimization/14107
2374 * decl.c (finish_function): Warn about no return in all functions.
2376 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2378 * cp-tree.h (struct language_function): Remove cannot_inline.
2379 * decl.c (save_function_data): cannot_inline is no more.
2380 (cxx_push_function_context): Likewise.
2381 * decl2.c (start_objects, start_static_storage_duration_function):
2382 Reset DECL_INLINE, set DECL_UNINLINABLE.
2384 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2387 * search.c (lookup_field): Propagate the ambiguity list.
2388 (lookup_fnfields): Likewise.
2390 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2393 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2394 template keyword to disambiguate.
2396 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2399 * decl.c (grokdeclarator): Ignore pointer-to-members when
2400 computing template depth.
2403 * name-lookup.c (pushtag): Do not try to put class declarations in
2404 explicit specialization scopes.
2406 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2408 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2410 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2413 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2414 bindings for undeclared built-ins.
2416 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2418 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2419 appear at the correct location.
2421 2004-06-10 Jason Merrill <jason@redhat.com>
2425 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2426 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2427 TREE_TYPE for non-dependent names.
2428 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2429 unknown_type_node as its TREE_TYPE.
2430 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2431 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2432 (dump_expr) <SCOPE_REF case>: Likewise.
2434 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2437 * parser.c (cp_parser_direct_declarator): Robustify.
2440 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2441 constants in non-dependent contexts.
2445 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2448 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2451 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2454 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2458 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2459 * lex.c (handle_pragma_interface): Deprecate.
2460 (handle_pragma_implementation): Likewise.
2462 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2464 * g++spec.c (lang_specific_driver): Remove check for -lm
2465 and -lmath when check it see if it was the math library.
2467 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2470 * parser.c (cp_parser_direct_declarator): Reject constructor named
2471 as qualified template-id.
2473 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2476 * lex.c (handle_pragma_interface): Deprecate.
2477 (handle_pragma_implementation): Likewise.
2479 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2482 * parser.c (cp_parser_iteration_statement): Fix typo in error
2486 * pt.c (tsubst_default_argument): Do not defer access checks
2487 while substituting into the default argument.
2490 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2491 constant in a non-dependent context.
2494 * except.c (build_throw): Ensure that temp_expr has been
2497 2004-06-06 Roger Sayle <roger@eyesopen.com>
2499 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2501 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2504 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2505 'typename', and accept 'template'.
2507 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2508 Jan Hubicka <jh@suse.cz>
2511 * method.c (use_think): Do not mark thunk as referenced.
2513 2004-06-03 Matt Austern <austern@apple.com>
2516 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2517 is nonzero, and if we see a noninline definition of a key method,
2518 make the vtables nonweak.
2520 2004-06-02 Matt Austern <austern@apple.com>
2522 * cp-tree.h (instantiate_decl): new boolean parameter,
2523 undefined_ok. Current behavior is equivalent to its being 0.
2524 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2525 * pt.c (mark_decl_instantiated): Unconditionally make
2526 instantiations explicit unconditionally
2527 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2528 since mark_decl_instantiated now does it.
2529 (instantiate_class_member): New. Instantiate a member of an
2530 explicitly instantiated class template.
2531 (do_type_instantiation): Explicitly instantiate members of an
2532 explicitly instantiated class template.
2533 (instantiate_decl): if undefined_ok is nonzero, and if we're
2534 trying to explicitly instantiated a template with no definition,
2535 change it to an implicit instantiation.
2536 (instantiate_pending_templates): Add new argument to instantiate_decl.
2537 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2539 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2541 * cp-tree.h: Fix typo.
2543 * cp-tree.h: Include cgraph.h
2544 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2545 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2547 2004-06-01 Jason Merrill <jason@redhat.com>
2550 * call.c (call_builtin_trap): Remove type parm.
2551 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2552 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2554 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2557 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2558 TREE_TYPE for non-dependent names.
2559 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2560 unknown_type_node as its TREE_TYPE.
2561 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2562 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2563 (dump_expr) <SCOPE_REF case>: Likewise.
2565 2004-06-01 Richard Henderson <rth@redhat.com>
2566 Andrew Pinski <pinskia@physics.uc.edu>
2568 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2569 * parser.c (struct cp_parser): Remove in_offsetof.
2570 (cp_parser_new): Don't set it.
2571 (cp_parser_unary_expression): Don't check it.
2572 (cp_parser_postfix_open_square_expression): Split out from ...
2573 (cp_parser_postfix_expression): ... here.
2574 (cp_parser_postfix_dot_deref_expression): Likewise.
2575 (cp_parser_builtin_offsetof): New.
2576 (cp_parser_primary_expression): Use it.
2578 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2581 * parser.c (cp_parser_postfix_expression): Allow subscript
2582 operator in offsetof.
2584 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2587 * friend.c (add_friend): Do not try to perform access checks for
2588 functions from dependent classes.
2590 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2592 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2593 (pp_cxx_begin_template_argument_list): Turn into a function.
2594 (pp_cxx_end_template_argument_list): Likewise.
2595 (pp_cxx_separate_with): Define.
2596 (pp_cxx_unqualified_id): Tidy.
2597 (pp_cxx_primary_expression): Likewise.
2598 (pp_cxx_postfix_expression): Likewise.
2599 (pp_cxx_expression): Likewise.
2600 (pp_cxx_simple_type_specifier): Likewise.
2601 (pp_cxx_type_specifier_seq): Likewise.
2602 (pp_cxx_parameter_declaration_clause): Likewise.
2603 (pp_cxx_exception_specification): Likewise.
2604 (pp_cxx_direct_declarator): Likewise.
2605 (pp_cxx_type_id): Likewise.
2606 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2608 (pp_cxx_left_paren): Likewise.
2609 (pp_cxx_right_paren): Likewise.
2610 (pp_cxx_left_brace): Likewise.
2611 (pp_cxx_right_brace): Likewise.
2612 (pp_cxx_left_bracket): Likewise.
2613 (pp_cxx_right_bracket): Likewise.
2614 (pp_cxx_dot): Likewise.
2615 (pp_cxx_identifier): Likewise.
2616 (pp_cxx_tree_identifier): Likewise.
2617 (pp_cxx_ampersand): New macro.
2618 (pp_cxx_star): Likewise.
2619 (pp_cxx_arrow): Likewise.
2620 (pp_cxx_semicolon): Likewise.
2621 (pp_cxx_complement): Likewise.
2622 (pp_cxx_begin_template_argument_list): Declaree.
2623 (pp_cxx_end_template_argument_list): Likewise.
2624 (pp_cxx_colon_colon): likewise.
2626 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2628 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2631 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2633 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2634 typeck.c: Fix comment formatting.
2636 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2638 * cp-lang.c (cp_expand_decl): Remove.
2639 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2641 2004-05-30 Andreas Jaeger <aj@suse.de>
2643 * lang-specs.h: Add missing initializers for .ii.
2645 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2647 * decl.c (cp_make_fname_decl): Free return value from
2650 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2653 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2655 * init.c (build_new): Likewise.
2658 * name-lookup.c (arg_assoc): Robustify.
2661 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2662 when determining the scope to use for a pointer to member.
2663 (lookup_anon_field): Give it external linkage.
2664 * cp-tree.h (lookup_anon_field): Declare it.
2665 * expr.c (cplus_expand_constant): Use it.
2667 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2670 * parser.c (cp_parser_simple_type_specifier): Call
2671 maybe_note_name_used_in_class.
2673 2004-05-28 Tom Marshall <tmarshall@real.com>
2676 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2677 the class has friends.
2679 2004-05-27 Adam Nemet <anemet@lnxw.com>
2682 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2683 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2685 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2687 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2688 if it might be needed.
2689 * pt.c (mark_decl_instantiated): Only call defer_fn if
2690 the function actually needs processing in finish_file.
2691 * decl2.c (finish_file): Add check that elements in
2692 deferred_fns_used are really needed there. Remove unnecessary
2693 test of DECL_SAVED_TREE.
2695 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2697 * Make-lang.in: No need to specify $(LIBCPP).
2699 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2702 * parser.c (cp_parser_class_head): Robustify.
2705 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2707 (cp_parser_constructor_declarator_p): Treat attributes
2711 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2712 base classes in templates.
2714 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2717 * pt.c (instantiate_template): Robustify.
2719 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2722 * decl.c (xref_tag): Issue errors about redeclaring template
2723 classes as non-template classes.
2725 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2728 * name-lookup.c (supplement_binding): Allow redefinitions of
2732 * parser.c (cp_parser_template_argument): Robustify.
2734 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2736 * class.c (alter_access): Use %E format specifier to print an
2737 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2738 (push_lang_context): Likewise.
2739 * decl.c (lookup_label): Likewise.
2740 (grokdeclarator): Likewise.
2741 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2742 * pt.c (do_type_instantiation): Likewise.
2743 * tree.c (handle_java_interface_attribute): Likewise.
2744 (handle_com_interface_attribute): Likewise.
2745 (handle_init_priority_attribute): Likewise.
2747 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2751 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2752 recognized as overloaded functions.
2754 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2757 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2758 layout conflicts for unions.
2761 * typeck.c (build_x_unary_op): Instantiate template class
2762 specializations before looking for "operator &".
2765 * typeck.c (complete_type): Layout non-dependent array types, even
2769 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2772 2004-05-22 Roger Sayle <roger@eyesopen.com>
2774 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2775 returning when TREE_TYPE is error_mark_node.
2776 * typeck.c (require_complete_type): Return error_mark_node if
2777 value's type is an error_mark_node.
2779 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2781 * optimize.c (calls_setjmp_r): Remove.
2782 (calls_setjmp_p): Remove.
2783 * cp-tree.c (calls_setjmp_p): Remove.
2784 * decl.c (finish_function): Do not call calls_setjmp_p.
2786 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2788 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2789 * decl2.c (maybe_make_one_only): Likewise.
2790 * method.c (use_thunk): Likewise.
2792 2004-05-18 Jason Merrill <jason@redhat.com>
2794 * class.c (build_base_path): Tidy a bit.
2796 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2798 * name-lookup.c (struct scope_binding): New.
2799 (EMPTY_SCOPE_BINDING): New.
2800 (lookup_using_namespace): Take a scope_binding instead of a
2802 (qualified_lookup_using_namespace): Likewise.
2803 (cxx_binding_clear): Delete.
2804 (do_nonmember_using_decl): Use a scope_binding instead of a
2806 (lookup_tag): Don't call select_decl.
2807 (ambiguous_decl): Don't return anything (and change callers to match).
2808 Take a scope_binding as the second parameter.
2809 (lookup_namespace_name): Use a scope_binding instead of a
2811 (unqualified_namespace_lookup): Likewise.
2812 (lookup_qualified_name): Likewise.
2813 (select_decl): Take a scope_binding instead of a cxx_binding.
2814 Use macros rather than hand-coding tests for type-ness.
2816 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2818 * cp-gimplify.c: Rename from cp-simplify.c.
2819 * Make-lang.in, optimize.c: Update.
2821 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2823 Merge from tree-ssa-20020619-branch. See
2824 ChangeLog.tree-ssa for details.
2826 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2827 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2828 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2829 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2831 * cp-mudflap.c: New file.
2832 * cp-simplify.c:: New file.
2834 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2837 * decl2.c (check_classfn): For member templates, compare also the
2838 template parameters to match the declaration.
2839 * cp-tree.h: Adjust declaration of check_classfn.
2840 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2841 * friend.c (do_friend): Likewise.
2842 * pt.c (tsubst_friend_function): Likewise.
2844 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2846 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2847 Instead, dig into the representation type to find the array bound.
2849 2004-04-30 Jason Merrill <jason@redhat.com>
2851 Refer to base members using COMPONENT_REFs where possible.
2852 * class.c (build_simple_base_path): New fn.
2853 (build_base_path): Use it for non-virtual base references.
2854 (layout_class_type): Change base fields to their real type
2855 after layout is done.
2856 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2857 * cp-lang.c (cxx_get_alias_set): Use it.
2859 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2861 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2864 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2867 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2868 used in integral constant expressions.
2870 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2872 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2875 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2877 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2878 * decl.c (reshape_init): Use it.
2879 * init.c (perform_member_init): Remove redundant condition.
2880 (build_aggr_init): Adjust to handle brace-enclosed initializers
2882 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2884 * parser.c (cp_parser_initializer_clause): Do not set
2885 TREE_HAS_CONSTRUCTOR on the initializer.
2886 * rtti.c (tinfo_base_init): Likewise.
2887 (generic_initializer): Likewise.
2888 (ptr_initializer): Likewise.
2889 (ptm_initializer): Likewise.
2890 (class_initializer): Likewise.
2891 (get_pseudo_ti_init): Likewise.
2892 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2894 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2896 * name-lookup.c (anonymous_namespace_name): Make static.
2898 2004-04-19 Roger Sayle <roger@eyesopen.com>
2901 * class.c (build_base_path): Call fold whilst building the NULL
2902 pointer check expression trees.
2904 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2906 * init.c (build_new_1): Don't use type size argument for Java
2907 _Jv_AllocObject call.
2909 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2911 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2912 declaration and definition.
2914 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2917 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2918 than ASM_OUTPUT_DEF.
2920 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2922 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2923 current_function_decl == NULL.
2925 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2928 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2931 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2933 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2935 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2936 or TREE_SIDE_EFFECTS of a type.
2938 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2941 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2942 cv-qualifier unification.
2943 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2945 2004-04-02 Jan Hubicka <jh@suse.cz>
2947 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2948 * cp-tree.h (cp_update_decl_after_saving): Declare.
2949 * tree.c (cp_update_decl_after_saving): Define.
2951 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2954 * typeck.c (get_delta_difference): Call fold before returning the
2957 2004-04-01 Richard Henderson <rth@redhat.com>
2960 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2961 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2963 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2966 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2968 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2970 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2972 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2974 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2975 * class.c (check_bitfield_decl): Likewise.
2976 * cvt.c (type_promotes_to): Likewise.
2977 * decl.c (finish_enum): Likewise.
2978 * mangle.c (write_builtin_type): Likewise.
2979 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2980 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2981 (build_binary_op): Likewise.
2983 2004-03-31 Jan Hubicka <jh@suse.cz>
2985 * tree.h (optimize_function): Kill prototype.
2986 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2987 * semantics.c (expand_body): Kill.
2989 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2992 * decl.c (start_decl_1): Do not decide whether or not to create a
2993 new cleanup level until after the type has been completed.
2996 * pt.c (tsubst_default_argument): Clear current_function_decl.
2998 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3000 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3002 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3004 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3005 is null, just print the literal name and return.
3007 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3009 * cxx-pretty-print.c: Fix comment typos.
3011 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3013 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3016 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3018 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3019 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3022 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3024 PR 12267, 12391, 12560, 13129, 14114, 14133
3025 * cp-lang.c (c_reset_state): Delete.
3026 (push_file_scope, pop_file_scope): New stubs.
3027 * parser.c (c_parse_file): Call sorry() here if called more than once.
3029 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3031 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3034 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3036 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3038 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3040 * error.c (enum pad): Remove.
3041 (dump_qualifiers): Likewise.
3042 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3043 (dump_aggr_type): Likewise.
3044 (dump_type_suffix): Likewise.
3045 (dump_simple_decl): Likewise.
3046 (dump_function_decl): Likewise.
3047 (cv_to_string): Likewise.
3048 (dump_type_prefix): Likewise. Adjust return void.
3049 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3051 (pp_cxx_template_keyword_if_needed): Document.
3052 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3053 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3054 MUST_NOT_THROW_EXPR.
3056 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3059 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3060 templates, if their type is non-dependent.
3062 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3064 * call.c (build_op_delete_call): Do not forget the placement
3065 arguments when iterating through mutiple delete operators.
3067 * cp-tree.h (svaed_scope): Remove last_parms.
3068 (NEW_DELETE_OPNAME_P): New macro.
3069 (last_function_parms): Remove.
3070 (do_friend): Adjust prototype.
3071 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3072 using last_function_parms.
3073 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3074 using last_function_parms.
3075 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3076 for class-specific operator new and operator delete.
3077 (grok_op_properties): Do not look for allocation functions with
3079 (start_function): Use DECL_ARGUMENTS instead of
3080 last_function_parms.
3081 * decl.h (last_function_parms): Do not declare.
3082 * decl2.c (grokclassfn): Do not use last_function_parms.
3083 * friend.c (do_friend): Remove parmdecls parameter.
3084 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3085 (pop_from_top_level): Do not restore it.
3086 * pt.c (check_explicit_specialization): Do not adjust
3087 last_function_parms.
3089 * name-lookup.c (do_local_using_decl): Create a local binding for
3090 types brought in via using declarations.
3092 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3093 function declarations correctly.
3095 * semantics.c (finish_id_expression): Correct handling of
3096 conversion operators to dependent types.
3098 * typeck.c (lookup_destructor): Allow the use of destructors from
3101 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3103 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3104 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3105 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3106 the field is named TEMPLATE_TYPE_PARM_INDEX.
3108 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3111 * parser.c (cp_parser_functional_cast): A cast to anything
3112 but integral or enumaration type is not an integral constant
3114 * pt.c (value_dependent_expression_p): Handle cast expressions
3115 without operands (such as "int()").
3117 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3119 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3120 cv-qualification between the type named by the
3121 pseudo-destructor-name and the object-type.
3123 * search.c (accessible_base_p): Handle non-proper bases.
3125 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3126 refers to a single overloaded function, set the type of the
3128 * tree.c (lvalue_type): Simplify.
3129 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3131 (build_unary_op): Handle OVERLOADs with known types.
3133 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3136 * parser.c (cp_parser_postfix_expression): Handle the use of
3137 "typename" in non-dependent contexts. Convert appropriately when
3138 when using a qualified name after "->" or ".".
3140 * call.c (conditional_conversion): Honor the requirement that some
3141 conversions refer to the original object.
3143 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3145 * call.c (build_conditional_expr): Do not call force_rvalue for
3146 operands of void_type when the conditional expression itself has
3148 * name-lookup.c (pushdecl): Don't consider a declaration of a
3149 function named "main" to be an overload of a type named "main".
3150 * parser.c (cp_parser_template_name): Perform name lookup when the
3151 template name is proceeded by "template" if the qualifying scope
3153 * typeck.c (composite_pointer_type_r): Correctly handle
3154 pointer-to-member types.
3155 (build_const_cast): Likewise.
3157 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3159 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3160 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3161 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3162 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3163 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3164 (TYPEOF_TYPE_EXPR): New macro.
3165 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3166 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3167 * pt.c (tsubst): Likewise.
3168 * semantics.c (finish_typeof): Likewise.
3169 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3170 and TEMPLATE_TYPE_PARM.
3171 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3172 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3174 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3177 * cp-tree.h (build_new_op): Change prototype.
3178 (build_x_binary_op): Likewise.
3179 * call.c (build_new_op): Add overloaded_p parameter.
3180 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3181 * parser.c (cp_parser_binary_expression): Note that uses of
3182 overloaded operators prevents an expression from being considered
3183 an integral constant.
3184 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3186 * semantics.c (finish_call_expr): Likewise.
3187 * typeck.c (rationalize_conditional_expr): Likewise.
3188 (build_x_indirect_ref): Likewise.
3189 (build_x_binary_op): Likewise.
3190 (build_x_unary_op): Likewise.
3191 (build_x_compound_expr): Likewise.
3192 (build_modify_expr): Likewise.
3193 * typeck2.c (build_x_arrow): Likewise.
3195 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3197 * cp-lang.c, ptree.c: Update copyright.
3199 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3202 * parser.c (cp_parser_non_integral_constant_expression): Encode
3203 more of the idiom that surrounded calls to this function within
3205 (cp_parser_primary_expression): Adjust accordingly.
3206 (cp_parser_postfix_expression): Likewise.
3207 (cp_parser_unary_expression): Likewise.
3208 (cp_parser_cast_expression): Likewise.
3209 (cp_parser_assignment_expression): Likewise.
3210 (cp_parser_expression): Likewise.
3211 (cp_parser_new_expression): Note that new-expressions are not
3212 allowed in integral constant expressions.
3213 (cp_parser_delete_expression): Likewise.
3215 2004-03-12 Matt Austern <austern@apple.com>
3217 * decl2.c (maybe_make_one_only): Look at
3218 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3219 to make an explicit instantiation weak.
3220 * method.c (use_thunk): Make sure we call comdat_linkage
3222 * pt.c (do_type_instantiation): On systems where weak symbols
3223 don't go in a static archive's TOC, explicit instantiation of a
3224 class must imply *explicit* instantiation of its memeber.
3226 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3228 * call.c, cp-tree.h, pt.c: Fix comment typos.
3230 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3233 * decl.c (xref_tag): Disregard non-type declarations when
3234 looking up a tagged type.
3236 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3239 * call.c (convert_like_real): Build a const qualified temporary,
3240 when testing ctor access.
3242 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3244 * call.c (initialize_reference): Fix typo.
3246 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3249 * pt.c (determine_specialization): For member templates, match also
3253 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3255 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3257 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3260 * call.c (initialize_reference): Handle initializers that are
3261 class-member access expressions applies to rvalues.
3263 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3266 * name-lookup.c (supplement_binding): Ignore functions that are
3267 marked DECL_ANTICIPATED.
3269 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3272 * class.c (check_field_decls): Complain about non-static data
3273 members of reference type in unions. Propagate
3274 CLASSTYPE_REF_FIELDS_NEED_INIT and
3275 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3277 * init.c (perform_member_init): Complain about mbmers with const
3278 type that are not explicitly initialized.
3280 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3282 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3283 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3284 (lang_identifier): Remove implicit_decl and error_locus.
3285 (IDENTIFIER_IMPLICIT_DECL): Remove.
3286 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3287 (IDENTIFIER_ERROR_LOCUS): Likewise.
3288 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3289 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3290 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3291 (implicitly_declare): Remove.
3292 * decl.c (warn_extern_redeclared_static): Remove check of
3293 IDENTIFIER_IMPLICIT_DECL.
3294 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3295 (implicitly_declare): Remove.
3296 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3297 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3298 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3299 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3300 in the innermost scope, rather than at namespace scope.
3301 * name-lookup.c (push_local_binding): Give it external linkage.
3302 (pushdecl): Remove dead code.
3303 * name-lookup.h (push_local_binding): Declare it.
3304 * ptree.c (cxx_print_identifier): Don't print
3305 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3306 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3307 not IDENTIFIER_ERROR_LOCUS.
3308 * typeck.c (build_function_call): Remove dead code.
3310 2004-03-08 Jason Merrill <jason@redhat.com>
3313 * decl.c (xref_tag): Remove attribute handling.
3314 * cp-tree.h: Adjust prototype.
3315 * decl.c, parser.c, rtti.c: Adjust callers.
3316 * parser.c (cp_parser_class_head): Pass back attributes in the
3318 (cp_parser_class_specifier): Adjust.
3320 2004-03-08 Matt Austern <austern@apple.com>
3323 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3324 as static, to static_decls array.
3326 2004-03-05 Jason Merrill <jason@redhat.com>
3328 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3330 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3332 * decl.c (grokfndecl): Update old incorrect comment.
3333 (grokvardecl): Diagnose C++ variables of type with no linkage.
3335 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3338 * pt.c (build_non_dependent_expr): Do not create a
3339 NON_DEPENDENT_EXPR for a THROW_EXPR.
3341 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3344 * error.c (dump_expr): Handle THROW_EXPR.
3346 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3349 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3350 lookup if ordinary name-lookup finds a non-function.
3351 * pt.c (tsubst_copy_and_build): Likewise.
3354 * parser.c (cp_parser_late_parsing_default_args): Check that there
3355 are no extra tokens after the end of the default-argument
3358 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3361 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3362 having C++ linkage for name-mangling purposes.
3365 * parser.c (cp_parser_direct_declarator): Recognize constructor
3366 declarators that use a template-id to name the class being
3370 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3371 (tsubst_expr): Do not call tsubst_copy, even when
3372 processing_template_decl.
3374 2004-03-01 Jeff Law <law@redhat.com>
3376 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3379 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3382 * name-lookup.h (push_scope): Change prototype.
3383 * name-lookup.c (push_scope): Do not reenter the current class
3385 * decl.c (grokfndecl): Check return code from push_scope before
3387 * decl2.c (check_classfn): Likewise.
3388 * parser.c (cp_parser_conversion_function_id): Likewise.
3389 (cp_parser_init_declarator): Likewise.
3390 (cp_parser_direct_declarator): Likewise.
3391 (cp_parser_class_specifier): Likewise.
3392 (cp_parser_class_head): Likewise.
3393 (cp_parser_lookup_name): Likewise.
3394 (cp_parser_constructor_declarator_p): Likewise.
3395 * pt.c (instantiate_class_template): Likewise.
3396 (resolve_typename_type): Likewise.
3398 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3401 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3405 * class.c (update_vtable_entry_for_fn): Do not go through
3406 covariance machinery if the type returned by an overrider is the
3407 same as the original.
3409 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3411 * call.c: Fix a comment typo.
3413 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3415 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3417 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3420 * parser.c (cp_parser_parameter_declaration_list): Commit
3421 to fewer tentative parses.
3423 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3426 * pt.c (dependent_type_p_r): A template template parameter is a
3429 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3432 * mangle.c (write_template_arg_literal): Don't rely on identity for
3435 2004-02-24 Jason Merrill <jason@redhat.com>
3437 * tree.c (build_exception_variant): Use check_qualified_type.
3439 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3440 Kazu Hirata <kazu@cs.umass.edu>
3442 * decl.c (cxx_init_decl_processing): Don't check
3443 flag_writable_strings.
3445 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3448 * typeck.c (maybe_warn_about_returning_address_of_location):
3449 Change check for VAR_DECL to use DECL_P instead.
3451 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3454 * cvt.c (build_expr_type_conversion): Type must be complete before
3455 looking up for conversions.
3457 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3460 * name-lookup.c (arg_assoc_class): Don't look into template
3461 arguments if it is not a primary template.
3463 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3466 * method.c (use_thunk): Always clone function argument tree.
3468 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3471 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3474 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3475 for all type variants.
3477 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3480 * decl.c (duplicate_decls): Return error_mark_node for invalid
3482 * name-lookup.c (push_namespace): Ignore the return value from
3484 * pt.c (push_template_decl_real): Robustify.
3487 * name-lookup.c (push_class_level_binding): Do not complain about
3488 adding a binding for a member whose name is the same as the
3489 enclosing class if the member is located in a base class of the
3492 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3495 * parser.c (cp_parser_new_expression): Parse an ill-formed
3496 direct-new-declarator after a parenthesized type-id to emit good
3499 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3501 * cp-tree.def, cvt.c: Update copyright.
3503 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3506 * cp-tree.h (abi_version_at_least): Remove.
3507 * mangle.c: Include flags.h.
3509 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3512 * call.c (build_conditional_expr): Handle conversions between
3513 class types which result in differently cv-qualified type
3517 * class.c (delete_duplicate_fields_1): Remove.
3518 (delete_duplicate_fields): Likewise.
3519 (finish_struct_anon): Remove check for members with the same name
3520 as their enclosing class.
3521 (check_field_decls): Do not call duplicate_fields.
3522 * decl.c (grokdeclarator): Remove check for static data members
3523 with the same name as their enclosing class.
3524 * name-lookup.c (push_class_level_binding): Check for members with
3525 the same name as their enclosing class.
3527 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3530 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3532 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3535 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3536 has full set of arguments.
3538 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3541 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3543 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3546 * cp-tree.h (delete_sanity): Change prototype.
3547 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3548 Remove dead code. Adjust code to warn about deleting an array.
3549 * typekc.c (decay_conversion): Use build_address and build_nop.
3552 * search.c (accessible_p): Do not check access in thunks.
3555 * call.c (build_conditional_expr): Call force_rvalue on the
3556 non-void operand in the case that one result is a throw-expression
3557 and the other is not.
3559 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3562 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3563 the type name and look ahead for ::~, and bail out early with a
3564 better error message if the parse is going to fail.
3566 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3568 * call.c (conversion_kind): New type.
3569 (conversion_rank): Likewise.
3570 (conversion): Likewise.
3571 (CONVERSION_RANK): New macro.
3572 (conversion_obstack): New variable.
3573 (obstack_initialized): Likewise.
3574 (z_candidate): Change type of convs and second_conv.
3575 (candidate_warning): New type.
3576 (IDENTITY_RANK): Remove.
3577 (EXACT_RANK): Likewise.
3578 (PROMO_RANK): Likewise.
3579 (STD_RANK): Likewise.
3580 (PBOOL_RANK): Likewise.
3581 (USER_RANK): Likewise.
3582 (ELLIPSIS_RANK): Likewise.
3583 (BAD_RANK): Likewise.
3584 (ICS_RANK): Likewise.
3585 (ICS_STD_RANK): Likewise.
3586 (ICS_USER_FLAG): Likewise.
3587 (ICS_ELLIPSIS_FLAG): Likewise.
3588 (ICS_THIS_FLAG): Likewise.
3589 (ICS_BAD_FLAG): Likewise.
3590 (NEED_TEMPORARY_P): Likewise.
3591 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3592 (USER_CONV_CAND): Likewise.
3593 (USER_CONV_FN): Likewise.
3594 (conversion_obstack_alloc): New function.
3595 (alloc_conversion): Likewise.
3596 (validate_conversion_obstack): Likewise.
3597 (alloc_conversions): Likewise.
3598 (build_conv): Adjust to deal with new conversion data structures.
3599 (build_identity_conv): New function.
3600 (build_ambiguous_conv): Likewise.
3601 (standard_conversion): Adjust to deal with new conversion data
3603 (convert_class_to_reference): Likewise.
3604 (direct_reference_binding): Likewise.
3605 (reference_binding): Likewise.
3606 (implicit_conversion): Likewise.
3607 (add_candidate): Likewise.
3608 (add_function_candidate): Likewise.
3609 (add_conv_candidate): Likewise.
3610 (build_builtin_candidate): Likewise.
3611 (print_z_candidate): Likewise.
3612 (merge_conversion_sequences): Likewise.
3613 (build_user_type_conversion_1): Likewise.
3614 (build_user_type_conversion): Likewise.
3615 (build_new_function_call): Likewise.
3616 (build_object_call): Likewise.
3617 (conditional_conversion): Likewise.
3618 (build_conditional_expr): Likewise.
3619 (build_new_op): Likewise.
3620 (build_op_delete_call): Likewise.
3621 (convert_like_real): Likewise.
3622 (build_over_call): Likewise.
3623 (build_new_method_call): Likewise.
3624 (is_subseq): Likewise.
3625 (maybe_handle_implicit_object): Likewise.
3626 (maybe_handle_ref_bind): Likewise.
3627 (compare_ics): Likewise.
3628 (source_type): Likewise.
3629 (add_warning): Likewise.
3631 (can_convert_arg): Likewise.
3632 (can_convert_arg_bad): Likewise.
3633 (perform_implicit_conversion): Likewise.
3634 (perform_direct_initialization_if_possible): Likewise.
3635 (initialize_reference): Likewise.
3636 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3637 * cp-tree.def (WRAPPER): Likewise.
3638 (IDENTITY_CONV): Remove.
3639 (LVALUE_CONV): Likewise.
3640 (QUAL_CONV): Likewise.
3641 (STD_CONV): Likewise.
3642 (PTR_CONV): Likewise.
3643 (PMEM_CONV): Likewise.
3644 (BASE_CONV): Likewise.
3645 (REF_BIND): Likewise.
3646 (USER_CONV): Likewise.
3647 (AMBIG_CONV): Likewise.
3648 (RVALUE_CONV): Likewise.
3649 * cp-tree.h (tree_wrapper): Remove.
3650 (WRAPPER_ZC): Remove.
3651 (lang_tree_node): Remove wrapper.
3652 (LOOKUP_SPECULATIVELY): Remove.
3653 (build_op_delete_call): Adjust prototype.
3654 (validate_conversion_obstack): Declare.
3655 (build_zc_wrapper): Remove.
3656 * cvt.c (convert_to_reference): Remove dead code.
3657 (ocp_convert): Likewise.
3658 * decl.c (redeclaration_error_message): Correct handling of
3660 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3661 (cp_tree_node_structure): Remove WRAPPER case.
3662 * decl2.c (finish_file): Call validate_conversion_obstack.
3663 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3664 (build_op_delete_call): Likewise.
3665 (build_x_delete): Likewise.
3666 (build_delete): Adjust call to build_op_delete_call.
3667 * pt.c (tsubst_friend_declaration): Adjust code to determine
3668 whether or not a friend template is a definition.
3669 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3670 * tree.c (build_zc_wrapper): Remove.
3672 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3674 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3675 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3676 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3677 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3679 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3681 * typeck.c (lookup_destructor): Fix typo in error message.
3683 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3685 * call.c, parser.c, tree.c: Fix comment typos.
3687 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3690 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3691 * decl.c (duplicate_decls, start_function): Likewise.
3693 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3695 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3696 * parser.c (free_parser_stacks): Delete.
3698 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3700 * rtti.c: Update copyright.
3702 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3705 * decl.c (require_complete_types_for_parms): Do not insert
3706 error_mark_node in the parameter list.
3708 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3711 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3712 error when terminator can not be found.
3714 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3716 Make-lang.in (po-generated): Delete.
3718 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3720 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3721 targetm.calls.promote_prototypes.
3723 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3727 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3729 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3730 (handle_pragma_implementation): Likewise.
3732 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3735 * typeck.c (lookup_destructor): Tweak error message.
3737 2004-02-05 Jan Hubicka <jh@suse.cz>
3739 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3742 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3745 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3746 code, only emits the diagnostic now. Added lookup of the identifier
3747 and support for qualified ids.
3748 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3749 Parse an (invalid) type name as id-expression within a declarator.
3750 (cp_parser_simple_declaration): Use it.
3751 (cp_parser_member_declaration): Likewise.
3752 (cp_parser_make_typename_type): New function. Handle errors through
3753 cp_parser_diagnose_invalid_typename.
3754 (cp_parser_elaborated_type_specifier): Use it.
3756 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3759 * call.c (convert_like_real): Use "converting" rather than
3760 "argument" as the descriptive keyword to
3761 dubious_conversion_warnings.
3762 * typeck.c (convert_for_assignment): Do not call
3763 dubious_conversion_warnings.
3765 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3768 * init.c (build_delete): Emit a more informative error message in
3769 case of an incomplete type, and on the correct source line.
3771 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3773 * error.c, search.c: Update copyright.
3775 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3778 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3779 linkage for the typeinfo name string.
3781 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3784 * cp-tree.h (fold_non_dependent_expr): New function.
3785 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3786 (cp_parser_template_argument): Use fold_non_dependent_expr.
3787 (cp_parser_direct_declarator): Likewise.
3788 * pt.c (fold_non_dependent_expr): New function.
3789 (convert_nontype_argument): Use it.
3790 (tsubst_qualified_id): Simplify.
3791 (tsubst_copy_and_build): Likewise.
3793 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3795 * decl.c (cxx_push_function_context): Do not set
3796 current_function_is_thunk.
3797 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3800 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3803 * pt.c (more_specialized_class): Increase processing_template_decl
3804 while partial ordering.
3806 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3809 * decl.c (start_function): Do not call pushdecl for any
3810 instantiation or specialization of a primary template.
3812 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3815 * parser.c (cp_parser_class_name): Robustify.
3818 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3821 * semantics.c (finish_id_expression): Do not return an
3822 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3824 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3827 * pt.c (build_non_dependent_expr): Do not build
3828 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3831 * semantics.c (finish_id_expression): Do not return an
3832 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3835 * parser.c (cp_parser_simple_declaration): When skipping to the
3836 end of the statement swallow the terminating semicolon.
3838 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3841 * init.c (build_offset_ref): Improve error recovery for invalid
3842 uses of non-static member functions.
3845 * cp-tree.h (cp_build_type_attribute_variant): New function.
3846 * class.c (build_clone): Use cp_build_type_attribute_variant.
3847 * decl.c (duplicate_decls): Likewise.
3848 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3849 (tsubst_function_type): Likewise.
3850 * tree.c (build_exception_variant): Check attributes before
3851 concluding that two types are the same.
3852 (cp_build_type-attribute_variant): New method.
3853 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3856 * call.c (convert_class_to_reference): Keep better track of
3857 pedantically invalid user-defined conversions.
3859 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3862 * pt.c (tsubst_qualified_id): Improved error message when a type
3863 is expected but not found.
3865 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3867 * class.c: Fix comment typos.
3869 * error.c: Likewise.
3870 * parser.c: Likewise.
3872 * search.c: Likewise.
3873 * typeck.c: Likewise.
3875 2004-01-30 Richard Henderson <rth@redhat.com>
3878 * method.c (use_thunk): Don't force_target_expr for void thunks.
3879 * tree.c (build_target_expr_with_type): Assert non-void type.
3880 (force_target_expr): Likewise.
3882 2004-01-30 Michael Matz <matz@suse.de>
3884 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3886 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3890 * decl.c (grokdeclarator): Check immediatly type completeness for
3891 non-dependent types.
3893 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3896 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3897 a sizeof expression.block
3899 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3902 * mangle.c (write_encoding): Correct encoding of member template
3905 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3907 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3908 template name as it was `<::' (digraph typo).
3909 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3910 (cp_parser_id_expression): Use it.
3911 (cp_parser_nested_name_specifier_opt): Likewise.
3912 (cp_parser_template_name): Likewise.
3913 (cp_parser_class_name): Likewise.
3914 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3916 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3919 * typeck.c (merge_types): Do not merge attributes into
3923 * parser.c (cp_parser_direct_declarator): Do not prevent
3924 backtracking inside a parenthesized declarator.
3925 (cp_parser_parameter_declaration): Fix typo in comment.
3927 2004-01-28 Jan Hubicka <jh@suse.cz>
3929 * semantics.c (expand_body) Do emit_associated_thunks before
3932 2004-01-27 Devang Patel <dpatel@apple.com>
3934 * name-lookup.c: Include "debug.h"
3935 (do_namespace_alias): Invoke debug_hooks to emit debug info
3936 for namespace alias.
3937 (do_local_using_decl): Invoke debug_hooks to emit debug info
3939 (do_class_using_decl): Same.
3940 (do_toplevel_using_decl): Same.
3941 (do_using_directive): Same.
3942 (cp_emit_debug_info_for_using): New function.
3943 * Make-lang.in (cp/parser.o): Depend on debug.h
3944 (cp/name-lookup.o): Same.
3946 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3948 * cp-tree.h (language_function, lang_type_header): Use
3950 * name-lookup.h (cp_binding_level): Likewise.
3952 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3955 * semantics.c (finish_for_expr): Check for unresolved overloaded
3958 * class.c (add_method): Just check processing_template_decl to
3959 determine whether or not we are within a template.
3960 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3961 * init.c (decl_constant_value): Check the type of the declaration,
3963 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3964 (push_to_top_level): ... this.
3965 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3966 * pt.c (push_template_decl_real): Reorder condition for speed.
3967 (convert_template_argument): Use dependency-checking functions in
3968 place of uses_template_parms.
3969 (lookup_template_class): Avoid calling uses_template_parms more
3971 (uses_template_parms): Reimplement, using dependency-checking
3973 (instantiate_class_template): Use push_to_top_level, not
3974 maybe_push_to_top_level.
3975 (type_unification_real): Simplify.
3976 (type_dependent_expression_p): Handle OFFSET_REFs and
3978 (any_dependent_template_arguments_p): Handle multiple levels of
3980 * semantics.c (expand_or_defer_fn): Do not check
3981 uses_template_parms for template instantiations.
3982 * typeck.c (comptypes): Avoid calling cp_type_quals.
3984 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3987 * call.c (build_over_call): Do not convert arguments when
3988 processing a template.
3989 * pt.c (build_non_dependent_expr): Do not build a
3990 NON_DEPENDENT_EXPR for arithmetic constants.
3992 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3995 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3996 returns a TYPE_DECL. no further lookup is required.
3997 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3998 is invalid. Rework to give better diagnostics.
4000 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4003 * pt.c (instantiate_class_template): Add an error_mark_node
4005 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4007 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4010 * decl.c (finish_function): Move the call to
4011 finish_fname_decls below the call to
4012 finish_eh_spec_block.
4014 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4016 * optimize.c, typeck2.c: Update copyright.
4018 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4020 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4021 init.c, mangle.c, typeck.c: Update copyright.
4023 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4025 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4027 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4029 * Make-lang.in: Replace $(docdir) with doc.
4030 (c++.info, c++.srcinfo): Dummy entry.
4031 (c++.man, c++.srcman): New rules.
4032 (c++.install-man): Revamp rule.
4034 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4036 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4037 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4038 immediate $(shell) instead of deferred backquote.
4040 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4043 * parser.c (cp_parser_postfix_expression): When encountering
4044 incomplete type on left-hand side of "->" or ".", treat the entire
4045 expression as erroneous.
4048 * call.c (build_field_call): Remove.
4049 (n_build_method_call): Likewise.
4050 (build_method_call): Likewise.
4051 (build_new_method_call): Do not call build_field_call.
4052 * class.c (n_build_method_call): Remove.
4053 (print_class_statistics): Do not print it.
4054 * cp-tree.h (build_method_call): Remove declaration.
4055 (finish_object_call_expr): Likewise.
4056 (build_new_1): Do not use build_method_call.
4057 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4058 when the function appearing on the right-hand-side of "." or "->"
4059 is not actually a function.
4060 * pt.c (tsubst_copy_and_build): Likewise.
4061 * semantics.c (finish_object_call_expr): Remove.
4063 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4066 * pt.c (tsubst): Use finish_typeof.
4068 2004-01-18 Jason Merrill <jason@redhat.com>
4071 * except.c (build_throw): In a template, set
4072 current_function_returns_abnormally.
4074 2004-01-17 Fred Fish <fnf@intrinsity.com>
4077 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4078 except don't call array_type_nelts() with a VECTOR_TYPE.
4080 2004-01-16 Jan Hubicka <jh@suse.cz>
4082 * mangle.c (write_mangled_name): Remove inline modifier.
4084 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4087 * decl.c (compute_array_index_type): Fix grammar in comment.
4088 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4091 * call.c (name_as_c_string): Print conversion operator names
4095 * call.c (initialize_reference): Pass -1 for inner parameter to
4098 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4101 * parser.c (cp_parser_base_specifier): Check for an invalid
4102 keyword `typename' and emit an user-friendly error message.
4104 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4107 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4108 (handle_pragma_implementation): Likewise.
4110 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4113 * typeck.c (build_class_member_access_expr): Allow to access members
4114 of the currently open class.
4115 (finish_class_member_access_expr): Likewise.
4117 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4120 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4121 name by value, instead of computing them.
4122 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4123 arguments. Pass them to validate_nonmember_using_decl.
4124 * name-lookup.h (do_local_using_decl): Adjust.
4125 (do_toplevel_using_decl): Likewise.
4126 * parser.c (cp_parser_using_declaration): Likewise.
4127 * pt.c (tsubst_expr): Likewise.
4129 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4133 * name-lookup.c (qualified_lookup_using_namespace): Search
4134 strongly-associated namespaces first, and only then try other
4137 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4139 * Make-lang.in (c++.srcextra): Dummy entry.
4141 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4144 * parser.c (cp_parser_template_name): Don't try to parse a
4145 conversion-function-id, as it cannot be a template-name.
4146 (cp_parser_simple_type_specifier): Check for invalid template-ids
4147 even after a built-in type.
4149 2004-01-14 Jan Hubicka <jh@suse.cz>
4152 * pt.c (instantiate_decl): Do not increase function_depth.
4154 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4158 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4159 attributes and discard.
4160 * decl.c (xref_tag): Don't overwite existing attributes with
4163 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4166 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4167 is no destructor while looking up a BIT_NOT_EXPR.
4169 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4171 * cxxfilt.c: Remove unused file.
4173 2004-01-14 Jan Hubicka <jh@suse.cz>
4175 Partial fix to PR c++/12850
4176 * decl2.c (mark_used): Do not proactively instantiate templates
4177 when compiling in unit-at-a-time or not optimizing.
4178 * optimize.c (maybe_clone_body): Do not increase function depth.
4180 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4183 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4185 2004-01-12 Steven Bosscher <stevenb@suse.de>
4188 * parser.c (cp_parser_member_declaration): Any non-type is also
4189 not a class or a function.
4191 2004-01-12 Jason Merrill <jason@redhat.com>
4194 * class.c (build_base_path): Do not mark vtable references as
4196 (build_vtbl_ref_1): Likewise.
4198 2004-01-12 Richard Henderson <rth@redhat.com>
4201 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4202 (store_init_value): Use it.
4203 * decl.c (check_initializer): Expect full initialization code
4204 from store_init_value.
4205 * init.c (expand_aggr_init_1): Likewise.
4206 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4208 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4210 * class.c (layout_class_type): For non-POD class types, also copy
4211 the DECL_SIZE and DECL_MODE of fields to the base class type.
4213 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4216 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4217 calling regenerate_decl_from_template.
4219 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4222 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4223 decl-specifier occurring along with a class definition.
4225 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4227 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4228 clauses to comments describing declares_class_or_enum.
4229 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4232 2004-01-12 Jan Hubicka <jh@suse.cz>
4234 * pt.c (for_each_template_parm): Do not check for duplicates.
4235 (for_each_template_parm): Use walk_tree duplicate checking code.
4237 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4240 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4241 is error_mark_node, don't add any more decl_specs.
4242 (cp_parser_init_declarator): After committing to a declaration, if
4243 the decl_specifiers start with error_mark_node, issue an error and
4244 change the type to "int".
4246 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4249 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4251 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4255 * pt.c (tsubst): Substitution must fail if we are attempting to
4256 create an array with element type that is an abstract class type.
4257 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4258 before calling abstract_virtuals_error.
4260 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4262 * name-lookup.c (qualified_lookup_using_namespace): Consider
4263 strong using directives even if we've already found a binding.
4265 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4267 * cp-tree.h (cxx_expand_expr): Change prototype.
4268 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4270 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4273 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4274 looking into them recursively. They can be there because of the
4275 new __offsetof__ extension.
4277 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4279 * parser.c (cp_parser_save_member_function_body): Mark the
4282 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4285 * class.c (build_clone): Copy type attributes from the original
4286 function to the clone.
4289 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4290 references as constant.
4293 * parser.c (cp_parser_explicit_instantiation): Improve error
4295 (cp_parser_require): Improve indication of the error location.
4298 * parser.c (cp_parser_class_head): Reorder logic to check for
4299 invalid qualification.
4301 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4304 * name-lookup.c (lookup_using_namespace): Remove spacesp
4306 (unqualified_namespace_lookup): Likewise.
4307 (lookup_qualified_name): Adjust accordingly.
4308 (lookup_name_real): Likewise.
4309 (lookup_arg_dependent): Do not eliminate the namespace of the
4310 functions found by unqualified name lookup unless that is the
4313 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4315 * semantics.c (push_deferring_access_checks): Fix format.
4316 (resume_deferring_access_checks): Likewise.
4317 (stop_deferring_access_checks): Likewise.
4318 (pop_deferring_access_checks): Likewise.
4319 (get_deferred_access_checks): Likewise.
4320 (pop_to_parent_deferring_access_checks): Likewise.
4321 (perform_deferred_access_checks): Likewise.
4322 (perform_or_defer_access_check): Likewise.
4324 2004-01-04 Richard Henderson <rth@redhat.com>
4326 * call.c (build_over_call): Don't create a save_expr of an
4327 aggregate, but rather its address.
4329 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4332 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4333 an offsetof expression.
4335 * parser.c (cp_parser_parameter_declaration): Fix comment.
4338 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4339 (reference_binding): Set it when appropriate.
4340 (build_temp): New function, split out from ...
4341 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4342 (initialize_reference): Likewise.
4345 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4346 (cp_parser_new): Initialize it.
4347 (cp_parser_postfix_expression): Set it.
4348 (cp_parser_sizeof_operand): Likewise.
4349 (cp_parser_parameteR_declaration): Do not commit early to tenative
4350 parsers when in_type_id_in_expr_p is set.
4352 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4355 * parser.c (cp_parser_template_argument): Don't call
4356 make_unbound_class_template directly.
4357 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4358 UNBOUND_CLASS_TEMPLATE tree node.
4360 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4363 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4365 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4368 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4369 (DECL_FUNCTION_TEMPLATE_P): Use it.
4370 (DECL_CLASS_TEMPLATE_P): Likewise.
4371 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4372 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4373 (cp_parser_template_name): Likewise.
4374 (cp_parser_elaborated_type_specifier): Likewise.
4375 (cp_parser_namespace_name): Likewise.
4376 (cp_parser_class_name): Likewise.
4377 (cp_parser_lookup_name_simple): Likewise.
4379 See ChangeLog.3 for earlier changes.